From 2cf70aa33bb3b368e0b7d429efeb624aa6190c73 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 8 Nov 2024 20:05:51 +0000 Subject: [PATCH 1/2] feat: add LocalSsdEncryptionMode in NodeConfig feat: add LinuxNodeConfig in NodePoolAutoConfig feat: add DesiredEnterpriseConfig proto message feat: add desired_enterprise_config,desired_node_pool_auto_config_linux_node_config to ClusterUpdate. feat: add UpgradeInfoEvent proto message feat: add desired_tier to EnterpriseConfig. docs: Minor documentation updates PiperOrigin-RevId: 694543887 Source-Link: https://github.com/googleapis/googleapis/commit/48fb029710460cbc08f8916c9e2474c13b52d331 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7e07562afafd36ba45419ee62ea2705b6d35dc17 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiN2UwNzU2MmFmYWZkMzZiYTQ1NDE5ZWU2MmVhMjcwNWI2ZDM1ZGMxNyJ9 --- .../google-container/v1/.eslintignore | 7 + .../google-container/v1/.eslintrc.json | 3 + .../google-container/v1/.gitignore | 14 + owl-bot-staging/google-container/v1/.jsdoc.js | 55 + .../google-container/v1/.mocharc.js | 33 + .../google-container/v1/.prettierrc.js | 22 + owl-bot-staging/google-container/v1/README.md | 1 + .../google-container/v1/package.json | 58 + .../google/container/v1/cluster_service.proto | 6061 ++ .../google-container/v1/protos/protos.d.ts | 32009 ++++++ .../google-container/v1/protos/protos.js | 83279 +++++++++++++++ .../google-container/v1/protos/protos.json | 8766 ++ .../v1/cluster_manager.cancel_operation.js | 61 + ...r_manager.check_autopilot_compatibility.js | 61 + .../cluster_manager.complete_i_p_rotation.js | 61 + ...ster_manager.complete_node_pool_upgrade.js | 62 + .../v1/cluster_manager.create_cluster.js | 67 + .../v1/cluster_manager.create_node_pool.js | 67 + .../v1/cluster_manager.delete_cluster.js | 61 + .../v1/cluster_manager.delete_node_pool.js | 62 + .../v1/cluster_manager.get_cluster.js | 61 + .../cluster_manager.get_j_s_o_n_web_keys.js | 61 + .../v1/cluster_manager.get_node_pool.js | 62 + .../v1/cluster_manager.get_operation.js | 61 + .../v1/cluster_manager.get_server_config.js | 61 + .../v1/cluster_manager.list_clusters.js | 62 + .../v1/cluster_manager.list_node_pools.js | 61 + .../v1/cluster_manager.list_operations.js | 62 + ...cluster_manager.list_usable_subnetworks.js | 82 + ...ster_manager.rollback_node_pool_upgrade.js | 67 + .../v1/cluster_manager.set_addons_config.js | 67 + .../v1/cluster_manager.set_labels.js | 76 + .../v1/cluster_manager.set_legacy_abac.js | 66 + .../v1/cluster_manager.set_locations.js | 71 + .../v1/cluster_manager.set_logging_service.js | 74 + .../cluster_manager.set_maintenance_policy.js | 86 + .../v1/cluster_manager.set_master_auth.js | 71 + .../cluster_manager.set_monitoring_service.js | 74 + .../v1/cluster_manager.set_network_policy.js | 66 + ...uster_manager.set_node_pool_autoscaling.js | 67 + ...luster_manager.set_node_pool_management.js | 67 + .../v1/cluster_manager.set_node_pool_size.js | 67 + .../v1/cluster_manager.start_i_p_rotation.js | 65 + .../v1/cluster_manager.update_cluster.js | 66 + .../v1/cluster_manager.update_master.js | 73 + .../v1/cluster_manager.update_node_pool.js | 212 + .../snippet_metadata_google.container.v1.json | 1947 + .../google-container/v1/src/index.ts | 25 + .../v1/src/v1/cluster_manager_client.ts | 3712 + .../src/v1/cluster_manager_client_config.json | 192 + .../v1/src/v1/cluster_manager_proto_list.json | 3 + .../v1/src/v1/gapic_metadata.json | 367 + .../google-container/v1/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_cluster_manager_v1.ts | 5305 + .../google-container/v1/tsconfig.json | 19 + .../google-container/v1/webpack.config.js | 64 + .../google-container/v1beta1/.eslintignore | 7 + .../google-container/v1beta1/.eslintrc.json | 3 + .../google-container/v1beta1/.gitignore | 14 + .../google-container/v1beta1/.jsdoc.js | 55 + .../google-container/v1beta1/.mocharc.js | 33 + .../google-container/v1beta1/.prettierrc.js | 22 + .../google-container/v1beta1/README.md | 1 + .../google-container/v1beta1/package.json | 58 + .../container/v1beta1/cluster_service.proto | 6275 ++ .../v1beta1/protos/protos.d.ts | 33578 ++++++ .../google-container/v1beta1/protos/protos.js | 86801 ++++++++++++++++ .../v1beta1/protos/protos.json | 9015 ++ .../cluster_manager.cancel_operation.js | 64 + ...r_manager.check_autopilot_compatibility.js | 61 + .../cluster_manager.complete_i_p_rotation.js | 64 + ...ster_manager.complete_node_pool_upgrade.js | 62 + .../v1beta1/cluster_manager.create_cluster.js | 69 + .../cluster_manager.create_node_pool.js | 70 + .../v1beta1/cluster_manager.delete_cluster.js | 64 + .../cluster_manager.delete_node_pool.js | 66 + .../v1beta1/cluster_manager.get_cluster.js | 64 + .../cluster_manager.get_j_s_o_n_web_keys.js | 61 + .../v1beta1/cluster_manager.get_node_pool.js | 66 + .../v1beta1/cluster_manager.get_operation.js | 64 + .../cluster_manager.get_server_config.js | 63 + .../v1beta1/cluster_manager.list_clusters.js | 64 + .../v1beta1/cluster_manager.list_locations.js | 62 + .../cluster_manager.list_node_pools.js | 64 + .../cluster_manager.list_operations.js | 64 + ...cluster_manager.list_usable_subnetworks.js | 83 + ...ster_manager.rollback_node_pool_upgrade.js | 71 + .../cluster_manager.set_addons_config.js | 70 + .../v1beta1/cluster_manager.set_labels.js | 79 + .../cluster_manager.set_legacy_abac.js | 69 + .../v1beta1/cluster_manager.set_locations.js | 74 + .../cluster_manager.set_logging_service.js | 77 + .../cluster_manager.set_maintenance_policy.js | 86 + .../cluster_manager.set_master_auth.js | 74 + .../cluster_manager.set_monitoring_service.js | 77 + .../cluster_manager.set_network_policy.js | 69 + ...uster_manager.set_node_pool_autoscaling.js | 71 + ...luster_manager.set_node_pool_management.js | 71 + .../cluster_manager.set_node_pool_size.js | 71 + .../cluster_manager.start_i_p_rotation.js | 68 + .../v1beta1/cluster_manager.update_cluster.js | 69 + .../v1beta1/cluster_manager.update_master.js | 76 + .../cluster_manager.update_node_pool.js | 208 + ...pet_metadata_google.container.v1beta1.json | 1983 + .../google-container/v1beta1/src/index.ts | 25 + .../src/v1beta1/cluster_manager_client.ts | 3637 + .../cluster_manager_client_config.json | 198 + .../v1beta1/cluster_manager_proto_list.json | 3 + .../v1beta1/src/v1beta1/gapic_metadata.json | 377 + .../v1beta1/src/v1beta1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1beta1/system-test/install.ts | 49 + .../test/gapic_cluster_manager_v1beta1.ts | 5302 + .../google-container/v1beta1/tsconfig.json | 19 + .../v1beta1/webpack.config.js | 64 + 119 files changed, 294631 insertions(+) create mode 100644 owl-bot-staging/google-container/v1/.eslintignore create mode 100644 owl-bot-staging/google-container/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-container/v1/.gitignore create mode 100644 owl-bot-staging/google-container/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-container/v1/.mocharc.js create mode 100644 owl-bot-staging/google-container/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-container/v1/README.md create mode 100644 owl-bot-staging/google-container/v1/package.json create mode 100644 owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto create mode 100644 owl-bot-staging/google-container/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-container/v1/protos/protos.js create mode 100644 owl-bot-staging/google-container/v1/protos/protos.json create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js create mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json create mode 100644 owl-bot-staging/google-container/v1/src/index.ts create mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts create mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json create mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json create mode 100644 owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-container/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-container/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts create mode 100644 owl-bot-staging/google-container/v1/tsconfig.json create mode 100644 owl-bot-staging/google-container/v1/webpack.config.js create mode 100644 owl-bot-staging/google-container/v1beta1/.eslintignore create mode 100644 owl-bot-staging/google-container/v1beta1/.eslintrc.json create mode 100644 owl-bot-staging/google-container/v1beta1/.gitignore create mode 100644 owl-bot-staging/google-container/v1beta1/.jsdoc.js create mode 100644 owl-bot-staging/google-container/v1beta1/.mocharc.js create mode 100644 owl-bot-staging/google-container/v1beta1/.prettierrc.js create mode 100644 owl-bot-staging/google-container/v1beta1/README.md create mode 100644 owl-bot-staging/google-container/v1beta1/package.json create mode 100644 owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto create mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.js create mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.json create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js create mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json create mode 100644 owl-bot-staging/google-container/v1beta1/src/index.ts create mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts create mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json create mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json create mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts create mode 100644 owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-container/v1beta1/system-test/install.ts create mode 100644 owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts create mode 100644 owl-bot-staging/google-container/v1beta1/tsconfig.json create mode 100644 owl-bot-staging/google-container/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-container/v1/.eslintignore b/owl-bot-staging/google-container/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-container/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-container/v1/.eslintrc.json b/owl-bot-staging/google-container/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-container/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-container/v1/.gitignore b/owl-bot-staging/google-container/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-container/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-container/v1/.jsdoc.js b/owl-bot-staging/google-container/v1/.jsdoc.js new file mode 100644 index 00000000000..afb61595735 --- /dev/null +++ b/owl-bot-staging/google-container/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/container', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-container/v1/.mocharc.js b/owl-bot-staging/google-container/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-container/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1/.prettierrc.js b/owl-bot-staging/google-container/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-container/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1/README.md b/owl-bot-staging/google-container/v1/README.md new file mode 100644 index 00000000000..f32441d7e6b --- /dev/null +++ b/owl-bot-staging/google-container/v1/README.md @@ -0,0 +1 @@ +Container: Nodejs Client diff --git a/owl-bot-staging/google-container/v1/package.json b/owl-bot-staging/google-container/v1/package.json new file mode 100644 index 00000000000..6b69752dd23 --- /dev/null +++ b/owl-bot-staging/google-container/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/container", + "version": "0.1.0", + "description": "Container client for Node.js", + "repository": "googleapis/nodejs-container", + "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 container", + "container", + "cluster manager" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto b/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto new file mode 100644 index 00000000000..2013c15fe8c --- /dev/null +++ b/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto @@ -0,0 +1,6061 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.container.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/code.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Container.V1"; +option go_package = "cloud.google.com/go/container/apiv1/containerpb;containerpb"; +option java_multiple_files = true; +option java_outer_classname = "ClusterServiceProto"; +option java_package = "com.google.container.v1"; +option php_namespace = "Google\\Cloud\\Container\\V1"; +option ruby_package = "Google::Cloud::Container::V1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; +option (google.api.resource_definition) = { + type: "privateca.googleapis.com/CaPool" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; + +// Google Kubernetes Engine Cluster Manager v1 +service ClusterManager { + option (google.api.default_host) = "container.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all clusters owned by a project in either the specified zone or all + // zones. + rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/clusters" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters" + } + }; + option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific cluster. + rpc GetCluster(GetClusterRequest) returns (Cluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; + } + + // Creates a cluster, consisting of the specified number and type of Google + // Compute Engine instances. + // + // By default, the cluster is created in the project's + // [default + // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + // + // One firewall is added for the cluster. After cluster creation, + // the Kubelet creates routes for each node to allow the containers + // on that node to communicate with all other instances in the + // cluster. + // + // Finally, an entry is added to the project's global metadata indicating + // which CIDR range the cluster is using. + rpc CreateCluster(CreateClusterRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/clusters" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster"; + option (google.api.method_signature) = "parent,cluster"; + } + + // Updates the settings of a specific cluster. + rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/clusters/*}" + body: "*" + additional_bindings { + put: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id,update"; + option (google.api.method_signature) = "name,update"; + } + + // Updates the version and/or image type for the specified node pool. + rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" + body: "*" + } + }; + } + + // Sets the autoscaling settings for the specified node pool. + rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) + returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" + body: "*" + } + }; + } + + // Sets the logging service for a specific cluster. + rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLogging" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,logging_service"; + option (google.api.method_signature) = "name,logging_service"; + } + + // Sets the monitoring service for a specific cluster. + rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,monitoring_service"; + option (google.api.method_signature) = "name,monitoring_service"; + } + + // Sets the addons for a specific cluster. + rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setAddons" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,addons_config"; + option (google.api.method_signature) = "name,addons_config"; + } + + // Sets the locations for a specific cluster. + // Deprecated. Use + // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) + // instead. + rpc SetLocations(SetLocationsRequest) returns (Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLocations" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,locations"; + option (google.api.method_signature) = "name,locations"; + } + + // Updates the master for a specific cluster. + rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,master_version"; + option (google.api.method_signature) = "name,master_version"; + } + + // Sets master auth materials. Currently supports changing the admin password + // or a specific cluster, either via password generation or explicitly setting + // the password. + rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" + body: "*" + } + }; + } + + // Deletes the cluster, including the Kubernetes endpoint and all worker + // nodes. + // + // Firewalls and routes that were configured during cluster creation + // are also deleted. + // + // Other Google Compute Engine resources that might be in use by the cluster, + // such as load balancer resources, are not deleted if they weren't present + // when the cluster was initially created. + rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; + } + + // Lists all operations in a project in a specific zone or all zones. + rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/operations" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/operations" + } + }; + option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "parent"; + } + + // Gets the specified operation. + rpc GetOperation(GetOperationRequest) returns (Operation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/operations/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,operation_id"; + option (google.api.method_signature) = "name"; + } + + // Cancels the specified operation. + rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/operations/*}:cancel" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,operation_id"; + option (google.api.method_signature) = "name"; + } + + // Returns configuration info about the Google Kubernetes Engine service. + rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*}/serverConfig" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/serverconfig" + } + }; + option (google.api.method_signature) = "project_id,zone"; + option (google.api.method_signature) = "name"; + } + + // Gets the public component of the cluster signing keys in + // JSON Web Key format. + rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" + }; + } + + // Lists the node pools for a cluster. + rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the requested node pool. + rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; + } + + // Creates a node pool for a cluster. + rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool"; + option (google.api.method_signature) = "parent,node_pool"; + } + + // Deletes a node pool from a cluster. + rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; + } + + // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to + // complete. + rpc CompleteNodePoolUpgrade(CompleteNodePoolUpgradeRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade" + body: "*" + }; + } + + // Rolls back a previously Aborted or Failed NodePool upgrade. + // This makes no changes if the last upgrade successfully completed. + rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) + returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + option (google.api.method_signature) = "name"; + } + + // Sets the NodeManagement options for a node pool. + rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" + body: "*" + } + }; + } + + // Sets labels on a cluster. + rpc SetLabels(SetLabelsRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" + body: "*" + } + }; + } + + // Enables or disables the ABAC authorization mechanism on a cluster. + rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; + option (google.api.method_signature) = "name,enabled"; + } + + // Starts master IP rotation. + rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; + } + + // Completes master IP rotation. + rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + option (google.api.method_signature) = "name"; + } + + // Sets the size for a specific node pool. The new size will be used for all + // replicas, including future replicas created by modifying + // [NodePool.locations][google.container.v1.NodePool.locations]. + rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" + body: "*" + } + }; + } + + // Enables or disables Network Policy for a cluster. + rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,network_policy"; + option (google.api.method_signature) = "name,network_policy"; + } + + // Sets the maintenance policy for a cluster. + rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" + body: "*" + additional_bindings { + post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,maintenance_policy"; + option (google.api.method_signature) = "name,maintenance_policy"; + } + + // Lists subnetworks that are usable for creating clusters in a project. + rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) + returns (ListUsableSubnetworksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/aggregated/usableSubnetworks" + }; + } + + // Checks the cluster compatibility with Autopilot mode, and returns a list of + // compatibility issues. + rpc CheckAutopilotCompatibility(CheckAutopilotCompatibilityRequest) + returns (CheckAutopilotCompatibilityResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + }; + } +} + +// Parameters that can be configured on Linux nodes. +message LinuxNodeConfig { + // Possible cgroup modes that can be used. + enum CgroupMode { + // CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. + // The default for the GKE node OS image will be used. + CGROUP_MODE_UNSPECIFIED = 0; + + // CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on + // the node image. + CGROUP_MODE_V1 = 1; + + // CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on + // the node image. + CGROUP_MODE_V2 = 2; + } + + // Hugepages amount in both 2m and 1g size + message HugepagesConfig { + // Optional. Amount of 2M hugepages + optional int32 hugepage_size2m = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of 1G hugepages + optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The Linux kernel parameters to be applied to the nodes and all pods running + // on the nodes. + // + // The following parameters are supported. + // + // net.core.busy_poll + // net.core.busy_read + // net.core.netdev_max_backlog + // net.core.rmem_max + // net.core.wmem_default + // net.core.wmem_max + // net.core.optmem_max + // net.core.somaxconn + // net.ipv4.tcp_rmem + // net.ipv4.tcp_wmem + // net.ipv4.tcp_tw_reuse + // kernel.shmmni + // kernel.shmmax + // kernel.shmall + map sysctls = 1; + + // cgroup_mode specifies the cgroup mode to be used on the node. + CgroupMode cgroup_mode = 2; + + // Optional. Amounts for 2M and 1G hugepages + optional HugepagesConfig hugepages = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Parameters that can be configured on Windows nodes. +// Windows Node Config that define the parameters that will be used to +// configure the Windows node pool settings +message WindowsNodeConfig { + // Possible OS version that can be used. + enum OSVersion { + // When OSVersion is not specified + OS_VERSION_UNSPECIFIED = 0; + + // LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image + OS_VERSION_LTSC2019 = 1; + + // LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image + OS_VERSION_LTSC2022 = 2; + } + + // OSVersion specifies the Windows node config to be used on the node + OSVersion os_version = 1; +} + +// Node kubelet configs. +message NodeKubeletConfig { + // Control the CPU management policy on the node. + // See + // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + // + // The following values are allowed. + // * "none": the default, which represents the existing scheduling behavior. + // * "static": allows pods with certain resource characteristics to be granted + // increased CPU affinity and exclusivity on the node. + // The default value is 'none' if unspecified. + string cpu_manager_policy = 1; + + // Enable CPU CFS quota enforcement for containers that specify CPU limits. + // + // This option is enabled by default which makes kubelet use CFS quota + // (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + // enforce container CPU limits. Otherwise, CPU limits will not be enforced at + // all. + // + // Disable this option to mitigate CPU throttling problems while still having + // your pods to be in Guaranteed QoS class by specifying the CPU limits. + // + // The default value is 'true' if unspecified. + google.protobuf.BoolValue cpu_cfs_quota = 2; + + // Set the CPU CFS quota period value 'cpu.cfs_period_us'. + // + // The string must be a sequence of decimal numbers, each with optional + // fraction and a unit suffix, such as "300ms". + // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + // The value must be a positive duration. + string cpu_cfs_quota_period = 3; + + // Set the Pod PID limits. See + // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + // + // Controls the maximum number of processes allowed to run in a pod. The value + // must be greater than or equal to 1024 and less than 4194304. + int64 pod_pids_limit = 4; + + // Enable or disable Kubelet read only port. + optional bool insecure_kubelet_readonly_port_enabled = 7; +} + +// Parameters that describe the nodes in a cluster. +// +// GKE Autopilot clusters do not +// recognize parameters in `NodeConfig`. Use +// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] +// instead. +message NodeConfig { + // LocalSsdEncryptionMode specifies the method used for encrypting the Local + // SSDs attached to the node. + enum LocalSsdEncryptionMode { + // The given node will be encrypted using keys managed by Google + // infrastructure and the keys will be deleted when the node is + // deleted. + LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0; + + // The given node will be encrypted using keys managed by Google + // infrastructure and the keys will be deleted when the node is + // deleted. + STANDARD_ENCRYPTION = 1; + + // The given node will opt-in for using ephemeral key for + // encryption of Local SSDs. + // The Local SSDs will not be able to recover data in case of node + // crash. + EPHEMERAL_KEY_ENCRYPTION = 2; + } + + // Possible effective cgroup modes for the node. + enum EffectiveCgroupMode { + // EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the + // node pool is unspecified, i.e. the node pool is a Windows node pool. + EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0; + + // CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the + // cgroup configuration. + EFFECTIVE_CGROUP_MODE_V1 = 1; + + // CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the + // cgroup configuration. + EFFECTIVE_CGROUP_MODE_V2 = 2; + } + + // The name of a Google Compute Engine [machine + // type](https://cloud.google.com/compute/docs/machine-types) + // + // If unspecified, the default machine type is `e2-medium`. + string machine_type = 1; + + // Size of the disk attached to each node, specified in GB. + // The smallest allowed disk size is 10GB. + // + // If unspecified, the default disk size is 100GB. + int32 disk_size_gb = 2; + + // The set of Google API scopes to be made available on all of the + // node VMs under the "default" service account. + // + // The following scopes are recommended, but not required, and by default are + // not included: + // + // * `https://www.googleapis.com/auth/compute` is required for mounting + // persistent storage on your nodes. + // * `https://www.googleapis.com/auth/devstorage.read_only` is required for + // communicating with **gcr.io** + // (the [Google Container + // Registry](https://cloud.google.com/container-registry/)). + // + // If unspecified, no scopes are added, unless Cloud Logging or Cloud + // Monitoring are enabled, in which case their required scopes will be added. + repeated string oauth_scopes = 3; + + // The Google Cloud Platform Service Account to be used by the node VMs. + // Specify the email address of the Service Account; otherwise, if no Service + // Account is specified, the "default" service account is used. + string service_account = 9; + + // The metadata key/value pairs assigned to instances in the cluster. + // + // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes + // in length. These are reflected as part of a URL in the metadata server. + // Additionally, to avoid ambiguity, keys must not conflict with any other + // metadata keys for the project or be one of the reserved keys: + // + // - "cluster-location" + // - "cluster-name" + // - "cluster-uid" + // - "configure-sh" + // - "containerd-configure-sh" + // - "enable-os-login" + // - "gci-ensure-gke-docker" + // - "gci-metrics-enabled" + // - "gci-update-strategy" + // - "instance-template" + // - "kube-env" + // - "startup-script" + // - "user-data" + // - "disable-address-manager" + // - "windows-startup-script-ps1" + // - "common-psm1" + // - "k8s-node-setup-psm1" + // - "install-ssh-psm1" + // - "user-profile-psm1" + // + // Values are free-form strings, and only have meaning as interpreted by + // the image running in the instance. The only restriction placed on them is + // that each value's size must be less than or equal to 32 KB. + // + // The total size of all keys and values must be less than 512 KB. + map metadata = 4; + + // The image type to use for this node. Note that for a given image type, + // the latest version of it will be used. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 5; + + // The map of Kubernetes labels (key/value pairs) to be applied to each node. + // These will added in addition to any default label(s) that + // Kubernetes may apply to the node. + // In case of conflict in label keys, the applied set may differ depending on + // the Kubernetes version -- it's best to assume the behavior is undefined + // and conflicts should be avoided. + // For more information, including usage and the valid values, see: + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + map labels = 6; + + // The number of local SSD disks to be attached to the node. + // + // The limit for this value is dependent upon the maximum number of + // disks available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + int32 local_ssd_count = 7; + + // The list of instance tags applied to all nodes. Tags are used to identify + // valid sources or targets for network firewalls and are specified by + // the client during cluster or node pool creation. Each tag within the list + // must comply with RFC1035. + repeated string tags = 8; + + // Whether the nodes are created as preemptible VM instances. See: + // https://cloud.google.com/compute/docs/instances/preemptible for more + // information about preemptible VM instances. + bool preemptible = 10; + + // A list of hardware accelerators to be attached to each node. + // See https://cloud.google.com/compute/docs/gpus for more information about + // support for GPUs. + repeated AcceleratorConfig accelerators = 11; + + // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or + // 'pd-balanced') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 12; + + // Minimum CPU platform to be used by this instance. The instance may be + // scheduled on the specified or newer CPU platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: "Intel Haswell"` or + // `minCpuPlatform: "Intel Sandy Bridge"`. For more + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) + string min_cpu_platform = 13; + + // The workload metadata configuration for this node. + WorkloadMetadataConfig workload_metadata_config = 14; + + // List of kubernetes taints to be applied to each node. + // + // For more information, including usage and the valid values, see: + // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + repeated NodeTaint taints = 15; + + // Sandbox configuration for this node. + SandboxConfig sandbox_config = 17; + + // Setting this field will assign instances of this + // pool to run on the specified node group. This is useful for running + // workloads on [sole tenant + // nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). + string node_group = 18; + + // The optional reservation affinity. Setting this field will apply + // the specified [Zonal Compute + // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + // to this node pool. + ReservationAffinity reservation_affinity = 19; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 20; + + // Parameters that can be configured on Linux nodes. + LinuxNodeConfig linux_node_config = 21; + + // Node kubelet configs. + NodeKubeletConfig kubelet_config = 22; + + // + // The Customer Managed Encryption Key used to encrypt the boot disk attached + // to each node in the node pool. This should be of the form + // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. + // For more information about protecting resources with Cloud KMS Keys please + // see: + // https://cloud.google.com/compute/docs/disks/customer-managed-encryption + string boot_disk_kms_key = 23; + + // Google Container File System (image streaming) configs. + GcfsConfig gcfs_config = 25; + + // Advanced features for the Compute Engine VM. + AdvancedMachineFeatures advanced_machine_features = 26; + + // Enable or disable gvnic in the node pool. + VirtualNIC gvnic = 29; + + // Spot flag for enabling Spot VM, which is a rebrand of + // the existing preemptible flag. + bool spot = 32; + + // Confidential nodes config. + // All the nodes in the node pool will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 35; + + // Enable or disable NCCL fast socket for the node pool. + optional FastSocket fast_socket = 36; + + // The resource labels for the node pool to use to annotate any related + // Google Compute Engine resources. + map resource_labels = 37; + + // Logging configuration. + NodePoolLoggingConfig logging_config = 38; + + // Parameters that can be configured on Windows nodes. + WindowsNodeConfig windows_node_config = 39; + + // Parameters for using raw-block Local NVMe SSDs. + LocalNvmeSsdBlockConfig local_nvme_ssd_block_config = 40; + + // Parameters for the node ephemeral storage using Local SSDs. + // If unspecified, ephemeral storage is backed by the boot disk. + EphemeralStorageLocalSsdConfig ephemeral_storage_local_ssd_config = 41; + + // Parameters for node pools to be backed by shared sole tenant node groups. + SoleTenantConfig sole_tenant_config = 42; + + // Parameters for containerd customization. + ContainerdConfig containerd_config = 43; + + // A map of resource manager tag keys and values to be attached to the nodes. + ResourceManagerTags resource_manager_tags = 45; + + // Optional. Reserved for future use. + bool enable_confidential_storage = 46 + [(google.api.field_behavior) = OPTIONAL]; + + // List of secondary boot disks attached to the nodes. + repeated SecondaryBootDisk secondary_boot_disks = 48; + + // List of Storage Pools where boot disks are provisioned. + repeated string storage_pools = 49; + + // Secondary boot disk update strategy. + optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = + 50; + + // Specifies which method should be used for encrypting the + // Local SSDs attahced to the node. + optional LocalSsdEncryptionMode local_ssd_encryption_mode = 54; + + // Output only. effective_cgroup_mode is the cgroup mode actually used by the + // node pool. It is determined by the cgroup mode specified in the + // LinuxNodeConfig or the default cgroup mode based on the cluster creation + // version. + EffectiveCgroupMode effective_cgroup_mode = 55 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number of threads + // supported per core by the underlying processor is assumed. + optional int64 threads_per_core = 1; + + // Whether or not to enable nested virtualization (defaults to false). + optional bool enable_nested_virtualization = 2; +} + +// Parameters for node pool-level network config. +message NodeNetworkConfig { + // Configuration of all network bandwidth tiers + message NetworkPerformanceConfig { + // Node network tier + enum Tier { + // Default value + TIER_UNSPECIFIED = 0; + + // Higher bandwidth, actual values based on VM size. + TIER_1 = 1; + } + + // Specifies the total network bandwidth tier for the NodePool. + optional Tier total_egress_bandwidth_tier = 1; + } + + // Input only. Whether to create a new range for pod IPs in this node pool. + // Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they + // are not specified. + // + // If neither `create_pod_range` or `pod_range` are specified, the + // cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is + // used. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + bool create_pod_range = 4 [(google.api.field_behavior) = INPUT_ONLY]; + + // The ID of the secondary range for pod IPs. + // If `create_pod_range` is true, this ID is used for the new range. + // If `create_pod_range` is false, uses an existing secondary range with this + // ID. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + string pod_range = 5; + + // The IP address range for pod IPs in this node pool. + // + // Only applicable if `create_pod_range` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) to pick a specific range to use. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + string pod_ipv4_cidr_block = 6; + + // Whether nodes have internal IP addresses only. + // If enable_private_nodes is not specified, then the value is derived from + // [Cluster.NetworkConfig.default_enable_private_nodes][] + optional bool enable_private_nodes = 9; + + // Network bandwidth tier configuration. + optional NetworkPerformanceConfig network_performance_config = 11; + + // [PRIVATE FIELD] + // Pod CIDR size overprovisioning config for the nodepool. + // + // Pod CIDR size per node depends on max_pods_per_node. By default, the value + // of max_pods_per_node is rounded off to next power of 2 and we then double + // that to get the size of pod CIDR block per node. + // Example: max_pods_per_node of 30 would result in 64 IPs (/26). + // + // This config can disable the doubling of IPs (we still round off to next + // power of 2) + // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when + // overprovisioning is disabled. + PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13; + + // We specify the additional node networks for this node pool using this list. + // Each node network corresponds to an additional interface + repeated AdditionalNodeNetworkConfig additional_node_network_configs = 14; + + // We specify the additional pod networks for this node pool using this list. + // Each pod network corresponds to an additional alias IP range for the node + repeated AdditionalPodNetworkConfig additional_pod_network_configs = 15; + + // Output only. The utilization of the IPv4 range for the pod. + // The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. + double pod_ipv4_range_utilization = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AdditionalNodeNetworkConfig is the configuration for additional node networks +// within the NodeNetworkConfig message +message AdditionalNodeNetworkConfig { + // Name of the VPC where the additional interface belongs + string network = 1; + + // Name of the subnetwork where the additional interface belongs + string subnetwork = 2; +} + +// AdditionalPodNetworkConfig is the configuration for additional pod networks +// within the NodeNetworkConfig message +message AdditionalPodNetworkConfig { + // Name of the subnetwork where the additional pod network belongs. + string subnetwork = 1; + + // The name of the secondary range on the subnet which provides IP address for + // this pod range. + string secondary_pod_range = 2; + + // The maximum number of pods per node which use this pod network. + optional MaxPodsConstraint max_pods_per_node = 3; +} + +// A set of Shielded Instance options. +message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. + bool enable_integrity_monitoring = 2; +} + +// SandboxConfig contains configurations of the sandbox to use for the node. +message SandboxConfig { + // Possible types of sandboxes. + enum Type { + // Default value. This should not be used. + UNSPECIFIED = 0; + + // Run sandbox using gvisor. + GVISOR = 1; + } + + // Type of the sandbox to use for the node. + Type type = 2; +} + +// GcfsConfig contains configurations of Google Container File System +// (image streaming). +message GcfsConfig { + // Whether to use GCFS. + bool enabled = 1; +} + +// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) +// is the configuration of desired reservation which instances could take +// capacity from. +message ReservationAffinity { + // Indicates whether to consume capacity from a reservation or not. + enum Type { + // Default value. This should not be used. + UNSPECIFIED = 0; + + // Do not consume from any reserved capacity. + NO_RESERVATION = 1; + + // Consume any reservation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Corresponds to the type of reservation consumption. + Type consume_reservation_type = 1; + + // Corresponds to the label key of a reservation resource. To target a + // SPECIFIC_RESERVATION by name, specify + // "compute.googleapis.com/reservation-name" as the key and specify the name + // of your reservation as its value. + string key = 2; + + // Corresponds to the label value(s) of reservation resource(s). + repeated string values = 3; +} + +// SoleTenantConfig contains the NodeAffinities to specify what shared sole +// tenant node groups should back the node pool. +message SoleTenantConfig { + // Specifies the NodeAffinity key, values, and affinity operator according to + // [shared sole tenant node group + // affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). + message NodeAffinity { + // Operator allows user to specify affinity or anti-affinity for the + // given key values. + enum Operator { + // Invalid or unspecified affinity operator. + OPERATOR_UNSPECIFIED = 0; + + // Affinity operator. + IN = 1; + + // Anti-affinity operator. + NOT_IN = 2; + } + + // Key for NodeAffinity. + string key = 1; + + // Operator for NodeAffinity. + Operator operator = 2; + + // Values for NodeAffinity. + repeated string values = 3; + } + + // NodeAffinities used to match to a shared sole tenant node group. + repeated NodeAffinity node_affinities = 1; +} + +// ContainerdConfig contains configuration to customize containerd. +message ContainerdConfig { + // PrivateRegistryAccessConfig contains access configuration for + // private container registries. + message PrivateRegistryAccessConfig { + // CertificateAuthorityDomainConfig configures one or more fully qualified + // domain names (FQDN) to a specific certificate. + message CertificateAuthorityDomainConfig { + // GCPSecretManagerCertificateConfig configures a secret from + // [Google Secret Manager](https://cloud.google.com/secret-manager). + message GCPSecretManagerCertificateConfig { + // Secret URI, in the form + // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". + // Version can be fixed (e.g. "2") or "latest" + string secret_uri = 1; + } + + // List of fully qualified domain names (FQDN). + // Specifying port is supported. + // Wilcards are NOT supported. + // Examples: + // - my.customdomain.com + // - 10.0.1.2:5000 + repeated string fqdns = 1; + + // Certificate access config. The following are supported: + // - GCPSecretManagerCertificateConfig + oneof certificate_config { + // Google Secret Manager (GCP) certificate configuration. + GCPSecretManagerCertificateConfig + gcp_secret_manager_certificate_config = 2; + } + } + + // Private registry access is enabled. + bool enabled = 1; + + // Private registry access configuration. + repeated CertificateAuthorityDomainConfig + certificate_authority_domain_config = 2; + } + + // PrivateRegistryAccessConfig is used to configure access configuration + // for private container registries. + PrivateRegistryAccessConfig private_registry_access_config = 1; +} + +// Kubernetes taint is composed of three fields: key, value, and effect. Effect +// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. +// +// See +// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) +// for more information, including usage and the valid values. +message NodeTaint { + // Possible values for Effect in taint. + enum Effect { + // Not set + EFFECT_UNSPECIFIED = 0; + + // NoSchedule + NO_SCHEDULE = 1; + + // PreferNoSchedule + PREFER_NO_SCHEDULE = 2; + + // NoExecute + NO_EXECUTE = 3; + } + + // Key for taint. + string key = 1; + + // Value for taint. + string value = 2; + + // Effect for taint. + Effect effect = 3; +} + +// Collection of Kubernetes [node +// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). +message NodeTaints { + // List of node taints. + repeated NodeTaint taints = 1; +} + +// Collection of node-level [Kubernetes +// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). +message NodeLabels { + // Map of node label keys and node label values. + map labels = 1; +} + +// Collection of [GCP +// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). +message ResourceLabels { + // Map of node label keys and node label values. + map labels = 1; +} + +// Collection of Compute Engine network tags that can be applied to a node's +// underlying VM instance. +message NetworkTags { + // List of network tags. + repeated string tags = 1; +} + +// The authentication information for accessing the master endpoint. +// Authentication can be done using HTTP basic auth or using client +// certificates. +message MasterAuth { + // The username to use for HTTP basic authentication to the master endpoint. + // For clusters v1.6.0 and later, basic authentication can be disabled by + // leaving username unspecified (or setting it to the empty string). + // + // Warning: basic authentication is deprecated, and will be removed in GKE + // control plane versions 1.19 and newer. For a list of recommended + // authentication methods, see: + // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication + string username = 1 [deprecated = true]; + + // The password to use for HTTP basic authentication to the master endpoint. + // Because the master endpoint is open to the Internet, you should create a + // strong password. If a password is provided for cluster creation, username + // must be non-empty. + // + // Warning: basic authentication is deprecated, and will be removed in GKE + // control plane versions 1.19 and newer. For a list of recommended + // authentication methods, see: + // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication + string password = 2 [deprecated = true]; + + // Configuration for client certificate authentication on the cluster. For + // clusters before v1.12, if no configuration is specified, a client + // certificate is issued. + ClientCertificateConfig client_certificate_config = 3; + + // Output only. Base64-encoded public certificate that is the root of + // trust for the cluster. + string cluster_ca_certificate = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base64-encoded public certificate used by clients to + // authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. + string client_certificate = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base64-encoded private key used by clients to authenticate + // to the cluster endpoint. + string client_key = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for client certificates on the cluster. +message ClientCertificateConfig { + // Issue a client certificate. + bool issue_client_certificate = 1; +} + +// Configuration for the addons that can be automatically spun up in the +// cluster, enabling additional functionality. +message AddonsConfig { + // Configuration for the HTTP (L7) load balancing controller addon, which + // makes it easy to set up HTTP load balancers for services in a cluster. + HttpLoadBalancing http_load_balancing = 1; + + // Configuration for the horizontal pod autoscaling feature, which + // increases or decreases the number of replica pods a replication controller + // has based on the resource usage of the existing pods. + HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; + + // Configuration for the Kubernetes Dashboard. + // This addon is deprecated, and will be disabled in 1.15. It is recommended + // to use the Cloud Console to manage and monitor your Kubernetes clusters, + // workloads and applications. For more information, see: + // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards + KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; + + // Configuration for NetworkPolicy. This only tracks whether the addon + // is enabled or not on the Master, it does not track whether network policy + // is enabled for the nodes. + NetworkPolicyConfig network_policy_config = 4; + + // Configuration for the Cloud Run addon, which allows the user to use a + // managed Knative service. + CloudRunConfig cloud_run_config = 7; + + // Configuration for NodeLocalDNS, a dns cache running on cluster nodes + DnsCacheConfig dns_cache_config = 8; + + // Configuration for the ConfigConnector add-on, a Kubernetes + // extension to manage hosted GCP services through the Kubernetes API + ConfigConnectorConfig config_connector_config = 10; + + // Configuration for the Compute Engine Persistent Disk CSI driver. + GcePersistentDiskCsiDriverConfig gce_persistent_disk_csi_driver_config = 11; + + // Configuration for the GCP Filestore CSI driver. + GcpFilestoreCsiDriverConfig gcp_filestore_csi_driver_config = 14; + + // Configuration for the Backup for GKE agent addon. + GkeBackupAgentConfig gke_backup_agent_config = 16; + + // Configuration for the Cloud Storage Fuse CSI driver. + GcsFuseCsiDriverConfig gcs_fuse_csi_driver_config = 17; + + // Optional. Configuration for the StatefulHA add-on. + StatefulHAConfig stateful_ha_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Configuration for the Cloud Storage Parallelstore CSI driver. + ParallelstoreCsiDriverConfig parallelstore_csi_driver_config = 19; + + // Optional. Configuration for Ray Operator addon. + RayOperatorConfig ray_operator_config = 21 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the HTTP (L7) load balancing controller addon, +// which makes it easy to set up HTTP load balancers for services in a cluster. +message HttpLoadBalancing { + // Whether the HTTP Load Balancing controller is enabled in the cluster. + // When enabled, it runs a small pod in the cluster that manages the load + // balancers. + bool disabled = 1; +} + +// Configuration options for the horizontal pod autoscaling feature, which +// increases or decreases the number of replica pods a replication controller +// has based on the resource usage of the existing pods. +message HorizontalPodAutoscaling { + // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. + // When enabled, it ensures that metrics are collected into Stackdriver + // Monitoring. + bool disabled = 1; +} + +// Configuration for the Kubernetes Dashboard. +message KubernetesDashboard { + // Whether the Kubernetes Dashboard is enabled for this cluster. + bool disabled = 1; +} + +// Configuration for NetworkPolicy. This only tracks whether the addon +// is enabled or not on the Master, it does not track whether network policy +// is enabled for the nodes. +message NetworkPolicyConfig { + // Whether NetworkPolicy is enabled for this cluster. + bool disabled = 1; +} + +// Configuration for NodeLocal DNSCache +message DnsCacheConfig { + // Whether NodeLocal DNSCache is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for controlling master global access settings. +message PrivateClusterMasterGlobalAccessConfig { + // Whenever master is accessible globally or not. + bool enabled = 1; +} + +// Configuration options for private clusters. +message PrivateClusterConfig { + // Whether nodes have internal IP addresses only. If enabled, all nodes are + // given only RFC 1918 private addresses and communicate with the master via + // private networking. + // + // Deprecated: Use + // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] + // instead. + bool enable_private_nodes = 1 [deprecated = true]; + + // Whether the master's internal IP address is used as the cluster endpoint. + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint] + // instead. Note that the value of enable_public_endpoint is reversed: if + // enable_private_endpoint is false, then enable_public_endpoint will be true. + bool enable_private_endpoint = 2 [deprecated = true]; + + // The IP range in CIDR notation to use for the hosted master network. This + // range will be used for assigning internal IP addresses to the master or + // set of masters, as well as the ILB VIP. This range must not overlap with + // any other ranges in use within the cluster's network. + string master_ipv4_cidr_block = 3; + + // Output only. The internal IP address of this cluster's master endpoint. + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint] + // instead. + string private_endpoint = 4 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The external IP address of this cluster's master endpoint. + // + // Deprecated:Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint] + // instead. + string public_endpoint = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The peering name in the customer VPC used by this cluster. + string peering_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Controls master global access settings. + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][] + // instead. + PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8 + [deprecated = true]; + + // Subnet to provision the master's private endpoint during cluster creation. + // Specified in projects/*/regions/*/subnetworks/* format. + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork] + // instead. + string private_endpoint_subnetwork = 10 [deprecated = true]; +} + +// Configuration for returning group information from authenticators. +message AuthenticatorGroupsConfig { + // Whether this cluster should return group membership lookups + // during authentication using a group of security groups. + bool enabled = 1; + + // The name of the security group-of-groups to be used. Only relevant + // if enabled = true. + string security_group = 2; +} + +// Configuration options for the Cloud Run feature. +message CloudRunConfig { + // Load balancer type of ingress service of Cloud Run. + enum LoadBalancerType { + // Load balancer type for Cloud Run is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Install external load balancer for Cloud Run. + LOAD_BALANCER_TYPE_EXTERNAL = 1; + + // Install internal load balancer for Cloud Run. + LOAD_BALANCER_TYPE_INTERNAL = 2; + } + + // Whether Cloud Run addon is enabled for this cluster. + bool disabled = 1; + + // Which load balancer type is installed for Cloud Run. + LoadBalancerType load_balancer_type = 3; +} + +// Configuration options for the Config Connector add-on. +message ConfigConnectorConfig { + // Whether Cloud Connector is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Compute Engine PD CSI driver. +message GcePersistentDiskCsiDriverConfig { + // Whether the Compute Engine PD CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the GCP Filestore CSI driver. +message GcpFilestoreCsiDriverConfig { + // Whether the GCP Filestore CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Cloud Storage Fuse CSI driver. +message GcsFuseCsiDriverConfig { + // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Cloud Storage Parallelstore CSI driver. +message ParallelstoreCsiDriverConfig { + // Whether the Cloud Storage Parallelstore CSI driver is enabled for this + // cluster. + bool enabled = 1; +} + +// Configuration options for the Ray Operator add-on. +message RayOperatorConfig { + // Whether the Ray Operator addon is enabled for this cluster. + bool enabled = 1; + + // Optional. Logging configuration for Ray clusters. + RayClusterLoggingConfig ray_cluster_logging_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Monitoring configuration for Ray clusters. + RayClusterMonitoringConfig ray_cluster_monitoring_config = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the Backup for GKE Agent. +message GkeBackupAgentConfig { + // Whether the Backup for GKE agent is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Stateful HA add-on. +message StatefulHAConfig { + // Whether the Stateful HA add-on is enabled for this cluster. + bool enabled = 1; +} + +// Configuration options for the master authorized networks feature. Enabled +// master authorized networks will disallow all external traffic to access +// Kubernetes master through HTTPS except traffic from the given CIDR blocks, +// Google Compute Engine Public IPs and Google Prod IPs. +message MasterAuthorizedNetworksConfig { + // CidrBlock contains an optional name and one CIDR block. + message CidrBlock { + // display_name is an optional field for users to identify CIDR blocks. + string display_name = 1; + + // cidr_block must be specified in CIDR notation. + string cidr_block = 2; + } + + // Whether or not master authorized networks is enabled. + bool enabled = 1; + + // cidr_blocks define up to 50 external networks that could access + // Kubernetes master through HTTPS. + repeated CidrBlock cidr_blocks = 2; + + // Whether master is accessbile via Google Compute Engine Public IP addresses. + optional bool gcp_public_cidrs_access_enabled = 3; + + // Whether master authorized networks is enforced on private endpoint or not. + optional bool private_endpoint_enforcement_enabled = 5; +} + +// Configuration for the legacy Attribute Based Access Control authorization +// mode. +message LegacyAbac { + // Whether the ABAC authorizer is enabled for this cluster. When enabled, + // identities in the system, including service accounts, nodes, and + // controllers, will have statically granted permissions beyond those + // provided by the RBAC configuration or IAM. + bool enabled = 1; +} + +// Configuration options for the NetworkPolicy feature. +// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ +message NetworkPolicy { + // Allowed Network Policy providers. + enum Provider { + // Not set + PROVIDER_UNSPECIFIED = 0; + + // Tigera (Calico Felix). + CALICO = 1; + } + + // The selected network policy provider. + Provider provider = 1; + + // Whether network policy is enabled on the cluster. + bool enabled = 2; +} + +// Configuration for Binary Authorization. +message BinaryAuthorization { + // Binary Authorization mode of operation. + enum EvaluationMode { + // Default value + EVALUATION_MODE_UNSPECIFIED = 0; + + // Disable BinaryAuthorization + DISABLED = 1; + + // Enforce Kubernetes admission requests with BinaryAuthorization using the + // project's singleton policy. This is equivalent to setting the + // enabled boolean to true. + PROJECT_SINGLETON_POLICY_ENFORCE = 2; + } + + // This field is deprecated. Leave this unset and instead configure + // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to + // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. + bool enabled = 1 [deprecated = true]; + + // Mode of operation for binauthz policy evaluation. If unspecified, defaults + // to DISABLED. + EvaluationMode evaluation_mode = 2; +} + +// [PRIVATE FIELD] +// Config for pod CIDR size overprovisioning. +message PodCIDROverprovisionConfig { + // Whether Pod CIDR overprovisioning is disabled. + // Note: Pod CIDR overprovisioning is enabled by default. + bool disable = 1; +} + +// Configuration for controlling how IPs are allocated in the cluster. +message IPAllocationPolicy { + // Whether alias IPs will be used for pod IPs in the cluster. + // This is used in conjunction with use_routes. It cannot + // be true if use_routes is true. If both use_ip_aliases and use_routes are + // false, then the server picks the default IP allocation mode + bool use_ip_aliases = 1; + + // Whether a new subnetwork will be created automatically for the cluster. + // + // This field is only applicable when `use_ip_aliases` is true. + bool create_subnetwork = 2; + + // A custom subnetwork name to be used if `create_subnetwork` is true. If + // this field is empty, then an automatic name will be chosen for the new + // subnetwork. + string subnetwork_name = 3; + + // This field is deprecated, use cluster_ipv4_cidr_block. + string cluster_ipv4_cidr = 4 [deprecated = true]; + + // This field is deprecated, use node_ipv4_cidr_block. + string node_ipv4_cidr = 5 [deprecated = true]; + + // This field is deprecated, use services_ipv4_cidr_block. + string services_ipv4_cidr = 6 [deprecated = true]; + + // The name of the secondary range to be used for the cluster CIDR + // block. The secondary range will be used for pod IP + // addresses. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases is true and + // create_subnetwork is false. + string cluster_secondary_range_name = 7; + + // The name of the secondary range to be used as for the services + // CIDR block. The secondary range will be used for service + // ClusterIPs. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases is true and + // create_subnetwork is false. + string services_secondary_range_name = 8; + + // The IP address range for the cluster pod IPs. If this field is set, then + // `cluster.cluster_ipv4_cidr` must be left blank. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string cluster_ipv4_cidr_block = 9; + + // The IP address range of the instance IPs in this cluster. + // + // This is applicable only if `create_subnetwork` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string node_ipv4_cidr_block = 10; + + // The IP address range of the services IPs in this cluster. If blank, a range + // will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string services_ipv4_cidr_block = 11; + + // The IP address range of the Cloud TPUs in this cluster. If unspecified, a + // range will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // If unspecified, the range will use the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string tpu_ipv4_cidr_block = 13; + + // Whether routes will be used for pod IPs in the cluster. + // This is used in conjunction with use_ip_aliases. It cannot be true if + // use_ip_aliases is true. If both use_ip_aliases and use_routes are false, + // then the server picks the default IP allocation mode + bool use_routes = 15; + + // The IP stack type of the cluster + StackType stack_type = 16; + + // The ipv6 access type (internal or external) when create_subnetwork is true + IPv6AccessType ipv6_access_type = 17; + + // [PRIVATE FIELD] + // Pod CIDR size overprovisioning config for the cluster. + // + // Pod CIDR size per node depends on max_pods_per_node. By default, the value + // of max_pods_per_node is doubled and then rounded off to next power of 2 to + // get the size of pod CIDR block per node. + // Example: max_pods_per_node of 30 would result in 64 IPs (/26). + // + // This config can disable the doubling of IPs (we still round off to next + // power of 2) + // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when + // overprovisioning is disabled. + PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21; + + // Output only. The subnet's IPv6 CIDR block used by nodes and pods. + string subnet_ipv6_cidr_block = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The services IPv6 CIDR block for the cluster. + string services_ipv6_cidr_block = 23 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The additional pod ranges that are added to the cluster. + // These pod ranges can be used by new node pools to allocate pod IPs + // automatically. Once the range is removed it will not show up in + // IPAllocationPolicy. + AdditionalPodRangesConfig additional_pod_ranges_config = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The utilization of the cluster default IPv4 range for the + // pod. The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. + double default_pod_ipv4_range_utilization = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A Google Kubernetes Engine cluster. +message Cluster { + // The current status of the cluster. + enum Status { + // Not set. + STATUS_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 master or node software. Details can + // be found in the `statusMessage` field. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster is unusable. It will be + // automatically deleted. Details can be found in the `statusMessage` field. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to restore + // full functionality. Details can be found in the `statusMessage` field. + DEGRADED = 6; + } + + // The name of this cluster. The name must be unique within this project + // and location (e.g. zone or region), and can be up to 40 characters with + // the following restrictions: + // + // * Lowercase letters, numbers, and hyphens only. + // * Must start with a letter. + // * Must end with a number or a letter. + string name = 1; + + // An optional description of this cluster. + string description = 2; + + // The number of nodes to create in this cluster. You must ensure that your + // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // is sufficient for this number of instances. You must also have available + // firewall and routes quota. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with the + // "node_config") will be used to create a "NodePool" object with an + // auto-generated name. Do not use this and a node_pool at the same time. + // + // This field is deprecated, use node_pool.initial_node_count instead. + int32 initial_node_count = 3 [deprecated = true]; + + // Parameters used in creating the cluster's nodes. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with the + // "initial_node_count") will be used to create a "NodePool" object with an + // auto-generated name. Do not use this and a node_pool at the same time. + // For responses, this field will be populated with the node configuration of + // the first node pool. (For configuration of each node pool, see + // `node_pool.config`) + // + // If unspecified, the defaults are used. + // This field is deprecated, use node_pool.config instead. + NodeConfig node_config = 4 [deprecated = true]; + + // The authentication information for accessing the master endpoint. + // If unspecified, the defaults are used: + // For clusters before v1.12, if master_auth is unspecified, `username` will + // be set to "admin", a random password will be generated, and a client + // certificate will be issued. + MasterAuth master_auth = 5; + + // The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string logging_service = 6; + + // The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string monitoring_service = 7; + + // The name of the Google Compute Engine + // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + // to which the cluster is connected. If left unspecified, the `default` + // network will be used. + string network = 8; + + // The IP address range of the container pods in this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`). Leave blank to have + // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. + string cluster_ipv4_cidr = 9; + + // Configurations for the various addons available to run in the cluster. + AddonsConfig addons_config = 10; + + // The name of the Google Compute Engine + // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which + // the cluster is connected. + string subnetwork = 11; + + // The node pools associated with this cluster. + // This field should not be set if "node_config" or "initial_node_count" are + // specified. + repeated NodePool node_pools = 12; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. + // + // This field provides a default value if + // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) + // are not specified during node pool creation. + // + // Warning: changing cluster locations will update the + // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) + // of all node pools and will result in nodes being added and/or removed. + repeated string locations = 13; + + // Kubernetes alpha features are enabled on this cluster. This includes alpha + // API groups (e.g. v1alpha1) and features that may not be production ready in + // the kubernetes version of the master and nodes. + // The cluster has no SLA for uptime and master/node upgrades are disabled. + // Alpha enabled clusters are automatically deleted thirty days after + // creation. + bool enable_kubernetes_alpha = 14; + + // The resource labels for the cluster to use to annotate any related + // Google Compute Engine resources. + map resource_labels = 15; + + // The fingerprint of the set of labels for this cluster. + string label_fingerprint = 16; + + // Configuration for the legacy ABAC authorization mode. + LegacyAbac legacy_abac = 18; + + // Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 19; + + // Configuration for cluster IP allocation. + IPAllocationPolicy ip_allocation_policy = 20; + + // The configuration options for master authorized networks feature. + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config] + // instead. + MasterAuthorizedNetworksConfig master_authorized_networks_config = 22 + [deprecated = true]; + + // Configure the maintenance policy for this cluster. + MaintenancePolicy maintenance_policy = 23; + + // Configuration for Binary Authorization. + BinaryAuthorization binary_authorization = 24; + + // Cluster-level autoscaling configuration. + ClusterAutoscaling autoscaling = 26; + + // Configuration for cluster networking. + NetworkConfig network_config = 27; + + // The default constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool of this cluster. Only honored + // if cluster created with IP Alias support. + MaxPodsConstraint default_max_pods_constraint = 30; + + // Configuration for exporting resource usages. Resource usage export is + // disabled when this config is unspecified. + ResourceUsageExportConfig resource_usage_export_config = 33; + + // Configuration controlling RBAC group membership information. + AuthenticatorGroupsConfig authenticator_groups_config = 34; + + // Configuration for private cluster. + PrivateClusterConfig private_cluster_config = 37; + + // Configuration of etcd encryption. + DatabaseEncryption database_encryption = 38; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling vertical_pod_autoscaling = 39; + + // Shielded Nodes configuration. + ShieldedNodes shielded_nodes = 40; + + // Release channel configuration. If left unspecified on cluster creation and + // a version is specified, the cluster is enrolled in the most mature release + // channel where the version is available (first checking STABLE, then + // REGULAR, and finally RAPID). Otherwise, if no release channel + // configuration and no version is specified, the cluster is enrolled in the + // REGULAR channel with its default version. + ReleaseChannel release_channel = 41; + + // Configuration for the use of Kubernetes Service Accounts in GCP IAM + // policies. + WorkloadIdentityConfig workload_identity_config = 43; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + MeshCertificates mesh_certificates = 67; + + // Configuration for the fine-grained cost management feature. + CostManagementConfig cost_management_config = 45; + + // Notification configuration of the cluster. + NotificationConfig notification_config = 49; + + // Configuration of Confidential Nodes. + // All the nodes in the cluster will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 50; + + // Configuration for Identity Service component. + IdentityServiceConfig identity_service_config = 54; + + // Output only. Server-defined URL for the resource. + string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field is deprecated, use location instead. + string zone = 101 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP address of this cluster's master endpoint. + // The endpoint can be accessed from the internet at + // `https://username:password@endpoint/`. + // + // See the `masterAuth` property of this resource for username and + // password information. + string endpoint = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The initial Kubernetes version for this cluster. Valid versions are those + // found in validMasterVersions returned by getServerConfig. The version can + // be upgraded over time; such upgrades are reflected in + // currentMasterVersion and currentNodeVersion. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "","-": picks the default Kubernetes version + string initial_cluster_version = 103; + + // Output only. The current software version of the master endpoint. + string current_master_version = 104 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated, use + // [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) + // instead. The current version of the node software components. If they are + // currently at multiple versions because they're in the process of being + // upgraded, this reflects the minimum version of all nodes. + string current_node_version = 105 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the cluster was created, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string create_time = 106 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current status of this cluster. + Status status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use conditions instead. + // Additional information about the current status of this + // cluster, if available. + string status_message = 108 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the address space on each node for hosting + // containers. This is provisioned from within the `container_ipv4_cidr` + // range. This field will only be set when cluster is in route-based network + // mode. + int32 node_ipv4_cidr_size = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP address range of the Kubernetes services in + // this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `1.2.3.4/29`). Service addresses are + // typically put in the last `/16` from the container CIDR. + string services_ipv4_cidr = 110 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use node_pools.instance_group_urls. + repeated string instance_group_urls = 111 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of nodes currently in the cluster. Deprecated. + // Call Kubernetes API directly to retrieve node information. + int32 current_node_count = 112 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the cluster will be automatically + // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string expire_time = 113 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // in which the cluster resides. + string location = 114 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable the ability to use Cloud TPUs in this cluster. + bool enable_tpu = 115; + + // Output only. The IP address range of the Cloud TPUs in this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `1.2.3.4/29`). + string tpu_ipv4_cidr_block = 116 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which conditions caused the current cluster state. + repeated StatusCondition conditions = 118; + + // Autopilot configuration for the cluster. + Autopilot autopilot = 128; + + // Output only. Unique id for the cluster. + string id = 129 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Default NodePool settings for the entire cluster. These settings are + // overridden if specified on the specific NodePool object. + optional NodePoolDefaults node_pool_defaults = 131; + + // Logging configuration for the cluster. + LoggingConfig logging_config = 132; + + // Monitoring configuration for the cluster. + MonitoringConfig monitoring_config = 133; + + // Node pool configs that apply to all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NodePoolAutoConfig node_pool_auto_config = 136; + + // This checksum is computed by the server based on the value of cluster + // fields, and may be sent on update requests to ensure the client has an + // up-to-date value before proceeding. + string etag = 139; + + // Fleet information for the cluster. + Fleet fleet = 140; + + // Enable/Disable Security Posture API features for the cluster. + SecurityPostureConfig security_posture_config = 145; + + // Configuration for all cluster's control plane endpoints. + ControlPlaneEndpointsConfig control_plane_endpoints_config = 146; + + // Beta APIs Config + K8sBetaAPIConfig enable_k8s_beta_apis = 143; + + // GKE Enterprise Configuration. + EnterpriseConfig enterprise_config = 149; + + // Secret CSI driver configuration. + SecretManagerConfig secret_manager_config = 150; + + // Enable/Disable Compliance Posture features for the cluster. + CompliancePostureConfig compliance_posture_config = 151; + + // Output only. Reserved for future use. + optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Custom keys configuration for the cluster. + optional UserManagedKeysConfig user_managed_keys_config = 154; + + // RBACBindingConfig allows user to restrict ClusterRoleBindings an + // RoleBindings that can be created. + optional RBACBindingConfig rbac_binding_config = 156; +} + +// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings +// that can be created. +message RBACBindingConfig { + // Setting this to true will allow any ClusterRoleBinding and RoleBinding + // with subjets system:anonymous or system:unauthenticated. + optional bool enable_insecure_binding_system_unauthenticated = 1; + + // Setting this to true will allow any ClusterRoleBinding and RoleBinding + // with subjects system:authenticated. + optional bool enable_insecure_binding_system_authenticated = 2; +} + +// UserManagedKeysConfig holds the resource address to Keys which are used +// for signing certs and token that are used for communication within cluster. +message UserManagedKeysConfig { + // The Certificate Authority Service caPool to use for the cluster CA in this + // cluster. + string cluster_ca = 10 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // Resource path of the Certificate Authority Service caPool to use for the + // etcd API CA in this cluster. + string etcd_api_ca = 11 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // Resource path of the Certificate Authority Service caPool to use for the + // etcd peer CA in this cluster. + string etcd_peer_ca = 12 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // The Cloud KMS cryptoKeyVersions to use for signing service account JWTs + // issued by this cluster. + // + // Format: + // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + repeated string service_account_signing_keys = 13 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs + // issued by this cluster. + // + // Format: + // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + repeated string service_account_verification_keys = 14 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // The Certificate Authority Service caPool to use for the aggregation CA in + // this cluster. + string aggregation_ca = 15 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control + // plane nodes. + string control_plane_disk_encryption_key = 16 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // Resource path of the Cloud KMS cryptoKey to use for encryption of internal + // etcd backups. + string gkeops_etcd_backup_encryption_key = 17 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; +} + +// CompliancePostureConfig defines the settings needed to enable/disable +// features for the Compliance Posture. +message CompliancePostureConfig { + // Mode defines enablement mode for Compliance Posture. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Compliance Posture features on the cluster. + DISABLED = 1; + + // Enables Compliance Posture features on the cluster. + ENABLED = 2; + } + + // Defines the details of a compliance standard. + message ComplianceStandard { + // Name of the compliance standard. + optional string standard = 1; + } + + // Defines the enablement mode for Compliance Posture. + optional Mode mode = 1; + + // List of enabled compliance standards. + repeated ComplianceStandard compliance_standards = 2; +} + +// K8sBetaAPIConfig , configuration for beta APIs +message K8sBetaAPIConfig { + // Enabled k8s beta APIs. + repeated string enabled_apis = 1; +} + +// SecurityPostureConfig defines the flags needed to enable/disable features for +// the Security Posture API. +message SecurityPostureConfig { + // Mode defines enablement mode for GKE Security posture features. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Security Posture features on the cluster. + DISABLED = 1; + + // Applies Security Posture features on the cluster. + BASIC = 2; + + // Applies the Security Posture off cluster Enterprise level features. + ENTERPRISE = 3; + } + + // VulnerabilityMode defines enablement mode for vulnerability scanning. + enum VulnerabilityMode { + // Default value not specified. + VULNERABILITY_MODE_UNSPECIFIED = 0; + + // Disables vulnerability scanning on the cluster. + VULNERABILITY_DISABLED = 1; + + // Applies basic vulnerability scanning on the cluster. + VULNERABILITY_BASIC = 2; + + // Applies the Security Posture's vulnerability on cluster Enterprise level + // features. + VULNERABILITY_ENTERPRISE = 3; + } + + // Sets which mode to use for Security Posture features. + optional Mode mode = 1; + + // Sets which mode to use for vulnerability scanning. + optional VulnerabilityMode vulnerability_mode = 2; +} + +// Node pool configs that apply to all auto-provisioned node pools +// in autopilot clusters and node auto-provisioning enabled clusters. +message NodePoolAutoConfig { + // The list of instance tags applied to all nodes. Tags are used to identify + // valid sources or targets for network firewalls and are specified by + // the client during cluster creation. Each tag within the list + // must comply with RFC1035. + NetworkTags network_tags = 1; + + // Resource manager tag keys and values to be attached to the nodes + // for managing Compute Engine firewalls using Network Firewall Policies. + ResourceManagerTags resource_manager_tags = 2; + + // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 3; + + // Output only. Configuration options for Linux nodes. + LinuxNodeConfig linux_node_config = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Subset of Nodepool message that has defaults. +message NodePoolDefaults { + // Subset of NodeConfig message that has defaults. + NodeConfigDefaults node_config_defaults = 1; +} + +// Subset of NodeConfig message that has defaults. +message NodeConfigDefaults { + // GCFS (Google Container File System, also known as Riptide) options. + GcfsConfig gcfs_config = 1; + + // Logging configuration for node pools. + NodePoolLoggingConfig logging_config = 3; + + // Parameters for containerd customization. + ContainerdConfig containerd_config = 4; + + // NodeKubeletConfig controls the defaults for new node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 6; +} + +// ClusterUpdate describes an update to the cluster. Exactly one update can +// be applied to a cluster with each request, so at most one field can be +// provided. +message ClusterUpdate { + // The Kubernetes version to change the nodes to (typically an + // upgrade). + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the Kubernetes master version + string desired_node_version = 4; + + // The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string desired_monitoring_service = 5; + + // Configurations for the various addons available to run in the cluster. + AddonsConfig desired_addons_config = 6; + + // The node pool to be upgraded. This field is mandatory if + // "desired_node_version", "desired_image_family" or + // "desired_node_pool_autoscaling" is specified and there is more than one + // node pool on the cluster. + string desired_node_pool_id = 7; + + // The desired image type for the node pool. + // NOTE: Set the "desired_node_pool" field as well. + string desired_image_type = 8; + + // Configuration of etcd encryption. + DatabaseEncryption desired_database_encryption = 46; + + // Configuration for Workload Identity. + WorkloadIdentityConfig desired_workload_identity_config = 47; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + MeshCertificates desired_mesh_certificates = 67; + + // Configuration for Shielded Nodes. + ShieldedNodes desired_shielded_nodes = 48; + + // The desired configuration for the fine-grained cost management feature. + CostManagementConfig desired_cost_management_config = 49; + + // DNSConfig contains clusterDNS config for this cluster. + DNSConfig desired_dns_config = 53; + + // Autoscaler configuration for the node pool specified in + // desired_node_pool_id. If there is only one pool in the + // cluster and desired_node_pool_id is not provided then + // the change applies to that single node pool. + NodePoolAutoscaling desired_node_pool_autoscaling = 9; + + // The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. + // + // This list must always include the cluster's primary zone. + // + // Warning: changing cluster locations will update the locations of all node + // pools and will result in nodes being added and/or removed. + repeated string desired_locations = 10; + + // The desired configuration options for master authorized networks feature. + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config + // instead. + MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12 + [deprecated = true]; + + // Cluster-level autoscaling configuration. + ClusterAutoscaling desired_cluster_autoscaling = 15; + + // The desired configuration options for the Binary Authorization feature. + BinaryAuthorization desired_binary_authorization = 16; + + // The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string desired_logging_service = 19; + + // The desired configuration for exporting resource usage. + ResourceUsageExportConfig desired_resource_usage_export_config = 21; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; + + // The desired private cluster configuration. master_global_access_config is + // the only field that can be changed via this field. + // See also + // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] + // for modifying other fields within + // [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.global_access + // instead. + PrivateClusterConfig desired_private_cluster_config = 25 [deprecated = true]; + + // The desired config of Intra-node visibility. + IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; + + // The desired status of whether to disable default sNAT for this cluster. + DefaultSnatStatus desired_default_snat_status = 28; + + // The desired release channel configuration. + ReleaseChannel desired_release_channel = 31; + + // The desired L4 Internal Load Balancer Subsetting configuration. + ILBSubsettingConfig desired_l4ilb_subsetting_config = 39; + + // The desired datapath provider for the cluster. + DatapathProvider desired_datapath_provider = 50; + + // The desired state of IPv6 connectivity to Google Services. + PrivateIPv6GoogleAccess desired_private_ipv6_google_access = 51; + + // The desired notification configuration. + NotificationConfig desired_notification_config = 55; + + // The desired authenticator groups config for the cluster. + AuthenticatorGroupsConfig desired_authenticator_groups_config = 63; + + // The desired logging configuration. + LoggingConfig desired_logging_config = 64; + + // The desired monitoring configuration. + MonitoringConfig desired_monitoring_config = 65; + + // The desired Identity Service component configuration. + IdentityServiceConfig desired_identity_service_config = 66; + + // ServiceExternalIPsConfig specifies the config for the use of Services with + // ExternalIPs field. + ServiceExternalIPsConfig desired_service_external_ips_config = 60; + + // Enable/Disable private endpoint for the cluster's master. + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint + // instead. Note that the value of enable_public_endpoint is reversed: if + // enable_private_endpoint is false, then enable_public_endpoint will be true. + optional bool desired_enable_private_endpoint = 71 [deprecated = true]; + + // Override the default setting of whether future created + // nodes have private IP addresses only, namely + // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] + optional bool desired_default_enable_private_nodes = 72; + + // [Control plane + // endpoints][google.container.v1.Cluster.control_plane_endpoints_config] + // configuration. + ControlPlaneEndpointsConfig desired_control_plane_endpoints_config = 73; + + // The Kubernetes version to change the master to. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the default Kubernetes version + string desired_master_version = 100; + + // The desired GCFS config for the cluster + GcfsConfig desired_gcfs_config = 109; + + // The desired network tags that apply to all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NetworkTags desired_node_pool_auto_config_network_tags = 110; + + // The desired config of Gateway API on this cluster. + GatewayAPIConfig desired_gateway_api_config = 114; + + // The current etag of the cluster. + // If an etag is provided and does not match the current etag of the cluster, + // update will be blocked and an ABORTED error will be returned. + string etag = 115; + + // The desired node pool logging configuration defaults for the cluster. + NodePoolLoggingConfig desired_node_pool_logging_config = 116; + + // The desired fleet configuration for the cluster. + Fleet desired_fleet = 117; + + // The desired stack type of the cluster. + // If a stack type is provided and does not match the current stack type of + // the cluster, update will attempt to change the stack type to the new type. + StackType desired_stack_type = 119; + + // The additional pod ranges to be added to the cluster. These pod ranges + // can be used by node pools to allocate pod IPs. + AdditionalPodRangesConfig additional_pod_ranges_config = 120; + + // The additional pod ranges that are to be removed from the cluster. + // The pod ranges specified here must have been specified earlier in the + // 'additional_pod_ranges_config' argument. + AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121; + + // Kubernetes open source beta apis enabled on the cluster. Only beta apis + K8sBetaAPIConfig enable_k8s_beta_apis = 122; + + // Enable/Disable Security Posture API features for the cluster. + SecurityPostureConfig desired_security_posture_config = 124; + + // The desired network performance config. + NetworkConfig.ClusterNetworkPerformanceConfig + desired_network_performance_config = 125; + + // Enable/Disable FQDN Network Policy for the cluster. + optional bool desired_enable_fqdn_network_policy = 126; + + // The desired workload policy configuration for the autopilot cluster. + WorkloadPolicyConfig desired_autopilot_workload_policy_config = 128; + + // Desired Beta APIs to be enabled for cluster. + K8sBetaAPIConfig desired_k8s_beta_apis = 131; + + // The desired containerd config for the cluster. + ContainerdConfig desired_containerd_config = 134; + + // Enable/Disable Multi-Networking for the cluster + optional bool desired_enable_multi_networking = 135; + + // The desired resource manager tags that apply to all auto-provisioned node + // pools in autopilot clusters and node auto-provisioning enabled clusters. + ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; + + // Specify the details of in-transit encryption. + optional InTransitEncryptionConfig desired_in_transit_encryption_config = 137; + + // Enable/Disable Cilium Clusterwide Network Policy for the cluster. + optional bool desired_enable_cilium_clusterwide_network_policy = 138; + + // Enable/Disable Secret Manager Config. + optional SecretManagerConfig desired_secret_manager_config = 139; + + // Enable/Disable Compliance Posture features for the cluster. + optional CompliancePostureConfig desired_compliance_posture_config = 140; + + // The desired node kubelet config for the cluster. + NodeKubeletConfig desired_node_kubelet_config = 141; + + // The desired node kubelet config for all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + + // The Custom keys configuration for the cluster. + UserManagedKeysConfig user_managed_keys_config = 143; + + // RBACBindingConfig allows user to restrict ClusterRoleBindings an + // RoleBindings that can be created. + optional RBACBindingConfig desired_rbac_binding_config = 144; + + // The desired enterprise configuration for the cluster. + DesiredEnterpriseConfig desired_enterprise_config = 147; + + // The desired Linux node config for all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + // + // Currently only `cgroup_mode` can be set here. + LinuxNodeConfig desired_node_pool_auto_config_linux_node_config = 150; +} + +// AdditionalPodRangesConfig is the configuration for additional pod secondary +// ranges supporting the ClusterUpdate message. +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; + + // Output only. Information for additional pod range. + repeated RangeInfo pod_range_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RangeInfo contains the range name and the range utilization by this cluster. +message RangeInfo { + // Output only. Name of a range. + string range_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The utilization of the range. + double utilization = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. +message DesiredEnterpriseConfig { + // desired_tier specifies the desired tier of the cluster. + EnterpriseConfig.ClusterTier desired_tier = 1; +} + +// This operation resource represents operations that may have happened or are +// happening on the cluster. All fields are output only. +message Operation { + // Current status of the operation. + enum Status { + // Not set. + STATUS_UNSPECIFIED = 0; + + // The operation has been created. + PENDING = 1; + + // The operation is currently running. + RUNNING = 2; + + // The operation is done, either cancelled or completed. + DONE = 3; + + // The operation is aborting. + ABORTING = 4; + } + + // Operation type categorizes the operation. + enum Type { + // Not set. + TYPE_UNSPECIFIED = 0; + + // The cluster is being created. The cluster should be assumed to be + // unusable until the operation finishes. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and eventually be deleted. + CREATE_CLUSTER = 1; + + // The cluster is being deleted. The cluster should be assumed to be + // unusable as soon as this operation starts. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and the deletion will be automatically + // retried until completed. + DELETE_CLUSTER = 2; + + // The [cluster + // version][google.container.v1.ClusterUpdate.desired_master_version] is + // being updated. Note that this includes "upgrades" to the same version, + // which are simply a recreation. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). + // For more details, see [documentation on cluster + // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). + UPGRADE_MASTER = 3; + + // A node pool is being updated. Despite calling this an "upgrade", this + // includes most forms of updates to node pools. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). + // + // This operation sets the + // [progress][google.container.v1.Operation.progress] field and may be + // [canceled][google.container.v1.ClusterManager.CancelOperation]. + // + // The upgrade strategy depends on [node pool + // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). + // The nodes are generally still usable during this operation. + UPGRADE_NODES = 4; + + // A problem has been detected with the control plane and is being repaired. + // This operation type is initiated by GKE. For more details, see + // [documentation on + // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + REPAIR_CLUSTER = 5; + + // The cluster is being updated. This is a broad category of operations and + // includes operations that only change metadata as well as those that must + // recreate the entire cluster. If the control plane must be recreated, this + // will cause temporary downtime for zonal clusters. + // + // Some features require recreating the nodes as well. Those will be + // recreated as separate operations and the update may not be completely + // functional until the node pools recreations finish. Node recreations will + // generally follow [maintenance + // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). + // + // Some GKE-initiated operations use this type. This includes certain types + // of auto-upgrades and incident mitigations. + UPDATE_CLUSTER = 6; + + // A node pool is being created. The node pool should be assumed to be + // unusable until this operation finishes. In the event of an error, the + // node pool may be partially created. + // + // If enabled, [node + // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) + // may have automatically initiated such operations. + CREATE_NODE_POOL = 7; + + // The node pool is being deleted. The node pool should be assumed to be + // unusable as soon as this operation starts. + DELETE_NODE_POOL = 8; + + // The node pool's [manamagent][google.container.v1.NodePool.management] + // field is being updated. These operations only update metadata and may be + // concurrent with most other operations. + SET_NODE_POOL_MANAGEMENT = 9; + + // A problem has been detected with nodes and [they are being + // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). + // This operation type is initiated by GKE, typically automatically. This + // operation may be concurrent with other operations and there may be + // multiple repairs occurring on the same node pool. + AUTO_REPAIR_NODES = 10; + + // Unused. Automatic node upgrade uses + // [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES]. + AUTO_UPGRADE_NODES = 11 [deprecated = true]; + + // Unused. Updating labels uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_LABELS = 12 [deprecated = true]; + + // Unused. Updating master auth uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_MASTER_AUTH = 13 [deprecated = true]; + + // The node pool is being resized. With the exception of resizing to or from + // size zero, the node pool is generally usable during this operation. + SET_NODE_POOL_SIZE = 14; + + // Unused. Updating network policy uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_NETWORK_POLICY = 15 [deprecated = true]; + + // Unused. Updating maintenance policy uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_MAINTENANCE_POLICY = 16 [deprecated = true]; + + // The control plane is being resized. This operation type is initiated by + // GKE. These operations are often performed preemptively to ensure that the + // control plane has sufficient resources and is not typically an indication + // of issues. For more details, see + // [documentation on + // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + RESIZE_CLUSTER = 18; + + // Fleet features of GKE Enterprise are being upgraded. The cluster should + // be assumed to be blocked for other upgrades until the operation finishes. + FLEET_FEATURE_UPGRADE = 19; + } + + // Output only. The server-assigned ID for the operation. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // operation is taking place. This field is deprecated, use location instead. + string zone = 2 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The operation type. + Type operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current status of the operation. + Status status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed operation progress, if available. + string detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If an error has occurred, a textual description of the error. + // Deprecated. Use the field error instead. + string status_message = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined URI for the operation. Example: + // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. + string self_link = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined URI for the target of the operation. The format + // of this is a URI to the resource being modified (such as a cluster, node + // pool, or node). For node pool repairs, there may be multiple nodes being + // repaired, but only one will be the target. + // + // Examples: + // + // - + // ## + // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` + // + // ## + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` + // + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` + string target_link = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // in which the cluster resides. + string location = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation started, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string start_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation completed, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string end_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Progress information for an operation. + OperationProgress progress = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which conditions caused the current cluster state. + // Deprecated. Use field error instead. + repeated StatusCondition cluster_conditions = 13 [deprecated = true]; + + // Which conditions caused the current node pool state. + // Deprecated. Use field error instead. + repeated StatusCondition nodepool_conditions = 14 [deprecated = true]; + + // The error result of the operation in case of failure. + google.rpc.Status error = 15; +} + +// Information about operation (or operation stage) progress. +message OperationProgress { + // Progress metric is (string, int|float|string) pair. + message Metric { + // Required. Metric name, e.g., "nodes total", "percent done". + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Strictly one of the values is required. + oneof value { + // For metrics with integer value. + int64 int_value = 2; + + // For metrics with floating point value. + double double_value = 3; + + // For metrics with custom values (ratios, visual progress, etc.). + string string_value = 4; + } + } + + // A non-parameterized string describing an operation stage. + // Unset for single-stage operations. + string name = 1; + + // Status of an operation stage. + // Unset for single-stage operations. + Operation.Status status = 2; + + // Progress metric bundle, for example: + // metrics: [{name: "nodes done", int_value: 15}, + // {name: "nodes total", int_value: 32}] + // or + // metrics: [{name: "progress", double_value: 0.56}, + // {name: "progress scale", double_value: 1.0}] + repeated Metric metrics = 3; + + // Substages of an operation or a stage. + repeated OperationProgress stages = 4; +} + +// CreateClusterRequest creates a cluster. +message CreateClusterRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true]; + + // Required. A [cluster + // resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; + + // The parent (project and location) where the cluster will be created. + // Specified in the format `projects/*/locations/*`. + string parent = 5; +} + +// GetClusterRequest gets the settings of a cluster. +message GetClusterRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to retrieve. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // The name (project, location, cluster) of the cluster to retrieve. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// UpdateClusterRequest updates the settings of a cluster. +message UpdateClusterRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. A description of the update. + ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// UpdateNodePoolRequests update a node pool's image and/or version. +message UpdateNodePoolRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to upgrade. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // Required. The Kubernetes version to change the nodes to (typically an + // upgrade). + // + // Users may specify either explicit versions offered by Kubernetes Engine or + // version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the Kubernetes master version + string node_version = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired image type for the node pool. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 6 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool) of the node pool to + // update. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 8; + + // The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // node pool's nodes should be located. Changing the locations for a node pool + // will result in nodes being either created or removed from the node pool, + // depending on whether locations are being added or removed. + repeated string locations = 13; + + // The desired workload metadata config for the node pool. + WorkloadMetadataConfig workload_metadata_config = 14; + + // Upgrade settings control disruption and speed of the upgrade. + NodePool.UpgradeSettings upgrade_settings = 15; + + // The desired network tags to be applied to all nodes in the node pool. + // If this field is not present, the tags will not be changed. Otherwise, + // the existing network tags will be *replaced* with the provided tags. + NetworkTags tags = 16; + + // The desired node taints to be applied to all nodes in the node pool. + // If this field is not present, the taints will not be changed. Otherwise, + // the existing node taints will be *replaced* with the provided taints. + NodeTaints taints = 17; + + // The desired node labels to be applied to all nodes in the node pool. + // If this field is not present, the labels will not be changed. Otherwise, + // the existing node labels will be *replaced* with the provided labels. + NodeLabels labels = 18; + + // Parameters that can be configured on Linux nodes. + LinuxNodeConfig linux_node_config = 19; + + // Node kubelet configs. + NodeKubeletConfig kubelet_config = 20; + + // Node network config. + NodeNetworkConfig node_network_config = 21; + + // GCFS config. + GcfsConfig gcfs_config = 22; + + // Confidential nodes config. + // All the nodes in the node pool will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 23; + + // Enable or disable gvnic on the node pool. + VirtualNIC gvnic = 29; + + // The current etag of the node pool. + // If an etag is provided and does not match the current etag of the node + // pool, update will be blocked and an ABORTED error will be returned. + string etag = 30; + + // Enable or disable NCCL fast socket for the node pool. + FastSocket fast_socket = 31; + + // Logging configuration. + NodePoolLoggingConfig logging_config = 32; + + // The resource labels for the node pool to use to annotate any related + // Google Compute Engine resources. + ResourceLabels resource_labels = 33; + + // Parameters that can be configured on Windows nodes. + WindowsNodeConfig windows_node_config = 34; + + // A list of hardware accelerators to be attached to each node. + // See https://cloud.google.com/compute/docs/gpus for more information about + // support for GPUs. + repeated AcceleratorConfig accelerators = 35; + + // Optional. The desired [Google Compute Engine machine + // type](https://cloud.google.com/compute/docs/machine-types) for nodes in the + // node pool. Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified machine type. + string machine_type = 36 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or + // 'pd-balanced') for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified disk type. + string disk_type = 37 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The desired disk size for nodes in the node pool specified in GB. + // The smallest allowed disk size is 10GB. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified disk size. + int64 disk_size_gb = 38 [(google.api.field_behavior) = OPTIONAL]; + + // Desired resource manager tag keys and values to be attached to the nodes + // for managing Compute Engine firewalls using Network Firewall Policies. + // Existing tags will be replaced with new values. + ResourceManagerTags resource_manager_tags = 39; + + // The desired containerd config for nodes in the node pool. + // Initiates an upgrade operation that recreates the nodes with the new + // config. + ContainerdConfig containerd_config = 40; + + // Specifies the configuration of queued provisioning. + NodePool.QueuedProvisioning queued_provisioning = 42; + + // List of Storage Pools where boot disks are provisioned. + // Existing Storage Pools will be replaced with storage-pools. + repeated string storage_pools = 43; +} + +// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. +message SetNodePoolAutoscalingRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to upgrade. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // Required. Autoscaling configuration for the node pool. + NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool) of the node pool to set + // autoscaler settings. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// SetLoggingServiceRequest sets the logging service of a cluster. +message SetLoggingServiceRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set logging. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// SetMonitoringServiceRequest sets the monitoring service of a cluster. +message SetMonitoringServiceRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set monitoring. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetAddonsConfigRequest sets the addons associated with the cluster. +message SetAddonsConfigRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The desired configurations for the various addons available to + // run in the cluster. + AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set addons. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetLocationsRequest sets the locations of the cluster. +message SetLocationsRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. Changing the locations a cluster is in + // will result in nodes being either created or removed from the cluster, + // depending on whether locations are being added or removed. + // + // This list must always include the cluster's primary zone. + repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set locations. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// UpdateMasterRequest updates the master of the cluster. +message UpdateMasterRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The Kubernetes version to change the master to. + // + // Users may specify either explicit versions offered by Kubernetes Engine or + // version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the default Kubernetes version + string master_version = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// SetMasterAuthRequest updates the admin password of a cluster. +message SetMasterAuthRequest { + // Operation type: what type update to perform. + enum Action { + // Operation is unknown and will error out. + UNKNOWN = 0; + + // Set the password to a user generated value. + SET_PASSWORD = 1; + + // Generate a new password and set it to that. + GENERATE_PASSWORD = 2; + + // Set the username. If an empty username is provided, basic authentication + // is disabled for the cluster. If a non-empty username is provided, basic + // authentication is enabled, with either a provided password or a generated + // one. + SET_USERNAME = 3; + } + + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The exact form of action to be taken on the master auth. + Action action = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. A description of the update. + MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set auth. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// DeleteClusterRequest deletes a cluster. +message DeleteClusterRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to delete. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // The name (project, location, cluster) of the cluster to delete. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 4; +} + +// ListClustersRequest lists clusters. +message ListClustersRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides, or "-" for all zones. This field has been deprecated and + // replaced by the parent field. + string zone = 2 [deprecated = true]; + + // The parent (project and location) where the clusters will be listed. + // Specified in the format `projects/*/locations/*`. + // Location "-" matches all zones and all regions. + string parent = 4; +} + +// ListClustersResponse is the result of ListClustersRequest. +message ListClustersResponse { + // A list of clusters in the project in the specified zone, or + // across all ones. + repeated Cluster clusters = 1; + + // If any zones are listed here, the list of clusters returned + // may be missing those zones. + repeated string missing_zones = 2; +} + +// GetOperationRequest gets a single operation. +message GetOperationRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The server-assigned `name` of the operation. + // This field has been deprecated and replaced by the name field. + string operation_id = 3 [deprecated = true]; + + // The name (project, location, operation id) of the operation to get. + // Specified in the format `projects/*/locations/*/operations/*`. + string name = 5; +} + +// ListOperationsRequest lists operations. +message ListOperationsRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return + // operations for, or `-` for all zones. This field has been deprecated and + // replaced by the parent field. + string zone = 2 [deprecated = true]; + + // The parent (project and location) where the operations will be listed. + // Specified in the format `projects/*/locations/*`. + // Location "-" matches all zones and all regions. + string parent = 4; +} + +// CancelOperationRequest cancels a single operation. +message CancelOperationRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // operation resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The server-assigned `name` of the operation. + // This field has been deprecated and replaced by the name field. + string operation_id = 3 [deprecated = true]; + + // The name (project, location, operation id) of the operation to cancel. + // Specified in the format `projects/*/locations/*/operations/*`. + string name = 4; +} + +// ListOperationsResponse is the result of ListOperationsRequest. +message ListOperationsResponse { + // A list of operations in the project in the specified zone. + repeated Operation operations = 1; + + // If any zones are listed here, the list of operations returned + // may be missing the operations from those zones. + repeated string missing_zones = 2; +} + +// Gets the current Kubernetes Engine service configuration. +message GetServerConfigRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return + // operations for. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // The name (project and location) of the server config to get, + // specified in the format `projects/*/locations/*`. + string name = 4; +} + +// Kubernetes Engine service configuration. +message ServerConfig { + // ReleaseChannelConfig exposes configuration for a release channel. + message ReleaseChannelConfig { + // The release channel this configuration applies to. + ReleaseChannel.Channel channel = 1; + + // The default version for newly created clusters on the channel. + string default_version = 2; + + // List of valid versions for the channel. + repeated string valid_versions = 4; + + // The auto upgrade target version for clusters on the channel. + string upgrade_target_version = 5; + } + + // Version of Kubernetes the service deploys by default. + string default_cluster_version = 1; + + // List of valid node upgrade target versions, in descending order. + repeated string valid_node_versions = 3; + + // Default image type. + string default_image_type = 4; + + // List of valid image types. + repeated string valid_image_types = 5; + + // List of valid master versions, in descending order. + repeated string valid_master_versions = 6; + + // List of release channel configurations. + repeated ReleaseChannelConfig channels = 9; +} + +// CreateNodePoolRequest creates a node pool for a cluster. +message CreateNodePoolRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + string cluster_id = 3 [deprecated = true]; + + // Required. The node pool to create. + NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; + + // The parent (project, location, cluster name) where the node pool will be + // created. Specified in the format + // `projects/*/locations/*/clusters/*`. + string parent = 6; +} + +// DeleteNodePoolRequest deletes a node pool for a cluster. +message DeleteNodePoolRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to delete. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // The name (project, location, cluster, node pool id) of the node pool to + // delete. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// ListNodePoolsRequest lists the node pool(s) for a cluster. +message ListNodePoolsRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + string cluster_id = 3 [deprecated = true]; + + // The parent (project, location, cluster name) where the node pools will be + // listed. Specified in the format `projects/*/locations/*/clusters/*`. + string parent = 5; +} + +// GetNodePoolRequest retrieves a node pool for a cluster. +message GetNodePoolRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // The name (project, location, cluster, node pool id) of the node pool to + // get. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// Settings for blue-green upgrade. +message BlueGreenSettings { + // Standard rollout policy is the default policy for blue-green. + message StandardRolloutPolicy { + // Blue pool size to drain in a batch. + oneof update_batch_size { + // Percentage of the blue pool nodes to drain in a batch. + // The range of this field should be (0.0, 1.0]. + float batch_percentage = 1; + + // Number of blue nodes to drain in a batch. + int32 batch_node_count = 2; + } + + // Soak time after each batch gets drained. Default to zero. + optional google.protobuf.Duration batch_soak_duration = 3; + } + + // The rollout policy controls the general rollout progress of blue-green. + oneof rollout_policy { + // Standard policy for the blue-green upgrade. + StandardRolloutPolicy standard_rollout_policy = 1; + } + + // Time needed after draining entire blue pool. After this period, blue pool + // will be cleaned up. + optional google.protobuf.Duration node_pool_soak_duration = 2; +} + +// NodePool contains the name and configuration for a cluster's node pool. +// Node pools are a set of nodes (i.e. VM's), with a common configuration and +// specification, under the control of the cluster master. They may have a set +// of Kubernetes labels applied to them, which may be used to reference them +// during pod scheduling. They may also be resized up or down, to accommodate +// the workload. +message NodePool { + // These upgrade settings control the level of parallelism and the level of + // disruption caused by an upgrade. + // + // maxUnavailable controls the number of nodes that can be simultaneously + // unavailable. + // + // maxSurge controls the number of additional nodes that can be added to the + // node pool temporarily for the time of the upgrade to increase the number of + // available nodes. + // + // (maxUnavailable + maxSurge) determines the level of parallelism (how many + // nodes are being upgraded at the same time). + // + // Note: upgrades inevitably introduce some disruption since workloads need to + // be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, + // this holds true. (Disruption stays within the limits of + // PodDisruptionBudget, if it is configured.) + // + // Consider a hypothetical node pool with 5 nodes having maxSurge=2, + // maxUnavailable=1. This means the upgrade process upgrades 3 nodes + // simultaneously. It creates 2 additional (upgraded) nodes, then it brings + // down 3 old (not yet upgraded) nodes at the same time. This ensures that + // there are always at least 4 nodes available. + // + // These upgrade settings configure the upgrade strategy for the node pool. + // Use strategy to switch between the strategies applied to the node pool. + // + // If the strategy is ROLLING, use max_surge and max_unavailable to control + // the level of parallelism and the level of disruption caused by upgrade. + // 1. maxSurge controls the number of additional nodes that can be added to + // the node pool temporarily for the time of the upgrade to increase the + // number of available nodes. + // 2. maxUnavailable controls the number of nodes that can be simultaneously + // unavailable. + // 3. (maxUnavailable + maxSurge) determines the level of parallelism (how + // many nodes are being upgraded at the same time). + // + // If the strategy is BLUE_GREEN, use blue_green_settings to configure the + // blue-green upgrade related settings. + // 1. standard_rollout_policy is the default policy. The policy is used to + // control the way blue pool gets drained. The draining is executed in the + // batch mode. The batch size could be specified as either percentage of the + // node pool size or the number of nodes. batch_soak_duration is the soak + // time after each batch gets drained. + // 2. node_pool_soak_duration is the soak time after all blue nodes are + // drained. After this period, the blue pool nodes will be deleted. + message UpgradeSettings { + // The maximum number of nodes that can be created beyond the current size + // of the node pool during the upgrade process. + int32 max_surge = 1; + + // The maximum number of nodes that can be simultaneously unavailable during + // the upgrade process. A node is considered available if its status is + // Ready. + int32 max_unavailable = 2; + + // Update strategy of the node pool. + optional NodePoolUpdateStrategy strategy = 3; + + // Settings for blue-green upgrade strategy. + optional BlueGreenSettings blue_green_settings = 4; + } + + // UpdateInfo contains resource (instance groups, etc), status and other + // intermediate information relevant to a node pool upgrade. + message UpdateInfo { + // Information relevant to blue-green upgrade. + message BlueGreenInfo { + // Phase represents the different stages blue-green upgrade is running in. + enum Phase { + // Unspecified phase. + PHASE_UNSPECIFIED = 0; + + // blue-green upgrade has been initiated. + UPDATE_STARTED = 1; + + // Start creating green pool nodes. + CREATING_GREEN_POOL = 2; + + // Start cordoning blue pool nodes. + CORDONING_BLUE_POOL = 3; + + // Start draining blue pool nodes. + DRAINING_BLUE_POOL = 4; + + // Start soaking time after draining entire blue pool. + NODE_POOL_SOAKING = 5; + + // Start deleting blue nodes. + DELETING_BLUE_POOL = 6; + + // Rollback has been initiated. + ROLLBACK_STARTED = 7; + } + + // Current blue-green upgrade phase. + Phase phase = 1; + + // The resource URLs of the [managed instance groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with blue pool. + repeated string blue_instance_group_urls = 2; + + // The resource URLs of the [managed instance groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with green pool. + repeated string green_instance_group_urls = 3; + + // Time to start deleting blue pool to complete blue-green upgrade, + // in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string blue_pool_deletion_start_time = 4; + + // Version of green pool. + string green_pool_version = 5; + } + + // Information of a blue-green upgrade. + BlueGreenInfo blue_green_info = 1; + } + + // The current status of the node pool instance. + enum Status { + // Not set. + STATUS_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 RUNNING_WITH_ERROR state indicates the node pool has been created + // and is partially usable. Some error state has occurred and some + // functionality may be impaired. Customer may need to reissue a request + // or trigger a new update. + RUNNING_WITH_ERROR = 3; + + // The RECONCILING state indicates that some work is actively being done on + // the node pool, such as upgrading node software. Details can + // be found in the `statusMessage` field. + RECONCILING = 4; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 5; + + // The ERROR state indicates the node pool may be unusable. Details + // can be found in the `statusMessage` field. + ERROR = 6; + } + + // PlacementPolicy defines the placement policy used by the node pool. + message PlacementPolicy { + // Type defines the type of placement policy. + enum Type { + // TYPE_UNSPECIFIED specifies no requirements on nodes + // placement. + TYPE_UNSPECIFIED = 0; + + // COMPACT specifies node placement in the same availability domain to + // ensure low communication latency. + COMPACT = 1; + } + + // The type of placement. + Type type = 1; + + // Optional. TPU placement topology for pod slice node pool. + // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies + string tpu_topology = 2 [(google.api.field_behavior) = OPTIONAL]; + + // If set, refers to the name of a custom resource policy supplied by the + // user. The resource policy must be in the same project and region as the + // node pool. If not found, InvalidArgument error is returned. + string policy_name = 3; + } + + // QueuedProvisioning defines the queued provisioning used by the node pool. + message QueuedProvisioning { + // Denotes that this nodepool is QRM specific, meaning nodes can be only + // obtained through queuing via the Cluster Autoscaler ProvisioningRequest + // API. + bool enabled = 1; + } + + // The name of the node pool. + string name = 1; + + // The node configuration of the pool. + NodeConfig config = 2; + + // The initial node count for the pool. You must ensure that your + // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // is sufficient for this number of instances. You must also have available + // firewall and routes quota. + int32 initial_node_count = 3; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // NodePool's nodes should be located. + // + // If this value is unspecified during node pool creation, the + // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) + // value will be used, instead. + // + // Warning: changing node pool locations will result in nodes being added + // and/or removed. + repeated string locations = 13; + + // Networking configuration for this NodePool. If specified, it overrides the + // cluster-level defaults. + NodeNetworkConfig network_config = 14; + + // Output only. Server-defined URL for the resource. + string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The version of Kubernetes running on this NodePool's nodes. If unspecified, + // it defaults as described + // [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). + string version = 101; + + // Output only. The resource URLs of the [managed instance + // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with this node pool. + // During the node pool blue-green upgrade operation, the URLs contain both + // blue and green resources. + repeated string instance_group_urls = 102 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the nodes in this pool instance. + Status status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use conditions instead. + // Additional information about the current status of this + // node pool instance, if available. + string status_message = 104 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Autoscaler configuration for this NodePool. Autoscaler is enabled + // only if a valid configuration is present. + NodePoolAutoscaling autoscaling = 4; + + // NodeManagement configuration for this NodePool. + NodeManagement management = 5; + + // The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 6; + + // Which conditions caused the current node pool state. + repeated StatusCondition conditions = 105; + + // Output only. The pod CIDR block size per node in this node pool. + int32 pod_ipv4_cidr_size = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Upgrade settings control disruption and speed of the upgrade. + UpgradeSettings upgrade_settings = 107; + + // Specifies the node placement policy. + PlacementPolicy placement_policy = 108; + + // Output only. Update info contains relevant information during a node + // pool update. + UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of node pool + // fields, and may be sent on update requests to ensure the client has an + // up-to-date value before proceeding. + string etag = 110; + + // Specifies the configuration of queued provisioning. + QueuedProvisioning queued_provisioning = 112; + + // Enable best effort provisioning for nodes + BestEffortProvisioning best_effort_provisioning = 113; +} + +// NodeManagement defines the set of node management services turned on for the +// node pool. +message NodeManagement { + // A flag that specifies whether node auto-upgrade is enabled for the node + // pool. If enabled, node auto-upgrade helps keep the nodes in your node pool + // up to date with the latest release version of Kubernetes. + bool auto_upgrade = 1; + + // A flag that specifies whether the node auto-repair is enabled for the node + // pool. If enabled, the nodes in this node pool will be monitored and, if + // they fail health checks too many times, an automatic repair action will be + // triggered. + bool auto_repair = 2; + + // Specifies the Auto Upgrade knobs for the node pool. + AutoUpgradeOptions upgrade_options = 10; +} + +// Best effort provisioning. +message BestEffortProvisioning { + // When this is enabled, cluster/node pool creations will ignore non-fatal + // errors like stockout to best provision as many nodes as possible right now + // and eventually bring up all target number of nodes + bool enabled = 1; + + // Minimum number of nodes to be provisioned to be considered as succeeded, + // and the rest of nodes will be provisioned gradually and eventually when + // stockout issue has been resolved. + int32 min_provision_nodes = 2; +} + +// AutoUpgradeOptions defines the set of options for the user to control how +// the Auto Upgrades will proceed. +message AutoUpgradeOptions { + // Output only. This field is set when upgrades are about to commence + // with the approximate start time for the upgrades, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string auto_upgrade_start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field is set when upgrades are about to commence + // with the description of the upgrade. + string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// MaintenancePolicy defines the maintenance policy to be used for the cluster. +message MaintenancePolicy { + // Specifies the maintenance window in which maintenance may be performed. + MaintenanceWindow window = 1; + + // A hash identifying the version of this policy, so that updates to fields of + // the policy won't accidentally undo intermediate changes (and so that users + // of the API unaware of some fields won't accidentally remove other fields). + // Make a `get()` request to the cluster to get the current + // resource version and include it with requests to set the policy. + string resource_version = 3; +} + +// MaintenanceWindow defines the maintenance window to be used for the cluster. +message MaintenanceWindow { + oneof policy { + // DailyMaintenanceWindow specifies a daily maintenance operation window. + DailyMaintenanceWindow daily_maintenance_window = 2; + + // RecurringWindow specifies some number of recurring time periods for + // maintenance to occur. The time windows may be overlapping. If no + // maintenance windows are set, maintenance can occur at any time. + RecurringTimeWindow recurring_window = 3; + } + + // Exceptions to maintenance window. Non-emergency maintenance should not + // occur in these windows. + map maintenance_exclusions = 4; +} + +// Represents an arbitrary window of time. +message TimeWindow { + oneof options { + // MaintenanceExclusionOptions provides maintenance exclusion related + // options. + MaintenanceExclusionOptions maintenance_exclusion_options = 3; + } + + // The time that the window first starts. + google.protobuf.Timestamp start_time = 1; + + // The time that the window ends. The end time should take place after the + // start time. + google.protobuf.Timestamp end_time = 2; +} + +// Represents the Maintenance exclusion option. +message MaintenanceExclusionOptions { + // Scope of exclusion. + enum Scope { + // NO_UPGRADES excludes all upgrades, including patch upgrades and minor + // upgrades across control planes and nodes. This is the default exclusion + // behavior. + NO_UPGRADES = 0; + + // NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only + // patches are allowed. + NO_MINOR_UPGRADES = 1; + + // NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, + // and also exclude all node pool upgrades. Only control + // plane patches are allowed. + NO_MINOR_OR_NODE_UPGRADES = 2; + } + + // Scope specifies the upgrade scope which upgrades are blocked by the + // exclusion. + Scope scope = 1; +} + +// Represents an arbitrary window of time that recurs. +message RecurringTimeWindow { + // The window of the first recurrence. + TimeWindow window = 1; + + // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window reccurs. They go on for the span of time between the start and + // end time. + // + // For example, to have something repeat every weekday, you'd use: + // `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` + // + // To repeat some window daily (equivalent to the DailyMaintenanceWindow): + // `FREQ=DAILY` + // + // For the first weekend of every month: + // `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` + // + // This specifies how frequently the window starts. Eg, if you wanted to have + // a 9-5 UTC-4 window every weekday, you'd use something like: + // ``` + // start time = 2019-01-01T09:00:00-0400 + // end time = 2019-01-01T17:00:00-0400 + // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // ``` + // + // Windows can span multiple days. Eg, to make the window encompass every + // weekend from midnight Saturday till the last minute of Sunday UTC: + // ``` + // start time = 2019-01-05T00:00:00Z + // end time = 2019-01-07T23:59:00Z + // recurrence = FREQ=WEEKLY;BYDAY=SA + // ``` + // + // Note the start and end time's specific dates are largely arbitrary except + // to specify duration of the window and when it first starts. + // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. + string recurrence = 2; +} + +// Time window specified for daily maintenance operations. +message DailyMaintenanceWindow { + // Time within the maintenance window to start the maintenance operations. + // Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) + // format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. + string start_time = 2; + + // Output only. Duration of the time window, automatically chosen to be + // smallest possible in the given scenario. + // Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) + // format "PTnHnMnS". + string duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// SetNodePoolManagementRequest sets the node management properties of a node +// pool. +message SetNodePoolManagementRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to update. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // Required. NodeManagement configuration for the node pool. + NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to set + // management properties. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 7; +} + +// SetNodePoolSizeRequest sets the size of a node pool. +message SetNodePoolSizeRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to update. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // Required. The desired node count for the pool. + int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to set + // size. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 7; +} + +// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete +// upgrade. +message CompleteNodePoolUpgradeRequest { + // The name (project, location, cluster, node pool id) of the node pool to + // complete upgrade. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 1; +} + +// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed +// NodePool upgrade. This will be an no-op if the last upgrade successfully +// completed. +message RollbackNodePoolUpgradeRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to rollback. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Deprecated. The name of the node pool to rollback. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 [deprecated = true]; + + // The name (project, location, cluster, node pool id) of the node poll to + // rollback upgrade. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; + + // Option for rollback to ignore the PodDisruptionBudget. + // Default value is false. + bool respect_pdb = 7; +} + +// ListNodePoolsResponse is the result of ListNodePoolsRequest. +message ListNodePoolsResponse { + // A list of node pools for a cluster. + repeated NodePool node_pools = 1; +} + +// ClusterAutoscaling contains global, per-cluster information +// required by Cluster Autoscaler to automatically adjust +// the size of the cluster and create/delete +// node pools based on the current needs. +message ClusterAutoscaling { + // Defines possible options for autoscaling_profile field. + enum AutoscalingProfile { + // No change to autoscaling configuration. + PROFILE_UNSPECIFIED = 0; + + // Prioritize optimizing utilization of resources. + OPTIMIZE_UTILIZATION = 1; + + // Use default (balanced) autoscaling configuration. + BALANCED = 2; + } + + // Enables automatic node pool creation and deletion. + bool enable_node_autoprovisioning = 1; + + // Contains global constraints regarding minimum and maximum + // amount of resources in the cluster. + repeated ResourceLimit resource_limits = 2; + + // Defines autoscaling behaviour. + AutoscalingProfile autoscaling_profile = 3; + + // AutoprovisioningNodePoolDefaults contains defaults for a node pool + // created by NAP. + AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // NodePool's nodes can be created by NAP. + repeated string autoprovisioning_locations = 5; +} + +// AutoprovisioningNodePoolDefaults contains defaults for a node pool created +// by NAP. +message AutoprovisioningNodePoolDefaults { + // Scopes that are used by NAP when creating node pools. + repeated string oauth_scopes = 1; + + // The Google Cloud Platform Service Account to be used by the node VMs. + string service_account = 2; + + // Specifies the upgrade settings for NAP created node pools + NodePool.UpgradeSettings upgrade_settings = 3; + + // Specifies the node management options for NAP created node-pools. + NodeManagement management = 4; + + // Deprecated. Minimum CPU platform to be used for NAP created node pools. + // The instance may be scheduled on the specified or newer CPU platform. + // Applicable values are the friendly names of CPU platforms, such as + // minCpuPlatform: Intel Haswell or + // minCpuPlatform: Intel Sandy Bridge. For more + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). + // This field is deprecated, min_cpu_platform should be specified using + // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. + // To unset the min cpu platform field pass "automatic" + // as field value. + string min_cpu_platform = 5 [deprecated = true]; + + // Size of the disk attached to each node, specified in GB. + // The smallest allowed disk size is 10GB. + // + // If unspecified, the default disk size is 100GB. + int32 disk_size_gb = 6; + + // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or + // 'pd-balanced') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 7; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 8; + + // The Customer Managed Encryption Key used to encrypt the boot disk attached + // to each node in the node pool. This should be of the form + // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. + // For more information about protecting resources with Cloud KMS Keys please + // see: + // https://cloud.google.com/compute/docs/disks/customer-managed-encryption + string boot_disk_kms_key = 9; + + // The image type to use for NAP created node. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 10; + + // Enable or disable Kubelet read only port. + optional bool insecure_kubelet_readonly_port_enabled = 13; +} + +// Contains information about amount of some resource in the cluster. +// For memory, value should be in GB. +message ResourceLimit { + // Resource name "cpu", "memory" or gpu-specific string. + string resource_type = 1; + + // Minimum amount of the resource in the cluster. + int64 minimum = 2; + + // Maximum amount of the resource in the cluster. + int64 maximum = 3; +} + +// NodePoolAutoscaling contains information required by cluster autoscaler to +// adjust the size of the node pool to the current cluster usage. +message NodePoolAutoscaling { + // Location policy specifies how zones are picked when scaling up the + // nodepool. + enum LocationPolicy { + // Not set. + LOCATION_POLICY_UNSPECIFIED = 0; + + // BALANCED is a best effort policy that aims to balance the sizes of + // different zones. + BALANCED = 1; + + // ANY policy picks zones that have the highest capacity available. + ANY = 2; + } + + // Is autoscaling enabled for this node pool. + bool enabled = 1; + + // Minimum number of nodes for one location in the node pool. Must be greater + // than or equal to 0 and less than or equal to max_node_count. + int32 min_node_count = 2; + + // Maximum number of nodes for one location in the node pool. Must be >= + // min_node_count. There has to be enough quota to scale up the cluster. + int32 max_node_count = 3; + + // Can this node pool be deleted automatically. + bool autoprovisioned = 4; + + // Location policy used when scaling up a nodepool. + LocationPolicy location_policy = 5; + + // Minimum number of nodes in the node pool. Must be greater than or equal + // to 0 and less than or equal to total_max_node_count. + // The total_*_node_count fields are mutually exclusive with the *_node_count + // fields. + int32 total_min_node_count = 6; + + // Maximum number of nodes in the node pool. Must be greater than or equal to + // total_min_node_count. There has to be enough quota to scale up the cluster. + // The total_*_node_count fields are mutually exclusive with the *_node_count + // fields. + int32 total_max_node_count = 7; +} + +// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container +// Engine cluster, which will in turn set them for Google Compute Engine +// resources used by that cluster +message SetLabelsRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. The labels to set for that cluster. + map resource_labels = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The fingerprint of the previous set of labels for this resource, + // used to detect conflicts. The fingerprint is initially generated by + // Kubernetes Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash when + // updating or changing labels. Make a `get()` request to the + // resource to get the latest fingerprint. + string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set labels. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for +// a cluster. +message SetLegacyAbacRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. Whether ABAC authorization will be enabled in the cluster. + bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set legacy + // abac. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// StartIPRotationRequest creates a new IP for the cluster and then performs +// a node upgrade on each node pool to point to the new IP. +message StartIPRotationRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // The name (project, location, cluster name) of the cluster to start IP + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; + + // Whether to rotate credentials during IP rotation. + bool rotate_credentials = 7; +} + +// CompleteIPRotationRequest moves the cluster master back into single-IP mode. +message CompleteIPRotationRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // The name (project, location, cluster name) of the cluster to complete IP + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// AcceleratorConfig represents a Hardware Accelerator request. +message AcceleratorConfig { + // The number of the accelerator cards exposed to an instance. + int64 accelerator_count = 1; + + // The accelerator type resource name. List of supported accelerators + // [here](https://cloud.google.com/compute/docs/gpus) + string accelerator_type = 2; + + // Size of partitions to create on the GPU. Valid values are described in the + // NVIDIA [mig user + // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). + string gpu_partition_size = 3; + + // The configuration for GPU sharing options. + optional GPUSharingConfig gpu_sharing_config = 5; + + // The configuration for auto installation of GPU driver. + optional GPUDriverInstallationConfig gpu_driver_installation_config = 6; +} + +// GPUSharingConfig represents the GPU sharing configuration for Hardware +// Accelerators. +message GPUSharingConfig { + // The type of GPU sharing strategy currently provided. + enum GPUSharingStrategy { + // Default value. + GPU_SHARING_STRATEGY_UNSPECIFIED = 0; + + // GPUs are time-shared between containers. + TIME_SHARING = 1; + + // GPUs are shared between containers with NVIDIA MPS. + MPS = 2; + } + + // The max number of containers that can share a physical GPU. + int64 max_shared_clients_per_gpu = 1; + + // The type of GPU sharing strategy to enable on the GPU node. + optional GPUSharingStrategy gpu_sharing_strategy = 2; +} + +// GPUDriverInstallationConfig specifies the version of GPU driver to be auto +// installed. +message GPUDriverInstallationConfig { + // The GPU driver version to install. + enum GPUDriverVersion { + // Default value is to not install any GPU driver. + GPU_DRIVER_VERSION_UNSPECIFIED = 0; + + // Disable GPU driver auto installation and needs manual installation + INSTALLATION_DISABLED = 1; + + // "Default" GPU driver in COS and Ubuntu. + DEFAULT = 2; + + // "Latest" GPU driver in COS. + LATEST = 3; + } + + // Mode for how the GPU driver is installed. + optional GPUDriverVersion gpu_driver_version = 1; +} + +// WorkloadMetadataConfig defines the metadata configuration to expose to +// workloads on the node pool. +message WorkloadMetadataConfig { + // Mode is the configuration for how to expose metadata to workloads running + // on the node. + enum Mode { + // Not set. + MODE_UNSPECIFIED = 0; + + // Expose all Compute Engine metadata to pods. + GCE_METADATA = 1; + + // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes + // a metadata API to workloads that is compatible with the V1 Compute + // Metadata APIs exposed by the Compute Engine and App Engine Metadata + // Servers. This feature can only be enabled if Workload Identity is enabled + // at the cluster level. + GKE_METADATA = 2; + } + + // Mode is the configuration for how to expose metadata to workloads running + // on the node pool. + Mode mode = 2; +} + +// SetNetworkPolicyRequest enables/disables network policy for a cluster. +message SetNetworkPolicyRequest { + // Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 [deprecated = true]; + + // Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true]; + + // Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 [deprecated = true]; + + // Required. Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set networking + // policy. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. +message SetMaintenancePolicyRequest { + // Required. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the cluster to update. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maintenance policy to be set for the cluster. An empty field + // clears the existing maintenance policy. + MaintenancePolicy maintenance_policy = 4 + [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set + // maintenance policy. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// StatusCondition describes why a cluster or a node pool has a certain status +// (e.g., ERROR or DEGRADED). +message StatusCondition { + // Code for each condition + enum Code { + // UNKNOWN indicates a generic condition. + UNKNOWN = 0; + + // GCE_STOCKOUT indicates that Google Compute Engine resources are + // temporarily unavailable. + GCE_STOCKOUT = 1; + + // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot + // service account. + GKE_SERVICE_ACCOUNT_DELETED = 2; + + // Google Compute Engine quota was exceeded. + GCE_QUOTA_EXCEEDED = 3; + + // Cluster state was manually changed by an SRE due to a system logic error. + SET_BY_OPERATOR = 4; + + // Unable to perform an encrypt operation against the CloudKMS key used for + // etcd level encryption. + CLOUD_KMS_KEY_ERROR = 7; + + // Cluster CA is expiring soon. + CA_EXPIRING = 9; + } + + // Machine-friendly representation of the condition + // Deprecated. Use canonical_code instead. + Code code = 1 [deprecated = true]; + + // Human-friendly representation of the condition + string message = 2; + + // Canonical code of the condition. + google.rpc.Code canonical_code = 3; +} + +// NetworkConfig reports the relative names of network & subnetwork. +message NetworkConfig { + // Configuration of network bandwidth tiers + message ClusterNetworkPerformanceConfig { + // Node network tier + enum Tier { + // Default value + TIER_UNSPECIFIED = 0; + + // Higher bandwidth, actual values based on VM size. + TIER_1 = 1; + } + + // Specifies the total network bandwidth tier for NodePools in the cluster. + optional Tier total_egress_bandwidth_tier = 1; + } + + // Output only. The relative name of the Google Compute Engine + // [network][google.container.v1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + // to which the cluster is connected. Example: + // projects/my-project/global/networks/my-network + string network = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The relative name of the Google Compute Engine + // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the + // cluster is connected. Example: + // projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether Intra-node visibility is enabled for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + bool enable_intra_node_visibility = 5; + + // Whether the cluster disables default in-node sNAT rules. In-node sNAT rules + // will be disabled when default_snat_status is disabled. When disabled is set + // to false, default IP masquerade rules will be applied to the nodes to + // prevent sNAT on cluster internal traffic. + DefaultSnatStatus default_snat_status = 7; + + // Whether L4ILB Subsetting is enabled for this cluster. + bool enable_l4ilb_subsetting = 10; + + // The desired datapath provider for this cluster. By default, uses the + // IPTables-based kube-proxy implementation. + DatapathProvider datapath_provider = 11; + + // The desired state of IPv6 connectivity to Google Services. + // By default, no private IPv6 access to or from Google Services (all access + // will be via IPv4) + PrivateIPv6GoogleAccess private_ipv6_google_access = 12; + + // DNSConfig contains clusterDNS config for this cluster. + DNSConfig dns_config = 13; + + // ServiceExternalIPsConfig specifies if services with externalIPs field are + // blocked or not. + ServiceExternalIPsConfig service_external_ips_config = 15; + + // GatewayAPIConfig contains the desired config of Gateway API on this + // cluster. + GatewayAPIConfig gateway_api_config = 16; + + // Whether multi-networking is enabled for this cluster. + bool enable_multi_networking = 17; + + // Network bandwidth tier configuration. + ClusterNetworkPerformanceConfig network_performance_config = 18; + + // Whether FQDN Network Policy is enabled on this cluster. + optional bool enable_fqdn_network_policy = 19; + + // Specify the details of in-transit encryption. + // Now named inter-node transparent encryption. + optional InTransitEncryptionConfig in_transit_encryption_config = 20; + + // Whether CiliumClusterwideNetworkPolicy is enabled on this cluster. + optional bool enable_cilium_clusterwide_network_policy = 21; + + // Controls whether by default nodes have private IP addresses only. + // It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][] + // and this field at the same time. + // To update the default setting, use + // [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes] + optional bool default_enable_private_nodes = 22; +} + +// GatewayAPIConfig contains the desired config of Gateway API on this cluster. +message GatewayAPIConfig { + // Channel describes if/how Gateway API should be installed and implemented in + // a cluster. + enum Channel { + // Default value. + CHANNEL_UNSPECIFIED = 0; + + // Gateway API support is disabled + CHANNEL_DISABLED = 1; + + // Deprecated: use CHANNEL_STANDARD instead. + // Gateway API support is enabled, experimental CRDs are installed + CHANNEL_EXPERIMENTAL = 3 [deprecated = true]; + + // Gateway API support is enabled, standard CRDs are installed + CHANNEL_STANDARD = 4; + } + + // The Gateway API release channel to use for Gateway API. + Channel channel = 1; +} + +// Config to block services with externalIPs field. +message ServiceExternalIPsConfig { + // Whether Services with ExternalIPs field are allowed or not. + bool enabled = 1; +} + +// GetOpenIDConfigRequest gets the OIDC discovery document for the +// cluster. See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigRequest { + // The cluster (project, location, cluster name) to get the discovery document + // for. Specified in the format `projects/*/locations/*/clusters/*`. + string parent = 1; +} + +// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. +// See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigResponse { + // OIDC Issuer. + string issuer = 1; + + // JSON Web Key uri. + string jwks_uri = 2; + + // Supported response types. + repeated string response_types_supported = 3; + + // Supported subject types. + repeated string subject_types_supported = 4; + + // supported ID Token signing Algorithms. + repeated string id_token_signing_alg_values_supported = 5; + + // Supported claims. + repeated string claims_supported = 6; + + // Supported grant types. + repeated string grant_types = 7; +} + +// GetJSONWebKeysRequest gets the public component of the keys used by the +// cluster to sign token requests. This will be the jwks_uri for the discover +// document returned by getOpenIDConfig. See the OpenID Connect +// Discovery 1.0 specification for details. +message GetJSONWebKeysRequest { + // The cluster (project, location, cluster name) to get keys for. Specified in + // the format `projects/*/locations/*/clusters/*`. + string parent = 1; +} + +// Jwk is a JSON Web Key as specified in RFC 7517 +message Jwk { + // Key Type. + string kty = 1; + + // Algorithm. + string alg = 2; + + // Permitted uses for the public keys. + string use = 3; + + // Key ID. + string kid = 4; + + // Used for RSA keys. + string n = 5; + + // Used for RSA keys. + string e = 6; + + // Used for ECDSA keys. + string x = 7; + + // Used for ECDSA keys. + string y = 8; + + // Used for ECDSA keys. + string crv = 9; +} + +// GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 +message GetJSONWebKeysResponse { + // The public component of the keys used by the cluster to sign token + // requests. + repeated Jwk keys = 1; +} + +// CheckAutopilotCompatibilityRequest requests getting the blockers for the +// given operation in the cluster. +message CheckAutopilotCompatibilityRequest { + // The name (project, location, cluster) of the cluster to retrieve. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 1; +} + +// AutopilotCompatibilityIssue contains information about a specific +// compatibility issue with Autopilot mode. +message AutopilotCompatibilityIssue { + // The type of the reported issue. + enum IssueType { + // Default value, should not be used. + UNSPECIFIED = 0; + + // Indicates that the issue is a known incompatibility between the + // cluster and Autopilot mode. + INCOMPATIBILITY = 1; + + // Indicates the issue is an incompatibility if customers take no further + // action to resolve. + ADDITIONAL_CONFIG_REQUIRED = 2; + + // Indicates the issue is not an incompatibility, but depending on the + // workloads business logic, there is a potential that they won't work on + // Autopilot. + PASSED_WITH_OPTIONAL_CONFIG = 3; + } + + // The last time when this issue was observed. + google.protobuf.Timestamp last_observation = 1; + + // The constraint type of the issue. + string constraint_type = 2; + + // The incompatibility type of this issue. + IssueType incompatibility_type = 3; + + // The name of the resources which are subject to this issue. + repeated string subjects = 4; + + // A URL to a public documnetation, which addresses resolving this issue. + string documentation_url = 5; + + // The description of the issue. + string description = 6; +} + +// CheckAutopilotCompatibilityResponse has a list of compatibility issues. +message CheckAutopilotCompatibilityResponse { + // The list of issues for the given operation. + repeated AutopilotCompatibilityIssue issues = 1; + + // The summary of the autopilot compatibility response. + string summary = 2; +} + +// ReleaseChannel indicates which release channel a cluster is +// subscribed to. Release channels are arranged in order of risk. +// +// When a cluster is subscribed to a release channel, Google maintains +// both the master version and the node version. Node auto-upgrade +// defaults to true and cannot be disabled. +message ReleaseChannel { + // Possible values for 'channel'. + enum Channel { + // No channel specified. + UNSPECIFIED = 0; + + // RAPID channel is offered on an early access basis for customers who want + // to test new releases. + // + // WARNING: Versions available in the RAPID Channel may be subject to + // unresolved issues with no known workaround and are not subject to any + // SLAs. + RAPID = 1; + + // Clusters subscribed to REGULAR receive versions that are considered GA + // quality. REGULAR is intended for production users who want to take + // advantage of new features. + REGULAR = 2; + + // Clusters subscribed to STABLE receive versions that are known to be + // stable and reliable in production. + STABLE = 3; + + // Clusters subscribed to EXTENDED receive extended support and availability + // for versions which are known to be stable and reliable in production. + EXTENDED = 4; + } + + // channel specifies which release channel the cluster is subscribed to. + Channel channel = 1; +} + +// Configuration for fine-grained cost management feature. +message CostManagementConfig { + // Whether the feature is enabled or not. + bool enabled = 1; +} + +// IntraNodeVisibilityConfig contains the desired config of the intra-node +// visibility on this cluster. +message IntraNodeVisibilityConfig { + // Enables intra node visibility for this cluster. + bool enabled = 1; +} + +// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer +// subsetting on this cluster. +message ILBSubsettingConfig { + // Enables l4 ILB subsetting for this cluster. + bool enabled = 1; +} + +// DNSConfig contains the desired set of options for configuring clusterDNS. +message DNSConfig { + // Provider lists the various in-cluster DNS providers. + enum Provider { + // Default value + PROVIDER_UNSPECIFIED = 0; + + // Use GKE default DNS provider(kube-dns) for DNS resolution. + PLATFORM_DEFAULT = 1; + + // Use CloudDNS for DNS resolution. + CLOUD_DNS = 2; + + // Use KubeDNS for DNS resolution. + KUBE_DNS = 3; + } + + // DNSScope lists the various scopes of access to cluster DNS records. + enum DNSScope { + // Default value, will be inferred as cluster scope. + DNS_SCOPE_UNSPECIFIED = 0; + + // DNS records are accessible from within the cluster. + CLUSTER_SCOPE = 1; + + // DNS records are accessible from within the VPC. + VPC_SCOPE = 2; + } + + // cluster_dns indicates which in-cluster DNS provider should be used. + Provider cluster_dns = 1; + + // cluster_dns_scope indicates the scope of access to cluster DNS records. + DNSScope cluster_dns_scope = 2; + + // cluster_dns_domain is the suffix used for all cluster service records. + string cluster_dns_domain = 3; + + // Optional. The domain used in Additive VPC scope. + string additive_vpc_scope_dns_domain = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Constraint enforced on the max num of pods per node. + int64 max_pods_per_node = 1; +} + +// Configuration for the use of Kubernetes Service Accounts in GCP IAM +// policies. +message WorkloadIdentityConfig { + // The workload pool to attach all Kubernetes service accounts to. + string workload_pool = 2; +} + +// IdentityServiceConfig is configuration for Identity Service which allows +// customers to use external identity providers with the K8S API +message IdentityServiceConfig { + // Whether to enable the Identity Service component + bool enabled = 1; +} + +// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. +message MeshCertificates { + // enable_certificates controls issuance of workload mTLS certificates. + // + // If set, the GKE Workload Identity Certificates controller and node agent + // will be deployed in the cluster, which can then be configured by creating a + // WorkloadCertificateConfig Custom Resource. + // + // Requires Workload Identity + // ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool] + // must be non-empty). + google.protobuf.BoolValue enable_certificates = 1; +} + +// Configuration of etcd encryption. +message DatabaseEncryption { + // State of etcd encryption. + enum State { + // Should never be set + UNKNOWN = 0; + + // Secrets in etcd are encrypted. + ENCRYPTED = 1; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to Compute Engine level full disk encryption. + DECRYPTED = 2; + } + + // Current State of etcd encryption. + enum CurrentState { + // Should never be set + CURRENT_STATE_UNSPECIFIED = 0; + + // Secrets in etcd are encrypted. + CURRENT_STATE_ENCRYPTED = 7; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to Compute Engine level full disk encryption. + CURRENT_STATE_DECRYPTED = 2; + + // Encryption (or re-encryption with a different CloudKMS key) + // of Secrets is in progress. + CURRENT_STATE_ENCRYPTION_PENDING = 3; + + // Encryption (or re-encryption with a different CloudKMS key) of Secrets in + // etcd encountered an error. + CURRENT_STATE_ENCRYPTION_ERROR = 4; + + // De-crypting Secrets to plain text in etcd is in progress. + CURRENT_STATE_DECRYPTION_PENDING = 5; + + // De-crypting Secrets to plain text in etcd encountered an error. + CURRENT_STATE_DECRYPTION_ERROR = 6; + } + + // OperationError records errors seen from CloudKMS keys + // encountered during updates to DatabaseEncryption configuration. + message OperationError { + // CloudKMS key resource that had the error. + string key_name = 1; + + // Description of the error seen during the operation. + string error_message = 2; + + // Time when the CloudKMS error was seen. + google.protobuf.Timestamp timestamp = 3; + } + + // Name of CloudKMS key to use for the encryption of secrets in etcd. + // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + string key_name = 1; + + // The desired state of etcd encryption. + State state = 2; + + // Output only. The current state of etcd encryption. + optional CurrentState current_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Keys in use by the cluster for decrypting + // existing objects, in addition to the key in `key_name`. + // + // Each item is a CloudKMS key resource. + repeated string decryption_keys = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records errors seen during DatabaseEncryption update + // operations. + repeated OperationError last_operation_errors = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListUsableSubnetworksRequest requests the list of usable subnetworks +// available to a user for creating clusters. +message ListUsableSubnetworksRequest { + // The parent project where subnetworks are usable. + // Specified in the format `projects/*`. + string parent = 1; + + // Filtering currently only supports equality on the networkProjectId and must + // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + // is the project which owns the listed subnetworks. This defaults to the + // parent project ID. + string filter = 2; + + // The max number of results per page that should be returned. If the number + // of available results is larger than `page_size`, a `next_page_token` is + // returned which can be used to get the next page of results in subsequent + // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + int32 page_size = 3; + + // Specifies a page token to use. Set this to the nextPageToken returned by + // previous list requests to get the next page of results. + string page_token = 4; +} + +// ListUsableSubnetworksResponse is the response of +// ListUsableSubnetworksRequest. +message ListUsableSubnetworksResponse { + // A list of usable subnetworks in the specified network project. + repeated UsableSubnetwork subnetworks = 1; + + // This token allows you to get the next page of results for list requests. + // If the number of results is larger than `page_size`, use the + // `next_page_token` as a value for the query parameter `page_token` in the + // next request. The value will become empty when there are no more pages. + string next_page_token = 2; +} + +// Secondary IP range of a usable subnetwork. +message UsableSubnetworkSecondaryRange { + // Status shows the current usage of a secondary IP range. + enum Status { + // UNKNOWN is the zero value of the Status enum. It's not a valid status. + UNKNOWN = 0; + + // UNUSED denotes that this range is unclaimed by any cluster. + UNUSED = 1; + + // IN_USE_SERVICE denotes that this range is claimed by cluster(s) for + // services. User-managed services range can be shared between clusters + // within the same subnetwork. + IN_USE_SERVICE = 2; + + // IN_USE_SHAREABLE_POD denotes this range was created by the network admin + // and is currently claimed by a cluster for pods. It can only be used by + // other clusters as a pod range. + IN_USE_SHAREABLE_POD = 3; + + // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed + // for pods. It cannot be used for other clusters. + IN_USE_MANAGED_POD = 4; + } + + // The name associated with this subnetwork secondary range, used when adding + // an alias IP range to a VM instance. + string range_name = 1; + + // The range of IP addresses belonging to this subnetwork secondary range. + string ip_cidr_range = 2; + + // This field is to determine the status of the secondary range programmably. + Status status = 3; +} + +// UsableSubnetwork resource returns the subnetwork name, its associated network +// and the primary CIDR range. +message UsableSubnetwork { + // Subnetwork Name. + // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 1; + + // Network Name. + // Example: projects/my-project/global/networks/my-network + string network = 2; + + // The range of internal addresses that are owned by this subnetwork. + string ip_cidr_range = 3; + + // Secondary IP ranges. + repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4; + + // A human readable status message representing the reasons for cases where + // the caller cannot use the secondary ranges under the subnet. For example if + // the secondary_ip_ranges is empty due to a permission issue, an insufficient + // permission message will be given by status_message. + string status_message = 5; +} + +// Configuration for exporting cluster resource usages. +message ResourceUsageExportConfig { + // Parameters for using BigQuery as the destination of resource usage export. + message BigQueryDestination { + // The ID of a BigQuery Dataset. + string dataset_id = 1; + } + + // Parameters for controlling consumption metering. + message ConsumptionMeteringConfig { + // Whether to enable consumption metering for this cluster. If enabled, a + // second BigQuery table will be created to hold resource consumption + // records. + bool enabled = 1; + } + + // Configuration to use BigQuery as usage export destination. + BigQueryDestination bigquery_destination = 1; + + // Whether to enable network egress metering for this cluster. If enabled, a + // daemonset will be created in the cluster to meter network egress traffic. + bool enable_network_egress_metering = 2; + + // Configuration to enable resource consumption metering. + ConsumptionMeteringConfig consumption_metering_config = 3; +} + +// VerticalPodAutoscaling contains global, per-cluster information +// required by Vertical Pod Autoscaler to automatically adjust +// the resources of pods controlled by it. +message VerticalPodAutoscaling { + // Enables vertical pod autoscaling. + bool enabled = 1; +} + +// DefaultSnatStatus contains the desired state of whether default sNAT should +// be disabled on the cluster. +message DefaultSnatStatus { + // Disables cluster default sNAT rules. + bool disabled = 1; +} + +// Configuration of Shielded Nodes feature. +message ShieldedNodes { + // Whether Shielded Nodes features are enabled on all nodes in this cluster. + bool enabled = 1; +} + +// Configuration of gVNIC feature. +message VirtualNIC { + // Whether gVNIC features are enabled in the node pool. + bool enabled = 1; +} + +// Configuration of Fast Socket feature. +message FastSocket { + // Whether Fast Socket features are enabled in the node pool. + bool enabled = 1; +} + +// PrivateIPv6GoogleAccess controls whether and how the pods can communicate +// with Google Services through gRPC over IPv6. +enum PrivateIPv6GoogleAccess { + // Default value. Same as DISABLED + PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // No private access to or from Google Services + PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1; + + // Enables private IPv6 access to Google Services from GKE + PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; + + // Enables private IPv6 access to and from Google Services + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; +} + +// NotificationConfig is the configuration of notifications. +message NotificationConfig { + // Types of notifications currently supported. Can be used to filter what + // notifications are sent. + enum EventType { + // Not set, will be ignored. + EVENT_TYPE_UNSPECIFIED = 0; + + // Corresponds with UpgradeAvailableEvent. + UPGRADE_AVAILABLE_EVENT = 1; + + // Corresponds with UpgradeEvent. + UPGRADE_EVENT = 2; + + // Corresponds with SecurityBulletinEvent. + SECURITY_BULLETIN_EVENT = 3; + } + + // Pub/Sub specific notification config. + message PubSub { + // Enable notifications for Pub/Sub. + bool enabled = 1; + + // The desired Pub/Sub topic to which notifications will be + // sent by GKE. Format is `projects/{project}/topics/{topic}`. + string topic = 2 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Allows filtering to one or more specific event types. If no filter is + // specified, or if a filter is specified with no event types, all event + // types will be sent + Filter filter = 3; + } + + // Allows filtering to one or more specific event types. If event types are + // present, those and only those event types will be transmitted to the + // cluster. Other types will be skipped. If no filter is specified, or no + // event types are present, all event types will be sent + message Filter { + // Event types to allowlist. + repeated EventType event_type = 1; + } + + // Notification config for Pub/Sub. + PubSub pubsub = 1; +} + +// ConfidentialNodes is configuration for the confidential nodes feature, which +// makes nodes run on confidential VMs. +message ConfidentialNodes { + // Whether Confidential Nodes feature is enabled. + bool enabled = 1; +} + +// UpgradeResourceType is the resource type that is upgrading. It is used +// in upgrade notifications. +enum UpgradeResourceType { + // Default value. This shouldn't be used. + UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Master / control plane + MASTER = 1; + + // Node pool + NODE_POOL = 2; +} + +// UpgradeEvent is a notification sent to customers by the cluster server when +// a resource is upgrading. +message UpgradeEvent { + // The resource type that is upgrading. + UpgradeResourceType resource_type = 1; + + // The operation associated with this upgrade. + string operation = 2; + + // The time when the operation was started. + google.protobuf.Timestamp operation_start_time = 3; + + // The current version before the upgrade. + string current_version = 4; + + // The target version for the upgrade. + string target_version = 5; + + // Optional relative path to the resource. For example in node pool upgrades, + // the relative path of the node pool. + string resource = 6; +} + +// UpgradeInfoEvent is a notification sent to customers about the upgrade +// information of a resource. +message UpgradeInfoEvent { + // The state of the upgrade. + enum State { + // STATE_UNSPECIFIED indicates the state is unspecified. + STATE_UNSPECIFIED = 0; + + // STARTED indicates the upgrade has started. + STARTED = 3; + + // SUCCEEDED indicates the upgrade has completed successfully. + SUCCEEDED = 4; + + // FAILED indicates the upgrade has failed. + FAILED = 5; + + // CANCELED indicates the upgrade has canceled. + CANCELED = 6; + } + + // The resource type associated with the upgrade. + UpgradeResourceType resource_type = 1; + + // The operation associated with this upgrade. + string operation = 2; + + // The time when the operation was started. + google.protobuf.Timestamp start_time = 3; + + // The time when the operation ended. + google.protobuf.Timestamp end_time = 4; + + // The current version before the upgrade. + string current_version = 5; + + // The target version for the upgrade. + string target_version = 6; + + // Optional relative path to the resource. For example in node pool upgrades, + // the relative path of the node pool. + string resource = 7; + + // Output only. The state of the upgrade. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A brief description of the event. + string description = 11; +} + +// UpgradeAvailableEvent is a notification sent to customers when a new +// available version is released. +message UpgradeAvailableEvent { + // The release version available for upgrade. + string version = 1; + + // The resource type of the release version. + UpgradeResourceType resource_type = 2; + + // The release channel of the version. If empty, it means a non-channel + // release. + ReleaseChannel release_channel = 3; + + // Optional relative path to the resource. For example, the relative path of + // the node pool. + string resource = 4; +} + +// SecurityBulletinEvent is a notification sent to customers when a security +// bulletin has been posted that they are vulnerable to. +message SecurityBulletinEvent { + // The resource type (node/control plane) that has the vulnerability. Multiple + // notifications (1 notification per resource type) will be sent for a + // vulnerability that affects > 1 resource type. + string resource_type_affected = 1; + + // The ID of the bulletin corresponding to the vulnerability. + string bulletin_id = 2; + + // The CVEs associated with this bulletin. + repeated string cve_ids = 3; + + // The severity of this bulletin as it relates to GKE. + string severity = 4; + + // The URI link to the bulletin on the website for more information. + string bulletin_uri = 5; + + // A brief description of the bulletin. See the bulletin pointed to by the + // bulletin_uri field for an expanded description. + string brief_description = 6; + + // The GKE minor versions affected by this vulnerability. + repeated string affected_supported_minors = 7; + + // The GKE versions where this vulnerability is patched. + repeated string patched_versions = 8; + + // This represents a version selected from the patched_versions field that + // the cluster receiving this notification should most likely want to upgrade + // to based on its current version. Note that if this notification is being + // received by a given cluster, it means that this version is currently + // available as an upgrade target in that cluster's location. + string suggested_upgrade_target = 9; + + // If this field is specified, it means there are manual steps that the user + // must take to make their clusters safe. + bool manual_steps_required = 10; +} + +// Autopilot is the configuration for Autopilot settings on the cluster. +message Autopilot { + // Enable Autopilot + bool enabled = 1; + + // Workload policy configuration for Autopilot. + WorkloadPolicyConfig workload_policy_config = 2; +} + +// WorkloadPolicyConfig is the configuration of workload policy for autopilot +// clusters. +message WorkloadPolicyConfig { + // If true, workloads can use NET_ADMIN capability. + optional bool allow_net_admin = 1; +} + +// LoggingConfig is cluster logging configuration. +message LoggingConfig { + // Logging components configuration + LoggingComponentConfig component_config = 1; +} + +// LoggingComponentConfig is cluster logging component configuration. +message LoggingComponentConfig { + // GKE components exposing logs + enum Component { + // Default value. This shouldn't be used. + COMPONENT_UNSPECIFIED = 0; + + // system components + SYSTEM_COMPONENTS = 1; + + // workloads + WORKLOADS = 2; + + // kube-apiserver + APISERVER = 3; + + // kube-scheduler + SCHEDULER = 4; + + // kube-controller-manager + CONTROLLER_MANAGER = 5; + + // kcp-sshd + KCP_SSHD = 7; + + // kcp connection logs + KCP_CONNECTION = 8; + } + + // Select components to collect logs. An empty set would disable all logging. + repeated Component enable_components = 1; +} + +// RayClusterLoggingConfig specifies configuration of Ray logging. +message RayClusterLoggingConfig { + // Enable log collection for Ray clusters. + bool enabled = 1; +} + +// MonitoringConfig is cluster monitoring configuration. +message MonitoringConfig { + // Monitoring components configuration + MonitoringComponentConfig component_config = 1; + + // Enable Google Cloud Managed Service for Prometheus + // in the cluster. + ManagedPrometheusConfig managed_prometheus_config = 2; + + // Configuration of Advanced Datapath Observability features. + AdvancedDatapathObservabilityConfig advanced_datapath_observability_config = + 3; +} + +// AdvancedDatapathObservabilityConfig specifies configuration of observability +// features of advanced datapath. +message AdvancedDatapathObservabilityConfig { + // Supported Relay modes + enum RelayMode { + // Default value. This shouldn't be used. + RELAY_MODE_UNSPECIFIED = 0; + + // disabled + DISABLED = 1; + + // exposed via internal load balancer + INTERNAL_VPC_LB = 3; + + // exposed via external load balancer + EXTERNAL_LB = 4; + } + + // Expose flow metrics on nodes + bool enable_metrics = 1; + + // Method used to make Relay available + RelayMode relay_mode = 2; + + // Enable Relay component + optional bool enable_relay = 3; +} + +// RayClusterMonitoringConfig specifies monitoring configuration for Ray +// clusters. +message RayClusterMonitoringConfig { + // Enable metrics collection for Ray clusters. + bool enabled = 1; +} + +// NodePoolLoggingConfig specifies logging configuration for nodepools. +message NodePoolLoggingConfig { + // Logging variant configuration. + LoggingVariantConfig variant_config = 1; +} + +// LoggingVariantConfig specifies the behaviour of the logging component. +message LoggingVariantConfig { + // Logging component variants. + enum Variant { + // Default value. This shouldn't be used. + VARIANT_UNSPECIFIED = 0; + + // default logging variant. + DEFAULT = 1; + + // maximum logging throughput variant. + MAX_THROUGHPUT = 2; + } + + // Logging variant deployed on nodes. + Variant variant = 1; +} + +// MonitoringComponentConfig is cluster monitoring component configuration. +message MonitoringComponentConfig { + // GKE components exposing metrics + enum Component { + // Default value. This shouldn't be used. + COMPONENT_UNSPECIFIED = 0; + + // system components + SYSTEM_COMPONENTS = 1; + + // kube-apiserver + APISERVER = 3; + + // kube-scheduler + SCHEDULER = 4; + + // kube-controller-manager + CONTROLLER_MANAGER = 5; + + // Storage + STORAGE = 7; + + // Horizontal Pod Autoscaling + HPA = 8; + + // Pod + POD = 9; + + // DaemonSet + DAEMONSET = 10; + + // Deployment + DEPLOYMENT = 11; + + // Statefulset + STATEFULSET = 12; + + // CADVISOR + CADVISOR = 13; + + // KUBELET + KUBELET = 14; + + // NVIDIA Data Center GPU Manager (DCGM) + DCGM = 15; + } + + // Select components to collect metrics. An empty set would disable all + // monitoring. + repeated Component enable_components = 1; +} + +// The datapath provider selects the implementation of the Kubernetes networking +// model for service resolution and network policy enforcement. +enum DatapathProvider { + // Default value. + DATAPATH_PROVIDER_UNSPECIFIED = 0; + + // Use the IPTables implementation based on kube-proxy. + LEGACY_DATAPATH = 1; + + // Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE + // Dataplane V2 + // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) + // for more. + ADVANCED_DATAPATH = 2; +} + +// Strategy used for node pool update. +enum NodePoolUpdateStrategy { + // Default value if unset. GKE internally defaults the update strategy to + // SURGE for unspecified strategies. + NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0; + + // blue-green upgrade. + BLUE_GREEN = 2; + + // SURGE is the traditional way of upgrade a node pool. + // max_surge and max_unavailable determines the level of upgrade parallelism. + SURGE = 3; +} + +// ManagedPrometheusConfig defines the configuration for +// Google Cloud Managed Service for Prometheus. +message ManagedPrometheusConfig { + // Enable Managed Collection. + bool enabled = 1; +} + +// Fleet is the fleet configuration for the cluster. +message Fleet { + // The Fleet host project(project ID or project number) where this cluster + // will be registered to. This field cannot be changed after the cluster has + // been registered. + string project = 1; + + // Output only. The full resource name of the registered fleet membership of + // the cluster, in the format + // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. + string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the cluster has been registered through the fleet + // API. + bool pre_registered = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Possible values for IP stack type +enum StackType { + // Default value, will be defaulted as IPV4 only + STACK_TYPE_UNSPECIFIED = 0; + + // Cluster is IPV4 only + IPV4 = 1; + + // Cluster can use both IPv4 and IPv6 + IPV4_IPV6 = 2; +} + +// Configuration for all of the cluster's control plane endpoints. +message ControlPlaneEndpointsConfig { + // Describes the configuration of a DNS endpoint. + message DNSEndpointConfig { + // Output only. The cluster's DNS endpoint configuration. + // A DNS format address. This is accessible from the public internet. + // Ex: uid.us-central1.gke.goog. + // Always present, but the behavior may change according to the value of + // [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]. + string endpoint = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Controls whether user traffic is allowed over this endpoint. Note that + // GCP-managed services may still use the endpoint even if this is false. + optional bool allow_external_traffic = 3; + } + + // IP endpoints configuration. + message IPEndpointsConfig { + // Controls whether to allow direct IP access. + optional bool enabled = 1; + + // Controls whether the control plane allows access through a public IP. + // It is invalid to specify both + // [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same + // time. + optional bool enable_public_endpoint = 2; + + // Controls whether the control plane's private endpoint is accessible from + // sources in other regions. + // It is invalid to specify both + // [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled] + // and this field at the same time. + optional bool global_access = 3; + + // Configuration of authorized networks. If enabled, restricts access to the + // control plane based on source IP. + // It is invalid to specify both + // [Cluster.masterAuthorizedNetworksConfig][] and this field at the same + // time. + MasterAuthorizedNetworksConfig authorized_networks_config = 4; + + // Output only. The external IP address of this cluster's control plane. + // Only populated if enabled. + string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The internal IP address of this cluster's control plane. + // Only populated if enabled. + string private_endpoint = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Subnet to provision the master's private endpoint during cluster + // creation. Specified in projects/*/regions/*/subnetworks/* format. It is + // invalid to specify both + // [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the + // same time. + string private_endpoint_subnetwork = 7; + } + + // DNS endpoint configuration. + DNSEndpointConfig dns_endpoint_config = 1; + + // IP endpoints configuration. + IPEndpointsConfig ip_endpoints_config = 3; +} + +// Possible values for IPv6 access type +enum IPv6AccessType { + // Default value, will be defaulted as type external. + IPV6_ACCESS_TYPE_UNSPECIFIED = 0; + + // Access type internal (all v6 addresses are internal IPs) + INTERNAL = 1; + + // Access type external (all v6 addresses are external IPs) + EXTERNAL = 2; +} + +// LocalNvmeSsdBlockConfig contains configuration for using raw-block local +// NVMe SSDs +message LocalNvmeSsdBlockConfig { + // Number of local NVMe SSDs to use. The limit for this value is dependent + // upon the maximum number of disk available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + // + // A zero (or unset) value has different meanings depending on machine type + // being used: + // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, + // zero (or unset) means to disable using local SSDs as ephemeral storage. + // 2. For Gen3 machines which dictate a specific number of local ssds, zero + // (or unset) means to use the default number of local ssds that goes with + // that machine type. For example, for a c3-standard-8-lssd machine, 2 local + // ssds would be provisioned. For c3-standard-8 (which doesn't support local + // ssds), 0 will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. + int32 local_ssd_count = 1; +} + +// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral +// storage using Local SSDs. +message EphemeralStorageLocalSsdConfig { + // Number of local SSDs to use to back ephemeral storage. Uses NVMe + // interfaces. + // + // A zero (or unset) value has different meanings depending on machine type + // being used: + // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, + // zero (or unset) means to disable using local SSDs as ephemeral storage. The + // limit for this value is dependent upon the maximum number of disk + // available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + // 2. For Gen3 machines which dictate a specific number of local ssds, zero + // (or unset) means to use the default number of local ssds that goes with + // that machine type. For example, for a c3-standard-8-lssd machine, 2 local + // ssds would be provisioned. For c3-standard-8 (which doesn't support local + // ssds), 0 will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. + int32 local_ssd_count = 1; +} + +// A map of resource manager tag keys and values to be attached to the nodes +// for managing Compute Engine firewalls using Network Firewall Policies. +// Tags must be according to specifications in +// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. +// A maximum of 5 tag key-value pairs can be specified. +// Existing tags will be replaced with new values. +message ResourceManagerTags { + // TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) + // 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` + // 2. `{org_id}/{tag_key_name}={tag_value_name}` + // 3. `{project_id}/{tag_key_name}={tag_value_name}` + map tags = 1; +} + +// EnterpriseConfig is the cluster enterprise configuration. +message EnterpriseConfig { + // Premium tiers for GKE Cluster. + enum ClusterTier { + // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. + CLUSTER_TIER_UNSPECIFIED = 0; + + // STANDARD indicates a standard GKE cluster. + STANDARD = 1; + + // ENTERPRISE indicates a GKE Enterprise cluster. + ENTERPRISE = 2; + } + + // Output only. cluster_tier indicates the effective tier of the cluster. + ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // desired_tier specifies the desired tier of the cluster. + ClusterTier desired_tier = 2; +} + +// SecretManagerConfig is config for secret manager enablement. +message SecretManagerConfig { + // Enable/Disable Secret Manager Config. + optional bool enabled = 1; +} + +// SecondaryBootDisk represents a persistent disk attached to a node +// with special configurations based on its mode. +message SecondaryBootDisk { + // Mode specifies how the secondary boot disk will be used. + // This triggers mode-specified logic in the control plane. + enum Mode { + // MODE_UNSPECIFIED is when mode is not set. + MODE_UNSPECIFIED = 0; + + // CONTAINER_IMAGE_CACHE is for using the secondary boot disk as + // a container image cache. + CONTAINER_IMAGE_CACHE = 1; + } + + // Disk mode (container image cache, etc.) + Mode mode = 1; + + // Fully-qualified resource ID for an existing disk image. + string disk_image = 2; +} + +// Options for in-transit encryption. +enum InTransitEncryptionConfig { + // Unspecified, will be inferred as default - + // IN_TRANSIT_ENCRYPTION_UNSPECIFIED. + IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0; + + // In-transit encryption is disabled. + IN_TRANSIT_ENCRYPTION_DISABLED = 1; + + // Data in-transit is encrypted using inter-node transparent encryption. + IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2; +} + +// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended +// in the future to define different options for updating secondary boot disks. +message SecondaryBootDiskUpdateStrategy {} diff --git a/owl-bot-staging/google-container/v1/protos/protos.d.ts b/owl-bot-staging/google-container/v1/protos/protos.d.ts new file mode 100644 index 00000000000..022106ec937 --- /dev/null +++ b/owl-bot-staging/google-container/v1/protos/protos.d.ts @@ -0,0 +1,32009 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace container. */ + namespace container { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a ClusterManager */ + class ClusterManager extends $protobuf.rpc.Service { + + /** + * Constructs a new ClusterManager 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 ClusterManager 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): ClusterManager; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListClustersResponse + */ + public listClusters(request: google.container.v1.IListClustersRequest, callback: google.container.v1.ClusterManager.ListClustersCallback): void; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @returns Promise + */ + public listClusters(request: google.container.v1.IListClustersRequest): Promise; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Cluster + */ + public getCluster(request: google.container.v1.IGetClusterRequest, callback: google.container.v1.ClusterManager.GetClusterCallback): void; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @returns Promise + */ + public getCluster(request: google.container.v1.IGetClusterRequest): Promise; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCluster(request: google.container.v1.ICreateClusterRequest, callback: google.container.v1.ClusterManager.CreateClusterCallback): void; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @returns Promise + */ + public createCluster(request: google.container.v1.ICreateClusterRequest): Promise; + + /** + * Calls UpdateCluster. + * @param request UpdateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCluster(request: google.container.v1.IUpdateClusterRequest, callback: google.container.v1.ClusterManager.UpdateClusterCallback): void; + + /** + * Calls UpdateCluster. + * @param request UpdateClusterRequest message or plain object + * @returns Promise + */ + public updateCluster(request: google.container.v1.IUpdateClusterRequest): Promise; + + /** + * Calls UpdateNodePool. + * @param request UpdateNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateNodePool(request: google.container.v1.IUpdateNodePoolRequest, callback: google.container.v1.ClusterManager.UpdateNodePoolCallback): void; + + /** + * Calls UpdateNodePool. + * @param request UpdateNodePoolRequest message or plain object + * @returns Promise + */ + public updateNodePool(request: google.container.v1.IUpdateNodePoolRequest): Promise; + + /** + * Calls SetNodePoolAutoscaling. + * @param request SetNodePoolAutoscalingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolAutoscaling(request: google.container.v1.ISetNodePoolAutoscalingRequest, callback: google.container.v1.ClusterManager.SetNodePoolAutoscalingCallback): void; + + /** + * Calls SetNodePoolAutoscaling. + * @param request SetNodePoolAutoscalingRequest message or plain object + * @returns Promise + */ + public setNodePoolAutoscaling(request: google.container.v1.ISetNodePoolAutoscalingRequest): Promise; + + /** + * Calls SetLoggingService. + * @param request SetLoggingServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLoggingService(request: google.container.v1.ISetLoggingServiceRequest, callback: google.container.v1.ClusterManager.SetLoggingServiceCallback): void; + + /** + * Calls SetLoggingService. + * @param request SetLoggingServiceRequest message or plain object + * @returns Promise + */ + public setLoggingService(request: google.container.v1.ISetLoggingServiceRequest): Promise; + + /** + * Calls SetMonitoringService. + * @param request SetMonitoringServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMonitoringService(request: google.container.v1.ISetMonitoringServiceRequest, callback: google.container.v1.ClusterManager.SetMonitoringServiceCallback): void; + + /** + * Calls SetMonitoringService. + * @param request SetMonitoringServiceRequest message or plain object + * @returns Promise + */ + public setMonitoringService(request: google.container.v1.ISetMonitoringServiceRequest): Promise; + + /** + * Calls SetAddonsConfig. + * @param request SetAddonsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setAddonsConfig(request: google.container.v1.ISetAddonsConfigRequest, callback: google.container.v1.ClusterManager.SetAddonsConfigCallback): void; + + /** + * Calls SetAddonsConfig. + * @param request SetAddonsConfigRequest message or plain object + * @returns Promise + */ + public setAddonsConfig(request: google.container.v1.ISetAddonsConfigRequest): Promise; + + /** + * Calls SetLocations. + * @param request SetLocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLocations(request: google.container.v1.ISetLocationsRequest, callback: google.container.v1.ClusterManager.SetLocationsCallback): void; + + /** + * Calls SetLocations. + * @param request SetLocationsRequest message or plain object + * @returns Promise + */ + public setLocations(request: google.container.v1.ISetLocationsRequest): Promise; + + /** + * Calls UpdateMaster. + * @param request UpdateMasterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMaster(request: google.container.v1.IUpdateMasterRequest, callback: google.container.v1.ClusterManager.UpdateMasterCallback): void; + + /** + * Calls UpdateMaster. + * @param request UpdateMasterRequest message or plain object + * @returns Promise + */ + public updateMaster(request: google.container.v1.IUpdateMasterRequest): Promise; + + /** + * Calls SetMasterAuth. + * @param request SetMasterAuthRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMasterAuth(request: google.container.v1.ISetMasterAuthRequest, callback: google.container.v1.ClusterManager.SetMasterAuthCallback): void; + + /** + * Calls SetMasterAuth. + * @param request SetMasterAuthRequest message or plain object + * @returns Promise + */ + public setMasterAuth(request: google.container.v1.ISetMasterAuthRequest): Promise; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteCluster(request: google.container.v1.IDeleteClusterRequest, callback: google.container.v1.ClusterManager.DeleteClusterCallback): void; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @returns Promise + */ + public deleteCluster(request: google.container.v1.IDeleteClusterRequest): Promise; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.container.v1.IListOperationsRequest, callback: google.container.v1.ClusterManager.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.container.v1.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.container.v1.IGetOperationRequest, callback: google.container.v1.ClusterManager.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.container.v1.IGetOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.container.v1.ICancelOperationRequest, callback: google.container.v1.ClusterManager.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.container.v1.ICancelOperationRequest): Promise; + + /** + * Calls GetServerConfig. + * @param request GetServerConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServerConfig + */ + public getServerConfig(request: google.container.v1.IGetServerConfigRequest, callback: google.container.v1.ClusterManager.GetServerConfigCallback): void; + + /** + * Calls GetServerConfig. + * @param request GetServerConfigRequest message or plain object + * @returns Promise + */ + public getServerConfig(request: google.container.v1.IGetServerConfigRequest): Promise; + + /** + * Calls GetJSONWebKeys. + * @param request GetJSONWebKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse + */ + public getJSONWebKeys(request: google.container.v1.IGetJSONWebKeysRequest, callback: google.container.v1.ClusterManager.GetJSONWebKeysCallback): void; + + /** + * Calls GetJSONWebKeys. + * @param request GetJSONWebKeysRequest message or plain object + * @returns Promise + */ + public getJSONWebKeys(request: google.container.v1.IGetJSONWebKeysRequest): Promise; + + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse + */ + public listNodePools(request: google.container.v1.IListNodePoolsRequest, callback: google.container.v1.ClusterManager.ListNodePoolsCallback): void; + + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @returns Promise + */ + public listNodePools(request: google.container.v1.IListNodePoolsRequest): Promise; + + /** + * Calls GetNodePool. + * @param request GetNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NodePool + */ + public getNodePool(request: google.container.v1.IGetNodePoolRequest, callback: google.container.v1.ClusterManager.GetNodePoolCallback): void; + + /** + * Calls GetNodePool. + * @param request GetNodePoolRequest message or plain object + * @returns Promise + */ + public getNodePool(request: google.container.v1.IGetNodePoolRequest): Promise; + + /** + * Calls CreateNodePool. + * @param request CreateNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createNodePool(request: google.container.v1.ICreateNodePoolRequest, callback: google.container.v1.ClusterManager.CreateNodePoolCallback): void; + + /** + * Calls CreateNodePool. + * @param request CreateNodePoolRequest message or plain object + * @returns Promise + */ + public createNodePool(request: google.container.v1.ICreateNodePoolRequest): Promise; + + /** + * Calls DeleteNodePool. + * @param request DeleteNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteNodePool(request: google.container.v1.IDeleteNodePoolRequest, callback: google.container.v1.ClusterManager.DeleteNodePoolCallback): void; + + /** + * Calls DeleteNodePool. + * @param request DeleteNodePoolRequest message or plain object + * @returns Promise + */ + public deleteNodePool(request: google.container.v1.IDeleteNodePoolRequest): Promise; + + /** + * Calls CompleteNodePoolUpgrade. + * @param request CompleteNodePoolUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public completeNodePoolUpgrade(request: google.container.v1.ICompleteNodePoolUpgradeRequest, callback: google.container.v1.ClusterManager.CompleteNodePoolUpgradeCallback): void; + + /** + * Calls CompleteNodePoolUpgrade. + * @param request CompleteNodePoolUpgradeRequest message or plain object + * @returns Promise + */ + public completeNodePoolUpgrade(request: google.container.v1.ICompleteNodePoolUpgradeRequest): Promise; + + /** + * Calls RollbackNodePoolUpgrade. + * @param request RollbackNodePoolUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rollbackNodePoolUpgrade(request: google.container.v1.IRollbackNodePoolUpgradeRequest, callback: google.container.v1.ClusterManager.RollbackNodePoolUpgradeCallback): void; + + /** + * Calls RollbackNodePoolUpgrade. + * @param request RollbackNodePoolUpgradeRequest message or plain object + * @returns Promise + */ + public rollbackNodePoolUpgrade(request: google.container.v1.IRollbackNodePoolUpgradeRequest): Promise; + + /** + * Calls SetNodePoolManagement. + * @param request SetNodePoolManagementRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolManagement(request: google.container.v1.ISetNodePoolManagementRequest, callback: google.container.v1.ClusterManager.SetNodePoolManagementCallback): void; + + /** + * Calls SetNodePoolManagement. + * @param request SetNodePoolManagementRequest message or plain object + * @returns Promise + */ + public setNodePoolManagement(request: google.container.v1.ISetNodePoolManagementRequest): Promise; + + /** + * Calls SetLabels. + * @param request SetLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLabels(request: google.container.v1.ISetLabelsRequest, callback: google.container.v1.ClusterManager.SetLabelsCallback): void; + + /** + * Calls SetLabels. + * @param request SetLabelsRequest message or plain object + * @returns Promise + */ + public setLabels(request: google.container.v1.ISetLabelsRequest): Promise; + + /** + * Calls SetLegacyAbac. + * @param request SetLegacyAbacRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLegacyAbac(request: google.container.v1.ISetLegacyAbacRequest, callback: google.container.v1.ClusterManager.SetLegacyAbacCallback): void; + + /** + * Calls SetLegacyAbac. + * @param request SetLegacyAbacRequest message or plain object + * @returns Promise + */ + public setLegacyAbac(request: google.container.v1.ISetLegacyAbacRequest): Promise; + + /** + * Calls StartIPRotation. + * @param request StartIPRotationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public startIPRotation(request: google.container.v1.IStartIPRotationRequest, callback: google.container.v1.ClusterManager.StartIPRotationCallback): void; + + /** + * Calls StartIPRotation. + * @param request StartIPRotationRequest message or plain object + * @returns Promise + */ + public startIPRotation(request: google.container.v1.IStartIPRotationRequest): Promise; + + /** + * Calls CompleteIPRotation. + * @param request CompleteIPRotationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public completeIPRotation(request: google.container.v1.ICompleteIPRotationRequest, callback: google.container.v1.ClusterManager.CompleteIPRotationCallback): void; + + /** + * Calls CompleteIPRotation. + * @param request CompleteIPRotationRequest message or plain object + * @returns Promise + */ + public completeIPRotation(request: google.container.v1.ICompleteIPRotationRequest): Promise; + + /** + * Calls SetNodePoolSize. + * @param request SetNodePoolSizeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolSize(request: google.container.v1.ISetNodePoolSizeRequest, callback: google.container.v1.ClusterManager.SetNodePoolSizeCallback): void; + + /** + * Calls SetNodePoolSize. + * @param request SetNodePoolSizeRequest message or plain object + * @returns Promise + */ + public setNodePoolSize(request: google.container.v1.ISetNodePoolSizeRequest): Promise; + + /** + * Calls SetNetworkPolicy. + * @param request SetNetworkPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNetworkPolicy(request: google.container.v1.ISetNetworkPolicyRequest, callback: google.container.v1.ClusterManager.SetNetworkPolicyCallback): void; + + /** + * Calls SetNetworkPolicy. + * @param request SetNetworkPolicyRequest message or plain object + * @returns Promise + */ + public setNetworkPolicy(request: google.container.v1.ISetNetworkPolicyRequest): Promise; + + /** + * Calls SetMaintenancePolicy. + * @param request SetMaintenancePolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMaintenancePolicy(request: google.container.v1.ISetMaintenancePolicyRequest, callback: google.container.v1.ClusterManager.SetMaintenancePolicyCallback): void; + + /** + * Calls SetMaintenancePolicy. + * @param request SetMaintenancePolicyRequest message or plain object + * @returns Promise + */ + public setMaintenancePolicy(request: google.container.v1.ISetMaintenancePolicyRequest): Promise; + + /** + * Calls ListUsableSubnetworks. + * @param request ListUsableSubnetworksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse + */ + public listUsableSubnetworks(request: google.container.v1.IListUsableSubnetworksRequest, callback: google.container.v1.ClusterManager.ListUsableSubnetworksCallback): void; + + /** + * Calls ListUsableSubnetworks. + * @param request ListUsableSubnetworksRequest message or plain object + * @returns Promise + */ + public listUsableSubnetworks(request: google.container.v1.IListUsableSubnetworksRequest): Promise; + + /** + * Calls CheckAutopilotCompatibility. + * @param request CheckAutopilotCompatibilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse + */ + public checkAutopilotCompatibility(request: google.container.v1.ICheckAutopilotCompatibilityRequest, callback: google.container.v1.ClusterManager.CheckAutopilotCompatibilityCallback): void; + + /** + * Calls CheckAutopilotCompatibility. + * @param request CheckAutopilotCompatibilityRequest message or plain object + * @returns Promise + */ + public checkAutopilotCompatibility(request: google.container.v1.ICheckAutopilotCompatibilityRequest): Promise; + } + + namespace ClusterManager { + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listClusters}. + * @param error Error, if any + * @param [response] ListClustersResponse + */ + type ListClustersCallback = (error: (Error|null), response?: google.container.v1.ListClustersResponse) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getCluster}. + * @param error Error, if any + * @param [response] Cluster + */ + type GetClusterCallback = (error: (Error|null), response?: google.container.v1.Cluster) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|createCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolAutoscaling}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolAutoscalingCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLoggingService}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLoggingServiceCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMonitoringService}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMonitoringServiceCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setAddonsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type SetAddonsConfigCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLocations}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLocationsCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateMaster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMasterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMasterAuth}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMasterAuthCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|deleteCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.container.v1.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getServerConfig}. + * @param error Error, if any + * @param [response] ServerConfig + */ + type GetServerConfigCallback = (error: (Error|null), response?: google.container.v1.ServerConfig) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getJSONWebKeys}. + * @param error Error, if any + * @param [response] GetJSONWebKeysResponse + */ + type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1.GetJSONWebKeysResponse) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listNodePools}. + * @param error Error, if any + * @param [response] ListNodePoolsResponse + */ + type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1.ListNodePoolsResponse) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getNodePool}. + * @param error Error, if any + * @param [response] NodePool + */ + type GetNodePoolCallback = (error: (Error|null), response?: google.container.v1.NodePool) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|createNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|deleteNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|completeNodePoolUpgrade}. + * @param error Error, if any + * @param [response] Empty + */ + type CompleteNodePoolUpgradeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|rollbackNodePoolUpgrade}. + * @param error Error, if any + * @param [response] Operation + */ + type RollbackNodePoolUpgradeCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolManagement}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolManagementCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLabels}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLabelsCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLegacyAbac}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLegacyAbacCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|startIPRotation}. + * @param error Error, if any + * @param [response] Operation + */ + type StartIPRotationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|completeIPRotation}. + * @param error Error, if any + * @param [response] Operation + */ + type CompleteIPRotationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolSize}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolSizeCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNetworkPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNetworkPolicyCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMaintenancePolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMaintenancePolicyCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listUsableSubnetworks}. + * @param error Error, if any + * @param [response] ListUsableSubnetworksResponse + */ + type ListUsableSubnetworksCallback = (error: (Error|null), response?: google.container.v1.ListUsableSubnetworksResponse) => void; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|checkAutopilotCompatibility}. + * @param error Error, if any + * @param [response] CheckAutopilotCompatibilityResponse + */ + type CheckAutopilotCompatibilityCallback = (error: (Error|null), response?: google.container.v1.CheckAutopilotCompatibilityResponse) => void; + } + + /** Properties of a LinuxNodeConfig. */ + interface ILinuxNodeConfig { + + /** LinuxNodeConfig sysctls */ + sysctls?: ({ [k: string]: string }|null); + + /** LinuxNodeConfig cgroupMode */ + cgroupMode?: (google.container.v1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1.LinuxNodeConfig.CgroupMode|null); + + /** LinuxNodeConfig hugepages */ + hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); + } + + /** Represents a LinuxNodeConfig. */ + class LinuxNodeConfig implements ILinuxNodeConfig { + + /** + * Constructs a new LinuxNodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILinuxNodeConfig); + + /** LinuxNodeConfig sysctls. */ + public sysctls: { [k: string]: string }; + + /** LinuxNodeConfig cgroupMode. */ + public cgroupMode: (google.container.v1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1.LinuxNodeConfig.CgroupMode); + + /** LinuxNodeConfig hugepages. */ + public hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); + + /** LinuxNodeConfig _hugepages. */ + public _hugepages?: "hugepages"; + + /** + * Creates a new LinuxNodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LinuxNodeConfig instance + */ + public static create(properties?: google.container.v1.ILinuxNodeConfig): google.container.v1.LinuxNodeConfig; + + /** + * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. + * @param message LinuxNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. + * @param message LinuxNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LinuxNodeConfig; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LinuxNodeConfig; + + /** + * Verifies a LinuxNodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LinuxNodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LinuxNodeConfig; + + /** + * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. + * @param message LinuxNodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LinuxNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LinuxNodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinuxNodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LinuxNodeConfig { + + /** CgroupMode enum. */ + enum CgroupMode { + CGROUP_MODE_UNSPECIFIED = 0, + CGROUP_MODE_V1 = 1, + CGROUP_MODE_V2 = 2 + } + + /** Properties of a HugepagesConfig. */ + interface IHugepagesConfig { + + /** HugepagesConfig hugepageSize2m */ + hugepageSize2m?: (number|null); + + /** HugepagesConfig hugepageSize1g */ + hugepageSize1g?: (number|null); + } + + /** Represents a HugepagesConfig. */ + class HugepagesConfig implements IHugepagesConfig { + + /** + * Constructs a new HugepagesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.LinuxNodeConfig.IHugepagesConfig); + + /** HugepagesConfig hugepageSize2m. */ + public hugepageSize2m?: (number|null); + + /** HugepagesConfig hugepageSize1g. */ + public hugepageSize1g?: (number|null); + + /** HugepagesConfig _hugepageSize2m. */ + public _hugepageSize2m?: "hugepageSize2m"; + + /** HugepagesConfig _hugepageSize1g. */ + public _hugepageSize1g?: "hugepageSize1g"; + + /** + * Creates a new HugepagesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns HugepagesConfig instance + */ + public static create(properties?: google.container.v1.LinuxNodeConfig.IHugepagesConfig): google.container.v1.LinuxNodeConfig.HugepagesConfig; + + /** + * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @param message HugepagesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @param message HugepagesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LinuxNodeConfig.HugepagesConfig; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LinuxNodeConfig.HugepagesConfig; + + /** + * Verifies a HugepagesConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HugepagesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LinuxNodeConfig.HugepagesConfig; + + /** + * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. + * @param message HugepagesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LinuxNodeConfig.HugepagesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HugepagesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HugepagesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a WindowsNodeConfig. */ + interface IWindowsNodeConfig { + + /** WindowsNodeConfig osVersion */ + osVersion?: (google.container.v1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1.WindowsNodeConfig.OSVersion|null); + } + + /** Represents a WindowsNodeConfig. */ + class WindowsNodeConfig implements IWindowsNodeConfig { + + /** + * Constructs a new WindowsNodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IWindowsNodeConfig); + + /** WindowsNodeConfig osVersion. */ + public osVersion: (google.container.v1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1.WindowsNodeConfig.OSVersion); + + /** + * Creates a new WindowsNodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsNodeConfig instance + */ + public static create(properties?: google.container.v1.IWindowsNodeConfig): google.container.v1.WindowsNodeConfig; + + /** + * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. + * @param message WindowsNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. + * @param message WindowsNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WindowsNodeConfig; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WindowsNodeConfig; + + /** + * Verifies a WindowsNodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsNodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.WindowsNodeConfig; + + /** + * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. + * @param message WindowsNodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.WindowsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsNodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsNodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WindowsNodeConfig { + + /** OSVersion enum. */ + enum OSVersion { + OS_VERSION_UNSPECIFIED = 0, + OS_VERSION_LTSC2019 = 1, + OS_VERSION_LTSC2022 = 2 + } + } + + /** Properties of a NodeKubeletConfig. */ + interface INodeKubeletConfig { + + /** NodeKubeletConfig cpuManagerPolicy */ + cpuManagerPolicy?: (string|null); + + /** NodeKubeletConfig cpuCfsQuota */ + cpuCfsQuota?: (google.protobuf.IBoolValue|null); + + /** NodeKubeletConfig cpuCfsQuotaPeriod */ + cpuCfsQuotaPeriod?: (string|null); + + /** NodeKubeletConfig podPidsLimit */ + podPidsLimit?: (number|Long|string|null); + + /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled */ + insecureKubeletReadonlyPortEnabled?: (boolean|null); + } + + /** Represents a NodeKubeletConfig. */ + class NodeKubeletConfig implements INodeKubeletConfig { + + /** + * Constructs a new NodeKubeletConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeKubeletConfig); + + /** NodeKubeletConfig cpuManagerPolicy. */ + public cpuManagerPolicy: string; + + /** NodeKubeletConfig cpuCfsQuota. */ + public cpuCfsQuota?: (google.protobuf.IBoolValue|null); + + /** NodeKubeletConfig cpuCfsQuotaPeriod. */ + public cpuCfsQuotaPeriod: string; + + /** NodeKubeletConfig podPidsLimit. */ + public podPidsLimit: (number|Long|string); + + /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled. */ + public insecureKubeletReadonlyPortEnabled?: (boolean|null); + + /** NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. */ + public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; + + /** + * Creates a new NodeKubeletConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeKubeletConfig instance + */ + public static create(properties?: google.container.v1.INodeKubeletConfig): google.container.v1.NodeKubeletConfig; + + /** + * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. + * @param message NodeKubeletConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. + * @param message NodeKubeletConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeKubeletConfig; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeKubeletConfig; + + /** + * Verifies a NodeKubeletConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeKubeletConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeKubeletConfig; + + /** + * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. + * @param message NodeKubeletConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeKubeletConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeKubeletConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeKubeletConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig metadata */ + metadata?: ({ [k: string]: string }|null); + + /** NodeConfig imageType */ + imageType?: (string|null); + + /** NodeConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** NodeConfig localSsdCount */ + localSsdCount?: (number|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig preemptible */ + preemptible?: (boolean|null); + + /** NodeConfig accelerators */ + accelerators?: (google.container.v1.IAcceleratorConfig[]|null); + + /** NodeConfig diskType */ + diskType?: (string|null); + + /** NodeConfig minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** NodeConfig workloadMetadataConfig */ + workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); + + /** NodeConfig taints */ + taints?: (google.container.v1.INodeTaint[]|null); + + /** NodeConfig sandboxConfig */ + sandboxConfig?: (google.container.v1.ISandboxConfig|null); + + /** NodeConfig nodeGroup */ + nodeGroup?: (string|null); + + /** NodeConfig reservationAffinity */ + reservationAffinity?: (google.container.v1.IReservationAffinity|null); + + /** NodeConfig shieldedInstanceConfig */ + shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); + + /** NodeConfig linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** NodeConfig kubeletConfig */ + kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** NodeConfig bootDiskKmsKey */ + bootDiskKmsKey?: (string|null); + + /** NodeConfig gcfsConfig */ + gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** NodeConfig advancedMachineFeatures */ + advancedMachineFeatures?: (google.container.v1.IAdvancedMachineFeatures|null); + + /** NodeConfig gvnic */ + gvnic?: (google.container.v1.IVirtualNIC|null); + + /** NodeConfig spot */ + spot?: (boolean|null); + + /** NodeConfig confidentialNodes */ + confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** NodeConfig fastSocket */ + fastSocket?: (google.container.v1.IFastSocket|null); + + /** NodeConfig resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** NodeConfig loggingConfig */ + loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** NodeConfig windowsNodeConfig */ + windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); + + /** NodeConfig localNvmeSsdBlockConfig */ + localNvmeSsdBlockConfig?: (google.container.v1.ILocalNvmeSsdBlockConfig|null); + + /** NodeConfig ephemeralStorageLocalSsdConfig */ + ephemeralStorageLocalSsdConfig?: (google.container.v1.IEphemeralStorageLocalSsdConfig|null); + + /** NodeConfig soleTenantConfig */ + soleTenantConfig?: (google.container.v1.ISoleTenantConfig|null); + + /** NodeConfig containerdConfig */ + containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** NodeConfig resourceManagerTags */ + resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodeConfig enableConfidentialStorage */ + enableConfidentialStorage?: (boolean|null); + + /** NodeConfig secondaryBootDisks */ + secondaryBootDisks?: (google.container.v1.ISecondaryBootDisk[]|null); + + /** NodeConfig storagePools */ + storagePools?: (string[]|null); + + /** NodeConfig secondaryBootDiskUpdateStrategy */ + secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + + /** NodeConfig localSsdEncryptionMode */ + localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); + + /** NodeConfig effectiveCgroupMode */ + effectiveCgroupMode?: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeConfig); + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig metadata. */ + public metadata: { [k: string]: string }; + + /** NodeConfig imageType. */ + public imageType: string; + + /** NodeConfig labels. */ + public labels: { [k: string]: string }; + + /** NodeConfig localSsdCount. */ + public localSsdCount: number; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig preemptible. */ + public preemptible: boolean; + + /** NodeConfig accelerators. */ + public accelerators: google.container.v1.IAcceleratorConfig[]; + + /** NodeConfig diskType. */ + public diskType: string; + + /** NodeConfig minCpuPlatform. */ + public minCpuPlatform: string; + + /** NodeConfig workloadMetadataConfig. */ + public workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); + + /** NodeConfig taints. */ + public taints: google.container.v1.INodeTaint[]; + + /** NodeConfig sandboxConfig. */ + public sandboxConfig?: (google.container.v1.ISandboxConfig|null); + + /** NodeConfig nodeGroup. */ + public nodeGroup: string; + + /** NodeConfig reservationAffinity. */ + public reservationAffinity?: (google.container.v1.IReservationAffinity|null); + + /** NodeConfig shieldedInstanceConfig. */ + public shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); + + /** NodeConfig linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** NodeConfig kubeletConfig. */ + public kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** NodeConfig bootDiskKmsKey. */ + public bootDiskKmsKey: string; + + /** NodeConfig gcfsConfig. */ + public gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** NodeConfig advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.container.v1.IAdvancedMachineFeatures|null); + + /** NodeConfig gvnic. */ + public gvnic?: (google.container.v1.IVirtualNIC|null); + + /** NodeConfig spot. */ + public spot: boolean; + + /** NodeConfig confidentialNodes. */ + public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** NodeConfig fastSocket. */ + public fastSocket?: (google.container.v1.IFastSocket|null); + + /** NodeConfig resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** NodeConfig loggingConfig. */ + public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** NodeConfig windowsNodeConfig. */ + public windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); + + /** NodeConfig localNvmeSsdBlockConfig. */ + public localNvmeSsdBlockConfig?: (google.container.v1.ILocalNvmeSsdBlockConfig|null); + + /** NodeConfig ephemeralStorageLocalSsdConfig. */ + public ephemeralStorageLocalSsdConfig?: (google.container.v1.IEphemeralStorageLocalSsdConfig|null); + + /** NodeConfig soleTenantConfig. */ + public soleTenantConfig?: (google.container.v1.ISoleTenantConfig|null); + + /** NodeConfig containerdConfig. */ + public containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** NodeConfig resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodeConfig enableConfidentialStorage. */ + public enableConfidentialStorage: boolean; + + /** NodeConfig secondaryBootDisks. */ + public secondaryBootDisks: google.container.v1.ISecondaryBootDisk[]; + + /** NodeConfig storagePools. */ + public storagePools: string[]; + + /** NodeConfig secondaryBootDiskUpdateStrategy. */ + public secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + + /** NodeConfig localSsdEncryptionMode. */ + public localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); + + /** NodeConfig effectiveCgroupMode. */ + public effectiveCgroupMode: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode); + + /** NodeConfig _fastSocket. */ + public _fastSocket?: "fastSocket"; + + /** NodeConfig _secondaryBootDiskUpdateStrategy. */ + public _secondaryBootDiskUpdateStrategy?: "secondaryBootDiskUpdateStrategy"; + + /** NodeConfig _localSsdEncryptionMode. */ + public _localSsdEncryptionMode?: "localSsdEncryptionMode"; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.container.v1.INodeConfig): google.container.v1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeConfig { + + /** LocalSsdEncryptionMode enum. */ + enum LocalSsdEncryptionMode { + LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0, + STANDARD_ENCRYPTION = 1, + EPHEMERAL_KEY_ENCRYPTION = 2 + } + + /** EffectiveCgroupMode enum. */ + enum EffectiveCgroupMode { + EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0, + EFFECTIVE_CGROUP_MODE_V1 = 1, + EFFECTIVE_CGROUP_MODE_V2 = 2 + } + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|Long|string|null); + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|Long|string|null); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.container.v1.IAdvancedMachineFeatures): google.container.v1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeNetworkConfig. */ + interface INodeNetworkConfig { + + /** NodeNetworkConfig createPodRange */ + createPodRange?: (boolean|null); + + /** NodeNetworkConfig podRange */ + podRange?: (string|null); + + /** NodeNetworkConfig podIpv4CidrBlock */ + podIpv4CidrBlock?: (string|null); + + /** NodeNetworkConfig enablePrivateNodes */ + enablePrivateNodes?: (boolean|null); + + /** NodeNetworkConfig networkPerformanceConfig */ + networkPerformanceConfig?: (google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null); + + /** NodeNetworkConfig podCidrOverprovisionConfig */ + podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); + + /** NodeNetworkConfig additionalNodeNetworkConfigs */ + additionalNodeNetworkConfigs?: (google.container.v1.IAdditionalNodeNetworkConfig[]|null); + + /** NodeNetworkConfig additionalPodNetworkConfigs */ + additionalPodNetworkConfigs?: (google.container.v1.IAdditionalPodNetworkConfig[]|null); + + /** NodeNetworkConfig podIpv4RangeUtilization */ + podIpv4RangeUtilization?: (number|null); + } + + /** Represents a NodeNetworkConfig. */ + class NodeNetworkConfig implements INodeNetworkConfig { + + /** + * Constructs a new NodeNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeNetworkConfig); + + /** NodeNetworkConfig createPodRange. */ + public createPodRange: boolean; + + /** NodeNetworkConfig podRange. */ + public podRange: string; + + /** NodeNetworkConfig podIpv4CidrBlock. */ + public podIpv4CidrBlock: string; + + /** NodeNetworkConfig enablePrivateNodes. */ + public enablePrivateNodes?: (boolean|null); + + /** NodeNetworkConfig networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null); + + /** NodeNetworkConfig podCidrOverprovisionConfig. */ + public podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); + + /** NodeNetworkConfig additionalNodeNetworkConfigs. */ + public additionalNodeNetworkConfigs: google.container.v1.IAdditionalNodeNetworkConfig[]; + + /** NodeNetworkConfig additionalPodNetworkConfigs. */ + public additionalPodNetworkConfigs: google.container.v1.IAdditionalPodNetworkConfig[]; + + /** NodeNetworkConfig podIpv4RangeUtilization. */ + public podIpv4RangeUtilization: number; + + /** NodeNetworkConfig _enablePrivateNodes. */ + public _enablePrivateNodes?: "enablePrivateNodes"; + + /** NodeNetworkConfig _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** + * Creates a new NodeNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeNetworkConfig instance + */ + public static create(properties?: google.container.v1.INodeNetworkConfig): google.container.v1.NodeNetworkConfig; + + /** + * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. + * @param message NodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. + * @param message NodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeNetworkConfig; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeNetworkConfig; + + /** + * Verifies a NodeNetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeNetworkConfig; + + /** + * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. + * @param message NodeNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeNetworkConfig { + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + TIER_1 = 1 + } + } + } + + /** Properties of an AdditionalNodeNetworkConfig. */ + interface IAdditionalNodeNetworkConfig { + + /** AdditionalNodeNetworkConfig network */ + network?: (string|null); + + /** AdditionalNodeNetworkConfig subnetwork */ + subnetwork?: (string|null); + } + + /** Represents an AdditionalNodeNetworkConfig. */ + class AdditionalNodeNetworkConfig implements IAdditionalNodeNetworkConfig { + + /** + * Constructs a new AdditionalNodeNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdditionalNodeNetworkConfig); + + /** AdditionalNodeNetworkConfig network. */ + public network: string; + + /** AdditionalNodeNetworkConfig subnetwork. */ + public subnetwork: string; + + /** + * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalNodeNetworkConfig instance + */ + public static create(properties?: google.container.v1.IAdditionalNodeNetworkConfig): google.container.v1.AdditionalNodeNetworkConfig; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @param message AdditionalNodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @param message AdditionalNodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalNodeNetworkConfig; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalNodeNetworkConfig; + + /** + * Verifies an AdditionalNodeNetworkConfig message. + * @param message Plain 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 AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalNodeNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalNodeNetworkConfig; + + /** + * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. + * @param message AdditionalNodeNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdditionalNodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalNodeNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalNodeNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdditionalPodNetworkConfig. */ + interface IAdditionalPodNetworkConfig { + + /** AdditionalPodNetworkConfig subnetwork */ + subnetwork?: (string|null); + + /** AdditionalPodNetworkConfig secondaryPodRange */ + secondaryPodRange?: (string|null); + + /** AdditionalPodNetworkConfig maxPodsPerNode */ + maxPodsPerNode?: (google.container.v1.IMaxPodsConstraint|null); + } + + /** Represents an AdditionalPodNetworkConfig. */ + class AdditionalPodNetworkConfig implements IAdditionalPodNetworkConfig { + + /** + * Constructs a new AdditionalPodNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdditionalPodNetworkConfig); + + /** AdditionalPodNetworkConfig subnetwork. */ + public subnetwork: string; + + /** AdditionalPodNetworkConfig secondaryPodRange. */ + public secondaryPodRange: string; + + /** AdditionalPodNetworkConfig maxPodsPerNode. */ + public maxPodsPerNode?: (google.container.v1.IMaxPodsConstraint|null); + + /** AdditionalPodNetworkConfig _maxPodsPerNode. */ + public _maxPodsPerNode?: "maxPodsPerNode"; + + /** + * Creates a new AdditionalPodNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalPodNetworkConfig instance + */ + public static create(properties?: google.container.v1.IAdditionalPodNetworkConfig): google.container.v1.AdditionalPodNetworkConfig; + + /** + * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. + * @param message AdditionalPodNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. + * @param message AdditionalPodNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalPodNetworkConfig; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalPodNetworkConfig; + + /** + * Verifies an AdditionalPodNetworkConfig message. + * @param message Plain 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 AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalPodNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalPodNetworkConfig; + + /** + * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. + * @param message AdditionalPodNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdditionalPodNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalPodNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalPodNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShieldedInstanceConfig. */ + interface IShieldedInstanceConfig { + + /** ShieldedInstanceConfig enableSecureBoot */ + enableSecureBoot?: (boolean|null); + + /** ShieldedInstanceConfig enableIntegrityMonitoring */ + enableIntegrityMonitoring?: (boolean|null); + } + + /** Represents a ShieldedInstanceConfig. */ + class ShieldedInstanceConfig implements IShieldedInstanceConfig { + + /** + * Constructs a new ShieldedInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IShieldedInstanceConfig); + + /** ShieldedInstanceConfig enableSecureBoot. */ + public enableSecureBoot: boolean; + + /** ShieldedInstanceConfig enableIntegrityMonitoring. */ + public enableIntegrityMonitoring: boolean; + + /** + * Creates a new ShieldedInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ShieldedInstanceConfig instance + */ + public static create(properties?: google.container.v1.IShieldedInstanceConfig): google.container.v1.ShieldedInstanceConfig; + + /** + * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. + * @param message ShieldedInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. + * @param message ShieldedInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ShieldedInstanceConfig; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ShieldedInstanceConfig; + + /** + * Verifies a ShieldedInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShieldedInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ShieldedInstanceConfig; + + /** + * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. + * @param message ShieldedInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ShieldedInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShieldedInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShieldedInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SandboxConfig. */ + interface ISandboxConfig { + + /** SandboxConfig type */ + type?: (google.container.v1.SandboxConfig.Type|keyof typeof google.container.v1.SandboxConfig.Type|null); + } + + /** Represents a SandboxConfig. */ + class SandboxConfig implements ISandboxConfig { + + /** + * Constructs a new SandboxConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISandboxConfig); + + /** SandboxConfig type. */ + public type: (google.container.v1.SandboxConfig.Type|keyof typeof google.container.v1.SandboxConfig.Type); + + /** + * Creates a new SandboxConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SandboxConfig instance + */ + public static create(properties?: google.container.v1.ISandboxConfig): google.container.v1.SandboxConfig; + + /** + * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. + * @param message SandboxConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. + * @param message SandboxConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SandboxConfig; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SandboxConfig; + + /** + * Verifies a SandboxConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SandboxConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SandboxConfig; + + /** + * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. + * @param message SandboxConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SandboxConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SandboxConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SandboxConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SandboxConfig { + + /** Type enum. */ + enum Type { + UNSPECIFIED = 0, + GVISOR = 1 + } + } + + /** Properties of a GcfsConfig. */ + interface IGcfsConfig { + + /** GcfsConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcfsConfig. */ + class GcfsConfig implements IGcfsConfig { + + /** + * Constructs a new GcfsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGcfsConfig); + + /** GcfsConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcfsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcfsConfig instance + */ + public static create(properties?: google.container.v1.IGcfsConfig): google.container.v1.GcfsConfig; + + /** + * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. + * @param message GcfsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. + * @param message GcfsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcfsConfig; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcfsConfig; + + /** + * Verifies a GcfsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcfsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GcfsConfig; + + /** + * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. + * @param message GcfsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GcfsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcfsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcfsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservationAffinity. */ + interface IReservationAffinity { + + /** ReservationAffinity consumeReservationType */ + consumeReservationType?: (google.container.v1.ReservationAffinity.Type|keyof typeof google.container.v1.ReservationAffinity.Type|null); + + /** ReservationAffinity key */ + key?: (string|null); + + /** ReservationAffinity values */ + values?: (string[]|null); + } + + /** Represents a ReservationAffinity. */ + class ReservationAffinity implements IReservationAffinity { + + /** + * Constructs a new ReservationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IReservationAffinity); + + /** ReservationAffinity consumeReservationType. */ + public consumeReservationType: (google.container.v1.ReservationAffinity.Type|keyof typeof google.container.v1.ReservationAffinity.Type); + + /** ReservationAffinity key. */ + public key: string; + + /** ReservationAffinity values. */ + public values: string[]; + + /** + * Creates a new ReservationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservationAffinity instance + */ + public static create(properties?: google.container.v1.IReservationAffinity): google.container.v1.ReservationAffinity; + + /** + * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. + * @param message ReservationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. + * @param message ReservationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ReservationAffinity; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ReservationAffinity; + + /** + * Verifies a ReservationAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ReservationAffinity; + + /** + * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. + * @param message ReservationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ReservationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReservationAffinity { + + /** Type enum. */ + enum Type { + UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a SoleTenantConfig. */ + interface ISoleTenantConfig { + + /** SoleTenantConfig nodeAffinities */ + nodeAffinities?: (google.container.v1.SoleTenantConfig.INodeAffinity[]|null); + } + + /** Represents a SoleTenantConfig. */ + class SoleTenantConfig implements ISoleTenantConfig { + + /** + * Constructs a new SoleTenantConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISoleTenantConfig); + + /** SoleTenantConfig nodeAffinities. */ + public nodeAffinities: google.container.v1.SoleTenantConfig.INodeAffinity[]; + + /** + * Creates a new SoleTenantConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoleTenantConfig instance + */ + public static create(properties?: google.container.v1.ISoleTenantConfig): google.container.v1.SoleTenantConfig; + + /** + * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. + * @param message SoleTenantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. + * @param message SoleTenantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SoleTenantConfig; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SoleTenantConfig; + + /** + * Verifies a SoleTenantConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoleTenantConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SoleTenantConfig; + + /** + * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. + * @param message SoleTenantConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SoleTenantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoleTenantConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoleTenantConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SoleTenantConfig { + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.container.v1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1.SoleTenantConfig.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.SoleTenantConfig.INodeAffinity); + + /** NodeAffinity key. */ + public key: string; + + /** NodeAffinity operator. */ + public operator: (google.container.v1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1.SoleTenantConfig.NodeAffinity.Operator); + + /** NodeAffinity values. */ + public values: string[]; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.container.v1.SoleTenantConfig.INodeAffinity): google.container.v1.SoleTenantConfig.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SoleTenantConfig.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SoleTenantConfig.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SoleTenantConfig.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SoleTenantConfig.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + } + + /** Properties of a ContainerdConfig. */ + interface IContainerdConfig { + + /** ContainerdConfig privateRegistryAccessConfig */ + privateRegistryAccessConfig?: (google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null); + } + + /** Represents a ContainerdConfig. */ + class ContainerdConfig implements IContainerdConfig { + + /** + * Constructs a new ContainerdConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IContainerdConfig); + + /** ContainerdConfig privateRegistryAccessConfig. */ + public privateRegistryAccessConfig?: (google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null); + + /** + * Creates a new ContainerdConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerdConfig instance + */ + public static create(properties?: google.container.v1.IContainerdConfig): google.container.v1.ContainerdConfig; + + /** + * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. + * @param message ContainerdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. + * @param message ContainerdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig; + + /** + * Verifies a ContainerdConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerdConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig; + + /** + * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. + * @param message ContainerdConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ContainerdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContainerdConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContainerdConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContainerdConfig { + + /** Properties of a PrivateRegistryAccessConfig. */ + interface IPrivateRegistryAccessConfig { + + /** PrivateRegistryAccessConfig enabled */ + enabled?: (boolean|null); + + /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig */ + certificateAuthorityDomainConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]|null); + } + + /** Represents a PrivateRegistryAccessConfig. */ + class PrivateRegistryAccessConfig implements IPrivateRegistryAccessConfig { + + /** + * Constructs a new PrivateRegistryAccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig); + + /** PrivateRegistryAccessConfig enabled. */ + public enabled: boolean; + + /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig. */ + public certificateAuthorityDomainConfig: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]; + + /** + * Creates a new PrivateRegistryAccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateRegistryAccessConfig instance + */ + public static create(properties?: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @param message PrivateRegistryAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @param message PrivateRegistryAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Verifies a PrivateRegistryAccessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateRegistryAccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. + * @param message PrivateRegistryAccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateRegistryAccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateRegistryAccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivateRegistryAccessConfig { + + /** Properties of a CertificateAuthorityDomainConfig. */ + interface ICertificateAuthorityDomainConfig { + + /** CertificateAuthorityDomainConfig fqdns */ + fqdns?: (string[]|null); + + /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig */ + gcpSecretManagerCertificateConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); + } + + /** Represents a CertificateAuthorityDomainConfig. */ + class CertificateAuthorityDomainConfig implements ICertificateAuthorityDomainConfig { + + /** + * Constructs a new CertificateAuthorityDomainConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig); + + /** CertificateAuthorityDomainConfig fqdns. */ + public fqdns: string[]; + + /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. */ + public gcpSecretManagerCertificateConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); + + /** CertificateAuthorityDomainConfig certificateConfig. */ + public certificateConfig?: "gcpSecretManagerCertificateConfig"; + + /** + * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthorityDomainConfig instance + */ + public static create(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @param message CertificateAuthorityDomainConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @param message CertificateAuthorityDomainConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Verifies a CertificateAuthorityDomainConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthorityDomainConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. + * @param message CertificateAuthorityDomainConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthorityDomainConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateAuthorityDomainConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CertificateAuthorityDomainConfig { + + /** Properties of a GCPSecretManagerCertificateConfig. */ + interface IGCPSecretManagerCertificateConfig { + + /** GCPSecretManagerCertificateConfig secretUri */ + secretUri?: (string|null); + } + + /** Represents a GCPSecretManagerCertificateConfig. */ + class GCPSecretManagerCertificateConfig implements IGCPSecretManagerCertificateConfig { + + /** + * Constructs a new GCPSecretManagerCertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig); + + /** GCPSecretManagerCertificateConfig secretUri. */ + public secretUri: string; + + /** + * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPSecretManagerCertificateConfig instance + */ + public static create(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @param message GCPSecretManagerCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @param message GCPSecretManagerCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Verifies a GCPSecretManagerCertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPSecretManagerCertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. + * @param message GCPSecretManagerCertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPSecretManagerCertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPSecretManagerCertificateConfig + * @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.container.v1.NodeTaint.Effect|keyof typeof google.container.v1.NodeTaint.Effect|null); + } + + /** Represents a NodeTaint. */ + class NodeTaint implements INodeTaint { + + /** + * Constructs a new NodeTaint. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeTaint); + + /** NodeTaint key. */ + public key: string; + + /** NodeTaint value. */ + public value: string; + + /** NodeTaint effect. */ + public effect: (google.container.v1.NodeTaint.Effect|keyof typeof google.container.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.container.v1.INodeTaint): google.container.v1.NodeTaint; + + /** + * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.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.container.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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 NodeTaints. */ + interface INodeTaints { + + /** NodeTaints taints */ + taints?: (google.container.v1.INodeTaint[]|null); + } + + /** Represents a NodeTaints. */ + class NodeTaints implements INodeTaints { + + /** + * Constructs a new NodeTaints. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeTaints); + + /** NodeTaints taints. */ + public taints: google.container.v1.INodeTaint[]; + + /** + * Creates a new NodeTaints instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeTaints instance + */ + public static create(properties?: google.container.v1.INodeTaints): google.container.v1.NodeTaints; + + /** + * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. + * @param message NodeTaints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. + * @param message NodeTaints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeTaints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeTaints; + + /** + * Decodes a NodeTaints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeTaints; + + /** + * Verifies a NodeTaints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeTaints + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeTaints; + + /** + * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. + * @param message NodeTaints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeTaints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeTaints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeTaints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeLabels. */ + interface INodeLabels { + + /** NodeLabels labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a NodeLabels. */ + class NodeLabels implements INodeLabels { + + /** + * Constructs a new NodeLabels. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeLabels); + + /** NodeLabels labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new NodeLabels instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeLabels instance + */ + public static create(properties?: google.container.v1.INodeLabels): google.container.v1.NodeLabels; + + /** + * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. + * @param message NodeLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. + * @param message NodeLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeLabels message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeLabels; + + /** + * Decodes a NodeLabels message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeLabels; + + /** + * Verifies a NodeLabels message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeLabels + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeLabels; + + /** + * Creates a plain object from a NodeLabels message. Also converts values to other types if specified. + * @param message NodeLabels + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeLabels to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeLabels + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceLabels. */ + interface IResourceLabels { + + /** ResourceLabels labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ResourceLabels. */ + class ResourceLabels implements IResourceLabels { + + /** + * Constructs a new ResourceLabels. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IResourceLabels); + + /** ResourceLabels labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new ResourceLabels instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceLabels instance + */ + public static create(properties?: google.container.v1.IResourceLabels): google.container.v1.ResourceLabels; + + /** + * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. + * @param message ResourceLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. + * @param message ResourceLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceLabels; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceLabels; + + /** + * Verifies a ResourceLabels message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceLabels + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceLabels; + + /** + * Creates a plain object from a ResourceLabels message. Also converts values to other types if specified. + * @param message ResourceLabels + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceLabels to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceLabels + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkTags. */ + interface INetworkTags { + + /** NetworkTags tags */ + tags?: (string[]|null); + } + + /** Represents a NetworkTags. */ + class NetworkTags implements INetworkTags { + + /** + * Constructs a new NetworkTags. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INetworkTags); + + /** NetworkTags tags. */ + public tags: string[]; + + /** + * Creates a new NetworkTags instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkTags instance + */ + public static create(properties?: google.container.v1.INetworkTags): google.container.v1.NetworkTags; + + /** + * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. + * @param message NetworkTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. + * @param message NetworkTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkTags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkTags; + + /** + * Decodes a NetworkTags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkTags; + + /** + * Verifies a NetworkTags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkTags + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkTags; + + /** + * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. + * @param message NetworkTags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NetworkTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkTags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkTags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MasterAuth. */ + interface IMasterAuth { + + /** MasterAuth username */ + username?: (string|null); + + /** MasterAuth password */ + password?: (string|null); + + /** MasterAuth clientCertificateConfig */ + clientCertificateConfig?: (google.container.v1.IClientCertificateConfig|null); + + /** MasterAuth clusterCaCertificate */ + clusterCaCertificate?: (string|null); + + /** MasterAuth clientCertificate */ + clientCertificate?: (string|null); + + /** MasterAuth clientKey */ + clientKey?: (string|null); + } + + /** Represents a MasterAuth. */ + class MasterAuth implements IMasterAuth { + + /** + * Constructs a new MasterAuth. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMasterAuth); + + /** MasterAuth username. */ + public username: string; + + /** MasterAuth password. */ + public password: string; + + /** MasterAuth clientCertificateConfig. */ + public clientCertificateConfig?: (google.container.v1.IClientCertificateConfig|null); + + /** MasterAuth clusterCaCertificate. */ + public clusterCaCertificate: string; + + /** MasterAuth clientCertificate. */ + public clientCertificate: string; + + /** MasterAuth clientKey. */ + public clientKey: string; + + /** + * Creates a new MasterAuth instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuth instance + */ + public static create(properties?: google.container.v1.IMasterAuth): google.container.v1.MasterAuth; + + /** + * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. + * @param message MasterAuth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. + * @param message MasterAuth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuth; + + /** + * Decodes a MasterAuth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuth; + + /** + * Verifies a MasterAuth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuth + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuth; + + /** + * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. + * @param message MasterAuth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MasterAuth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientCertificateConfig. */ + interface IClientCertificateConfig { + + /** ClientCertificateConfig issueClientCertificate */ + issueClientCertificate?: (boolean|null); + } + + /** Represents a ClientCertificateConfig. */ + class ClientCertificateConfig implements IClientCertificateConfig { + + /** + * Constructs a new ClientCertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IClientCertificateConfig); + + /** ClientCertificateConfig issueClientCertificate. */ + public issueClientCertificate: boolean; + + /** + * Creates a new ClientCertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientCertificateConfig instance + */ + public static create(properties?: google.container.v1.IClientCertificateConfig): google.container.v1.ClientCertificateConfig; + + /** + * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. + * @param message ClientCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. + * @param message ClientCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClientCertificateConfig; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClientCertificateConfig; + + /** + * Verifies a ClientCertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientCertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ClientCertificateConfig; + + /** + * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. + * @param message ClientCertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ClientCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientCertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientCertificateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddonsConfig. */ + interface IAddonsConfig { + + /** AddonsConfig httpLoadBalancing */ + httpLoadBalancing?: (google.container.v1.IHttpLoadBalancing|null); + + /** AddonsConfig horizontalPodAutoscaling */ + horizontalPodAutoscaling?: (google.container.v1.IHorizontalPodAutoscaling|null); + + /** AddonsConfig kubernetesDashboard */ + kubernetesDashboard?: (google.container.v1.IKubernetesDashboard|null); + + /** AddonsConfig networkPolicyConfig */ + networkPolicyConfig?: (google.container.v1.INetworkPolicyConfig|null); + + /** AddonsConfig cloudRunConfig */ + cloudRunConfig?: (google.container.v1.ICloudRunConfig|null); + + /** AddonsConfig dnsCacheConfig */ + dnsCacheConfig?: (google.container.v1.IDnsCacheConfig|null); + + /** AddonsConfig configConnectorConfig */ + configConnectorConfig?: (google.container.v1.IConfigConnectorConfig|null); + + /** AddonsConfig gcePersistentDiskCsiDriverConfig */ + gcePersistentDiskCsiDriverConfig?: (google.container.v1.IGcePersistentDiskCsiDriverConfig|null); + + /** AddonsConfig gcpFilestoreCsiDriverConfig */ + gcpFilestoreCsiDriverConfig?: (google.container.v1.IGcpFilestoreCsiDriverConfig|null); + + /** AddonsConfig gkeBackupAgentConfig */ + gkeBackupAgentConfig?: (google.container.v1.IGkeBackupAgentConfig|null); + + /** AddonsConfig gcsFuseCsiDriverConfig */ + gcsFuseCsiDriverConfig?: (google.container.v1.IGcsFuseCsiDriverConfig|null); + + /** AddonsConfig statefulHaConfig */ + statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); + + /** AddonsConfig parallelstoreCsiDriverConfig */ + parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); + + /** AddonsConfig rayOperatorConfig */ + rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); + } + + /** Represents an AddonsConfig. */ + class AddonsConfig implements IAddonsConfig { + + /** + * Constructs a new AddonsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAddonsConfig); + + /** AddonsConfig httpLoadBalancing. */ + public httpLoadBalancing?: (google.container.v1.IHttpLoadBalancing|null); + + /** AddonsConfig horizontalPodAutoscaling. */ + public horizontalPodAutoscaling?: (google.container.v1.IHorizontalPodAutoscaling|null); + + /** AddonsConfig kubernetesDashboard. */ + public kubernetesDashboard?: (google.container.v1.IKubernetesDashboard|null); + + /** AddonsConfig networkPolicyConfig. */ + public networkPolicyConfig?: (google.container.v1.INetworkPolicyConfig|null); + + /** AddonsConfig cloudRunConfig. */ + public cloudRunConfig?: (google.container.v1.ICloudRunConfig|null); + + /** AddonsConfig dnsCacheConfig. */ + public dnsCacheConfig?: (google.container.v1.IDnsCacheConfig|null); + + /** AddonsConfig configConnectorConfig. */ + public configConnectorConfig?: (google.container.v1.IConfigConnectorConfig|null); + + /** AddonsConfig gcePersistentDiskCsiDriverConfig. */ + public gcePersistentDiskCsiDriverConfig?: (google.container.v1.IGcePersistentDiskCsiDriverConfig|null); + + /** AddonsConfig gcpFilestoreCsiDriverConfig. */ + public gcpFilestoreCsiDriverConfig?: (google.container.v1.IGcpFilestoreCsiDriverConfig|null); + + /** AddonsConfig gkeBackupAgentConfig. */ + public gkeBackupAgentConfig?: (google.container.v1.IGkeBackupAgentConfig|null); + + /** AddonsConfig gcsFuseCsiDriverConfig. */ + public gcsFuseCsiDriverConfig?: (google.container.v1.IGcsFuseCsiDriverConfig|null); + + /** AddonsConfig statefulHaConfig. */ + public statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); + + /** AddonsConfig parallelstoreCsiDriverConfig. */ + public parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); + + /** AddonsConfig rayOperatorConfig. */ + public rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); + + /** + * Creates a new AddonsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AddonsConfig instance + */ + public static create(properties?: google.container.v1.IAddonsConfig): google.container.v1.AddonsConfig; + + /** + * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. + * @param message AddonsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. + * @param message AddonsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AddonsConfig; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AddonsConfig; + + /** + * Verifies an AddonsConfig message. + * @param message Plain 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 AddonsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddonsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AddonsConfig; + + /** + * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. + * @param message AddonsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AddonsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddonsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddonsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpLoadBalancing. */ + interface IHttpLoadBalancing { + + /** HttpLoadBalancing disabled */ + disabled?: (boolean|null); + } + + /** Represents a HttpLoadBalancing. */ + class HttpLoadBalancing implements IHttpLoadBalancing { + + /** + * Constructs a new HttpLoadBalancing. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IHttpLoadBalancing); + + /** HttpLoadBalancing disabled. */ + public disabled: boolean; + + /** + * Creates a new HttpLoadBalancing instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpLoadBalancing instance + */ + public static create(properties?: google.container.v1.IHttpLoadBalancing): google.container.v1.HttpLoadBalancing; + + /** + * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. + * @param message HttpLoadBalancing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. + * @param message HttpLoadBalancing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.HttpLoadBalancing; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.HttpLoadBalancing; + + /** + * Verifies a HttpLoadBalancing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpLoadBalancing + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.HttpLoadBalancing; + + /** + * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. + * @param message HttpLoadBalancing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.HttpLoadBalancing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpLoadBalancing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpLoadBalancing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HorizontalPodAutoscaling. */ + interface IHorizontalPodAutoscaling { + + /** HorizontalPodAutoscaling disabled */ + disabled?: (boolean|null); + } + + /** Represents a HorizontalPodAutoscaling. */ + class HorizontalPodAutoscaling implements IHorizontalPodAutoscaling { + + /** + * Constructs a new HorizontalPodAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IHorizontalPodAutoscaling); + + /** HorizontalPodAutoscaling disabled. */ + public disabled: boolean; + + /** + * Creates a new HorizontalPodAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns HorizontalPodAutoscaling instance + */ + public static create(properties?: google.container.v1.IHorizontalPodAutoscaling): google.container.v1.HorizontalPodAutoscaling; + + /** + * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. + * @param message HorizontalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. + * @param message HorizontalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.HorizontalPodAutoscaling; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.HorizontalPodAutoscaling; + + /** + * Verifies a HorizontalPodAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HorizontalPodAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.HorizontalPodAutoscaling; + + /** + * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. + * @param message HorizontalPodAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.HorizontalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HorizontalPodAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HorizontalPodAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KubernetesDashboard. */ + interface IKubernetesDashboard { + + /** KubernetesDashboard disabled */ + disabled?: (boolean|null); + } + + /** Represents a KubernetesDashboard. */ + class KubernetesDashboard implements IKubernetesDashboard { + + /** + * Constructs a new KubernetesDashboard. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IKubernetesDashboard); + + /** KubernetesDashboard disabled. */ + public disabled: boolean; + + /** + * Creates a new KubernetesDashboard instance using the specified properties. + * @param [properties] Properties to set + * @returns KubernetesDashboard instance + */ + public static create(properties?: google.container.v1.IKubernetesDashboard): google.container.v1.KubernetesDashboard; + + /** + * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. + * @param message KubernetesDashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. + * @param message KubernetesDashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.KubernetesDashboard; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.KubernetesDashboard; + + /** + * Verifies a KubernetesDashboard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KubernetesDashboard + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.KubernetesDashboard; + + /** + * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. + * @param message KubernetesDashboard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.KubernetesDashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KubernetesDashboard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KubernetesDashboard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkPolicyConfig. */ + interface INetworkPolicyConfig { + + /** NetworkPolicyConfig disabled */ + disabled?: (boolean|null); + } + + /** Represents a NetworkPolicyConfig. */ + class NetworkPolicyConfig implements INetworkPolicyConfig { + + /** + * Constructs a new NetworkPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INetworkPolicyConfig); + + /** NetworkPolicyConfig disabled. */ + public disabled: boolean; + + /** + * Creates a new NetworkPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPolicyConfig instance + */ + public static create(properties?: google.container.v1.INetworkPolicyConfig): google.container.v1.NetworkPolicyConfig; + + /** + * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. + * @param message NetworkPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. + * @param message NetworkPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkPolicyConfig; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkPolicyConfig; + + /** + * Verifies a NetworkPolicyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkPolicyConfig; + + /** + * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. + * @param message NetworkPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NetworkPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DnsCacheConfig. */ + interface IDnsCacheConfig { + + /** DnsCacheConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a DnsCacheConfig. */ + class DnsCacheConfig implements IDnsCacheConfig { + + /** + * Constructs a new DnsCacheConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDnsCacheConfig); + + /** DnsCacheConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new DnsCacheConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DnsCacheConfig instance + */ + public static create(properties?: google.container.v1.IDnsCacheConfig): google.container.v1.DnsCacheConfig; + + /** + * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. + * @param message DnsCacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. + * @param message DnsCacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DnsCacheConfig; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DnsCacheConfig; + + /** + * Verifies a DnsCacheConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DnsCacheConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DnsCacheConfig; + + /** + * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. + * @param message DnsCacheConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DnsCacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DnsCacheConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DnsCacheConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterMasterGlobalAccessConfig. */ + interface IPrivateClusterMasterGlobalAccessConfig { + + /** PrivateClusterMasterGlobalAccessConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a PrivateClusterMasterGlobalAccessConfig. */ + class PrivateClusterMasterGlobalAccessConfig implements IPrivateClusterMasterGlobalAccessConfig { + + /** + * Constructs a new PrivateClusterMasterGlobalAccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IPrivateClusterMasterGlobalAccessConfig); + + /** PrivateClusterMasterGlobalAccessConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterMasterGlobalAccessConfig instance + */ + public static create(properties?: google.container.v1.IPrivateClusterMasterGlobalAccessConfig): google.container.v1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Verifies a PrivateClusterMasterGlobalAccessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterMasterGlobalAccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. + * @param message PrivateClusterMasterGlobalAccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.PrivateClusterMasterGlobalAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterMasterGlobalAccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateNodes */ + enablePrivateNodes?: (boolean|null); + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig privateEndpoint */ + privateEndpoint?: (string|null); + + /** PrivateClusterConfig publicEndpoint */ + publicEndpoint?: (string|null); + + /** PrivateClusterConfig peeringName */ + peeringName?: (string|null); + + /** PrivateClusterConfig masterGlobalAccessConfig */ + masterGlobalAccessConfig?: (google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null); + + /** PrivateClusterConfig privateEndpointSubnetwork */ + privateEndpointSubnetwork?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateNodes. */ + public enablePrivateNodes: boolean; + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig privateEndpoint. */ + public privateEndpoint: string; + + /** PrivateClusterConfig publicEndpoint. */ + public publicEndpoint: string; + + /** PrivateClusterConfig peeringName. */ + public peeringName: string; + + /** PrivateClusterConfig masterGlobalAccessConfig. */ + public masterGlobalAccessConfig?: (google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null); + + /** PrivateClusterConfig privateEndpointSubnetwork. */ + public privateEndpointSubnetwork: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.container.v1.IPrivateClusterConfig): google.container.v1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuthenticatorGroupsConfig. */ + interface IAuthenticatorGroupsConfig { + + /** AuthenticatorGroupsConfig enabled */ + enabled?: (boolean|null); + + /** AuthenticatorGroupsConfig securityGroup */ + securityGroup?: (string|null); + } + + /** Represents an AuthenticatorGroupsConfig. */ + class AuthenticatorGroupsConfig implements IAuthenticatorGroupsConfig { + + /** + * Constructs a new AuthenticatorGroupsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAuthenticatorGroupsConfig); + + /** AuthenticatorGroupsConfig enabled. */ + public enabled: boolean; + + /** AuthenticatorGroupsConfig securityGroup. */ + public securityGroup: string; + + /** + * Creates a new AuthenticatorGroupsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthenticatorGroupsConfig instance + */ + public static create(properties?: google.container.v1.IAuthenticatorGroupsConfig): google.container.v1.AuthenticatorGroupsConfig; + + /** + * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. + * @param message AuthenticatorGroupsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. + * @param message AuthenticatorGroupsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AuthenticatorGroupsConfig; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AuthenticatorGroupsConfig; + + /** + * Verifies an AuthenticatorGroupsConfig message. + * @param message Plain 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 AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthenticatorGroupsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AuthenticatorGroupsConfig; + + /** + * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. + * @param message AuthenticatorGroupsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AuthenticatorGroupsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthenticatorGroupsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthenticatorGroupsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunConfig. */ + interface ICloudRunConfig { + + /** CloudRunConfig disabled */ + disabled?: (boolean|null); + + /** CloudRunConfig loadBalancerType */ + loadBalancerType?: (google.container.v1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1.CloudRunConfig.LoadBalancerType|null); + } + + /** Represents a CloudRunConfig. */ + class CloudRunConfig implements ICloudRunConfig { + + /** + * Constructs a new CloudRunConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICloudRunConfig); + + /** CloudRunConfig disabled. */ + public disabled: boolean; + + /** CloudRunConfig loadBalancerType. */ + public loadBalancerType: (google.container.v1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1.CloudRunConfig.LoadBalancerType); + + /** + * Creates a new CloudRunConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunConfig instance + */ + public static create(properties?: google.container.v1.ICloudRunConfig): google.container.v1.CloudRunConfig; + + /** + * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. + * @param message CloudRunConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. + * @param message CloudRunConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CloudRunConfig; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CloudRunConfig; + + /** + * Verifies a CloudRunConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CloudRunConfig; + + /** + * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. + * @param message CloudRunConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CloudRunConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudRunConfig { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + LOAD_BALANCER_TYPE_EXTERNAL = 1, + LOAD_BALANCER_TYPE_INTERNAL = 2 + } + } + + /** Properties of a ConfigConnectorConfig. */ + interface IConfigConnectorConfig { + + /** ConfigConnectorConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConfigConnectorConfig. */ + class ConfigConnectorConfig implements IConfigConnectorConfig { + + /** + * Constructs a new ConfigConnectorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IConfigConnectorConfig); + + /** ConfigConnectorConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ConfigConnectorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigConnectorConfig instance + */ + public static create(properties?: google.container.v1.IConfigConnectorConfig): google.container.v1.ConfigConnectorConfig; + + /** + * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. + * @param message ConfigConnectorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. + * @param message ConfigConnectorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ConfigConnectorConfig; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ConfigConnectorConfig; + + /** + * Verifies a ConfigConnectorConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigConnectorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ConfigConnectorConfig; + + /** + * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. + * @param message ConfigConnectorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ConfigConnectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigConnectorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigConnectorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcePersistentDiskCsiDriverConfig. */ + interface IGcePersistentDiskCsiDriverConfig { + + /** GcePersistentDiskCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcePersistentDiskCsiDriverConfig. */ + class GcePersistentDiskCsiDriverConfig implements IGcePersistentDiskCsiDriverConfig { + + /** + * Constructs a new GcePersistentDiskCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGcePersistentDiskCsiDriverConfig); + + /** GcePersistentDiskCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcePersistentDiskCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.IGcePersistentDiskCsiDriverConfig): google.container.v1.GcePersistentDiskCsiDriverConfig; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcePersistentDiskCsiDriverConfig; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcePersistentDiskCsiDriverConfig; + + /** + * Verifies a GcePersistentDiskCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcePersistentDiskCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GcePersistentDiskCsiDriverConfig; + + /** + * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcePersistentDiskCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GcePersistentDiskCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcePersistentDiskCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcePersistentDiskCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpFilestoreCsiDriverConfig. */ + interface IGcpFilestoreCsiDriverConfig { + + /** GcpFilestoreCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcpFilestoreCsiDriverConfig. */ + class GcpFilestoreCsiDriverConfig implements IGcpFilestoreCsiDriverConfig { + + /** + * Constructs a new GcpFilestoreCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGcpFilestoreCsiDriverConfig); + + /** GcpFilestoreCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpFilestoreCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.IGcpFilestoreCsiDriverConfig): google.container.v1.GcpFilestoreCsiDriverConfig; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @param message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @param message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcpFilestoreCsiDriverConfig; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcpFilestoreCsiDriverConfig; + + /** + * Verifies a GcpFilestoreCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpFilestoreCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GcpFilestoreCsiDriverConfig; + + /** + * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcpFilestoreCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GcpFilestoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpFilestoreCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpFilestoreCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcsFuseCsiDriverConfig. */ + interface IGcsFuseCsiDriverConfig { + + /** GcsFuseCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcsFuseCsiDriverConfig. */ + class GcsFuseCsiDriverConfig implements IGcsFuseCsiDriverConfig { + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGcsFuseCsiDriverConfig); + + /** GcsFuseCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsFuseCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.IGcsFuseCsiDriverConfig): google.container.v1.GcsFuseCsiDriverConfig; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcsFuseCsiDriverConfig; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcsFuseCsiDriverConfig; + + /** + * Verifies a GcsFuseCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsFuseCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GcsFuseCsiDriverConfig; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcsFuseCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GcsFuseCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParallelstoreCsiDriverConfig. */ + interface IParallelstoreCsiDriverConfig { + + /** ParallelstoreCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ParallelstoreCsiDriverConfig. */ + class ParallelstoreCsiDriverConfig implements IParallelstoreCsiDriverConfig { + + /** + * Constructs a new ParallelstoreCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IParallelstoreCsiDriverConfig); + + /** ParallelstoreCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ParallelstoreCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.IParallelstoreCsiDriverConfig): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @param message ParallelstoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @param message ParallelstoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Verifies a ParallelstoreCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParallelstoreCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. + * @param message ParallelstoreCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ParallelstoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParallelstoreCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParallelstoreCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RayOperatorConfig. */ + interface IRayOperatorConfig { + + /** RayOperatorConfig enabled */ + enabled?: (boolean|null); + + /** RayOperatorConfig rayClusterLoggingConfig */ + rayClusterLoggingConfig?: (google.container.v1.IRayClusterLoggingConfig|null); + + /** RayOperatorConfig rayClusterMonitoringConfig */ + rayClusterMonitoringConfig?: (google.container.v1.IRayClusterMonitoringConfig|null); + } + + /** Represents a RayOperatorConfig. */ + class RayOperatorConfig implements IRayOperatorConfig { + + /** + * Constructs a new RayOperatorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRayOperatorConfig); + + /** RayOperatorConfig enabled. */ + public enabled: boolean; + + /** RayOperatorConfig rayClusterLoggingConfig. */ + public rayClusterLoggingConfig?: (google.container.v1.IRayClusterLoggingConfig|null); + + /** RayOperatorConfig rayClusterMonitoringConfig. */ + public rayClusterMonitoringConfig?: (google.container.v1.IRayClusterMonitoringConfig|null); + + /** + * Creates a new RayOperatorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayOperatorConfig instance + */ + public static create(properties?: google.container.v1.IRayOperatorConfig): google.container.v1.RayOperatorConfig; + + /** + * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. + * @param message RayOperatorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. + * @param message RayOperatorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayOperatorConfig; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayOperatorConfig; + + /** + * Verifies a RayOperatorConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayOperatorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RayOperatorConfig; + + /** + * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. + * @param message RayOperatorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RayOperatorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayOperatorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayOperatorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GkeBackupAgentConfig. */ + interface IGkeBackupAgentConfig { + + /** GkeBackupAgentConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GkeBackupAgentConfig. */ + class GkeBackupAgentConfig implements IGkeBackupAgentConfig { + + /** + * Constructs a new GkeBackupAgentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGkeBackupAgentConfig); + + /** GkeBackupAgentConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GkeBackupAgentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GkeBackupAgentConfig instance + */ + public static create(properties?: google.container.v1.IGkeBackupAgentConfig): google.container.v1.GkeBackupAgentConfig; + + /** + * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. + * @param message GkeBackupAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. + * @param message GkeBackupAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GkeBackupAgentConfig; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GkeBackupAgentConfig; + + /** + * Verifies a GkeBackupAgentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GkeBackupAgentConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GkeBackupAgentConfig; + + /** + * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. + * @param message GkeBackupAgentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GkeBackupAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GkeBackupAgentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GkeBackupAgentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatefulHAConfig. */ + interface IStatefulHAConfig { + + /** StatefulHAConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a StatefulHAConfig. */ + class StatefulHAConfig implements IStatefulHAConfig { + + /** + * Constructs a new StatefulHAConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IStatefulHAConfig); + + /** StatefulHAConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new StatefulHAConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StatefulHAConfig instance + */ + public static create(properties?: google.container.v1.IStatefulHAConfig): google.container.v1.StatefulHAConfig; + + /** + * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. + * @param message StatefulHAConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. + * @param message StatefulHAConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StatefulHAConfig; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StatefulHAConfig; + + /** + * Verifies a StatefulHAConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatefulHAConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.StatefulHAConfig; + + /** + * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. + * @param message StatefulHAConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.StatefulHAConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatefulHAConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatefulHAConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MasterAuthorizedNetworksConfig. */ + interface IMasterAuthorizedNetworksConfig { + + /** MasterAuthorizedNetworksConfig enabled */ + enabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig cidrBlocks */ + cidrBlocks?: (google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); + + /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled */ + gcpPublicCidrsAccessEnabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled */ + privateEndpointEnforcementEnabled?: (boolean|null); + } + + /** Represents a MasterAuthorizedNetworksConfig. */ + class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMasterAuthorizedNetworksConfig); + + /** MasterAuthorizedNetworksConfig enabled. */ + public enabled: boolean; + + /** MasterAuthorizedNetworksConfig cidrBlocks. */ + public cidrBlocks: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]; + + /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. */ + public gcpPublicCidrsAccessEnabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. */ + public privateEndpointEnforcementEnabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. */ + public _gcpPublicCidrsAccessEnabled?: "gcpPublicCidrsAccessEnabled"; + + /** MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. */ + public _privateEndpointEnforcementEnabled?: "privateEndpointEnforcementEnabled"; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuthorizedNetworksConfig instance + */ + public static create(properties?: google.container.v1.IMasterAuthorizedNetworksConfig): google.container.v1.MasterAuthorizedNetworksConfig; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuthorizedNetworksConfig; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuthorizedNetworksConfig; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuthorizedNetworksConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuthorizedNetworksConfig; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @param message MasterAuthorizedNetworksConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MasterAuthorizedNetworksConfig { + + /** Properties of a CidrBlock. */ + interface ICidrBlock { + + /** CidrBlock displayName */ + displayName?: (string|null); + + /** CidrBlock cidrBlock */ + cidrBlock?: (string|null); + } + + /** Represents a CidrBlock. */ + class CidrBlock implements ICidrBlock { + + /** + * Constructs a new CidrBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock); + + /** CidrBlock displayName. */ + public displayName: string; + + /** CidrBlock cidrBlock. */ + public cidrBlock: string; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns CidrBlock instance + */ + public static create(properties?: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Verifies a CidrBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CidrBlock + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @param message CidrBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CidrBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CidrBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LegacyAbac. */ + interface ILegacyAbac { + + /** LegacyAbac enabled */ + enabled?: (boolean|null); + } + + /** Represents a LegacyAbac. */ + class LegacyAbac implements ILegacyAbac { + + /** + * Constructs a new LegacyAbac. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILegacyAbac); + + /** LegacyAbac enabled. */ + public enabled: boolean; + + /** + * Creates a new LegacyAbac instance using the specified properties. + * @param [properties] Properties to set + * @returns LegacyAbac instance + */ + public static create(properties?: google.container.v1.ILegacyAbac): google.container.v1.LegacyAbac; + + /** + * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. + * @param message LegacyAbac message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. + * @param message LegacyAbac message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LegacyAbac; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LegacyAbac; + + /** + * Verifies a LegacyAbac message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LegacyAbac + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LegacyAbac; + + /** + * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. + * @param message LegacyAbac + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LegacyAbac, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LegacyAbac to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LegacyAbac + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkPolicy. */ + interface INetworkPolicy { + + /** NetworkPolicy provider */ + provider?: (google.container.v1.NetworkPolicy.Provider|keyof typeof google.container.v1.NetworkPolicy.Provider|null); + + /** NetworkPolicy enabled */ + enabled?: (boolean|null); + } + + /** Represents a NetworkPolicy. */ + class NetworkPolicy implements INetworkPolicy { + + /** + * Constructs a new NetworkPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INetworkPolicy); + + /** NetworkPolicy provider. */ + public provider: (google.container.v1.NetworkPolicy.Provider|keyof typeof google.container.v1.NetworkPolicy.Provider); + + /** NetworkPolicy enabled. */ + public enabled: boolean; + + /** + * Creates a new NetworkPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPolicy instance + */ + public static create(properties?: google.container.v1.INetworkPolicy): google.container.v1.NetworkPolicy; + + /** + * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. + * @param message NetworkPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. + * @param message NetworkPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkPolicy; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkPolicy; + + /** + * Verifies a NetworkPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkPolicy; + + /** + * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. + * @param message NetworkPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NetworkPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPolicy { + + /** Provider enum. */ + enum Provider { + PROVIDER_UNSPECIFIED = 0, + CALICO = 1 + } + } + + /** Properties of a BinaryAuthorization. */ + interface IBinaryAuthorization { + + /** BinaryAuthorization enabled */ + enabled?: (boolean|null); + + /** BinaryAuthorization evaluationMode */ + evaluationMode?: (google.container.v1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1.BinaryAuthorization.EvaluationMode|null); + } + + /** Represents a BinaryAuthorization. */ + class BinaryAuthorization implements IBinaryAuthorization { + + /** + * Constructs a new BinaryAuthorization. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IBinaryAuthorization); + + /** BinaryAuthorization enabled. */ + public enabled: boolean; + + /** BinaryAuthorization evaluationMode. */ + public evaluationMode: (google.container.v1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1.BinaryAuthorization.EvaluationMode); + + /** + * Creates a new BinaryAuthorization instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryAuthorization instance + */ + public static create(properties?: google.container.v1.IBinaryAuthorization): google.container.v1.BinaryAuthorization; + + /** + * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. + * @param message BinaryAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. + * @param message BinaryAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BinaryAuthorization; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BinaryAuthorization; + + /** + * Verifies a BinaryAuthorization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryAuthorization + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.BinaryAuthorization; + + /** + * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. + * @param message BinaryAuthorization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.BinaryAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryAuthorization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryAuthorization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BinaryAuthorization { + + /** EvaluationMode enum. */ + enum EvaluationMode { + EVALUATION_MODE_UNSPECIFIED = 0, + DISABLED = 1, + PROJECT_SINGLETON_POLICY_ENFORCE = 2 + } + } + + /** Properties of a PodCIDROverprovisionConfig. */ + interface IPodCIDROverprovisionConfig { + + /** PodCIDROverprovisionConfig disable */ + disable?: (boolean|null); + } + + /** Represents a PodCIDROverprovisionConfig. */ + class PodCIDROverprovisionConfig implements IPodCIDROverprovisionConfig { + + /** + * Constructs a new PodCIDROverprovisionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IPodCIDROverprovisionConfig); + + /** PodCIDROverprovisionConfig disable. */ + public disable: boolean; + + /** + * Creates a new PodCIDROverprovisionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PodCIDROverprovisionConfig instance + */ + public static create(properties?: google.container.v1.IPodCIDROverprovisionConfig): google.container.v1.PodCIDROverprovisionConfig; + + /** + * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. + * @param message PodCIDROverprovisionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. + * @param message PodCIDROverprovisionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PodCIDROverprovisionConfig; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PodCIDROverprovisionConfig; + + /** + * Verifies a PodCIDROverprovisionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PodCIDROverprovisionConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.PodCIDROverprovisionConfig; + + /** + * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. + * @param message PodCIDROverprovisionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.PodCIDROverprovisionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PodCIDROverprovisionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PodCIDROverprovisionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy createSubnetwork */ + createSubnetwork?: (boolean|null); + + /** IPAllocationPolicy subnetworkName */ + subnetworkName?: (string|null); + + /** IPAllocationPolicy clusterIpv4Cidr */ + clusterIpv4Cidr?: (string|null); + + /** IPAllocationPolicy nodeIpv4Cidr */ + nodeIpv4Cidr?: (string|null); + + /** IPAllocationPolicy servicesIpv4Cidr */ + servicesIpv4Cidr?: (string|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy nodeIpv4CidrBlock */ + nodeIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy tpuIpv4CidrBlock */ + tpuIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy useRoutes */ + useRoutes?: (boolean|null); + + /** IPAllocationPolicy stackType */ + stackType?: (google.container.v1.StackType|keyof typeof google.container.v1.StackType|null); + + /** IPAllocationPolicy ipv6AccessType */ + ipv6AccessType?: (google.container.v1.IPv6AccessType|keyof typeof google.container.v1.IPv6AccessType|null); + + /** IPAllocationPolicy podCidrOverprovisionConfig */ + podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); + + /** IPAllocationPolicy subnetIpv6CidrBlock */ + subnetIpv6CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv6CidrBlock */ + servicesIpv6CidrBlock?: (string|null); + + /** IPAllocationPolicy additionalPodRangesConfig */ + additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** IPAllocationPolicy defaultPodIpv4RangeUtilization */ + defaultPodIpv4RangeUtilization?: (number|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy createSubnetwork. */ + public createSubnetwork: boolean; + + /** IPAllocationPolicy subnetworkName. */ + public subnetworkName: string; + + /** IPAllocationPolicy clusterIpv4Cidr. */ + public clusterIpv4Cidr: string; + + /** IPAllocationPolicy nodeIpv4Cidr. */ + public nodeIpv4Cidr: string; + + /** IPAllocationPolicy servicesIpv4Cidr. */ + public servicesIpv4Cidr: string; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName: string; + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName: string; + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock: string; + + /** IPAllocationPolicy nodeIpv4CidrBlock. */ + public nodeIpv4CidrBlock: string; + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock: string; + + /** IPAllocationPolicy tpuIpv4CidrBlock. */ + public tpuIpv4CidrBlock: string; + + /** IPAllocationPolicy useRoutes. */ + public useRoutes: boolean; + + /** IPAllocationPolicy stackType. */ + public stackType: (google.container.v1.StackType|keyof typeof google.container.v1.StackType); + + /** IPAllocationPolicy ipv6AccessType. */ + public ipv6AccessType: (google.container.v1.IPv6AccessType|keyof typeof google.container.v1.IPv6AccessType); + + /** IPAllocationPolicy podCidrOverprovisionConfig. */ + public podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); + + /** IPAllocationPolicy subnetIpv6CidrBlock. */ + public subnetIpv6CidrBlock: string; + + /** IPAllocationPolicy servicesIpv6CidrBlock. */ + public servicesIpv6CidrBlock: string; + + /** IPAllocationPolicy additionalPodRangesConfig. */ + public additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** IPAllocationPolicy defaultPodIpv4RangeUtilization. */ + public defaultPodIpv4RangeUtilization: number; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.container.v1.IIPAllocationPolicy): google.container.v1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cluster. */ + interface ICluster { + + /** Cluster name */ + name?: (string|null); + + /** Cluster description */ + description?: (string|null); + + /** Cluster initialNodeCount */ + initialNodeCount?: (number|null); + + /** Cluster nodeConfig */ + nodeConfig?: (google.container.v1.INodeConfig|null); + + /** Cluster masterAuth */ + masterAuth?: (google.container.v1.IMasterAuth|null); + + /** Cluster loggingService */ + loggingService?: (string|null); + + /** Cluster monitoringService */ + monitoringService?: (string|null); + + /** Cluster network */ + network?: (string|null); + + /** Cluster clusterIpv4Cidr */ + clusterIpv4Cidr?: (string|null); + + /** Cluster addonsConfig */ + addonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** Cluster subnetwork */ + subnetwork?: (string|null); + + /** Cluster nodePools */ + nodePools?: (google.container.v1.INodePool[]|null); + + /** Cluster locations */ + locations?: (string[]|null); + + /** Cluster enableKubernetesAlpha */ + enableKubernetesAlpha?: (boolean|null); + + /** Cluster resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** Cluster labelFingerprint */ + labelFingerprint?: (string|null); + + /** Cluster legacyAbac */ + legacyAbac?: (google.container.v1.ILegacyAbac|null); + + /** Cluster networkPolicy */ + networkPolicy?: (google.container.v1.INetworkPolicy|null); + + /** Cluster ipAllocationPolicy */ + ipAllocationPolicy?: (google.container.v1.IIPAllocationPolicy|null); + + /** Cluster masterAuthorizedNetworksConfig */ + masterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** Cluster maintenancePolicy */ + maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); + + /** Cluster binaryAuthorization */ + binaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); + + /** Cluster autoscaling */ + autoscaling?: (google.container.v1.IClusterAutoscaling|null); + + /** Cluster networkConfig */ + networkConfig?: (google.container.v1.INetworkConfig|null); + + /** Cluster defaultMaxPodsConstraint */ + defaultMaxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); + + /** Cluster resourceUsageExportConfig */ + resourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); + + /** Cluster authenticatorGroupsConfig */ + authenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); + + /** Cluster privateClusterConfig */ + privateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); + + /** Cluster databaseEncryption */ + databaseEncryption?: (google.container.v1.IDatabaseEncryption|null); + + /** Cluster verticalPodAutoscaling */ + verticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); + + /** Cluster shieldedNodes */ + shieldedNodes?: (google.container.v1.IShieldedNodes|null); + + /** Cluster releaseChannel */ + releaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** Cluster workloadIdentityConfig */ + workloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); + + /** Cluster meshCertificates */ + meshCertificates?: (google.container.v1.IMeshCertificates|null); + + /** Cluster costManagementConfig */ + costManagementConfig?: (google.container.v1.ICostManagementConfig|null); + + /** Cluster notificationConfig */ + notificationConfig?: (google.container.v1.INotificationConfig|null); + + /** Cluster confidentialNodes */ + confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** Cluster identityServiceConfig */ + identityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); + + /** Cluster selfLink */ + selfLink?: (string|null); + + /** Cluster zone */ + zone?: (string|null); + + /** Cluster endpoint */ + endpoint?: (string|null); + + /** Cluster initialClusterVersion */ + initialClusterVersion?: (string|null); + + /** Cluster currentMasterVersion */ + currentMasterVersion?: (string|null); + + /** Cluster currentNodeVersion */ + currentNodeVersion?: (string|null); + + /** Cluster createTime */ + createTime?: (string|null); + + /** Cluster status */ + status?: (google.container.v1.Cluster.Status|keyof typeof google.container.v1.Cluster.Status|null); + + /** Cluster statusMessage */ + statusMessage?: (string|null); + + /** Cluster nodeIpv4CidrSize */ + nodeIpv4CidrSize?: (number|null); + + /** Cluster servicesIpv4Cidr */ + servicesIpv4Cidr?: (string|null); + + /** Cluster instanceGroupUrls */ + instanceGroupUrls?: (string[]|null); + + /** Cluster currentNodeCount */ + currentNodeCount?: (number|null); + + /** Cluster expireTime */ + expireTime?: (string|null); + + /** Cluster location */ + location?: (string|null); + + /** Cluster enableTpu */ + enableTpu?: (boolean|null); + + /** Cluster tpuIpv4CidrBlock */ + tpuIpv4CidrBlock?: (string|null); + + /** Cluster conditions */ + conditions?: (google.container.v1.IStatusCondition[]|null); + + /** Cluster autopilot */ + autopilot?: (google.container.v1.IAutopilot|null); + + /** Cluster id */ + id?: (string|null); + + /** Cluster nodePoolDefaults */ + nodePoolDefaults?: (google.container.v1.INodePoolDefaults|null); + + /** Cluster loggingConfig */ + loggingConfig?: (google.container.v1.ILoggingConfig|null); + + /** Cluster monitoringConfig */ + monitoringConfig?: (google.container.v1.IMonitoringConfig|null); + + /** Cluster nodePoolAutoConfig */ + nodePoolAutoConfig?: (google.container.v1.INodePoolAutoConfig|null); + + /** Cluster etag */ + etag?: (string|null); + + /** Cluster fleet */ + fleet?: (google.container.v1.IFleet|null); + + /** Cluster securityPostureConfig */ + securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + + /** Cluster controlPlaneEndpointsConfig */ + controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + + /** Cluster enableK8sBetaApis */ + enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** Cluster enterpriseConfig */ + enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); + + /** Cluster secretManagerConfig */ + secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig */ + compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + + /** Cluster satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Cluster satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Cluster userManagedKeysConfig */ + userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** Cluster rbacBindingConfig */ + rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + } + + /** Represents a Cluster. */ + class Cluster implements ICluster { + + /** + * Constructs a new Cluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICluster); + + /** Cluster name. */ + public name: string; + + /** Cluster description. */ + public description: string; + + /** Cluster initialNodeCount. */ + public initialNodeCount: number; + + /** Cluster nodeConfig. */ + public nodeConfig?: (google.container.v1.INodeConfig|null); + + /** Cluster masterAuth. */ + public masterAuth?: (google.container.v1.IMasterAuth|null); + + /** Cluster loggingService. */ + public loggingService: string; + + /** Cluster monitoringService. */ + public monitoringService: string; + + /** Cluster network. */ + public network: string; + + /** Cluster clusterIpv4Cidr. */ + public clusterIpv4Cidr: string; + + /** Cluster addonsConfig. */ + public addonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** Cluster subnetwork. */ + public subnetwork: string; + + /** Cluster nodePools. */ + public nodePools: google.container.v1.INodePool[]; + + /** Cluster locations. */ + public locations: string[]; + + /** Cluster enableKubernetesAlpha. */ + public enableKubernetesAlpha: boolean; + + /** Cluster resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** Cluster labelFingerprint. */ + public labelFingerprint: string; + + /** Cluster legacyAbac. */ + public legacyAbac?: (google.container.v1.ILegacyAbac|null); + + /** Cluster networkPolicy. */ + public networkPolicy?: (google.container.v1.INetworkPolicy|null); + + /** Cluster ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.container.v1.IIPAllocationPolicy|null); + + /** Cluster masterAuthorizedNetworksConfig. */ + public masterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** Cluster maintenancePolicy. */ + public maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); + + /** Cluster binaryAuthorization. */ + public binaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); + + /** Cluster autoscaling. */ + public autoscaling?: (google.container.v1.IClusterAutoscaling|null); + + /** Cluster networkConfig. */ + public networkConfig?: (google.container.v1.INetworkConfig|null); + + /** Cluster defaultMaxPodsConstraint. */ + public defaultMaxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); + + /** Cluster resourceUsageExportConfig. */ + public resourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); + + /** Cluster authenticatorGroupsConfig. */ + public authenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); + + /** Cluster privateClusterConfig. */ + public privateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); + + /** Cluster databaseEncryption. */ + public databaseEncryption?: (google.container.v1.IDatabaseEncryption|null); + + /** Cluster verticalPodAutoscaling. */ + public verticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); + + /** Cluster shieldedNodes. */ + public shieldedNodes?: (google.container.v1.IShieldedNodes|null); + + /** Cluster releaseChannel. */ + public releaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** Cluster workloadIdentityConfig. */ + public workloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); + + /** Cluster meshCertificates. */ + public meshCertificates?: (google.container.v1.IMeshCertificates|null); + + /** Cluster costManagementConfig. */ + public costManagementConfig?: (google.container.v1.ICostManagementConfig|null); + + /** Cluster notificationConfig. */ + public notificationConfig?: (google.container.v1.INotificationConfig|null); + + /** Cluster confidentialNodes. */ + public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** Cluster identityServiceConfig. */ + public identityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); + + /** Cluster selfLink. */ + public selfLink: string; + + /** Cluster zone. */ + public zone: string; + + /** Cluster endpoint. */ + public endpoint: string; + + /** Cluster initialClusterVersion. */ + public initialClusterVersion: string; + + /** Cluster currentMasterVersion. */ + public currentMasterVersion: string; + + /** Cluster currentNodeVersion. */ + public currentNodeVersion: string; + + /** Cluster createTime. */ + public createTime: string; + + /** Cluster status. */ + public status: (google.container.v1.Cluster.Status|keyof typeof google.container.v1.Cluster.Status); + + /** Cluster statusMessage. */ + public statusMessage: string; + + /** Cluster nodeIpv4CidrSize. */ + public nodeIpv4CidrSize: number; + + /** Cluster servicesIpv4Cidr. */ + public servicesIpv4Cidr: string; + + /** Cluster instanceGroupUrls. */ + public instanceGroupUrls: string[]; + + /** Cluster currentNodeCount. */ + public currentNodeCount: number; + + /** Cluster expireTime. */ + public expireTime: string; + + /** Cluster location. */ + public location: string; + + /** Cluster enableTpu. */ + public enableTpu: boolean; + + /** Cluster tpuIpv4CidrBlock. */ + public tpuIpv4CidrBlock: string; + + /** Cluster conditions. */ + public conditions: google.container.v1.IStatusCondition[]; + + /** Cluster autopilot. */ + public autopilot?: (google.container.v1.IAutopilot|null); + + /** Cluster id. */ + public id: string; + + /** Cluster nodePoolDefaults. */ + public nodePoolDefaults?: (google.container.v1.INodePoolDefaults|null); + + /** Cluster loggingConfig. */ + public loggingConfig?: (google.container.v1.ILoggingConfig|null); + + /** Cluster monitoringConfig. */ + public monitoringConfig?: (google.container.v1.IMonitoringConfig|null); + + /** Cluster nodePoolAutoConfig. */ + public nodePoolAutoConfig?: (google.container.v1.INodePoolAutoConfig|null); + + /** Cluster etag. */ + public etag: string; + + /** Cluster fleet. */ + public fleet?: (google.container.v1.IFleet|null); + + /** Cluster securityPostureConfig. */ + public securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + + /** Cluster controlPlaneEndpointsConfig. */ + public controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + + /** Cluster enableK8sBetaApis. */ + public enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** Cluster enterpriseConfig. */ + public enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); + + /** Cluster secretManagerConfig. */ + public secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig. */ + public compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + + /** Cluster satisfiesPzs. */ + public satisfiesPzs?: (boolean|null); + + /** Cluster satisfiesPzi. */ + public satisfiesPzi?: (boolean|null); + + /** Cluster userManagedKeysConfig. */ + public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** Cluster rbacBindingConfig. */ + public rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + + /** Cluster _nodePoolDefaults. */ + public _nodePoolDefaults?: "nodePoolDefaults"; + + /** Cluster _satisfiesPzs. */ + public _satisfiesPzs?: "satisfiesPzs"; + + /** Cluster _satisfiesPzi. */ + public _satisfiesPzi?: "satisfiesPzi"; + + /** Cluster _userManagedKeysConfig. */ + public _userManagedKeysConfig?: "userManagedKeysConfig"; + + /** Cluster _rbacBindingConfig. */ + public _rbacBindingConfig?: "rbacBindingConfig"; + + /** + * Creates a new Cluster instance using the specified properties. + * @param [properties] Properties to set + * @returns Cluster instance + */ + public static create(properties?: google.container.v1.ICluster): google.container.v1.Cluster; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Cluster; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Cluster; + + /** + * Verifies a Cluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cluster + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.Cluster; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @param message Cluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.Cluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Cluster { + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RECONCILING = 3, + STOPPING = 4, + ERROR = 5, + DEGRADED = 6 + } + } + + /** Properties of a RBACBindingConfig. */ + interface IRBACBindingConfig { + + /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated */ + enableInsecureBindingSystemUnauthenticated?: (boolean|null); + + /** RBACBindingConfig enableInsecureBindingSystemAuthenticated */ + enableInsecureBindingSystemAuthenticated?: (boolean|null); + } + + /** Represents a RBACBindingConfig. */ + class RBACBindingConfig implements IRBACBindingConfig { + + /** + * Constructs a new RBACBindingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRBACBindingConfig); + + /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated. */ + public enableInsecureBindingSystemUnauthenticated?: (boolean|null); + + /** RBACBindingConfig enableInsecureBindingSystemAuthenticated. */ + public enableInsecureBindingSystemAuthenticated?: (boolean|null); + + /** RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. */ + public _enableInsecureBindingSystemUnauthenticated?: "enableInsecureBindingSystemUnauthenticated"; + + /** RBACBindingConfig _enableInsecureBindingSystemAuthenticated. */ + public _enableInsecureBindingSystemAuthenticated?: "enableInsecureBindingSystemAuthenticated"; + + /** + * Creates a new RBACBindingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RBACBindingConfig instance + */ + public static create(properties?: google.container.v1.IRBACBindingConfig): google.container.v1.RBACBindingConfig; + + /** + * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @param message RBACBindingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @param message RBACBindingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RBACBindingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RBACBindingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RBACBindingConfig; + + /** + * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RBACBindingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RBACBindingConfig; + + /** + * Verifies a RBACBindingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RBACBindingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RBACBindingConfig; + + /** + * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. + * @param message RBACBindingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RBACBindingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RBACBindingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RBACBindingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserManagedKeysConfig. */ + interface IUserManagedKeysConfig { + + /** UserManagedKeysConfig clusterCa */ + clusterCa?: (string|null); + + /** UserManagedKeysConfig etcdApiCa */ + etcdApiCa?: (string|null); + + /** UserManagedKeysConfig etcdPeerCa */ + etcdPeerCa?: (string|null); + + /** UserManagedKeysConfig serviceAccountSigningKeys */ + serviceAccountSigningKeys?: (string[]|null); + + /** UserManagedKeysConfig serviceAccountVerificationKeys */ + serviceAccountVerificationKeys?: (string[]|null); + + /** UserManagedKeysConfig aggregationCa */ + aggregationCa?: (string|null); + + /** UserManagedKeysConfig controlPlaneDiskEncryptionKey */ + controlPlaneDiskEncryptionKey?: (string|null); + + /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey */ + gkeopsEtcdBackupEncryptionKey?: (string|null); + } + + /** Represents a UserManagedKeysConfig. */ + class UserManagedKeysConfig implements IUserManagedKeysConfig { + + /** + * Constructs a new UserManagedKeysConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUserManagedKeysConfig); + + /** UserManagedKeysConfig clusterCa. */ + public clusterCa: string; + + /** UserManagedKeysConfig etcdApiCa. */ + public etcdApiCa: string; + + /** UserManagedKeysConfig etcdPeerCa. */ + public etcdPeerCa: string; + + /** UserManagedKeysConfig serviceAccountSigningKeys. */ + public serviceAccountSigningKeys: string[]; + + /** UserManagedKeysConfig serviceAccountVerificationKeys. */ + public serviceAccountVerificationKeys: string[]; + + /** UserManagedKeysConfig aggregationCa. */ + public aggregationCa: string; + + /** UserManagedKeysConfig controlPlaneDiskEncryptionKey. */ + public controlPlaneDiskEncryptionKey: string; + + /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. */ + public gkeopsEtcdBackupEncryptionKey: string; + + /** + * Creates a new UserManagedKeysConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns UserManagedKeysConfig instance + */ + public static create(properties?: google.container.v1.IUserManagedKeysConfig): google.container.v1.UserManagedKeysConfig; + + /** + * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @param message UserManagedKeysConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @param message UserManagedKeysConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserManagedKeysConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserManagedKeysConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UserManagedKeysConfig; + + /** + * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserManagedKeysConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UserManagedKeysConfig; + + /** + * Verifies a UserManagedKeysConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserManagedKeysConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UserManagedKeysConfig; + + /** + * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. + * @param message UserManagedKeysConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UserManagedKeysConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserManagedKeysConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserManagedKeysConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompliancePostureConfig. */ + interface ICompliancePostureConfig { + + /** CompliancePostureConfig mode */ + mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); + + /** CompliancePostureConfig complianceStandards */ + complianceStandards?: (google.container.v1.CompliancePostureConfig.IComplianceStandard[]|null); + } + + /** Represents a CompliancePostureConfig. */ + class CompliancePostureConfig implements ICompliancePostureConfig { + + /** + * Constructs a new CompliancePostureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICompliancePostureConfig); + + /** CompliancePostureConfig mode. */ + public mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); + + /** CompliancePostureConfig complianceStandards. */ + public complianceStandards: google.container.v1.CompliancePostureConfig.IComplianceStandard[]; + + /** CompliancePostureConfig _mode. */ + public _mode?: "mode"; + + /** + * Creates a new CompliancePostureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CompliancePostureConfig instance + */ + public static create(properties?: google.container.v1.ICompliancePostureConfig): google.container.v1.CompliancePostureConfig; + + /** + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig; + + /** + * Verifies a CompliancePostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompliancePostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig; + + /** + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @param message CompliancePostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompliancePostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompliancePostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompliancePostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + + /** Properties of a ComplianceStandard. */ + interface IComplianceStandard { + + /** ComplianceStandard standard */ + standard?: (string|null); + } + + /** Represents a ComplianceStandard. */ + class ComplianceStandard implements IComplianceStandard { + + /** + * Constructs a new ComplianceStandard. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard); + + /** ComplianceStandard standard. */ + public standard?: (string|null); + + /** ComplianceStandard _standard. */ + public _standard?: "standard"; + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceStandard instance + */ + public static create(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Verifies a ComplianceStandard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceStandard + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @param message ComplianceStandard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComplianceStandard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComplianceStandard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a K8sBetaAPIConfig. */ + interface IK8sBetaAPIConfig { + + /** K8sBetaAPIConfig enabledApis */ + enabledApis?: (string[]|null); + } + + /** Represents a K8sBetaAPIConfig. */ + class K8sBetaAPIConfig implements IK8sBetaAPIConfig { + + /** + * Constructs a new K8sBetaAPIConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IK8sBetaAPIConfig); + + /** K8sBetaAPIConfig enabledApis. */ + public enabledApis: string[]; + + /** + * Creates a new K8sBetaAPIConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns K8sBetaAPIConfig instance + */ + public static create(properties?: google.container.v1.IK8sBetaAPIConfig): google.container.v1.K8sBetaAPIConfig; + + /** + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.K8sBetaAPIConfig; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.K8sBetaAPIConfig; + + /** + * Verifies a K8sBetaAPIConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns K8sBetaAPIConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.K8sBetaAPIConfig; + + /** + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * @param message K8sBetaAPIConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this K8sBetaAPIConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for K8sBetaAPIConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityPostureConfig. */ + interface ISecurityPostureConfig { + + /** SecurityPostureConfig mode */ + mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode */ + vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + } + + /** Represents a SecurityPostureConfig. */ + class SecurityPostureConfig implements ISecurityPostureConfig { + + /** + * Constructs a new SecurityPostureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecurityPostureConfig); + + /** SecurityPostureConfig mode. */ + public mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode. */ + public vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + + /** SecurityPostureConfig _mode. */ + public _mode?: "mode"; + + /** SecurityPostureConfig _vulnerabilityMode. */ + public _vulnerabilityMode?: "vulnerabilityMode"; + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityPostureConfig instance + */ + public static create(properties?: google.container.v1.ISecurityPostureConfig): google.container.v1.SecurityPostureConfig; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityPostureConfig; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityPostureConfig; + + /** + * Verifies a SecurityPostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityPostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityPostureConfig; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @param message SecurityPostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityPostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityPostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 2, + ENTERPRISE = 3 + } + + /** VulnerabilityMode enum. */ + enum VulnerabilityMode { + VULNERABILITY_MODE_UNSPECIFIED = 0, + VULNERABILITY_DISABLED = 1, + VULNERABILITY_BASIC = 2, + VULNERABILITY_ENTERPRISE = 3 + } + } + + /** Properties of a NodePoolAutoConfig. */ + interface INodePoolAutoConfig { + + /** NodePoolAutoConfig networkTags */ + networkTags?: (google.container.v1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags */ + resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig */ + nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** NodePoolAutoConfig linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + } + + /** Represents a NodePoolAutoConfig. */ + class NodePoolAutoConfig implements INodePoolAutoConfig { + + /** + * Constructs a new NodePoolAutoConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePoolAutoConfig); + + /** NodePoolAutoConfig networkTags. */ + public networkTags?: (google.container.v1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig. */ + public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** NodePoolAutoConfig linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolAutoConfig instance + */ + public static create(properties?: google.container.v1.INodePoolAutoConfig): google.container.v1.NodePoolAutoConfig; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoConfig; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoConfig; + + /** + * Verifies a NodePoolAutoConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolAutoConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolAutoConfig; + + /** + * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * @param message NodePoolAutoConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePoolAutoConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolAutoConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolAutoConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolDefaults. */ + interface INodePoolDefaults { + + /** NodePoolDefaults nodeConfigDefaults */ + nodeConfigDefaults?: (google.container.v1.INodeConfigDefaults|null); + } + + /** Represents a NodePoolDefaults. */ + class NodePoolDefaults implements INodePoolDefaults { + + /** + * Constructs a new NodePoolDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePoolDefaults); + + /** NodePoolDefaults nodeConfigDefaults. */ + public nodeConfigDefaults?: (google.container.v1.INodeConfigDefaults|null); + + /** + * Creates a new NodePoolDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolDefaults instance + */ + public static create(properties?: google.container.v1.INodePoolDefaults): google.container.v1.NodePoolDefaults; + + /** + * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @param message NodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @param message NodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolDefaults; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolDefaults; + + /** + * Verifies a NodePoolDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolDefaults; + + /** + * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * @param message NodePoolDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfigDefaults. */ + interface INodeConfigDefaults { + + /** NodeConfigDefaults gcfsConfig */ + gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** NodeConfigDefaults loggingConfig */ + loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** NodeConfigDefaults containerdConfig */ + containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** NodeConfigDefaults nodeKubeletConfig */ + nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + } + + /** Represents a NodeConfigDefaults. */ + class NodeConfigDefaults implements INodeConfigDefaults { + + /** + * Constructs a new NodeConfigDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeConfigDefaults); + + /** NodeConfigDefaults gcfsConfig. */ + public gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** NodeConfigDefaults loggingConfig. */ + public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** NodeConfigDefaults containerdConfig. */ + public containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** NodeConfigDefaults nodeKubeletConfig. */ + public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** + * Creates a new NodeConfigDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfigDefaults instance + */ + public static create(properties?: google.container.v1.INodeConfigDefaults): google.container.v1.NodeConfigDefaults; + + /** + * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. + * @param message NodeConfigDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. + * @param message NodeConfigDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeConfigDefaults; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeConfigDefaults; + + /** + * Verifies a NodeConfigDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfigDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeConfigDefaults; + + /** + * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. + * @param message NodeConfigDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeConfigDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfigDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfigDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterUpdate. */ + interface IClusterUpdate { + + /** ClusterUpdate desiredNodeVersion */ + desiredNodeVersion?: (string|null); + + /** ClusterUpdate desiredMonitoringService */ + desiredMonitoringService?: (string|null); + + /** ClusterUpdate desiredAddonsConfig */ + desiredAddonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** ClusterUpdate desiredNodePoolId */ + desiredNodePoolId?: (string|null); + + /** ClusterUpdate desiredImageType */ + desiredImageType?: (string|null); + + /** ClusterUpdate desiredDatabaseEncryption */ + desiredDatabaseEncryption?: (google.container.v1.IDatabaseEncryption|null); + + /** ClusterUpdate desiredWorkloadIdentityConfig */ + desiredWorkloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); + + /** ClusterUpdate desiredMeshCertificates */ + desiredMeshCertificates?: (google.container.v1.IMeshCertificates|null); + + /** ClusterUpdate desiredShieldedNodes */ + desiredShieldedNodes?: (google.container.v1.IShieldedNodes|null); + + /** ClusterUpdate desiredCostManagementConfig */ + desiredCostManagementConfig?: (google.container.v1.ICostManagementConfig|null); + + /** ClusterUpdate desiredDnsConfig */ + desiredDnsConfig?: (google.container.v1.IDNSConfig|null); + + /** ClusterUpdate desiredNodePoolAutoscaling */ + desiredNodePoolAutoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** ClusterUpdate desiredLocations */ + desiredLocations?: (string[]|null); + + /** ClusterUpdate desiredMasterAuthorizedNetworksConfig */ + desiredMasterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** ClusterUpdate desiredClusterAutoscaling */ + desiredClusterAutoscaling?: (google.container.v1.IClusterAutoscaling|null); + + /** ClusterUpdate desiredBinaryAuthorization */ + desiredBinaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); + + /** ClusterUpdate desiredLoggingService */ + desiredLoggingService?: (string|null); + + /** ClusterUpdate desiredResourceUsageExportConfig */ + desiredResourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); + + /** ClusterUpdate desiredVerticalPodAutoscaling */ + desiredVerticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); + + /** ClusterUpdate desiredPrivateClusterConfig */ + desiredPrivateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredIntraNodeVisibilityConfig */ + desiredIntraNodeVisibilityConfig?: (google.container.v1.IIntraNodeVisibilityConfig|null); + + /** ClusterUpdate desiredDefaultSnatStatus */ + desiredDefaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); + + /** ClusterUpdate desiredReleaseChannel */ + desiredReleaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** ClusterUpdate desiredL4ilbSubsettingConfig */ + desiredL4ilbSubsettingConfig?: (google.container.v1.IILBSubsettingConfig|null); + + /** ClusterUpdate desiredDatapathProvider */ + desiredDatapathProvider?: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider|null); + + /** ClusterUpdate desiredPrivateIpv6GoogleAccess */ + desiredPrivateIpv6GoogleAccess?: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess|null); + + /** ClusterUpdate desiredNotificationConfig */ + desiredNotificationConfig?: (google.container.v1.INotificationConfig|null); + + /** ClusterUpdate desiredAuthenticatorGroupsConfig */ + desiredAuthenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); + + /** ClusterUpdate desiredLoggingConfig */ + desiredLoggingConfig?: (google.container.v1.ILoggingConfig|null); + + /** ClusterUpdate desiredMonitoringConfig */ + desiredMonitoringConfig?: (google.container.v1.IMonitoringConfig|null); + + /** ClusterUpdate desiredIdentityServiceConfig */ + desiredIdentityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); + + /** ClusterUpdate desiredServiceExternalIpsConfig */ + desiredServiceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); + + /** ClusterUpdate desiredEnablePrivateEndpoint */ + desiredEnablePrivateEndpoint?: (boolean|null); + + /** ClusterUpdate desiredDefaultEnablePrivateNodes */ + desiredDefaultEnablePrivateNodes?: (boolean|null); + + /** ClusterUpdate desiredControlPlaneEndpointsConfig */ + desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + + /** ClusterUpdate desiredMasterVersion */ + desiredMasterVersion?: (string|null); + + /** ClusterUpdate desiredGcfsConfig */ + desiredGcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags */ + desiredNodePoolAutoConfigNetworkTags?: (google.container.v1.INetworkTags|null); + + /** ClusterUpdate desiredGatewayApiConfig */ + desiredGatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); + + /** ClusterUpdate etag */ + etag?: (string|null); + + /** ClusterUpdate desiredNodePoolLoggingConfig */ + desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** ClusterUpdate desiredFleet */ + desiredFleet?: (google.container.v1.IFleet|null); + + /** ClusterUpdate desiredStackType */ + desiredStackType?: (google.container.v1.StackType|keyof typeof google.container.v1.StackType|null); + + /** ClusterUpdate additionalPodRangesConfig */ + additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate removedAdditionalPodRangesConfig */ + removedAdditionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate enableK8sBetaApis */ + enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredSecurityPostureConfig */ + desiredSecurityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + + /** ClusterUpdate desiredNetworkPerformanceConfig */ + desiredNetworkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** ClusterUpdate desiredEnableFqdnNetworkPolicy */ + desiredEnableFqdnNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig */ + desiredAutopilotWorkloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); + + /** ClusterUpdate desiredK8sBetaApis */ + desiredK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredContainerdConfig */ + desiredContainerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** ClusterUpdate desiredEnableMultiNetworking */ + desiredEnableMultiNetworking?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags */ + desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** ClusterUpdate desiredInTransitEncryptionConfig */ + desiredInTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); + + /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy */ + desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredSecretManagerConfig */ + desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredCompliancePostureConfig */ + desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + + /** ClusterUpdate desiredNodeKubeletConfig */ + desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig */ + desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** ClusterUpdate userManagedKeysConfig */ + userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** ClusterUpdate desiredRbacBindingConfig */ + desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + + /** ClusterUpdate desiredEnterpriseConfig */ + desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig */ + desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + } + + /** Represents a ClusterUpdate. */ + class ClusterUpdate implements IClusterUpdate { + + /** + * Constructs a new ClusterUpdate. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IClusterUpdate); + + /** ClusterUpdate desiredNodeVersion. */ + public desiredNodeVersion: string; + + /** ClusterUpdate desiredMonitoringService. */ + public desiredMonitoringService: string; + + /** ClusterUpdate desiredAddonsConfig. */ + public desiredAddonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** ClusterUpdate desiredNodePoolId. */ + public desiredNodePoolId: string; + + /** ClusterUpdate desiredImageType. */ + public desiredImageType: string; + + /** ClusterUpdate desiredDatabaseEncryption. */ + public desiredDatabaseEncryption?: (google.container.v1.IDatabaseEncryption|null); + + /** ClusterUpdate desiredWorkloadIdentityConfig. */ + public desiredWorkloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); + + /** ClusterUpdate desiredMeshCertificates. */ + public desiredMeshCertificates?: (google.container.v1.IMeshCertificates|null); + + /** ClusterUpdate desiredShieldedNodes. */ + public desiredShieldedNodes?: (google.container.v1.IShieldedNodes|null); + + /** ClusterUpdate desiredCostManagementConfig. */ + public desiredCostManagementConfig?: (google.container.v1.ICostManagementConfig|null); + + /** ClusterUpdate desiredDnsConfig. */ + public desiredDnsConfig?: (google.container.v1.IDNSConfig|null); + + /** ClusterUpdate desiredNodePoolAutoscaling. */ + public desiredNodePoolAutoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** ClusterUpdate desiredLocations. */ + public desiredLocations: string[]; + + /** ClusterUpdate desiredMasterAuthorizedNetworksConfig. */ + public desiredMasterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** ClusterUpdate desiredClusterAutoscaling. */ + public desiredClusterAutoscaling?: (google.container.v1.IClusterAutoscaling|null); + + /** ClusterUpdate desiredBinaryAuthorization. */ + public desiredBinaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); + + /** ClusterUpdate desiredLoggingService. */ + public desiredLoggingService: string; + + /** ClusterUpdate desiredResourceUsageExportConfig. */ + public desiredResourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); + + /** ClusterUpdate desiredVerticalPodAutoscaling. */ + public desiredVerticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); + + /** ClusterUpdate desiredPrivateClusterConfig. */ + public desiredPrivateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredIntraNodeVisibilityConfig. */ + public desiredIntraNodeVisibilityConfig?: (google.container.v1.IIntraNodeVisibilityConfig|null); + + /** ClusterUpdate desiredDefaultSnatStatus. */ + public desiredDefaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); + + /** ClusterUpdate desiredReleaseChannel. */ + public desiredReleaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** ClusterUpdate desiredL4ilbSubsettingConfig. */ + public desiredL4ilbSubsettingConfig?: (google.container.v1.IILBSubsettingConfig|null); + + /** ClusterUpdate desiredDatapathProvider. */ + public desiredDatapathProvider: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider); + + /** ClusterUpdate desiredPrivateIpv6GoogleAccess. */ + public desiredPrivateIpv6GoogleAccess: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess); + + /** ClusterUpdate desiredNotificationConfig. */ + public desiredNotificationConfig?: (google.container.v1.INotificationConfig|null); + + /** ClusterUpdate desiredAuthenticatorGroupsConfig. */ + public desiredAuthenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); + + /** ClusterUpdate desiredLoggingConfig. */ + public desiredLoggingConfig?: (google.container.v1.ILoggingConfig|null); + + /** ClusterUpdate desiredMonitoringConfig. */ + public desiredMonitoringConfig?: (google.container.v1.IMonitoringConfig|null); + + /** ClusterUpdate desiredIdentityServiceConfig. */ + public desiredIdentityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); + + /** ClusterUpdate desiredServiceExternalIpsConfig. */ + public desiredServiceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); + + /** ClusterUpdate desiredEnablePrivateEndpoint. */ + public desiredEnablePrivateEndpoint?: (boolean|null); + + /** ClusterUpdate desiredDefaultEnablePrivateNodes. */ + public desiredDefaultEnablePrivateNodes?: (boolean|null); + + /** ClusterUpdate desiredControlPlaneEndpointsConfig. */ + public desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + + /** ClusterUpdate desiredMasterVersion. */ + public desiredMasterVersion: string; + + /** ClusterUpdate desiredGcfsConfig. */ + public desiredGcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags. */ + public desiredNodePoolAutoConfigNetworkTags?: (google.container.v1.INetworkTags|null); + + /** ClusterUpdate desiredGatewayApiConfig. */ + public desiredGatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); + + /** ClusterUpdate etag. */ + public etag: string; + + /** ClusterUpdate desiredNodePoolLoggingConfig. */ + public desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** ClusterUpdate desiredFleet. */ + public desiredFleet?: (google.container.v1.IFleet|null); + + /** ClusterUpdate desiredStackType. */ + public desiredStackType: (google.container.v1.StackType|keyof typeof google.container.v1.StackType); + + /** ClusterUpdate additionalPodRangesConfig. */ + public additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate removedAdditionalPodRangesConfig. */ + public removedAdditionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate enableK8sBetaApis. */ + public enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredSecurityPostureConfig. */ + public desiredSecurityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + + /** ClusterUpdate desiredNetworkPerformanceConfig. */ + public desiredNetworkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** ClusterUpdate desiredEnableFqdnNetworkPolicy. */ + public desiredEnableFqdnNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig. */ + public desiredAutopilotWorkloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); + + /** ClusterUpdate desiredK8sBetaApis. */ + public desiredK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredContainerdConfig. */ + public desiredContainerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** ClusterUpdate desiredEnableMultiNetworking. */ + public desiredEnableMultiNetworking?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. */ + public desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** ClusterUpdate desiredInTransitEncryptionConfig. */ + public desiredInTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); + + /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. */ + public desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredSecretManagerConfig. */ + public desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredCompliancePostureConfig. */ + public desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + + /** ClusterUpdate desiredNodeKubeletConfig. */ + public desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. */ + public desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** ClusterUpdate userManagedKeysConfig. */ + public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** ClusterUpdate desiredRbacBindingConfig. */ + public desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + + /** ClusterUpdate desiredEnterpriseConfig. */ + public desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. */ + public desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** ClusterUpdate _desiredEnablePrivateEndpoint. */ + public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; + + /** ClusterUpdate _desiredDefaultEnablePrivateNodes. */ + public _desiredDefaultEnablePrivateNodes?: "desiredDefaultEnablePrivateNodes"; + + /** ClusterUpdate _desiredEnableFqdnNetworkPolicy. */ + public _desiredEnableFqdnNetworkPolicy?: "desiredEnableFqdnNetworkPolicy"; + + /** ClusterUpdate _desiredEnableMultiNetworking. */ + public _desiredEnableMultiNetworking?: "desiredEnableMultiNetworking"; + + /** ClusterUpdate _desiredInTransitEncryptionConfig. */ + public _desiredInTransitEncryptionConfig?: "desiredInTransitEncryptionConfig"; + + /** ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. */ + public _desiredEnableCiliumClusterwideNetworkPolicy?: "desiredEnableCiliumClusterwideNetworkPolicy"; + + /** ClusterUpdate _desiredSecretManagerConfig. */ + public _desiredSecretManagerConfig?: "desiredSecretManagerConfig"; + + /** ClusterUpdate _desiredCompliancePostureConfig. */ + public _desiredCompliancePostureConfig?: "desiredCompliancePostureConfig"; + + /** ClusterUpdate _desiredRbacBindingConfig. */ + public _desiredRbacBindingConfig?: "desiredRbacBindingConfig"; + + /** + * Creates a new ClusterUpdate instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterUpdate instance + */ + public static create(properties?: google.container.v1.IClusterUpdate): google.container.v1.ClusterUpdate; + + /** + * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. + * @param message ClusterUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. + * @param message ClusterUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClusterUpdate; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClusterUpdate; + + /** + * Verifies a ClusterUpdate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterUpdate + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ClusterUpdate; + + /** + * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. + * @param message ClusterUpdate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ClusterUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterUpdate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterUpdate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdditionalPodRangesConfig. */ + interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); + + /** AdditionalPodRangesConfig podRangeInfo */ + podRangeInfo?: (google.container.v1.IRangeInfo[]|null); + } + + /** Represents an AdditionalPodRangesConfig. */ + class AdditionalPodRangesConfig implements IAdditionalPodRangesConfig { + + /** + * Constructs a new AdditionalPodRangesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdditionalPodRangesConfig); + + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + + /** AdditionalPodRangesConfig podRangeInfo. */ + public podRangeInfo: google.container.v1.IRangeInfo[]; + + /** + * Creates a new AdditionalPodRangesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalPodRangesConfig instance + */ + public static create(properties?: google.container.v1.IAdditionalPodRangesConfig): google.container.v1.AdditionalPodRangesConfig; + + /** + * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. + * @param message AdditionalPodRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. + * @param message AdditionalPodRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalPodRangesConfig; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalPodRangesConfig; + + /** + * Verifies an AdditionalPodRangesConfig message. + * @param message Plain 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 AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalPodRangesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalPodRangesConfig; + + /** + * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. + * @param message AdditionalPodRangesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdditionalPodRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalPodRangesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalPodRangesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RangeInfo. */ + interface IRangeInfo { + + /** RangeInfo rangeName */ + rangeName?: (string|null); + + /** RangeInfo utilization */ + utilization?: (number|null); + } + + /** Represents a RangeInfo. */ + class RangeInfo implements IRangeInfo { + + /** + * Constructs a new RangeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRangeInfo); + + /** RangeInfo rangeName. */ + public rangeName: string; + + /** RangeInfo utilization. */ + public utilization: number; + + /** + * Creates a new RangeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RangeInfo instance + */ + public static create(properties?: google.container.v1.IRangeInfo): google.container.v1.RangeInfo; + + /** + * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. + * @param message RangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. + * @param message RangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RangeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RangeInfo; + + /** + * Decodes a RangeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RangeInfo; + + /** + * Verifies a RangeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RangeInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RangeInfo; + + /** + * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. + * @param message RangeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RangeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RangeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RangeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DesiredEnterpriseConfig. */ + interface IDesiredEnterpriseConfig { + + /** DesiredEnterpriseConfig desiredTier */ + desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); + } + + /** Represents a DesiredEnterpriseConfig. */ + class DesiredEnterpriseConfig implements IDesiredEnterpriseConfig { + + /** + * Constructs a new DesiredEnterpriseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDesiredEnterpriseConfig); + + /** DesiredEnterpriseConfig desiredTier. */ + public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + + /** + * Creates a new DesiredEnterpriseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DesiredEnterpriseConfig instance + */ + public static create(properties?: google.container.v1.IDesiredEnterpriseConfig): google.container.v1.DesiredEnterpriseConfig; + + /** + * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @param message DesiredEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @param message DesiredEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DesiredEnterpriseConfig; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DesiredEnterpriseConfig; + + /** + * Verifies a DesiredEnterpriseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DesiredEnterpriseConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DesiredEnterpriseConfig; + + /** + * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. + * @param message DesiredEnterpriseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DesiredEnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DesiredEnterpriseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DesiredEnterpriseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation zone */ + zone?: (string|null); + + /** Operation operationType */ + operationType?: (google.container.v1.Operation.Type|keyof typeof google.container.v1.Operation.Type|null); + + /** Operation status */ + status?: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status|null); + + /** Operation detail */ + detail?: (string|null); + + /** Operation statusMessage */ + statusMessage?: (string|null); + + /** Operation selfLink */ + selfLink?: (string|null); + + /** Operation targetLink */ + targetLink?: (string|null); + + /** Operation location */ + location?: (string|null); + + /** Operation startTime */ + startTime?: (string|null); + + /** Operation endTime */ + endTime?: (string|null); + + /** Operation progress */ + progress?: (google.container.v1.IOperationProgress|null); + + /** Operation clusterConditions */ + clusterConditions?: (google.container.v1.IStatusCondition[]|null); + + /** Operation nodepoolConditions */ + nodepoolConditions?: (google.container.v1.IStatusCondition[]|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation zone. */ + public zone: string; + + /** Operation operationType. */ + public operationType: (google.container.v1.Operation.Type|keyof typeof google.container.v1.Operation.Type); + + /** Operation status. */ + public status: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status); + + /** Operation detail. */ + public detail: string; + + /** Operation statusMessage. */ + public statusMessage: string; + + /** Operation selfLink. */ + public selfLink: string; + + /** Operation targetLink. */ + public targetLink: string; + + /** Operation location. */ + public location: string; + + /** Operation startTime. */ + public startTime: string; + + /** Operation endTime. */ + public endTime: string; + + /** Operation progress. */ + public progress?: (google.container.v1.IOperationProgress|null); + + /** Operation clusterConditions. */ + public clusterConditions: google.container.v1.IStatusCondition[]; + + /** Operation nodepoolConditions. */ + public nodepoolConditions: google.container.v1.IStatusCondition[]; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.container.v1.IOperation): google.container.v1.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Operation { + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + DONE = 3, + ABORTING = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE_CLUSTER = 1, + DELETE_CLUSTER = 2, + UPGRADE_MASTER = 3, + UPGRADE_NODES = 4, + REPAIR_CLUSTER = 5, + UPDATE_CLUSTER = 6, + CREATE_NODE_POOL = 7, + DELETE_NODE_POOL = 8, + SET_NODE_POOL_MANAGEMENT = 9, + AUTO_REPAIR_NODES = 10, + AUTO_UPGRADE_NODES = 11, + SET_LABELS = 12, + SET_MASTER_AUTH = 13, + SET_NODE_POOL_SIZE = 14, + SET_NETWORK_POLICY = 15, + SET_MAINTENANCE_POLICY = 16, + RESIZE_CLUSTER = 18, + FLEET_FEATURE_UPGRADE = 19 + } + } + + /** Properties of an OperationProgress. */ + interface IOperationProgress { + + /** OperationProgress name */ + name?: (string|null); + + /** OperationProgress status */ + status?: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status|null); + + /** OperationProgress metrics */ + metrics?: (google.container.v1.OperationProgress.IMetric[]|null); + + /** OperationProgress stages */ + stages?: (google.container.v1.IOperationProgress[]|null); + } + + /** Represents an OperationProgress. */ + class OperationProgress implements IOperationProgress { + + /** + * Constructs a new OperationProgress. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IOperationProgress); + + /** OperationProgress name. */ + public name: string; + + /** OperationProgress status. */ + public status: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status); + + /** OperationProgress metrics. */ + public metrics: google.container.v1.OperationProgress.IMetric[]; + + /** OperationProgress stages. */ + public stages: google.container.v1.IOperationProgress[]; + + /** + * Creates a new OperationProgress instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationProgress instance + */ + public static create(properties?: google.container.v1.IOperationProgress): google.container.v1.OperationProgress; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.OperationProgress; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.OperationProgress; + + /** + * Verifies an OperationProgress message. + * @param message Plain 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 OperationProgress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationProgress + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.OperationProgress; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @param message OperationProgress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.OperationProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationProgress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationProgress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OperationProgress { + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric intValue */ + intValue?: (number|Long|string|null); + + /** Metric doubleValue */ + doubleValue?: (number|null); + + /** Metric stringValue */ + stringValue?: (string|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.OperationProgress.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric intValue. */ + public intValue?: (number|Long|string|null); + + /** Metric doubleValue. */ + public doubleValue?: (number|null); + + /** Metric stringValue. */ + public stringValue?: (string|null); + + /** Metric value. */ + public value?: ("intValue"|"doubleValue"|"stringValue"); + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.container.v1.OperationProgress.IMetric): google.container.v1.OperationProgress.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.OperationProgress.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.OperationProgress.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.OperationProgress.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.OperationProgress.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateClusterRequest. */ + interface ICreateClusterRequest { + + /** CreateClusterRequest projectId */ + projectId?: (string|null); + + /** CreateClusterRequest zone */ + zone?: (string|null); + + /** CreateClusterRequest cluster */ + cluster?: (google.container.v1.ICluster|null); + + /** CreateClusterRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateClusterRequest. */ + class CreateClusterRequest implements ICreateClusterRequest { + + /** + * Constructs a new CreateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICreateClusterRequest); + + /** CreateClusterRequest projectId. */ + public projectId: string; + + /** CreateClusterRequest zone. */ + public zone: string; + + /** CreateClusterRequest cluster. */ + public cluster?: (google.container.v1.ICluster|null); + + /** CreateClusterRequest parent. */ + public parent: string; + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateClusterRequest instance + */ + public static create(properties?: google.container.v1.ICreateClusterRequest): google.container.v1.CreateClusterRequest; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CreateClusterRequest; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CreateClusterRequest; + + /** + * Verifies a CreateClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CreateClusterRequest; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @param message CreateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CreateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetClusterRequest. */ + interface IGetClusterRequest { + + /** GetClusterRequest projectId */ + projectId?: (string|null); + + /** GetClusterRequest zone */ + zone?: (string|null); + + /** GetClusterRequest clusterId */ + clusterId?: (string|null); + + /** GetClusterRequest name */ + name?: (string|null); + } + + /** Represents a GetClusterRequest. */ + class GetClusterRequest implements IGetClusterRequest { + + /** + * Constructs a new GetClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetClusterRequest); + + /** GetClusterRequest projectId. */ + public projectId: string; + + /** GetClusterRequest zone. */ + public zone: string; + + /** GetClusterRequest clusterId. */ + public clusterId: string; + + /** GetClusterRequest name. */ + public name: string; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClusterRequest instance + */ + public static create(properties?: google.container.v1.IGetClusterRequest): google.container.v1.GetClusterRequest; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetClusterRequest; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetClusterRequest; + + /** + * Verifies a GetClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetClusterRequest; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @param message GetClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateClusterRequest. */ + interface IUpdateClusterRequest { + + /** UpdateClusterRequest projectId */ + projectId?: (string|null); + + /** UpdateClusterRequest zone */ + zone?: (string|null); + + /** UpdateClusterRequest clusterId */ + clusterId?: (string|null); + + /** UpdateClusterRequest update */ + update?: (google.container.v1.IClusterUpdate|null); + + /** UpdateClusterRequest name */ + name?: (string|null); + } + + /** Represents an UpdateClusterRequest. */ + class UpdateClusterRequest implements IUpdateClusterRequest { + + /** + * Constructs a new UpdateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpdateClusterRequest); + + /** UpdateClusterRequest projectId. */ + public projectId: string; + + /** UpdateClusterRequest zone. */ + public zone: string; + + /** UpdateClusterRequest clusterId. */ + public clusterId: string; + + /** UpdateClusterRequest update. */ + public update?: (google.container.v1.IClusterUpdate|null); + + /** UpdateClusterRequest name. */ + public name: string; + + /** + * Creates a new UpdateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateClusterRequest instance + */ + public static create(properties?: google.container.v1.IUpdateClusterRequest): google.container.v1.UpdateClusterRequest; + + /** + * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. + * @param message UpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. + * @param message UpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateClusterRequest; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateClusterRequest; + + /** + * Verifies an UpdateClusterRequest message. + * @param message Plain 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 UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateClusterRequest; + + /** + * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. + * @param message UpdateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateNodePoolRequest. */ + interface IUpdateNodePoolRequest { + + /** UpdateNodePoolRequest projectId */ + projectId?: (string|null); + + /** UpdateNodePoolRequest zone */ + zone?: (string|null); + + /** UpdateNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** UpdateNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** UpdateNodePoolRequest nodeVersion */ + nodeVersion?: (string|null); + + /** UpdateNodePoolRequest imageType */ + imageType?: (string|null); + + /** UpdateNodePoolRequest name */ + name?: (string|null); + + /** UpdateNodePoolRequest locations */ + locations?: (string[]|null); + + /** UpdateNodePoolRequest workloadMetadataConfig */ + workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); + + /** UpdateNodePoolRequest upgradeSettings */ + upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** UpdateNodePoolRequest tags */ + tags?: (google.container.v1.INetworkTags|null); + + /** UpdateNodePoolRequest taints */ + taints?: (google.container.v1.INodeTaints|null); + + /** UpdateNodePoolRequest labels */ + labels?: (google.container.v1.INodeLabels|null); + + /** UpdateNodePoolRequest linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** UpdateNodePoolRequest kubeletConfig */ + kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** UpdateNodePoolRequest nodeNetworkConfig */ + nodeNetworkConfig?: (google.container.v1.INodeNetworkConfig|null); + + /** UpdateNodePoolRequest gcfsConfig */ + gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** UpdateNodePoolRequest confidentialNodes */ + confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** UpdateNodePoolRequest gvnic */ + gvnic?: (google.container.v1.IVirtualNIC|null); + + /** UpdateNodePoolRequest etag */ + etag?: (string|null); + + /** UpdateNodePoolRequest fastSocket */ + fastSocket?: (google.container.v1.IFastSocket|null); + + /** UpdateNodePoolRequest loggingConfig */ + loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** UpdateNodePoolRequest resourceLabels */ + resourceLabels?: (google.container.v1.IResourceLabels|null); + + /** UpdateNodePoolRequest windowsNodeConfig */ + windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); + + /** UpdateNodePoolRequest accelerators */ + accelerators?: (google.container.v1.IAcceleratorConfig[]|null); + + /** UpdateNodePoolRequest machineType */ + machineType?: (string|null); + + /** UpdateNodePoolRequest diskType */ + diskType?: (string|null); + + /** UpdateNodePoolRequest diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** UpdateNodePoolRequest resourceManagerTags */ + resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** UpdateNodePoolRequest containerdConfig */ + containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** UpdateNodePoolRequest queuedProvisioning */ + queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + + /** UpdateNodePoolRequest storagePools */ + storagePools?: (string[]|null); + } + + /** Represents an UpdateNodePoolRequest. */ + class UpdateNodePoolRequest implements IUpdateNodePoolRequest { + + /** + * Constructs a new UpdateNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpdateNodePoolRequest); + + /** UpdateNodePoolRequest projectId. */ + public projectId: string; + + /** UpdateNodePoolRequest zone. */ + public zone: string; + + /** UpdateNodePoolRequest clusterId. */ + public clusterId: string; + + /** UpdateNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** UpdateNodePoolRequest nodeVersion. */ + public nodeVersion: string; + + /** UpdateNodePoolRequest imageType. */ + public imageType: string; + + /** UpdateNodePoolRequest name. */ + public name: string; + + /** UpdateNodePoolRequest locations. */ + public locations: string[]; + + /** UpdateNodePoolRequest workloadMetadataConfig. */ + public workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); + + /** UpdateNodePoolRequest upgradeSettings. */ + public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** UpdateNodePoolRequest tags. */ + public tags?: (google.container.v1.INetworkTags|null); + + /** UpdateNodePoolRequest taints. */ + public taints?: (google.container.v1.INodeTaints|null); + + /** UpdateNodePoolRequest labels. */ + public labels?: (google.container.v1.INodeLabels|null); + + /** UpdateNodePoolRequest linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + + /** UpdateNodePoolRequest kubeletConfig. */ + public kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** UpdateNodePoolRequest nodeNetworkConfig. */ + public nodeNetworkConfig?: (google.container.v1.INodeNetworkConfig|null); + + /** UpdateNodePoolRequest gcfsConfig. */ + public gcfsConfig?: (google.container.v1.IGcfsConfig|null); + + /** UpdateNodePoolRequest confidentialNodes. */ + public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); + + /** UpdateNodePoolRequest gvnic. */ + public gvnic?: (google.container.v1.IVirtualNIC|null); + + /** UpdateNodePoolRequest etag. */ + public etag: string; + + /** UpdateNodePoolRequest fastSocket. */ + public fastSocket?: (google.container.v1.IFastSocket|null); + + /** UpdateNodePoolRequest loggingConfig. */ + public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + + /** UpdateNodePoolRequest resourceLabels. */ + public resourceLabels?: (google.container.v1.IResourceLabels|null); + + /** UpdateNodePoolRequest windowsNodeConfig. */ + public windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); + + /** UpdateNodePoolRequest accelerators. */ + public accelerators: google.container.v1.IAcceleratorConfig[]; + + /** UpdateNodePoolRequest machineType. */ + public machineType: string; + + /** UpdateNodePoolRequest diskType. */ + public diskType: string; + + /** UpdateNodePoolRequest diskSizeGb. */ + public diskSizeGb: (number|Long|string); + + /** UpdateNodePoolRequest resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** UpdateNodePoolRequest containerdConfig. */ + public containerdConfig?: (google.container.v1.IContainerdConfig|null); + + /** UpdateNodePoolRequest queuedProvisioning. */ + public queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + + /** UpdateNodePoolRequest storagePools. */ + public storagePools: string[]; + + /** + * Creates a new UpdateNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateNodePoolRequest instance + */ + public static create(properties?: google.container.v1.IUpdateNodePoolRequest): google.container.v1.UpdateNodePoolRequest; + + /** + * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. + * @param message UpdateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. + * @param message UpdateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateNodePoolRequest; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateNodePoolRequest; + + /** + * Verifies an UpdateNodePoolRequest message. + * @param message Plain 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 UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateNodePoolRequest; + + /** + * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. + * @param message UpdateNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpdateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolAutoscalingRequest. */ + interface ISetNodePoolAutoscalingRequest { + + /** SetNodePoolAutoscalingRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolAutoscalingRequest zone */ + zone?: (string|null); + + /** SetNodePoolAutoscalingRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolAutoscalingRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolAutoscalingRequest autoscaling */ + autoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** SetNodePoolAutoscalingRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolAutoscalingRequest. */ + class SetNodePoolAutoscalingRequest implements ISetNodePoolAutoscalingRequest { + + /** + * Constructs a new SetNodePoolAutoscalingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetNodePoolAutoscalingRequest); + + /** SetNodePoolAutoscalingRequest projectId. */ + public projectId: string; + + /** SetNodePoolAutoscalingRequest zone. */ + public zone: string; + + /** SetNodePoolAutoscalingRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolAutoscalingRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolAutoscalingRequest autoscaling. */ + public autoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** SetNodePoolAutoscalingRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolAutoscalingRequest instance + */ + public static create(properties?: google.container.v1.ISetNodePoolAutoscalingRequest): google.container.v1.SetNodePoolAutoscalingRequest; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @param message SetNodePoolAutoscalingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @param message SetNodePoolAutoscalingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolAutoscalingRequest; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolAutoscalingRequest; + + /** + * Verifies a SetNodePoolAutoscalingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolAutoscalingRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolAutoscalingRequest; + + /** + * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. + * @param message SetNodePoolAutoscalingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetNodePoolAutoscalingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolAutoscalingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolAutoscalingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLoggingServiceRequest. */ + interface ISetLoggingServiceRequest { + + /** SetLoggingServiceRequest projectId */ + projectId?: (string|null); + + /** SetLoggingServiceRequest zone */ + zone?: (string|null); + + /** SetLoggingServiceRequest clusterId */ + clusterId?: (string|null); + + /** SetLoggingServiceRequest loggingService */ + loggingService?: (string|null); + + /** SetLoggingServiceRequest name */ + name?: (string|null); + } + + /** Represents a SetLoggingServiceRequest. */ + class SetLoggingServiceRequest implements ISetLoggingServiceRequest { + + /** + * Constructs a new SetLoggingServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetLoggingServiceRequest); + + /** SetLoggingServiceRequest projectId. */ + public projectId: string; + + /** SetLoggingServiceRequest zone. */ + public zone: string; + + /** SetLoggingServiceRequest clusterId. */ + public clusterId: string; + + /** SetLoggingServiceRequest loggingService. */ + public loggingService: string; + + /** SetLoggingServiceRequest name. */ + public name: string; + + /** + * Creates a new SetLoggingServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLoggingServiceRequest instance + */ + public static create(properties?: google.container.v1.ISetLoggingServiceRequest): google.container.v1.SetLoggingServiceRequest; + + /** + * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. + * @param message SetLoggingServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. + * @param message SetLoggingServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLoggingServiceRequest; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLoggingServiceRequest; + + /** + * Verifies a SetLoggingServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLoggingServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetLoggingServiceRequest; + + /** + * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. + * @param message SetLoggingServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetLoggingServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLoggingServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLoggingServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMonitoringServiceRequest. */ + interface ISetMonitoringServiceRequest { + + /** SetMonitoringServiceRequest projectId */ + projectId?: (string|null); + + /** SetMonitoringServiceRequest zone */ + zone?: (string|null); + + /** SetMonitoringServiceRequest clusterId */ + clusterId?: (string|null); + + /** SetMonitoringServiceRequest monitoringService */ + monitoringService?: (string|null); + + /** SetMonitoringServiceRequest name */ + name?: (string|null); + } + + /** Represents a SetMonitoringServiceRequest. */ + class SetMonitoringServiceRequest implements ISetMonitoringServiceRequest { + + /** + * Constructs a new SetMonitoringServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetMonitoringServiceRequest); + + /** SetMonitoringServiceRequest projectId. */ + public projectId: string; + + /** SetMonitoringServiceRequest zone. */ + public zone: string; + + /** SetMonitoringServiceRequest clusterId. */ + public clusterId: string; + + /** SetMonitoringServiceRequest monitoringService. */ + public monitoringService: string; + + /** SetMonitoringServiceRequest name. */ + public name: string; + + /** + * Creates a new SetMonitoringServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMonitoringServiceRequest instance + */ + public static create(properties?: google.container.v1.ISetMonitoringServiceRequest): google.container.v1.SetMonitoringServiceRequest; + + /** + * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. + * @param message SetMonitoringServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. + * @param message SetMonitoringServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMonitoringServiceRequest; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMonitoringServiceRequest; + + /** + * Verifies a SetMonitoringServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMonitoringServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetMonitoringServiceRequest; + + /** + * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. + * @param message SetMonitoringServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetMonitoringServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMonitoringServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMonitoringServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetAddonsConfigRequest. */ + interface ISetAddonsConfigRequest { + + /** SetAddonsConfigRequest projectId */ + projectId?: (string|null); + + /** SetAddonsConfigRequest zone */ + zone?: (string|null); + + /** SetAddonsConfigRequest clusterId */ + clusterId?: (string|null); + + /** SetAddonsConfigRequest addonsConfig */ + addonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** SetAddonsConfigRequest name */ + name?: (string|null); + } + + /** Represents a SetAddonsConfigRequest. */ + class SetAddonsConfigRequest implements ISetAddonsConfigRequest { + + /** + * Constructs a new SetAddonsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetAddonsConfigRequest); + + /** SetAddonsConfigRequest projectId. */ + public projectId: string; + + /** SetAddonsConfigRequest zone. */ + public zone: string; + + /** SetAddonsConfigRequest clusterId. */ + public clusterId: string; + + /** SetAddonsConfigRequest addonsConfig. */ + public addonsConfig?: (google.container.v1.IAddonsConfig|null); + + /** SetAddonsConfigRequest name. */ + public name: string; + + /** + * Creates a new SetAddonsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetAddonsConfigRequest instance + */ + public static create(properties?: google.container.v1.ISetAddonsConfigRequest): google.container.v1.SetAddonsConfigRequest; + + /** + * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. + * @param message SetAddonsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. + * @param message SetAddonsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetAddonsConfigRequest; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetAddonsConfigRequest; + + /** + * Verifies a SetAddonsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetAddonsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetAddonsConfigRequest; + + /** + * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. + * @param message SetAddonsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetAddonsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetAddonsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetAddonsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLocationsRequest. */ + interface ISetLocationsRequest { + + /** SetLocationsRequest projectId */ + projectId?: (string|null); + + /** SetLocationsRequest zone */ + zone?: (string|null); + + /** SetLocationsRequest clusterId */ + clusterId?: (string|null); + + /** SetLocationsRequest locations */ + locations?: (string[]|null); + + /** SetLocationsRequest name */ + name?: (string|null); + } + + /** Represents a SetLocationsRequest. */ + class SetLocationsRequest implements ISetLocationsRequest { + + /** + * Constructs a new SetLocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetLocationsRequest); + + /** SetLocationsRequest projectId. */ + public projectId: string; + + /** SetLocationsRequest zone. */ + public zone: string; + + /** SetLocationsRequest clusterId. */ + public clusterId: string; + + /** SetLocationsRequest locations. */ + public locations: string[]; + + /** SetLocationsRequest name. */ + public name: string; + + /** + * Creates a new SetLocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLocationsRequest instance + */ + public static create(properties?: google.container.v1.ISetLocationsRequest): google.container.v1.SetLocationsRequest; + + /** + * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. + * @param message SetLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. + * @param message SetLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLocationsRequest; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLocationsRequest; + + /** + * Verifies a SetLocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetLocationsRequest; + + /** + * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. + * @param message SetLocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMasterRequest. */ + interface IUpdateMasterRequest { + + /** UpdateMasterRequest projectId */ + projectId?: (string|null); + + /** UpdateMasterRequest zone */ + zone?: (string|null); + + /** UpdateMasterRequest clusterId */ + clusterId?: (string|null); + + /** UpdateMasterRequest masterVersion */ + masterVersion?: (string|null); + + /** UpdateMasterRequest name */ + name?: (string|null); + } + + /** Represents an UpdateMasterRequest. */ + class UpdateMasterRequest implements IUpdateMasterRequest { + + /** + * Constructs a new UpdateMasterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpdateMasterRequest); + + /** UpdateMasterRequest projectId. */ + public projectId: string; + + /** UpdateMasterRequest zone. */ + public zone: string; + + /** UpdateMasterRequest clusterId. */ + public clusterId: string; + + /** UpdateMasterRequest masterVersion. */ + public masterVersion: string; + + /** UpdateMasterRequest name. */ + public name: string; + + /** + * Creates a new UpdateMasterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMasterRequest instance + */ + public static create(properties?: google.container.v1.IUpdateMasterRequest): google.container.v1.UpdateMasterRequest; + + /** + * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. + * @param message UpdateMasterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. + * @param message UpdateMasterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateMasterRequest; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateMasterRequest; + + /** + * Verifies an UpdateMasterRequest message. + * @param message Plain 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 UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMasterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateMasterRequest; + + /** + * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. + * @param message UpdateMasterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpdateMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMasterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMasterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMasterAuthRequest. */ + interface ISetMasterAuthRequest { + + /** SetMasterAuthRequest projectId */ + projectId?: (string|null); + + /** SetMasterAuthRequest zone */ + zone?: (string|null); + + /** SetMasterAuthRequest clusterId */ + clusterId?: (string|null); + + /** SetMasterAuthRequest action */ + action?: (google.container.v1.SetMasterAuthRequest.Action|keyof typeof google.container.v1.SetMasterAuthRequest.Action|null); + + /** SetMasterAuthRequest update */ + update?: (google.container.v1.IMasterAuth|null); + + /** SetMasterAuthRequest name */ + name?: (string|null); + } + + /** Represents a SetMasterAuthRequest. */ + class SetMasterAuthRequest implements ISetMasterAuthRequest { + + /** + * Constructs a new SetMasterAuthRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetMasterAuthRequest); + + /** SetMasterAuthRequest projectId. */ + public projectId: string; + + /** SetMasterAuthRequest zone. */ + public zone: string; + + /** SetMasterAuthRequest clusterId. */ + public clusterId: string; + + /** SetMasterAuthRequest action. */ + public action: (google.container.v1.SetMasterAuthRequest.Action|keyof typeof google.container.v1.SetMasterAuthRequest.Action); + + /** SetMasterAuthRequest update. */ + public update?: (google.container.v1.IMasterAuth|null); + + /** SetMasterAuthRequest name. */ + public name: string; + + /** + * Creates a new SetMasterAuthRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMasterAuthRequest instance + */ + public static create(properties?: google.container.v1.ISetMasterAuthRequest): google.container.v1.SetMasterAuthRequest; + + /** + * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. + * @param message SetMasterAuthRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. + * @param message SetMasterAuthRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMasterAuthRequest; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMasterAuthRequest; + + /** + * Verifies a SetMasterAuthRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMasterAuthRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetMasterAuthRequest; + + /** + * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. + * @param message SetMasterAuthRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetMasterAuthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMasterAuthRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMasterAuthRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SetMasterAuthRequest { + + /** Action enum. */ + enum Action { + UNKNOWN = 0, + SET_PASSWORD = 1, + GENERATE_PASSWORD = 2, + SET_USERNAME = 3 + } + } + + /** Properties of a DeleteClusterRequest. */ + interface IDeleteClusterRequest { + + /** DeleteClusterRequest projectId */ + projectId?: (string|null); + + /** DeleteClusterRequest zone */ + zone?: (string|null); + + /** DeleteClusterRequest clusterId */ + clusterId?: (string|null); + + /** DeleteClusterRequest name */ + name?: (string|null); + } + + /** Represents a DeleteClusterRequest. */ + class DeleteClusterRequest implements IDeleteClusterRequest { + + /** + * Constructs a new DeleteClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDeleteClusterRequest); + + /** DeleteClusterRequest projectId. */ + public projectId: string; + + /** DeleteClusterRequest zone. */ + public zone: string; + + /** DeleteClusterRequest clusterId. */ + public clusterId: string; + + /** DeleteClusterRequest name. */ + public name: string; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteClusterRequest instance + */ + public static create(properties?: google.container.v1.IDeleteClusterRequest): google.container.v1.DeleteClusterRequest; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DeleteClusterRequest; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DeleteClusterRequest; + + /** + * Verifies a DeleteClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DeleteClusterRequest; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @param message DeleteClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DeleteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersRequest. */ + interface IListClustersRequest { + + /** ListClustersRequest projectId */ + projectId?: (string|null); + + /** ListClustersRequest zone */ + zone?: (string|null); + + /** ListClustersRequest parent */ + parent?: (string|null); + } + + /** Represents a ListClustersRequest. */ + class ListClustersRequest implements IListClustersRequest { + + /** + * Constructs a new ListClustersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListClustersRequest); + + /** ListClustersRequest projectId. */ + public projectId: string; + + /** ListClustersRequest zone. */ + public zone: string; + + /** ListClustersRequest parent. */ + public parent: string; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersRequest instance + */ + public static create(properties?: google.container.v1.IListClustersRequest): google.container.v1.ListClustersRequest; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListClustersRequest; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListClustersRequest; + + /** + * Verifies a ListClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListClustersRequest; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @param message ListClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersResponse. */ + interface IListClustersResponse { + + /** ListClustersResponse clusters */ + clusters?: (google.container.v1.ICluster[]|null); + + /** ListClustersResponse missingZones */ + missingZones?: (string[]|null); + } + + /** Represents a ListClustersResponse. */ + class ListClustersResponse implements IListClustersResponse { + + /** + * Constructs a new ListClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListClustersResponse); + + /** ListClustersResponse clusters. */ + public clusters: google.container.v1.ICluster[]; + + /** ListClustersResponse missingZones. */ + public missingZones: string[]; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersResponse instance + */ + public static create(properties?: google.container.v1.IListClustersResponse): google.container.v1.ListClustersResponse; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListClustersResponse; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListClustersResponse; + + /** + * Verifies a ListClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListClustersResponse; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @param message ListClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest projectId */ + projectId?: (string|null); + + /** GetOperationRequest zone */ + zone?: (string|null); + + /** GetOperationRequest operationId */ + operationId?: (string|null); + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetOperationRequest); + + /** GetOperationRequest projectId. */ + public projectId: string; + + /** GetOperationRequest zone. */ + public zone: string; + + /** GetOperationRequest operationId. */ + public operationId: string; + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.container.v1.IGetOperationRequest): google.container.v1.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest projectId */ + projectId?: (string|null); + + /** ListOperationsRequest zone */ + zone?: (string|null); + + /** ListOperationsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListOperationsRequest); + + /** ListOperationsRequest projectId. */ + public projectId: string; + + /** ListOperationsRequest zone. */ + public zone: string; + + /** ListOperationsRequest parent. */ + public parent: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.container.v1.IListOperationsRequest): google.container.v1.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest projectId */ + projectId?: (string|null); + + /** CancelOperationRequest zone */ + zone?: (string|null); + + /** CancelOperationRequest operationId */ + operationId?: (string|null); + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICancelOperationRequest); + + /** CancelOperationRequest projectId. */ + public projectId: string; + + /** CancelOperationRequest zone. */ + public zone: string; + + /** CancelOperationRequest operationId. */ + public operationId: string; + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.container.v1.ICancelOperationRequest): google.container.v1.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.container.v1.IOperation[]|null); + + /** ListOperationsResponse missingZones */ + missingZones?: (string[]|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.container.v1.IOperation[]; + + /** ListOperationsResponse missingZones. */ + public missingZones: string[]; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.container.v1.IListOperationsResponse): google.container.v1.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetServerConfigRequest. */ + interface IGetServerConfigRequest { + + /** GetServerConfigRequest projectId */ + projectId?: (string|null); + + /** GetServerConfigRequest zone */ + zone?: (string|null); + + /** GetServerConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetServerConfigRequest. */ + class GetServerConfigRequest implements IGetServerConfigRequest { + + /** + * Constructs a new GetServerConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetServerConfigRequest); + + /** GetServerConfigRequest projectId. */ + public projectId: string; + + /** GetServerConfigRequest zone. */ + public zone: string; + + /** GetServerConfigRequest name. */ + public name: string; + + /** + * Creates a new GetServerConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServerConfigRequest instance + */ + public static create(properties?: google.container.v1.IGetServerConfigRequest): google.container.v1.GetServerConfigRequest; + + /** + * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. + * @param message GetServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. + * @param message GetServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetServerConfigRequest; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetServerConfigRequest; + + /** + * Verifies a GetServerConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServerConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetServerConfigRequest; + + /** + * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. + * @param message GetServerConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetServerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServerConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServerConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerConfig. */ + interface IServerConfig { + + /** ServerConfig defaultClusterVersion */ + defaultClusterVersion?: (string|null); + + /** ServerConfig validNodeVersions */ + validNodeVersions?: (string[]|null); + + /** ServerConfig defaultImageType */ + defaultImageType?: (string|null); + + /** ServerConfig validImageTypes */ + validImageTypes?: (string[]|null); + + /** ServerConfig validMasterVersions */ + validMasterVersions?: (string[]|null); + + /** ServerConfig channels */ + channels?: (google.container.v1.ServerConfig.IReleaseChannelConfig[]|null); + } + + /** Represents a ServerConfig. */ + class ServerConfig implements IServerConfig { + + /** + * Constructs a new ServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IServerConfig); + + /** ServerConfig defaultClusterVersion. */ + public defaultClusterVersion: string; + + /** ServerConfig validNodeVersions. */ + public validNodeVersions: string[]; + + /** ServerConfig defaultImageType. */ + public defaultImageType: string; + + /** ServerConfig validImageTypes. */ + public validImageTypes: string[]; + + /** ServerConfig validMasterVersions. */ + public validMasterVersions: string[]; + + /** ServerConfig channels. */ + public channels: google.container.v1.ServerConfig.IReleaseChannelConfig[]; + + /** + * Creates a new ServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerConfig instance + */ + public static create(properties?: google.container.v1.IServerConfig): google.container.v1.ServerConfig; + + /** + * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. + * @param message ServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. + * @param message ServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServerConfig; + + /** + * Decodes a ServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServerConfig; + + /** + * Verifies a ServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ServerConfig; + + /** + * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. + * @param message ServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ServerConfig { + + /** Properties of a ReleaseChannelConfig. */ + interface IReleaseChannelConfig { + + /** ReleaseChannelConfig channel */ + channel?: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel|null); + + /** ReleaseChannelConfig defaultVersion */ + defaultVersion?: (string|null); + + /** ReleaseChannelConfig validVersions */ + validVersions?: (string[]|null); + + /** ReleaseChannelConfig upgradeTargetVersion */ + upgradeTargetVersion?: (string|null); + } + + /** Represents a ReleaseChannelConfig. */ + class ReleaseChannelConfig implements IReleaseChannelConfig { + + /** + * Constructs a new ReleaseChannelConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ServerConfig.IReleaseChannelConfig); + + /** ReleaseChannelConfig channel. */ + public channel: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel); + + /** ReleaseChannelConfig defaultVersion. */ + public defaultVersion: string; + + /** ReleaseChannelConfig validVersions. */ + public validVersions: string[]; + + /** ReleaseChannelConfig upgradeTargetVersion. */ + public upgradeTargetVersion: string; + + /** + * Creates a new ReleaseChannelConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseChannelConfig instance + */ + public static create(properties?: google.container.v1.ServerConfig.IReleaseChannelConfig): google.container.v1.ServerConfig.ReleaseChannelConfig; + + /** + * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @param message ReleaseChannelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @param message ReleaseChannelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServerConfig.ReleaseChannelConfig; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServerConfig.ReleaseChannelConfig; + + /** + * Verifies a ReleaseChannelConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseChannelConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ServerConfig.ReleaseChannelConfig; + + /** + * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. + * @param message ReleaseChannelConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ServerConfig.ReleaseChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseChannelConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseChannelConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateNodePoolRequest. */ + interface ICreateNodePoolRequest { + + /** CreateNodePoolRequest projectId */ + projectId?: (string|null); + + /** CreateNodePoolRequest zone */ + zone?: (string|null); + + /** CreateNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** CreateNodePoolRequest nodePool */ + nodePool?: (google.container.v1.INodePool|null); + + /** CreateNodePoolRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateNodePoolRequest. */ + class CreateNodePoolRequest implements ICreateNodePoolRequest { + + /** + * Constructs a new CreateNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICreateNodePoolRequest); + + /** CreateNodePoolRequest projectId. */ + public projectId: string; + + /** CreateNodePoolRequest zone. */ + public zone: string; + + /** CreateNodePoolRequest clusterId. */ + public clusterId: string; + + /** CreateNodePoolRequest nodePool. */ + public nodePool?: (google.container.v1.INodePool|null); + + /** CreateNodePoolRequest parent. */ + public parent: string; + + /** + * Creates a new CreateNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateNodePoolRequest instance + */ + public static create(properties?: google.container.v1.ICreateNodePoolRequest): google.container.v1.CreateNodePoolRequest; + + /** + * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. + * @param message CreateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. + * @param message CreateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CreateNodePoolRequest; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CreateNodePoolRequest; + + /** + * Verifies a CreateNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CreateNodePoolRequest; + + /** + * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. + * @param message CreateNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CreateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteNodePoolRequest. */ + interface IDeleteNodePoolRequest { + + /** DeleteNodePoolRequest projectId */ + projectId?: (string|null); + + /** DeleteNodePoolRequest zone */ + zone?: (string|null); + + /** DeleteNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** DeleteNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** DeleteNodePoolRequest name */ + name?: (string|null); + } + + /** Represents a DeleteNodePoolRequest. */ + class DeleteNodePoolRequest implements IDeleteNodePoolRequest { + + /** + * Constructs a new DeleteNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDeleteNodePoolRequest); + + /** DeleteNodePoolRequest projectId. */ + public projectId: string; + + /** DeleteNodePoolRequest zone. */ + public zone: string; + + /** DeleteNodePoolRequest clusterId. */ + public clusterId: string; + + /** DeleteNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** DeleteNodePoolRequest name. */ + public name: string; + + /** + * Creates a new DeleteNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteNodePoolRequest instance + */ + public static create(properties?: google.container.v1.IDeleteNodePoolRequest): google.container.v1.DeleteNodePoolRequest; + + /** + * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. + * @param message DeleteNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. + * @param message DeleteNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DeleteNodePoolRequest; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DeleteNodePoolRequest; + + /** + * Verifies a DeleteNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DeleteNodePoolRequest; + + /** + * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. + * @param message DeleteNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DeleteNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNodePoolsRequest. */ + interface IListNodePoolsRequest { + + /** ListNodePoolsRequest projectId */ + projectId?: (string|null); + + /** ListNodePoolsRequest zone */ + zone?: (string|null); + + /** ListNodePoolsRequest clusterId */ + clusterId?: (string|null); + + /** ListNodePoolsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListNodePoolsRequest. */ + class ListNodePoolsRequest implements IListNodePoolsRequest { + + /** + * Constructs a new ListNodePoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListNodePoolsRequest); + + /** ListNodePoolsRequest projectId. */ + public projectId: string; + + /** ListNodePoolsRequest zone. */ + public zone: string; + + /** ListNodePoolsRequest clusterId. */ + public clusterId: string; + + /** ListNodePoolsRequest parent. */ + public parent: string; + + /** + * Creates a new ListNodePoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNodePoolsRequest instance + */ + public static create(properties?: google.container.v1.IListNodePoolsRequest): google.container.v1.ListNodePoolsRequest; + + /** + * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. + * @param message ListNodePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. + * @param message ListNodePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListNodePoolsRequest; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListNodePoolsRequest; + + /** + * Verifies a ListNodePoolsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNodePoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListNodePoolsRequest; + + /** + * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. + * @param message ListNodePoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListNodePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNodePoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNodePoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNodePoolRequest. */ + interface IGetNodePoolRequest { + + /** GetNodePoolRequest projectId */ + projectId?: (string|null); + + /** GetNodePoolRequest zone */ + zone?: (string|null); + + /** GetNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** GetNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** GetNodePoolRequest name */ + name?: (string|null); + } + + /** Represents a GetNodePoolRequest. */ + class GetNodePoolRequest implements IGetNodePoolRequest { + + /** + * Constructs a new GetNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetNodePoolRequest); + + /** GetNodePoolRequest projectId. */ + public projectId: string; + + /** GetNodePoolRequest zone. */ + public zone: string; + + /** GetNodePoolRequest clusterId. */ + public clusterId: string; + + /** GetNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** GetNodePoolRequest name. */ + public name: string; + + /** + * Creates a new GetNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNodePoolRequest instance + */ + public static create(properties?: google.container.v1.IGetNodePoolRequest): google.container.v1.GetNodePoolRequest; + + /** + * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. + * @param message GetNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. + * @param message GetNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetNodePoolRequest; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetNodePoolRequest; + + /** + * Verifies a GetNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetNodePoolRequest; + + /** + * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. + * @param message GetNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BlueGreenSettings. */ + interface IBlueGreenSettings { + + /** BlueGreenSettings standardRolloutPolicy */ + standardRolloutPolicy?: (google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null); + + /** BlueGreenSettings nodePoolSoakDuration */ + nodePoolSoakDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a BlueGreenSettings. */ + class BlueGreenSettings implements IBlueGreenSettings { + + /** + * Constructs a new BlueGreenSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IBlueGreenSettings); + + /** BlueGreenSettings standardRolloutPolicy. */ + public standardRolloutPolicy?: (google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null); + + /** BlueGreenSettings nodePoolSoakDuration. */ + public nodePoolSoakDuration?: (google.protobuf.IDuration|null); + + /** BlueGreenSettings rolloutPolicy. */ + public rolloutPolicy?: "standardRolloutPolicy"; + + /** BlueGreenSettings _nodePoolSoakDuration. */ + public _nodePoolSoakDuration?: "nodePoolSoakDuration"; + + /** + * Creates a new BlueGreenSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns BlueGreenSettings instance + */ + public static create(properties?: google.container.v1.IBlueGreenSettings): google.container.v1.BlueGreenSettings; + + /** + * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. + * @param message BlueGreenSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. + * @param message BlueGreenSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BlueGreenSettings; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BlueGreenSettings; + + /** + * Verifies a BlueGreenSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlueGreenSettings + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.BlueGreenSettings; + + /** + * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. + * @param message BlueGreenSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.BlueGreenSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlueGreenSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlueGreenSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BlueGreenSettings { + + /** Properties of a StandardRolloutPolicy. */ + interface IStandardRolloutPolicy { + + /** StandardRolloutPolicy batchPercentage */ + batchPercentage?: (number|null); + + /** StandardRolloutPolicy batchNodeCount */ + batchNodeCount?: (number|null); + + /** StandardRolloutPolicy batchSoakDuration */ + batchSoakDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a StandardRolloutPolicy. */ + class StandardRolloutPolicy implements IStandardRolloutPolicy { + + /** + * Constructs a new StandardRolloutPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy); + + /** StandardRolloutPolicy batchPercentage. */ + public batchPercentage?: (number|null); + + /** StandardRolloutPolicy batchNodeCount. */ + public batchNodeCount?: (number|null); + + /** StandardRolloutPolicy batchSoakDuration. */ + public batchSoakDuration?: (google.protobuf.IDuration|null); + + /** StandardRolloutPolicy updateBatchSize. */ + public updateBatchSize?: ("batchPercentage"|"batchNodeCount"); + + /** StandardRolloutPolicy _batchSoakDuration. */ + public _batchSoakDuration?: "batchSoakDuration"; + + /** + * Creates a new StandardRolloutPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardRolloutPolicy instance + */ + public static create(properties?: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @param message StandardRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @param message StandardRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Verifies a StandardRolloutPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardRolloutPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. + * @param message StandardRolloutPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.BlueGreenSettings.StandardRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardRolloutPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardRolloutPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodePool. */ + interface INodePool { + + /** NodePool name */ + name?: (string|null); + + /** NodePool config */ + config?: (google.container.v1.INodeConfig|null); + + /** NodePool initialNodeCount */ + initialNodeCount?: (number|null); + + /** NodePool locations */ + locations?: (string[]|null); + + /** NodePool networkConfig */ + networkConfig?: (google.container.v1.INodeNetworkConfig|null); + + /** NodePool selfLink */ + selfLink?: (string|null); + + /** NodePool version */ + version?: (string|null); + + /** NodePool instanceGroupUrls */ + instanceGroupUrls?: (string[]|null); + + /** NodePool status */ + status?: (google.container.v1.NodePool.Status|keyof typeof google.container.v1.NodePool.Status|null); + + /** NodePool statusMessage */ + statusMessage?: (string|null); + + /** NodePool autoscaling */ + autoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** NodePool management */ + management?: (google.container.v1.INodeManagement|null); + + /** NodePool maxPodsConstraint */ + maxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); + + /** NodePool conditions */ + conditions?: (google.container.v1.IStatusCondition[]|null); + + /** NodePool podIpv4CidrSize */ + podIpv4CidrSize?: (number|null); + + /** NodePool upgradeSettings */ + upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** NodePool placementPolicy */ + placementPolicy?: (google.container.v1.NodePool.IPlacementPolicy|null); + + /** NodePool updateInfo */ + updateInfo?: (google.container.v1.NodePool.IUpdateInfo|null); + + /** NodePool etag */ + etag?: (string|null); + + /** NodePool queuedProvisioning */ + queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + + /** NodePool bestEffortProvisioning */ + bestEffortProvisioning?: (google.container.v1.IBestEffortProvisioning|null); + } + + /** Represents a NodePool. */ + class NodePool implements INodePool { + + /** + * Constructs a new NodePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePool); + + /** NodePool name. */ + public name: string; + + /** NodePool config. */ + public config?: (google.container.v1.INodeConfig|null); + + /** NodePool initialNodeCount. */ + public initialNodeCount: number; + + /** NodePool locations. */ + public locations: string[]; + + /** NodePool networkConfig. */ + public networkConfig?: (google.container.v1.INodeNetworkConfig|null); + + /** NodePool selfLink. */ + public selfLink: string; + + /** NodePool version. */ + public version: string; + + /** NodePool instanceGroupUrls. */ + public instanceGroupUrls: string[]; + + /** NodePool status. */ + public status: (google.container.v1.NodePool.Status|keyof typeof google.container.v1.NodePool.Status); + + /** NodePool statusMessage. */ + public statusMessage: string; + + /** NodePool autoscaling. */ + public autoscaling?: (google.container.v1.INodePoolAutoscaling|null); + + /** NodePool management. */ + public management?: (google.container.v1.INodeManagement|null); + + /** NodePool maxPodsConstraint. */ + public maxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); + + /** NodePool conditions. */ + public conditions: google.container.v1.IStatusCondition[]; + + /** NodePool podIpv4CidrSize. */ + public podIpv4CidrSize: number; + + /** NodePool upgradeSettings. */ + public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** NodePool placementPolicy. */ + public placementPolicy?: (google.container.v1.NodePool.IPlacementPolicy|null); + + /** NodePool updateInfo. */ + public updateInfo?: (google.container.v1.NodePool.IUpdateInfo|null); + + /** NodePool etag. */ + public etag: string; + + /** NodePool queuedProvisioning. */ + public queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + + /** NodePool bestEffortProvisioning. */ + public bestEffortProvisioning?: (google.container.v1.IBestEffortProvisioning|null); + + /** + * Creates a new NodePool instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePool instance + */ + public static create(properties?: google.container.v1.INodePool): google.container.v1.NodePool; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool; + + /** + * Verifies a NodePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePool + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @param message NodePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodePool { + + /** Properties of an UpgradeSettings. */ + interface IUpgradeSettings { + + /** UpgradeSettings maxSurge */ + maxSurge?: (number|null); + + /** UpgradeSettings maxUnavailable */ + maxUnavailable?: (number|null); + + /** UpgradeSettings strategy */ + strategy?: (google.container.v1.NodePoolUpdateStrategy|keyof typeof google.container.v1.NodePoolUpdateStrategy|null); + + /** UpgradeSettings blueGreenSettings */ + blueGreenSettings?: (google.container.v1.IBlueGreenSettings|null); + } + + /** Represents an UpgradeSettings. */ + class UpgradeSettings implements IUpgradeSettings { + + /** + * Constructs a new UpgradeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodePool.IUpgradeSettings); + + /** UpgradeSettings maxSurge. */ + public maxSurge: number; + + /** UpgradeSettings maxUnavailable. */ + public maxUnavailable: number; + + /** UpgradeSettings strategy. */ + public strategy?: (google.container.v1.NodePoolUpdateStrategy|keyof typeof google.container.v1.NodePoolUpdateStrategy|null); + + /** UpgradeSettings blueGreenSettings. */ + public blueGreenSettings?: (google.container.v1.IBlueGreenSettings|null); + + /** UpgradeSettings _strategy. */ + public _strategy?: "strategy"; + + /** UpgradeSettings _blueGreenSettings. */ + public _blueGreenSettings?: "blueGreenSettings"; + + /** + * Creates a new UpgradeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeSettings instance + */ + public static create(properties?: google.container.v1.NodePool.IUpgradeSettings): google.container.v1.NodePool.UpgradeSettings; + + /** + * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. + * @param message UpgradeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. + * @param message UpgradeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpgradeSettings; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpgradeSettings; + + /** + * Verifies an UpgradeSettings message. + * @param message Plain 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 UpgradeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeSettings + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpgradeSettings; + + /** + * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. + * @param message UpgradeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool.UpgradeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateInfo. */ + interface IUpdateInfo { + + /** UpdateInfo blueGreenInfo */ + blueGreenInfo?: (google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null); + } + + /** Represents an UpdateInfo. */ + class UpdateInfo implements IUpdateInfo { + + /** + * Constructs a new UpdateInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodePool.IUpdateInfo); + + /** UpdateInfo blueGreenInfo. */ + public blueGreenInfo?: (google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null); + + /** + * Creates a new UpdateInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateInfo instance + */ + public static create(properties?: google.container.v1.NodePool.IUpdateInfo): google.container.v1.NodePool.UpdateInfo; + + /** + * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. + * @param message UpdateInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. + * @param message UpdateInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpdateInfo; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpdateInfo; + + /** + * Verifies an UpdateInfo message. + * @param message Plain 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 UpdateInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpdateInfo; + + /** + * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. + * @param message UpdateInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool.UpdateInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UpdateInfo { + + /** Properties of a BlueGreenInfo. */ + interface IBlueGreenInfo { + + /** BlueGreenInfo phase */ + phase?: (google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null); + + /** BlueGreenInfo blueInstanceGroupUrls */ + blueInstanceGroupUrls?: (string[]|null); + + /** BlueGreenInfo greenInstanceGroupUrls */ + greenInstanceGroupUrls?: (string[]|null); + + /** BlueGreenInfo bluePoolDeletionStartTime */ + bluePoolDeletionStartTime?: (string|null); + + /** BlueGreenInfo greenPoolVersion */ + greenPoolVersion?: (string|null); + } + + /** Represents a BlueGreenInfo. */ + class BlueGreenInfo implements IBlueGreenInfo { + + /** + * Constructs a new BlueGreenInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo); + + /** BlueGreenInfo phase. */ + public phase: (google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase); + + /** BlueGreenInfo blueInstanceGroupUrls. */ + public blueInstanceGroupUrls: string[]; + + /** BlueGreenInfo greenInstanceGroupUrls. */ + public greenInstanceGroupUrls: string[]; + + /** BlueGreenInfo bluePoolDeletionStartTime. */ + public bluePoolDeletionStartTime: string; + + /** BlueGreenInfo greenPoolVersion. */ + public greenPoolVersion: string; + + /** + * Creates a new BlueGreenInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BlueGreenInfo instance + */ + public static create(properties?: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @param message BlueGreenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @param message BlueGreenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Verifies a BlueGreenInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlueGreenInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. + * @param message BlueGreenInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool.UpdateInfo.BlueGreenInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlueGreenInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlueGreenInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BlueGreenInfo { + + /** Phase enum. */ + enum Phase { + PHASE_UNSPECIFIED = 0, + UPDATE_STARTED = 1, + CREATING_GREEN_POOL = 2, + CORDONING_BLUE_POOL = 3, + DRAINING_BLUE_POOL = 4, + NODE_POOL_SOAKING = 5, + DELETING_BLUE_POOL = 6, + ROLLBACK_STARTED = 7 + } + } + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RUNNING_WITH_ERROR = 3, + RECONCILING = 4, + STOPPING = 5, + ERROR = 6 + } + + /** Properties of a PlacementPolicy. */ + interface IPlacementPolicy { + + /** PlacementPolicy type */ + type?: (google.container.v1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1.NodePool.PlacementPolicy.Type|null); + + /** PlacementPolicy tpuTopology */ + tpuTopology?: (string|null); + + /** PlacementPolicy policyName */ + policyName?: (string|null); + } + + /** Represents a PlacementPolicy. */ + class PlacementPolicy implements IPlacementPolicy { + + /** + * Constructs a new PlacementPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodePool.IPlacementPolicy); + + /** PlacementPolicy type. */ + public type: (google.container.v1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1.NodePool.PlacementPolicy.Type); + + /** PlacementPolicy tpuTopology. */ + public tpuTopology: string; + + /** PlacementPolicy policyName. */ + public policyName: string; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacementPolicy instance + */ + public static create(properties?: google.container.v1.NodePool.IPlacementPolicy): google.container.v1.NodePool.PlacementPolicy; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.PlacementPolicy; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.PlacementPolicy; + + /** + * Verifies a PlacementPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacementPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.PlacementPolicy; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @param message PlacementPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacementPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacementPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PlacementPolicy { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + COMPACT = 1 + } + } + + /** Properties of a QueuedProvisioning. */ + interface IQueuedProvisioning { + + /** QueuedProvisioning enabled */ + enabled?: (boolean|null); + } + + /** Represents a QueuedProvisioning. */ + class QueuedProvisioning implements IQueuedProvisioning { + + /** + * Constructs a new QueuedProvisioning. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NodePool.IQueuedProvisioning); + + /** QueuedProvisioning enabled. */ + public enabled: boolean; + + /** + * Creates a new QueuedProvisioning instance using the specified properties. + * @param [properties] Properties to set + * @returns QueuedProvisioning instance + */ + public static create(properties?: google.container.v1.NodePool.IQueuedProvisioning): google.container.v1.NodePool.QueuedProvisioning; + + /** + * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. + * @param message QueuedProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. + * @param message QueuedProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.QueuedProvisioning; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.QueuedProvisioning; + + /** + * Verifies a QueuedProvisioning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueuedProvisioning + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.QueuedProvisioning; + + /** + * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. + * @param message QueuedProvisioning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePool.QueuedProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueuedProvisioning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueuedProvisioning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodeManagement. */ + interface INodeManagement { + + /** NodeManagement autoUpgrade */ + autoUpgrade?: (boolean|null); + + /** NodeManagement autoRepair */ + autoRepair?: (boolean|null); + + /** NodeManagement upgradeOptions */ + upgradeOptions?: (google.container.v1.IAutoUpgradeOptions|null); + } + + /** Represents a NodeManagement. */ + class NodeManagement implements INodeManagement { + + /** + * Constructs a new NodeManagement. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodeManagement); + + /** NodeManagement autoUpgrade. */ + public autoUpgrade: boolean; + + /** NodeManagement autoRepair. */ + public autoRepair: boolean; + + /** NodeManagement upgradeOptions. */ + public upgradeOptions?: (google.container.v1.IAutoUpgradeOptions|null); + + /** + * Creates a new NodeManagement instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeManagement instance + */ + public static create(properties?: google.container.v1.INodeManagement): google.container.v1.NodeManagement; + + /** + * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. + * @param message NodeManagement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. + * @param message NodeManagement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeManagement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeManagement; + + /** + * Decodes a NodeManagement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeManagement; + + /** + * Verifies a NodeManagement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeManagement + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodeManagement; + + /** + * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. + * @param message NodeManagement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodeManagement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeManagement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeManagement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BestEffortProvisioning. */ + interface IBestEffortProvisioning { + + /** BestEffortProvisioning enabled */ + enabled?: (boolean|null); + + /** BestEffortProvisioning minProvisionNodes */ + minProvisionNodes?: (number|null); + } + + /** Represents a BestEffortProvisioning. */ + class BestEffortProvisioning implements IBestEffortProvisioning { + + /** + * Constructs a new BestEffortProvisioning. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IBestEffortProvisioning); + + /** BestEffortProvisioning enabled. */ + public enabled: boolean; + + /** BestEffortProvisioning minProvisionNodes. */ + public minProvisionNodes: number; + + /** + * Creates a new BestEffortProvisioning instance using the specified properties. + * @param [properties] Properties to set + * @returns BestEffortProvisioning instance + */ + public static create(properties?: google.container.v1.IBestEffortProvisioning): google.container.v1.BestEffortProvisioning; + + /** + * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. + * @param message BestEffortProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. + * @param message BestEffortProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BestEffortProvisioning; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BestEffortProvisioning; + + /** + * Verifies a BestEffortProvisioning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BestEffortProvisioning + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.BestEffortProvisioning; + + /** + * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. + * @param message BestEffortProvisioning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.BestEffortProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BestEffortProvisioning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BestEffortProvisioning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoUpgradeOptions. */ + interface IAutoUpgradeOptions { + + /** AutoUpgradeOptions autoUpgradeStartTime */ + autoUpgradeStartTime?: (string|null); + + /** AutoUpgradeOptions description */ + description?: (string|null); + } + + /** Represents an AutoUpgradeOptions. */ + class AutoUpgradeOptions implements IAutoUpgradeOptions { + + /** + * Constructs a new AutoUpgradeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAutoUpgradeOptions); + + /** AutoUpgradeOptions autoUpgradeStartTime. */ + public autoUpgradeStartTime: string; + + /** AutoUpgradeOptions description. */ + public description: string; + + /** + * Creates a new AutoUpgradeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoUpgradeOptions instance + */ + public static create(properties?: google.container.v1.IAutoUpgradeOptions): google.container.v1.AutoUpgradeOptions; + + /** + * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. + * @param message AutoUpgradeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. + * @param message AutoUpgradeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutoUpgradeOptions; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutoUpgradeOptions; + + /** + * Verifies an AutoUpgradeOptions message. + * @param message Plain 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 AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoUpgradeOptions + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AutoUpgradeOptions; + + /** + * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. + * @param message AutoUpgradeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AutoUpgradeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoUpgradeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoUpgradeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenancePolicy. */ + interface IMaintenancePolicy { + + /** MaintenancePolicy window */ + window?: (google.container.v1.IMaintenanceWindow|null); + + /** MaintenancePolicy resourceVersion */ + resourceVersion?: (string|null); + } + + /** Represents a MaintenancePolicy. */ + class MaintenancePolicy implements IMaintenancePolicy { + + /** + * Constructs a new MaintenancePolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMaintenancePolicy); + + /** MaintenancePolicy window. */ + public window?: (google.container.v1.IMaintenanceWindow|null); + + /** MaintenancePolicy resourceVersion. */ + public resourceVersion: string; + + /** + * Creates a new MaintenancePolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenancePolicy instance + */ + public static create(properties?: google.container.v1.IMaintenancePolicy): google.container.v1.MaintenancePolicy; + + /** + * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. + * @param message MaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. + * @param message MaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenancePolicy; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenancePolicy; + + /** + * Verifies a MaintenancePolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenancePolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenancePolicy; + + /** + * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. + * @param message MaintenancePolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenancePolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenancePolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow dailyMaintenanceWindow */ + dailyMaintenanceWindow?: (google.container.v1.IDailyMaintenanceWindow|null); + + /** MaintenanceWindow recurringWindow */ + recurringWindow?: (google.container.v1.IRecurringTimeWindow|null); + + /** MaintenanceWindow maintenanceExclusions */ + maintenanceExclusions?: ({ [k: string]: google.container.v1.ITimeWindow }|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMaintenanceWindow); + + /** MaintenanceWindow dailyMaintenanceWindow. */ + public dailyMaintenanceWindow?: (google.container.v1.IDailyMaintenanceWindow|null); + + /** MaintenanceWindow recurringWindow. */ + public recurringWindow?: (google.container.v1.IRecurringTimeWindow|null); + + /** MaintenanceWindow maintenanceExclusions. */ + public maintenanceExclusions: { [k: string]: google.container.v1.ITimeWindow }; + + /** MaintenanceWindow policy. */ + public policy?: ("dailyMaintenanceWindow"|"recurringWindow"); + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.container.v1.IMaintenanceWindow): google.container.v1.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeWindow. */ + interface ITimeWindow { + + /** TimeWindow maintenanceExclusionOptions */ + maintenanceExclusionOptions?: (google.container.v1.IMaintenanceExclusionOptions|null); + + /** TimeWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeWindow. */ + class TimeWindow implements ITimeWindow { + + /** + * Constructs a new TimeWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ITimeWindow); + + /** TimeWindow maintenanceExclusionOptions. */ + public maintenanceExclusionOptions?: (google.container.v1.IMaintenanceExclusionOptions|null); + + /** TimeWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow options. */ + public options?: "maintenanceExclusionOptions"; + + /** + * Creates a new TimeWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeWindow instance + */ + public static create(properties?: google.container.v1.ITimeWindow): google.container.v1.TimeWindow; + + /** + * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.TimeWindow; + + /** + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.TimeWindow; + + /** + * Verifies a TimeWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.TimeWindow; + + /** + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @param message TimeWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceExclusionOptions. */ + interface IMaintenanceExclusionOptions { + + /** MaintenanceExclusionOptions scope */ + scope?: (google.container.v1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1.MaintenanceExclusionOptions.Scope|null); + } + + /** Represents a MaintenanceExclusionOptions. */ + class MaintenanceExclusionOptions implements IMaintenanceExclusionOptions { + + /** + * Constructs a new MaintenanceExclusionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMaintenanceExclusionOptions); + + /** MaintenanceExclusionOptions scope. */ + public scope: (google.container.v1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1.MaintenanceExclusionOptions.Scope); + + /** + * Creates a new MaintenanceExclusionOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceExclusionOptions instance + */ + public static create(properties?: google.container.v1.IMaintenanceExclusionOptions): google.container.v1.MaintenanceExclusionOptions; + + /** + * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. + * @param message MaintenanceExclusionOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. + * @param message MaintenanceExclusionOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenanceExclusionOptions; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenanceExclusionOptions; + + /** + * Verifies a MaintenanceExclusionOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceExclusionOptions + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenanceExclusionOptions; + + /** + * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. + * @param message MaintenanceExclusionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MaintenanceExclusionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceExclusionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceExclusionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MaintenanceExclusionOptions { + + /** Scope enum. */ + enum Scope { + NO_UPGRADES = 0, + NO_MINOR_UPGRADES = 1, + NO_MINOR_OR_NODE_UPGRADES = 2 + } + } + + /** Properties of a RecurringTimeWindow. */ + interface IRecurringTimeWindow { + + /** RecurringTimeWindow window */ + window?: (google.container.v1.ITimeWindow|null); + + /** RecurringTimeWindow recurrence */ + recurrence?: (string|null); + } + + /** Represents a RecurringTimeWindow. */ + class RecurringTimeWindow implements IRecurringTimeWindow { + + /** + * Constructs a new RecurringTimeWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRecurringTimeWindow); + + /** RecurringTimeWindow window. */ + public window?: (google.container.v1.ITimeWindow|null); + + /** RecurringTimeWindow recurrence. */ + public recurrence: string; + + /** + * Creates a new RecurringTimeWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringTimeWindow instance + */ + public static create(properties?: google.container.v1.IRecurringTimeWindow): google.container.v1.RecurringTimeWindow; + + /** + * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. + * @param message RecurringTimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. + * @param message RecurringTimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RecurringTimeWindow; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RecurringTimeWindow; + + /** + * Verifies a RecurringTimeWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringTimeWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RecurringTimeWindow; + + /** + * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. + * @param message RecurringTimeWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RecurringTimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringTimeWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringTimeWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DailyMaintenanceWindow. */ + interface IDailyMaintenanceWindow { + + /** DailyMaintenanceWindow startTime */ + startTime?: (string|null); + + /** DailyMaintenanceWindow duration */ + duration?: (string|null); + } + + /** Represents a DailyMaintenanceWindow. */ + class DailyMaintenanceWindow implements IDailyMaintenanceWindow { + + /** + * Constructs a new DailyMaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDailyMaintenanceWindow); + + /** DailyMaintenanceWindow startTime. */ + public startTime: string; + + /** DailyMaintenanceWindow duration. */ + public duration: string; + + /** + * Creates a new DailyMaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns DailyMaintenanceWindow instance + */ + public static create(properties?: google.container.v1.IDailyMaintenanceWindow): google.container.v1.DailyMaintenanceWindow; + + /** + * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. + * @param message DailyMaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. + * @param message DailyMaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DailyMaintenanceWindow; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DailyMaintenanceWindow; + + /** + * Verifies a DailyMaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DailyMaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DailyMaintenanceWindow; + + /** + * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. + * @param message DailyMaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DailyMaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DailyMaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DailyMaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolManagementRequest. */ + interface ISetNodePoolManagementRequest { + + /** SetNodePoolManagementRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolManagementRequest zone */ + zone?: (string|null); + + /** SetNodePoolManagementRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolManagementRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolManagementRequest management */ + management?: (google.container.v1.INodeManagement|null); + + /** SetNodePoolManagementRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolManagementRequest. */ + class SetNodePoolManagementRequest implements ISetNodePoolManagementRequest { + + /** + * Constructs a new SetNodePoolManagementRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetNodePoolManagementRequest); + + /** SetNodePoolManagementRequest projectId. */ + public projectId: string; + + /** SetNodePoolManagementRequest zone. */ + public zone: string; + + /** SetNodePoolManagementRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolManagementRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolManagementRequest management. */ + public management?: (google.container.v1.INodeManagement|null); + + /** SetNodePoolManagementRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolManagementRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolManagementRequest instance + */ + public static create(properties?: google.container.v1.ISetNodePoolManagementRequest): google.container.v1.SetNodePoolManagementRequest; + + /** + * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. + * @param message SetNodePoolManagementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. + * @param message SetNodePoolManagementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolManagementRequest; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolManagementRequest; + + /** + * Verifies a SetNodePoolManagementRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolManagementRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolManagementRequest; + + /** + * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. + * @param message SetNodePoolManagementRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetNodePoolManagementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolManagementRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolManagementRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolSizeRequest. */ + interface ISetNodePoolSizeRequest { + + /** SetNodePoolSizeRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolSizeRequest zone */ + zone?: (string|null); + + /** SetNodePoolSizeRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolSizeRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolSizeRequest nodeCount */ + nodeCount?: (number|null); + + /** SetNodePoolSizeRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolSizeRequest. */ + class SetNodePoolSizeRequest implements ISetNodePoolSizeRequest { + + /** + * Constructs a new SetNodePoolSizeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetNodePoolSizeRequest); + + /** SetNodePoolSizeRequest projectId. */ + public projectId: string; + + /** SetNodePoolSizeRequest zone. */ + public zone: string; + + /** SetNodePoolSizeRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolSizeRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolSizeRequest nodeCount. */ + public nodeCount: number; + + /** SetNodePoolSizeRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolSizeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolSizeRequest instance + */ + public static create(properties?: google.container.v1.ISetNodePoolSizeRequest): google.container.v1.SetNodePoolSizeRequest; + + /** + * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. + * @param message SetNodePoolSizeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. + * @param message SetNodePoolSizeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolSizeRequest; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolSizeRequest; + + /** + * Verifies a SetNodePoolSizeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolSizeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolSizeRequest; + + /** + * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. + * @param message SetNodePoolSizeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetNodePoolSizeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolSizeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolSizeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompleteNodePoolUpgradeRequest. */ + interface ICompleteNodePoolUpgradeRequest { + + /** CompleteNodePoolUpgradeRequest name */ + name?: (string|null); + } + + /** Represents a CompleteNodePoolUpgradeRequest. */ + class CompleteNodePoolUpgradeRequest implements ICompleteNodePoolUpgradeRequest { + + /** + * Constructs a new CompleteNodePoolUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICompleteNodePoolUpgradeRequest); + + /** CompleteNodePoolUpgradeRequest name. */ + public name: string; + + /** + * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteNodePoolUpgradeRequest instance + */ + public static create(properties?: google.container.v1.ICompleteNodePoolUpgradeRequest): google.container.v1.CompleteNodePoolUpgradeRequest; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @param message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @param message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompleteNodePoolUpgradeRequest; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompleteNodePoolUpgradeRequest; + + /** + * Verifies a CompleteNodePoolUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteNodePoolUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompleteNodePoolUpgradeRequest; + + /** + * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @param message CompleteNodePoolUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompleteNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompleteNodePoolUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompleteNodePoolUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RollbackNodePoolUpgradeRequest. */ + interface IRollbackNodePoolUpgradeRequest { + + /** RollbackNodePoolUpgradeRequest projectId */ + projectId?: (string|null); + + /** RollbackNodePoolUpgradeRequest zone */ + zone?: (string|null); + + /** RollbackNodePoolUpgradeRequest clusterId */ + clusterId?: (string|null); + + /** RollbackNodePoolUpgradeRequest nodePoolId */ + nodePoolId?: (string|null); + + /** RollbackNodePoolUpgradeRequest name */ + name?: (string|null); + + /** RollbackNodePoolUpgradeRequest respectPdb */ + respectPdb?: (boolean|null); + } + + /** Represents a RollbackNodePoolUpgradeRequest. */ + class RollbackNodePoolUpgradeRequest implements IRollbackNodePoolUpgradeRequest { + + /** + * Constructs a new RollbackNodePoolUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRollbackNodePoolUpgradeRequest); + + /** RollbackNodePoolUpgradeRequest projectId. */ + public projectId: string; + + /** RollbackNodePoolUpgradeRequest zone. */ + public zone: string; + + /** RollbackNodePoolUpgradeRequest clusterId. */ + public clusterId: string; + + /** RollbackNodePoolUpgradeRequest nodePoolId. */ + public nodePoolId: string; + + /** RollbackNodePoolUpgradeRequest name. */ + public name: string; + + /** RollbackNodePoolUpgradeRequest respectPdb. */ + public respectPdb: boolean; + + /** + * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackNodePoolUpgradeRequest instance + */ + public static create(properties?: google.container.v1.IRollbackNodePoolUpgradeRequest): google.container.v1.RollbackNodePoolUpgradeRequest; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @param message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @param message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RollbackNodePoolUpgradeRequest; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RollbackNodePoolUpgradeRequest; + + /** + * Verifies a RollbackNodePoolUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackNodePoolUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RollbackNodePoolUpgradeRequest; + + /** + * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @param message RollbackNodePoolUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RollbackNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackNodePoolUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackNodePoolUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNodePoolsResponse. */ + interface IListNodePoolsResponse { + + /** ListNodePoolsResponse nodePools */ + nodePools?: (google.container.v1.INodePool[]|null); + } + + /** Represents a ListNodePoolsResponse. */ + class ListNodePoolsResponse implements IListNodePoolsResponse { + + /** + * Constructs a new ListNodePoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListNodePoolsResponse); + + /** ListNodePoolsResponse nodePools. */ + public nodePools: google.container.v1.INodePool[]; + + /** + * Creates a new ListNodePoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNodePoolsResponse instance + */ + public static create(properties?: google.container.v1.IListNodePoolsResponse): google.container.v1.ListNodePoolsResponse; + + /** + * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. + * @param message ListNodePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. + * @param message ListNodePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListNodePoolsResponse; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListNodePoolsResponse; + + /** + * Verifies a ListNodePoolsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNodePoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListNodePoolsResponse; + + /** + * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. + * @param message ListNodePoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListNodePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNodePoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNodePoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterAutoscaling. */ + interface IClusterAutoscaling { + + /** ClusterAutoscaling enableNodeAutoprovisioning */ + enableNodeAutoprovisioning?: (boolean|null); + + /** ClusterAutoscaling resourceLimits */ + resourceLimits?: (google.container.v1.IResourceLimit[]|null); + + /** ClusterAutoscaling autoscalingProfile */ + autoscalingProfile?: (google.container.v1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1.ClusterAutoscaling.AutoscalingProfile|null); + + /** ClusterAutoscaling autoprovisioningNodePoolDefaults */ + autoprovisioningNodePoolDefaults?: (google.container.v1.IAutoprovisioningNodePoolDefaults|null); + + /** ClusterAutoscaling autoprovisioningLocations */ + autoprovisioningLocations?: (string[]|null); + } + + /** Represents a ClusterAutoscaling. */ + class ClusterAutoscaling implements IClusterAutoscaling { + + /** + * Constructs a new ClusterAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IClusterAutoscaling); + + /** ClusterAutoscaling enableNodeAutoprovisioning. */ + public enableNodeAutoprovisioning: boolean; + + /** ClusterAutoscaling resourceLimits. */ + public resourceLimits: google.container.v1.IResourceLimit[]; + + /** ClusterAutoscaling autoscalingProfile. */ + public autoscalingProfile: (google.container.v1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1.ClusterAutoscaling.AutoscalingProfile); + + /** ClusterAutoscaling autoprovisioningNodePoolDefaults. */ + public autoprovisioningNodePoolDefaults?: (google.container.v1.IAutoprovisioningNodePoolDefaults|null); + + /** ClusterAutoscaling autoprovisioningLocations. */ + public autoprovisioningLocations: string[]; + + /** + * Creates a new ClusterAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterAutoscaling instance + */ + public static create(properties?: google.container.v1.IClusterAutoscaling): google.container.v1.ClusterAutoscaling; + + /** + * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. + * @param message ClusterAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. + * @param message ClusterAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClusterAutoscaling; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClusterAutoscaling; + + /** + * Verifies a ClusterAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ClusterAutoscaling; + + /** + * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. + * @param message ClusterAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ClusterAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterAutoscaling { + + /** AutoscalingProfile enum. */ + enum AutoscalingProfile { + PROFILE_UNSPECIFIED = 0, + OPTIMIZE_UTILIZATION = 1, + BALANCED = 2 + } + } + + /** Properties of an AutoprovisioningNodePoolDefaults. */ + interface IAutoprovisioningNodePoolDefaults { + + /** AutoprovisioningNodePoolDefaults oauthScopes */ + oauthScopes?: (string[]|null); + + /** AutoprovisioningNodePoolDefaults serviceAccount */ + serviceAccount?: (string|null); + + /** AutoprovisioningNodePoolDefaults upgradeSettings */ + upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** AutoprovisioningNodePoolDefaults management */ + management?: (google.container.v1.INodeManagement|null); + + /** AutoprovisioningNodePoolDefaults minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** AutoprovisioningNodePoolDefaults diskSizeGb */ + diskSizeGb?: (number|null); + + /** AutoprovisioningNodePoolDefaults diskType */ + diskType?: (string|null); + + /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig */ + shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); + + /** AutoprovisioningNodePoolDefaults bootDiskKmsKey */ + bootDiskKmsKey?: (string|null); + + /** AutoprovisioningNodePoolDefaults imageType */ + imageType?: (string|null); + + /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled */ + insecureKubeletReadonlyPortEnabled?: (boolean|null); + } + + /** Represents an AutoprovisioningNodePoolDefaults. */ + class AutoprovisioningNodePoolDefaults implements IAutoprovisioningNodePoolDefaults { + + /** + * Constructs a new AutoprovisioningNodePoolDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAutoprovisioningNodePoolDefaults); + + /** AutoprovisioningNodePoolDefaults oauthScopes. */ + public oauthScopes: string[]; + + /** AutoprovisioningNodePoolDefaults serviceAccount. */ + public serviceAccount: string; + + /** AutoprovisioningNodePoolDefaults upgradeSettings. */ + public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); + + /** AutoprovisioningNodePoolDefaults management. */ + public management?: (google.container.v1.INodeManagement|null); + + /** AutoprovisioningNodePoolDefaults minCpuPlatform. */ + public minCpuPlatform: string; + + /** AutoprovisioningNodePoolDefaults diskSizeGb. */ + public diskSizeGb: number; + + /** AutoprovisioningNodePoolDefaults diskType. */ + public diskType: string; + + /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig. */ + public shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); + + /** AutoprovisioningNodePoolDefaults bootDiskKmsKey. */ + public bootDiskKmsKey: string; + + /** AutoprovisioningNodePoolDefaults imageType. */ + public imageType: string; + + /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. */ + public insecureKubeletReadonlyPortEnabled?: (boolean|null); + + /** AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. */ + public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; + + /** + * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoprovisioningNodePoolDefaults instance + */ + public static create(properties?: google.container.v1.IAutoprovisioningNodePoolDefaults): google.container.v1.AutoprovisioningNodePoolDefaults; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @param message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @param message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutoprovisioningNodePoolDefaults; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutoprovisioningNodePoolDefaults; + + /** + * Verifies an AutoprovisioningNodePoolDefaults message. + * @param message Plain 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 AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoprovisioningNodePoolDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AutoprovisioningNodePoolDefaults; + + /** + * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. + * @param message AutoprovisioningNodePoolDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AutoprovisioningNodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoprovisioningNodePoolDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoprovisioningNodePoolDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceLimit. */ + interface IResourceLimit { + + /** ResourceLimit resourceType */ + resourceType?: (string|null); + + /** ResourceLimit minimum */ + minimum?: (number|Long|string|null); + + /** ResourceLimit maximum */ + maximum?: (number|Long|string|null); + } + + /** Represents a ResourceLimit. */ + class ResourceLimit implements IResourceLimit { + + /** + * Constructs a new ResourceLimit. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IResourceLimit); + + /** ResourceLimit resourceType. */ + public resourceType: string; + + /** ResourceLimit minimum. */ + public minimum: (number|Long|string); + + /** ResourceLimit maximum. */ + public maximum: (number|Long|string); + + /** + * Creates a new ResourceLimit instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceLimit instance + */ + public static create(properties?: google.container.v1.IResourceLimit): google.container.v1.ResourceLimit; + + /** + * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. + * @param message ResourceLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. + * @param message ResourceLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceLimit; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceLimit; + + /** + * Verifies a ResourceLimit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceLimit + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceLimit; + + /** + * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. + * @param message ResourceLimit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceLimit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceLimit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolAutoscaling. */ + interface INodePoolAutoscaling { + + /** NodePoolAutoscaling enabled */ + enabled?: (boolean|null); + + /** NodePoolAutoscaling minNodeCount */ + minNodeCount?: (number|null); + + /** NodePoolAutoscaling maxNodeCount */ + maxNodeCount?: (number|null); + + /** NodePoolAutoscaling autoprovisioned */ + autoprovisioned?: (boolean|null); + + /** NodePoolAutoscaling locationPolicy */ + locationPolicy?: (google.container.v1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1.NodePoolAutoscaling.LocationPolicy|null); + + /** NodePoolAutoscaling totalMinNodeCount */ + totalMinNodeCount?: (number|null); + + /** NodePoolAutoscaling totalMaxNodeCount */ + totalMaxNodeCount?: (number|null); + } + + /** Represents a NodePoolAutoscaling. */ + class NodePoolAutoscaling implements INodePoolAutoscaling { + + /** + * Constructs a new NodePoolAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePoolAutoscaling); + + /** NodePoolAutoscaling enabled. */ + public enabled: boolean; + + /** NodePoolAutoscaling minNodeCount. */ + public minNodeCount: number; + + /** NodePoolAutoscaling maxNodeCount. */ + public maxNodeCount: number; + + /** NodePoolAutoscaling autoprovisioned. */ + public autoprovisioned: boolean; + + /** NodePoolAutoscaling locationPolicy. */ + public locationPolicy: (google.container.v1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1.NodePoolAutoscaling.LocationPolicy); + + /** NodePoolAutoscaling totalMinNodeCount. */ + public totalMinNodeCount: number; + + /** NodePoolAutoscaling totalMaxNodeCount. */ + public totalMaxNodeCount: number; + + /** + * Creates a new NodePoolAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolAutoscaling instance + */ + public static create(properties?: google.container.v1.INodePoolAutoscaling): google.container.v1.NodePoolAutoscaling; + + /** + * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. + * @param message NodePoolAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. + * @param message NodePoolAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoscaling; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoscaling; + + /** + * Verifies a NodePoolAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolAutoscaling; + + /** + * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. + * @param message NodePoolAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodePoolAutoscaling { + + /** LocationPolicy enum. */ + enum LocationPolicy { + LOCATION_POLICY_UNSPECIFIED = 0, + BALANCED = 1, + ANY = 2 + } + } + + /** Properties of a SetLabelsRequest. */ + interface ISetLabelsRequest { + + /** SetLabelsRequest projectId */ + projectId?: (string|null); + + /** SetLabelsRequest zone */ + zone?: (string|null); + + /** SetLabelsRequest clusterId */ + clusterId?: (string|null); + + /** SetLabelsRequest resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** SetLabelsRequest labelFingerprint */ + labelFingerprint?: (string|null); + + /** SetLabelsRequest name */ + name?: (string|null); + } + + /** Represents a SetLabelsRequest. */ + class SetLabelsRequest implements ISetLabelsRequest { + + /** + * Constructs a new SetLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetLabelsRequest); + + /** SetLabelsRequest projectId. */ + public projectId: string; + + /** SetLabelsRequest zone. */ + public zone: string; + + /** SetLabelsRequest clusterId. */ + public clusterId: string; + + /** SetLabelsRequest resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** SetLabelsRequest labelFingerprint. */ + public labelFingerprint: string; + + /** SetLabelsRequest name. */ + public name: string; + + /** + * Creates a new SetLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLabelsRequest instance + */ + public static create(properties?: google.container.v1.ISetLabelsRequest): google.container.v1.SetLabelsRequest; + + /** + * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. + * @param message SetLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. + * @param message SetLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLabelsRequest; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLabelsRequest; + + /** + * Verifies a SetLabelsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetLabelsRequest; + + /** + * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. + * @param message SetLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLegacyAbacRequest. */ + interface ISetLegacyAbacRequest { + + /** SetLegacyAbacRequest projectId */ + projectId?: (string|null); + + /** SetLegacyAbacRequest zone */ + zone?: (string|null); + + /** SetLegacyAbacRequest clusterId */ + clusterId?: (string|null); + + /** SetLegacyAbacRequest enabled */ + enabled?: (boolean|null); + + /** SetLegacyAbacRequest name */ + name?: (string|null); + } + + /** Represents a SetLegacyAbacRequest. */ + class SetLegacyAbacRequest implements ISetLegacyAbacRequest { + + /** + * Constructs a new SetLegacyAbacRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetLegacyAbacRequest); + + /** SetLegacyAbacRequest projectId. */ + public projectId: string; + + /** SetLegacyAbacRequest zone. */ + public zone: string; + + /** SetLegacyAbacRequest clusterId. */ + public clusterId: string; + + /** SetLegacyAbacRequest enabled. */ + public enabled: boolean; + + /** SetLegacyAbacRequest name. */ + public name: string; + + /** + * Creates a new SetLegacyAbacRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLegacyAbacRequest instance + */ + public static create(properties?: google.container.v1.ISetLegacyAbacRequest): google.container.v1.SetLegacyAbacRequest; + + /** + * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. + * @param message SetLegacyAbacRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. + * @param message SetLegacyAbacRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLegacyAbacRequest; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLegacyAbacRequest; + + /** + * Verifies a SetLegacyAbacRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLegacyAbacRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetLegacyAbacRequest; + + /** + * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. + * @param message SetLegacyAbacRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetLegacyAbacRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLegacyAbacRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLegacyAbacRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartIPRotationRequest. */ + interface IStartIPRotationRequest { + + /** StartIPRotationRequest projectId */ + projectId?: (string|null); + + /** StartIPRotationRequest zone */ + zone?: (string|null); + + /** StartIPRotationRequest clusterId */ + clusterId?: (string|null); + + /** StartIPRotationRequest name */ + name?: (string|null); + + /** StartIPRotationRequest rotateCredentials */ + rotateCredentials?: (boolean|null); + } + + /** Represents a StartIPRotationRequest. */ + class StartIPRotationRequest implements IStartIPRotationRequest { + + /** + * Constructs a new StartIPRotationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IStartIPRotationRequest); + + /** StartIPRotationRequest projectId. */ + public projectId: string; + + /** StartIPRotationRequest zone. */ + public zone: string; + + /** StartIPRotationRequest clusterId. */ + public clusterId: string; + + /** StartIPRotationRequest name. */ + public name: string; + + /** StartIPRotationRequest rotateCredentials. */ + public rotateCredentials: boolean; + + /** + * Creates a new StartIPRotationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartIPRotationRequest instance + */ + public static create(properties?: google.container.v1.IStartIPRotationRequest): google.container.v1.StartIPRotationRequest; + + /** + * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. + * @param message StartIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. + * @param message StartIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StartIPRotationRequest; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StartIPRotationRequest; + + /** + * Verifies a StartIPRotationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartIPRotationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.StartIPRotationRequest; + + /** + * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. + * @param message StartIPRotationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.StartIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartIPRotationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartIPRotationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompleteIPRotationRequest. */ + interface ICompleteIPRotationRequest { + + /** CompleteIPRotationRequest projectId */ + projectId?: (string|null); + + /** CompleteIPRotationRequest zone */ + zone?: (string|null); + + /** CompleteIPRotationRequest clusterId */ + clusterId?: (string|null); + + /** CompleteIPRotationRequest name */ + name?: (string|null); + } + + /** Represents a CompleteIPRotationRequest. */ + class CompleteIPRotationRequest implements ICompleteIPRotationRequest { + + /** + * Constructs a new CompleteIPRotationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICompleteIPRotationRequest); + + /** CompleteIPRotationRequest projectId. */ + public projectId: string; + + /** CompleteIPRotationRequest zone. */ + public zone: string; + + /** CompleteIPRotationRequest clusterId. */ + public clusterId: string; + + /** CompleteIPRotationRequest name. */ + public name: string; + + /** + * Creates a new CompleteIPRotationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteIPRotationRequest instance + */ + public static create(properties?: google.container.v1.ICompleteIPRotationRequest): google.container.v1.CompleteIPRotationRequest; + + /** + * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. + * @param message CompleteIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. + * @param message CompleteIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompleteIPRotationRequest; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompleteIPRotationRequest; + + /** + * Verifies a CompleteIPRotationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteIPRotationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompleteIPRotationRequest; + + /** + * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. + * @param message CompleteIPRotationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompleteIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompleteIPRotationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompleteIPRotationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|Long|string|null); + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig gpuPartitionSize */ + gpuPartitionSize?: (string|null); + + /** AcceleratorConfig gpuSharingConfig */ + gpuSharingConfig?: (google.container.v1.IGPUSharingConfig|null); + + /** AcceleratorConfig gpuDriverInstallationConfig */ + gpuDriverInstallationConfig?: (google.container.v1.IGPUDriverInstallationConfig|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount: (number|Long|string); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType: string; + + /** AcceleratorConfig gpuPartitionSize. */ + public gpuPartitionSize: string; + + /** AcceleratorConfig gpuSharingConfig. */ + public gpuSharingConfig?: (google.container.v1.IGPUSharingConfig|null); + + /** AcceleratorConfig gpuDriverInstallationConfig. */ + public gpuDriverInstallationConfig?: (google.container.v1.IGPUDriverInstallationConfig|null); + + /** AcceleratorConfig _gpuSharingConfig. */ + public _gpuSharingConfig?: "gpuSharingConfig"; + + /** AcceleratorConfig _gpuDriverInstallationConfig. */ + public _gpuDriverInstallationConfig?: "gpuDriverInstallationConfig"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.container.v1.IAcceleratorConfig): google.container.v1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GPUSharingConfig. */ + interface IGPUSharingConfig { + + /** GPUSharingConfig maxSharedClientsPerGpu */ + maxSharedClientsPerGpu?: (number|Long|string|null); + + /** GPUSharingConfig gpuSharingStrategy */ + gpuSharingStrategy?: (google.container.v1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1.GPUSharingConfig.GPUSharingStrategy|null); + } + + /** Represents a GPUSharingConfig. */ + class GPUSharingConfig implements IGPUSharingConfig { + + /** + * Constructs a new GPUSharingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGPUSharingConfig); + + /** GPUSharingConfig maxSharedClientsPerGpu. */ + public maxSharedClientsPerGpu: (number|Long|string); + + /** GPUSharingConfig gpuSharingStrategy. */ + public gpuSharingStrategy?: (google.container.v1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1.GPUSharingConfig.GPUSharingStrategy|null); + + /** GPUSharingConfig _gpuSharingStrategy. */ + public _gpuSharingStrategy?: "gpuSharingStrategy"; + + /** + * Creates a new GPUSharingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GPUSharingConfig instance + */ + public static create(properties?: google.container.v1.IGPUSharingConfig): google.container.v1.GPUSharingConfig; + + /** + * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. + * @param message GPUSharingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. + * @param message GPUSharingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GPUSharingConfig; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GPUSharingConfig; + + /** + * Verifies a GPUSharingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GPUSharingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GPUSharingConfig; + + /** + * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. + * @param message GPUSharingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GPUSharingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GPUSharingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GPUSharingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GPUSharingConfig { + + /** GPUSharingStrategy enum. */ + enum GPUSharingStrategy { + GPU_SHARING_STRATEGY_UNSPECIFIED = 0, + TIME_SHARING = 1, + MPS = 2 + } + } + + /** Properties of a GPUDriverInstallationConfig. */ + interface IGPUDriverInstallationConfig { + + /** GPUDriverInstallationConfig gpuDriverVersion */ + gpuDriverVersion?: (google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null); + } + + /** Represents a GPUDriverInstallationConfig. */ + class GPUDriverInstallationConfig implements IGPUDriverInstallationConfig { + + /** + * Constructs a new GPUDriverInstallationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGPUDriverInstallationConfig); + + /** GPUDriverInstallationConfig gpuDriverVersion. */ + public gpuDriverVersion?: (google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null); + + /** GPUDriverInstallationConfig _gpuDriverVersion. */ + public _gpuDriverVersion?: "gpuDriverVersion"; + + /** + * Creates a new GPUDriverInstallationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GPUDriverInstallationConfig instance + */ + public static create(properties?: google.container.v1.IGPUDriverInstallationConfig): google.container.v1.GPUDriverInstallationConfig; + + /** + * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. + * @param message GPUDriverInstallationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. + * @param message GPUDriverInstallationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GPUDriverInstallationConfig; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GPUDriverInstallationConfig; + + /** + * Verifies a GPUDriverInstallationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GPUDriverInstallationConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GPUDriverInstallationConfig; + + /** + * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. + * @param message GPUDriverInstallationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GPUDriverInstallationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GPUDriverInstallationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GPUDriverInstallationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GPUDriverInstallationConfig { + + /** GPUDriverVersion enum. */ + enum GPUDriverVersion { + GPU_DRIVER_VERSION_UNSPECIFIED = 0, + INSTALLATION_DISABLED = 1, + DEFAULT = 2, + LATEST = 3 + } + } + + /** Properties of a WorkloadMetadataConfig. */ + interface IWorkloadMetadataConfig { + + /** WorkloadMetadataConfig mode */ + mode?: (google.container.v1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1.WorkloadMetadataConfig.Mode|null); + } + + /** Represents a WorkloadMetadataConfig. */ + class WorkloadMetadataConfig implements IWorkloadMetadataConfig { + + /** + * Constructs a new WorkloadMetadataConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IWorkloadMetadataConfig); + + /** WorkloadMetadataConfig mode. */ + public mode: (google.container.v1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1.WorkloadMetadataConfig.Mode); + + /** + * Creates a new WorkloadMetadataConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadMetadataConfig instance + */ + public static create(properties?: google.container.v1.IWorkloadMetadataConfig): google.container.v1.WorkloadMetadataConfig; + + /** + * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. + * @param message WorkloadMetadataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. + * @param message WorkloadMetadataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WorkloadMetadataConfig; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WorkloadMetadataConfig; + + /** + * Verifies a WorkloadMetadataConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadMetadataConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadMetadataConfig; + + /** + * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. + * @param message WorkloadMetadataConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.WorkloadMetadataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadMetadataConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadMetadataConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkloadMetadataConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + GCE_METADATA = 1, + GKE_METADATA = 2 + } + } + + /** Properties of a SetNetworkPolicyRequest. */ + interface ISetNetworkPolicyRequest { + + /** SetNetworkPolicyRequest projectId */ + projectId?: (string|null); + + /** SetNetworkPolicyRequest zone */ + zone?: (string|null); + + /** SetNetworkPolicyRequest clusterId */ + clusterId?: (string|null); + + /** SetNetworkPolicyRequest networkPolicy */ + networkPolicy?: (google.container.v1.INetworkPolicy|null); + + /** SetNetworkPolicyRequest name */ + name?: (string|null); + } + + /** Represents a SetNetworkPolicyRequest. */ + class SetNetworkPolicyRequest implements ISetNetworkPolicyRequest { + + /** + * Constructs a new SetNetworkPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetNetworkPolicyRequest); + + /** SetNetworkPolicyRequest projectId. */ + public projectId: string; + + /** SetNetworkPolicyRequest zone. */ + public zone: string; + + /** SetNetworkPolicyRequest clusterId. */ + public clusterId: string; + + /** SetNetworkPolicyRequest networkPolicy. */ + public networkPolicy?: (google.container.v1.INetworkPolicy|null); + + /** SetNetworkPolicyRequest name. */ + public name: string; + + /** + * Creates a new SetNetworkPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNetworkPolicyRequest instance + */ + public static create(properties?: google.container.v1.ISetNetworkPolicyRequest): google.container.v1.SetNetworkPolicyRequest; + + /** + * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. + * @param message SetNetworkPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. + * @param message SetNetworkPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNetworkPolicyRequest; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNetworkPolicyRequest; + + /** + * Verifies a SetNetworkPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNetworkPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetNetworkPolicyRequest; + + /** + * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. + * @param message SetNetworkPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetNetworkPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNetworkPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNetworkPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMaintenancePolicyRequest. */ + interface ISetMaintenancePolicyRequest { + + /** SetMaintenancePolicyRequest projectId */ + projectId?: (string|null); + + /** SetMaintenancePolicyRequest zone */ + zone?: (string|null); + + /** SetMaintenancePolicyRequest clusterId */ + clusterId?: (string|null); + + /** SetMaintenancePolicyRequest maintenancePolicy */ + maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); + + /** SetMaintenancePolicyRequest name */ + name?: (string|null); + } + + /** Represents a SetMaintenancePolicyRequest. */ + class SetMaintenancePolicyRequest implements ISetMaintenancePolicyRequest { + + /** + * Constructs a new SetMaintenancePolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISetMaintenancePolicyRequest); + + /** SetMaintenancePolicyRequest projectId. */ + public projectId: string; + + /** SetMaintenancePolicyRequest zone. */ + public zone: string; + + /** SetMaintenancePolicyRequest clusterId. */ + public clusterId: string; + + /** SetMaintenancePolicyRequest maintenancePolicy. */ + public maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); + + /** SetMaintenancePolicyRequest name. */ + public name: string; + + /** + * Creates a new SetMaintenancePolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMaintenancePolicyRequest instance + */ + public static create(properties?: google.container.v1.ISetMaintenancePolicyRequest): google.container.v1.SetMaintenancePolicyRequest; + + /** + * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. + * @param message SetMaintenancePolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. + * @param message SetMaintenancePolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMaintenancePolicyRequest; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMaintenancePolicyRequest; + + /** + * Verifies a SetMaintenancePolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMaintenancePolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SetMaintenancePolicyRequest; + + /** + * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. + * @param message SetMaintenancePolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SetMaintenancePolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMaintenancePolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMaintenancePolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatusCondition. */ + interface IStatusCondition { + + /** StatusCondition code */ + code?: (google.container.v1.StatusCondition.Code|keyof typeof google.container.v1.StatusCondition.Code|null); + + /** StatusCondition message */ + message?: (string|null); + + /** StatusCondition canonicalCode */ + canonicalCode?: (google.rpc.Code|keyof typeof google.rpc.Code|null); + } + + /** Represents a StatusCondition. */ + class StatusCondition implements IStatusCondition { + + /** + * Constructs a new StatusCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IStatusCondition); + + /** StatusCondition code. */ + public code: (google.container.v1.StatusCondition.Code|keyof typeof google.container.v1.StatusCondition.Code); + + /** StatusCondition message. */ + public message: string; + + /** StatusCondition canonicalCode. */ + public canonicalCode: (google.rpc.Code|keyof typeof google.rpc.Code); + + /** + * Creates a new StatusCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusCondition instance + */ + public static create(properties?: google.container.v1.IStatusCondition): google.container.v1.StatusCondition; + + /** + * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. + * @param message StatusCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. + * @param message StatusCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StatusCondition; + + /** + * Decodes a StatusCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StatusCondition; + + /** + * Verifies a StatusCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusCondition + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.StatusCondition; + + /** + * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. + * @param message StatusCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.StatusCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatusCondition { + + /** Code enum. */ + enum Code { + UNKNOWN = 0, + GCE_STOCKOUT = 1, + GKE_SERVICE_ACCOUNT_DELETED = 2, + GCE_QUOTA_EXCEEDED = 3, + SET_BY_OPERATOR = 4, + CLOUD_KMS_KEY_ERROR = 7, + CA_EXPIRING = 9 + } + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig network */ + network?: (string|null); + + /** NetworkConfig subnetwork */ + subnetwork?: (string|null); + + /** NetworkConfig enableIntraNodeVisibility */ + enableIntraNodeVisibility?: (boolean|null); + + /** NetworkConfig defaultSnatStatus */ + defaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); + + /** NetworkConfig enableL4ilbSubsetting */ + enableL4ilbSubsetting?: (boolean|null); + + /** NetworkConfig datapathProvider */ + datapathProvider?: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider|null); + + /** NetworkConfig privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess|null); + + /** NetworkConfig dnsConfig */ + dnsConfig?: (google.container.v1.IDNSConfig|null); + + /** NetworkConfig serviceExternalIpsConfig */ + serviceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); + + /** NetworkConfig gatewayApiConfig */ + gatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); + + /** NetworkConfig enableMultiNetworking */ + enableMultiNetworking?: (boolean|null); + + /** NetworkConfig networkPerformanceConfig */ + networkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** NetworkConfig enableFqdnNetworkPolicy */ + enableFqdnNetworkPolicy?: (boolean|null); + + /** NetworkConfig inTransitEncryptionConfig */ + inTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); + + /** NetworkConfig enableCiliumClusterwideNetworkPolicy */ + enableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** NetworkConfig defaultEnablePrivateNodes */ + defaultEnablePrivateNodes?: (boolean|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INetworkConfig); + + /** NetworkConfig network. */ + public network: string; + + /** NetworkConfig subnetwork. */ + public subnetwork: string; + + /** NetworkConfig enableIntraNodeVisibility. */ + public enableIntraNodeVisibility: boolean; + + /** NetworkConfig defaultSnatStatus. */ + public defaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); + + /** NetworkConfig enableL4ilbSubsetting. */ + public enableL4ilbSubsetting: boolean; + + /** NetworkConfig datapathProvider. */ + public datapathProvider: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider); + + /** NetworkConfig privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess); + + /** NetworkConfig dnsConfig. */ + public dnsConfig?: (google.container.v1.IDNSConfig|null); + + /** NetworkConfig serviceExternalIpsConfig. */ + public serviceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); + + /** NetworkConfig gatewayApiConfig. */ + public gatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); + + /** NetworkConfig enableMultiNetworking. */ + public enableMultiNetworking: boolean; + + /** NetworkConfig networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** NetworkConfig enableFqdnNetworkPolicy. */ + public enableFqdnNetworkPolicy?: (boolean|null); + + /** NetworkConfig inTransitEncryptionConfig. */ + public inTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); + + /** NetworkConfig enableCiliumClusterwideNetworkPolicy. */ + public enableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** NetworkConfig defaultEnablePrivateNodes. */ + public defaultEnablePrivateNodes?: (boolean|null); + + /** NetworkConfig _enableFqdnNetworkPolicy. */ + public _enableFqdnNetworkPolicy?: "enableFqdnNetworkPolicy"; + + /** NetworkConfig _inTransitEncryptionConfig. */ + public _inTransitEncryptionConfig?: "inTransitEncryptionConfig"; + + /** NetworkConfig _enableCiliumClusterwideNetworkPolicy. */ + public _enableCiliumClusterwideNetworkPolicy?: "enableCiliumClusterwideNetworkPolicy"; + + /** NetworkConfig _defaultEnablePrivateNodes. */ + public _defaultEnablePrivateNodes?: "defaultEnablePrivateNodes"; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.container.v1.INetworkConfig): google.container.v1.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** Properties of a ClusterNetworkPerformanceConfig. */ + interface IClusterNetworkPerformanceConfig { + + /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); + } + + /** Represents a ClusterNetworkPerformanceConfig. */ + class ClusterNetworkPerformanceConfig implements IClusterNetworkPerformanceConfig { + + /** + * Constructs a new ClusterNetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig); + + /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); + + /** ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterNetworkPerformanceConfig instance + */ + public static create(properties?: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @param message ClusterNetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @param message ClusterNetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Verifies a ClusterNetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterNetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message ClusterNetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterNetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterNetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterNetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + TIER_1 = 1 + } + } + } + + /** Properties of a GatewayAPIConfig. */ + interface IGatewayAPIConfig { + + /** GatewayAPIConfig channel */ + channel?: (google.container.v1.GatewayAPIConfig.Channel|keyof typeof google.container.v1.GatewayAPIConfig.Channel|null); + } + + /** Represents a GatewayAPIConfig. */ + class GatewayAPIConfig implements IGatewayAPIConfig { + + /** + * Constructs a new GatewayAPIConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGatewayAPIConfig); + + /** GatewayAPIConfig channel. */ + public channel: (google.container.v1.GatewayAPIConfig.Channel|keyof typeof google.container.v1.GatewayAPIConfig.Channel); + + /** + * Creates a new GatewayAPIConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayAPIConfig instance + */ + public static create(properties?: google.container.v1.IGatewayAPIConfig): google.container.v1.GatewayAPIConfig; + + /** + * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. + * @param message GatewayAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. + * @param message GatewayAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GatewayAPIConfig; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GatewayAPIConfig; + + /** + * Verifies a GatewayAPIConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayAPIConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GatewayAPIConfig; + + /** + * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. + * @param message GatewayAPIConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GatewayAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GatewayAPIConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GatewayAPIConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GatewayAPIConfig { + + /** Channel enum. */ + enum Channel { + CHANNEL_UNSPECIFIED = 0, + CHANNEL_DISABLED = 1, + CHANNEL_EXPERIMENTAL = 3, + CHANNEL_STANDARD = 4 + } + } + + /** Properties of a ServiceExternalIPsConfig. */ + interface IServiceExternalIPsConfig { + + /** ServiceExternalIPsConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ServiceExternalIPsConfig. */ + class ServiceExternalIPsConfig implements IServiceExternalIPsConfig { + + /** + * Constructs a new ServiceExternalIPsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IServiceExternalIPsConfig); + + /** ServiceExternalIPsConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ServiceExternalIPsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceExternalIPsConfig instance + */ + public static create(properties?: google.container.v1.IServiceExternalIPsConfig): google.container.v1.ServiceExternalIPsConfig; + + /** + * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. + * @param message ServiceExternalIPsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. + * @param message ServiceExternalIPsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServiceExternalIPsConfig; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServiceExternalIPsConfig; + + /** + * Verifies a ServiceExternalIPsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceExternalIPsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ServiceExternalIPsConfig; + + /** + * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. + * @param message ServiceExternalIPsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ServiceExternalIPsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceExternalIPsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceExternalIPsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOpenIDConfigRequest. */ + interface IGetOpenIDConfigRequest { + + /** GetOpenIDConfigRequest parent */ + parent?: (string|null); + } + + /** Represents a GetOpenIDConfigRequest. */ + class GetOpenIDConfigRequest implements IGetOpenIDConfigRequest { + + /** + * Constructs a new GetOpenIDConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetOpenIDConfigRequest); + + /** GetOpenIDConfigRequest parent. */ + public parent: string; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigRequest instance + */ + public static create(properties?: google.container.v1.IGetOpenIDConfigRequest): google.container.v1.GetOpenIDConfigRequest; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOpenIDConfigRequest; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOpenIDConfigRequest; + + /** + * Verifies a GetOpenIDConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigRequest; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @param message GetOpenIDConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetOpenIDConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOpenIDConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOpenIDConfigResponse. */ + interface IGetOpenIDConfigResponse { + + /** GetOpenIDConfigResponse issuer */ + issuer?: (string|null); + + /** GetOpenIDConfigResponse jwksUri */ + jwksUri?: (string|null); + + /** GetOpenIDConfigResponse responseTypesSupported */ + responseTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse subjectTypesSupported */ + subjectTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported */ + idTokenSigningAlgValuesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse claimsSupported */ + claimsSupported?: (string[]|null); + + /** GetOpenIDConfigResponse grantTypes */ + grantTypes?: (string[]|null); + } + + /** Represents a GetOpenIDConfigResponse. */ + class GetOpenIDConfigResponse implements IGetOpenIDConfigResponse { + + /** + * Constructs a new GetOpenIDConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetOpenIDConfigResponse); + + /** GetOpenIDConfigResponse issuer. */ + public issuer: string; + + /** GetOpenIDConfigResponse jwksUri. */ + public jwksUri: string; + + /** GetOpenIDConfigResponse responseTypesSupported. */ + public responseTypesSupported: string[]; + + /** GetOpenIDConfigResponse subjectTypesSupported. */ + public subjectTypesSupported: string[]; + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. */ + public idTokenSigningAlgValuesSupported: string[]; + + /** GetOpenIDConfigResponse claimsSupported. */ + public claimsSupported: string[]; + + /** GetOpenIDConfigResponse grantTypes. */ + public grantTypes: string[]; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigResponse instance + */ + public static create(properties?: google.container.v1.IGetOpenIDConfigResponse): google.container.v1.GetOpenIDConfigResponse; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOpenIDConfigResponse; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOpenIDConfigResponse; + + /** + * Verifies a GetOpenIDConfigResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigResponse; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @param message GetOpenIDConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetOpenIDConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOpenIDConfigResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJSONWebKeysRequest. */ + interface IGetJSONWebKeysRequest { + + /** GetJSONWebKeysRequest parent */ + parent?: (string|null); + } + + /** Represents a GetJSONWebKeysRequest. */ + class GetJSONWebKeysRequest implements IGetJSONWebKeysRequest { + + /** + * Constructs a new GetJSONWebKeysRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetJSONWebKeysRequest); + + /** GetJSONWebKeysRequest parent. */ + public parent: string; + + /** + * Creates a new GetJSONWebKeysRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJSONWebKeysRequest instance + */ + public static create(properties?: google.container.v1.IGetJSONWebKeysRequest): google.container.v1.GetJSONWebKeysRequest; + + /** + * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. + * @param message GetJSONWebKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. + * @param message GetJSONWebKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetJSONWebKeysRequest; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetJSONWebKeysRequest; + + /** + * Verifies a GetJSONWebKeysRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJSONWebKeysRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetJSONWebKeysRequest; + + /** + * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. + * @param message GetJSONWebKeysRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetJSONWebKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJSONWebKeysRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJSONWebKeysRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Jwk. */ + interface IJwk { + + /** Jwk kty */ + kty?: (string|null); + + /** Jwk alg */ + alg?: (string|null); + + /** Jwk use */ + use?: (string|null); + + /** Jwk kid */ + kid?: (string|null); + + /** Jwk n */ + n?: (string|null); + + /** Jwk e */ + e?: (string|null); + + /** Jwk x */ + x?: (string|null); + + /** Jwk y */ + y?: (string|null); + + /** Jwk crv */ + crv?: (string|null); + } + + /** Represents a Jwk. */ + class Jwk implements IJwk { + + /** + * Constructs a new Jwk. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IJwk); + + /** Jwk kty. */ + public kty: string; + + /** Jwk alg. */ + public alg: string; + + /** Jwk use. */ + public use: string; + + /** Jwk kid. */ + public kid: string; + + /** Jwk n. */ + public n: string; + + /** Jwk e. */ + public e: string; + + /** Jwk x. */ + public x: string; + + /** Jwk y. */ + public y: string; + + /** Jwk crv. */ + public crv: string; + + /** + * Creates a new Jwk instance using the specified properties. + * @param [properties] Properties to set + * @returns Jwk instance + */ + public static create(properties?: google.container.v1.IJwk): google.container.v1.Jwk; + + /** + * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. + * @param message Jwk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. + * @param message Jwk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Jwk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Jwk; + + /** + * Decodes a Jwk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Jwk; + + /** + * Verifies a Jwk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Jwk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Jwk + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.Jwk; + + /** + * Creates a plain object from a Jwk message. Also converts values to other types if specified. + * @param message Jwk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.Jwk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Jwk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Jwk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJSONWebKeysResponse. */ + interface IGetJSONWebKeysResponse { + + /** GetJSONWebKeysResponse keys */ + keys?: (google.container.v1.IJwk[]|null); + } + + /** Represents a GetJSONWebKeysResponse. */ + class GetJSONWebKeysResponse implements IGetJSONWebKeysResponse { + + /** + * Constructs a new GetJSONWebKeysResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetJSONWebKeysResponse); + + /** GetJSONWebKeysResponse keys. */ + public keys: google.container.v1.IJwk[]; + + /** + * Creates a new GetJSONWebKeysResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJSONWebKeysResponse instance + */ + public static create(properties?: google.container.v1.IGetJSONWebKeysResponse): google.container.v1.GetJSONWebKeysResponse; + + /** + * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. + * @param message GetJSONWebKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. + * @param message GetJSONWebKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetJSONWebKeysResponse; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetJSONWebKeysResponse; + + /** + * Verifies a GetJSONWebKeysResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJSONWebKeysResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetJSONWebKeysResponse; + + /** + * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. + * @param message GetJSONWebKeysResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetJSONWebKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJSONWebKeysResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJSONWebKeysResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckAutopilotCompatibilityRequest. */ + interface ICheckAutopilotCompatibilityRequest { + + /** CheckAutopilotCompatibilityRequest name */ + name?: (string|null); + } + + /** Represents a CheckAutopilotCompatibilityRequest. */ + class CheckAutopilotCompatibilityRequest implements ICheckAutopilotCompatibilityRequest { + + /** + * Constructs a new CheckAutopilotCompatibilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICheckAutopilotCompatibilityRequest); + + /** CheckAutopilotCompatibilityRequest name. */ + public name: string; + + /** + * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAutopilotCompatibilityRequest instance + */ + public static create(properties?: google.container.v1.ICheckAutopilotCompatibilityRequest): google.container.v1.CheckAutopilotCompatibilityRequest; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @param message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @param message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CheckAutopilotCompatibilityRequest; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CheckAutopilotCompatibilityRequest; + + /** + * Verifies a CheckAutopilotCompatibilityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAutopilotCompatibilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CheckAutopilotCompatibilityRequest; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. + * @param message CheckAutopilotCompatibilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CheckAutopilotCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAutopilotCompatibilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutopilotCompatibilityIssue. */ + interface IAutopilotCompatibilityIssue { + + /** AutopilotCompatibilityIssue lastObservation */ + lastObservation?: (google.protobuf.ITimestamp|null); + + /** AutopilotCompatibilityIssue constraintType */ + constraintType?: (string|null); + + /** AutopilotCompatibilityIssue incompatibilityType */ + incompatibilityType?: (google.container.v1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1.AutopilotCompatibilityIssue.IssueType|null); + + /** AutopilotCompatibilityIssue subjects */ + subjects?: (string[]|null); + + /** AutopilotCompatibilityIssue documentationUrl */ + documentationUrl?: (string|null); + + /** AutopilotCompatibilityIssue description */ + description?: (string|null); + } + + /** Represents an AutopilotCompatibilityIssue. */ + class AutopilotCompatibilityIssue implements IAutopilotCompatibilityIssue { + + /** + * Constructs a new AutopilotCompatibilityIssue. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAutopilotCompatibilityIssue); + + /** AutopilotCompatibilityIssue lastObservation. */ + public lastObservation?: (google.protobuf.ITimestamp|null); + + /** AutopilotCompatibilityIssue constraintType. */ + public constraintType: string; + + /** AutopilotCompatibilityIssue incompatibilityType. */ + public incompatibilityType: (google.container.v1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1.AutopilotCompatibilityIssue.IssueType); + + /** AutopilotCompatibilityIssue subjects. */ + public subjects: string[]; + + /** AutopilotCompatibilityIssue documentationUrl. */ + public documentationUrl: string; + + /** AutopilotCompatibilityIssue description. */ + public description: string; + + /** + * Creates a new AutopilotCompatibilityIssue instance using the specified properties. + * @param [properties] Properties to set + * @returns AutopilotCompatibilityIssue instance + */ + public static create(properties?: google.container.v1.IAutopilotCompatibilityIssue): google.container.v1.AutopilotCompatibilityIssue; + + /** + * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. + * @param message AutopilotCompatibilityIssue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. + * @param message AutopilotCompatibilityIssue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutopilotCompatibilityIssue; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutopilotCompatibilityIssue; + + /** + * Verifies an AutopilotCompatibilityIssue message. + * @param message Plain 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 AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutopilotCompatibilityIssue + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AutopilotCompatibilityIssue; + + /** + * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. + * @param message AutopilotCompatibilityIssue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AutopilotCompatibilityIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutopilotCompatibilityIssue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutopilotCompatibilityIssue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutopilotCompatibilityIssue { + + /** IssueType enum. */ + enum IssueType { + UNSPECIFIED = 0, + INCOMPATIBILITY = 1, + ADDITIONAL_CONFIG_REQUIRED = 2, + PASSED_WITH_OPTIONAL_CONFIG = 3 + } + } + + /** Properties of a CheckAutopilotCompatibilityResponse. */ + interface ICheckAutopilotCompatibilityResponse { + + /** CheckAutopilotCompatibilityResponse issues */ + issues?: (google.container.v1.IAutopilotCompatibilityIssue[]|null); + + /** CheckAutopilotCompatibilityResponse summary */ + summary?: (string|null); + } + + /** Represents a CheckAutopilotCompatibilityResponse. */ + class CheckAutopilotCompatibilityResponse implements ICheckAutopilotCompatibilityResponse { + + /** + * Constructs a new CheckAutopilotCompatibilityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICheckAutopilotCompatibilityResponse); + + /** CheckAutopilotCompatibilityResponse issues. */ + public issues: google.container.v1.IAutopilotCompatibilityIssue[]; + + /** CheckAutopilotCompatibilityResponse summary. */ + public summary: string; + + /** + * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAutopilotCompatibilityResponse instance + */ + public static create(properties?: google.container.v1.ICheckAutopilotCompatibilityResponse): google.container.v1.CheckAutopilotCompatibilityResponse; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @param message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @param message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CheckAutopilotCompatibilityResponse; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CheckAutopilotCompatibilityResponse; + + /** + * Verifies a CheckAutopilotCompatibilityResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAutopilotCompatibilityResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CheckAutopilotCompatibilityResponse; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. + * @param message CheckAutopilotCompatibilityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CheckAutopilotCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAutopilotCompatibilityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReleaseChannel. */ + interface IReleaseChannel { + + /** ReleaseChannel channel */ + channel?: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel|null); + } + + /** Represents a ReleaseChannel. */ + class ReleaseChannel implements IReleaseChannel { + + /** + * Constructs a new ReleaseChannel. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IReleaseChannel); + + /** ReleaseChannel channel. */ + public channel: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel); + + /** + * Creates a new ReleaseChannel instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseChannel instance + */ + public static create(properties?: google.container.v1.IReleaseChannel): google.container.v1.ReleaseChannel; + + /** + * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. + * @param message ReleaseChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. + * @param message ReleaseChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ReleaseChannel; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ReleaseChannel; + + /** + * Verifies a ReleaseChannel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseChannel + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ReleaseChannel; + + /** + * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. + * @param message ReleaseChannel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ReleaseChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseChannel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseChannel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReleaseChannel { + + /** Channel enum. */ + enum Channel { + UNSPECIFIED = 0, + RAPID = 1, + REGULAR = 2, + STABLE = 3, + EXTENDED = 4 + } + } + + /** Properties of a CostManagementConfig. */ + interface ICostManagementConfig { + + /** CostManagementConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a CostManagementConfig. */ + class CostManagementConfig implements ICostManagementConfig { + + /** + * Constructs a new CostManagementConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ICostManagementConfig); + + /** CostManagementConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new CostManagementConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CostManagementConfig instance + */ + public static create(properties?: google.container.v1.ICostManagementConfig): google.container.v1.CostManagementConfig; + + /** + * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. + * @param message CostManagementConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. + * @param message CostManagementConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CostManagementConfig; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CostManagementConfig; + + /** + * Verifies a CostManagementConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CostManagementConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CostManagementConfig; + + /** + * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. + * @param message CostManagementConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CostManagementConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CostManagementConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CostManagementConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntraNodeVisibilityConfig. */ + interface IIntraNodeVisibilityConfig { + + /** IntraNodeVisibilityConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents an IntraNodeVisibilityConfig. */ + class IntraNodeVisibilityConfig implements IIntraNodeVisibilityConfig { + + /** + * Constructs a new IntraNodeVisibilityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IIntraNodeVisibilityConfig); + + /** IntraNodeVisibilityConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new IntraNodeVisibilityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IntraNodeVisibilityConfig instance + */ + public static create(properties?: google.container.v1.IIntraNodeVisibilityConfig): google.container.v1.IntraNodeVisibilityConfig; + + /** + * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. + * @param message IntraNodeVisibilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. + * @param message IntraNodeVisibilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IntraNodeVisibilityConfig; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IntraNodeVisibilityConfig; + + /** + * Verifies an IntraNodeVisibilityConfig message. + * @param message Plain 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 IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntraNodeVisibilityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.IntraNodeVisibilityConfig; + + /** + * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. + * @param message IntraNodeVisibilityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.IntraNodeVisibilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntraNodeVisibilityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntraNodeVisibilityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ILBSubsettingConfig. */ + interface IILBSubsettingConfig { + + /** ILBSubsettingConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ILBSubsettingConfig. */ + class ILBSubsettingConfig implements IILBSubsettingConfig { + + /** + * Constructs a new ILBSubsettingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IILBSubsettingConfig); + + /** ILBSubsettingConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ILBSubsettingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ILBSubsettingConfig instance + */ + public static create(properties?: google.container.v1.IILBSubsettingConfig): google.container.v1.ILBSubsettingConfig; + + /** + * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. + * @param message ILBSubsettingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. + * @param message ILBSubsettingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ILBSubsettingConfig; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ILBSubsettingConfig; + + /** + * Verifies a ILBSubsettingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ILBSubsettingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ILBSubsettingConfig; + + /** + * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. + * @param message ILBSubsettingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ILBSubsettingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ILBSubsettingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ILBSubsettingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DNSConfig. */ + interface IDNSConfig { + + /** DNSConfig clusterDns */ + clusterDns?: (google.container.v1.DNSConfig.Provider|keyof typeof google.container.v1.DNSConfig.Provider|null); + + /** DNSConfig clusterDnsScope */ + clusterDnsScope?: (google.container.v1.DNSConfig.DNSScope|keyof typeof google.container.v1.DNSConfig.DNSScope|null); + + /** DNSConfig clusterDnsDomain */ + clusterDnsDomain?: (string|null); + + /** DNSConfig additiveVpcScopeDnsDomain */ + additiveVpcScopeDnsDomain?: (string|null); + } + + /** Represents a DNSConfig. */ + class DNSConfig implements IDNSConfig { + + /** + * Constructs a new DNSConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDNSConfig); + + /** DNSConfig clusterDns. */ + public clusterDns: (google.container.v1.DNSConfig.Provider|keyof typeof google.container.v1.DNSConfig.Provider); + + /** DNSConfig clusterDnsScope. */ + public clusterDnsScope: (google.container.v1.DNSConfig.DNSScope|keyof typeof google.container.v1.DNSConfig.DNSScope); + + /** DNSConfig clusterDnsDomain. */ + public clusterDnsDomain: string; + + /** DNSConfig additiveVpcScopeDnsDomain. */ + public additiveVpcScopeDnsDomain: string; + + /** + * Creates a new DNSConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSConfig instance + */ + public static create(properties?: google.container.v1.IDNSConfig): google.container.v1.DNSConfig; + + /** + * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. + * @param message DNSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. + * @param message DNSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DNSConfig; + + /** + * Decodes a DNSConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DNSConfig; + + /** + * Verifies a DNSConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DNSConfig; + + /** + * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. + * @param message DNSConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DNSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DNSConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DNSConfig { + + /** Provider enum. */ + enum Provider { + PROVIDER_UNSPECIFIED = 0, + PLATFORM_DEFAULT = 1, + CLOUD_DNS = 2, + KUBE_DNS = 3 + } + + /** DNSScope enum. */ + enum DNSScope { + DNS_SCOPE_UNSPECIFIED = 0, + CLUSTER_SCOPE = 1, + VPC_SCOPE = 2 + } + } + + /** Properties of a MaxPodsConstraint. */ + interface IMaxPodsConstraint { + + /** MaxPodsConstraint maxPodsPerNode */ + maxPodsPerNode?: (number|Long|string|null); + } + + /** Represents a MaxPodsConstraint. */ + class MaxPodsConstraint implements IMaxPodsConstraint { + + /** + * Constructs a new MaxPodsConstraint. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMaxPodsConstraint); + + /** MaxPodsConstraint maxPodsPerNode. */ + public maxPodsPerNode: (number|Long|string); + + /** + * Creates a new MaxPodsConstraint instance using the specified properties. + * @param [properties] Properties to set + * @returns MaxPodsConstraint instance + */ + public static create(properties?: google.container.v1.IMaxPodsConstraint): google.container.v1.MaxPodsConstraint; + + /** + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.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.container.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.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.container.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.container.v1.MaxPodsConstraint; + + /** + * 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.container.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.container.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.container.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 a WorkloadIdentityConfig. */ + interface IWorkloadIdentityConfig { + + /** WorkloadIdentityConfig workloadPool */ + workloadPool?: (string|null); + } + + /** Represents a WorkloadIdentityConfig. */ + class WorkloadIdentityConfig implements IWorkloadIdentityConfig { + + /** + * Constructs a new WorkloadIdentityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IWorkloadIdentityConfig); + + /** WorkloadIdentityConfig workloadPool. */ + public workloadPool: string; + + /** + * Creates a new WorkloadIdentityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadIdentityConfig instance + */ + public static create(properties?: google.container.v1.IWorkloadIdentityConfig): google.container.v1.WorkloadIdentityConfig; + + /** + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.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.container.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.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.container.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.container.v1.WorkloadIdentityConfig; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.container.v1.WorkloadIdentityConfig; + + /** + * 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadIdentityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadIdentityConfig; + + /** + * 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.container.v1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadIdentityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 IdentityServiceConfig. */ + interface IIdentityServiceConfig { + + /** IdentityServiceConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents an IdentityServiceConfig. */ + class IdentityServiceConfig implements IIdentityServiceConfig { + + /** + * Constructs a new IdentityServiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IIdentityServiceConfig); + + /** IdentityServiceConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new IdentityServiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IdentityServiceConfig instance + */ + public static create(properties?: google.container.v1.IIdentityServiceConfig): google.container.v1.IdentityServiceConfig; + + /** + * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. + * @param message IdentityServiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. + * @param message IdentityServiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IdentityServiceConfig; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IdentityServiceConfig; + + /** + * Verifies an IdentityServiceConfig message. + * @param message Plain 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 IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IdentityServiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.IdentityServiceConfig; + + /** + * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. + * @param message IdentityServiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.IdentityServiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IdentityServiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IdentityServiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MeshCertificates. */ + interface IMeshCertificates { + + /** MeshCertificates enableCertificates */ + enableCertificates?: (google.protobuf.IBoolValue|null); + } + + /** Represents a MeshCertificates. */ + class MeshCertificates implements IMeshCertificates { + + /** + * Constructs a new MeshCertificates. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMeshCertificates); + + /** MeshCertificates enableCertificates. */ + public enableCertificates?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new MeshCertificates instance using the specified properties. + * @param [properties] Properties to set + * @returns MeshCertificates instance + */ + public static create(properties?: google.container.v1.IMeshCertificates): google.container.v1.MeshCertificates; + + /** + * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. + * @param message MeshCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. + * @param message MeshCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MeshCertificates; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MeshCertificates; + + /** + * Verifies a MeshCertificates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MeshCertificates + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MeshCertificates; + + /** + * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. + * @param message MeshCertificates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MeshCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MeshCertificates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MeshCertificates + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseEncryption. */ + interface IDatabaseEncryption { + + /** DatabaseEncryption keyName */ + keyName?: (string|null); + + /** DatabaseEncryption state */ + state?: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State|null); + + /** DatabaseEncryption currentState */ + currentState?: (google.container.v1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1.DatabaseEncryption.CurrentState|null); + + /** DatabaseEncryption decryptionKeys */ + decryptionKeys?: (string[]|null); + + /** DatabaseEncryption lastOperationErrors */ + lastOperationErrors?: (google.container.v1.DatabaseEncryption.IOperationError[]|null); + } + + /** Represents a DatabaseEncryption. */ + class DatabaseEncryption implements IDatabaseEncryption { + + /** + * Constructs a new DatabaseEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDatabaseEncryption); + + /** DatabaseEncryption keyName. */ + public keyName: string; + + /** DatabaseEncryption state. */ + public state: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State); + + /** DatabaseEncryption currentState. */ + public currentState?: (google.container.v1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1.DatabaseEncryption.CurrentState|null); + + /** DatabaseEncryption decryptionKeys. */ + public decryptionKeys: string[]; + + /** DatabaseEncryption lastOperationErrors. */ + public lastOperationErrors: google.container.v1.DatabaseEncryption.IOperationError[]; + + /** DatabaseEncryption _currentState. */ + public _currentState?: "currentState"; + + /** + * Creates a new DatabaseEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseEncryption instance + */ + public static create(properties?: google.container.v1.IDatabaseEncryption): google.container.v1.DatabaseEncryption; + + /** + * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. + * @param message DatabaseEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. + * @param message DatabaseEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DatabaseEncryption; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DatabaseEncryption; + + /** + * Verifies a DatabaseEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseEncryption + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DatabaseEncryption; + + /** + * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. + * @param message DatabaseEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseEncryption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseEncryption { + + /** State enum. */ + enum State { + UNKNOWN = 0, + ENCRYPTED = 1, + DECRYPTED = 2 + } + + /** CurrentState enum. */ + enum CurrentState { + CURRENT_STATE_UNSPECIFIED = 0, + CURRENT_STATE_ENCRYPTED = 7, + CURRENT_STATE_DECRYPTED = 2, + CURRENT_STATE_ENCRYPTION_PENDING = 3, + CURRENT_STATE_ENCRYPTION_ERROR = 4, + CURRENT_STATE_DECRYPTION_PENDING = 5, + CURRENT_STATE_DECRYPTION_ERROR = 6 + } + + /** Properties of an OperationError. */ + interface IOperationError { + + /** OperationError keyName */ + keyName?: (string|null); + + /** OperationError errorMessage */ + errorMessage?: (string|null); + + /** OperationError timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationError. */ + class OperationError implements IOperationError { + + /** + * Constructs a new OperationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.DatabaseEncryption.IOperationError); + + /** OperationError keyName. */ + public keyName: string; + + /** OperationError errorMessage. */ + public errorMessage: string; + + /** OperationError timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationError instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationError instance + */ + public static create(properties?: google.container.v1.DatabaseEncryption.IOperationError): google.container.v1.DatabaseEncryption.OperationError; + + /** + * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. + * @param message OperationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. + * @param message OperationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DatabaseEncryption.OperationError; + + /** + * Decodes an OperationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DatabaseEncryption.OperationError; + + /** + * Verifies an OperationError message. + * @param message Plain 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 OperationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationError + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DatabaseEncryption.OperationError; + + /** + * Creates a plain object from an OperationError message. Also converts values to other types if specified. + * @param message OperationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DatabaseEncryption.OperationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListUsableSubnetworksRequest. */ + interface IListUsableSubnetworksRequest { + + /** ListUsableSubnetworksRequest parent */ + parent?: (string|null); + + /** ListUsableSubnetworksRequest filter */ + filter?: (string|null); + + /** ListUsableSubnetworksRequest pageSize */ + pageSize?: (number|null); + + /** ListUsableSubnetworksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUsableSubnetworksRequest. */ + class ListUsableSubnetworksRequest implements IListUsableSubnetworksRequest { + + /** + * Constructs a new ListUsableSubnetworksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListUsableSubnetworksRequest); + + /** ListUsableSubnetworksRequest parent. */ + public parent: string; + + /** ListUsableSubnetworksRequest filter. */ + public filter: string; + + /** ListUsableSubnetworksRequest pageSize. */ + public pageSize: number; + + /** ListUsableSubnetworksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUsableSubnetworksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUsableSubnetworksRequest instance + */ + public static create(properties?: google.container.v1.IListUsableSubnetworksRequest): google.container.v1.ListUsableSubnetworksRequest; + + /** + * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. + * @param message ListUsableSubnetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. + * @param message ListUsableSubnetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListUsableSubnetworksRequest; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListUsableSubnetworksRequest; + + /** + * Verifies a ListUsableSubnetworksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUsableSubnetworksRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListUsableSubnetworksRequest; + + /** + * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. + * @param message ListUsableSubnetworksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListUsableSubnetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUsableSubnetworksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUsableSubnetworksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUsableSubnetworksResponse. */ + interface IListUsableSubnetworksResponse { + + /** ListUsableSubnetworksResponse subnetworks */ + subnetworks?: (google.container.v1.IUsableSubnetwork[]|null); + + /** ListUsableSubnetworksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUsableSubnetworksResponse. */ + class ListUsableSubnetworksResponse implements IListUsableSubnetworksResponse { + + /** + * Constructs a new ListUsableSubnetworksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IListUsableSubnetworksResponse); + + /** ListUsableSubnetworksResponse subnetworks. */ + public subnetworks: google.container.v1.IUsableSubnetwork[]; + + /** ListUsableSubnetworksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUsableSubnetworksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUsableSubnetworksResponse instance + */ + public static create(properties?: google.container.v1.IListUsableSubnetworksResponse): google.container.v1.ListUsableSubnetworksResponse; + + /** + * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. + * @param message ListUsableSubnetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. + * @param message ListUsableSubnetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListUsableSubnetworksResponse; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListUsableSubnetworksResponse; + + /** + * Verifies a ListUsableSubnetworksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUsableSubnetworksResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ListUsableSubnetworksResponse; + + /** + * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. + * @param message ListUsableSubnetworksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ListUsableSubnetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUsableSubnetworksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUsableSubnetworksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UsableSubnetworkSecondaryRange. */ + interface IUsableSubnetworkSecondaryRange { + + /** UsableSubnetworkSecondaryRange rangeName */ + rangeName?: (string|null); + + /** UsableSubnetworkSecondaryRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** UsableSubnetworkSecondaryRange status */ + status?: (google.container.v1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1.UsableSubnetworkSecondaryRange.Status|null); + } + + /** Represents a UsableSubnetworkSecondaryRange. */ + class UsableSubnetworkSecondaryRange implements IUsableSubnetworkSecondaryRange { + + /** + * Constructs a new UsableSubnetworkSecondaryRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUsableSubnetworkSecondaryRange); + + /** UsableSubnetworkSecondaryRange rangeName. */ + public rangeName: string; + + /** UsableSubnetworkSecondaryRange ipCidrRange. */ + public ipCidrRange: string; + + /** UsableSubnetworkSecondaryRange status. */ + public status: (google.container.v1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1.UsableSubnetworkSecondaryRange.Status); + + /** + * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. + * @param [properties] Properties to set + * @returns UsableSubnetworkSecondaryRange instance + */ + public static create(properties?: google.container.v1.IUsableSubnetworkSecondaryRange): google.container.v1.UsableSubnetworkSecondaryRange; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @param message UsableSubnetworkSecondaryRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @param message UsableSubnetworkSecondaryRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UsableSubnetworkSecondaryRange; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UsableSubnetworkSecondaryRange; + + /** + * Verifies a UsableSubnetworkSecondaryRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsableSubnetworkSecondaryRange + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UsableSubnetworkSecondaryRange; + + /** + * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. + * @param message UsableSubnetworkSecondaryRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UsableSubnetworkSecondaryRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsableSubnetworkSecondaryRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsableSubnetworkSecondaryRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UsableSubnetworkSecondaryRange { + + /** Status enum. */ + enum Status { + UNKNOWN = 0, + UNUSED = 1, + IN_USE_SERVICE = 2, + IN_USE_SHAREABLE_POD = 3, + IN_USE_MANAGED_POD = 4 + } + } + + /** Properties of a UsableSubnetwork. */ + interface IUsableSubnetwork { + + /** UsableSubnetwork subnetwork */ + subnetwork?: (string|null); + + /** UsableSubnetwork network */ + network?: (string|null); + + /** UsableSubnetwork ipCidrRange */ + ipCidrRange?: (string|null); + + /** UsableSubnetwork secondaryIpRanges */ + secondaryIpRanges?: (google.container.v1.IUsableSubnetworkSecondaryRange[]|null); + + /** UsableSubnetwork statusMessage */ + statusMessage?: (string|null); + } + + /** Represents a UsableSubnetwork. */ + class UsableSubnetwork implements IUsableSubnetwork { + + /** + * Constructs a new UsableSubnetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUsableSubnetwork); + + /** UsableSubnetwork subnetwork. */ + public subnetwork: string; + + /** UsableSubnetwork network. */ + public network: string; + + /** UsableSubnetwork ipCidrRange. */ + public ipCidrRange: string; + + /** UsableSubnetwork secondaryIpRanges. */ + public secondaryIpRanges: google.container.v1.IUsableSubnetworkSecondaryRange[]; + + /** UsableSubnetwork statusMessage. */ + public statusMessage: string; + + /** + * Creates a new UsableSubnetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns UsableSubnetwork instance + */ + public static create(properties?: google.container.v1.IUsableSubnetwork): google.container.v1.UsableSubnetwork; + + /** + * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. + * @param message UsableSubnetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. + * @param message UsableSubnetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UsableSubnetwork; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UsableSubnetwork; + + /** + * Verifies a UsableSubnetwork message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsableSubnetwork + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UsableSubnetwork; + + /** + * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. + * @param message UsableSubnetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UsableSubnetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsableSubnetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsableSubnetwork + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceUsageExportConfig. */ + interface IResourceUsageExportConfig { + + /** ResourceUsageExportConfig bigqueryDestination */ + bigqueryDestination?: (google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null); + + /** ResourceUsageExportConfig enableNetworkEgressMetering */ + enableNetworkEgressMetering?: (boolean|null); + + /** ResourceUsageExportConfig consumptionMeteringConfig */ + consumptionMeteringConfig?: (google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); + } + + /** Represents a ResourceUsageExportConfig. */ + class ResourceUsageExportConfig implements IResourceUsageExportConfig { + + /** + * Constructs a new ResourceUsageExportConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IResourceUsageExportConfig); + + /** ResourceUsageExportConfig bigqueryDestination. */ + public bigqueryDestination?: (google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null); + + /** ResourceUsageExportConfig enableNetworkEgressMetering. */ + public enableNetworkEgressMetering: boolean; + + /** ResourceUsageExportConfig consumptionMeteringConfig. */ + public consumptionMeteringConfig?: (google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); + + /** + * Creates a new ResourceUsageExportConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceUsageExportConfig instance + */ + public static create(properties?: google.container.v1.IResourceUsageExportConfig): google.container.v1.ResourceUsageExportConfig; + + /** + * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. + * @param message ResourceUsageExportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. + * @param message ResourceUsageExportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig; + + /** + * Verifies a ResourceUsageExportConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceUsageExportConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig; + + /** + * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. + * @param message ResourceUsageExportConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceUsageExportConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceUsageExportConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceUsageExportConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceUsageExportConfig { + + /** Properties of a BigQueryDestination. */ + interface IBigQueryDestination { + + /** BigQueryDestination datasetId */ + datasetId?: (string|null); + } + + /** Represents a BigQueryDestination. */ + class BigQueryDestination implements IBigQueryDestination { + + /** + * Constructs a new BigQueryDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination); + + /** BigQueryDestination datasetId. */ + public datasetId: string; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDestination instance + */ + public static create(properties?: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Verifies a BigQueryDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDestination + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @param message BigQueryDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceUsageExportConfig.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumptionMeteringConfig. */ + interface IConsumptionMeteringConfig { + + /** ConsumptionMeteringConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConsumptionMeteringConfig. */ + class ConsumptionMeteringConfig implements IConsumptionMeteringConfig { + + /** + * Constructs a new ConsumptionMeteringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig); + + /** ConsumptionMeteringConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ConsumptionMeteringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumptionMeteringConfig instance + */ + public static create(properties?: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @param message ConsumptionMeteringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @param message ConsumptionMeteringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Verifies a ConsumptionMeteringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumptionMeteringConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. + * @param message ConsumptionMeteringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumptionMeteringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumptionMeteringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a VerticalPodAutoscaling. */ + interface IVerticalPodAutoscaling { + + /** VerticalPodAutoscaling enabled */ + enabled?: (boolean|null); + } + + /** Represents a VerticalPodAutoscaling. */ + class VerticalPodAutoscaling implements IVerticalPodAutoscaling { + + /** + * Constructs a new VerticalPodAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IVerticalPodAutoscaling); + + /** VerticalPodAutoscaling enabled. */ + public enabled: boolean; + + /** + * Creates a new VerticalPodAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns VerticalPodAutoscaling instance + */ + public static create(properties?: google.container.v1.IVerticalPodAutoscaling): google.container.v1.VerticalPodAutoscaling; + + /** + * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. + * @param message VerticalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. + * @param message VerticalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.VerticalPodAutoscaling; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.VerticalPodAutoscaling; + + /** + * Verifies a VerticalPodAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerticalPodAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.VerticalPodAutoscaling; + + /** + * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. + * @param message VerticalPodAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.VerticalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerticalPodAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerticalPodAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DefaultSnatStatus. */ + interface IDefaultSnatStatus { + + /** DefaultSnatStatus disabled */ + disabled?: (boolean|null); + } + + /** Represents a DefaultSnatStatus. */ + class DefaultSnatStatus implements IDefaultSnatStatus { + + /** + * Constructs a new DefaultSnatStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDefaultSnatStatus); + + /** DefaultSnatStatus disabled. */ + public disabled: boolean; + + /** + * Creates a new DefaultSnatStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DefaultSnatStatus instance + */ + public static create(properties?: google.container.v1.IDefaultSnatStatus): google.container.v1.DefaultSnatStatus; + + /** + * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. + * @param message DefaultSnatStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. + * @param message DefaultSnatStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DefaultSnatStatus; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DefaultSnatStatus; + + /** + * Verifies a DefaultSnatStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DefaultSnatStatus + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DefaultSnatStatus; + + /** + * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. + * @param message DefaultSnatStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DefaultSnatStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DefaultSnatStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DefaultSnatStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShieldedNodes. */ + interface IShieldedNodes { + + /** ShieldedNodes enabled */ + enabled?: (boolean|null); + } + + /** Represents a ShieldedNodes. */ + class ShieldedNodes implements IShieldedNodes { + + /** + * Constructs a new ShieldedNodes. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IShieldedNodes); + + /** ShieldedNodes enabled. */ + public enabled: boolean; + + /** + * Creates a new ShieldedNodes instance using the specified properties. + * @param [properties] Properties to set + * @returns ShieldedNodes instance + */ + public static create(properties?: google.container.v1.IShieldedNodes): google.container.v1.ShieldedNodes; + + /** + * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. + * @param message ShieldedNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. + * @param message ShieldedNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ShieldedNodes; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ShieldedNodes; + + /** + * Verifies a ShieldedNodes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShieldedNodes + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ShieldedNodes; + + /** + * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. + * @param message ShieldedNodes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ShieldedNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShieldedNodes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShieldedNodes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VirtualNIC. */ + interface IVirtualNIC { + + /** VirtualNIC enabled */ + enabled?: (boolean|null); + } + + /** Represents a VirtualNIC. */ + class VirtualNIC implements IVirtualNIC { + + /** + * Constructs a new VirtualNIC. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IVirtualNIC); + + /** VirtualNIC enabled. */ + public enabled: boolean; + + /** + * Creates a new VirtualNIC instance using the specified properties. + * @param [properties] Properties to set + * @returns VirtualNIC instance + */ + public static create(properties?: google.container.v1.IVirtualNIC): google.container.v1.VirtualNIC; + + /** + * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. + * @param message VirtualNIC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. + * @param message VirtualNIC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.VirtualNIC; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.VirtualNIC; + + /** + * Verifies a VirtualNIC message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VirtualNIC + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.VirtualNIC; + + /** + * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. + * @param message VirtualNIC + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.VirtualNIC, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VirtualNIC to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VirtualNIC + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FastSocket. */ + interface IFastSocket { + + /** FastSocket enabled */ + enabled?: (boolean|null); + } + + /** Represents a FastSocket. */ + class FastSocket implements IFastSocket { + + /** + * Constructs a new FastSocket. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IFastSocket); + + /** FastSocket enabled. */ + public enabled: boolean; + + /** + * Creates a new FastSocket instance using the specified properties. + * @param [properties] Properties to set + * @returns FastSocket instance + */ + public static create(properties?: google.container.v1.IFastSocket): google.container.v1.FastSocket; + + /** + * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. + * @param message FastSocket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. + * @param message FastSocket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FastSocket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.FastSocket; + + /** + * Decodes a FastSocket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.FastSocket; + + /** + * Verifies a FastSocket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FastSocket + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.FastSocket; + + /** + * Creates a plain object from a FastSocket message. Also converts values to other types if specified. + * @param message FastSocket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.FastSocket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FastSocket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FastSocket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PrivateIPv6GoogleAccess enum. */ + enum PrivateIPv6GoogleAccess { + PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1, + PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2, + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3 + } + + /** Properties of a NotificationConfig. */ + interface INotificationConfig { + + /** NotificationConfig pubsub */ + pubsub?: (google.container.v1.NotificationConfig.IPubSub|null); + } + + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { + + /** + * Constructs a new NotificationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INotificationConfig); + + /** NotificationConfig pubsub. */ + public pubsub?: (google.container.v1.NotificationConfig.IPubSub|null); + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationConfig instance + */ + public static create(properties?: google.container.v1.INotificationConfig): google.container.v1.NotificationConfig; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig; + + /** + * Verifies a NotificationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NotificationConfig { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + UPGRADE_AVAILABLE_EVENT = 1, + UPGRADE_EVENT = 2, + SECURITY_BULLETIN_EVENT = 3 + } + + /** Properties of a PubSub. */ + interface IPubSub { + + /** PubSub enabled */ + enabled?: (boolean|null); + + /** PubSub topic */ + topic?: (string|null); + + /** PubSub filter */ + filter?: (google.container.v1.NotificationConfig.IFilter|null); + } + + /** Represents a PubSub. */ + class PubSub implements IPubSub { + + /** + * Constructs a new PubSub. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NotificationConfig.IPubSub); + + /** PubSub enabled. */ + public enabled: boolean; + + /** PubSub topic. */ + public topic: string; + + /** PubSub filter. */ + public filter?: (google.container.v1.NotificationConfig.IFilter|null); + + /** + * Creates a new PubSub instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSub instance + */ + public static create(properties?: google.container.v1.NotificationConfig.IPubSub): google.container.v1.NotificationConfig.PubSub; + + /** + * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. + * @param message PubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. + * @param message PubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSub message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig.PubSub; + + /** + * Decodes a PubSub message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig.PubSub; + + /** + * Verifies a PubSub message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubSub message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSub + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig.PubSub; + + /** + * Creates a plain object from a PubSub message. Also converts values to other types if specified. + * @param message PubSub + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NotificationConfig.PubSub, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSub to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSub + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter eventType */ + eventType?: (google.container.v1.NotificationConfig.EventType[]|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.NotificationConfig.IFilter); + + /** Filter eventType. */ + public eventType: google.container.v1.NotificationConfig.EventType[]; + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.container.v1.NotificationConfig.IFilter): google.container.v1.NotificationConfig.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NotificationConfig.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ConfidentialNodes. */ + interface IConfidentialNodes { + + /** ConfidentialNodes enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConfidentialNodes. */ + class ConfidentialNodes implements IConfidentialNodes { + + /** + * Constructs a new ConfidentialNodes. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IConfidentialNodes); + + /** ConfidentialNodes enabled. */ + public enabled: boolean; + + /** + * Creates a new ConfidentialNodes instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialNodes instance + */ + public static create(properties?: google.container.v1.IConfidentialNodes): google.container.v1.ConfidentialNodes; + + /** + * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. + * @param message ConfidentialNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. + * @param message ConfidentialNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ConfidentialNodes; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ConfidentialNodes; + + /** + * Verifies a ConfidentialNodes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialNodes + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ConfidentialNodes; + + /** + * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. + * @param message ConfidentialNodes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ConfidentialNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialNodes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialNodes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UpgradeResourceType enum. */ + enum UpgradeResourceType { + UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0, + MASTER = 1, + NODE_POOL = 2 + } + + /** Properties of an UpgradeEvent. */ + interface IUpgradeEvent { + + /** UpgradeEvent resourceType */ + resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); + + /** UpgradeEvent operation */ + operation?: (string|null); + + /** UpgradeEvent operationStartTime */ + operationStartTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeEvent currentVersion */ + currentVersion?: (string|null); + + /** UpgradeEvent targetVersion */ + targetVersion?: (string|null); + + /** UpgradeEvent resource */ + resource?: (string|null); + } + + /** Represents an UpgradeEvent. */ + class UpgradeEvent implements IUpgradeEvent { + + /** + * Constructs a new UpgradeEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpgradeEvent); + + /** UpgradeEvent resourceType. */ + public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); + + /** UpgradeEvent operation. */ + public operation: string; + + /** UpgradeEvent operationStartTime. */ + public operationStartTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeEvent currentVersion. */ + public currentVersion: string; + + /** UpgradeEvent targetVersion. */ + public targetVersion: string; + + /** UpgradeEvent resource. */ + public resource: string; + + /** + * Creates a new UpgradeEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeEvent instance + */ + public static create(properties?: google.container.v1.IUpgradeEvent): google.container.v1.UpgradeEvent; + + /** + * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. + * @param message UpgradeEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. + * @param message UpgradeEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeEvent; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeEvent; + + /** + * Verifies an UpgradeEvent message. + * @param message Plain 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 UpgradeEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeEvent; + + /** + * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. + * @param message UpgradeEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpgradeEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpgradeInfoEvent. */ + interface IUpgradeInfoEvent { + + /** UpgradeInfoEvent resourceType */ + resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); + + /** UpgradeInfoEvent operation */ + operation?: (string|null); + + /** UpgradeInfoEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent currentVersion */ + currentVersion?: (string|null); + + /** UpgradeInfoEvent targetVersion */ + targetVersion?: (string|null); + + /** UpgradeInfoEvent resource */ + resource?: (string|null); + + /** UpgradeInfoEvent state */ + state?: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State|null); + + /** UpgradeInfoEvent description */ + description?: (string|null); + } + + /** Represents an UpgradeInfoEvent. */ + class UpgradeInfoEvent implements IUpgradeInfoEvent { + + /** + * Constructs a new UpgradeInfoEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpgradeInfoEvent); + + /** UpgradeInfoEvent resourceType. */ + public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); + + /** UpgradeInfoEvent operation. */ + public operation: string; + + /** UpgradeInfoEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent currentVersion. */ + public currentVersion: string; + + /** UpgradeInfoEvent targetVersion. */ + public targetVersion: string; + + /** UpgradeInfoEvent resource. */ + public resource: string; + + /** UpgradeInfoEvent state. */ + public state: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State); + + /** UpgradeInfoEvent description. */ + public description: string; + + /** + * Creates a new UpgradeInfoEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeInfoEvent instance + */ + public static create(properties?: google.container.v1.IUpgradeInfoEvent): google.container.v1.UpgradeInfoEvent; + + /** + * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @param message UpgradeInfoEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @param message UpgradeInfoEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeInfoEvent; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeInfoEvent; + + /** + * Verifies an UpgradeInfoEvent message. + * @param message Plain 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 UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeInfoEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeInfoEvent; + + /** + * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. + * @param message UpgradeInfoEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpgradeInfoEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeInfoEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeInfoEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UpgradeInfoEvent { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 3, + SUCCEEDED = 4, + FAILED = 5, + CANCELED = 6 + } + } + + /** Properties of an UpgradeAvailableEvent. */ + interface IUpgradeAvailableEvent { + + /** UpgradeAvailableEvent version */ + version?: (string|null); + + /** UpgradeAvailableEvent resourceType */ + resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); + + /** UpgradeAvailableEvent releaseChannel */ + releaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** UpgradeAvailableEvent resource */ + resource?: (string|null); + } + + /** Represents an UpgradeAvailableEvent. */ + class UpgradeAvailableEvent implements IUpgradeAvailableEvent { + + /** + * Constructs a new UpgradeAvailableEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpgradeAvailableEvent); + + /** UpgradeAvailableEvent version. */ + public version: string; + + /** UpgradeAvailableEvent resourceType. */ + public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); + + /** UpgradeAvailableEvent releaseChannel. */ + public releaseChannel?: (google.container.v1.IReleaseChannel|null); + + /** UpgradeAvailableEvent resource. */ + public resource: string; + + /** + * Creates a new UpgradeAvailableEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeAvailableEvent instance + */ + public static create(properties?: google.container.v1.IUpgradeAvailableEvent): google.container.v1.UpgradeAvailableEvent; + + /** + * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. + * @param message UpgradeAvailableEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. + * @param message UpgradeAvailableEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeAvailableEvent; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeAvailableEvent; + + /** + * Verifies an UpgradeAvailableEvent message. + * @param message Plain 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 UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeAvailableEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeAvailableEvent; + + /** + * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. + * @param message UpgradeAvailableEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpgradeAvailableEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeAvailableEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeAvailableEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityBulletinEvent. */ + interface ISecurityBulletinEvent { + + /** SecurityBulletinEvent resourceTypeAffected */ + resourceTypeAffected?: (string|null); + + /** SecurityBulletinEvent bulletinId */ + bulletinId?: (string|null); + + /** SecurityBulletinEvent cveIds */ + cveIds?: (string[]|null); + + /** SecurityBulletinEvent severity */ + severity?: (string|null); + + /** SecurityBulletinEvent bulletinUri */ + bulletinUri?: (string|null); + + /** SecurityBulletinEvent briefDescription */ + briefDescription?: (string|null); + + /** SecurityBulletinEvent affectedSupportedMinors */ + affectedSupportedMinors?: (string[]|null); + + /** SecurityBulletinEvent patchedVersions */ + patchedVersions?: (string[]|null); + + /** SecurityBulletinEvent suggestedUpgradeTarget */ + suggestedUpgradeTarget?: (string|null); + + /** SecurityBulletinEvent manualStepsRequired */ + manualStepsRequired?: (boolean|null); + } + + /** Represents a SecurityBulletinEvent. */ + class SecurityBulletinEvent implements ISecurityBulletinEvent { + + /** + * Constructs a new SecurityBulletinEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecurityBulletinEvent); + + /** SecurityBulletinEvent resourceTypeAffected. */ + public resourceTypeAffected: string; + + /** SecurityBulletinEvent bulletinId. */ + public bulletinId: string; + + /** SecurityBulletinEvent cveIds. */ + public cveIds: string[]; + + /** SecurityBulletinEvent severity. */ + public severity: string; + + /** SecurityBulletinEvent bulletinUri. */ + public bulletinUri: string; + + /** SecurityBulletinEvent briefDescription. */ + public briefDescription: string; + + /** SecurityBulletinEvent affectedSupportedMinors. */ + public affectedSupportedMinors: string[]; + + /** SecurityBulletinEvent patchedVersions. */ + public patchedVersions: string[]; + + /** SecurityBulletinEvent suggestedUpgradeTarget. */ + public suggestedUpgradeTarget: string; + + /** SecurityBulletinEvent manualStepsRequired. */ + public manualStepsRequired: boolean; + + /** + * Creates a new SecurityBulletinEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityBulletinEvent instance + */ + public static create(properties?: google.container.v1.ISecurityBulletinEvent): google.container.v1.SecurityBulletinEvent; + + /** + * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. + * @param message SecurityBulletinEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. + * @param message SecurityBulletinEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityBulletinEvent; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityBulletinEvent; + + /** + * Verifies a SecurityBulletinEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityBulletinEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityBulletinEvent; + + /** + * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. + * @param message SecurityBulletinEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecurityBulletinEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityBulletinEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityBulletinEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Autopilot. */ + interface IAutopilot { + + /** Autopilot enabled */ + enabled?: (boolean|null); + + /** Autopilot workloadPolicyConfig */ + workloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); + } + + /** Represents an Autopilot. */ + class Autopilot implements IAutopilot { + + /** + * Constructs a new Autopilot. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAutopilot); + + /** Autopilot enabled. */ + public enabled: boolean; + + /** Autopilot workloadPolicyConfig. */ + public workloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); + + /** + * Creates a new Autopilot instance using the specified properties. + * @param [properties] Properties to set + * @returns Autopilot instance + */ + public static create(properties?: google.container.v1.IAutopilot): google.container.v1.Autopilot; + + /** + * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. + * @param message Autopilot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. + * @param message Autopilot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Autopilot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Autopilot; + + /** + * Decodes an Autopilot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Autopilot; + + /** + * Verifies an Autopilot message. + * @param message Plain 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 Autopilot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Autopilot + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.Autopilot; + + /** + * Creates a plain object from an Autopilot message. Also converts values to other types if specified. + * @param message Autopilot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.Autopilot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Autopilot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Autopilot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadPolicyConfig. */ + interface IWorkloadPolicyConfig { + + /** WorkloadPolicyConfig allowNetAdmin */ + allowNetAdmin?: (boolean|null); + } + + /** Represents a WorkloadPolicyConfig. */ + class WorkloadPolicyConfig implements IWorkloadPolicyConfig { + + /** + * Constructs a new WorkloadPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IWorkloadPolicyConfig); + + /** WorkloadPolicyConfig allowNetAdmin. */ + public allowNetAdmin?: (boolean|null); + + /** WorkloadPolicyConfig _allowNetAdmin. */ + public _allowNetAdmin?: "allowNetAdmin"; + + /** + * Creates a new WorkloadPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadPolicyConfig instance + */ + public static create(properties?: google.container.v1.IWorkloadPolicyConfig): google.container.v1.WorkloadPolicyConfig; + + /** + * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. + * @param message WorkloadPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. + * @param message WorkloadPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WorkloadPolicyConfig; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WorkloadPolicyConfig; + + /** + * Verifies a WorkloadPolicyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadPolicyConfig; + + /** + * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. + * @param message WorkloadPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.WorkloadPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadPolicyConfig + * @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.container.v1.ILoggingComponentConfig|null); + } + + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { + + /** + * Constructs a new LoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILoggingConfig); + + /** LoggingConfig componentConfig. */ + public componentConfig?: (google.container.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.container.v1.ILoggingConfig): google.container.v1.LoggingConfig; + + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.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.container.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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.container.v1.LoggingComponentConfig.Component[]|null); + } + + /** Represents a LoggingComponentConfig. */ + class LoggingComponentConfig implements ILoggingComponentConfig { + + /** + * Constructs a new LoggingComponentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILoggingComponentConfig); + + /** LoggingComponentConfig enableComponents. */ + public enableComponents: google.container.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.container.v1.ILoggingComponentConfig): google.container.v1.LoggingComponentConfig; + + /** + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.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.container.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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, + APISERVER = 3, + SCHEDULER = 4, + CONTROLLER_MANAGER = 5, + KCP_SSHD = 7, + KCP_CONNECTION = 8 + } + } + + /** Properties of a RayClusterLoggingConfig. */ + interface IRayClusterLoggingConfig { + + /** RayClusterLoggingConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a RayClusterLoggingConfig. */ + class RayClusterLoggingConfig implements IRayClusterLoggingConfig { + + /** + * Constructs a new RayClusterLoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRayClusterLoggingConfig); + + /** RayClusterLoggingConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new RayClusterLoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayClusterLoggingConfig instance + */ + public static create(properties?: google.container.v1.IRayClusterLoggingConfig): google.container.v1.RayClusterLoggingConfig; + + /** + * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. + * @param message RayClusterLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. + * @param message RayClusterLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayClusterLoggingConfig; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayClusterLoggingConfig; + + /** + * Verifies a RayClusterLoggingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayClusterLoggingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RayClusterLoggingConfig; + + /** + * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. + * @param message RayClusterLoggingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RayClusterLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayClusterLoggingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayClusterLoggingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig componentConfig */ + componentConfig?: (google.container.v1.IMonitoringComponentConfig|null); + + /** MonitoringConfig managedPrometheusConfig */ + managedPrometheusConfig?: (google.container.v1.IManagedPrometheusConfig|null); + + /** MonitoringConfig advancedDatapathObservabilityConfig */ + advancedDatapathObservabilityConfig?: (google.container.v1.IAdvancedDatapathObservabilityConfig|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMonitoringConfig); + + /** MonitoringConfig componentConfig. */ + public componentConfig?: (google.container.v1.IMonitoringComponentConfig|null); + + /** MonitoringConfig managedPrometheusConfig. */ + public managedPrometheusConfig?: (google.container.v1.IManagedPrometheusConfig|null); + + /** MonitoringConfig advancedDatapathObservabilityConfig. */ + public advancedDatapathObservabilityConfig?: (google.container.v1.IAdvancedDatapathObservabilityConfig|null); + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.container.v1.IMonitoringConfig): google.container.v1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.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.container.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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 an AdvancedDatapathObservabilityConfig. */ + interface IAdvancedDatapathObservabilityConfig { + + /** AdvancedDatapathObservabilityConfig enableMetrics */ + enableMetrics?: (boolean|null); + + /** AdvancedDatapathObservabilityConfig relayMode */ + relayMode?: (google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|null); + + /** AdvancedDatapathObservabilityConfig enableRelay */ + enableRelay?: (boolean|null); + } + + /** Represents an AdvancedDatapathObservabilityConfig. */ + class AdvancedDatapathObservabilityConfig implements IAdvancedDatapathObservabilityConfig { + + /** + * Constructs a new AdvancedDatapathObservabilityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdvancedDatapathObservabilityConfig); + + /** AdvancedDatapathObservabilityConfig enableMetrics. */ + public enableMetrics: boolean; + + /** AdvancedDatapathObservabilityConfig relayMode. */ + public relayMode: (google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode); + + /** AdvancedDatapathObservabilityConfig enableRelay. */ + public enableRelay?: (boolean|null); + + /** AdvancedDatapathObservabilityConfig _enableRelay. */ + public _enableRelay?: "enableRelay"; + + /** + * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedDatapathObservabilityConfig instance + */ + public static create(properties?: google.container.v1.IAdvancedDatapathObservabilityConfig): google.container.v1.AdvancedDatapathObservabilityConfig; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @param message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @param message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdvancedDatapathObservabilityConfig; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdvancedDatapathObservabilityConfig; + + /** + * Verifies an AdvancedDatapathObservabilityConfig message. + * @param message Plain 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 AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedDatapathObservabilityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdvancedDatapathObservabilityConfig; + + /** + * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. + * @param message AdvancedDatapathObservabilityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdvancedDatapathObservabilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedDatapathObservabilityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedDatapathObservabilityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AdvancedDatapathObservabilityConfig { + + /** RelayMode enum. */ + enum RelayMode { + RELAY_MODE_UNSPECIFIED = 0, + DISABLED = 1, + INTERNAL_VPC_LB = 3, + EXTERNAL_LB = 4 + } + } + + /** Properties of a RayClusterMonitoringConfig. */ + interface IRayClusterMonitoringConfig { + + /** RayClusterMonitoringConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a RayClusterMonitoringConfig. */ + class RayClusterMonitoringConfig implements IRayClusterMonitoringConfig { + + /** + * Constructs a new RayClusterMonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IRayClusterMonitoringConfig); + + /** RayClusterMonitoringConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new RayClusterMonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayClusterMonitoringConfig instance + */ + public static create(properties?: google.container.v1.IRayClusterMonitoringConfig): google.container.v1.RayClusterMonitoringConfig; + + /** + * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. + * @param message RayClusterMonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. + * @param message RayClusterMonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayClusterMonitoringConfig; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayClusterMonitoringConfig; + + /** + * Verifies a RayClusterMonitoringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayClusterMonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.RayClusterMonitoringConfig; + + /** + * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. + * @param message RayClusterMonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.RayClusterMonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayClusterMonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayClusterMonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolLoggingConfig. */ + interface INodePoolLoggingConfig { + + /** NodePoolLoggingConfig variantConfig */ + variantConfig?: (google.container.v1.ILoggingVariantConfig|null); + } + + /** Represents a NodePoolLoggingConfig. */ + class NodePoolLoggingConfig implements INodePoolLoggingConfig { + + /** + * Constructs a new NodePoolLoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePoolLoggingConfig); + + /** NodePoolLoggingConfig variantConfig. */ + public variantConfig?: (google.container.v1.ILoggingVariantConfig|null); + + /** + * Creates a new NodePoolLoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolLoggingConfig instance + */ + public static create(properties?: google.container.v1.INodePoolLoggingConfig): google.container.v1.NodePoolLoggingConfig; + + /** + * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. + * @param message NodePoolLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. + * @param message NodePoolLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolLoggingConfig; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolLoggingConfig; + + /** + * Verifies a NodePoolLoggingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolLoggingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolLoggingConfig; + + /** + * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. + * @param message NodePoolLoggingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.NodePoolLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolLoggingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolLoggingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoggingVariantConfig. */ + interface ILoggingVariantConfig { + + /** LoggingVariantConfig variant */ + variant?: (google.container.v1.LoggingVariantConfig.Variant|keyof typeof google.container.v1.LoggingVariantConfig.Variant|null); + } + + /** Represents a LoggingVariantConfig. */ + class LoggingVariantConfig implements ILoggingVariantConfig { + + /** + * Constructs a new LoggingVariantConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILoggingVariantConfig); + + /** LoggingVariantConfig variant. */ + public variant: (google.container.v1.LoggingVariantConfig.Variant|keyof typeof google.container.v1.LoggingVariantConfig.Variant); + + /** + * Creates a new LoggingVariantConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingVariantConfig instance + */ + public static create(properties?: google.container.v1.ILoggingVariantConfig): google.container.v1.LoggingVariantConfig; + + /** + * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. + * @param message LoggingVariantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. + * @param message LoggingVariantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LoggingVariantConfig; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LoggingVariantConfig; + + /** + * Verifies a LoggingVariantConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingVariantConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LoggingVariantConfig; + + /** + * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. + * @param message LoggingVariantConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LoggingVariantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingVariantConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoggingVariantConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoggingVariantConfig { + + /** Variant enum. */ + enum Variant { + VARIANT_UNSPECIFIED = 0, + DEFAULT = 1, + MAX_THROUGHPUT = 2 + } + } + + /** Properties of a MonitoringComponentConfig. */ + interface IMonitoringComponentConfig { + + /** MonitoringComponentConfig enableComponents */ + enableComponents?: (google.container.v1.MonitoringComponentConfig.Component[]|null); + } + + /** Represents a MonitoringComponentConfig. */ + class MonitoringComponentConfig implements IMonitoringComponentConfig { + + /** + * Constructs a new MonitoringComponentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IMonitoringComponentConfig); + + /** MonitoringComponentConfig enableComponents. */ + public enableComponents: google.container.v1.MonitoringComponentConfig.Component[]; + + /** + * Creates a new MonitoringComponentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringComponentConfig instance + */ + public static create(properties?: google.container.v1.IMonitoringComponentConfig): google.container.v1.MonitoringComponentConfig; + + /** + * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. + * @param message MonitoringComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. + * @param message MonitoringComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MonitoringComponentConfig; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MonitoringComponentConfig; + + /** + * Verifies a MonitoringComponentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringComponentConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.MonitoringComponentConfig; + + /** + * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * @param message MonitoringComponentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.MonitoringComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringComponentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringComponentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MonitoringComponentConfig { + + /** Component enum. */ + enum Component { + COMPONENT_UNSPECIFIED = 0, + SYSTEM_COMPONENTS = 1, + APISERVER = 3, + SCHEDULER = 4, + CONTROLLER_MANAGER = 5, + STORAGE = 7, + HPA = 8, + POD = 9, + DAEMONSET = 10, + DEPLOYMENT = 11, + STATEFULSET = 12, + CADVISOR = 13, + KUBELET = 14, + DCGM = 15 + } + } + + /** DatapathProvider enum. */ + enum DatapathProvider { + DATAPATH_PROVIDER_UNSPECIFIED = 0, + LEGACY_DATAPATH = 1, + ADVANCED_DATAPATH = 2 + } + + /** NodePoolUpdateStrategy enum. */ + enum NodePoolUpdateStrategy { + NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0, + BLUE_GREEN = 2, + SURGE = 3 + } + + /** 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.container.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.container.v1.IManagedPrometheusConfig): google.container.v1.ManagedPrometheusConfig; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.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.container.v1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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; + } + + /** Properties of a Fleet. */ + interface IFleet { + + /** Fleet project */ + project?: (string|null); + + /** Fleet membership */ + membership?: (string|null); + + /** Fleet preRegistered */ + preRegistered?: (boolean|null); + } + + /** Represents a Fleet. */ + class Fleet implements IFleet { + + /** + * Constructs a new Fleet. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IFleet); + + /** Fleet project. */ + public project: string; + + /** Fleet membership. */ + public membership: string; + + /** Fleet preRegistered. */ + public preRegistered: boolean; + + /** + * Creates a new Fleet instance using the specified properties. + * @param [properties] Properties to set + * @returns Fleet instance + */ + public static create(properties?: google.container.v1.IFleet): google.container.v1.Fleet; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.container.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.container.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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; + } + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4 = 1, + IPV4_IPV6 = 2 + } + + /** Properties of a ControlPlaneEndpointsConfig. */ + interface IControlPlaneEndpointsConfig { + + /** ControlPlaneEndpointsConfig dnsEndpointConfig */ + dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); + + /** ControlPlaneEndpointsConfig ipEndpointsConfig */ + ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); + } + + /** Represents a ControlPlaneEndpointsConfig. */ + class ControlPlaneEndpointsConfig implements IControlPlaneEndpointsConfig { + + /** + * Constructs a new ControlPlaneEndpointsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IControlPlaneEndpointsConfig); + + /** ControlPlaneEndpointsConfig dnsEndpointConfig. */ + public dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); + + /** ControlPlaneEndpointsConfig ipEndpointsConfig. */ + public ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); + + /** + * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlPlaneEndpointsConfig instance + */ + public static create(properties?: google.container.v1.IControlPlaneEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @param message ControlPlaneEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @param message ControlPlaneEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ControlPlaneEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig; + + /** + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ControlPlaneEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig; + + /** + * Verifies a ControlPlaneEndpointsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ControlPlaneEndpointsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig; + + /** + * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. + * @param message ControlPlaneEndpointsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ControlPlaneEndpointsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ControlPlaneEndpointsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ControlPlaneEndpointsConfig { + + /** Properties of a DNSEndpointConfig. */ + interface IDNSEndpointConfig { + + /** DNSEndpointConfig endpoint */ + endpoint?: (string|null); + + /** DNSEndpointConfig allowExternalTraffic */ + allowExternalTraffic?: (boolean|null); + } + + /** Represents a DNSEndpointConfig. */ + class DNSEndpointConfig implements IDNSEndpointConfig { + + /** + * Constructs a new DNSEndpointConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig); + + /** DNSEndpointConfig endpoint. */ + public endpoint: string; + + /** DNSEndpointConfig allowExternalTraffic. */ + public allowExternalTraffic?: (boolean|null); + + /** DNSEndpointConfig _allowExternalTraffic. */ + public _allowExternalTraffic?: "allowExternalTraffic"; + + /** + * Creates a new DNSEndpointConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSEndpointConfig instance + */ + public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @param message DNSEndpointConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @param message DNSEndpointConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Verifies a DNSEndpointConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSEndpointConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. + * @param message DNSEndpointConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSEndpointConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DNSEndpointConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a IPEndpointsConfig. */ + interface IIPEndpointsConfig { + + /** IPEndpointsConfig enabled */ + enabled?: (boolean|null); + + /** IPEndpointsConfig enablePublicEndpoint */ + enablePublicEndpoint?: (boolean|null); + + /** IPEndpointsConfig globalAccess */ + globalAccess?: (boolean|null); + + /** IPEndpointsConfig authorizedNetworksConfig */ + authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** IPEndpointsConfig publicEndpoint */ + publicEndpoint?: (string|null); + + /** IPEndpointsConfig privateEndpoint */ + privateEndpoint?: (string|null); + + /** IPEndpointsConfig privateEndpointSubnetwork */ + privateEndpointSubnetwork?: (string|null); + } + + /** Represents a IPEndpointsConfig. */ + class IPEndpointsConfig implements IIPEndpointsConfig { + + /** + * Constructs a new IPEndpointsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig); + + /** IPEndpointsConfig enabled. */ + public enabled?: (boolean|null); + + /** IPEndpointsConfig enablePublicEndpoint. */ + public enablePublicEndpoint?: (boolean|null); + + /** IPEndpointsConfig globalAccess. */ + public globalAccess?: (boolean|null); + + /** IPEndpointsConfig authorizedNetworksConfig. */ + public authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** IPEndpointsConfig publicEndpoint. */ + public publicEndpoint: string; + + /** IPEndpointsConfig privateEndpoint. */ + public privateEndpoint: string; + + /** IPEndpointsConfig privateEndpointSubnetwork. */ + public privateEndpointSubnetwork: string; + + /** IPEndpointsConfig _enabled. */ + public _enabled?: "enabled"; + + /** IPEndpointsConfig _enablePublicEndpoint. */ + public _enablePublicEndpoint?: "enablePublicEndpoint"; + + /** IPEndpointsConfig _globalAccess. */ + public _globalAccess?: "globalAccess"; + + /** + * Creates a new IPEndpointsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IPEndpointsConfig instance + */ + public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @param message IPEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @param message IPEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Verifies a IPEndpointsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPEndpointsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. + * @param message IPEndpointsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPEndpointsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPEndpointsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** IPv6AccessType enum. */ + enum IPv6AccessType { + IPV6_ACCESS_TYPE_UNSPECIFIED = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** Properties of a LocalNvmeSsdBlockConfig. */ + interface ILocalNvmeSsdBlockConfig { + + /** LocalNvmeSsdBlockConfig localSsdCount */ + localSsdCount?: (number|null); + } + + /** Represents a LocalNvmeSsdBlockConfig. */ + class LocalNvmeSsdBlockConfig implements ILocalNvmeSsdBlockConfig { + + /** + * Constructs a new LocalNvmeSsdBlockConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILocalNvmeSsdBlockConfig); + + /** LocalNvmeSsdBlockConfig localSsdCount. */ + public localSsdCount: number; + + /** + * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalNvmeSsdBlockConfig instance + */ + public static create(properties?: google.container.v1.ILocalNvmeSsdBlockConfig): google.container.v1.LocalNvmeSsdBlockConfig; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @param message LocalNvmeSsdBlockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @param message LocalNvmeSsdBlockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LocalNvmeSsdBlockConfig; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LocalNvmeSsdBlockConfig; + + /** + * Verifies a LocalNvmeSsdBlockConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalNvmeSsdBlockConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LocalNvmeSsdBlockConfig; + + /** + * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. + * @param message LocalNvmeSsdBlockConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LocalNvmeSsdBlockConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalNvmeSsdBlockConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalNvmeSsdBlockConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EphemeralStorageLocalSsdConfig. */ + interface IEphemeralStorageLocalSsdConfig { + + /** EphemeralStorageLocalSsdConfig localSsdCount */ + localSsdCount?: (number|null); + } + + /** Represents an EphemeralStorageLocalSsdConfig. */ + class EphemeralStorageLocalSsdConfig implements IEphemeralStorageLocalSsdConfig { + + /** + * Constructs a new EphemeralStorageLocalSsdConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IEphemeralStorageLocalSsdConfig); + + /** EphemeralStorageLocalSsdConfig localSsdCount. */ + public localSsdCount: number; + + /** + * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EphemeralStorageLocalSsdConfig instance + */ + public static create(properties?: google.container.v1.IEphemeralStorageLocalSsdConfig): google.container.v1.EphemeralStorageLocalSsdConfig; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @param message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @param message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.EphemeralStorageLocalSsdConfig; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.EphemeralStorageLocalSsdConfig; + + /** + * Verifies an EphemeralStorageLocalSsdConfig message. + * @param message Plain 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 EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EphemeralStorageLocalSsdConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.EphemeralStorageLocalSsdConfig; + + /** + * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. + * @param message EphemeralStorageLocalSsdConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.EphemeralStorageLocalSsdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EphemeralStorageLocalSsdConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EphemeralStorageLocalSsdConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceManagerTags. */ + interface IResourceManagerTags { + + /** ResourceManagerTags tags */ + tags?: ({ [k: string]: string }|null); + } + + /** Represents a ResourceManagerTags. */ + class ResourceManagerTags implements IResourceManagerTags { + + /** + * Constructs a new ResourceManagerTags. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IResourceManagerTags); + + /** ResourceManagerTags tags. */ + public tags: { [k: string]: string }; + + /** + * Creates a new ResourceManagerTags instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceManagerTags instance + */ + public static create(properties?: google.container.v1.IResourceManagerTags): google.container.v1.ResourceManagerTags; + + /** + * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. + * @param message ResourceManagerTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. + * @param message ResourceManagerTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceManagerTags; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceManagerTags; + + /** + * Verifies a ResourceManagerTags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceManagerTags + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceManagerTags; + + /** + * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. + * @param message ResourceManagerTags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ResourceManagerTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceManagerTags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceManagerTags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnterpriseConfig. */ + interface IEnterpriseConfig { + + /** EnterpriseConfig clusterTier */ + clusterTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); + + /** EnterpriseConfig desiredTier */ + desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); + } + + /** Represents an EnterpriseConfig. */ + class EnterpriseConfig implements IEnterpriseConfig { + + /** + * Constructs a new EnterpriseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IEnterpriseConfig); + + /** EnterpriseConfig clusterTier. */ + public clusterTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + + /** EnterpriseConfig desiredTier. */ + public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + + /** + * Creates a new EnterpriseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnterpriseConfig instance + */ + public static create(properties?: google.container.v1.IEnterpriseConfig): google.container.v1.EnterpriseConfig; + + /** + * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. + * @param message EnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. + * @param message EnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.EnterpriseConfig; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.EnterpriseConfig; + + /** + * Verifies an EnterpriseConfig message. + * @param message Plain 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 EnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnterpriseConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.EnterpriseConfig; + + /** + * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. + * @param message EnterpriseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.EnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnterpriseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnterpriseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnterpriseConfig { + + /** ClusterTier enum. */ + enum ClusterTier { + CLUSTER_TIER_UNSPECIFIED = 0, + STANDARD = 1, + ENTERPRISE = 2 + } + } + + /** Properties of a SecretManagerConfig. */ + interface ISecretManagerConfig { + + /** SecretManagerConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a SecretManagerConfig. */ + class SecretManagerConfig implements ISecretManagerConfig { + + /** + * Constructs a new SecretManagerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecretManagerConfig); + + /** SecretManagerConfig enabled. */ + public enabled?: (boolean|null); + + /** SecretManagerConfig _enabled. */ + public _enabled?: "enabled"; + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerConfig instance + */ + public static create(properties?: google.container.v1.ISecretManagerConfig): google.container.v1.SecretManagerConfig; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecretManagerConfig; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecretManagerConfig; + + /** + * Verifies a SecretManagerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretManagerConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecretManagerConfig; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @param message SecretManagerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecretManagerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretManagerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretManagerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecondaryBootDisk. */ + interface ISecondaryBootDisk { + + /** SecondaryBootDisk mode */ + mode?: (google.container.v1.SecondaryBootDisk.Mode|keyof typeof google.container.v1.SecondaryBootDisk.Mode|null); + + /** SecondaryBootDisk diskImage */ + diskImage?: (string|null); + } + + /** Represents a SecondaryBootDisk. */ + class SecondaryBootDisk implements ISecondaryBootDisk { + + /** + * Constructs a new SecondaryBootDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecondaryBootDisk); + + /** SecondaryBootDisk mode. */ + public mode: (google.container.v1.SecondaryBootDisk.Mode|keyof typeof google.container.v1.SecondaryBootDisk.Mode); + + /** SecondaryBootDisk diskImage. */ + public diskImage: string; + + /** + * Creates a new SecondaryBootDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns SecondaryBootDisk instance + */ + public static create(properties?: google.container.v1.ISecondaryBootDisk): google.container.v1.SecondaryBootDisk; + + /** + * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. + * @param message SecondaryBootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. + * @param message SecondaryBootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecondaryBootDisk; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecondaryBootDisk; + + /** + * Verifies a SecondaryBootDisk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecondaryBootDisk + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecondaryBootDisk; + + /** + * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. + * @param message SecondaryBootDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecondaryBootDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecondaryBootDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecondaryBootDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecondaryBootDisk { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + CONTAINER_IMAGE_CACHE = 1 + } + } + + /** InTransitEncryptionConfig enum. */ + enum InTransitEncryptionConfig { + IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0, + IN_TRANSIT_ENCRYPTION_DISABLED = 1, + IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2 + } + + /** Properties of a SecondaryBootDiskUpdateStrategy. */ + interface ISecondaryBootDiskUpdateStrategy { + } + + /** Represents a SecondaryBootDiskUpdateStrategy. */ + class SecondaryBootDiskUpdateStrategy implements ISecondaryBootDiskUpdateStrategy { + + /** + * Constructs a new SecondaryBootDiskUpdateStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecondaryBootDiskUpdateStrategy); + + /** + * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns SecondaryBootDiskUpdateStrategy instance + */ + public static create(properties?: google.container.v1.ISecondaryBootDiskUpdateStrategy): google.container.v1.SecondaryBootDiskUpdateStrategy; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecondaryBootDiskUpdateStrategy; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecondaryBootDiskUpdateStrategy; + + /** + * Verifies a SecondaryBootDiskUpdateStrategy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecondaryBootDiskUpdateStrategy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecondaryBootDiskUpdateStrategy; + + /** + * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. + * @param message SecondaryBootDiskUpdateStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecondaryBootDiskUpdateStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecondaryBootDiskUpdateStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecondaryBootDiskUpdateStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Code enum. */ + enum Code { + OK = 0, + CANCELLED = 1, + UNKNOWN = 2, + INVALID_ARGUMENT = 3, + DEADLINE_EXCEEDED = 4, + NOT_FOUND = 5, + ALREADY_EXISTS = 6, + PERMISSION_DENIED = 7, + UNAUTHENTICATED = 16, + RESOURCE_EXHAUSTED = 8, + FAILED_PRECONDITION = 9, + ABORTED = 10, + OUT_OF_RANGE = 11, + UNIMPLEMENTED = 12, + INTERNAL = 13, + UNAVAILABLE = 14, + DATA_LOSS = 15 + } + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-container/v1/protos/protos.js b/owl-bot-staging/google-container/v1/protos/protos.js new file mode 100644 index 00000000000..bb9374d52da --- /dev/null +++ b/owl-bot-staging/google-container/v1/protos/protos.js @@ -0,0 +1,83279 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_container_protos || ($protobuf.roots._google_cloud_container_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.container = (function() { + + /** + * Namespace container. + * @memberof google + * @namespace + */ + var container = {}; + + container.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.container + * @namespace + */ + var v1 = {}; + + v1.ClusterManager = (function() { + + /** + * Constructs a new ClusterManager service. + * @memberof google.container.v1 + * @classdesc Represents a ClusterManager + * @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 ClusterManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ClusterManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ClusterManager; + + /** + * Creates new ClusterManager service using the specified rpc implementation. + * @function create + * @memberof google.container.v1.ClusterManager + * @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 {ClusterManager} RPC service. Useful where requests and/or responses are streamed. + */ + ClusterManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listClusters}. + * @memberof google.container.v1.ClusterManager + * @typedef ListClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.ListClustersResponse} [response] ListClustersResponse + */ + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListClustersRequest} request ListClustersRequest message or plain object + * @param {google.container.v1.ClusterManager.ListClustersCallback} callback Node-style callback called with the error, if any, and ListClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listClusters = function listClusters(request, callback) { + return this.rpcCall(listClusters, $root.google.container.v1.ListClustersRequest, $root.google.container.v1.ListClustersResponse, request, callback); + }, "name", { value: "ListClusters" }); + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListClustersRequest} request ListClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getCluster}. + * @memberof google.container.v1.ClusterManager + * @typedef GetClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Cluster} [response] Cluster + */ + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetClusterRequest} request GetClusterRequest message or plain object + * @param {google.container.v1.ClusterManager.GetClusterCallback} callback Node-style callback called with the error, if any, and Cluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getCluster = function getCluster(request, callback) { + return this.rpcCall(getCluster, $root.google.container.v1.GetClusterRequest, $root.google.container.v1.Cluster, request, callback); + }, "name", { value: "GetCluster" }); + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetClusterRequest} request GetClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|createCluster}. + * @memberof google.container.v1.ClusterManager + * @typedef CreateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @param {google.container.v1.ClusterManager.CreateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.createCluster = function createCluster(request, callback) { + return this.rpcCall(createCluster, $root.google.container.v1.CreateClusterRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "CreateCluster" }); + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateCluster}. + * @memberof google.container.v1.ClusterManager + * @typedef UpdateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object + * @param {google.container.v1.ClusterManager.UpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateCluster = function updateCluster(request, callback) { + return this.rpcCall(updateCluster, $root.google.container.v1.UpdateClusterRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "UpdateCluster" }); + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateNodePool}. + * @memberof google.container.v1.ClusterManager + * @typedef UpdateNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls UpdateNodePool. + * @function updateNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object + * @param {google.container.v1.ClusterManager.UpdateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateNodePool = function updateNodePool(request, callback) { + return this.rpcCall(updateNodePool, $root.google.container.v1.UpdateNodePoolRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "UpdateNodePool" }); + + /** + * Calls UpdateNodePool. + * @function updateNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolAutoscaling}. + * @memberof google.container.v1.ClusterManager + * @typedef SetNodePoolAutoscalingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolAutoscaling. + * @function setNodePoolAutoscaling + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object + * @param {google.container.v1.ClusterManager.SetNodePoolAutoscalingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolAutoscaling = function setNodePoolAutoscaling(request, callback) { + return this.rpcCall(setNodePoolAutoscaling, $root.google.container.v1.SetNodePoolAutoscalingRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetNodePoolAutoscaling" }); + + /** + * Calls SetNodePoolAutoscaling. + * @function setNodePoolAutoscaling + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLoggingService}. + * @memberof google.container.v1.ClusterManager + * @typedef SetLoggingServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetLoggingService. + * @function setLoggingService + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object + * @param {google.container.v1.ClusterManager.SetLoggingServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLoggingService = function setLoggingService(request, callback) { + return this.rpcCall(setLoggingService, $root.google.container.v1.SetLoggingServiceRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetLoggingService" }); + + /** + * Calls SetLoggingService. + * @function setLoggingService + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMonitoringService}. + * @memberof google.container.v1.ClusterManager + * @typedef SetMonitoringServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetMonitoringService. + * @function setMonitoringService + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object + * @param {google.container.v1.ClusterManager.SetMonitoringServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMonitoringService = function setMonitoringService(request, callback) { + return this.rpcCall(setMonitoringService, $root.google.container.v1.SetMonitoringServiceRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetMonitoringService" }); + + /** + * Calls SetMonitoringService. + * @function setMonitoringService + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setAddonsConfig}. + * @memberof google.container.v1.ClusterManager + * @typedef SetAddonsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetAddonsConfig. + * @function setAddonsConfig + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object + * @param {google.container.v1.ClusterManager.SetAddonsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setAddonsConfig = function setAddonsConfig(request, callback) { + return this.rpcCall(setAddonsConfig, $root.google.container.v1.SetAddonsConfigRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetAddonsConfig" }); + + /** + * Calls SetAddonsConfig. + * @function setAddonsConfig + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLocations}. + * @memberof google.container.v1.ClusterManager + * @typedef SetLocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetLocations. + * @function setLocations + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLocationsRequest} request SetLocationsRequest message or plain object + * @param {google.container.v1.ClusterManager.SetLocationsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLocations = function setLocations(request, callback) { + return this.rpcCall(setLocations, $root.google.container.v1.SetLocationsRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetLocations" }); + + /** + * Calls SetLocations. + * @function setLocations + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLocationsRequest} request SetLocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|updateMaster}. + * @memberof google.container.v1.ClusterManager + * @typedef UpdateMasterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls UpdateMaster. + * @function updateMaster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object + * @param {google.container.v1.ClusterManager.UpdateMasterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateMaster = function updateMaster(request, callback) { + return this.rpcCall(updateMaster, $root.google.container.v1.UpdateMasterRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "UpdateMaster" }); + + /** + * Calls UpdateMaster. + * @function updateMaster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMasterAuth}. + * @memberof google.container.v1.ClusterManager + * @typedef SetMasterAuthCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetMasterAuth. + * @function setMasterAuth + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object + * @param {google.container.v1.ClusterManager.SetMasterAuthCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMasterAuth = function setMasterAuth(request, callback) { + return this.rpcCall(setMasterAuth, $root.google.container.v1.SetMasterAuthRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetMasterAuth" }); + + /** + * Calls SetMasterAuth. + * @function setMasterAuth + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|deleteCluster}. + * @memberof google.container.v1.ClusterManager + * @typedef DeleteClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @param {google.container.v1.ClusterManager.DeleteClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.deleteCluster = function deleteCluster(request, callback) { + return this.rpcCall(deleteCluster, $root.google.container.v1.DeleteClusterRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "DeleteCluster" }); + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listOperations}. + * @memberof google.container.v1.ClusterManager + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.container.v1.ClusterManager.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.container.v1.ListOperationsRequest, $root.google.container.v1.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getOperation}. + * @memberof google.container.v1.ClusterManager + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.container.v1.ClusterManager.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.container.v1.GetOperationRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|cancelOperation}. + * @memberof google.container.v1.ClusterManager + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.container.v1.ClusterManager.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.container.v1.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getServerConfig}. + * @memberof google.container.v1.ClusterManager + * @typedef GetServerConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.ServerConfig} [response] ServerConfig + */ + + /** + * Calls GetServerConfig. + * @function getServerConfig + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object + * @param {google.container.v1.ClusterManager.GetServerConfigCallback} callback Node-style callback called with the error, if any, and ServerConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getServerConfig = function getServerConfig(request, callback) { + return this.rpcCall(getServerConfig, $root.google.container.v1.GetServerConfigRequest, $root.google.container.v1.ServerConfig, request, callback); + }, "name", { value: "GetServerConfig" }); + + /** + * Calls GetServerConfig. + * @function getServerConfig + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getJSONWebKeys}. + * @memberof google.container.v1.ClusterManager + * @typedef GetJSONWebKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse + */ + + /** + * Calls GetJSONWebKeys. + * @function getJSONWebKeys + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @param {google.container.v1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { + return this.rpcCall(getJSONWebKeys, $root.google.container.v1.GetJSONWebKeysRequest, $root.google.container.v1.GetJSONWebKeysResponse, request, callback); + }, "name", { value: "GetJSONWebKeys" }); + + /** + * Calls GetJSONWebKeys. + * @function getJSONWebKeys + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listNodePools}. + * @memberof google.container.v1.ClusterManager + * @typedef ListNodePoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.ListNodePoolsResponse} [response] ListNodePoolsResponse + */ + + /** + * Calls ListNodePools. + * @function listNodePools + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @param {google.container.v1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { + return this.rpcCall(listNodePools, $root.google.container.v1.ListNodePoolsRequest, $root.google.container.v1.ListNodePoolsResponse, request, callback); + }, "name", { value: "ListNodePools" }); + + /** + * Calls ListNodePools. + * @function listNodePools + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|getNodePool}. + * @memberof google.container.v1.ClusterManager + * @typedef GetNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.NodePool} [response] NodePool + */ + + /** + * Calls GetNodePool. + * @function getNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object + * @param {google.container.v1.ClusterManager.GetNodePoolCallback} callback Node-style callback called with the error, if any, and NodePool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getNodePool = function getNodePool(request, callback) { + return this.rpcCall(getNodePool, $root.google.container.v1.GetNodePoolRequest, $root.google.container.v1.NodePool, request, callback); + }, "name", { value: "GetNodePool" }); + + /** + * Calls GetNodePool. + * @function getNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|createNodePool}. + * @memberof google.container.v1.ClusterManager + * @typedef CreateNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls CreateNodePool. + * @function createNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object + * @param {google.container.v1.ClusterManager.CreateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.createNodePool = function createNodePool(request, callback) { + return this.rpcCall(createNodePool, $root.google.container.v1.CreateNodePoolRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "CreateNodePool" }); + + /** + * Calls CreateNodePool. + * @function createNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|deleteNodePool}. + * @memberof google.container.v1.ClusterManager + * @typedef DeleteNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls DeleteNodePool. + * @function deleteNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object + * @param {google.container.v1.ClusterManager.DeleteNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.deleteNodePool = function deleteNodePool(request, callback) { + return this.rpcCall(deleteNodePool, $root.google.container.v1.DeleteNodePoolRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "DeleteNodePool" }); + + /** + * Calls DeleteNodePool. + * @function deleteNodePool + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|completeNodePoolUpgrade}. + * @memberof google.container.v1.ClusterManager + * @typedef CompleteNodePoolUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CompleteNodePoolUpgrade. + * @function completeNodePoolUpgrade + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object + * @param {google.container.v1.ClusterManager.CompleteNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.completeNodePoolUpgrade = function completeNodePoolUpgrade(request, callback) { + return this.rpcCall(completeNodePoolUpgrade, $root.google.container.v1.CompleteNodePoolUpgradeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CompleteNodePoolUpgrade" }); + + /** + * Calls CompleteNodePoolUpgrade. + * @function completeNodePoolUpgrade + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|rollbackNodePoolUpgrade}. + * @memberof google.container.v1.ClusterManager + * @typedef RollbackNodePoolUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls RollbackNodePoolUpgrade. + * @function rollbackNodePoolUpgrade + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object + * @param {google.container.v1.ClusterManager.RollbackNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.rollbackNodePoolUpgrade = function rollbackNodePoolUpgrade(request, callback) { + return this.rpcCall(rollbackNodePoolUpgrade, $root.google.container.v1.RollbackNodePoolUpgradeRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "RollbackNodePoolUpgrade" }); + + /** + * Calls RollbackNodePoolUpgrade. + * @function rollbackNodePoolUpgrade + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolManagement}. + * @memberof google.container.v1.ClusterManager + * @typedef SetNodePoolManagementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolManagement. + * @function setNodePoolManagement + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object + * @param {google.container.v1.ClusterManager.SetNodePoolManagementCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolManagement = function setNodePoolManagement(request, callback) { + return this.rpcCall(setNodePoolManagement, $root.google.container.v1.SetNodePoolManagementRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetNodePoolManagement" }); + + /** + * Calls SetNodePoolManagement. + * @function setNodePoolManagement + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLabels}. + * @memberof google.container.v1.ClusterManager + * @typedef SetLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetLabels. + * @function setLabels + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLabelsRequest} request SetLabelsRequest message or plain object + * @param {google.container.v1.ClusterManager.SetLabelsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLabels = function setLabels(request, callback) { + return this.rpcCall(setLabels, $root.google.container.v1.SetLabelsRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetLabels" }); + + /** + * Calls SetLabels. + * @function setLabels + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLabelsRequest} request SetLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setLegacyAbac}. + * @memberof google.container.v1.ClusterManager + * @typedef SetLegacyAbacCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetLegacyAbac. + * @function setLegacyAbac + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object + * @param {google.container.v1.ClusterManager.SetLegacyAbacCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLegacyAbac = function setLegacyAbac(request, callback) { + return this.rpcCall(setLegacyAbac, $root.google.container.v1.SetLegacyAbacRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetLegacyAbac" }); + + /** + * Calls SetLegacyAbac. + * @function setLegacyAbac + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|startIPRotation}. + * @memberof google.container.v1.ClusterManager + * @typedef StartIPRotationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls StartIPRotation. + * @function startIPRotation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object + * @param {google.container.v1.ClusterManager.StartIPRotationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.startIPRotation = function startIPRotation(request, callback) { + return this.rpcCall(startIPRotation, $root.google.container.v1.StartIPRotationRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "StartIPRotation" }); + + /** + * Calls StartIPRotation. + * @function startIPRotation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|completeIPRotation}. + * @memberof google.container.v1.ClusterManager + * @typedef CompleteIPRotationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls CompleteIPRotation. + * @function completeIPRotation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object + * @param {google.container.v1.ClusterManager.CompleteIPRotationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.completeIPRotation = function completeIPRotation(request, callback) { + return this.rpcCall(completeIPRotation, $root.google.container.v1.CompleteIPRotationRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "CompleteIPRotation" }); + + /** + * Calls CompleteIPRotation. + * @function completeIPRotation + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolSize}. + * @memberof google.container.v1.ClusterManager + * @typedef SetNodePoolSizeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolSize. + * @function setNodePoolSize + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object + * @param {google.container.v1.ClusterManager.SetNodePoolSizeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolSize = function setNodePoolSize(request, callback) { + return this.rpcCall(setNodePoolSize, $root.google.container.v1.SetNodePoolSizeRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetNodePoolSize" }); + + /** + * Calls SetNodePoolSize. + * @function setNodePoolSize + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setNetworkPolicy}. + * @memberof google.container.v1.ClusterManager + * @typedef SetNetworkPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetNetworkPolicy. + * @function setNetworkPolicy + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object + * @param {google.container.v1.ClusterManager.SetNetworkPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNetworkPolicy = function setNetworkPolicy(request, callback) { + return this.rpcCall(setNetworkPolicy, $root.google.container.v1.SetNetworkPolicyRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetNetworkPolicy" }); + + /** + * Calls SetNetworkPolicy. + * @function setNetworkPolicy + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|setMaintenancePolicy}. + * @memberof google.container.v1.ClusterManager + * @typedef SetMaintenancePolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.Operation} [response] Operation + */ + + /** + * Calls SetMaintenancePolicy. + * @function setMaintenancePolicy + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object + * @param {google.container.v1.ClusterManager.SetMaintenancePolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMaintenancePolicy = function setMaintenancePolicy(request, callback) { + return this.rpcCall(setMaintenancePolicy, $root.google.container.v1.SetMaintenancePolicyRequest, $root.google.container.v1.Operation, request, callback); + }, "name", { value: "SetMaintenancePolicy" }); + + /** + * Calls SetMaintenancePolicy. + * @function setMaintenancePolicy + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|listUsableSubnetworks}. + * @memberof google.container.v1.ClusterManager + * @typedef ListUsableSubnetworksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.ListUsableSubnetworksResponse} [response] ListUsableSubnetworksResponse + */ + + /** + * Calls ListUsableSubnetworks. + * @function listUsableSubnetworks + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object + * @param {google.container.v1.ClusterManager.ListUsableSubnetworksCallback} callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listUsableSubnetworks = function listUsableSubnetworks(request, callback) { + return this.rpcCall(listUsableSubnetworks, $root.google.container.v1.ListUsableSubnetworksRequest, $root.google.container.v1.ListUsableSubnetworksResponse, request, callback); + }, "name", { value: "ListUsableSubnetworks" }); + + /** + * Calls ListUsableSubnetworks. + * @function listUsableSubnetworks + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1.ClusterManager|checkAutopilotCompatibility}. + * @memberof google.container.v1.ClusterManager + * @typedef CheckAutopilotCompatibilityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1.CheckAutopilotCompatibilityResponse} [response] CheckAutopilotCompatibilityResponse + */ + + /** + * Calls CheckAutopilotCompatibility. + * @function checkAutopilotCompatibility + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object + * @param {google.container.v1.ClusterManager.CheckAutopilotCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.checkAutopilotCompatibility = function checkAutopilotCompatibility(request, callback) { + return this.rpcCall(checkAutopilotCompatibility, $root.google.container.v1.CheckAutopilotCompatibilityRequest, $root.google.container.v1.CheckAutopilotCompatibilityResponse, request, callback); + }, "name", { value: "CheckAutopilotCompatibility" }); + + /** + * Calls CheckAutopilotCompatibility. + * @function checkAutopilotCompatibility + * @memberof google.container.v1.ClusterManager + * @instance + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ClusterManager; + })(); + + v1.LinuxNodeConfig = (function() { + + /** + * Properties of a LinuxNodeConfig. + * @memberof google.container.v1 + * @interface ILinuxNodeConfig + * @property {Object.|null} [sysctls] LinuxNodeConfig sysctls + * @property {google.container.v1.LinuxNodeConfig.CgroupMode|null} [cgroupMode] LinuxNodeConfig cgroupMode + * @property {google.container.v1.LinuxNodeConfig.IHugepagesConfig|null} [hugepages] LinuxNodeConfig hugepages + */ + + /** + * Constructs a new LinuxNodeConfig. + * @memberof google.container.v1 + * @classdesc Represents a LinuxNodeConfig. + * @implements ILinuxNodeConfig + * @constructor + * @param {google.container.v1.ILinuxNodeConfig=} [properties] Properties to set + */ + function LinuxNodeConfig(properties) { + this.sysctls = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LinuxNodeConfig sysctls. + * @member {Object.} sysctls + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.sysctls = $util.emptyObject; + + /** + * LinuxNodeConfig cgroupMode. + * @member {google.container.v1.LinuxNodeConfig.CgroupMode} cgroupMode + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.cgroupMode = 0; + + /** + * LinuxNodeConfig hugepages. + * @member {google.container.v1.LinuxNodeConfig.IHugepagesConfig|null|undefined} hugepages + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.hugepages = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LinuxNodeConfig _hugepages. + * @member {"hugepages"|undefined} _hugepages + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + Object.defineProperty(LinuxNodeConfig.prototype, "_hugepages", { + get: $util.oneOfGetter($oneOfFields = ["hugepages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LinuxNodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {google.container.v1.ILinuxNodeConfig=} [properties] Properties to set + * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig instance + */ + LinuxNodeConfig.create = function create(properties) { + return new LinuxNodeConfig(properties); + }; + + /** + * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {google.container.v1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinuxNodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sysctls != null && Object.hasOwnProperty.call(message, "sysctls")) + for (var keys = Object.keys(message.sysctls), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.sysctls[keys[i]]).ldelim(); + if (message.cgroupMode != null && Object.hasOwnProperty.call(message, "cgroupMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cgroupMode); + if (message.hugepages != null && Object.hasOwnProperty.call(message, "hugepages")) + $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.encode(message.hugepages, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {google.container.v1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinuxNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinuxNodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LinuxNodeConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.sysctls === $util.emptyObject) + message.sysctls = {}; + 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.sysctls[key] = value; + break; + } + case 2: { + message.cgroupMode = reader.int32(); + break; + } + case 3: { + message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinuxNodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LinuxNodeConfig message. + * @function verify + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LinuxNodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sysctls != null && message.hasOwnProperty("sysctls")) { + if (!$util.isObject(message.sysctls)) + return "sysctls: object expected"; + var key = Object.keys(message.sysctls); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.sysctls[key[i]])) + return "sysctls: string{k:string} expected"; + } + if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) + switch (message.cgroupMode) { + default: + return "cgroupMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hugepages != null && message.hasOwnProperty("hugepages")) { + properties._hugepages = 1; + { + var error = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.verify(message.hugepages); + if (error) + return "hugepages." + error; + } + } + return null; + }; + + /** + * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig + */ + LinuxNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LinuxNodeConfig) + return object; + var message = new $root.google.container.v1.LinuxNodeConfig(); + if (object.sysctls) { + if (typeof object.sysctls !== "object") + throw TypeError(".google.container.v1.LinuxNodeConfig.sysctls: object expected"); + message.sysctls = {}; + for (var keys = Object.keys(object.sysctls), i = 0; i < keys.length; ++i) + message.sysctls[keys[i]] = String(object.sysctls[keys[i]]); + } + switch (object.cgroupMode) { + default: + if (typeof object.cgroupMode === "number") { + message.cgroupMode = object.cgroupMode; + break; + } + break; + case "CGROUP_MODE_UNSPECIFIED": + case 0: + message.cgroupMode = 0; + break; + case "CGROUP_MODE_V1": + case 1: + message.cgroupMode = 1; + break; + case "CGROUP_MODE_V2": + case 2: + message.cgroupMode = 2; + break; + } + if (object.hugepages != null) { + if (typeof object.hugepages !== "object") + throw TypeError(".google.container.v1.LinuxNodeConfig.hugepages: object expected"); + message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.fromObject(object.hugepages); + } + return message; + }; + + /** + * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {google.container.v1.LinuxNodeConfig} message LinuxNodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LinuxNodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.sysctls = {}; + if (options.defaults) + object.cgroupMode = options.enums === String ? "CGROUP_MODE_UNSPECIFIED" : 0; + var keys2; + if (message.sysctls && (keys2 = Object.keys(message.sysctls)).length) { + object.sysctls = {}; + for (var j = 0; j < keys2.length; ++j) + object.sysctls[keys2[j]] = message.sysctls[keys2[j]]; + } + if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) + object.cgroupMode = options.enums === String ? $root.google.container.v1.LinuxNodeConfig.CgroupMode[message.cgroupMode] === undefined ? message.cgroupMode : $root.google.container.v1.LinuxNodeConfig.CgroupMode[message.cgroupMode] : message.cgroupMode; + if (message.hugepages != null && message.hasOwnProperty("hugepages")) { + object.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.toObject(message.hugepages, options); + if (options.oneofs) + object._hugepages = "hugepages"; + } + return object; + }; + + /** + * Converts this LinuxNodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LinuxNodeConfig + * @instance + * @returns {Object.} JSON object + */ + LinuxNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LinuxNodeConfig + * @function getTypeUrl + * @memberof google.container.v1.LinuxNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LinuxNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LinuxNodeConfig"; + }; + + /** + * CgroupMode enum. + * @name google.container.v1.LinuxNodeConfig.CgroupMode + * @enum {number} + * @property {number} CGROUP_MODE_UNSPECIFIED=0 CGROUP_MODE_UNSPECIFIED value + * @property {number} CGROUP_MODE_V1=1 CGROUP_MODE_V1 value + * @property {number} CGROUP_MODE_V2=2 CGROUP_MODE_V2 value + */ + LinuxNodeConfig.CgroupMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CGROUP_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CGROUP_MODE_V1"] = 1; + values[valuesById[2] = "CGROUP_MODE_V2"] = 2; + return values; + })(); + + LinuxNodeConfig.HugepagesConfig = (function() { + + /** + * Properties of a HugepagesConfig. + * @memberof google.container.v1.LinuxNodeConfig + * @interface IHugepagesConfig + * @property {number|null} [hugepageSize2m] HugepagesConfig hugepageSize2m + * @property {number|null} [hugepageSize1g] HugepagesConfig hugepageSize1g + */ + + /** + * Constructs a new HugepagesConfig. + * @memberof google.container.v1.LinuxNodeConfig + * @classdesc Represents a HugepagesConfig. + * @implements IHugepagesConfig + * @constructor + * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set + */ + function HugepagesConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HugepagesConfig hugepageSize2m. + * @member {number|null|undefined} hugepageSize2m + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + HugepagesConfig.prototype.hugepageSize2m = null; + + /** + * HugepagesConfig hugepageSize1g. + * @member {number|null|undefined} hugepageSize1g + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + HugepagesConfig.prototype.hugepageSize1g = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HugepagesConfig _hugepageSize2m. + * @member {"hugepageSize2m"|undefined} _hugepageSize2m + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize2m", { + get: $util.oneOfGetter($oneOfFields = ["hugepageSize2m"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * HugepagesConfig _hugepageSize1g. + * @member {"hugepageSize1g"|undefined} _hugepageSize1g + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize1g", { + get: $util.oneOfGetter($oneOfFields = ["hugepageSize1g"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HugepagesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set + * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig instance + */ + HugepagesConfig.create = function create(properties) { + return new HugepagesConfig(properties); + }; + + /** + * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HugepagesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hugepageSize2m != null && Object.hasOwnProperty.call(message, "hugepageSize2m")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hugepageSize2m); + if (message.hugepageSize1g != null && Object.hasOwnProperty.call(message, "hugepageSize1g")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hugepageSize1g); + return writer; + }; + + /** + * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HugepagesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HugepagesConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LinuxNodeConfig.HugepagesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hugepageSize2m = reader.int32(); + break; + } + case 2: { + message.hugepageSize1g = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HugepagesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HugepagesConfig message. + * @function verify + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HugepagesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { + properties._hugepageSize2m = 1; + if (!$util.isInteger(message.hugepageSize2m)) + return "hugepageSize2m: integer expected"; + } + if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { + properties._hugepageSize1g = 1; + if (!$util.isInteger(message.hugepageSize1g)) + return "hugepageSize1g: integer expected"; + } + return null; + }; + + /** + * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + */ + HugepagesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LinuxNodeConfig.HugepagesConfig) + return object; + var message = new $root.google.container.v1.LinuxNodeConfig.HugepagesConfig(); + if (object.hugepageSize2m != null) + message.hugepageSize2m = object.hugepageSize2m | 0; + if (object.hugepageSize1g != null) + message.hugepageSize1g = object.hugepageSize1g | 0; + return message; + }; + + /** + * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1.LinuxNodeConfig.HugepagesConfig} message HugepagesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HugepagesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { + object.hugepageSize2m = message.hugepageSize2m; + if (options.oneofs) + object._hugepageSize2m = "hugepageSize2m"; + } + if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { + object.hugepageSize1g = message.hugepageSize1g; + if (options.oneofs) + object._hugepageSize1g = "hugepageSize1g"; + } + return object; + }; + + /** + * Converts this HugepagesConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @instance + * @returns {Object.} JSON object + */ + HugepagesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HugepagesConfig + * @function getTypeUrl + * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HugepagesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LinuxNodeConfig.HugepagesConfig"; + }; + + return HugepagesConfig; + })(); + + return LinuxNodeConfig; + })(); + + v1.WindowsNodeConfig = (function() { + + /** + * Properties of a WindowsNodeConfig. + * @memberof google.container.v1 + * @interface IWindowsNodeConfig + * @property {google.container.v1.WindowsNodeConfig.OSVersion|null} [osVersion] WindowsNodeConfig osVersion + */ + + /** + * Constructs a new WindowsNodeConfig. + * @memberof google.container.v1 + * @classdesc Represents a WindowsNodeConfig. + * @implements IWindowsNodeConfig + * @constructor + * @param {google.container.v1.IWindowsNodeConfig=} [properties] Properties to set + */ + function WindowsNodeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsNodeConfig osVersion. + * @member {google.container.v1.WindowsNodeConfig.OSVersion} osVersion + * @memberof google.container.v1.WindowsNodeConfig + * @instance + */ + WindowsNodeConfig.prototype.osVersion = 0; + + /** + * Creates a new WindowsNodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {google.container.v1.IWindowsNodeConfig=} [properties] Properties to set + * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig instance + */ + WindowsNodeConfig.create = function create(properties) { + return new WindowsNodeConfig(properties); + }; + + /** + * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {google.container.v1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsNodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.osVersion); + return writer; + }; + + /** + * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {google.container.v1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsNodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WindowsNodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.osVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsNodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsNodeConfig message. + * @function verify + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsNodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + switch (message.osVersion) { + default: + return "osVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig + */ + WindowsNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.WindowsNodeConfig) + return object; + var message = new $root.google.container.v1.WindowsNodeConfig(); + switch (object.osVersion) { + default: + if (typeof object.osVersion === "number") { + message.osVersion = object.osVersion; + break; + } + break; + case "OS_VERSION_UNSPECIFIED": + case 0: + message.osVersion = 0; + break; + case "OS_VERSION_LTSC2019": + case 1: + message.osVersion = 1; + break; + case "OS_VERSION_LTSC2022": + case 2: + message.osVersion = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {google.container.v1.WindowsNodeConfig} message WindowsNodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsNodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.osVersion = options.enums === String ? "OS_VERSION_UNSPECIFIED" : 0; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = options.enums === String ? $root.google.container.v1.WindowsNodeConfig.OSVersion[message.osVersion] === undefined ? message.osVersion : $root.google.container.v1.WindowsNodeConfig.OSVersion[message.osVersion] : message.osVersion; + return object; + }; + + /** + * Converts this WindowsNodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1.WindowsNodeConfig + * @instance + * @returns {Object.} JSON object + */ + WindowsNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WindowsNodeConfig + * @function getTypeUrl + * @memberof google.container.v1.WindowsNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.WindowsNodeConfig"; + }; + + /** + * OSVersion enum. + * @name google.container.v1.WindowsNodeConfig.OSVersion + * @enum {number} + * @property {number} OS_VERSION_UNSPECIFIED=0 OS_VERSION_UNSPECIFIED value + * @property {number} OS_VERSION_LTSC2019=1 OS_VERSION_LTSC2019 value + * @property {number} OS_VERSION_LTSC2022=2 OS_VERSION_LTSC2022 value + */ + WindowsNodeConfig.OSVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OS_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "OS_VERSION_LTSC2019"] = 1; + values[valuesById[2] = "OS_VERSION_LTSC2022"] = 2; + return values; + })(); + + return WindowsNodeConfig; + })(); + + v1.NodeKubeletConfig = (function() { + + /** + * Properties of a NodeKubeletConfig. + * @memberof google.container.v1 + * @interface INodeKubeletConfig + * @property {string|null} [cpuManagerPolicy] NodeKubeletConfig cpuManagerPolicy + * @property {google.protobuf.IBoolValue|null} [cpuCfsQuota] NodeKubeletConfig cpuCfsQuota + * @property {string|null} [cpuCfsQuotaPeriod] NodeKubeletConfig cpuCfsQuotaPeriod + * @property {number|Long|null} [podPidsLimit] NodeKubeletConfig podPidsLimit + * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] NodeKubeletConfig insecureKubeletReadonlyPortEnabled + */ + + /** + * Constructs a new NodeKubeletConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodeKubeletConfig. + * @implements INodeKubeletConfig + * @constructor + * @param {google.container.v1.INodeKubeletConfig=} [properties] Properties to set + */ + function NodeKubeletConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeKubeletConfig cpuManagerPolicy. + * @member {string} cpuManagerPolicy + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuManagerPolicy = ""; + + /** + * NodeKubeletConfig cpuCfsQuota. + * @member {google.protobuf.IBoolValue|null|undefined} cpuCfsQuota + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuCfsQuota = null; + + /** + * NodeKubeletConfig cpuCfsQuotaPeriod. + * @member {string} cpuCfsQuotaPeriod + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuCfsQuotaPeriod = ""; + + /** + * NodeKubeletConfig podPidsLimit. + * @member {number|Long} podPidsLimit + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.podPidsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * NodeKubeletConfig insecureKubeletReadonlyPortEnabled. + * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.insecureKubeletReadonlyPortEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. + * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + Object.defineProperty(NodeKubeletConfig.prototype, "_insecureKubeletReadonlyPortEnabled", { + get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeKubeletConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {google.container.v1.INodeKubeletConfig=} [properties] Properties to set + * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig instance + */ + NodeKubeletConfig.create = function create(properties) { + return new NodeKubeletConfig(properties); + }; + + /** + * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {google.container.v1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeKubeletConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuManagerPolicy != null && Object.hasOwnProperty.call(message, "cpuManagerPolicy")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpuManagerPolicy); + if (message.cpuCfsQuota != null && Object.hasOwnProperty.call(message, "cpuCfsQuota")) + $root.google.protobuf.BoolValue.encode(message.cpuCfsQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cpuCfsQuotaPeriod != null && Object.hasOwnProperty.call(message, "cpuCfsQuotaPeriod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cpuCfsQuotaPeriod); + if (message.podPidsLimit != null && Object.hasOwnProperty.call(message, "podPidsLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.podPidsLimit); + if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.insecureKubeletReadonlyPortEnabled); + return writer; + }; + + /** + * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {google.container.v1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeKubeletConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeKubeletConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeKubeletConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpuManagerPolicy = reader.string(); + break; + } + case 2: { + message.cpuCfsQuota = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cpuCfsQuotaPeriod = reader.string(); + break; + } + case 4: { + message.podPidsLimit = reader.int64(); + break; + } + case 7: { + message.insecureKubeletReadonlyPortEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeKubeletConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeKubeletConfig message. + * @function verify + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeKubeletConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) + if (!$util.isString(message.cpuManagerPolicy)) + return "cpuManagerPolicy: string expected"; + if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) { + var error = $root.google.protobuf.BoolValue.verify(message.cpuCfsQuota); + if (error) + return "cpuCfsQuota." + error; + } + if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) + if (!$util.isString(message.cpuCfsQuotaPeriod)) + return "cpuCfsQuotaPeriod: string expected"; + if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) + if (!$util.isInteger(message.podPidsLimit) && !(message.podPidsLimit && $util.isInteger(message.podPidsLimit.low) && $util.isInteger(message.podPidsLimit.high))) + return "podPidsLimit: integer|Long expected"; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + properties._insecureKubeletReadonlyPortEnabled = 1; + if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") + return "insecureKubeletReadonlyPortEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig + */ + NodeKubeletConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeKubeletConfig) + return object; + var message = new $root.google.container.v1.NodeKubeletConfig(); + if (object.cpuManagerPolicy != null) + message.cpuManagerPolicy = String(object.cpuManagerPolicy); + if (object.cpuCfsQuota != null) { + if (typeof object.cpuCfsQuota !== "object") + throw TypeError(".google.container.v1.NodeKubeletConfig.cpuCfsQuota: object expected"); + message.cpuCfsQuota = $root.google.protobuf.BoolValue.fromObject(object.cpuCfsQuota); + } + if (object.cpuCfsQuotaPeriod != null) + message.cpuCfsQuotaPeriod = String(object.cpuCfsQuotaPeriod); + if (object.podPidsLimit != null) + if ($util.Long) + (message.podPidsLimit = $util.Long.fromValue(object.podPidsLimit)).unsigned = false; + else if (typeof object.podPidsLimit === "string") + message.podPidsLimit = parseInt(object.podPidsLimit, 10); + else if (typeof object.podPidsLimit === "number") + message.podPidsLimit = object.podPidsLimit; + else if (typeof object.podPidsLimit === "object") + message.podPidsLimit = new $util.LongBits(object.podPidsLimit.low >>> 0, object.podPidsLimit.high >>> 0).toNumber(); + if (object.insecureKubeletReadonlyPortEnabled != null) + message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); + return message; + }; + + /** + * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {google.container.v1.NodeKubeletConfig} message NodeKubeletConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeKubeletConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpuManagerPolicy = ""; + object.cpuCfsQuota = null; + object.cpuCfsQuotaPeriod = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.podPidsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.podPidsLimit = options.longs === String ? "0" : 0; + } + if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) + object.cpuManagerPolicy = message.cpuManagerPolicy; + if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) + object.cpuCfsQuota = $root.google.protobuf.BoolValue.toObject(message.cpuCfsQuota, options); + if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) + object.cpuCfsQuotaPeriod = message.cpuCfsQuotaPeriod; + if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) + if (typeof message.podPidsLimit === "number") + object.podPidsLimit = options.longs === String ? String(message.podPidsLimit) : message.podPidsLimit; + else + object.podPidsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.podPidsLimit) : options.longs === Number ? new $util.LongBits(message.podPidsLimit.low >>> 0, message.podPidsLimit.high >>> 0).toNumber() : message.podPidsLimit; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; + if (options.oneofs) + object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; + } + return object; + }; + + /** + * Converts this NodeKubeletConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodeKubeletConfig + * @instance + * @returns {Object.} JSON object + */ + NodeKubeletConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeKubeletConfig + * @function getTypeUrl + * @memberof google.container.v1.NodeKubeletConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeKubeletConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeKubeletConfig"; + }; + + return NodeKubeletConfig; + })(); + + v1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.container.v1 + * @interface INodeConfig + * @property {string|null} [machineType] NodeConfig machineType + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Object.|null} [metadata] NodeConfig metadata + * @property {string|null} [imageType] NodeConfig imageType + * @property {Object.|null} [labels] NodeConfig labels + * @property {number|null} [localSsdCount] NodeConfig localSsdCount + * @property {Array.|null} [tags] NodeConfig tags + * @property {boolean|null} [preemptible] NodeConfig preemptible + * @property {Array.|null} [accelerators] NodeConfig accelerators + * @property {string|null} [diskType] NodeConfig diskType + * @property {string|null} [minCpuPlatform] NodeConfig minCpuPlatform + * @property {google.container.v1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] NodeConfig workloadMetadataConfig + * @property {Array.|null} [taints] NodeConfig taints + * @property {google.container.v1.ISandboxConfig|null} [sandboxConfig] NodeConfig sandboxConfig + * @property {string|null} [nodeGroup] NodeConfig nodeGroup + * @property {google.container.v1.IReservationAffinity|null} [reservationAffinity] NodeConfig reservationAffinity + * @property {google.container.v1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] NodeConfig shieldedInstanceConfig + * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] NodeConfig linuxNodeConfig + * @property {google.container.v1.INodeKubeletConfig|null} [kubeletConfig] NodeConfig kubeletConfig + * @property {string|null} [bootDiskKmsKey] NodeConfig bootDiskKmsKey + * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfig gcfsConfig + * @property {google.container.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] NodeConfig advancedMachineFeatures + * @property {google.container.v1.IVirtualNIC|null} [gvnic] NodeConfig gvnic + * @property {boolean|null} [spot] NodeConfig spot + * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] NodeConfig confidentialNodes + * @property {google.container.v1.IFastSocket|null} [fastSocket] NodeConfig fastSocket + * @property {Object.|null} [resourceLabels] NodeConfig resourceLabels + * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfig loggingConfig + * @property {google.container.v1.IWindowsNodeConfig|null} [windowsNodeConfig] NodeConfig windowsNodeConfig + * @property {google.container.v1.ILocalNvmeSsdBlockConfig|null} [localNvmeSsdBlockConfig] NodeConfig localNvmeSsdBlockConfig + * @property {google.container.v1.IEphemeralStorageLocalSsdConfig|null} [ephemeralStorageLocalSsdConfig] NodeConfig ephemeralStorageLocalSsdConfig + * @property {google.container.v1.ISoleTenantConfig|null} [soleTenantConfig] NodeConfig soleTenantConfig + * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfig containerdConfig + * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodeConfig resourceManagerTags + * @property {boolean|null} [enableConfidentialStorage] NodeConfig enableConfidentialStorage + * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks + * @property {Array.|null} [storagePools] NodeConfig storagePools + * @property {google.container.v1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy + * @property {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null} [localSsdEncryptionMode] NodeConfig localSsdEncryptionMode + * @property {google.container.v1.NodeConfig.EffectiveCgroupMode|null} [effectiveCgroupMode] NodeConfig effectiveCgroupMode + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.container.v1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + this.metadata = {}; + this.labels = {}; + this.tags = []; + this.accelerators = []; + this.taints = []; + this.resourceLabels = {}; + this.secondaryBootDisks = []; + this.storagePools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig metadata. + * @member {Object.} metadata + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.metadata = $util.emptyObject; + + /** + * NodeConfig imageType. + * @member {string} imageType + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.imageType = ""; + + /** + * NodeConfig labels. + * @member {Object.} labels + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.labels = $util.emptyObject; + + /** + * NodeConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.localSsdCount = 0; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig preemptible. + * @member {boolean} preemptible + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.preemptible = false; + + /** + * NodeConfig accelerators. + * @member {Array.} accelerators + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.accelerators = $util.emptyArray; + + /** + * NodeConfig diskType. + * @member {string} diskType + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskType = ""; + + /** + * NodeConfig minCpuPlatform. + * @member {string} minCpuPlatform + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.minCpuPlatform = ""; + + /** + * NodeConfig workloadMetadataConfig. + * @member {google.container.v1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.workloadMetadataConfig = null; + + /** + * NodeConfig taints. + * @member {Array.} taints + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.taints = $util.emptyArray; + + /** + * NodeConfig sandboxConfig. + * @member {google.container.v1.ISandboxConfig|null|undefined} sandboxConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.sandboxConfig = null; + + /** + * NodeConfig nodeGroup. + * @member {string} nodeGroup + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.nodeGroup = ""; + + /** + * NodeConfig reservationAffinity. + * @member {google.container.v1.IReservationAffinity|null|undefined} reservationAffinity + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.reservationAffinity = null; + + /** + * NodeConfig shieldedInstanceConfig. + * @member {google.container.v1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.shieldedInstanceConfig = null; + + /** + * NodeConfig linuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.linuxNodeConfig = null; + + /** + * NodeConfig kubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} kubeletConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.kubeletConfig = null; + + /** + * NodeConfig bootDiskKmsKey. + * @member {string} bootDiskKmsKey + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.bootDiskKmsKey = ""; + + /** + * NodeConfig gcfsConfig. + * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.gcfsConfig = null; + + /** + * NodeConfig advancedMachineFeatures. + * @member {google.container.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.advancedMachineFeatures = null; + + /** + * NodeConfig gvnic. + * @member {google.container.v1.IVirtualNIC|null|undefined} gvnic + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.gvnic = null; + + /** + * NodeConfig spot. + * @member {boolean} spot + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.spot = false; + + /** + * NodeConfig confidentialNodes. + * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.confidentialNodes = null; + + /** + * NodeConfig fastSocket. + * @member {google.container.v1.IFastSocket|null|undefined} fastSocket + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.fastSocket = null; + + /** + * NodeConfig resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.resourceLabels = $util.emptyObject; + + /** + * NodeConfig loggingConfig. + * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.loggingConfig = null; + + /** + * NodeConfig windowsNodeConfig. + * @member {google.container.v1.IWindowsNodeConfig|null|undefined} windowsNodeConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.windowsNodeConfig = null; + + /** + * NodeConfig localNvmeSsdBlockConfig. + * @member {google.container.v1.ILocalNvmeSsdBlockConfig|null|undefined} localNvmeSsdBlockConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.localNvmeSsdBlockConfig = null; + + /** + * NodeConfig ephemeralStorageLocalSsdConfig. + * @member {google.container.v1.IEphemeralStorageLocalSsdConfig|null|undefined} ephemeralStorageLocalSsdConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.ephemeralStorageLocalSsdConfig = null; + + /** + * NodeConfig soleTenantConfig. + * @member {google.container.v1.ISoleTenantConfig|null|undefined} soleTenantConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.soleTenantConfig = null; + + /** + * NodeConfig containerdConfig. + * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.containerdConfig = null; + + /** + * NodeConfig resourceManagerTags. + * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.resourceManagerTags = null; + + /** + * NodeConfig enableConfidentialStorage. + * @member {boolean} enableConfidentialStorage + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.enableConfidentialStorage = false; + + /** + * NodeConfig secondaryBootDisks. + * @member {Array.} secondaryBootDisks + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.secondaryBootDisks = $util.emptyArray; + + /** + * NodeConfig storagePools. + * @member {Array.} storagePools + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.storagePools = $util.emptyArray; + + /** + * NodeConfig secondaryBootDiskUpdateStrategy. + * @member {google.container.v1.ISecondaryBootDiskUpdateStrategy|null|undefined} secondaryBootDiskUpdateStrategy + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; + + /** + * NodeConfig localSsdEncryptionMode. + * @member {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null|undefined} localSsdEncryptionMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.localSsdEncryptionMode = null; + + /** + * NodeConfig effectiveCgroupMode. + * @member {google.container.v1.NodeConfig.EffectiveCgroupMode} effectiveCgroupMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.effectiveCgroupMode = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeConfig _fastSocket. + * @member {"fastSocket"|undefined} _fastSocket + * @memberof google.container.v1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_fastSocket", { + get: $util.oneOfGetter($oneOfFields = ["fastSocket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeConfig _secondaryBootDiskUpdateStrategy. + * @member {"secondaryBootDiskUpdateStrategy"|undefined} _secondaryBootDiskUpdateStrategy + * @memberof google.container.v1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_secondaryBootDiskUpdateStrategy", { + get: $util.oneOfGetter($oneOfFields = ["secondaryBootDiskUpdateStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeConfig _localSsdEncryptionMode. + * @member {"localSsdEncryptionMode"|undefined} _localSsdEncryptionMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_localSsdEncryptionMode", { + get: $util.oneOfGetter($oneOfFields = ["localSsdEncryptionMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeConfig + * @static + * @param {google.container.v1.INodeConfig=} [properties] Properties to set + * @returns {google.container.v1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeConfig + * @static + * @param {google.container.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.oauthScopes[i]); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageType); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.localSsdCount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.preemptible); + if (message.accelerators != null && message.accelerators.length) + for (var i = 0; i < message.accelerators.length; ++i) + $root.google.container.v1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.diskType); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.minCpuPlatform); + if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) + $root.google.container.v1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.container.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sandboxConfig != null && Object.hasOwnProperty.call(message, "sandboxConfig")) + $root.google.container.v1.SandboxConfig.encode(message.sandboxConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.nodeGroup != null && Object.hasOwnProperty.call(message, "nodeGroup")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.nodeGroup); + if (message.reservationAffinity != null && Object.hasOwnProperty.call(message, "reservationAffinity")) + $root.google.container.v1.ReservationAffinity.encode(message.reservationAffinity, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) + $root.google.container.v1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.bootDiskKmsKey); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.container.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) + $root.google.container.v1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.spot != null && Object.hasOwnProperty.call(message, "spot")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.spot); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) + $root.google.container.v1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 37, wireType 2 =*/298).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) + $root.google.container.v1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.localNvmeSsdBlockConfig != null && Object.hasOwnProperty.call(message, "localNvmeSsdBlockConfig")) + $root.google.container.v1.LocalNvmeSsdBlockConfig.encode(message.localNvmeSsdBlockConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.ephemeralStorageLocalSsdConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageLocalSsdConfig")) + $root.google.container.v1.EphemeralStorageLocalSsdConfig.encode(message.ephemeralStorageLocalSsdConfig, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.soleTenantConfig != null && Object.hasOwnProperty.call(message, "soleTenantConfig")) + $root.google.container.v1.SoleTenantConfig.encode(message.soleTenantConfig, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.enableConfidentialStorage != null && Object.hasOwnProperty.call(message, "enableConfidentialStorage")) + writer.uint32(/* id 46, wireType 0 =*/368).bool(message.enableConfidentialStorage); + if (message.secondaryBootDisks != null && message.secondaryBootDisks.length) + for (var i = 0; i < message.secondaryBootDisks.length; ++i) + $root.google.container.v1.SecondaryBootDisk.encode(message.secondaryBootDisks[i], writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.storagePools[i]); + if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) + $root.google.container.v1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.localSsdEncryptionMode != null && Object.hasOwnProperty.call(message, "localSsdEncryptionMode")) + writer.uint32(/* id 54, wireType 0 =*/432).int32(message.localSsdEncryptionMode); + if (message.effectiveCgroupMode != null && Object.hasOwnProperty.call(message, "effectiveCgroupMode")) + writer.uint32(/* id 55, wireType 0 =*/440).int32(message.effectiveCgroupMode); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeConfig + * @static + * @param {google.container.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + case 2: { + message.diskSizeGb = reader.int32(); + break; + } + case 3: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + case 4: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + } + case 5: { + message.imageType = reader.string(); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 7: { + message.localSsdCount = reader.int32(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 10: { + message.preemptible = reader.bool(); + break; + } + case 11: { + if (!(message.accelerators && message.accelerators.length)) + message.accelerators = []; + message.accelerators.push($root.google.container.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 12: { + message.diskType = reader.string(); + break; + } + case 13: { + message.minCpuPlatform = reader.string(); + break; + } + case 14: { + message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.container.v1.NodeTaint.decode(reader, reader.uint32())); + break; + } + case 17: { + message.sandboxConfig = $root.google.container.v1.SandboxConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.nodeGroup = reader.string(); + break; + } + case 19: { + message.reservationAffinity = $root.google.container.v1.ReservationAffinity.decode(reader, reader.uint32()); + break; + } + case 20: { + message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 23: { + message.bootDiskKmsKey = reader.string(); + break; + } + case 25: { + message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 26: { + message.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 29: { + message.gvnic = $root.google.container.v1.VirtualNIC.decode(reader, reader.uint32()); + break; + } + case 32: { + message.spot = reader.bool(); + break; + } + case 35: { + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 36: { + message.fastSocket = $root.google.container.v1.FastSocket.decode(reader, reader.uint32()); + break; + } + case 37: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 38: { + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 39: { + message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.decode(reader, reader.uint32()); + break; + } + case 40: { + message.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.decode(reader, reader.uint32()); + break; + } + case 41: { + message.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.decode(reader, reader.uint32()); + break; + } + case 42: { + message.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.decode(reader, reader.uint32()); + break; + } + case 43: { + message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 45: { + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 46: { + message.enableConfidentialStorage = reader.bool(); + break; + } + case 48: { + if (!(message.secondaryBootDisks && message.secondaryBootDisks.length)) + message.secondaryBootDisks = []; + message.secondaryBootDisks.push($root.google.container.v1.SecondaryBootDisk.decode(reader, reader.uint32())); + break; + } + case 49: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push(reader.string()); + break; + } + case 50: { + message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); + break; + } + case 54: { + message.localSsdEncryptionMode = reader.int32(); + break; + } + case 55: { + message.effectiveCgroupMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.container.v1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + if (message.accelerators != null && message.hasOwnProperty("accelerators")) { + if (!Array.isArray(message.accelerators)) + return "accelerators: array expected"; + for (var i = 0; i < message.accelerators.length; ++i) { + var error = $root.google.container.v1.AcceleratorConfig.verify(message.accelerators[i]); + if (error) + return "accelerators." + error; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { + var error = $root.google.container.v1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); + if (error) + return "workloadMetadataConfig." + 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.container.v1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) { + var error = $root.google.container.v1.SandboxConfig.verify(message.sandboxConfig); + if (error) + return "sandboxConfig." + error; + } + if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) + if (!$util.isString(message.nodeGroup)) + return "nodeGroup: string expected"; + if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) { + var error = $root.google.container.v1.ReservationAffinity.verify(message.reservationAffinity); + if (error) + return "reservationAffinity." + error; + } + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { + var error = $root.google.container.v1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); + if (error) + return "shieldedInstanceConfig." + error; + } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.kubeletConfig); + if (error) + return "kubeletConfig." + error; + } + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + if (!$util.isString(message.bootDiskKmsKey)) + return "bootDiskKmsKey: string expected"; + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + var error = $root.google.container.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + if (message.gvnic != null && message.hasOwnProperty("gvnic")) { + var error = $root.google.container.v1.VirtualNIC.verify(message.gvnic); + if (error) + return "gvnic." + error; + } + if (message.spot != null && message.hasOwnProperty("spot")) + if (typeof message.spot !== "boolean") + return "spot: boolean expected"; + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + properties._fastSocket = 1; + { + var error = $root.google.container.v1.FastSocket.verify(message.fastSocket); + if (error) + return "fastSocket." + error; + } + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { + var error = $root.google.container.v1.WindowsNodeConfig.verify(message.windowsNodeConfig); + if (error) + return "windowsNodeConfig." + error; + } + if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) { + var error = $root.google.container.v1.LocalNvmeSsdBlockConfig.verify(message.localNvmeSsdBlockConfig); + if (error) + return "localNvmeSsdBlockConfig." + error; + } + if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) { + var error = $root.google.container.v1.EphemeralStorageLocalSsdConfig.verify(message.ephemeralStorageLocalSsdConfig); + if (error) + return "ephemeralStorageLocalSsdConfig." + error; + } + if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) { + var error = $root.google.container.v1.SoleTenantConfig.verify(message.soleTenantConfig); + if (error) + return "soleTenantConfig." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) + if (typeof message.enableConfidentialStorage !== "boolean") + return "enableConfidentialStorage: boolean expected"; + if (message.secondaryBootDisks != null && message.hasOwnProperty("secondaryBootDisks")) { + if (!Array.isArray(message.secondaryBootDisks)) + return "secondaryBootDisks: array expected"; + for (var i = 0; i < message.secondaryBootDisks.length; ++i) { + var error = $root.google.container.v1.SecondaryBootDisk.verify(message.secondaryBootDisks[i]); + if (error) + return "secondaryBootDisks." + error; + } + } + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) + if (!$util.isString(message.storagePools[i])) + return "storagePools: string[] expected"; + } + if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { + properties._secondaryBootDiskUpdateStrategy = 1; + { + var error = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.verify(message.secondaryBootDiskUpdateStrategy); + if (error) + return "secondaryBootDiskUpdateStrategy." + error; + } + } + if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { + properties._localSsdEncryptionMode = 1; + switch (message.localSsdEncryptionMode) { + default: + return "localSsdEncryptionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) + switch (message.effectiveCgroupMode) { + default: + return "effectiveCgroupMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeConfig) + return object; + var message = new $root.google.container.v1.NodeConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.container.v1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.container.v1.NodeConfig.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1.NodeConfig.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.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.container.v1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.accelerators) { + if (!Array.isArray(object.accelerators)) + throw TypeError(".google.container.v1.NodeConfig.accelerators: array expected"); + message.accelerators = []; + for (var i = 0; i < object.accelerators.length; ++i) { + if (typeof object.accelerators[i] !== "object") + throw TypeError(".google.container.v1.NodeConfig.accelerators: object expected"); + message.accelerators[i] = $root.google.container.v1.AcceleratorConfig.fromObject(object.accelerators[i]); + } + } + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.workloadMetadataConfig != null) { + if (typeof object.workloadMetadataConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.workloadMetadataConfig: object expected"); + message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); + } + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.container.v1.NodeConfig.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.container.v1.NodeConfig.taints: object expected"); + message.taints[i] = $root.google.container.v1.NodeTaint.fromObject(object.taints[i]); + } + } + if (object.sandboxConfig != null) { + if (typeof object.sandboxConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.sandboxConfig: object expected"); + message.sandboxConfig = $root.google.container.v1.SandboxConfig.fromObject(object.sandboxConfig); + } + if (object.nodeGroup != null) + message.nodeGroup = String(object.nodeGroup); + if (object.reservationAffinity != null) { + if (typeof object.reservationAffinity !== "object") + throw TypeError(".google.container.v1.NodeConfig.reservationAffinity: object expected"); + message.reservationAffinity = $root.google.container.v1.ReservationAffinity.fromObject(object.reservationAffinity); + } + if (object.shieldedInstanceConfig != null) { + if (typeof object.shieldedInstanceConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.shieldedInstanceConfig: object expected"); + message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); + } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } + if (object.kubeletConfig != null) { + if (typeof object.kubeletConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.kubeletConfig: object expected"); + message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.kubeletConfig); + } + if (object.bootDiskKmsKey != null) + message.bootDiskKmsKey = String(object.bootDiskKmsKey); + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.container.v1.NodeConfig.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.gvnic != null) { + if (typeof object.gvnic !== "object") + throw TypeError(".google.container.v1.NodeConfig.gvnic: object expected"); + message.gvnic = $root.google.container.v1.VirtualNIC.fromObject(object.gvnic); + } + if (object.spot != null) + message.spot = Boolean(object.spot); + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1.NodeConfig.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.fastSocket != null) { + if (typeof object.fastSocket !== "object") + throw TypeError(".google.container.v1.NodeConfig.fastSocket: object expected"); + message.fastSocket = $root.google.container.v1.FastSocket.fromObject(object.fastSocket); + } + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1.NodeConfig.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.windowsNodeConfig != null) { + if (typeof object.windowsNodeConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.windowsNodeConfig: object expected"); + message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); + } + if (object.localNvmeSsdBlockConfig != null) { + if (typeof object.localNvmeSsdBlockConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.localNvmeSsdBlockConfig: object expected"); + message.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.fromObject(object.localNvmeSsdBlockConfig); + } + if (object.ephemeralStorageLocalSsdConfig != null) { + if (typeof object.ephemeralStorageLocalSsdConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.ephemeralStorageLocalSsdConfig: object expected"); + message.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.fromObject(object.ephemeralStorageLocalSsdConfig); + } + if (object.soleTenantConfig != null) { + if (typeof object.soleTenantConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.soleTenantConfig: object expected"); + message.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.fromObject(object.soleTenantConfig); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1.NodeConfig.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1.NodeConfig.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.enableConfidentialStorage != null) + message.enableConfidentialStorage = Boolean(object.enableConfidentialStorage); + if (object.secondaryBootDisks) { + if (!Array.isArray(object.secondaryBootDisks)) + throw TypeError(".google.container.v1.NodeConfig.secondaryBootDisks: array expected"); + message.secondaryBootDisks = []; + for (var i = 0; i < object.secondaryBootDisks.length; ++i) { + if (typeof object.secondaryBootDisks[i] !== "object") + throw TypeError(".google.container.v1.NodeConfig.secondaryBootDisks: object expected"); + message.secondaryBootDisks[i] = $root.google.container.v1.SecondaryBootDisk.fromObject(object.secondaryBootDisks[i]); + } + } + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.container.v1.NodeConfig.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) + message.storagePools[i] = String(object.storagePools[i]); + } + if (object.secondaryBootDiskUpdateStrategy != null) { + if (typeof object.secondaryBootDiskUpdateStrategy !== "object") + throw TypeError(".google.container.v1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); + message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); + } + switch (object.localSsdEncryptionMode) { + default: + if (typeof object.localSsdEncryptionMode === "number") { + message.localSsdEncryptionMode = object.localSsdEncryptionMode; + break; + } + break; + case "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": + case 0: + message.localSsdEncryptionMode = 0; + break; + case "STANDARD_ENCRYPTION": + case 1: + message.localSsdEncryptionMode = 1; + break; + case "EPHEMERAL_KEY_ENCRYPTION": + case 2: + message.localSsdEncryptionMode = 2; + break; + } + switch (object.effectiveCgroupMode) { + default: + if (typeof object.effectiveCgroupMode === "number") { + message.effectiveCgroupMode = object.effectiveCgroupMode; + break; + } + break; + case "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": + case 0: + message.effectiveCgroupMode = 0; + break; + case "EFFECTIVE_CGROUP_MODE_V1": + case 1: + message.effectiveCgroupMode = 1; + break; + case "EFFECTIVE_CGROUP_MODE_V2": + case 2: + message.effectiveCgroupMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeConfig + * @static + * @param {google.container.v1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + object.accelerators = []; + object.taints = []; + object.secondaryBootDisks = []; + object.storagePools = []; + } + if (options.objects || options.defaults) { + object.metadata = {}; + object.labels = {}; + object.resourceLabels = {}; + } + if (options.defaults) { + object.machineType = ""; + object.diskSizeGb = 0; + object.imageType = ""; + object.localSsdCount = 0; + object.serviceAccount = ""; + object.preemptible = false; + object.diskType = ""; + object.minCpuPlatform = ""; + object.workloadMetadataConfig = null; + object.sandboxConfig = null; + object.nodeGroup = ""; + object.reservationAffinity = null; + object.shieldedInstanceConfig = null; + object.linuxNodeConfig = null; + object.kubeletConfig = null; + object.bootDiskKmsKey = ""; + object.gcfsConfig = null; + object.advancedMachineFeatures = null; + object.gvnic = null; + object.spot = false; + object.confidentialNodes = null; + object.loggingConfig = null; + object.windowsNodeConfig = null; + object.localNvmeSsdBlockConfig = null; + object.ephemeralStorageLocalSsdConfig = null; + object.soleTenantConfig = null; + object.containerdConfig = null; + object.resourceManagerTags = null; + object.enableConfidentialStorage = false; + object.effectiveCgroupMode = options.enums === String ? "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" : 0; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + 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.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.preemptible != null && message.hasOwnProperty("preemptible")) + object.preemptible = message.preemptible; + if (message.accelerators && message.accelerators.length) { + object.accelerators = []; + for (var j = 0; j < message.accelerators.length; ++j) + object.accelerators[j] = $root.google.container.v1.AcceleratorConfig.toObject(message.accelerators[j], options); + } + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + object.minCpuPlatform = message.minCpuPlatform; + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) + object.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.container.v1.NodeTaint.toObject(message.taints[j], options); + } + if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) + object.sandboxConfig = $root.google.container.v1.SandboxConfig.toObject(message.sandboxConfig, options); + if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) + object.nodeGroup = message.nodeGroup; + if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) + object.reservationAffinity = $root.google.container.v1.ReservationAffinity.toObject(message.reservationAffinity, options); + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) + object.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) + object.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.kubeletConfig, options); + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + object.bootDiskKmsKey = message.bootDiskKmsKey; + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) + object.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (message.gvnic != null && message.hasOwnProperty("gvnic")) + object.gvnic = $root.google.container.v1.VirtualNIC.toObject(message.gvnic, options); + if (message.spot != null && message.hasOwnProperty("spot")) + object.spot = message.spot; + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + object.fastSocket = $root.google.container.v1.FastSocket.toObject(message.fastSocket, options); + if (options.oneofs) + object._fastSocket = "fastSocket"; + } + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) + object.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); + if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) + object.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.toObject(message.localNvmeSsdBlockConfig, options); + if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) + object.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.toObject(message.ephemeralStorageLocalSsdConfig, options); + if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) + object.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.toObject(message.soleTenantConfig, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) + object.enableConfidentialStorage = message.enableConfidentialStorage; + if (message.secondaryBootDisks && message.secondaryBootDisks.length) { + object.secondaryBootDisks = []; + for (var j = 0; j < message.secondaryBootDisks.length; ++j) + object.secondaryBootDisks[j] = $root.google.container.v1.SecondaryBootDisk.toObject(message.secondaryBootDisks[j], options); + } + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = message.storagePools[j]; + } + if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { + object.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.toObject(message.secondaryBootDiskUpdateStrategy, options); + if (options.oneofs) + object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; + } + if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { + object.localSsdEncryptionMode = options.enums === String ? $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] === undefined ? message.localSsdEncryptionMode : $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] : message.localSsdEncryptionMode; + if (options.oneofs) + object._localSsdEncryptionMode = "localSsdEncryptionMode"; + } + if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) + object.effectiveCgroupMode = options.enums === String ? $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] === undefined ? message.effectiveCgroupMode : $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] : message.effectiveCgroupMode; + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.container.v1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeConfig"; + }; + + /** + * LocalSsdEncryptionMode enum. + * @name google.container.v1.NodeConfig.LocalSsdEncryptionMode + * @enum {number} + * @property {number} LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED=0 LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED value + * @property {number} STANDARD_ENCRYPTION=1 STANDARD_ENCRYPTION value + * @property {number} EPHEMERAL_KEY_ENCRYPTION=2 EPHEMERAL_KEY_ENCRYPTION value + */ + NodeConfig.LocalSsdEncryptionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_ENCRYPTION"] = 1; + values[valuesById[2] = "EPHEMERAL_KEY_ENCRYPTION"] = 2; + return values; + })(); + + /** + * EffectiveCgroupMode enum. + * @name google.container.v1.NodeConfig.EffectiveCgroupMode + * @enum {number} + * @property {number} EFFECTIVE_CGROUP_MODE_UNSPECIFIED=0 EFFECTIVE_CGROUP_MODE_UNSPECIFIED value + * @property {number} EFFECTIVE_CGROUP_MODE_V1=1 EFFECTIVE_CGROUP_MODE_V1 value + * @property {number} EFFECTIVE_CGROUP_MODE_V2=2 EFFECTIVE_CGROUP_MODE_V2 value + */ + NodeConfig.EffectiveCgroupMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EFFECTIVE_CGROUP_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EFFECTIVE_CGROUP_MODE_V1"] = 1; + values[valuesById[2] = "EFFECTIVE_CGROUP_MODE_V2"] = 2; + return values; + })(); + + return NodeConfig; + })(); + + v1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.container.v1 + * @interface IAdvancedMachineFeatures + * @property {number|Long|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.container.v1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.container.v1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|Long|null|undefined} threadsPerCore + * @memberof google.container.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.container.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.container.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.container.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {google.container.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {google.container.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.threadsPerCore); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNestedVirtualization); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {google.container.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.threadsPerCore = reader.int64(); + break; + } + case 2: { + message.enableNestedVirtualization = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore) && !(message.threadsPerCore && $util.isInteger(message.threadsPerCore.low) && $util.isInteger(message.threadsPerCore.high))) + return "threadsPerCore: integer|Long expected"; + } + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdvancedMachineFeatures) + return object; + var message = new $root.google.container.v1.AdvancedMachineFeatures(); + if (object.threadsPerCore != null) + if ($util.Long) + (message.threadsPerCore = $util.Long.fromValue(object.threadsPerCore)).unsigned = false; + else if (typeof object.threadsPerCore === "string") + message.threadsPerCore = parseInt(object.threadsPerCore, 10); + else if (typeof object.threadsPerCore === "number") + message.threadsPerCore = object.threadsPerCore; + else if (typeof object.threadsPerCore === "object") + message.threadsPerCore = new $util.LongBits(object.threadsPerCore.low >>> 0, object.threadsPerCore.high >>> 0).toNumber(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {google.container.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + if (typeof message.threadsPerCore === "number") + object.threadsPerCore = options.longs === String ? String(message.threadsPerCore) : message.threadsPerCore; + else + object.threadsPerCore = options.longs === String ? $util.Long.prototype.toString.call(message.threadsPerCore) : options.longs === Number ? new $util.LongBits(message.threadsPerCore.low >>> 0, message.threadsPerCore.high >>> 0).toNumber() : message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.container.v1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.container.v1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1.NodeNetworkConfig = (function() { + + /** + * Properties of a NodeNetworkConfig. + * @memberof google.container.v1 + * @interface INodeNetworkConfig + * @property {boolean|null} [createPodRange] NodeNetworkConfig createPodRange + * @property {string|null} [podRange] NodeNetworkConfig podRange + * @property {string|null} [podIpv4CidrBlock] NodeNetworkConfig podIpv4CidrBlock + * @property {boolean|null} [enablePrivateNodes] NodeNetworkConfig enablePrivateNodes + * @property {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null} [networkPerformanceConfig] NodeNetworkConfig networkPerformanceConfig + * @property {google.container.v1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] NodeNetworkConfig podCidrOverprovisionConfig + * @property {Array.|null} [additionalNodeNetworkConfigs] NodeNetworkConfig additionalNodeNetworkConfigs + * @property {Array.|null} [additionalPodNetworkConfigs] NodeNetworkConfig additionalPodNetworkConfigs + * @property {number|null} [podIpv4RangeUtilization] NodeNetworkConfig podIpv4RangeUtilization + */ + + /** + * Constructs a new NodeNetworkConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodeNetworkConfig. + * @implements INodeNetworkConfig + * @constructor + * @param {google.container.v1.INodeNetworkConfig=} [properties] Properties to set + */ + function NodeNetworkConfig(properties) { + this.additionalNodeNetworkConfigs = []; + this.additionalPodNetworkConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeNetworkConfig createPodRange. + * @member {boolean} createPodRange + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.createPodRange = false; + + /** + * NodeNetworkConfig podRange. + * @member {string} podRange + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podRange = ""; + + /** + * NodeNetworkConfig podIpv4CidrBlock. + * @member {string} podIpv4CidrBlock + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podIpv4CidrBlock = ""; + + /** + * NodeNetworkConfig enablePrivateNodes. + * @member {boolean|null|undefined} enablePrivateNodes + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.enablePrivateNodes = null; + + /** + * NodeNetworkConfig networkPerformanceConfig. + * @member {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.networkPerformanceConfig = null; + + /** + * NodeNetworkConfig podCidrOverprovisionConfig. + * @member {google.container.v1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podCidrOverprovisionConfig = null; + + /** + * NodeNetworkConfig additionalNodeNetworkConfigs. + * @member {Array.} additionalNodeNetworkConfigs + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.additionalNodeNetworkConfigs = $util.emptyArray; + + /** + * NodeNetworkConfig additionalPodNetworkConfigs. + * @member {Array.} additionalPodNetworkConfigs + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.additionalPodNetworkConfigs = $util.emptyArray; + + /** + * NodeNetworkConfig podIpv4RangeUtilization. + * @member {number} podIpv4RangeUtilization + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podIpv4RangeUtilization = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeNetworkConfig _enablePrivateNodes. + * @member {"enablePrivateNodes"|undefined} _enablePrivateNodes + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + Object.defineProperty(NodeNetworkConfig.prototype, "_enablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["enablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeNetworkConfig _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + Object.defineProperty(NodeNetworkConfig.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {google.container.v1.INodeNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig instance + */ + NodeNetworkConfig.create = function create(properties) { + return new NodeNetworkConfig(properties); + }; + + /** + * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {google.container.v1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createPodRange != null && Object.hasOwnProperty.call(message, "createPodRange")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.createPodRange); + if (message.podRange != null && Object.hasOwnProperty.call(message, "podRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.podRange); + if (message.podIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "podIpv4CidrBlock")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.podIpv4CidrBlock); + if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enablePrivateNodes); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) + $root.google.container.v1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.additionalNodeNetworkConfigs != null && message.additionalNodeNetworkConfigs.length) + for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) + $root.google.container.v1.AdditionalNodeNetworkConfig.encode(message.additionalNodeNetworkConfigs[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.additionalPodNetworkConfigs != null && message.additionalPodNetworkConfigs.length) + for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) + $root.google.container.v1.AdditionalPodNetworkConfig.encode(message.additionalPodNetworkConfigs[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.podIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "podIpv4RangeUtilization")) + writer.uint32(/* id 16, wireType 1 =*/129).double(message.podIpv4RangeUtilization); + return writer; + }; + + /** + * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {google.container.v1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.createPodRange = reader.bool(); + break; + } + case 5: { + message.podRange = reader.string(); + break; + } + case 6: { + message.podIpv4CidrBlock = reader.string(); + break; + } + case 9: { + message.enablePrivateNodes = reader.bool(); + break; + } + case 11: { + message.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + if (!(message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length)) + message.additionalNodeNetworkConfigs = []; + message.additionalNodeNetworkConfigs.push($root.google.container.v1.AdditionalNodeNetworkConfig.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length)) + message.additionalPodNetworkConfigs = []; + message.additionalPodNetworkConfigs.push($root.google.container.v1.AdditionalPodNetworkConfig.decode(reader, reader.uint32())); + break; + } + case 16: { + message.podIpv4RangeUtilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeNetworkConfig message. + * @function verify + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) + if (typeof message.createPodRange !== "boolean") + return "createPodRange: boolean expected"; + if (message.podRange != null && message.hasOwnProperty("podRange")) + if (!$util.isString(message.podRange)) + return "podRange: string expected"; + if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) + if (!$util.isString(message.podIpv4CidrBlock)) + return "podIpv4CidrBlock: string expected"; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { + properties._enablePrivateNodes = 1; + if (typeof message.enablePrivateNodes !== "boolean") + return "enablePrivateNodes: boolean expected"; + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { + var error = $root.google.container.v1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); + if (error) + return "podCidrOverprovisionConfig." + error; + } + if (message.additionalNodeNetworkConfigs != null && message.hasOwnProperty("additionalNodeNetworkConfigs")) { + if (!Array.isArray(message.additionalNodeNetworkConfigs)) + return "additionalNodeNetworkConfigs: array expected"; + for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) { + var error = $root.google.container.v1.AdditionalNodeNetworkConfig.verify(message.additionalNodeNetworkConfigs[i]); + if (error) + return "additionalNodeNetworkConfigs." + error; + } + } + if (message.additionalPodNetworkConfigs != null && message.hasOwnProperty("additionalPodNetworkConfigs")) { + if (!Array.isArray(message.additionalPodNetworkConfigs)) + return "additionalPodNetworkConfigs: array expected"; + for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) { + var error = $root.google.container.v1.AdditionalPodNetworkConfig.verify(message.additionalPodNetworkConfigs[i]); + if (error) + return "additionalPodNetworkConfigs." + error; + } + } + if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) + if (typeof message.podIpv4RangeUtilization !== "number") + return "podIpv4RangeUtilization: number expected"; + return null; + }; + + /** + * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig + */ + NodeNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeNetworkConfig) + return object; + var message = new $root.google.container.v1.NodeNetworkConfig(); + if (object.createPodRange != null) + message.createPodRange = Boolean(object.createPodRange); + if (object.podRange != null) + message.podRange = String(object.podRange); + if (object.podIpv4CidrBlock != null) + message.podIpv4CidrBlock = String(object.podIpv4CidrBlock); + if (object.enablePrivateNodes != null) + message.enablePrivateNodes = Boolean(object.enablePrivateNodes); + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.container.v1.NodeNetworkConfig.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.podCidrOverprovisionConfig != null) { + if (typeof object.podCidrOverprovisionConfig !== "object") + throw TypeError(".google.container.v1.NodeNetworkConfig.podCidrOverprovisionConfig: object expected"); + message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); + } + if (object.additionalNodeNetworkConfigs) { + if (!Array.isArray(object.additionalNodeNetworkConfigs)) + throw TypeError(".google.container.v1.NodeNetworkConfig.additionalNodeNetworkConfigs: array expected"); + message.additionalNodeNetworkConfigs = []; + for (var i = 0; i < object.additionalNodeNetworkConfigs.length; ++i) { + if (typeof object.additionalNodeNetworkConfigs[i] !== "object") + throw TypeError(".google.container.v1.NodeNetworkConfig.additionalNodeNetworkConfigs: object expected"); + message.additionalNodeNetworkConfigs[i] = $root.google.container.v1.AdditionalNodeNetworkConfig.fromObject(object.additionalNodeNetworkConfigs[i]); + } + } + if (object.additionalPodNetworkConfigs) { + if (!Array.isArray(object.additionalPodNetworkConfigs)) + throw TypeError(".google.container.v1.NodeNetworkConfig.additionalPodNetworkConfigs: array expected"); + message.additionalPodNetworkConfigs = []; + for (var i = 0; i < object.additionalPodNetworkConfigs.length; ++i) { + if (typeof object.additionalPodNetworkConfigs[i] !== "object") + throw TypeError(".google.container.v1.NodeNetworkConfig.additionalPodNetworkConfigs: object expected"); + message.additionalPodNetworkConfigs[i] = $root.google.container.v1.AdditionalPodNetworkConfig.fromObject(object.additionalPodNetworkConfigs[i]); + } + } + if (object.podIpv4RangeUtilization != null) + message.podIpv4RangeUtilization = Number(object.podIpv4RangeUtilization); + return message; + }; + + /** + * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {google.container.v1.NodeNetworkConfig} message NodeNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.additionalNodeNetworkConfigs = []; + object.additionalPodNetworkConfigs = []; + } + if (options.defaults) { + object.createPodRange = false; + object.podRange = ""; + object.podIpv4CidrBlock = ""; + object.podCidrOverprovisionConfig = null; + object.podIpv4RangeUtilization = 0; + } + if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) + object.createPodRange = message.createPodRange; + if (message.podRange != null && message.hasOwnProperty("podRange")) + object.podRange = message.podRange; + if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) + object.podIpv4CidrBlock = message.podIpv4CidrBlock; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { + object.enablePrivateNodes = message.enablePrivateNodes; + if (options.oneofs) + object._enablePrivateNodes = "enablePrivateNodes"; + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) + object.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); + if (message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length) { + object.additionalNodeNetworkConfigs = []; + for (var j = 0; j < message.additionalNodeNetworkConfigs.length; ++j) + object.additionalNodeNetworkConfigs[j] = $root.google.container.v1.AdditionalNodeNetworkConfig.toObject(message.additionalNodeNetworkConfigs[j], options); + } + if (message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length) { + object.additionalPodNetworkConfigs = []; + for (var j = 0; j < message.additionalPodNetworkConfigs.length; ++j) + object.additionalPodNetworkConfigs[j] = $root.google.container.v1.AdditionalPodNetworkConfig.toObject(message.additionalPodNetworkConfigs[j], options); + } + if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) + object.podIpv4RangeUtilization = options.json && !isFinite(message.podIpv4RangeUtilization) ? String(message.podIpv4RangeUtilization) : message.podIpv4RangeUtilization; + return object; + }; + + /** + * Converts this NodeNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodeNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NodeNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1.NodeNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeNetworkConfig"; + }; + + NodeNetworkConfig.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.container.v1.NodeNetworkConfig + * @interface INetworkPerformanceConfig + * @property {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.container.v1.NodeNetworkConfig + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig) + return object; + var message = new $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "TIER_1": + case 1: + message.totalEgressBandwidthTier = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} TIER_1=1 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIER_1"] = 1; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + return NodeNetworkConfig; + })(); + + v1.AdditionalNodeNetworkConfig = (function() { + + /** + * Properties of an AdditionalNodeNetworkConfig. + * @memberof google.container.v1 + * @interface IAdditionalNodeNetworkConfig + * @property {string|null} [network] AdditionalNodeNetworkConfig network + * @property {string|null} [subnetwork] AdditionalNodeNetworkConfig subnetwork + */ + + /** + * Constructs a new AdditionalNodeNetworkConfig. + * @memberof google.container.v1 + * @classdesc Represents an AdditionalNodeNetworkConfig. + * @implements IAdditionalNodeNetworkConfig + * @constructor + * @param {google.container.v1.IAdditionalNodeNetworkConfig=} [properties] Properties to set + */ + function AdditionalNodeNetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalNodeNetworkConfig network. + * @member {string} network + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @instance + */ + AdditionalNodeNetworkConfig.prototype.network = ""; + + /** + * AdditionalNodeNetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @instance + */ + AdditionalNodeNetworkConfig.prototype.subnetwork = ""; + + /** + * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1.IAdditionalNodeNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig instance + */ + AdditionalNodeNetworkConfig.create = function create(properties) { + return new AdditionalNodeNetworkConfig(properties); + }; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalNodeNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + return writer; + }; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalNodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalNodeNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalNodeNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalNodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalNodeNetworkConfig message. + * @function verify + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalNodeNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + return null; + }; + + /** + * Creates an AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + */ + AdditionalNodeNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdditionalNodeNetworkConfig) + return object; + var message = new $root.google.container.v1.AdditionalNodeNetworkConfig(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + return message; + }; + + /** + * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1.AdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalNodeNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.subnetwork = ""; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + return object; + }; + + /** + * Converts this AdditionalNodeNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalNodeNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalNodeNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1.AdditionalNodeNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalNodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdditionalNodeNetworkConfig"; + }; + + return AdditionalNodeNetworkConfig; + })(); + + v1.AdditionalPodNetworkConfig = (function() { + + /** + * Properties of an AdditionalPodNetworkConfig. + * @memberof google.container.v1 + * @interface IAdditionalPodNetworkConfig + * @property {string|null} [subnetwork] AdditionalPodNetworkConfig subnetwork + * @property {string|null} [secondaryPodRange] AdditionalPodNetworkConfig secondaryPodRange + * @property {google.container.v1.IMaxPodsConstraint|null} [maxPodsPerNode] AdditionalPodNetworkConfig maxPodsPerNode + */ + + /** + * Constructs a new AdditionalPodNetworkConfig. + * @memberof google.container.v1 + * @classdesc Represents an AdditionalPodNetworkConfig. + * @implements IAdditionalPodNetworkConfig + * @constructor + * @param {google.container.v1.IAdditionalPodNetworkConfig=} [properties] Properties to set + */ + function AdditionalPodNetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalPodNetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.subnetwork = ""; + + /** + * AdditionalPodNetworkConfig secondaryPodRange. + * @member {string} secondaryPodRange + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.secondaryPodRange = ""; + + /** + * AdditionalPodNetworkConfig maxPodsPerNode. + * @member {google.container.v1.IMaxPodsConstraint|null|undefined} maxPodsPerNode + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.maxPodsPerNode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdditionalPodNetworkConfig _maxPodsPerNode. + * @member {"maxPodsPerNode"|undefined} _maxPodsPerNode + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @instance + */ + Object.defineProperty(AdditionalPodNetworkConfig.prototype, "_maxPodsPerNode", { + get: $util.oneOfGetter($oneOfFields = ["maxPodsPerNode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdditionalPodNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1.IAdditionalPodNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig instance + */ + AdditionalPodNetworkConfig.create = function create(properties) { + return new AdditionalPodNetworkConfig(properties); + }; + + /** + * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.secondaryPodRange != null && Object.hasOwnProperty.call(message, "secondaryPodRange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryPodRange); + if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) + $root.google.container.v1.MaxPodsConstraint.encode(message.maxPodsPerNode, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalPodNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 2: { + message.secondaryPodRange = reader.string(); + break; + } + case 3: { + message.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalPodNetworkConfig message. + * @function verify + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalPodNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) + if (!$util.isString(message.secondaryPodRange)) + return "secondaryPodRange: string expected"; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { + properties._maxPodsPerNode = 1; + { + var error = $root.google.container.v1.MaxPodsConstraint.verify(message.maxPodsPerNode); + if (error) + return "maxPodsPerNode." + error; + } + } + return null; + }; + + /** + * Creates an AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + */ + AdditionalPodNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdditionalPodNetworkConfig) + return object; + var message = new $root.google.container.v1.AdditionalPodNetworkConfig(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.secondaryPodRange != null) + message.secondaryPodRange = String(object.secondaryPodRange); + if (object.maxPodsPerNode != null) { + if (typeof object.maxPodsPerNode !== "object") + throw TypeError(".google.container.v1.AdditionalPodNetworkConfig.maxPodsPerNode: object expected"); + message.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.fromObject(object.maxPodsPerNode); + } + return message; + }; + + /** + * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1.AdditionalPodNetworkConfig} message AdditionalPodNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalPodNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subnetwork = ""; + object.secondaryPodRange = ""; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) + object.secondaryPodRange = message.secondaryPodRange; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { + object.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.toObject(message.maxPodsPerNode, options); + if (options.oneofs) + object._maxPodsPerNode = "maxPodsPerNode"; + } + return object; + }; + + /** + * Converts this AdditionalPodNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalPodNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalPodNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1.AdditionalPodNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalPodNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdditionalPodNetworkConfig"; + }; + + return AdditionalPodNetworkConfig; + })(); + + v1.ShieldedInstanceConfig = (function() { + + /** + * Properties of a ShieldedInstanceConfig. + * @memberof google.container.v1 + * @interface IShieldedInstanceConfig + * @property {boolean|null} [enableSecureBoot] ShieldedInstanceConfig enableSecureBoot + * @property {boolean|null} [enableIntegrityMonitoring] ShieldedInstanceConfig enableIntegrityMonitoring + */ + + /** + * Constructs a new ShieldedInstanceConfig. + * @memberof google.container.v1 + * @classdesc Represents a ShieldedInstanceConfig. + * @implements IShieldedInstanceConfig + * @constructor + * @param {google.container.v1.IShieldedInstanceConfig=} [properties] Properties to set + */ + function ShieldedInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShieldedInstanceConfig enableSecureBoot. + * @member {boolean} enableSecureBoot + * @memberof google.container.v1.ShieldedInstanceConfig + * @instance + */ + ShieldedInstanceConfig.prototype.enableSecureBoot = false; + + /** + * ShieldedInstanceConfig enableIntegrityMonitoring. + * @member {boolean} enableIntegrityMonitoring + * @memberof google.container.v1.ShieldedInstanceConfig + * @instance + */ + ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = false; + + /** + * Creates a new ShieldedInstanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {google.container.v1.IShieldedInstanceConfig=} [properties] Properties to set + * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig instance + */ + ShieldedInstanceConfig.create = function create(properties) { + return new ShieldedInstanceConfig(properties); + }; + + /** + * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {google.container.v1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableSecureBoot != null && Object.hasOwnProperty.call(message, "enableSecureBoot")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSecureBoot); + if (message.enableIntegrityMonitoring != null && Object.hasOwnProperty.call(message, "enableIntegrityMonitoring")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableIntegrityMonitoring); + return writer; + }; + + /** + * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {google.container.v1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedInstanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ShieldedInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableSecureBoot = reader.bool(); + break; + } + case 2: { + message.enableIntegrityMonitoring = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShieldedInstanceConfig message. + * @function verify + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShieldedInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + if (typeof message.enableSecureBoot !== "boolean") + return "enableSecureBoot: boolean expected"; + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + if (typeof message.enableIntegrityMonitoring !== "boolean") + return "enableIntegrityMonitoring: boolean expected"; + return null; + }; + + /** + * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig + */ + ShieldedInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ShieldedInstanceConfig) + return object; + var message = new $root.google.container.v1.ShieldedInstanceConfig(); + if (object.enableSecureBoot != null) + message.enableSecureBoot = Boolean(object.enableSecureBoot); + if (object.enableIntegrityMonitoring != null) + message.enableIntegrityMonitoring = Boolean(object.enableIntegrityMonitoring); + return message; + }; + + /** + * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {google.container.v1.ShieldedInstanceConfig} message ShieldedInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShieldedInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableSecureBoot = false; + object.enableIntegrityMonitoring = false; + } + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + object.enableSecureBoot = message.enableSecureBoot; + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + object.enableIntegrityMonitoring = message.enableIntegrityMonitoring; + return object; + }; + + /** + * Converts this ShieldedInstanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ShieldedInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ShieldedInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShieldedInstanceConfig + * @function getTypeUrl + * @memberof google.container.v1.ShieldedInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShieldedInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ShieldedInstanceConfig"; + }; + + return ShieldedInstanceConfig; + })(); + + v1.SandboxConfig = (function() { + + /** + * Properties of a SandboxConfig. + * @memberof google.container.v1 + * @interface ISandboxConfig + * @property {google.container.v1.SandboxConfig.Type|null} [type] SandboxConfig type + */ + + /** + * Constructs a new SandboxConfig. + * @memberof google.container.v1 + * @classdesc Represents a SandboxConfig. + * @implements ISandboxConfig + * @constructor + * @param {google.container.v1.ISandboxConfig=} [properties] Properties to set + */ + function SandboxConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SandboxConfig type. + * @member {google.container.v1.SandboxConfig.Type} type + * @memberof google.container.v1.SandboxConfig + * @instance + */ + SandboxConfig.prototype.type = 0; + + /** + * Creates a new SandboxConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SandboxConfig + * @static + * @param {google.container.v1.ISandboxConfig=} [properties] Properties to set + * @returns {google.container.v1.SandboxConfig} SandboxConfig instance + */ + SandboxConfig.create = function create(properties) { + return new SandboxConfig(properties); + }; + + /** + * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SandboxConfig + * @static + * @param {google.container.v1.ISandboxConfig} message SandboxConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SandboxConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SandboxConfig + * @static + * @param {google.container.v1.ISandboxConfig} message SandboxConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SandboxConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SandboxConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SandboxConfig} SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SandboxConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SandboxConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SandboxConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SandboxConfig} SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SandboxConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SandboxConfig message. + * @function verify + * @memberof google.container.v1.SandboxConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SandboxConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SandboxConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SandboxConfig} SandboxConfig + */ + SandboxConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SandboxConfig) + return object; + var message = new $root.google.container.v1.SandboxConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.type = 0; + break; + case "GVISOR": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SandboxConfig + * @static + * @param {google.container.v1.SandboxConfig} message SandboxConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SandboxConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1.SandboxConfig.Type[message.type] === undefined ? message.type : $root.google.container.v1.SandboxConfig.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this SandboxConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SandboxConfig + * @instance + * @returns {Object.} JSON object + */ + SandboxConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SandboxConfig + * @function getTypeUrl + * @memberof google.container.v1.SandboxConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SandboxConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SandboxConfig"; + }; + + /** + * Type enum. + * @name google.container.v1.SandboxConfig.Type + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} GVISOR=1 GVISOR value + */ + SandboxConfig.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "GVISOR"] = 1; + return values; + })(); + + return SandboxConfig; + })(); + + v1.GcfsConfig = (function() { + + /** + * Properties of a GcfsConfig. + * @memberof google.container.v1 + * @interface IGcfsConfig + * @property {boolean|null} [enabled] GcfsConfig enabled + */ + + /** + * Constructs a new GcfsConfig. + * @memberof google.container.v1 + * @classdesc Represents a GcfsConfig. + * @implements IGcfsConfig + * @constructor + * @param {google.container.v1.IGcfsConfig=} [properties] Properties to set + */ + function GcfsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcfsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.GcfsConfig + * @instance + */ + GcfsConfig.prototype.enabled = false; + + /** + * Creates a new GcfsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GcfsConfig + * @static + * @param {google.container.v1.IGcfsConfig=} [properties] Properties to set + * @returns {google.container.v1.GcfsConfig} GcfsConfig instance + */ + GcfsConfig.create = function create(properties) { + return new GcfsConfig(properties); + }; + + /** + * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GcfsConfig + * @static + * @param {google.container.v1.IGcfsConfig} message GcfsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcfsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GcfsConfig + * @static + * @param {google.container.v1.IGcfsConfig} message GcfsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcfsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GcfsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GcfsConfig} GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcfsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcfsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GcfsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GcfsConfig} GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcfsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcfsConfig message. + * @function verify + * @memberof google.container.v1.GcfsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcfsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GcfsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GcfsConfig} GcfsConfig + */ + GcfsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GcfsConfig) + return object; + var message = new $root.google.container.v1.GcfsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GcfsConfig + * @static + * @param {google.container.v1.GcfsConfig} message GcfsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcfsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcfsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GcfsConfig + * @instance + * @returns {Object.} JSON object + */ + GcfsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcfsConfig + * @function getTypeUrl + * @memberof google.container.v1.GcfsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcfsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GcfsConfig"; + }; + + return GcfsConfig; + })(); + + v1.ReservationAffinity = (function() { + + /** + * Properties of a ReservationAffinity. + * @memberof google.container.v1 + * @interface IReservationAffinity + * @property {google.container.v1.ReservationAffinity.Type|null} [consumeReservationType] ReservationAffinity consumeReservationType + * @property {string|null} [key] ReservationAffinity key + * @property {Array.|null} [values] ReservationAffinity values + */ + + /** + * Constructs a new ReservationAffinity. + * @memberof google.container.v1 + * @classdesc Represents a ReservationAffinity. + * @implements IReservationAffinity + * @constructor + * @param {google.container.v1.IReservationAffinity=} [properties] Properties to set + */ + function ReservationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservationAffinity consumeReservationType. + * @member {google.container.v1.ReservationAffinity.Type} consumeReservationType + * @memberof google.container.v1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.consumeReservationType = 0; + + /** + * ReservationAffinity key. + * @member {string} key + * @memberof google.container.v1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.key = ""; + + /** + * ReservationAffinity values. + * @member {Array.} values + * @memberof google.container.v1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.values = $util.emptyArray; + + /** + * Creates a new ReservationAffinity instance using the specified properties. + * @function create + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {google.container.v1.IReservationAffinity=} [properties] Properties to set + * @returns {google.container.v1.ReservationAffinity} ReservationAffinity instance + */ + ReservationAffinity.create = function create(properties) { + return new ReservationAffinity(properties); + }; + + /** + * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {google.container.v1.IReservationAffinity} message ReservationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeReservationType != null && Object.hasOwnProperty.call(message, "consumeReservationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeReservationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {google.container.v1.IReservationAffinity} message ReservationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ReservationAffinity} ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservationAffinity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ReservationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeReservationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ReservationAffinity} ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservationAffinity message. + * @function verify + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) + switch (message.consumeReservationType) { + default: + return "consumeReservationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ReservationAffinity} ReservationAffinity + */ + ReservationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ReservationAffinity) + return object; + var message = new $root.google.container.v1.ReservationAffinity(); + switch (object.consumeReservationType) { + default: + if (typeof object.consumeReservationType === "number") { + message.consumeReservationType = object.consumeReservationType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.consumeReservationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeReservationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeReservationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeReservationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.container.v1.ReservationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {google.container.v1.ReservationAffinity} message ReservationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.consumeReservationType = options.enums === String ? "UNSPECIFIED" : 0; + object.key = ""; + } + if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) + object.consumeReservationType = options.enums === String ? $root.google.container.v1.ReservationAffinity.Type[message.consumeReservationType] === undefined ? message.consumeReservationType : $root.google.container.v1.ReservationAffinity.Type[message.consumeReservationType] : message.consumeReservationType; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this ReservationAffinity to JSON. + * @function toJSON + * @memberof google.container.v1.ReservationAffinity + * @instance + * @returns {Object.} JSON object + */ + ReservationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservationAffinity + * @function getTypeUrl + * @memberof google.container.v1.ReservationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ReservationAffinity"; + }; + + /** + * Type enum. + * @name google.container.v1.ReservationAffinity.Type + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + ReservationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return ReservationAffinity; + })(); + + v1.SoleTenantConfig = (function() { + + /** + * Properties of a SoleTenantConfig. + * @memberof google.container.v1 + * @interface ISoleTenantConfig + * @property {Array.|null} [nodeAffinities] SoleTenantConfig nodeAffinities + */ + + /** + * Constructs a new SoleTenantConfig. + * @memberof google.container.v1 + * @classdesc Represents a SoleTenantConfig. + * @implements ISoleTenantConfig + * @constructor + * @param {google.container.v1.ISoleTenantConfig=} [properties] Properties to set + */ + function SoleTenantConfig(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoleTenantConfig nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.container.v1.SoleTenantConfig + * @instance + */ + SoleTenantConfig.prototype.nodeAffinities = $util.emptyArray; + + /** + * Creates a new SoleTenantConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {google.container.v1.ISoleTenantConfig=} [properties] Properties to set + * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig instance + */ + SoleTenantConfig.create = function create(properties) { + return new SoleTenantConfig(properties); + }; + + /** + * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {google.container.v1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.container.v1.SoleTenantConfig.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {google.container.v1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SoleTenantConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.container.v1.SoleTenantConfig.NodeAffinity.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoleTenantConfig message. + * @function verify + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoleTenantConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.container.v1.SoleTenantConfig.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + return null; + }; + + /** + * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig + */ + SoleTenantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SoleTenantConfig) + return object; + var message = new $root.google.container.v1.SoleTenantConfig(); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.container.v1.SoleTenantConfig.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.container.v1.SoleTenantConfig.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {google.container.v1.SoleTenantConfig} message SoleTenantConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoleTenantConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + return object; + }; + + /** + * Converts this SoleTenantConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SoleTenantConfig + * @instance + * @returns {Object.} JSON object + */ + SoleTenantConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoleTenantConfig + * @function getTypeUrl + * @memberof google.container.v1.SoleTenantConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoleTenantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SoleTenantConfig"; + }; + + SoleTenantConfig.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.container.v1.SoleTenantConfig + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.container.v1.SoleTenantConfig.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.container.v1.SoleTenantConfig + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.container.v1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string} key + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = ""; + + /** + * NodeAffinity operator. + * @member {google.container.v1.SoleTenantConfig.NodeAffinity.Operator} operator + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = 0; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set + * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.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.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SoleTenantConfig.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.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.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SoleTenantConfig.NodeAffinity) + return object; + var message = new $root.google.container.v1.SoleTenantConfig.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.container.v1.SoleTenantConfig.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1.SoleTenantConfig.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.key = ""; + object.operator = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.google.container.v1.SoleTenantConfig.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.container.v1.SoleTenantConfig.NodeAffinity.Operator[message.operator] : message.operator; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.container.v1.SoleTenantConfig.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SoleTenantConfig.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.container.v1.SoleTenantConfig.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + return SoleTenantConfig; + })(); + + v1.ContainerdConfig = (function() { + + /** + * Properties of a ContainerdConfig. + * @memberof google.container.v1 + * @interface IContainerdConfig + * @property {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null} [privateRegistryAccessConfig] ContainerdConfig privateRegistryAccessConfig + */ + + /** + * Constructs a new ContainerdConfig. + * @memberof google.container.v1 + * @classdesc Represents a ContainerdConfig. + * @implements IContainerdConfig + * @constructor + * @param {google.container.v1.IContainerdConfig=} [properties] Properties to set + */ + function ContainerdConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerdConfig privateRegistryAccessConfig. + * @member {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null|undefined} privateRegistryAccessConfig + * @memberof google.container.v1.ContainerdConfig + * @instance + */ + ContainerdConfig.prototype.privateRegistryAccessConfig = null; + + /** + * Creates a new ContainerdConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {google.container.v1.IContainerdConfig=} [properties] Properties to set + * @returns {google.container.v1.ContainerdConfig} ContainerdConfig instance + */ + ContainerdConfig.create = function create(properties) { + return new ContainerdConfig(properties); + }; + + /** + * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {google.container.v1.IContainerdConfig} message ContainerdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerdConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateRegistryAccessConfig != null && Object.hasOwnProperty.call(message, "privateRegistryAccessConfig")) + $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.encode(message.privateRegistryAccessConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {google.container.v1.IContainerdConfig} message ContainerdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerdConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ContainerdConfig} ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerdConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ContainerdConfig} ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerdConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerdConfig message. + * @function verify + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerdConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) { + var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify(message.privateRegistryAccessConfig); + if (error) + return "privateRegistryAccessConfig." + error; + } + return null; + }; + + /** + * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ContainerdConfig} ContainerdConfig + */ + ContainerdConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ContainerdConfig) + return object; + var message = new $root.google.container.v1.ContainerdConfig(); + if (object.privateRegistryAccessConfig != null) { + if (typeof object.privateRegistryAccessConfig !== "object") + throw TypeError(".google.container.v1.ContainerdConfig.privateRegistryAccessConfig: object expected"); + message.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.fromObject(object.privateRegistryAccessConfig); + } + return message; + }; + + /** + * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {google.container.v1.ContainerdConfig} message ContainerdConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerdConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.privateRegistryAccessConfig = null; + if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) + object.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.toObject(message.privateRegistryAccessConfig, options); + return object; + }; + + /** + * Converts this ContainerdConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ContainerdConfig + * @instance + * @returns {Object.} JSON object + */ + ContainerdConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContainerdConfig + * @function getTypeUrl + * @memberof google.container.v1.ContainerdConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ContainerdConfig"; + }; + + ContainerdConfig.PrivateRegistryAccessConfig = (function() { + + /** + * Properties of a PrivateRegistryAccessConfig. + * @memberof google.container.v1.ContainerdConfig + * @interface IPrivateRegistryAccessConfig + * @property {boolean|null} [enabled] PrivateRegistryAccessConfig enabled + * @property {Array.|null} [certificateAuthorityDomainConfig] PrivateRegistryAccessConfig certificateAuthorityDomainConfig + */ + + /** + * Constructs a new PrivateRegistryAccessConfig. + * @memberof google.container.v1.ContainerdConfig + * @classdesc Represents a PrivateRegistryAccessConfig. + * @implements IPrivateRegistryAccessConfig + * @constructor + * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set + */ + function PrivateRegistryAccessConfig(properties) { + this.certificateAuthorityDomainConfig = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateRegistryAccessConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + */ + PrivateRegistryAccessConfig.prototype.enabled = false; + + /** + * PrivateRegistryAccessConfig certificateAuthorityDomainConfig. + * @member {Array.} certificateAuthorityDomainConfig + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + */ + PrivateRegistryAccessConfig.prototype.certificateAuthorityDomainConfig = $util.emptyArray; + + /** + * Creates a new PrivateRegistryAccessConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig instance + */ + PrivateRegistryAccessConfig.create = function create(properties) { + return new PrivateRegistryAccessConfig(properties); + }; + + /** + * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateRegistryAccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.certificateAuthorityDomainConfig != null && message.certificateAuthorityDomainConfig.length) + for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) + $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.encode(message.certificateAuthorityDomainConfig[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateRegistryAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateRegistryAccessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length)) + message.certificateAuthorityDomainConfig = []; + message.certificateAuthorityDomainConfig.push($root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateRegistryAccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateRegistryAccessConfig message. + * @function verify + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateRegistryAccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.certificateAuthorityDomainConfig != null && message.hasOwnProperty("certificateAuthorityDomainConfig")) { + if (!Array.isArray(message.certificateAuthorityDomainConfig)) + return "certificateAuthorityDomainConfig: array expected"; + for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) { + var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify(message.certificateAuthorityDomainConfig[i]); + if (error) + return "certificateAuthorityDomainConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + */ + PrivateRegistryAccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) + return object; + var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.certificateAuthorityDomainConfig) { + if (!Array.isArray(object.certificateAuthorityDomainConfig)) + throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: array expected"); + message.certificateAuthorityDomainConfig = []; + for (var i = 0; i < object.certificateAuthorityDomainConfig.length; ++i) { + if (typeof object.certificateAuthorityDomainConfig[i] !== "object") + throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: object expected"); + message.certificateAuthorityDomainConfig[i] = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fromObject(object.certificateAuthorityDomainConfig[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} message PrivateRegistryAccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateRegistryAccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.certificateAuthorityDomainConfig = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length) { + object.certificateAuthorityDomainConfig = []; + for (var j = 0; j < message.certificateAuthorityDomainConfig.length; ++j) + object.certificateAuthorityDomainConfig[j] = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.toObject(message.certificateAuthorityDomainConfig[j], options); + } + return object; + }; + + /** + * Converts this PrivateRegistryAccessConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateRegistryAccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateRegistryAccessConfig + * @function getTypeUrl + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateRegistryAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"; + }; + + PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig = (function() { + + /** + * Properties of a CertificateAuthorityDomainConfig. + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @interface ICertificateAuthorityDomainConfig + * @property {Array.|null} [fqdns] CertificateAuthorityDomainConfig fqdns + * @property {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null} [gcpSecretManagerCertificateConfig] CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig + */ + + /** + * Constructs a new CertificateAuthorityDomainConfig. + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig + * @classdesc Represents a CertificateAuthorityDomainConfig. + * @implements ICertificateAuthorityDomainConfig + * @constructor + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set + */ + function CertificateAuthorityDomainConfig(properties) { + this.fqdns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthorityDomainConfig fqdns. + * @member {Array.} fqdns + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + CertificateAuthorityDomainConfig.prototype.fqdns = $util.emptyArray; + + /** + * CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. + * @member {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null|undefined} gcpSecretManagerCertificateConfig + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + CertificateAuthorityDomainConfig.prototype.gcpSecretManagerCertificateConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateAuthorityDomainConfig certificateConfig. + * @member {"gcpSecretManagerCertificateConfig"|undefined} certificateConfig + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + Object.defineProperty(CertificateAuthorityDomainConfig.prototype, "certificateConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpSecretManagerCertificateConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig instance + */ + CertificateAuthorityDomainConfig.create = function create(properties) { + return new CertificateAuthorityDomainConfig(properties); + }; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityDomainConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fqdns != null && message.fqdns.length) + for (var i = 0; i < message.fqdns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fqdns[i]); + if (message.gcpSecretManagerCertificateConfig != null && Object.hasOwnProperty.call(message, "gcpSecretManagerCertificateConfig")) + $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.encode(message.gcpSecretManagerCertificateConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityDomainConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityDomainConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.fqdns && message.fqdns.length)) + message.fqdns = []; + message.fqdns.push(reader.string()); + break; + } + case 2: { + message.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityDomainConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateAuthorityDomainConfig message. + * @function verify + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateAuthorityDomainConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fqdns != null && message.hasOwnProperty("fqdns")) { + if (!Array.isArray(message.fqdns)) + return "fqdns: array expected"; + for (var i = 0; i < message.fqdns.length; ++i) + if (!$util.isString(message.fqdns[i])) + return "fqdns: string[] expected"; + } + if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { + properties.certificateConfig = 1; + { + var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify(message.gcpSecretManagerCertificateConfig); + if (error) + return "gcpSecretManagerCertificateConfig." + error; + } + } + return null; + }; + + /** + * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + */ + CertificateAuthorityDomainConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + return object; + var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); + if (object.fqdns) { + if (!Array.isArray(object.fqdns)) + throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fqdns: array expected"); + message.fqdns = []; + for (var i = 0; i < object.fqdns.length; ++i) + message.fqdns[i] = String(object.fqdns[i]); + } + if (object.gcpSecretManagerCertificateConfig != null) { + if (typeof object.gcpSecretManagerCertificateConfig !== "object") + throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig: object expected"); + message.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.fromObject(object.gcpSecretManagerCertificateConfig); + } + return message; + }; + + /** + * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateAuthorityDomainConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fqdns = []; + if (message.fqdns && message.fqdns.length) { + object.fqdns = []; + for (var j = 0; j < message.fqdns.length; ++j) + object.fqdns[j] = message.fqdns[j]; + } + if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { + object.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.toObject(message.gcpSecretManagerCertificateConfig, options); + if (options.oneofs) + object.certificateConfig = "gcpSecretManagerCertificateConfig"; + } + return object; + }; + + /** + * Converts this CertificateAuthorityDomainConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + * @returns {Object.} JSON object + */ + CertificateAuthorityDomainConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CertificateAuthorityDomainConfig + * @function getTypeUrl + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateAuthorityDomainConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"; + }; + + CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig = (function() { + + /** + * Properties of a GCPSecretManagerCertificateConfig. + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @interface IGCPSecretManagerCertificateConfig + * @property {string|null} [secretUri] GCPSecretManagerCertificateConfig secretUri + */ + + /** + * Constructs a new GCPSecretManagerCertificateConfig. + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @classdesc Represents a GCPSecretManagerCertificateConfig. + * @implements IGCPSecretManagerCertificateConfig + * @constructor + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set + */ + function GCPSecretManagerCertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPSecretManagerCertificateConfig secretUri. + * @member {string} secretUri + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @instance + */ + GCPSecretManagerCertificateConfig.prototype.secretUri = ""; + + /** + * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig instance + */ + GCPSecretManagerCertificateConfig.create = function create(properties) { + return new GCPSecretManagerCertificateConfig(properties); + }; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPSecretManagerCertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secretUri != null && Object.hasOwnProperty.call(message, "secretUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretUri); + return writer; + }; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPSecretManagerCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPSecretManagerCertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.secretUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPSecretManagerCertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPSecretManagerCertificateConfig message. + * @function verify + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPSecretManagerCertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.secretUri != null && message.hasOwnProperty("secretUri")) + if (!$util.isString(message.secretUri)) + return "secretUri: string expected"; + return null; + }; + + /** + * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + */ + GCPSecretManagerCertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + return object; + var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); + if (object.secretUri != null) + message.secretUri = String(object.secretUri); + return message; + }; + + /** + * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPSecretManagerCertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.secretUri = ""; + if (message.secretUri != null && message.hasOwnProperty("secretUri")) + object.secretUri = message.secretUri; + return object; + }; + + /** + * Converts this GCPSecretManagerCertificateConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @instance + * @returns {Object.} JSON object + */ + GCPSecretManagerCertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPSecretManagerCertificateConfig + * @function getTypeUrl + * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPSecretManagerCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"; + }; + + return GCPSecretManagerCertificateConfig; + })(); + + return CertificateAuthorityDomainConfig; + })(); + + return PrivateRegistryAccessConfig; + })(); + + return ContainerdConfig; + })(); + + v1.NodeTaint = (function() { + + /** + * Properties of a NodeTaint. + * @memberof google.container.v1 + * @interface INodeTaint + * @property {string|null} [key] NodeTaint key + * @property {string|null} [value] NodeTaint value + * @property {google.container.v1.NodeTaint.Effect|null} [effect] NodeTaint effect + */ + + /** + * Constructs a new NodeTaint. + * @memberof google.container.v1 + * @classdesc Represents a NodeTaint. + * @implements INodeTaint + * @constructor + * @param {google.container.v1.INodeTaint=} [properties] Properties to set + */ + function NodeTaint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeTaint key. + * @member {string} key + * @memberof google.container.v1.NodeTaint + * @instance + */ + NodeTaint.prototype.key = ""; + + /** + * NodeTaint value. + * @member {string} value + * @memberof google.container.v1.NodeTaint + * @instance + */ + NodeTaint.prototype.value = ""; + + /** + * NodeTaint effect. + * @member {google.container.v1.NodeTaint.Effect} effect + * @memberof google.container.v1.NodeTaint + * @instance + */ + NodeTaint.prototype.effect = 0; + + /** + * Creates a new NodeTaint instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeTaint + * @static + * @param {google.container.v1.INodeTaint=} [properties] Properties to set + * @returns {google.container.v1.NodeTaint} NodeTaint instance + */ + NodeTaint.create = function create(properties) { + return new NodeTaint(properties); + }; + + /** + * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1.NodeTaint.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeTaint + * @static + * @param {google.container.v1.INodeTaint} message NodeTaint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaint.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); + return writer; + }; + + /** + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1.NodeTaint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeTaint + * @static + * @param {google.container.v1.INodeTaint} message NodeTaint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeTaint message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeTaint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeTaint} NodeTaint + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeTaint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.effect = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeTaint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeTaint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeTaint} NodeTaint + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeTaint message. + * @function verify + * @memberof google.container.v1.NodeTaint + * @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) { + 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; + } + return null; + }; + + /** + * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeTaint + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeTaint} NodeTaint + */ + NodeTaint.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeTaint) + return object; + var message = new $root.google.container.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; + } + return message; + }; + + /** + * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeTaint + * @static + * @param {google.container.v1.NodeTaint} message NodeTaint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeTaint.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; + } + 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.container.v1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.container.v1.NodeTaint.Effect[message.effect] : message.effect; + return object; + }; + + /** + * Converts this NodeTaint to JSON. + * @function toJSON + * @memberof google.container.v1.NodeTaint + * @instance + * @returns {Object.} JSON object + */ + NodeTaint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeTaint + * @function getTypeUrl + * @memberof google.container.v1.NodeTaint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeTaint"; + }; + + /** + * Effect enum. + * @name google.container.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.NodeTaints = (function() { + + /** + * Properties of a NodeTaints. + * @memberof google.container.v1 + * @interface INodeTaints + * @property {Array.|null} [taints] NodeTaints taints + */ + + /** + * Constructs a new NodeTaints. + * @memberof google.container.v1 + * @classdesc Represents a NodeTaints. + * @implements INodeTaints + * @constructor + * @param {google.container.v1.INodeTaints=} [properties] Properties to set + */ + function NodeTaints(properties) { + this.taints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeTaints taints. + * @member {Array.} taints + * @memberof google.container.v1.NodeTaints + * @instance + */ + NodeTaints.prototype.taints = $util.emptyArray; + + /** + * Creates a new NodeTaints instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeTaints + * @static + * @param {google.container.v1.INodeTaints=} [properties] Properties to set + * @returns {google.container.v1.NodeTaints} NodeTaints instance + */ + NodeTaints.create = function create(properties) { + return new NodeTaints(properties); + }; + + /** + * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeTaints + * @static + * @param {google.container.v1.INodeTaints} message NodeTaints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.container.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeTaints + * @static + * @param {google.container.v1.INodeTaints} message NodeTaints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeTaints message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeTaints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeTaints} NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeTaints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeTaints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.container.v1.NodeTaint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeTaints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeTaints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeTaints} NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeTaints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeTaints message. + * @function verify + * @memberof google.container.v1.NodeTaints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeTaints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.container.v1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + return null; + }; + + /** + * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeTaints + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeTaints} NodeTaints + */ + NodeTaints.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeTaints) + return object; + var message = new $root.google.container.v1.NodeTaints(); + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.container.v1.NodeTaints.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.container.v1.NodeTaints.taints: object expected"); + message.taints[i] = $root.google.container.v1.NodeTaint.fromObject(object.taints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeTaints + * @static + * @param {google.container.v1.NodeTaints} message NodeTaints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeTaints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.taints = []; + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.container.v1.NodeTaint.toObject(message.taints[j], options); + } + return object; + }; + + /** + * Converts this NodeTaints to JSON. + * @function toJSON + * @memberof google.container.v1.NodeTaints + * @instance + * @returns {Object.} JSON object + */ + NodeTaints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeTaints + * @function getTypeUrl + * @memberof google.container.v1.NodeTaints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeTaints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeTaints"; + }; + + return NodeTaints; + })(); + + v1.NodeLabels = (function() { + + /** + * Properties of a NodeLabels. + * @memberof google.container.v1 + * @interface INodeLabels + * @property {Object.|null} [labels] NodeLabels labels + */ + + /** + * Constructs a new NodeLabels. + * @memberof google.container.v1 + * @classdesc Represents a NodeLabels. + * @implements INodeLabels + * @constructor + * @param {google.container.v1.INodeLabels=} [properties] Properties to set + */ + function NodeLabels(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeLabels labels. + * @member {Object.} labels + * @memberof google.container.v1.NodeLabels + * @instance + */ + NodeLabels.prototype.labels = $util.emptyObject; + + /** + * Creates a new NodeLabels instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeLabels + * @static + * @param {google.container.v1.INodeLabels=} [properties] Properties to set + * @returns {google.container.v1.NodeLabels} NodeLabels instance + */ + NodeLabels.create = function create(properties) { + return new NodeLabels(properties); + }; + + /** + * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeLabels + * @static + * @param {google.container.v1.INodeLabels} message NodeLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeLabels.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeLabels + * @static + * @param {google.container.v1.INodeLabels} message NodeLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeLabels.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeLabels message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeLabels} NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeLabels.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeLabels(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeLabels message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeLabels} NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeLabels.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeLabels message. + * @function verify + * @memberof google.container.v1.NodeLabels + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeLabels.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeLabels + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeLabels} NodeLabels + */ + NodeLabels.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeLabels) + return object; + var message = new $root.google.container.v1.NodeLabels(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1.NodeLabels.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 a NodeLabels message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeLabels + * @static + * @param {google.container.v1.NodeLabels} message NodeLabels + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeLabels.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this NodeLabels to JSON. + * @function toJSON + * @memberof google.container.v1.NodeLabels + * @instance + * @returns {Object.} JSON object + */ + NodeLabels.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeLabels + * @function getTypeUrl + * @memberof google.container.v1.NodeLabels + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeLabels"; + }; + + return NodeLabels; + })(); + + v1.ResourceLabels = (function() { + + /** + * Properties of a ResourceLabels. + * @memberof google.container.v1 + * @interface IResourceLabels + * @property {Object.|null} [labels] ResourceLabels labels + */ + + /** + * Constructs a new ResourceLabels. + * @memberof google.container.v1 + * @classdesc Represents a ResourceLabels. + * @implements IResourceLabels + * @constructor + * @param {google.container.v1.IResourceLabels=} [properties] Properties to set + */ + function ResourceLabels(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceLabels labels. + * @member {Object.} labels + * @memberof google.container.v1.ResourceLabels + * @instance + */ + ResourceLabels.prototype.labels = $util.emptyObject; + + /** + * Creates a new ResourceLabels instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceLabels + * @static + * @param {google.container.v1.IResourceLabels=} [properties] Properties to set + * @returns {google.container.v1.ResourceLabels} ResourceLabels instance + */ + ResourceLabels.create = function create(properties) { + return new ResourceLabels(properties); + }; + + /** + * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceLabels + * @static + * @param {google.container.v1.IResourceLabels} message ResourceLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLabels.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceLabels + * @static + * @param {google.container.v1.IResourceLabels} message ResourceLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLabels.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceLabels} ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLabels.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceLabels(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceLabels} ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLabels.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceLabels message. + * @function verify + * @memberof google.container.v1.ResourceLabels + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLabels.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceLabels + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceLabels} ResourceLabels + */ + ResourceLabels.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceLabels) + return object; + var message = new $root.google.container.v1.ResourceLabels(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1.ResourceLabels.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 a ResourceLabels message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceLabels + * @static + * @param {google.container.v1.ResourceLabels} message ResourceLabels + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLabels.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this ResourceLabels to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceLabels + * @instance + * @returns {Object.} JSON object + */ + ResourceLabels.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceLabels + * @function getTypeUrl + * @memberof google.container.v1.ResourceLabels + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceLabels"; + }; + + return ResourceLabels; + })(); + + v1.NetworkTags = (function() { + + /** + * Properties of a NetworkTags. + * @memberof google.container.v1 + * @interface INetworkTags + * @property {Array.|null} [tags] NetworkTags tags + */ + + /** + * Constructs a new NetworkTags. + * @memberof google.container.v1 + * @classdesc Represents a NetworkTags. + * @implements INetworkTags + * @constructor + * @param {google.container.v1.INetworkTags=} [properties] Properties to set + */ + function NetworkTags(properties) { + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkTags tags. + * @member {Array.} tags + * @memberof google.container.v1.NetworkTags + * @instance + */ + NetworkTags.prototype.tags = $util.emptyArray; + + /** + * Creates a new NetworkTags instance using the specified properties. + * @function create + * @memberof google.container.v1.NetworkTags + * @static + * @param {google.container.v1.INetworkTags=} [properties] Properties to set + * @returns {google.container.v1.NetworkTags} NetworkTags instance + */ + NetworkTags.create = function create(properties) { + return new NetworkTags(properties); + }; + + /** + * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NetworkTags + * @static + * @param {google.container.v1.INetworkTags} message NetworkTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkTags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tags[i]); + return writer; + }; + + /** + * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NetworkTags + * @static + * @param {google.container.v1.INetworkTags} message NetworkTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkTags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkTags message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NetworkTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NetworkTags} NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkTags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkTags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkTags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NetworkTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NetworkTags} NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkTags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkTags message. + * @function verify + * @memberof google.container.v1.NetworkTags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkTags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + return null; + }; + + /** + * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NetworkTags + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NetworkTags} NetworkTags + */ + NetworkTags.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NetworkTags) + return object; + var message = new $root.google.container.v1.NetworkTags(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.container.v1.NetworkTags.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + return message; + }; + + /** + * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NetworkTags + * @static + * @param {google.container.v1.NetworkTags} message NetworkTags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkTags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + return object; + }; + + /** + * Converts this NetworkTags to JSON. + * @function toJSON + * @memberof google.container.v1.NetworkTags + * @instance + * @returns {Object.} JSON object + */ + NetworkTags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkTags + * @function getTypeUrl + * @memberof google.container.v1.NetworkTags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NetworkTags"; + }; + + return NetworkTags; + })(); + + v1.MasterAuth = (function() { + + /** + * Properties of a MasterAuth. + * @memberof google.container.v1 + * @interface IMasterAuth + * @property {string|null} [username] MasterAuth username + * @property {string|null} [password] MasterAuth password + * @property {google.container.v1.IClientCertificateConfig|null} [clientCertificateConfig] MasterAuth clientCertificateConfig + * @property {string|null} [clusterCaCertificate] MasterAuth clusterCaCertificate + * @property {string|null} [clientCertificate] MasterAuth clientCertificate + * @property {string|null} [clientKey] MasterAuth clientKey + */ + + /** + * Constructs a new MasterAuth. + * @memberof google.container.v1 + * @classdesc Represents a MasterAuth. + * @implements IMasterAuth + * @constructor + * @param {google.container.v1.IMasterAuth=} [properties] Properties to set + */ + function MasterAuth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuth username. + * @member {string} username + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.username = ""; + + /** + * MasterAuth password. + * @member {string} password + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.password = ""; + + /** + * MasterAuth clientCertificateConfig. + * @member {google.container.v1.IClientCertificateConfig|null|undefined} clientCertificateConfig + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientCertificateConfig = null; + + /** + * MasterAuth clusterCaCertificate. + * @member {string} clusterCaCertificate + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.clusterCaCertificate = ""; + + /** + * MasterAuth clientCertificate. + * @member {string} clientCertificate + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientCertificate = ""; + + /** + * MasterAuth clientKey. + * @member {string} clientKey + * @memberof google.container.v1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientKey = ""; + + /** + * Creates a new MasterAuth instance using the specified properties. + * @function create + * @memberof google.container.v1.MasterAuth + * @static + * @param {google.container.v1.IMasterAuth=} [properties] Properties to set + * @returns {google.container.v1.MasterAuth} MasterAuth instance + */ + MasterAuth.create = function create(properties) { + return new MasterAuth(properties); + }; + + /** + * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MasterAuth + * @static + * @param {google.container.v1.IMasterAuth} message MasterAuth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuth.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.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); + if (message.clientCertificateConfig != null && Object.hasOwnProperty.call(message, "clientCertificateConfig")) + $root.google.container.v1.ClientCertificateConfig.encode(message.clientCertificateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.clusterCaCertificate); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.clientCertificate); + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.clientKey); + return writer; + }; + + /** + * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MasterAuth + * @static + * @param {google.container.v1.IMasterAuth} message MasterAuth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuth message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MasterAuth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MasterAuth} MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuth.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.password = reader.string(); + break; + } + case 3: { + message.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.clusterCaCertificate = reader.string(); + break; + } + case 101: { + message.clientCertificate = reader.string(); + break; + } + case 102: { + message.clientKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MasterAuth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MasterAuth} MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuth message. + * @function verify + * @memberof google.container.v1.MasterAuth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuth.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.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) { + var error = $root.google.container.v1.ClientCertificateConfig.verify(message.clientCertificateConfig); + if (error) + return "clientCertificateConfig." + error; + } + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + if (!$util.isString(message.clusterCaCertificate)) + return "clusterCaCertificate: string expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + if (!$util.isString(message.clientCertificate)) + return "clientCertificate: string expected"; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (!$util.isString(message.clientKey)) + return "clientKey: string expected"; + return null; + }; + + /** + * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MasterAuth + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MasterAuth} MasterAuth + */ + MasterAuth.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MasterAuth) + return object; + var message = new $root.google.container.v1.MasterAuth(); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.clientCertificateConfig != null) { + if (typeof object.clientCertificateConfig !== "object") + throw TypeError(".google.container.v1.MasterAuth.clientCertificateConfig: object expected"); + message.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.fromObject(object.clientCertificateConfig); + } + if (object.clusterCaCertificate != null) + message.clusterCaCertificate = String(object.clusterCaCertificate); + if (object.clientCertificate != null) + message.clientCertificate = String(object.clientCertificate); + if (object.clientKey != null) + message.clientKey = String(object.clientKey); + return message; + }; + + /** + * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MasterAuth + * @static + * @param {google.container.v1.MasterAuth} message MasterAuth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.password = ""; + object.clientCertificateConfig = null; + object.clusterCaCertificate = ""; + object.clientCertificate = ""; + object.clientKey = ""; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) + object.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.toObject(message.clientCertificateConfig, options); + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + object.clusterCaCertificate = message.clusterCaCertificate; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = message.clientCertificate; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + object.clientKey = message.clientKey; + return object; + }; + + /** + * Converts this MasterAuth to JSON. + * @function toJSON + * @memberof google.container.v1.MasterAuth + * @instance + * @returns {Object.} JSON object + */ + MasterAuth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuth + * @function getTypeUrl + * @memberof google.container.v1.MasterAuth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MasterAuth"; + }; + + return MasterAuth; + })(); + + v1.ClientCertificateConfig = (function() { + + /** + * Properties of a ClientCertificateConfig. + * @memberof google.container.v1 + * @interface IClientCertificateConfig + * @property {boolean|null} [issueClientCertificate] ClientCertificateConfig issueClientCertificate + */ + + /** + * Constructs a new ClientCertificateConfig. + * @memberof google.container.v1 + * @classdesc Represents a ClientCertificateConfig. + * @implements IClientCertificateConfig + * @constructor + * @param {google.container.v1.IClientCertificateConfig=} [properties] Properties to set + */ + function ClientCertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientCertificateConfig issueClientCertificate. + * @member {boolean} issueClientCertificate + * @memberof google.container.v1.ClientCertificateConfig + * @instance + */ + ClientCertificateConfig.prototype.issueClientCertificate = false; + + /** + * Creates a new ClientCertificateConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {google.container.v1.IClientCertificateConfig=} [properties] Properties to set + * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig instance + */ + ClientCertificateConfig.create = function create(properties) { + return new ClientCertificateConfig(properties); + }; + + /** + * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {google.container.v1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientCertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueClientCertificate != null && Object.hasOwnProperty.call(message, "issueClientCertificate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.issueClientCertificate); + return writer; + }; + + /** + * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {google.container.v1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientCertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClientCertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueClientCertificate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientCertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientCertificateConfig message. + * @function verify + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientCertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) + if (typeof message.issueClientCertificate !== "boolean") + return "issueClientCertificate: boolean expected"; + return null; + }; + + /** + * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig + */ + ClientCertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ClientCertificateConfig) + return object; + var message = new $root.google.container.v1.ClientCertificateConfig(); + if (object.issueClientCertificate != null) + message.issueClientCertificate = Boolean(object.issueClientCertificate); + return message; + }; + + /** + * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {google.container.v1.ClientCertificateConfig} message ClientCertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientCertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.issueClientCertificate = false; + if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) + object.issueClientCertificate = message.issueClientCertificate; + return object; + }; + + /** + * Converts this ClientCertificateConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ClientCertificateConfig + * @instance + * @returns {Object.} JSON object + */ + ClientCertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientCertificateConfig + * @function getTypeUrl + * @memberof google.container.v1.ClientCertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ClientCertificateConfig"; + }; + + return ClientCertificateConfig; + })(); + + v1.AddonsConfig = (function() { + + /** + * Properties of an AddonsConfig. + * @memberof google.container.v1 + * @interface IAddonsConfig + * @property {google.container.v1.IHttpLoadBalancing|null} [httpLoadBalancing] AddonsConfig httpLoadBalancing + * @property {google.container.v1.IHorizontalPodAutoscaling|null} [horizontalPodAutoscaling] AddonsConfig horizontalPodAutoscaling + * @property {google.container.v1.IKubernetesDashboard|null} [kubernetesDashboard] AddonsConfig kubernetesDashboard + * @property {google.container.v1.INetworkPolicyConfig|null} [networkPolicyConfig] AddonsConfig networkPolicyConfig + * @property {google.container.v1.ICloudRunConfig|null} [cloudRunConfig] AddonsConfig cloudRunConfig + * @property {google.container.v1.IDnsCacheConfig|null} [dnsCacheConfig] AddonsConfig dnsCacheConfig + * @property {google.container.v1.IConfigConnectorConfig|null} [configConnectorConfig] AddonsConfig configConnectorConfig + * @property {google.container.v1.IGcePersistentDiskCsiDriverConfig|null} [gcePersistentDiskCsiDriverConfig] AddonsConfig gcePersistentDiskCsiDriverConfig + * @property {google.container.v1.IGcpFilestoreCsiDriverConfig|null} [gcpFilestoreCsiDriverConfig] AddonsConfig gcpFilestoreCsiDriverConfig + * @property {google.container.v1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig + * @property {google.container.v1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig + * @property {google.container.v1.IStatefulHAConfig|null} [statefulHaConfig] AddonsConfig statefulHaConfig + * @property {google.container.v1.IParallelstoreCsiDriverConfig|null} [parallelstoreCsiDriverConfig] AddonsConfig parallelstoreCsiDriverConfig + * @property {google.container.v1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig + */ + + /** + * Constructs a new AddonsConfig. + * @memberof google.container.v1 + * @classdesc Represents an AddonsConfig. + * @implements IAddonsConfig + * @constructor + * @param {google.container.v1.IAddonsConfig=} [properties] Properties to set + */ + function AddonsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddonsConfig httpLoadBalancing. + * @member {google.container.v1.IHttpLoadBalancing|null|undefined} httpLoadBalancing + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.httpLoadBalancing = null; + + /** + * AddonsConfig horizontalPodAutoscaling. + * @member {google.container.v1.IHorizontalPodAutoscaling|null|undefined} horizontalPodAutoscaling + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.horizontalPodAutoscaling = null; + + /** + * AddonsConfig kubernetesDashboard. + * @member {google.container.v1.IKubernetesDashboard|null|undefined} kubernetesDashboard + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.kubernetesDashboard = null; + + /** + * AddonsConfig networkPolicyConfig. + * @member {google.container.v1.INetworkPolicyConfig|null|undefined} networkPolicyConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.networkPolicyConfig = null; + + /** + * AddonsConfig cloudRunConfig. + * @member {google.container.v1.ICloudRunConfig|null|undefined} cloudRunConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.cloudRunConfig = null; + + /** + * AddonsConfig dnsCacheConfig. + * @member {google.container.v1.IDnsCacheConfig|null|undefined} dnsCacheConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.dnsCacheConfig = null; + + /** + * AddonsConfig configConnectorConfig. + * @member {google.container.v1.IConfigConnectorConfig|null|undefined} configConnectorConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.configConnectorConfig = null; + + /** + * AddonsConfig gcePersistentDiskCsiDriverConfig. + * @member {google.container.v1.IGcePersistentDiskCsiDriverConfig|null|undefined} gcePersistentDiskCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcePersistentDiskCsiDriverConfig = null; + + /** + * AddonsConfig gcpFilestoreCsiDriverConfig. + * @member {google.container.v1.IGcpFilestoreCsiDriverConfig|null|undefined} gcpFilestoreCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcpFilestoreCsiDriverConfig = null; + + /** + * AddonsConfig gkeBackupAgentConfig. + * @member {google.container.v1.IGkeBackupAgentConfig|null|undefined} gkeBackupAgentConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gkeBackupAgentConfig = null; + + /** + * AddonsConfig gcsFuseCsiDriverConfig. + * @member {google.container.v1.IGcsFuseCsiDriverConfig|null|undefined} gcsFuseCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcsFuseCsiDriverConfig = null; + + /** + * AddonsConfig statefulHaConfig. + * @member {google.container.v1.IStatefulHAConfig|null|undefined} statefulHaConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.statefulHaConfig = null; + + /** + * AddonsConfig parallelstoreCsiDriverConfig. + * @member {google.container.v1.IParallelstoreCsiDriverConfig|null|undefined} parallelstoreCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.parallelstoreCsiDriverConfig = null; + + /** + * AddonsConfig rayOperatorConfig. + * @member {google.container.v1.IRayOperatorConfig|null|undefined} rayOperatorConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.rayOperatorConfig = null; + + /** + * Creates a new AddonsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AddonsConfig + * @static + * @param {google.container.v1.IAddonsConfig=} [properties] Properties to set + * @returns {google.container.v1.AddonsConfig} AddonsConfig instance + */ + AddonsConfig.create = function create(properties) { + return new AddonsConfig(properties); + }; + + /** + * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AddonsConfig + * @static + * @param {google.container.v1.IAddonsConfig} message AddonsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddonsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.httpLoadBalancing != null && Object.hasOwnProperty.call(message, "httpLoadBalancing")) + $root.google.container.v1.HttpLoadBalancing.encode(message.httpLoadBalancing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.horizontalPodAutoscaling != null && Object.hasOwnProperty.call(message, "horizontalPodAutoscaling")) + $root.google.container.v1.HorizontalPodAutoscaling.encode(message.horizontalPodAutoscaling, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kubernetesDashboard != null && Object.hasOwnProperty.call(message, "kubernetesDashboard")) + $root.google.container.v1.KubernetesDashboard.encode(message.kubernetesDashboard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.networkPolicyConfig != null && Object.hasOwnProperty.call(message, "networkPolicyConfig")) + $root.google.container.v1.NetworkPolicyConfig.encode(message.networkPolicyConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.cloudRunConfig != null && Object.hasOwnProperty.call(message, "cloudRunConfig")) + $root.google.container.v1.CloudRunConfig.encode(message.cloudRunConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.dnsCacheConfig != null && Object.hasOwnProperty.call(message, "dnsCacheConfig")) + $root.google.container.v1.DnsCacheConfig.encode(message.dnsCacheConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.configConnectorConfig != null && Object.hasOwnProperty.call(message, "configConnectorConfig")) + $root.google.container.v1.ConfigConnectorConfig.encode(message.configConnectorConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.gcePersistentDiskCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcePersistentDiskCsiDriverConfig")) + $root.google.container.v1.GcePersistentDiskCsiDriverConfig.encode(message.gcePersistentDiskCsiDriverConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.gcpFilestoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcpFilestoreCsiDriverConfig")) + $root.google.container.v1.GcpFilestoreCsiDriverConfig.encode(message.gcpFilestoreCsiDriverConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.gkeBackupAgentConfig != null && Object.hasOwnProperty.call(message, "gkeBackupAgentConfig")) + $root.google.container.v1.GkeBackupAgentConfig.encode(message.gkeBackupAgentConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.gcsFuseCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcsFuseCsiDriverConfig")) + $root.google.container.v1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.statefulHaConfig != null && Object.hasOwnProperty.call(message, "statefulHaConfig")) + $root.google.container.v1.StatefulHAConfig.encode(message.statefulHaConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.parallelstoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "parallelstoreCsiDriverConfig")) + $root.google.container.v1.ParallelstoreCsiDriverConfig.encode(message.parallelstoreCsiDriverConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.rayOperatorConfig != null && Object.hasOwnProperty.call(message, "rayOperatorConfig")) + $root.google.container.v1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AddonsConfig + * @static + * @param {google.container.v1.IAddonsConfig} message AddonsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddonsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AddonsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AddonsConfig} AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddonsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AddonsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.decode(reader, reader.uint32()); + break; + } + case 2: { + message.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 3: { + message.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.decode(reader, reader.uint32()); + break; + } + case 4: { + message.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.cloudRunConfig = $root.google.container.v1.CloudRunConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + message.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AddonsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AddonsConfig} AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddonsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddonsConfig message. + * @function verify + * @memberof google.container.v1.AddonsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddonsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) { + var error = $root.google.container.v1.HttpLoadBalancing.verify(message.httpLoadBalancing); + if (error) + return "httpLoadBalancing." + error; + } + if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) { + var error = $root.google.container.v1.HorizontalPodAutoscaling.verify(message.horizontalPodAutoscaling); + if (error) + return "horizontalPodAutoscaling." + error; + } + if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) { + var error = $root.google.container.v1.KubernetesDashboard.verify(message.kubernetesDashboard); + if (error) + return "kubernetesDashboard." + error; + } + if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) { + var error = $root.google.container.v1.NetworkPolicyConfig.verify(message.networkPolicyConfig); + if (error) + return "networkPolicyConfig." + error; + } + if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) { + var error = $root.google.container.v1.CloudRunConfig.verify(message.cloudRunConfig); + if (error) + return "cloudRunConfig." + error; + } + if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) { + var error = $root.google.container.v1.DnsCacheConfig.verify(message.dnsCacheConfig); + if (error) + return "dnsCacheConfig." + error; + } + if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) { + var error = $root.google.container.v1.ConfigConnectorConfig.verify(message.configConnectorConfig); + if (error) + return "configConnectorConfig." + error; + } + if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) { + var error = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.verify(message.gcePersistentDiskCsiDriverConfig); + if (error) + return "gcePersistentDiskCsiDriverConfig." + error; + } + if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) { + var error = $root.google.container.v1.GcpFilestoreCsiDriverConfig.verify(message.gcpFilestoreCsiDriverConfig); + if (error) + return "gcpFilestoreCsiDriverConfig." + error; + } + if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) { + var error = $root.google.container.v1.GkeBackupAgentConfig.verify(message.gkeBackupAgentConfig); + if (error) + return "gkeBackupAgentConfig." + error; + } + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) { + var error = $root.google.container.v1.GcsFuseCsiDriverConfig.verify(message.gcsFuseCsiDriverConfig); + if (error) + return "gcsFuseCsiDriverConfig." + error; + } + if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) { + var error = $root.google.container.v1.StatefulHAConfig.verify(message.statefulHaConfig); + if (error) + return "statefulHaConfig." + error; + } + if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) { + var error = $root.google.container.v1.ParallelstoreCsiDriverConfig.verify(message.parallelstoreCsiDriverConfig); + if (error) + return "parallelstoreCsiDriverConfig." + error; + } + if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) { + var error = $root.google.container.v1.RayOperatorConfig.verify(message.rayOperatorConfig); + if (error) + return "rayOperatorConfig." + error; + } + return null; + }; + + /** + * Creates an AddonsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AddonsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AddonsConfig} AddonsConfig + */ + AddonsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AddonsConfig) + return object; + var message = new $root.google.container.v1.AddonsConfig(); + if (object.httpLoadBalancing != null) { + if (typeof object.httpLoadBalancing !== "object") + throw TypeError(".google.container.v1.AddonsConfig.httpLoadBalancing: object expected"); + message.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.fromObject(object.httpLoadBalancing); + } + if (object.horizontalPodAutoscaling != null) { + if (typeof object.horizontalPodAutoscaling !== "object") + throw TypeError(".google.container.v1.AddonsConfig.horizontalPodAutoscaling: object expected"); + message.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.fromObject(object.horizontalPodAutoscaling); + } + if (object.kubernetesDashboard != null) { + if (typeof object.kubernetesDashboard !== "object") + throw TypeError(".google.container.v1.AddonsConfig.kubernetesDashboard: object expected"); + message.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.fromObject(object.kubernetesDashboard); + } + if (object.networkPolicyConfig != null) { + if (typeof object.networkPolicyConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.networkPolicyConfig: object expected"); + message.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.fromObject(object.networkPolicyConfig); + } + if (object.cloudRunConfig != null) { + if (typeof object.cloudRunConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.cloudRunConfig: object expected"); + message.cloudRunConfig = $root.google.container.v1.CloudRunConfig.fromObject(object.cloudRunConfig); + } + if (object.dnsCacheConfig != null) { + if (typeof object.dnsCacheConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.dnsCacheConfig: object expected"); + message.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.fromObject(object.dnsCacheConfig); + } + if (object.configConnectorConfig != null) { + if (typeof object.configConnectorConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.configConnectorConfig: object expected"); + message.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.fromObject(object.configConnectorConfig); + } + if (object.gcePersistentDiskCsiDriverConfig != null) { + if (typeof object.gcePersistentDiskCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.gcePersistentDiskCsiDriverConfig: object expected"); + message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.fromObject(object.gcePersistentDiskCsiDriverConfig); + } + if (object.gcpFilestoreCsiDriverConfig != null) { + if (typeof object.gcpFilestoreCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.gcpFilestoreCsiDriverConfig: object expected"); + message.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.fromObject(object.gcpFilestoreCsiDriverConfig); + } + if (object.gkeBackupAgentConfig != null) { + if (typeof object.gkeBackupAgentConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.gkeBackupAgentConfig: object expected"); + message.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.fromObject(object.gkeBackupAgentConfig); + } + if (object.gcsFuseCsiDriverConfig != null) { + if (typeof object.gcsFuseCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.gcsFuseCsiDriverConfig: object expected"); + message.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.fromObject(object.gcsFuseCsiDriverConfig); + } + if (object.statefulHaConfig != null) { + if (typeof object.statefulHaConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.statefulHaConfig: object expected"); + message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.fromObject(object.statefulHaConfig); + } + if (object.parallelstoreCsiDriverConfig != null) { + if (typeof object.parallelstoreCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.parallelstoreCsiDriverConfig: object expected"); + message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.fromObject(object.parallelstoreCsiDriverConfig); + } + if (object.rayOperatorConfig != null) { + if (typeof object.rayOperatorConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.rayOperatorConfig: object expected"); + message.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.fromObject(object.rayOperatorConfig); + } + return message; + }; + + /** + * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AddonsConfig + * @static + * @param {google.container.v1.AddonsConfig} message AddonsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddonsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.httpLoadBalancing = null; + object.horizontalPodAutoscaling = null; + object.kubernetesDashboard = null; + object.networkPolicyConfig = null; + object.cloudRunConfig = null; + object.dnsCacheConfig = null; + object.configConnectorConfig = null; + object.gcePersistentDiskCsiDriverConfig = null; + object.gcpFilestoreCsiDriverConfig = null; + object.gkeBackupAgentConfig = null; + object.gcsFuseCsiDriverConfig = null; + object.statefulHaConfig = null; + object.parallelstoreCsiDriverConfig = null; + object.rayOperatorConfig = null; + } + if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) + object.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); + if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) + object.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.toObject(message.horizontalPodAutoscaling, options); + if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) + object.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.toObject(message.kubernetesDashboard, options); + if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) + object.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.toObject(message.networkPolicyConfig, options); + if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) + object.cloudRunConfig = $root.google.container.v1.CloudRunConfig.toObject(message.cloudRunConfig, options); + if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) + object.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.toObject(message.dnsCacheConfig, options); + if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) + object.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.toObject(message.configConnectorConfig, options); + if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) + object.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.toObject(message.gcePersistentDiskCsiDriverConfig, options); + if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) + object.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.toObject(message.gcpFilestoreCsiDriverConfig, options); + if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) + object.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.toObject(message.gkeBackupAgentConfig, options); + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) + object.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); + if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) + object.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.toObject(message.statefulHaConfig, options); + if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) + object.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.toObject(message.parallelstoreCsiDriverConfig, options); + if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) + object.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); + return object; + }; + + /** + * Converts this AddonsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AddonsConfig + * @instance + * @returns {Object.} JSON object + */ + AddonsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddonsConfig + * @function getTypeUrl + * @memberof google.container.v1.AddonsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddonsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AddonsConfig"; + }; + + return AddonsConfig; + })(); + + v1.HttpLoadBalancing = (function() { + + /** + * Properties of a HttpLoadBalancing. + * @memberof google.container.v1 + * @interface IHttpLoadBalancing + * @property {boolean|null} [disabled] HttpLoadBalancing disabled + */ + + /** + * Constructs a new HttpLoadBalancing. + * @memberof google.container.v1 + * @classdesc Represents a HttpLoadBalancing. + * @implements IHttpLoadBalancing + * @constructor + * @param {google.container.v1.IHttpLoadBalancing=} [properties] Properties to set + */ + function HttpLoadBalancing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpLoadBalancing disabled. + * @member {boolean} disabled + * @memberof google.container.v1.HttpLoadBalancing + * @instance + */ + HttpLoadBalancing.prototype.disabled = false; + + /** + * Creates a new HttpLoadBalancing instance using the specified properties. + * @function create + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {google.container.v1.IHttpLoadBalancing=} [properties] Properties to set + * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing instance + */ + HttpLoadBalancing.create = function create(properties) { + return new HttpLoadBalancing(properties); + }; + + /** + * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. + * @function encode + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {google.container.v1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpLoadBalancing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {google.container.v1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpLoadBalancing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpLoadBalancing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.HttpLoadBalancing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpLoadBalancing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpLoadBalancing message. + * @function verify + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpLoadBalancing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing + */ + HttpLoadBalancing.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.HttpLoadBalancing) + return object; + var message = new $root.google.container.v1.HttpLoadBalancing(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {google.container.v1.HttpLoadBalancing} message HttpLoadBalancing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpLoadBalancing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this HttpLoadBalancing to JSON. + * @function toJSON + * @memberof google.container.v1.HttpLoadBalancing + * @instance + * @returns {Object.} JSON object + */ + HttpLoadBalancing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpLoadBalancing + * @function getTypeUrl + * @memberof google.container.v1.HttpLoadBalancing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpLoadBalancing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.HttpLoadBalancing"; + }; + + return HttpLoadBalancing; + })(); + + v1.HorizontalPodAutoscaling = (function() { + + /** + * Properties of a HorizontalPodAutoscaling. + * @memberof google.container.v1 + * @interface IHorizontalPodAutoscaling + * @property {boolean|null} [disabled] HorizontalPodAutoscaling disabled + */ + + /** + * Constructs a new HorizontalPodAutoscaling. + * @memberof google.container.v1 + * @classdesc Represents a HorizontalPodAutoscaling. + * @implements IHorizontalPodAutoscaling + * @constructor + * @param {google.container.v1.IHorizontalPodAutoscaling=} [properties] Properties to set + */ + function HorizontalPodAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HorizontalPodAutoscaling disabled. + * @member {boolean} disabled + * @memberof google.container.v1.HorizontalPodAutoscaling + * @instance + */ + HorizontalPodAutoscaling.prototype.disabled = false; + + /** + * Creates a new HorizontalPodAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1.IHorizontalPodAutoscaling=} [properties] Properties to set + * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling instance + */ + HorizontalPodAutoscaling.create = function create(properties) { + return new HorizontalPodAutoscaling(properties); + }; + + /** + * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HorizontalPodAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HorizontalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HorizontalPodAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.HorizontalPodAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HorizontalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HorizontalPodAutoscaling message. + * @function verify + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HorizontalPodAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + */ + HorizontalPodAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.HorizontalPodAutoscaling) + return object; + var message = new $root.google.container.v1.HorizontalPodAutoscaling(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1.HorizontalPodAutoscaling} message HorizontalPodAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HorizontalPodAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this HorizontalPodAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1.HorizontalPodAutoscaling + * @instance + * @returns {Object.} JSON object + */ + HorizontalPodAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HorizontalPodAutoscaling + * @function getTypeUrl + * @memberof google.container.v1.HorizontalPodAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HorizontalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.HorizontalPodAutoscaling"; + }; + + return HorizontalPodAutoscaling; + })(); + + v1.KubernetesDashboard = (function() { + + /** + * Properties of a KubernetesDashboard. + * @memberof google.container.v1 + * @interface IKubernetesDashboard + * @property {boolean|null} [disabled] KubernetesDashboard disabled + */ + + /** + * Constructs a new KubernetesDashboard. + * @memberof google.container.v1 + * @classdesc Represents a KubernetesDashboard. + * @implements IKubernetesDashboard + * @constructor + * @param {google.container.v1.IKubernetesDashboard=} [properties] Properties to set + */ + function KubernetesDashboard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KubernetesDashboard disabled. + * @member {boolean} disabled + * @memberof google.container.v1.KubernetesDashboard + * @instance + */ + KubernetesDashboard.prototype.disabled = false; + + /** + * Creates a new KubernetesDashboard instance using the specified properties. + * @function create + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {google.container.v1.IKubernetesDashboard=} [properties] Properties to set + * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard instance + */ + KubernetesDashboard.create = function create(properties) { + return new KubernetesDashboard(properties); + }; + + /** + * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. + * @function encode + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {google.container.v1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KubernetesDashboard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {google.container.v1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KubernetesDashboard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KubernetesDashboard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.KubernetesDashboard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KubernetesDashboard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KubernetesDashboard message. + * @function verify + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KubernetesDashboard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard + */ + KubernetesDashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.KubernetesDashboard) + return object; + var message = new $root.google.container.v1.KubernetesDashboard(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {google.container.v1.KubernetesDashboard} message KubernetesDashboard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KubernetesDashboard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this KubernetesDashboard to JSON. + * @function toJSON + * @memberof google.container.v1.KubernetesDashboard + * @instance + * @returns {Object.} JSON object + */ + KubernetesDashboard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KubernetesDashboard + * @function getTypeUrl + * @memberof google.container.v1.KubernetesDashboard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KubernetesDashboard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.KubernetesDashboard"; + }; + + return KubernetesDashboard; + })(); + + v1.NetworkPolicyConfig = (function() { + + /** + * Properties of a NetworkPolicyConfig. + * @memberof google.container.v1 + * @interface INetworkPolicyConfig + * @property {boolean|null} [disabled] NetworkPolicyConfig disabled + */ + + /** + * Constructs a new NetworkPolicyConfig. + * @memberof google.container.v1 + * @classdesc Represents a NetworkPolicyConfig. + * @implements INetworkPolicyConfig + * @constructor + * @param {google.container.v1.INetworkPolicyConfig=} [properties] Properties to set + */ + function NetworkPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPolicyConfig disabled. + * @member {boolean} disabled + * @memberof google.container.v1.NetworkPolicyConfig + * @instance + */ + NetworkPolicyConfig.prototype.disabled = false; + + /** + * Creates a new NetworkPolicyConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {google.container.v1.INetworkPolicyConfig=} [properties] Properties to set + * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig instance + */ + NetworkPolicyConfig.create = function create(properties) { + return new NetworkPolicyConfig(properties); + }; + + /** + * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {google.container.v1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {google.container.v1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPolicyConfig message. + * @function verify + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig + */ + NetworkPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NetworkPolicyConfig) + return object; + var message = new $root.google.container.v1.NetworkPolicyConfig(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {google.container.v1.NetworkPolicyConfig} message NetworkPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this NetworkPolicyConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NetworkPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPolicyConfig + * @function getTypeUrl + * @memberof google.container.v1.NetworkPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NetworkPolicyConfig"; + }; + + return NetworkPolicyConfig; + })(); + + v1.DnsCacheConfig = (function() { + + /** + * Properties of a DnsCacheConfig. + * @memberof google.container.v1 + * @interface IDnsCacheConfig + * @property {boolean|null} [enabled] DnsCacheConfig enabled + */ + + /** + * Constructs a new DnsCacheConfig. + * @memberof google.container.v1 + * @classdesc Represents a DnsCacheConfig. + * @implements IDnsCacheConfig + * @constructor + * @param {google.container.v1.IDnsCacheConfig=} [properties] Properties to set + */ + function DnsCacheConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DnsCacheConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.DnsCacheConfig + * @instance + */ + DnsCacheConfig.prototype.enabled = false; + + /** + * Creates a new DnsCacheConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {google.container.v1.IDnsCacheConfig=} [properties] Properties to set + * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig instance + */ + DnsCacheConfig.create = function create(properties) { + return new DnsCacheConfig(properties); + }; + + /** + * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {google.container.v1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DnsCacheConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {google.container.v1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DnsCacheConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DnsCacheConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DnsCacheConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DnsCacheConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DnsCacheConfig message. + * @function verify + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DnsCacheConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig + */ + DnsCacheConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DnsCacheConfig) + return object; + var message = new $root.google.container.v1.DnsCacheConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {google.container.v1.DnsCacheConfig} message DnsCacheConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DnsCacheConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this DnsCacheConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DnsCacheConfig + * @instance + * @returns {Object.} JSON object + */ + DnsCacheConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DnsCacheConfig + * @function getTypeUrl + * @memberof google.container.v1.DnsCacheConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DnsCacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DnsCacheConfig"; + }; + + return DnsCacheConfig; + })(); + + v1.PrivateClusterMasterGlobalAccessConfig = (function() { + + /** + * Properties of a PrivateClusterMasterGlobalAccessConfig. + * @memberof google.container.v1 + * @interface IPrivateClusterMasterGlobalAccessConfig + * @property {boolean|null} [enabled] PrivateClusterMasterGlobalAccessConfig enabled + */ + + /** + * Constructs a new PrivateClusterMasterGlobalAccessConfig. + * @memberof google.container.v1 + * @classdesc Represents a PrivateClusterMasterGlobalAccessConfig. + * @implements IPrivateClusterMasterGlobalAccessConfig + * @constructor + * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set + */ + function PrivateClusterMasterGlobalAccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterMasterGlobalAccessConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @instance + */ + PrivateClusterMasterGlobalAccessConfig.prototype.enabled = false; + + /** + * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set + * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig instance + */ + PrivateClusterMasterGlobalAccessConfig.create = function create(properties) { + return new PrivateClusterMasterGlobalAccessConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterMasterGlobalAccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterMasterGlobalAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterMasterGlobalAccessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterMasterGlobalAccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterMasterGlobalAccessConfig message. + * @function verify + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterMasterGlobalAccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + */ + PrivateClusterMasterGlobalAccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig) + return object; + var message = new $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1.PrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterMasterGlobalAccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. + * @function toJSON + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterMasterGlobalAccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterMasterGlobalAccessConfig + * @function getTypeUrl + * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterMasterGlobalAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.PrivateClusterMasterGlobalAccessConfig"; + }; + + return PrivateClusterMasterGlobalAccessConfig; + })(); + + v1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.container.v1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateNodes] PrivateClusterConfig enablePrivateNodes + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [privateEndpoint] PrivateClusterConfig privateEndpoint + * @property {string|null} [publicEndpoint] PrivateClusterConfig publicEndpoint + * @property {string|null} [peeringName] PrivateClusterConfig peeringName + * @property {google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null} [masterGlobalAccessConfig] PrivateClusterConfig masterGlobalAccessConfig + * @property {string|null} [privateEndpointSubnetwork] PrivateClusterConfig privateEndpointSubnetwork + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.container.v1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.container.v1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateNodes. + * @member {boolean} enablePrivateNodes + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateNodes = false; + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig privateEndpoint. + * @member {string} privateEndpoint + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.privateEndpoint = ""; + + /** + * PrivateClusterConfig publicEndpoint. + * @member {string} publicEndpoint + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.publicEndpoint = ""; + + /** + * PrivateClusterConfig peeringName. + * @member {string} peeringName + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.peeringName = ""; + + /** + * PrivateClusterConfig masterGlobalAccessConfig. + * @member {google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null|undefined} masterGlobalAccessConfig + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterGlobalAccessConfig = null; + + /** + * PrivateClusterConfig privateEndpointSubnetwork. + * @member {string} privateEndpointSubnetwork + * @memberof google.container.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.privateEndpointSubnetwork = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {google.container.v1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {google.container.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateNodes); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4CidrBlock); + if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.privateEndpoint); + if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); + if (message.peeringName != null && Object.hasOwnProperty.call(message, "peeringName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.peeringName); + if (message.masterGlobalAccessConfig != null && Object.hasOwnProperty.call(message, "masterGlobalAccessConfig")) + $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.encode(message.masterGlobalAccessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.privateEndpointSubnetwork); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {google.container.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateNodes = reader.bool(); + break; + } + case 2: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 3: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.privateEndpoint = reader.string(); + break; + } + case 5: { + message.publicEndpoint = reader.string(); + break; + } + case 7: { + message.peeringName = reader.string(); + break; + } + case 8: { + message.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.privateEndpointSubnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) + if (typeof message.enablePrivateNodes !== "boolean") + return "enablePrivateNodes: boolean expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + if (!$util.isString(message.privateEndpoint)) + return "privateEndpoint: string expected"; + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + if (!$util.isString(message.publicEndpoint)) + return "publicEndpoint: string expected"; + if (message.peeringName != null && message.hasOwnProperty("peeringName")) + if (!$util.isString(message.peeringName)) + return "peeringName: string expected"; + if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) { + var error = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify(message.masterGlobalAccessConfig); + if (error) + return "masterGlobalAccessConfig." + error; + } + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + if (!$util.isString(message.privateEndpointSubnetwork)) + return "privateEndpointSubnetwork: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.PrivateClusterConfig) + return object; + var message = new $root.google.container.v1.PrivateClusterConfig(); + if (object.enablePrivateNodes != null) + message.enablePrivateNodes = Boolean(object.enablePrivateNodes); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.privateEndpoint != null) + message.privateEndpoint = String(object.privateEndpoint); + if (object.publicEndpoint != null) + message.publicEndpoint = String(object.publicEndpoint); + if (object.peeringName != null) + message.peeringName = String(object.peeringName); + if (object.masterGlobalAccessConfig != null) { + if (typeof object.masterGlobalAccessConfig !== "object") + throw TypeError(".google.container.v1.PrivateClusterConfig.masterGlobalAccessConfig: object expected"); + message.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.fromObject(object.masterGlobalAccessConfig); + } + if (object.privateEndpointSubnetwork != null) + message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {google.container.v1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateNodes = false; + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.privateEndpoint = ""; + object.publicEndpoint = ""; + object.peeringName = ""; + object.masterGlobalAccessConfig = null; + object.privateEndpointSubnetwork = ""; + } + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) + object.enablePrivateNodes = message.enablePrivateNodes; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + object.privateEndpoint = message.privateEndpoint; + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + object.publicEndpoint = message.publicEndpoint; + if (message.peeringName != null && message.hasOwnProperty("peeringName")) + object.peeringName = message.peeringName; + if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) + object.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.toObject(message.masterGlobalAccessConfig, options); + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.container.v1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.container.v1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.PrivateClusterConfig"; + }; + + return PrivateClusterConfig; + })(); + + v1.AuthenticatorGroupsConfig = (function() { + + /** + * Properties of an AuthenticatorGroupsConfig. + * @memberof google.container.v1 + * @interface IAuthenticatorGroupsConfig + * @property {boolean|null} [enabled] AuthenticatorGroupsConfig enabled + * @property {string|null} [securityGroup] AuthenticatorGroupsConfig securityGroup + */ + + /** + * Constructs a new AuthenticatorGroupsConfig. + * @memberof google.container.v1 + * @classdesc Represents an AuthenticatorGroupsConfig. + * @implements IAuthenticatorGroupsConfig + * @constructor + * @param {google.container.v1.IAuthenticatorGroupsConfig=} [properties] Properties to set + */ + function AuthenticatorGroupsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthenticatorGroupsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @instance + */ + AuthenticatorGroupsConfig.prototype.enabled = false; + + /** + * AuthenticatorGroupsConfig securityGroup. + * @member {string} securityGroup + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @instance + */ + AuthenticatorGroupsConfig.prototype.securityGroup = ""; + + /** + * Creates a new AuthenticatorGroupsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1.IAuthenticatorGroupsConfig=} [properties] Properties to set + * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig instance + */ + AuthenticatorGroupsConfig.create = function create(properties) { + return new AuthenticatorGroupsConfig(properties); + }; + + /** + * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticatorGroupsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.securityGroup != null && Object.hasOwnProperty.call(message, "securityGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.securityGroup); + return writer; + }; + + /** + * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticatorGroupsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticatorGroupsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AuthenticatorGroupsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.securityGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticatorGroupsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthenticatorGroupsConfig message. + * @function verify + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthenticatorGroupsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) + if (!$util.isString(message.securityGroup)) + return "securityGroup: string expected"; + return null; + }; + + /** + * Creates an AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + */ + AuthenticatorGroupsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AuthenticatorGroupsConfig) + return object; + var message = new $root.google.container.v1.AuthenticatorGroupsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.securityGroup != null) + message.securityGroup = String(object.securityGroup); + return message; + }; + + /** + * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1.AuthenticatorGroupsConfig} message AuthenticatorGroupsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthenticatorGroupsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.securityGroup = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) + object.securityGroup = message.securityGroup; + return object; + }; + + /** + * Converts this AuthenticatorGroupsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @instance + * @returns {Object.} JSON object + */ + AuthenticatorGroupsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthenticatorGroupsConfig + * @function getTypeUrl + * @memberof google.container.v1.AuthenticatorGroupsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthenticatorGroupsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AuthenticatorGroupsConfig"; + }; + + return AuthenticatorGroupsConfig; + })(); + + v1.CloudRunConfig = (function() { + + /** + * Properties of a CloudRunConfig. + * @memberof google.container.v1 + * @interface ICloudRunConfig + * @property {boolean|null} [disabled] CloudRunConfig disabled + * @property {google.container.v1.CloudRunConfig.LoadBalancerType|null} [loadBalancerType] CloudRunConfig loadBalancerType + */ + + /** + * Constructs a new CloudRunConfig. + * @memberof google.container.v1 + * @classdesc Represents a CloudRunConfig. + * @implements ICloudRunConfig + * @constructor + * @param {google.container.v1.ICloudRunConfig=} [properties] Properties to set + */ + function CloudRunConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunConfig disabled. + * @member {boolean} disabled + * @memberof google.container.v1.CloudRunConfig + * @instance + */ + CloudRunConfig.prototype.disabled = false; + + /** + * CloudRunConfig loadBalancerType. + * @member {google.container.v1.CloudRunConfig.LoadBalancerType} loadBalancerType + * @memberof google.container.v1.CloudRunConfig + * @instance + */ + CloudRunConfig.prototype.loadBalancerType = 0; + + /** + * Creates a new CloudRunConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {google.container.v1.ICloudRunConfig=} [properties] Properties to set + * @returns {google.container.v1.CloudRunConfig} CloudRunConfig instance + */ + CloudRunConfig.create = function create(properties) { + return new CloudRunConfig(properties); + }; + + /** + * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {google.container.v1.ICloudRunConfig} message CloudRunConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadBalancerType); + return writer; + }; + + /** + * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {google.container.v1.ICloudRunConfig} message CloudRunConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CloudRunConfig} CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CloudRunConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + case 3: { + message.loadBalancerType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CloudRunConfig} CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunConfig message. + * @function verify + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CloudRunConfig} CloudRunConfig + */ + CloudRunConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CloudRunConfig) + return object; + var message = new $root.google.container.v1.CloudRunConfig(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "LOAD_BALANCER_TYPE_EXTERNAL": + case 1: + message.loadBalancerType = 1; + break; + case "LOAD_BALANCER_TYPE_INTERNAL": + case 2: + message.loadBalancerType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {google.container.v1.CloudRunConfig} message CloudRunConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.container.v1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.container.v1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + return object; + }; + + /** + * Converts this CloudRunConfig to JSON. + * @function toJSON + * @memberof google.container.v1.CloudRunConfig + * @instance + * @returns {Object.} JSON object + */ + CloudRunConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunConfig + * @function getTypeUrl + * @memberof google.container.v1.CloudRunConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CloudRunConfig"; + }; + + /** + * LoadBalancerType enum. + * @name google.container.v1.CloudRunConfig.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} LOAD_BALANCER_TYPE_EXTERNAL=1 LOAD_BALANCER_TYPE_EXTERNAL value + * @property {number} LOAD_BALANCER_TYPE_INTERNAL=2 LOAD_BALANCER_TYPE_INTERNAL value + */ + CloudRunConfig.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOAD_BALANCER_TYPE_EXTERNAL"] = 1; + values[valuesById[2] = "LOAD_BALANCER_TYPE_INTERNAL"] = 2; + return values; + })(); + + return CloudRunConfig; + })(); + + v1.ConfigConnectorConfig = (function() { + + /** + * Properties of a ConfigConnectorConfig. + * @memberof google.container.v1 + * @interface IConfigConnectorConfig + * @property {boolean|null} [enabled] ConfigConnectorConfig enabled + */ + + /** + * Constructs a new ConfigConnectorConfig. + * @memberof google.container.v1 + * @classdesc Represents a ConfigConnectorConfig. + * @implements IConfigConnectorConfig + * @constructor + * @param {google.container.v1.IConfigConnectorConfig=} [properties] Properties to set + */ + function ConfigConnectorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigConnectorConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ConfigConnectorConfig + * @instance + */ + ConfigConnectorConfig.prototype.enabled = false; + + /** + * Creates a new ConfigConnectorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {google.container.v1.IConfigConnectorConfig=} [properties] Properties to set + * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig instance + */ + ConfigConnectorConfig.create = function create(properties) { + return new ConfigConnectorConfig(properties); + }; + + /** + * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {google.container.v1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigConnectorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {google.container.v1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigConnectorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigConnectorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ConfigConnectorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigConnectorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigConnectorConfig message. + * @function verify + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigConnectorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig + */ + ConfigConnectorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ConfigConnectorConfig) + return object; + var message = new $root.google.container.v1.ConfigConnectorConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {google.container.v1.ConfigConnectorConfig} message ConfigConnectorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigConnectorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConfigConnectorConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ConfigConnectorConfig + * @instance + * @returns {Object.} JSON object + */ + ConfigConnectorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfigConnectorConfig + * @function getTypeUrl + * @memberof google.container.v1.ConfigConnectorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigConnectorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ConfigConnectorConfig"; + }; + + return ConfigConnectorConfig; + })(); + + v1.GcePersistentDiskCsiDriverConfig = (function() { + + /** + * Properties of a GcePersistentDiskCsiDriverConfig. + * @memberof google.container.v1 + * @interface IGcePersistentDiskCsiDriverConfig + * @property {boolean|null} [enabled] GcePersistentDiskCsiDriverConfig enabled + */ + + /** + * Constructs a new GcePersistentDiskCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a GcePersistentDiskCsiDriverConfig. + * @implements IGcePersistentDiskCsiDriverConfig + * @constructor + * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set + */ + function GcePersistentDiskCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcePersistentDiskCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @instance + */ + GcePersistentDiskCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig instance + */ + GcePersistentDiskCsiDriverConfig.create = function create(properties) { + return new GcePersistentDiskCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcePersistentDiskCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcePersistentDiskCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcePersistentDiskCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcePersistentDiskCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcePersistentDiskCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcePersistentDiskCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcePersistentDiskCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + */ + GcePersistentDiskCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GcePersistentDiskCsiDriverConfig) + return object; + var message = new $root.google.container.v1.GcePersistentDiskCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1.GcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcePersistentDiskCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcePersistentDiskCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcePersistentDiskCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcePersistentDiskCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcePersistentDiskCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GcePersistentDiskCsiDriverConfig"; + }; + + return GcePersistentDiskCsiDriverConfig; + })(); + + v1.GcpFilestoreCsiDriverConfig = (function() { + + /** + * Properties of a GcpFilestoreCsiDriverConfig. + * @memberof google.container.v1 + * @interface IGcpFilestoreCsiDriverConfig + * @property {boolean|null} [enabled] GcpFilestoreCsiDriverConfig enabled + */ + + /** + * Constructs a new GcpFilestoreCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a GcpFilestoreCsiDriverConfig. + * @implements IGcpFilestoreCsiDriverConfig + * @constructor + * @param {google.container.v1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set + */ + function GcpFilestoreCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpFilestoreCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @instance + */ + GcpFilestoreCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig instance + */ + GcpFilestoreCsiDriverConfig.create = function create(properties) { + return new GcpFilestoreCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpFilestoreCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpFilestoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpFilestoreCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcpFilestoreCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpFilestoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpFilestoreCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpFilestoreCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + */ + GcpFilestoreCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GcpFilestoreCsiDriverConfig) + return object; + var message = new $root.google.container.v1.GcpFilestoreCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1.GcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpFilestoreCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcpFilestoreCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcpFilestoreCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpFilestoreCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.GcpFilestoreCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpFilestoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GcpFilestoreCsiDriverConfig"; + }; + + return GcpFilestoreCsiDriverConfig; + })(); + + v1.GcsFuseCsiDriverConfig = (function() { + + /** + * Properties of a GcsFuseCsiDriverConfig. + * @memberof google.container.v1 + * @interface IGcsFuseCsiDriverConfig + * @property {boolean|null} [enabled] GcsFuseCsiDriverConfig enabled + */ + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a GcsFuseCsiDriverConfig. + * @implements IGcsFuseCsiDriverConfig + * @constructor + * @param {google.container.v1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + */ + function GcsFuseCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsFuseCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @instance + */ + GcsFuseCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig instance + */ + GcsFuseCsiDriverConfig.create = function create(properties) { + return new GcsFuseCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcsFuseCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsFuseCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsFuseCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + */ + GcsFuseCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GcsFuseCsiDriverConfig) + return object; + var message = new $root.google.container.v1.GcsFuseCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1.GcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsFuseCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcsFuseCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.GcsFuseCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsFuseCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GcsFuseCsiDriverConfig"; + }; + + return GcsFuseCsiDriverConfig; + })(); + + v1.ParallelstoreCsiDriverConfig = (function() { + + /** + * Properties of a ParallelstoreCsiDriverConfig. + * @memberof google.container.v1 + * @interface IParallelstoreCsiDriverConfig + * @property {boolean|null} [enabled] ParallelstoreCsiDriverConfig enabled + */ + + /** + * Constructs a new ParallelstoreCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a ParallelstoreCsiDriverConfig. + * @implements IParallelstoreCsiDriverConfig + * @constructor + * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set + */ + function ParallelstoreCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParallelstoreCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @instance + */ + ParallelstoreCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig instance + */ + ParallelstoreCsiDriverConfig.create = function create(properties) { + return new ParallelstoreCsiDriverConfig(properties); + }; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParallelstoreCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParallelstoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParallelstoreCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParallelstoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParallelstoreCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParallelstoreCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + */ + ParallelstoreCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ParallelstoreCsiDriverConfig) + return object; + var message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.ParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParallelstoreCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ParallelstoreCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + ParallelstoreCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParallelstoreCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParallelstoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ParallelstoreCsiDriverConfig"; + }; + + return ParallelstoreCsiDriverConfig; + })(); + + v1.RayOperatorConfig = (function() { + + /** + * Properties of a RayOperatorConfig. + * @memberof google.container.v1 + * @interface IRayOperatorConfig + * @property {boolean|null} [enabled] RayOperatorConfig enabled + * @property {google.container.v1.IRayClusterLoggingConfig|null} [rayClusterLoggingConfig] RayOperatorConfig rayClusterLoggingConfig + * @property {google.container.v1.IRayClusterMonitoringConfig|null} [rayClusterMonitoringConfig] RayOperatorConfig rayClusterMonitoringConfig + */ + + /** + * Constructs a new RayOperatorConfig. + * @memberof google.container.v1 + * @classdesc Represents a RayOperatorConfig. + * @implements IRayOperatorConfig + * @constructor + * @param {google.container.v1.IRayOperatorConfig=} [properties] Properties to set + */ + function RayOperatorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayOperatorConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.enabled = false; + + /** + * RayOperatorConfig rayClusterLoggingConfig. + * @member {google.container.v1.IRayClusterLoggingConfig|null|undefined} rayClusterLoggingConfig + * @memberof google.container.v1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.rayClusterLoggingConfig = null; + + /** + * RayOperatorConfig rayClusterMonitoringConfig. + * @member {google.container.v1.IRayClusterMonitoringConfig|null|undefined} rayClusterMonitoringConfig + * @memberof google.container.v1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.rayClusterMonitoringConfig = null; + + /** + * Creates a new RayOperatorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {google.container.v1.IRayOperatorConfig=} [properties] Properties to set + * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig instance + */ + RayOperatorConfig.create = function create(properties) { + return new RayOperatorConfig(properties); + }; + + /** + * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {google.container.v1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayOperatorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.rayClusterLoggingConfig != null && Object.hasOwnProperty.call(message, "rayClusterLoggingConfig")) + $root.google.container.v1.RayClusterLoggingConfig.encode(message.rayClusterLoggingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rayClusterMonitoringConfig != null && Object.hasOwnProperty.call(message, "rayClusterMonitoringConfig")) + $root.google.container.v1.RayClusterMonitoringConfig.encode(message.rayClusterMonitoringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {google.container.v1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayOperatorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayOperatorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayOperatorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayOperatorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayOperatorConfig message. + * @function verify + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayOperatorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) { + var error = $root.google.container.v1.RayClusterLoggingConfig.verify(message.rayClusterLoggingConfig); + if (error) + return "rayClusterLoggingConfig." + error; + } + if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) { + var error = $root.google.container.v1.RayClusterMonitoringConfig.verify(message.rayClusterMonitoringConfig); + if (error) + return "rayClusterMonitoringConfig." + error; + } + return null; + }; + + /** + * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig + */ + RayOperatorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RayOperatorConfig) + return object; + var message = new $root.google.container.v1.RayOperatorConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.rayClusterLoggingConfig != null) { + if (typeof object.rayClusterLoggingConfig !== "object") + throw TypeError(".google.container.v1.RayOperatorConfig.rayClusterLoggingConfig: object expected"); + message.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.fromObject(object.rayClusterLoggingConfig); + } + if (object.rayClusterMonitoringConfig != null) { + if (typeof object.rayClusterMonitoringConfig !== "object") + throw TypeError(".google.container.v1.RayOperatorConfig.rayClusterMonitoringConfig: object expected"); + message.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.fromObject(object.rayClusterMonitoringConfig); + } + return message; + }; + + /** + * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {google.container.v1.RayOperatorConfig} message RayOperatorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayOperatorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.rayClusterLoggingConfig = null; + object.rayClusterMonitoringConfig = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) + object.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.toObject(message.rayClusterLoggingConfig, options); + if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) + object.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.toObject(message.rayClusterMonitoringConfig, options); + return object; + }; + + /** + * Converts this RayOperatorConfig to JSON. + * @function toJSON + * @memberof google.container.v1.RayOperatorConfig + * @instance + * @returns {Object.} JSON object + */ + RayOperatorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayOperatorConfig + * @function getTypeUrl + * @memberof google.container.v1.RayOperatorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayOperatorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RayOperatorConfig"; + }; + + return RayOperatorConfig; + })(); + + v1.GkeBackupAgentConfig = (function() { + + /** + * Properties of a GkeBackupAgentConfig. + * @memberof google.container.v1 + * @interface IGkeBackupAgentConfig + * @property {boolean|null} [enabled] GkeBackupAgentConfig enabled + */ + + /** + * Constructs a new GkeBackupAgentConfig. + * @memberof google.container.v1 + * @classdesc Represents a GkeBackupAgentConfig. + * @implements IGkeBackupAgentConfig + * @constructor + * @param {google.container.v1.IGkeBackupAgentConfig=} [properties] Properties to set + */ + function GkeBackupAgentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GkeBackupAgentConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.GkeBackupAgentConfig + * @instance + */ + GkeBackupAgentConfig.prototype.enabled = false; + + /** + * Creates a new GkeBackupAgentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {google.container.v1.IGkeBackupAgentConfig=} [properties] Properties to set + * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig instance + */ + GkeBackupAgentConfig.create = function create(properties) { + return new GkeBackupAgentConfig(properties); + }; + + /** + * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {google.container.v1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeBackupAgentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {google.container.v1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeBackupAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeBackupAgentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GkeBackupAgentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeBackupAgentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GkeBackupAgentConfig message. + * @function verify + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GkeBackupAgentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig + */ + GkeBackupAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GkeBackupAgentConfig) + return object; + var message = new $root.google.container.v1.GkeBackupAgentConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {google.container.v1.GkeBackupAgentConfig} message GkeBackupAgentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GkeBackupAgentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GkeBackupAgentConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GkeBackupAgentConfig + * @instance + * @returns {Object.} JSON object + */ + GkeBackupAgentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GkeBackupAgentConfig + * @function getTypeUrl + * @memberof google.container.v1.GkeBackupAgentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GkeBackupAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GkeBackupAgentConfig"; + }; + + return GkeBackupAgentConfig; + })(); + + v1.StatefulHAConfig = (function() { + + /** + * Properties of a StatefulHAConfig. + * @memberof google.container.v1 + * @interface IStatefulHAConfig + * @property {boolean|null} [enabled] StatefulHAConfig enabled + */ + + /** + * Constructs a new StatefulHAConfig. + * @memberof google.container.v1 + * @classdesc Represents a StatefulHAConfig. + * @implements IStatefulHAConfig + * @constructor + * @param {google.container.v1.IStatefulHAConfig=} [properties] Properties to set + */ + function StatefulHAConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatefulHAConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.StatefulHAConfig + * @instance + */ + StatefulHAConfig.prototype.enabled = false; + + /** + * Creates a new StatefulHAConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {google.container.v1.IStatefulHAConfig=} [properties] Properties to set + * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig instance + */ + StatefulHAConfig.create = function create(properties) { + return new StatefulHAConfig(properties); + }; + + /** + * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {google.container.v1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatefulHAConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {google.container.v1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatefulHAConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatefulHAConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StatefulHAConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatefulHAConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatefulHAConfig message. + * @function verify + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatefulHAConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig + */ + StatefulHAConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.StatefulHAConfig) + return object; + var message = new $root.google.container.v1.StatefulHAConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {google.container.v1.StatefulHAConfig} message StatefulHAConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatefulHAConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this StatefulHAConfig to JSON. + * @function toJSON + * @memberof google.container.v1.StatefulHAConfig + * @instance + * @returns {Object.} JSON object + */ + StatefulHAConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatefulHAConfig + * @function getTypeUrl + * @memberof google.container.v1.StatefulHAConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatefulHAConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.StatefulHAConfig"; + }; + + return StatefulHAConfig; + })(); + + v1.MasterAuthorizedNetworksConfig = (function() { + + /** + * Properties of a MasterAuthorizedNetworksConfig. + * @memberof google.container.v1 + * @interface IMasterAuthorizedNetworksConfig + * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled + * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks + * @property {boolean|null} [gcpPublicCidrsAccessEnabled] MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled + * @property {boolean|null} [privateEndpointEnforcementEnabled] MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled + */ + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @memberof google.container.v1 + * @classdesc Represents a MasterAuthorizedNetworksConfig. + * @implements IMasterAuthorizedNetworksConfig + * @constructor + * @param {google.container.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + */ + function MasterAuthorizedNetworksConfig(properties) { + this.cidrBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuthorizedNetworksConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.enabled = false; + + /** + * MasterAuthorizedNetworksConfig cidrBlocks. + * @member {Array.} cidrBlocks + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; + + /** + * MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. + * @member {boolean|null|undefined} gcpPublicCidrsAccessEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.gcpPublicCidrsAccessEnabled = null; + + /** + * MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. + * @member {boolean|null|undefined} privateEndpointEnforcementEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.privateEndpointEnforcementEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. + * @member {"gcpPublicCidrsAccessEnabled"|undefined} _gcpPublicCidrsAccessEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_gcpPublicCidrsAccessEnabled", { + get: $util.oneOfGetter($oneOfFields = ["gcpPublicCidrsAccessEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. + * @member {"privateEndpointEnforcementEnabled"|undefined} _privateEndpointEnforcementEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_privateEndpointEnforcementEnabled", { + get: $util.oneOfGetter($oneOfFields = ["privateEndpointEnforcementEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance + */ + MasterAuthorizedNetworksConfig.create = function create(properties) { + return new MasterAuthorizedNetworksConfig(properties); + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.cidrBlocks != null && message.cidrBlocks.length) + for (var i = 0; i < message.cidrBlocks.length; ++i) + $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcpPublicCidrsAccessEnabled != null && Object.hasOwnProperty.call(message, "gcpPublicCidrsAccessEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.gcpPublicCidrsAccessEnabled); + if (message.privateEndpointEnforcementEnabled != null && Object.hasOwnProperty.call(message, "privateEndpointEnforcementEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.privateEndpointEnforcementEnabled); + return writer; + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuthorizedNetworksConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.cidrBlocks && message.cidrBlocks.length)) + message.cidrBlocks = []; + message.cidrBlocks.push($root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); + break; + } + case 3: { + message.gcpPublicCidrsAccessEnabled = reader.bool(); + break; + } + case 5: { + message.privateEndpointEnforcementEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @function verify + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuthorizedNetworksConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { + if (!Array.isArray(message.cidrBlocks)) + return "cidrBlocks: array expected"; + for (var i = 0; i < message.cidrBlocks.length; ++i) { + var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); + if (error) + return "cidrBlocks." + error; + } + } + if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { + properties._gcpPublicCidrsAccessEnabled = 1; + if (typeof message.gcpPublicCidrsAccessEnabled !== "boolean") + return "gcpPublicCidrsAccessEnabled: boolean expected"; + } + if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { + properties._privateEndpointEnforcementEnabled = 1; + if (typeof message.privateEndpointEnforcementEnabled !== "boolean") + return "privateEndpointEnforcementEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + */ + MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MasterAuthorizedNetworksConfig) + return object; + var message = new $root.google.container.v1.MasterAuthorizedNetworksConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.cidrBlocks) { + if (!Array.isArray(object.cidrBlocks)) + throw TypeError(".google.container.v1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); + message.cidrBlocks = []; + for (var i = 0; i < object.cidrBlocks.length; ++i) { + if (typeof object.cidrBlocks[i] !== "object") + throw TypeError(".google.container.v1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); + message.cidrBlocks[i] = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); + } + } + if (object.gcpPublicCidrsAccessEnabled != null) + message.gcpPublicCidrsAccessEnabled = Boolean(object.gcpPublicCidrsAccessEnabled); + if (object.privateEndpointEnforcementEnabled != null) + message.privateEndpointEnforcementEnabled = Boolean(object.privateEndpointEnforcementEnabled); + return message; + }; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cidrBlocks = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.cidrBlocks && message.cidrBlocks.length) { + object.cidrBlocks = []; + for (var j = 0; j < message.cidrBlocks.length; ++j) + object.cidrBlocks[j] = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); + } + if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { + object.gcpPublicCidrsAccessEnabled = message.gcpPublicCidrsAccessEnabled; + if (options.oneofs) + object._gcpPublicCidrsAccessEnabled = "gcpPublicCidrsAccessEnabled"; + } + if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { + object.privateEndpointEnforcementEnabled = message.privateEndpointEnforcementEnabled; + if (options.oneofs) + object._privateEndpointEnforcementEnabled = "privateEndpointEnforcementEnabled"; + } + return object; + }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @function toJSON + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + * @returns {Object.} JSON object + */ + MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @function getTypeUrl + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MasterAuthorizedNetworksConfig"; + }; + + MasterAuthorizedNetworksConfig.CidrBlock = (function() { + + /** + * Properties of a CidrBlock. + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @interface ICidrBlock + * @property {string|null} [displayName] CidrBlock displayName + * @property {string|null} [cidrBlock] CidrBlock cidrBlock + */ + + /** + * Constructs a new CidrBlock. + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @classdesc Represents a CidrBlock. + * @implements ICidrBlock + * @constructor + * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + */ + function CidrBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CidrBlock displayName. + * @member {string} displayName + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.displayName = ""; + + /** + * CidrBlock cidrBlock. + * @member {string} cidrBlock + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.cidrBlock = ""; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @function create + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance + */ + CidrBlock.create = function create(properties) { + return new CidrBlock(properties); + }; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); + return writer; + }; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.cidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CidrBlock message. + * @function verify + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CidrBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + if (!$util.isString(message.cidrBlock)) + return "cidrBlock: string expected"; + return null; + }; + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + */ + CidrBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock) + return object; + var message = new $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cidrBlock != null) + message.cidrBlock = String(object.cidrBlock); + return message; + }; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CidrBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.cidrBlock = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + object.cidrBlock = message.cidrBlock; + return object; + }; + + /** + * Converts this CidrBlock to JSON. + * @function toJSON + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + * @returns {Object.} JSON object + */ + CidrBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CidrBlock + * @function getTypeUrl + * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"; + }; + + return CidrBlock; + })(); + + return MasterAuthorizedNetworksConfig; + })(); + + v1.LegacyAbac = (function() { + + /** + * Properties of a LegacyAbac. + * @memberof google.container.v1 + * @interface ILegacyAbac + * @property {boolean|null} [enabled] LegacyAbac enabled + */ + + /** + * Constructs a new LegacyAbac. + * @memberof google.container.v1 + * @classdesc Represents a LegacyAbac. + * @implements ILegacyAbac + * @constructor + * @param {google.container.v1.ILegacyAbac=} [properties] Properties to set + */ + function LegacyAbac(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LegacyAbac enabled. + * @member {boolean} enabled + * @memberof google.container.v1.LegacyAbac + * @instance + */ + LegacyAbac.prototype.enabled = false; + + /** + * Creates a new LegacyAbac instance using the specified properties. + * @function create + * @memberof google.container.v1.LegacyAbac + * @static + * @param {google.container.v1.ILegacyAbac=} [properties] Properties to set + * @returns {google.container.v1.LegacyAbac} LegacyAbac instance + */ + LegacyAbac.create = function create(properties) { + return new LegacyAbac(properties); + }; + + /** + * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LegacyAbac + * @static + * @param {google.container.v1.ILegacyAbac} message LegacyAbac message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAbac.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LegacyAbac + * @static + * @param {google.container.v1.ILegacyAbac} message LegacyAbac message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAbac.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LegacyAbac + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LegacyAbac} LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAbac.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LegacyAbac(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LegacyAbac + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LegacyAbac} LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAbac.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LegacyAbac message. + * @function verify + * @memberof google.container.v1.LegacyAbac + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LegacyAbac.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LegacyAbac + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LegacyAbac} LegacyAbac + */ + LegacyAbac.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LegacyAbac) + return object; + var message = new $root.google.container.v1.LegacyAbac(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LegacyAbac + * @static + * @param {google.container.v1.LegacyAbac} message LegacyAbac + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LegacyAbac.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this LegacyAbac to JSON. + * @function toJSON + * @memberof google.container.v1.LegacyAbac + * @instance + * @returns {Object.} JSON object + */ + LegacyAbac.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LegacyAbac + * @function getTypeUrl + * @memberof google.container.v1.LegacyAbac + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LegacyAbac.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LegacyAbac"; + }; + + return LegacyAbac; + })(); + + v1.NetworkPolicy = (function() { + + /** + * Properties of a NetworkPolicy. + * @memberof google.container.v1 + * @interface INetworkPolicy + * @property {google.container.v1.NetworkPolicy.Provider|null} [provider] NetworkPolicy provider + * @property {boolean|null} [enabled] NetworkPolicy enabled + */ + + /** + * Constructs a new NetworkPolicy. + * @memberof google.container.v1 + * @classdesc Represents a NetworkPolicy. + * @implements INetworkPolicy + * @constructor + * @param {google.container.v1.INetworkPolicy=} [properties] Properties to set + */ + function NetworkPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPolicy provider. + * @member {google.container.v1.NetworkPolicy.Provider} provider + * @memberof google.container.v1.NetworkPolicy + * @instance + */ + NetworkPolicy.prototype.provider = 0; + + /** + * NetworkPolicy enabled. + * @member {boolean} enabled + * @memberof google.container.v1.NetworkPolicy + * @instance + */ + NetworkPolicy.prototype.enabled = false; + + /** + * Creates a new NetworkPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {google.container.v1.INetworkPolicy=} [properties] Properties to set + * @returns {google.container.v1.NetworkPolicy} NetworkPolicy instance + */ + NetworkPolicy.create = function create(properties) { + return new NetworkPolicy(properties); + }; + + /** + * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {google.container.v1.INetworkPolicy} message NetworkPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {google.container.v1.INetworkPolicy} message NetworkPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NetworkPolicy} NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.int32(); + break; + } + case 2: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NetworkPolicy} NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPolicy message. + * @function verify + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + switch (message.provider) { + default: + return "provider: enum value expected"; + case 0: + case 1: + break; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NetworkPolicy} NetworkPolicy + */ + NetworkPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NetworkPolicy) + return object; + var message = new $root.google.container.v1.NetworkPolicy(); + switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "PROVIDER_UNSPECIFIED": + case 0: + message.provider = 0; + break; + case "CALICO": + case 1: + message.provider = 1; + break; + } + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {google.container.v1.NetworkPolicy} message NetworkPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; + object.enabled = false; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = options.enums === String ? $root.google.container.v1.NetworkPolicy.Provider[message.provider] === undefined ? message.provider : $root.google.container.v1.NetworkPolicy.Provider[message.provider] : message.provider; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this NetworkPolicy to JSON. + * @function toJSON + * @memberof google.container.v1.NetworkPolicy + * @instance + * @returns {Object.} JSON object + */ + NetworkPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPolicy + * @function getTypeUrl + * @memberof google.container.v1.NetworkPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NetworkPolicy"; + }; + + /** + * Provider enum. + * @name google.container.v1.NetworkPolicy.Provider + * @enum {number} + * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value + * @property {number} CALICO=1 CALICO value + */ + NetworkPolicy.Provider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "CALICO"] = 1; + return values; + })(); + + return NetworkPolicy; + })(); + + v1.BinaryAuthorization = (function() { + + /** + * Properties of a BinaryAuthorization. + * @memberof google.container.v1 + * @interface IBinaryAuthorization + * @property {boolean|null} [enabled] BinaryAuthorization enabled + * @property {google.container.v1.BinaryAuthorization.EvaluationMode|null} [evaluationMode] BinaryAuthorization evaluationMode + */ + + /** + * Constructs a new BinaryAuthorization. + * @memberof google.container.v1 + * @classdesc Represents a BinaryAuthorization. + * @implements IBinaryAuthorization + * @constructor + * @param {google.container.v1.IBinaryAuthorization=} [properties] Properties to set + */ + function BinaryAuthorization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryAuthorization enabled. + * @member {boolean} enabled + * @memberof google.container.v1.BinaryAuthorization + * @instance + */ + BinaryAuthorization.prototype.enabled = false; + + /** + * BinaryAuthorization evaluationMode. + * @member {google.container.v1.BinaryAuthorization.EvaluationMode} evaluationMode + * @memberof google.container.v1.BinaryAuthorization + * @instance + */ + BinaryAuthorization.prototype.evaluationMode = 0; + + /** + * Creates a new BinaryAuthorization instance using the specified properties. + * @function create + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {google.container.v1.IBinaryAuthorization=} [properties] Properties to set + * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization instance + */ + BinaryAuthorization.create = function create(properties) { + return new BinaryAuthorization(properties); + }; + + /** + * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. + * @function encode + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {google.container.v1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryAuthorization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.evaluationMode != null && Object.hasOwnProperty.call(message, "evaluationMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationMode); + return writer; + }; + + /** + * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {google.container.v1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryAuthorization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryAuthorization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BinaryAuthorization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.evaluationMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryAuthorization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryAuthorization message. + * @function verify + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryAuthorization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + switch (message.evaluationMode) { + default: + return "evaluationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization + */ + BinaryAuthorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.BinaryAuthorization) + return object; + var message = new $root.google.container.v1.BinaryAuthorization(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + switch (object.evaluationMode) { + default: + if (typeof object.evaluationMode === "number") { + message.evaluationMode = object.evaluationMode; + break; + } + break; + case "EVALUATION_MODE_UNSPECIFIED": + case 0: + message.evaluationMode = 0; + break; + case "DISABLED": + case 1: + message.evaluationMode = 1; + break; + case "PROJECT_SINGLETON_POLICY_ENFORCE": + case 2: + message.evaluationMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {google.container.v1.BinaryAuthorization} message BinaryAuthorization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryAuthorization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.evaluationMode = options.enums === String ? "EVALUATION_MODE_UNSPECIFIED" : 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + object.evaluationMode = options.enums === String ? $root.google.container.v1.BinaryAuthorization.EvaluationMode[message.evaluationMode] === undefined ? message.evaluationMode : $root.google.container.v1.BinaryAuthorization.EvaluationMode[message.evaluationMode] : message.evaluationMode; + return object; + }; + + /** + * Converts this BinaryAuthorization to JSON. + * @function toJSON + * @memberof google.container.v1.BinaryAuthorization + * @instance + * @returns {Object.} JSON object + */ + BinaryAuthorization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryAuthorization + * @function getTypeUrl + * @memberof google.container.v1.BinaryAuthorization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.BinaryAuthorization"; + }; + + /** + * EvaluationMode enum. + * @name google.container.v1.BinaryAuthorization.EvaluationMode + * @enum {number} + * @property {number} EVALUATION_MODE_UNSPECIFIED=0 EVALUATION_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} PROJECT_SINGLETON_POLICY_ENFORCE=2 PROJECT_SINGLETON_POLICY_ENFORCE value + */ + BinaryAuthorization.EvaluationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "PROJECT_SINGLETON_POLICY_ENFORCE"] = 2; + return values; + })(); + + return BinaryAuthorization; + })(); + + v1.PodCIDROverprovisionConfig = (function() { + + /** + * Properties of a PodCIDROverprovisionConfig. + * @memberof google.container.v1 + * @interface IPodCIDROverprovisionConfig + * @property {boolean|null} [disable] PodCIDROverprovisionConfig disable + */ + + /** + * Constructs a new PodCIDROverprovisionConfig. + * @memberof google.container.v1 + * @classdesc Represents a PodCIDROverprovisionConfig. + * @implements IPodCIDROverprovisionConfig + * @constructor + * @param {google.container.v1.IPodCIDROverprovisionConfig=} [properties] Properties to set + */ + function PodCIDROverprovisionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PodCIDROverprovisionConfig disable. + * @member {boolean} disable + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @instance + */ + PodCIDROverprovisionConfig.prototype.disable = false; + + /** + * Creates a new PodCIDROverprovisionConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1.IPodCIDROverprovisionConfig=} [properties] Properties to set + * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig instance + */ + PodCIDROverprovisionConfig.create = function create(properties) { + return new PodCIDROverprovisionConfig(properties); + }; + + /** + * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodCIDROverprovisionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); + return writer; + }; + + /** + * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodCIDROverprovisionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodCIDROverprovisionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PodCIDROverprovisionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodCIDROverprovisionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PodCIDROverprovisionConfig message. + * @function verify + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PodCIDROverprovisionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disable != null && message.hasOwnProperty("disable")) + if (typeof message.disable !== "boolean") + return "disable: boolean expected"; + return null; + }; + + /** + * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + */ + PodCIDROverprovisionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.PodCIDROverprovisionConfig) + return object; + var message = new $root.google.container.v1.PodCIDROverprovisionConfig(); + if (object.disable != null) + message.disable = Boolean(object.disable); + return message; + }; + + /** + * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1.PodCIDROverprovisionConfig} message PodCIDROverprovisionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PodCIDROverprovisionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disable = false; + if (message.disable != null && message.hasOwnProperty("disable")) + object.disable = message.disable; + return object; + }; + + /** + * Converts this PodCIDROverprovisionConfig to JSON. + * @function toJSON + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @instance + * @returns {Object.} JSON object + */ + PodCIDROverprovisionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PodCIDROverprovisionConfig + * @function getTypeUrl + * @memberof google.container.v1.PodCIDROverprovisionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PodCIDROverprovisionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.PodCIDROverprovisionConfig"; + }; + + return PodCIDROverprovisionConfig; + })(); + + v1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.container.v1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {boolean|null} [createSubnetwork] IPAllocationPolicy createSubnetwork + * @property {string|null} [subnetworkName] IPAllocationPolicy subnetworkName + * @property {string|null} [clusterIpv4Cidr] IPAllocationPolicy clusterIpv4Cidr + * @property {string|null} [nodeIpv4Cidr] IPAllocationPolicy nodeIpv4Cidr + * @property {string|null} [servicesIpv4Cidr] IPAllocationPolicy servicesIpv4Cidr + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [nodeIpv4CidrBlock] IPAllocationPolicy nodeIpv4CidrBlock + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + * @property {string|null} [tpuIpv4CidrBlock] IPAllocationPolicy tpuIpv4CidrBlock + * @property {boolean|null} [useRoutes] IPAllocationPolicy useRoutes + * @property {google.container.v1.StackType|null} [stackType] IPAllocationPolicy stackType + * @property {google.container.v1.IPv6AccessType|null} [ipv6AccessType] IPAllocationPolicy ipv6AccessType + * @property {google.container.v1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] IPAllocationPolicy podCidrOverprovisionConfig + * @property {string|null} [subnetIpv6CidrBlock] IPAllocationPolicy subnetIpv6CidrBlock + * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock + * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] IPAllocationPolicy additionalPodRangesConfig + * @property {number|null} [defaultPodIpv4RangeUtilization] IPAllocationPolicy defaultPodIpv4RangeUtilization + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.container.v1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.container.v1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy createSubnetwork. + * @member {boolean} createSubnetwork + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.createSubnetwork = false; + + /** + * IPAllocationPolicy subnetworkName. + * @member {string} subnetworkName + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.subnetworkName = ""; + + /** + * IPAllocationPolicy clusterIpv4Cidr. + * @member {string} clusterIpv4Cidr + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4Cidr = ""; + + /** + * IPAllocationPolicy nodeIpv4Cidr. + * @member {string} nodeIpv4Cidr + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.nodeIpv4Cidr = ""; + + /** + * IPAllocationPolicy servicesIpv4Cidr. + * @member {string} servicesIpv4Cidr + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4Cidr = ""; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string} clusterSecondaryRangeName + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string} servicesSecondaryRangeName + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string} clusterIpv4CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy nodeIpv4CidrBlock. + * @member {string} nodeIpv4CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.nodeIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string} servicesIpv4CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy tpuIpv4CidrBlock. + * @member {string} tpuIpv4CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.tpuIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy useRoutes. + * @member {boolean} useRoutes + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useRoutes = false; + + /** + * IPAllocationPolicy stackType. + * @member {google.container.v1.StackType} stackType + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.stackType = 0; + + /** + * IPAllocationPolicy ipv6AccessType. + * @member {google.container.v1.IPv6AccessType} ipv6AccessType + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.ipv6AccessType = 0; + + /** + * IPAllocationPolicy podCidrOverprovisionConfig. + * @member {google.container.v1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.podCidrOverprovisionConfig = null; + + /** + * IPAllocationPolicy subnetIpv6CidrBlock. + * @member {string} subnetIpv6CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.subnetIpv6CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv6CidrBlock. + * @member {string} servicesIpv6CidrBlock + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv6CidrBlock = ""; + + /** + * IPAllocationPolicy additionalPodRangesConfig. + * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.additionalPodRangesConfig = null; + + /** + * IPAllocationPolicy defaultPodIpv4RangeUtilization. + * @member {number} defaultPodIpv4RangeUtilization + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.defaultPodIpv4RangeUtilization = 0; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {google.container.v1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {google.container.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.createSubnetwork != null && Object.hasOwnProperty.call(message, "createSubnetwork")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.createSubnetwork); + if (message.subnetworkName != null && Object.hasOwnProperty.call(message, "subnetworkName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetworkName); + if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4Cidr); + if (message.nodeIpv4Cidr != null && Object.hasOwnProperty.call(message, "nodeIpv4Cidr")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeIpv4Cidr); + if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.servicesIpv4Cidr); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4CidrBlock); + if (message.nodeIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrBlock")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.nodeIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.servicesIpv4CidrBlock); + if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.tpuIpv4CidrBlock); + if (message.useRoutes != null && Object.hasOwnProperty.call(message, "useRoutes")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.useRoutes); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ipv6AccessType); + if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) + $root.google.container.v1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.subnetIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "subnetIpv6CidrBlock")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.subnetIpv6CidrBlock); + if (message.servicesIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv6CidrBlock")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.servicesIpv6CidrBlock); + if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) + $root.google.container.v1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.defaultPodIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "defaultPodIpv4RangeUtilization")) + writer.uint32(/* id 25, wireType 1 =*/201).double(message.defaultPodIpv4RangeUtilization); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {google.container.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.createSubnetwork = reader.bool(); + break; + } + case 3: { + message.subnetworkName = reader.string(); + break; + } + case 4: { + message.clusterIpv4Cidr = reader.string(); + break; + } + case 5: { + message.nodeIpv4Cidr = reader.string(); + break; + } + case 6: { + message.servicesIpv4Cidr = reader.string(); + break; + } + case 7: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 8: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 9: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 10: { + message.nodeIpv4CidrBlock = reader.string(); + break; + } + case 11: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } + case 13: { + message.tpuIpv4CidrBlock = reader.string(); + break; + } + case 15: { + message.useRoutes = reader.bool(); + break; + } + case 16: { + message.stackType = reader.int32(); + break; + } + case 17: { + message.ipv6AccessType = reader.int32(); + break; + } + case 21: { + message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.subnetIpv6CidrBlock = reader.string(); + break; + } + case 23: { + message.servicesIpv6CidrBlock = reader.string(); + break; + } + case 24: { + message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 25: { + message.defaultPodIpv4RangeUtilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) + if (typeof message.createSubnetwork !== "boolean") + return "createSubnetwork: boolean expected"; + if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) + if (!$util.isString(message.subnetworkName)) + return "subnetworkName: string expected"; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + if (!$util.isString(message.clusterIpv4Cidr)) + return "clusterIpv4Cidr: string expected"; + if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) + if (!$util.isString(message.nodeIpv4Cidr)) + return "nodeIpv4Cidr: string expected"; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + if (!$util.isString(message.servicesIpv4Cidr)) + return "servicesIpv4Cidr: string expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) + if (!$util.isString(message.nodeIpv4CidrBlock)) + return "nodeIpv4CidrBlock: string expected"; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + if (!$util.isString(message.tpuIpv4CidrBlock)) + return "tpuIpv4CidrBlock: string expected"; + if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) + if (typeof message.useRoutes !== "boolean") + return "useRoutes: boolean expected"; + if (message.stackType != null && message.hasOwnProperty("stackType")) + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { + var error = $root.google.container.v1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); + if (error) + return "podCidrOverprovisionConfig." + error; + } + if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) + if (!$util.isString(message.subnetIpv6CidrBlock)) + return "subnetIpv6CidrBlock: string expected"; + if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) + if (!$util.isString(message.servicesIpv6CidrBlock)) + return "servicesIpv6CidrBlock: string expected"; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { + var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); + if (error) + return "additionalPodRangesConfig." + error; + } + if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) + if (typeof message.defaultPodIpv4RangeUtilization !== "number") + return "defaultPodIpv4RangeUtilization: number expected"; + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.IPAllocationPolicy) + return object; + var message = new $root.google.container.v1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.createSubnetwork != null) + message.createSubnetwork = Boolean(object.createSubnetwork); + if (object.subnetworkName != null) + message.subnetworkName = String(object.subnetworkName); + if (object.clusterIpv4Cidr != null) + message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); + if (object.nodeIpv4Cidr != null) + message.nodeIpv4Cidr = String(object.nodeIpv4Cidr); + if (object.servicesIpv4Cidr != null) + message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.nodeIpv4CidrBlock != null) + message.nodeIpv4CidrBlock = String(object.nodeIpv4CidrBlock); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + if (object.tpuIpv4CidrBlock != null) + message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); + if (object.useRoutes != null) + message.useRoutes = Boolean(object.useRoutes); + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "IPV6_ACCESS_TYPE_UNSPECIFIED": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.podCidrOverprovisionConfig != null) { + if (typeof object.podCidrOverprovisionConfig !== "object") + throw TypeError(".google.container.v1.IPAllocationPolicy.podCidrOverprovisionConfig: object expected"); + message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); + } + if (object.subnetIpv6CidrBlock != null) + message.subnetIpv6CidrBlock = String(object.subnetIpv6CidrBlock); + if (object.servicesIpv6CidrBlock != null) + message.servicesIpv6CidrBlock = String(object.servicesIpv6CidrBlock); + if (object.additionalPodRangesConfig != null) { + if (typeof object.additionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1.IPAllocationPolicy.additionalPodRangesConfig: object expected"); + message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); + } + if (object.defaultPodIpv4RangeUtilization != null) + message.defaultPodIpv4RangeUtilization = Number(object.defaultPodIpv4RangeUtilization); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {google.container.v1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useIpAliases = false; + object.createSubnetwork = false; + object.subnetworkName = ""; + object.clusterIpv4Cidr = ""; + object.nodeIpv4Cidr = ""; + object.servicesIpv4Cidr = ""; + object.clusterSecondaryRangeName = ""; + object.servicesSecondaryRangeName = ""; + object.clusterIpv4CidrBlock = ""; + object.nodeIpv4CidrBlock = ""; + object.servicesIpv4CidrBlock = ""; + object.tpuIpv4CidrBlock = ""; + object.useRoutes = false; + object.stackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; + object.ipv6AccessType = options.enums === String ? "IPV6_ACCESS_TYPE_UNSPECIFIED" : 0; + object.podCidrOverprovisionConfig = null; + object.subnetIpv6CidrBlock = ""; + object.servicesIpv6CidrBlock = ""; + object.additionalPodRangesConfig = null; + object.defaultPodIpv4RangeUtilization = 0; + } + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) + object.createSubnetwork = message.createSubnetwork; + if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) + object.subnetworkName = message.subnetworkName; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + object.clusterIpv4Cidr = message.clusterIpv4Cidr; + if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) + object.nodeIpv4Cidr = message.nodeIpv4Cidr; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + object.servicesIpv4Cidr = message.servicesIpv4Cidr; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) + object.nodeIpv4CidrBlock = message.nodeIpv4CidrBlock; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; + if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) + object.useRoutes = message.useRoutes; + if (message.stackType != null && message.hasOwnProperty("stackType")) + object.stackType = options.enums === String ? $root.google.container.v1.StackType[message.stackType] === undefined ? message.stackType : $root.google.container.v1.StackType[message.stackType] : message.stackType; + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) + object.ipv6AccessType = options.enums === String ? $root.google.container.v1.IPv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.container.v1.IPv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) + object.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); + if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) + object.subnetIpv6CidrBlock = message.subnetIpv6CidrBlock; + if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) + object.servicesIpv6CidrBlock = message.servicesIpv6CidrBlock; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) + object.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); + if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) + object.defaultPodIpv4RangeUtilization = options.json && !isFinite(message.defaultPodIpv4RangeUtilization) ? String(message.defaultPodIpv4RangeUtilization) : message.defaultPodIpv4RangeUtilization; + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.container.v1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.container.v1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.IPAllocationPolicy"; + }; + + return IPAllocationPolicy; + })(); + + v1.Cluster = (function() { + + /** + * Properties of a Cluster. + * @memberof google.container.v1 + * @interface ICluster + * @property {string|null} [name] Cluster name + * @property {string|null} [description] Cluster description + * @property {number|null} [initialNodeCount] Cluster initialNodeCount + * @property {google.container.v1.INodeConfig|null} [nodeConfig] Cluster nodeConfig + * @property {google.container.v1.IMasterAuth|null} [masterAuth] Cluster masterAuth + * @property {string|null} [loggingService] Cluster loggingService + * @property {string|null} [monitoringService] Cluster monitoringService + * @property {string|null} [network] Cluster network + * @property {string|null} [clusterIpv4Cidr] Cluster clusterIpv4Cidr + * @property {google.container.v1.IAddonsConfig|null} [addonsConfig] Cluster addonsConfig + * @property {string|null} [subnetwork] Cluster subnetwork + * @property {Array.|null} [nodePools] Cluster nodePools + * @property {Array.|null} [locations] Cluster locations + * @property {boolean|null} [enableKubernetesAlpha] Cluster enableKubernetesAlpha + * @property {Object.|null} [resourceLabels] Cluster resourceLabels + * @property {string|null} [labelFingerprint] Cluster labelFingerprint + * @property {google.container.v1.ILegacyAbac|null} [legacyAbac] Cluster legacyAbac + * @property {google.container.v1.INetworkPolicy|null} [networkPolicy] Cluster networkPolicy + * @property {google.container.v1.IIPAllocationPolicy|null} [ipAllocationPolicy] Cluster ipAllocationPolicy + * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] Cluster masterAuthorizedNetworksConfig + * @property {google.container.v1.IMaintenancePolicy|null} [maintenancePolicy] Cluster maintenancePolicy + * @property {google.container.v1.IBinaryAuthorization|null} [binaryAuthorization] Cluster binaryAuthorization + * @property {google.container.v1.IClusterAutoscaling|null} [autoscaling] Cluster autoscaling + * @property {google.container.v1.INetworkConfig|null} [networkConfig] Cluster networkConfig + * @property {google.container.v1.IMaxPodsConstraint|null} [defaultMaxPodsConstraint] Cluster defaultMaxPodsConstraint + * @property {google.container.v1.IResourceUsageExportConfig|null} [resourceUsageExportConfig] Cluster resourceUsageExportConfig + * @property {google.container.v1.IAuthenticatorGroupsConfig|null} [authenticatorGroupsConfig] Cluster authenticatorGroupsConfig + * @property {google.container.v1.IPrivateClusterConfig|null} [privateClusterConfig] Cluster privateClusterConfig + * @property {google.container.v1.IDatabaseEncryption|null} [databaseEncryption] Cluster databaseEncryption + * @property {google.container.v1.IVerticalPodAutoscaling|null} [verticalPodAutoscaling] Cluster verticalPodAutoscaling + * @property {google.container.v1.IShieldedNodes|null} [shieldedNodes] Cluster shieldedNodes + * @property {google.container.v1.IReleaseChannel|null} [releaseChannel] Cluster releaseChannel + * @property {google.container.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] Cluster workloadIdentityConfig + * @property {google.container.v1.IMeshCertificates|null} [meshCertificates] Cluster meshCertificates + * @property {google.container.v1.ICostManagementConfig|null} [costManagementConfig] Cluster costManagementConfig + * @property {google.container.v1.INotificationConfig|null} [notificationConfig] Cluster notificationConfig + * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] Cluster confidentialNodes + * @property {google.container.v1.IIdentityServiceConfig|null} [identityServiceConfig] Cluster identityServiceConfig + * @property {string|null} [selfLink] Cluster selfLink + * @property {string|null} [zone] Cluster zone + * @property {string|null} [endpoint] Cluster endpoint + * @property {string|null} [initialClusterVersion] Cluster initialClusterVersion + * @property {string|null} [currentMasterVersion] Cluster currentMasterVersion + * @property {string|null} [currentNodeVersion] Cluster currentNodeVersion + * @property {string|null} [createTime] Cluster createTime + * @property {google.container.v1.Cluster.Status|null} [status] Cluster status + * @property {string|null} [statusMessage] Cluster statusMessage + * @property {number|null} [nodeIpv4CidrSize] Cluster nodeIpv4CidrSize + * @property {string|null} [servicesIpv4Cidr] Cluster servicesIpv4Cidr + * @property {Array.|null} [instanceGroupUrls] Cluster instanceGroupUrls + * @property {number|null} [currentNodeCount] Cluster currentNodeCount + * @property {string|null} [expireTime] Cluster expireTime + * @property {string|null} [location] Cluster location + * @property {boolean|null} [enableTpu] Cluster enableTpu + * @property {string|null} [tpuIpv4CidrBlock] Cluster tpuIpv4CidrBlock + * @property {Array.|null} [conditions] Cluster conditions + * @property {google.container.v1.IAutopilot|null} [autopilot] Cluster autopilot + * @property {string|null} [id] Cluster id + * @property {google.container.v1.INodePoolDefaults|null} [nodePoolDefaults] Cluster nodePoolDefaults + * @property {google.container.v1.ILoggingConfig|null} [loggingConfig] Cluster loggingConfig + * @property {google.container.v1.IMonitoringConfig|null} [monitoringConfig] Cluster monitoringConfig + * @property {google.container.v1.INodePoolAutoConfig|null} [nodePoolAutoConfig] Cluster nodePoolAutoConfig + * @property {string|null} [etag] Cluster etag + * @property {google.container.v1.IFleet|null} [fleet] Cluster fleet + * @property {google.container.v1.ISecurityPostureConfig|null} [securityPostureConfig] Cluster securityPostureConfig + * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [controlPlaneEndpointsConfig] Cluster controlPlaneEndpointsConfig + * @property {google.container.v1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] Cluster enableK8sBetaApis + * @property {google.container.v1.IEnterpriseConfig|null} [enterpriseConfig] Cluster enterpriseConfig + * @property {google.container.v1.ISecretManagerConfig|null} [secretManagerConfig] Cluster secretManagerConfig + * @property {google.container.v1.ICompliancePostureConfig|null} [compliancePostureConfig] Cluster compliancePostureConfig + * @property {boolean|null} [satisfiesPzs] Cluster satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi + * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] Cluster userManagedKeysConfig + * @property {google.container.v1.IRBACBindingConfig|null} [rbacBindingConfig] Cluster rbacBindingConfig + */ + + /** + * Constructs a new Cluster. + * @memberof google.container.v1 + * @classdesc Represents a Cluster. + * @implements ICluster + * @constructor + * @param {google.container.v1.ICluster=} [properties] Properties to set + */ + function Cluster(properties) { + this.nodePools = []; + this.locations = []; + this.resourceLabels = {}; + this.instanceGroupUrls = []; + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cluster name. + * @member {string} name + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.name = ""; + + /** + * Cluster description. + * @member {string} description + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.description = ""; + + /** + * Cluster initialNodeCount. + * @member {number} initialNodeCount + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.initialNodeCount = 0; + + /** + * Cluster nodeConfig. + * @member {google.container.v1.INodeConfig|null|undefined} nodeConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.nodeConfig = null; + + /** + * Cluster masterAuth. + * @member {google.container.v1.IMasterAuth|null|undefined} masterAuth + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.masterAuth = null; + + /** + * Cluster loggingService. + * @member {string} loggingService + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.loggingService = ""; + + /** + * Cluster monitoringService. + * @member {string} monitoringService + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.monitoringService = ""; + + /** + * Cluster network. + * @member {string} network + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.network = ""; + + /** + * Cluster clusterIpv4Cidr. + * @member {string} clusterIpv4Cidr + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.clusterIpv4Cidr = ""; + + /** + * Cluster addonsConfig. + * @member {google.container.v1.IAddonsConfig|null|undefined} addonsConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.addonsConfig = null; + + /** + * Cluster subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.subnetwork = ""; + + /** + * Cluster nodePools. + * @member {Array.} nodePools + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.nodePools = $util.emptyArray; + + /** + * Cluster locations. + * @member {Array.} locations + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.locations = $util.emptyArray; + + /** + * Cluster enableKubernetesAlpha. + * @member {boolean} enableKubernetesAlpha + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.enableKubernetesAlpha = false; + + /** + * Cluster resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.resourceLabels = $util.emptyObject; + + /** + * Cluster labelFingerprint. + * @member {string} labelFingerprint + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.labelFingerprint = ""; + + /** + * Cluster legacyAbac. + * @member {google.container.v1.ILegacyAbac|null|undefined} legacyAbac + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.legacyAbac = null; + + /** + * Cluster networkPolicy. + * @member {google.container.v1.INetworkPolicy|null|undefined} networkPolicy + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.networkPolicy = null; + + /** + * Cluster ipAllocationPolicy. + * @member {google.container.v1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.ipAllocationPolicy = null; + + /** + * Cluster masterAuthorizedNetworksConfig. + * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.masterAuthorizedNetworksConfig = null; + + /** + * Cluster maintenancePolicy. + * @member {google.container.v1.IMaintenancePolicy|null|undefined} maintenancePolicy + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.maintenancePolicy = null; + + /** + * Cluster binaryAuthorization. + * @member {google.container.v1.IBinaryAuthorization|null|undefined} binaryAuthorization + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.binaryAuthorization = null; + + /** + * Cluster autoscaling. + * @member {google.container.v1.IClusterAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.autoscaling = null; + + /** + * Cluster networkConfig. + * @member {google.container.v1.INetworkConfig|null|undefined} networkConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.networkConfig = null; + + /** + * Cluster defaultMaxPodsConstraint. + * @member {google.container.v1.IMaxPodsConstraint|null|undefined} defaultMaxPodsConstraint + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.defaultMaxPodsConstraint = null; + + /** + * Cluster resourceUsageExportConfig. + * @member {google.container.v1.IResourceUsageExportConfig|null|undefined} resourceUsageExportConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.resourceUsageExportConfig = null; + + /** + * Cluster authenticatorGroupsConfig. + * @member {google.container.v1.IAuthenticatorGroupsConfig|null|undefined} authenticatorGroupsConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.authenticatorGroupsConfig = null; + + /** + * Cluster privateClusterConfig. + * @member {google.container.v1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.privateClusterConfig = null; + + /** + * Cluster databaseEncryption. + * @member {google.container.v1.IDatabaseEncryption|null|undefined} databaseEncryption + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.databaseEncryption = null; + + /** + * Cluster verticalPodAutoscaling. + * @member {google.container.v1.IVerticalPodAutoscaling|null|undefined} verticalPodAutoscaling + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.verticalPodAutoscaling = null; + + /** + * Cluster shieldedNodes. + * @member {google.container.v1.IShieldedNodes|null|undefined} shieldedNodes + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.shieldedNodes = null; + + /** + * Cluster releaseChannel. + * @member {google.container.v1.IReleaseChannel|null|undefined} releaseChannel + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.releaseChannel = null; + + /** + * Cluster workloadIdentityConfig. + * @member {google.container.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.workloadIdentityConfig = null; + + /** + * Cluster meshCertificates. + * @member {google.container.v1.IMeshCertificates|null|undefined} meshCertificates + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.meshCertificates = null; + + /** + * Cluster costManagementConfig. + * @member {google.container.v1.ICostManagementConfig|null|undefined} costManagementConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.costManagementConfig = null; + + /** + * Cluster notificationConfig. + * @member {google.container.v1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.notificationConfig = null; + + /** + * Cluster confidentialNodes. + * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.confidentialNodes = null; + + /** + * Cluster identityServiceConfig. + * @member {google.container.v1.IIdentityServiceConfig|null|undefined} identityServiceConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.identityServiceConfig = null; + + /** + * Cluster selfLink. + * @member {string} selfLink + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.selfLink = ""; + + /** + * Cluster zone. + * @member {string} zone + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.zone = ""; + + /** + * Cluster endpoint. + * @member {string} endpoint + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.endpoint = ""; + + /** + * Cluster initialClusterVersion. + * @member {string} initialClusterVersion + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.initialClusterVersion = ""; + + /** + * Cluster currentMasterVersion. + * @member {string} currentMasterVersion + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.currentMasterVersion = ""; + + /** + * Cluster currentNodeVersion. + * @member {string} currentNodeVersion + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.currentNodeVersion = ""; + + /** + * Cluster createTime. + * @member {string} createTime + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.createTime = ""; + + /** + * Cluster status. + * @member {google.container.v1.Cluster.Status} status + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.status = 0; + + /** + * Cluster statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.statusMessage = ""; + + /** + * Cluster nodeIpv4CidrSize. + * @member {number} nodeIpv4CidrSize + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.nodeIpv4CidrSize = 0; + + /** + * Cluster servicesIpv4Cidr. + * @member {string} servicesIpv4Cidr + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.servicesIpv4Cidr = ""; + + /** + * Cluster instanceGroupUrls. + * @member {Array.} instanceGroupUrls + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.instanceGroupUrls = $util.emptyArray; + + /** + * Cluster currentNodeCount. + * @member {number} currentNodeCount + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.currentNodeCount = 0; + + /** + * Cluster expireTime. + * @member {string} expireTime + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.expireTime = ""; + + /** + * Cluster location. + * @member {string} location + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.location = ""; + + /** + * Cluster enableTpu. + * @member {boolean} enableTpu + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.enableTpu = false; + + /** + * Cluster tpuIpv4CidrBlock. + * @member {string} tpuIpv4CidrBlock + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.tpuIpv4CidrBlock = ""; + + /** + * Cluster conditions. + * @member {Array.} conditions + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.conditions = $util.emptyArray; + + /** + * Cluster autopilot. + * @member {google.container.v1.IAutopilot|null|undefined} autopilot + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.autopilot = null; + + /** + * Cluster id. + * @member {string} id + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.id = ""; + + /** + * Cluster nodePoolDefaults. + * @member {google.container.v1.INodePoolDefaults|null|undefined} nodePoolDefaults + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.nodePoolDefaults = null; + + /** + * Cluster loggingConfig. + * @member {google.container.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.loggingConfig = null; + + /** + * Cluster monitoringConfig. + * @member {google.container.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.monitoringConfig = null; + + /** + * Cluster nodePoolAutoConfig. + * @member {google.container.v1.INodePoolAutoConfig|null|undefined} nodePoolAutoConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.nodePoolAutoConfig = null; + + /** + * Cluster etag. + * @member {string} etag + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.etag = ""; + + /** + * Cluster fleet. + * @member {google.container.v1.IFleet|null|undefined} fleet + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.fleet = null; + + /** + * Cluster securityPostureConfig. + * @member {google.container.v1.ISecurityPostureConfig|null|undefined} securityPostureConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.securityPostureConfig = null; + + /** + * Cluster controlPlaneEndpointsConfig. + * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} controlPlaneEndpointsConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.controlPlaneEndpointsConfig = null; + + /** + * Cluster enableK8sBetaApis. + * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.enableK8sBetaApis = null; + + /** + * Cluster enterpriseConfig. + * @member {google.container.v1.IEnterpriseConfig|null|undefined} enterpriseConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.enterpriseConfig = null; + + /** + * Cluster secretManagerConfig. + * @member {google.container.v1.ISecretManagerConfig|null|undefined} secretManagerConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.secretManagerConfig = null; + + /** + * Cluster compliancePostureConfig. + * @member {google.container.v1.ICompliancePostureConfig|null|undefined} compliancePostureConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.compliancePostureConfig = null; + + /** + * Cluster satisfiesPzs. + * @member {boolean|null|undefined} satisfiesPzs + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.satisfiesPzs = null; + + /** + * Cluster satisfiesPzi. + * @member {boolean|null|undefined} satisfiesPzi + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.satisfiesPzi = null; + + /** + * Cluster userManagedKeysConfig. + * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.userManagedKeysConfig = null; + + /** + * Cluster rbacBindingConfig. + * @member {google.container.v1.IRBACBindingConfig|null|undefined} rbacBindingConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.rbacBindingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Cluster _nodePoolDefaults. + * @member {"nodePoolDefaults"|undefined} _nodePoolDefaults + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_nodePoolDefaults", { + get: $util.oneOfGetter($oneOfFields = ["nodePoolDefaults"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _satisfiesPzs. + * @member {"satisfiesPzs"|undefined} _satisfiesPzs + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_satisfiesPzs", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _satisfiesPzi. + * @member {"satisfiesPzi"|undefined} _satisfiesPzi + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_satisfiesPzi", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _userManagedKeysConfig. + * @member {"userManagedKeysConfig"|undefined} _userManagedKeysConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_userManagedKeysConfig", { + get: $util.oneOfGetter($oneOfFields = ["userManagedKeysConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _rbacBindingConfig. + * @member {"rbacBindingConfig"|undefined} _rbacBindingConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_rbacBindingConfig", { + get: $util.oneOfGetter($oneOfFields = ["rbacBindingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Cluster instance using the specified properties. + * @function create + * @memberof google.container.v1.Cluster + * @static + * @param {google.container.v1.ICluster=} [properties] Properties to set + * @returns {google.container.v1.Cluster} Cluster instance + */ + Cluster.create = function create(properties) { + return new Cluster(properties); + }; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Cluster + * @static + * @param {google.container.v1.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.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.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.container.v1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.masterAuth != null && Object.hasOwnProperty.call(message, "masterAuth")) + $root.google.container.v1.MasterAuth.encode(message.masterAuth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.loggingService); + if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.monitoringService); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); + if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4Cidr); + if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) + $root.google.container.v1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.subnetwork); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.container.v1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.enableKubernetesAlpha != null && Object.hasOwnProperty.call(message, "enableKubernetesAlpha")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableKubernetesAlpha); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.labelFingerprint); + if (message.legacyAbac != null && Object.hasOwnProperty.call(message, "legacyAbac")) + $root.google.container.v1.LegacyAbac.encode(message.legacyAbac, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) + $root.google.container.v1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.container.v1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) + $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) + $root.google.container.v1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.binaryAuthorization != null && Object.hasOwnProperty.call(message, "binaryAuthorization")) + $root.google.container.v1.BinaryAuthorization.encode(message.binaryAuthorization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1.ClusterAutoscaling.encode(message.autoscaling, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.container.v1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.defaultMaxPodsConstraint != null && Object.hasOwnProperty.call(message, "defaultMaxPodsConstraint")) + $root.google.container.v1.MaxPodsConstraint.encode(message.defaultMaxPodsConstraint, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.resourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "resourceUsageExportConfig")) + $root.google.container.v1.ResourceUsageExportConfig.encode(message.resourceUsageExportConfig, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.authenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "authenticatorGroupsConfig")) + $root.google.container.v1.AuthenticatorGroupsConfig.encode(message.authenticatorGroupsConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.container.v1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) + $root.google.container.v1.DatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.verticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "verticalPodAutoscaling")) + $root.google.container.v1.VerticalPodAutoscaling.encode(message.verticalPodAutoscaling, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.shieldedNodes != null && Object.hasOwnProperty.call(message, "shieldedNodes")) + $root.google.container.v1.ShieldedNodes.encode(message.shieldedNodes, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + $root.google.container.v1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) + $root.google.container.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.costManagementConfig != null && Object.hasOwnProperty.call(message, "costManagementConfig")) + $root.google.container.v1.CostManagementConfig.encode(message.costManagementConfig, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.container.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.identityServiceConfig != null && Object.hasOwnProperty.call(message, "identityServiceConfig")) + $root.google.container.v1.IdentityServiceConfig.encode(message.identityServiceConfig, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.meshCertificates != null && Object.hasOwnProperty.call(message, "meshCertificates")) + $root.google.container.v1.MeshCertificates.encode(message.meshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.zone); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.endpoint); + if (message.initialClusterVersion != null && Object.hasOwnProperty.call(message, "initialClusterVersion")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.initialClusterVersion); + if (message.currentMasterVersion != null && Object.hasOwnProperty.call(message, "currentMasterVersion")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.currentMasterVersion); + if (message.currentNodeVersion != null && Object.hasOwnProperty.call(message, "currentNodeVersion")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.currentNodeVersion); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.createTime); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 108, wireType 2 =*/866).string(message.statusMessage); + if (message.nodeIpv4CidrSize != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrSize")) + writer.uint32(/* id 109, wireType 0 =*/872).int32(message.nodeIpv4CidrSize); + if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.servicesIpv4Cidr); + if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.instanceGroupUrls[i]); + if (message.currentNodeCount != null && Object.hasOwnProperty.call(message, "currentNodeCount")) + writer.uint32(/* id 112, wireType 0 =*/896).int32(message.currentNodeCount); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + writer.uint32(/* id 113, wireType 2 =*/906).string(message.expireTime); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 114, wireType 2 =*/914).string(message.location); + if (message.enableTpu != null && Object.hasOwnProperty.call(message, "enableTpu")) + writer.uint32(/* id 115, wireType 0 =*/920).bool(message.enableTpu); + if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) + writer.uint32(/* id 116, wireType 2 =*/930).string(message.tpuIpv4CidrBlock); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.container.v1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 118, wireType 2 =*/946).fork()).ldelim(); + if (message.autopilot != null && Object.hasOwnProperty.call(message, "autopilot")) + $root.google.container.v1.Autopilot.encode(message.autopilot, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 129, wireType 2 =*/1034).string(message.id); + if (message.nodePoolDefaults != null && Object.hasOwnProperty.call(message, "nodePoolDefaults")) + $root.google.container.v1.NodePoolDefaults.encode(message.nodePoolDefaults, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.container.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 133, wireType 2 =*/1066).fork()).ldelim(); + if (message.nodePoolAutoConfig != null && Object.hasOwnProperty.call(message, "nodePoolAutoConfig")) + $root.google.container.v1.NodePoolAutoConfig.encode(message.nodePoolAutoConfig, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 139, wireType 2 =*/1114).string(message.etag); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.container.v1.Fleet.encode(message.fleet, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); + if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) + $root.google.container.v1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); + if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) + $root.google.container.v1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); + if (message.controlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "controlPlaneEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.controlPlaneEndpointsConfig, writer.uint32(/* id 146, wireType 2 =*/1170).fork()).ldelim(); + if (message.enterpriseConfig != null && Object.hasOwnProperty.call(message, "enterpriseConfig")) + $root.google.container.v1.EnterpriseConfig.encode(message.enterpriseConfig, writer.uint32(/* id 149, wireType 2 =*/1194).fork()).ldelim(); + if (message.secretManagerConfig != null && Object.hasOwnProperty.call(message, "secretManagerConfig")) + $root.google.container.v1.SecretManagerConfig.encode(message.secretManagerConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) + $root.google.container.v1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 151, wireType 2 =*/1210).fork()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 152, wireType 0 =*/1216).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 153, wireType 0 =*/1224).bool(message.satisfiesPzi); + if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) + $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 154, wireType 2 =*/1234).fork()).ldelim(); + if (message.rbacBindingConfig != null && Object.hasOwnProperty.call(message, "rbacBindingConfig")) + $root.google.container.v1.RBACBindingConfig.encode(message.rbacBindingConfig, writer.uint32(/* id 156, wireType 2 =*/1250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Cluster + * @static + * @param {google.container.v1.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Cluster(), 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.initialNodeCount = reader.int32(); + break; + } + case 4: { + message.nodeConfig = $root.google.container.v1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.masterAuth = $root.google.container.v1.MasterAuth.decode(reader, reader.uint32()); + break; + } + case 6: { + message.loggingService = reader.string(); + break; + } + case 7: { + message.monitoringService = reader.string(); + break; + } + case 8: { + message.network = reader.string(); + break; + } + case 9: { + message.clusterIpv4Cidr = reader.string(); + break; + } + case 10: { + message.addonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.subnetwork = reader.string(); + break; + } + case 12: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.container.v1.NodePool.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.enableKubernetesAlpha = reader.bool(); + break; + } + case 15: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 16: { + message.labelFingerprint = reader.string(); + break; + } + case 18: { + message.legacyAbac = $root.google.container.v1.LegacyAbac.decode(reader, reader.uint32()); + break; + } + case 19: { + message.networkPolicy = $root.google.container.v1.NetworkPolicy.decode(reader, reader.uint32()); + break; + } + case 20: { + message.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } + case 22: { + message.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 23: { + message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 24: { + message.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.decode(reader, reader.uint32()); + break; + } + case 26: { + message.autoscaling = $root.google.container.v1.ClusterAutoscaling.decode(reader, reader.uint32()); + break; + } + case 27: { + message.networkConfig = $root.google.container.v1.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 30: { + message.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 33: { + message.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.decode(reader, reader.uint32()); + break; + } + case 34: { + message.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); + break; + } + case 37: { + message.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 38: { + message.databaseEncryption = $root.google.container.v1.DatabaseEncryption.decode(reader, reader.uint32()); + break; + } + case 39: { + message.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 40: { + message.shieldedNodes = $root.google.container.v1.ShieldedNodes.decode(reader, reader.uint32()); + break; + } + case 41: { + message.releaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 43: { + message.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 67: { + message.meshCertificates = $root.google.container.v1.MeshCertificates.decode(reader, reader.uint32()); + break; + } + case 45: { + message.costManagementConfig = $root.google.container.v1.CostManagementConfig.decode(reader, reader.uint32()); + break; + } + case 49: { + message.notificationConfig = $root.google.container.v1.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 50: { + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 54: { + message.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.selfLink = reader.string(); + break; + } + case 101: { + message.zone = reader.string(); + break; + } + case 102: { + message.endpoint = reader.string(); + break; + } + case 103: { + message.initialClusterVersion = reader.string(); + break; + } + case 104: { + message.currentMasterVersion = reader.string(); + break; + } + case 105: { + message.currentNodeVersion = reader.string(); + break; + } + case 106: { + message.createTime = reader.string(); + break; + } + case 107: { + message.status = reader.int32(); + break; + } + case 108: { + message.statusMessage = reader.string(); + break; + } + case 109: { + message.nodeIpv4CidrSize = reader.int32(); + break; + } + case 110: { + message.servicesIpv4Cidr = reader.string(); + break; + } + case 111: { + if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) + message.instanceGroupUrls = []; + message.instanceGroupUrls.push(reader.string()); + break; + } + case 112: { + message.currentNodeCount = reader.int32(); + break; + } + case 113: { + message.expireTime = reader.string(); + break; + } + case 114: { + message.location = reader.string(); + break; + } + case 115: { + message.enableTpu = reader.bool(); + break; + } + case 116: { + message.tpuIpv4CidrBlock = reader.string(); + break; + } + case 118: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 128: { + message.autopilot = $root.google.container.v1.Autopilot.decode(reader, reader.uint32()); + break; + } + case 129: { + message.id = reader.string(); + break; + } + case 131: { + message.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.decode(reader, reader.uint32()); + break; + } + case 132: { + message.loggingConfig = $root.google.container.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 133: { + message.monitoringConfig = $root.google.container.v1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } + case 136: { + message.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.decode(reader, reader.uint32()); + break; + } + case 139: { + message.etag = reader.string(); + break; + } + case 140: { + message.fleet = $root.google.container.v1.Fleet.decode(reader, reader.uint32()); + break; + } + case 145: { + message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.decode(reader, reader.uint32()); + break; + } + case 146: { + message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); + break; + } + case 143: { + message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 149: { + message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.decode(reader, reader.uint32()); + break; + } + case 150: { + message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 151: { + message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); + break; + } + case 152: { + message.satisfiesPzs = reader.bool(); + break; + } + case 153: { + message.satisfiesPzi = reader.bool(); + break; + } + case 154: { + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); + break; + } + case 156: { + message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cluster message. + * @function verify + * @memberof google.container.v1.Cluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + if (!$util.isInteger(message.initialNodeCount)) + return "initialNodeCount: integer expected"; + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.container.v1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) { + var error = $root.google.container.v1.MasterAuth.verify(message.masterAuth); + if (error) + return "masterAuth." + error; + } + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + if (!$util.isString(message.loggingService)) + return "loggingService: string expected"; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + if (!$util.isString(message.monitoringService)) + return "monitoringService: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + if (!$util.isString(message.clusterIpv4Cidr)) + return "clusterIpv4Cidr: string expected"; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { + var error = $root.google.container.v1.AddonsConfig.verify(message.addonsConfig); + if (error) + return "addonsConfig." + error; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.container.v1.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) + if (typeof message.enableKubernetesAlpha !== "boolean") + return "enableKubernetesAlpha: boolean expected"; + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + if (!$util.isString(message.labelFingerprint)) + return "labelFingerprint: string expected"; + if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) { + var error = $root.google.container.v1.LegacyAbac.verify(message.legacyAbac); + if (error) + return "legacyAbac." + error; + } + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { + var error = $root.google.container.v1.NetworkPolicy.verify(message.networkPolicy); + if (error) + return "networkPolicy." + error; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.container.v1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { + var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); + if (error) + return "masterAuthorizedNetworksConfig." + error; + } + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { + var error = $root.google.container.v1.MaintenancePolicy.verify(message.maintenancePolicy); + if (error) + return "maintenancePolicy." + error; + } + if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) { + var error = $root.google.container.v1.BinaryAuthorization.verify(message.binaryAuthorization); + if (error) + return "binaryAuthorization." + error; + } + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1.ClusterAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.container.v1.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) { + var error = $root.google.container.v1.MaxPodsConstraint.verify(message.defaultMaxPodsConstraint); + if (error) + return "defaultMaxPodsConstraint." + error; + } + if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) { + var error = $root.google.container.v1.ResourceUsageExportConfig.verify(message.resourceUsageExportConfig); + if (error) + return "resourceUsageExportConfig." + error; + } + if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) { + var error = $root.google.container.v1.AuthenticatorGroupsConfig.verify(message.authenticatorGroupsConfig); + if (error) + return "authenticatorGroupsConfig." + error; + } + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.container.v1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { + var error = $root.google.container.v1.DatabaseEncryption.verify(message.databaseEncryption); + if (error) + return "databaseEncryption." + error; + } + if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) { + var error = $root.google.container.v1.VerticalPodAutoscaling.verify(message.verticalPodAutoscaling); + if (error) + return "verticalPodAutoscaling." + error; + } + if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) { + var error = $root.google.container.v1.ShieldedNodes.verify(message.shieldedNodes); + if (error) + return "shieldedNodes." + error; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + var error = $root.google.container.v1.ReleaseChannel.verify(message.releaseChannel); + if (error) + return "releaseChannel." + error; + } + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { + var error = $root.google.container.v1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); + if (error) + return "workloadIdentityConfig." + error; + } + if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) { + var error = $root.google.container.v1.MeshCertificates.verify(message.meshCertificates); + if (error) + return "meshCertificates." + error; + } + if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) { + var error = $root.google.container.v1.CostManagementConfig.verify(message.costManagementConfig); + if (error) + return "costManagementConfig." + error; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.container.v1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) { + var error = $root.google.container.v1.IdentityServiceConfig.verify(message.identityServiceConfig); + if (error) + return "identityServiceConfig." + error; + } + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) + if (!$util.isString(message.initialClusterVersion)) + return "initialClusterVersion: string expected"; + if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) + if (!$util.isString(message.currentMasterVersion)) + return "currentMasterVersion: string expected"; + if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) + if (!$util.isString(message.currentNodeVersion)) + return "currentNodeVersion: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) + if (!$util.isString(message.createTime)) + return "createTime: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) + if (!$util.isInteger(message.nodeIpv4CidrSize)) + return "nodeIpv4CidrSize: integer expected"; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + if (!$util.isString(message.servicesIpv4Cidr)) + return "servicesIpv4Cidr: string expected"; + if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { + if (!Array.isArray(message.instanceGroupUrls)) + return "instanceGroupUrls: array expected"; + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + if (!$util.isString(message.instanceGroupUrls[i])) + return "instanceGroupUrls: string[] expected"; + } + if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) + if (!$util.isInteger(message.currentNodeCount)) + return "currentNodeCount: integer expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + if (!$util.isString(message.expireTime)) + return "expireTime: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) + if (typeof message.enableTpu !== "boolean") + return "enableTpu: boolean expected"; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + if (!$util.isString(message.tpuIpv4CidrBlock)) + return "tpuIpv4CidrBlock: string expected"; + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.container.v1.StatusCondition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.autopilot != null && message.hasOwnProperty("autopilot")) { + var error = $root.google.container.v1.Autopilot.verify(message.autopilot); + if (error) + return "autopilot." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { + properties._nodePoolDefaults = 1; + { + var error = $root.google.container.v1.NodePoolDefaults.verify(message.nodePoolDefaults); + if (error) + return "nodePoolDefaults." + error; + } + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.container.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } + if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) { + var error = $root.google.container.v1.NodePoolAutoConfig.verify(message.nodePoolAutoConfig); + if (error) + return "nodePoolAutoConfig." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.container.v1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) { + var error = $root.google.container.v1.SecurityPostureConfig.verify(message.securityPostureConfig); + if (error) + return "securityPostureConfig." + error; + } + if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.controlPlaneEndpointsConfig); + if (error) + return "controlPlaneEndpointsConfig." + error; + } + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { + var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); + if (error) + return "enableK8sBetaApis." + error; + } + if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) { + var error = $root.google.container.v1.EnterpriseConfig.verify(message.enterpriseConfig); + if (error) + return "enterpriseConfig." + error; + } + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) { + var error = $root.google.container.v1.SecretManagerConfig.verify(message.secretManagerConfig); + if (error) + return "secretManagerConfig." + error; + } + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { + var error = $root.google.container.v1.CompliancePostureConfig.verify(message.compliancePostureConfig); + if (error) + return "compliancePostureConfig." + error; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + properties._satisfiesPzs = 1; + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + properties._satisfiesPzi = 1; + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + properties._userManagedKeysConfig = 1; + { + var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); + if (error) + return "userManagedKeysConfig." + error; + } + } + if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { + properties._rbacBindingConfig = 1; + { + var error = $root.google.container.v1.RBACBindingConfig.verify(message.rbacBindingConfig); + if (error) + return "rbacBindingConfig." + error; + } + } + return null; + }; + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Cluster + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Cluster} Cluster + */ + Cluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Cluster) + return object; + var message = new $root.google.container.v1.Cluster(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.initialNodeCount != null) + message.initialNodeCount = object.initialNodeCount | 0; + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.container.v1.Cluster.nodeConfig: object expected"); + message.nodeConfig = $root.google.container.v1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.masterAuth != null) { + if (typeof object.masterAuth !== "object") + throw TypeError(".google.container.v1.Cluster.masterAuth: object expected"); + message.masterAuth = $root.google.container.v1.MasterAuth.fromObject(object.masterAuth); + } + if (object.loggingService != null) + message.loggingService = String(object.loggingService); + if (object.monitoringService != null) + message.monitoringService = String(object.monitoringService); + if (object.network != null) + message.network = String(object.network); + if (object.clusterIpv4Cidr != null) + message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); + if (object.addonsConfig != null) { + if (typeof object.addonsConfig !== "object") + throw TypeError(".google.container.v1.Cluster.addonsConfig: object expected"); + message.addonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.addonsConfig); + } + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.container.v1.Cluster.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.container.v1.Cluster.nodePools: object expected"); + message.nodePools[i] = $root.google.container.v1.NodePool.fromObject(object.nodePools[i]); + } + } + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1.Cluster.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.enableKubernetesAlpha != null) + message.enableKubernetesAlpha = Boolean(object.enableKubernetesAlpha); + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1.Cluster.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.labelFingerprint != null) + message.labelFingerprint = String(object.labelFingerprint); + if (object.legacyAbac != null) { + if (typeof object.legacyAbac !== "object") + throw TypeError(".google.container.v1.Cluster.legacyAbac: object expected"); + message.legacyAbac = $root.google.container.v1.LegacyAbac.fromObject(object.legacyAbac); + } + if (object.networkPolicy != null) { + if (typeof object.networkPolicy !== "object") + throw TypeError(".google.container.v1.Cluster.networkPolicy: object expected"); + message.networkPolicy = $root.google.container.v1.NetworkPolicy.fromObject(object.networkPolicy); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.container.v1.Cluster.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + if (object.masterAuthorizedNetworksConfig != null) { + if (typeof object.masterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1.Cluster.masterAuthorizedNetworksConfig: object expected"); + message.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); + } + if (object.maintenancePolicy != null) { + if (typeof object.maintenancePolicy !== "object") + throw TypeError(".google.container.v1.Cluster.maintenancePolicy: object expected"); + message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.fromObject(object.maintenancePolicy); + } + if (object.binaryAuthorization != null) { + if (typeof object.binaryAuthorization !== "object") + throw TypeError(".google.container.v1.Cluster.binaryAuthorization: object expected"); + message.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.fromObject(object.binaryAuthorization); + } + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1.Cluster.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1.ClusterAutoscaling.fromObject(object.autoscaling); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.container.v1.Cluster.networkConfig: object expected"); + message.networkConfig = $root.google.container.v1.NetworkConfig.fromObject(object.networkConfig); + } + if (object.defaultMaxPodsConstraint != null) { + if (typeof object.defaultMaxPodsConstraint !== "object") + throw TypeError(".google.container.v1.Cluster.defaultMaxPodsConstraint: object expected"); + message.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.fromObject(object.defaultMaxPodsConstraint); + } + if (object.resourceUsageExportConfig != null) { + if (typeof object.resourceUsageExportConfig !== "object") + throw TypeError(".google.container.v1.Cluster.resourceUsageExportConfig: object expected"); + message.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.fromObject(object.resourceUsageExportConfig); + } + if (object.authenticatorGroupsConfig != null) { + if (typeof object.authenticatorGroupsConfig !== "object") + throw TypeError(".google.container.v1.Cluster.authenticatorGroupsConfig: object expected"); + message.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.fromObject(object.authenticatorGroupsConfig); + } + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.container.v1.Cluster.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.databaseEncryption != null) { + if (typeof object.databaseEncryption !== "object") + throw TypeError(".google.container.v1.Cluster.databaseEncryption: object expected"); + message.databaseEncryption = $root.google.container.v1.DatabaseEncryption.fromObject(object.databaseEncryption); + } + if (object.verticalPodAutoscaling != null) { + if (typeof object.verticalPodAutoscaling !== "object") + throw TypeError(".google.container.v1.Cluster.verticalPodAutoscaling: object expected"); + message.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.fromObject(object.verticalPodAutoscaling); + } + if (object.shieldedNodes != null) { + if (typeof object.shieldedNodes !== "object") + throw TypeError(".google.container.v1.Cluster.shieldedNodes: object expected"); + message.shieldedNodes = $root.google.container.v1.ShieldedNodes.fromObject(object.shieldedNodes); + } + if (object.releaseChannel != null) { + if (typeof object.releaseChannel !== "object") + throw TypeError(".google.container.v1.Cluster.releaseChannel: object expected"); + message.releaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.releaseChannel); + } + if (object.workloadIdentityConfig != null) { + if (typeof object.workloadIdentityConfig !== "object") + throw TypeError(".google.container.v1.Cluster.workloadIdentityConfig: object expected"); + message.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); + } + if (object.meshCertificates != null) { + if (typeof object.meshCertificates !== "object") + throw TypeError(".google.container.v1.Cluster.meshCertificates: object expected"); + message.meshCertificates = $root.google.container.v1.MeshCertificates.fromObject(object.meshCertificates); + } + if (object.costManagementConfig != null) { + if (typeof object.costManagementConfig !== "object") + throw TypeError(".google.container.v1.Cluster.costManagementConfig: object expected"); + message.costManagementConfig = $root.google.container.v1.CostManagementConfig.fromObject(object.costManagementConfig); + } + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.container.v1.Cluster.notificationConfig: object expected"); + message.notificationConfig = $root.google.container.v1.NotificationConfig.fromObject(object.notificationConfig); + } + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1.Cluster.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.identityServiceConfig != null) { + if (typeof object.identityServiceConfig !== "object") + throw TypeError(".google.container.v1.Cluster.identityServiceConfig: object expected"); + message.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.fromObject(object.identityServiceConfig); + } + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.zone != null) + message.zone = String(object.zone); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.initialClusterVersion != null) + message.initialClusterVersion = String(object.initialClusterVersion); + if (object.currentMasterVersion != null) + message.currentMasterVersion = String(object.currentMasterVersion); + if (object.currentNodeVersion != null) + message.currentNodeVersion = String(object.currentNodeVersion); + if (object.createTime != null) + message.createTime = String(object.createTime); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROVISIONING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "RECONCILING": + case 3: + message.status = 3; + break; + case "STOPPING": + case 4: + message.status = 4; + break; + case "ERROR": + case 5: + message.status = 5; + break; + case "DEGRADED": + case 6: + message.status = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.nodeIpv4CidrSize != null) + message.nodeIpv4CidrSize = object.nodeIpv4CidrSize | 0; + if (object.servicesIpv4Cidr != null) + message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); + if (object.instanceGroupUrls) { + if (!Array.isArray(object.instanceGroupUrls)) + throw TypeError(".google.container.v1.Cluster.instanceGroupUrls: array expected"); + message.instanceGroupUrls = []; + for (var i = 0; i < object.instanceGroupUrls.length; ++i) + message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); + } + if (object.currentNodeCount != null) + message.currentNodeCount = object.currentNodeCount | 0; + if (object.expireTime != null) + message.expireTime = String(object.expireTime); + if (object.location != null) + message.location = String(object.location); + if (object.enableTpu != null) + message.enableTpu = Boolean(object.enableTpu); + if (object.tpuIpv4CidrBlock != null) + message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.container.v1.Cluster.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.container.v1.Cluster.conditions: object expected"); + message.conditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.conditions[i]); + } + } + if (object.autopilot != null) { + if (typeof object.autopilot !== "object") + throw TypeError(".google.container.v1.Cluster.autopilot: object expected"); + message.autopilot = $root.google.container.v1.Autopilot.fromObject(object.autopilot); + } + if (object.id != null) + message.id = String(object.id); + if (object.nodePoolDefaults != null) { + if (typeof object.nodePoolDefaults !== "object") + throw TypeError(".google.container.v1.Cluster.nodePoolDefaults: object expected"); + message.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.fromObject(object.nodePoolDefaults); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1.Cluster.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1.LoggingConfig.fromObject(object.loggingConfig); + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.container.v1.Cluster.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.container.v1.MonitoringConfig.fromObject(object.monitoringConfig); + } + if (object.nodePoolAutoConfig != null) { + if (typeof object.nodePoolAutoConfig !== "object") + throw TypeError(".google.container.v1.Cluster.nodePoolAutoConfig: object expected"); + message.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.fromObject(object.nodePoolAutoConfig); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.container.v1.Cluster.fleet: object expected"); + message.fleet = $root.google.container.v1.Fleet.fromObject(object.fleet); + } + if (object.securityPostureConfig != null) { + if (typeof object.securityPostureConfig !== "object") + throw TypeError(".google.container.v1.Cluster.securityPostureConfig: object expected"); + message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.fromObject(object.securityPostureConfig); + } + if (object.controlPlaneEndpointsConfig != null) { + if (typeof object.controlPlaneEndpointsConfig !== "object") + throw TypeError(".google.container.v1.Cluster.controlPlaneEndpointsConfig: object expected"); + message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.controlPlaneEndpointsConfig); + } + if (object.enableK8sBetaApis != null) { + if (typeof object.enableK8sBetaApis !== "object") + throw TypeError(".google.container.v1.Cluster.enableK8sBetaApis: object expected"); + message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); + } + if (object.enterpriseConfig != null) { + if (typeof object.enterpriseConfig !== "object") + throw TypeError(".google.container.v1.Cluster.enterpriseConfig: object expected"); + message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.fromObject(object.enterpriseConfig); + } + if (object.secretManagerConfig != null) { + if (typeof object.secretManagerConfig !== "object") + throw TypeError(".google.container.v1.Cluster.secretManagerConfig: object expected"); + message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.secretManagerConfig); + } + if (object.compliancePostureConfig != null) { + if (typeof object.compliancePostureConfig !== "object") + throw TypeError(".google.container.v1.Cluster.compliancePostureConfig: object expected"); + message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); + } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.userManagedKeysConfig != null) { + if (typeof object.userManagedKeysConfig !== "object") + throw TypeError(".google.container.v1.Cluster.userManagedKeysConfig: object expected"); + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); + } + if (object.rbacBindingConfig != null) { + if (typeof object.rbacBindingConfig !== "object") + throw TypeError(".google.container.v1.Cluster.rbacBindingConfig: object expected"); + message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.rbacBindingConfig); + } + return message; + }; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.Cluster + * @static + * @param {google.container.v1.Cluster} message Cluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.nodePools = []; + object.locations = []; + object.instanceGroupUrls = []; + object.conditions = []; + } + if (options.objects || options.defaults) + object.resourceLabels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.initialNodeCount = 0; + object.nodeConfig = null; + object.masterAuth = null; + object.loggingService = ""; + object.monitoringService = ""; + object.network = ""; + object.clusterIpv4Cidr = ""; + object.addonsConfig = null; + object.subnetwork = ""; + object.enableKubernetesAlpha = false; + object.labelFingerprint = ""; + object.legacyAbac = null; + object.networkPolicy = null; + object.ipAllocationPolicy = null; + object.masterAuthorizedNetworksConfig = null; + object.maintenancePolicy = null; + object.binaryAuthorization = null; + object.autoscaling = null; + object.networkConfig = null; + object.defaultMaxPodsConstraint = null; + object.resourceUsageExportConfig = null; + object.authenticatorGroupsConfig = null; + object.privateClusterConfig = null; + object.databaseEncryption = null; + object.verticalPodAutoscaling = null; + object.shieldedNodes = null; + object.releaseChannel = null; + object.workloadIdentityConfig = null; + object.costManagementConfig = null; + object.notificationConfig = null; + object.confidentialNodes = null; + object.identityServiceConfig = null; + object.meshCertificates = null; + object.selfLink = ""; + object.zone = ""; + object.endpoint = ""; + object.initialClusterVersion = ""; + object.currentMasterVersion = ""; + object.currentNodeVersion = ""; + object.createTime = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.nodeIpv4CidrSize = 0; + object.servicesIpv4Cidr = ""; + object.currentNodeCount = 0; + object.expireTime = ""; + object.location = ""; + object.enableTpu = false; + object.tpuIpv4CidrBlock = ""; + object.autopilot = null; + object.id = ""; + object.loggingConfig = null; + object.monitoringConfig = null; + object.nodePoolAutoConfig = null; + object.etag = ""; + object.fleet = null; + object.enableK8sBetaApis = null; + object.securityPostureConfig = null; + object.controlPlaneEndpointsConfig = null; + object.enterpriseConfig = null; + object.secretManagerConfig = null; + object.compliancePostureConfig = 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.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + object.initialNodeCount = message.initialNodeCount; + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.container.v1.NodeConfig.toObject(message.nodeConfig, options); + if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) + object.masterAuth = $root.google.container.v1.MasterAuth.toObject(message.masterAuth, options); + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + object.loggingService = message.loggingService; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + object.monitoringService = message.monitoringService; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + object.clusterIpv4Cidr = message.clusterIpv4Cidr; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) + object.addonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.addonsConfig, options); + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.container.v1.NodePool.toObject(message.nodePools[j], options); + } + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) + object.enableKubernetesAlpha = message.enableKubernetesAlpha; + var keys2; + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + object.labelFingerprint = message.labelFingerprint; + if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) + object.legacyAbac = $root.google.container.v1.LegacyAbac.toObject(message.legacyAbac, options); + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) + object.networkPolicy = $root.google.container.v1.NetworkPolicy.toObject(message.networkPolicy, options); + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) + object.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) + object.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.toObject(message.maintenancePolicy, options); + if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) + object.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.toObject(message.binaryAuthorization, options); + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1.ClusterAutoscaling.toObject(message.autoscaling, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.container.v1.NetworkConfig.toObject(message.networkConfig, options); + if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) + object.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.toObject(message.defaultMaxPodsConstraint, options); + if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) + object.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.toObject(message.resourceUsageExportConfig, options); + if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) + object.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.toObject(message.authenticatorGroupsConfig, options); + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) + object.databaseEncryption = $root.google.container.v1.DatabaseEncryption.toObject(message.databaseEncryption, options); + if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) + object.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.toObject(message.verticalPodAutoscaling, options); + if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) + object.shieldedNodes = $root.google.container.v1.ShieldedNodes.toObject(message.shieldedNodes, options); + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.releaseChannel, options); + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) + object.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); + if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) + object.costManagementConfig = $root.google.container.v1.CostManagementConfig.toObject(message.costManagementConfig, options); + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.container.v1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) + object.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.toObject(message.identityServiceConfig, options); + if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) + object.meshCertificates = $root.google.container.v1.MeshCertificates.toObject(message.meshCertificates, options); + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) + object.initialClusterVersion = message.initialClusterVersion; + if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) + object.currentMasterVersion = message.currentMasterVersion; + if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) + object.currentNodeVersion = message.currentNodeVersion; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = message.createTime; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1.Cluster.Status[message.status] === undefined ? message.status : $root.google.container.v1.Cluster.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) + object.nodeIpv4CidrSize = message.nodeIpv4CidrSize; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + object.servicesIpv4Cidr = message.servicesIpv4Cidr; + if (message.instanceGroupUrls && message.instanceGroupUrls.length) { + object.instanceGroupUrls = []; + for (var j = 0; j < message.instanceGroupUrls.length; ++j) + object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; + } + if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) + object.currentNodeCount = message.currentNodeCount; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = message.expireTime; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) + object.enableTpu = message.enableTpu; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.container.v1.StatusCondition.toObject(message.conditions[j], options); + } + if (message.autopilot != null && message.hasOwnProperty("autopilot")) + object.autopilot = $root.google.container.v1.Autopilot.toObject(message.autopilot, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { + object.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.toObject(message.nodePoolDefaults, options); + if (options.oneofs) + object._nodePoolDefaults = "nodePoolDefaults"; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.container.v1.MonitoringConfig.toObject(message.monitoringConfig, options); + if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) + object.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.toObject(message.nodePoolAutoConfig, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.container.v1.Fleet.toObject(message.fleet, options); + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) + object.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) + object.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); + if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) + object.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.controlPlaneEndpointsConfig, options); + if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) + object.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.toObject(message.enterpriseConfig, options); + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) + object.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.secretManagerConfig, options); + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) + object.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + object.satisfiesPzs = message.satisfiesPzs; + if (options.oneofs) + object._satisfiesPzs = "satisfiesPzs"; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + object.satisfiesPzi = message.satisfiesPzi; + if (options.oneofs) + object._satisfiesPzi = "satisfiesPzi"; + } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); + if (options.oneofs) + object._userManagedKeysConfig = "userManagedKeysConfig"; + } + if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { + object.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.rbacBindingConfig, options); + if (options.oneofs) + object._rbacBindingConfig = "rbacBindingConfig"; + } + return object; + }; + + /** + * Converts this Cluster to JSON. + * @function toJSON + * @memberof google.container.v1.Cluster + * @instance + * @returns {Object.} JSON object + */ + Cluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cluster + * @function getTypeUrl + * @memberof google.container.v1.Cluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.Cluster"; + }; + + /** + * Status enum. + * @name google.container.v1.Cluster.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_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 + */ + Cluster.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_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 Cluster; + })(); + + v1.RBACBindingConfig = (function() { + + /** + * Properties of a RBACBindingConfig. + * @memberof google.container.v1 + * @interface IRBACBindingConfig + * @property {boolean|null} [enableInsecureBindingSystemUnauthenticated] RBACBindingConfig enableInsecureBindingSystemUnauthenticated + * @property {boolean|null} [enableInsecureBindingSystemAuthenticated] RBACBindingConfig enableInsecureBindingSystemAuthenticated + */ + + /** + * Constructs a new RBACBindingConfig. + * @memberof google.container.v1 + * @classdesc Represents a RBACBindingConfig. + * @implements IRBACBindingConfig + * @constructor + * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set + */ + function RBACBindingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RBACBindingConfig enableInsecureBindingSystemUnauthenticated. + * @member {boolean|null|undefined} enableInsecureBindingSystemUnauthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + RBACBindingConfig.prototype.enableInsecureBindingSystemUnauthenticated = null; + + /** + * RBACBindingConfig enableInsecureBindingSystemAuthenticated. + * @member {boolean|null|undefined} enableInsecureBindingSystemAuthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + RBACBindingConfig.prototype.enableInsecureBindingSystemAuthenticated = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. + * @member {"enableInsecureBindingSystemUnauthenticated"|undefined} _enableInsecureBindingSystemUnauthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemUnauthenticated", { + get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemUnauthenticated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RBACBindingConfig _enableInsecureBindingSystemAuthenticated. + * @member {"enableInsecureBindingSystemAuthenticated"|undefined} _enableInsecureBindingSystemAuthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemAuthenticated", { + get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemAuthenticated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RBACBindingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig instance + */ + RBACBindingConfig.create = function create(properties) { + return new RBACBindingConfig(properties); + }; + + /** + * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RBACBindingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableInsecureBindingSystemUnauthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemUnauthenticated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableInsecureBindingSystemUnauthenticated); + if (message.enableInsecureBindingSystemAuthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemAuthenticated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableInsecureBindingSystemAuthenticated); + return writer; + }; + + /** + * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RBACBindingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RBACBindingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RBACBindingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RBACBindingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableInsecureBindingSystemUnauthenticated = reader.bool(); + break; + } + case 2: { + message.enableInsecureBindingSystemAuthenticated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RBACBindingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RBACBindingConfig message. + * @function verify + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RBACBindingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { + properties._enableInsecureBindingSystemUnauthenticated = 1; + if (typeof message.enableInsecureBindingSystemUnauthenticated !== "boolean") + return "enableInsecureBindingSystemUnauthenticated: boolean expected"; + } + if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { + properties._enableInsecureBindingSystemAuthenticated = 1; + if (typeof message.enableInsecureBindingSystemAuthenticated !== "boolean") + return "enableInsecureBindingSystemAuthenticated: boolean expected"; + } + return null; + }; + + /** + * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig + */ + RBACBindingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RBACBindingConfig) + return object; + var message = new $root.google.container.v1.RBACBindingConfig(); + if (object.enableInsecureBindingSystemUnauthenticated != null) + message.enableInsecureBindingSystemUnauthenticated = Boolean(object.enableInsecureBindingSystemUnauthenticated); + if (object.enableInsecureBindingSystemAuthenticated != null) + message.enableInsecureBindingSystemAuthenticated = Boolean(object.enableInsecureBindingSystemAuthenticated); + return message; + }; + + /** + * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {google.container.v1.RBACBindingConfig} message RBACBindingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RBACBindingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { + object.enableInsecureBindingSystemUnauthenticated = message.enableInsecureBindingSystemUnauthenticated; + if (options.oneofs) + object._enableInsecureBindingSystemUnauthenticated = "enableInsecureBindingSystemUnauthenticated"; + } + if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { + object.enableInsecureBindingSystemAuthenticated = message.enableInsecureBindingSystemAuthenticated; + if (options.oneofs) + object._enableInsecureBindingSystemAuthenticated = "enableInsecureBindingSystemAuthenticated"; + } + return object; + }; + + /** + * Converts this RBACBindingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.RBACBindingConfig + * @instance + * @returns {Object.} JSON object + */ + RBACBindingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RBACBindingConfig + * @function getTypeUrl + * @memberof google.container.v1.RBACBindingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RBACBindingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RBACBindingConfig"; + }; + + return RBACBindingConfig; + })(); + + v1.UserManagedKeysConfig = (function() { + + /** + * Properties of a UserManagedKeysConfig. + * @memberof google.container.v1 + * @interface IUserManagedKeysConfig + * @property {string|null} [clusterCa] UserManagedKeysConfig clusterCa + * @property {string|null} [etcdApiCa] UserManagedKeysConfig etcdApiCa + * @property {string|null} [etcdPeerCa] UserManagedKeysConfig etcdPeerCa + * @property {Array.|null} [serviceAccountSigningKeys] UserManagedKeysConfig serviceAccountSigningKeys + * @property {Array.|null} [serviceAccountVerificationKeys] UserManagedKeysConfig serviceAccountVerificationKeys + * @property {string|null} [aggregationCa] UserManagedKeysConfig aggregationCa + * @property {string|null} [controlPlaneDiskEncryptionKey] UserManagedKeysConfig controlPlaneDiskEncryptionKey + * @property {string|null} [gkeopsEtcdBackupEncryptionKey] UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey + */ + + /** + * Constructs a new UserManagedKeysConfig. + * @memberof google.container.v1 + * @classdesc Represents a UserManagedKeysConfig. + * @implements IUserManagedKeysConfig + * @constructor + * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set + */ + function UserManagedKeysConfig(properties) { + this.serviceAccountSigningKeys = []; + this.serviceAccountVerificationKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserManagedKeysConfig clusterCa. + * @member {string} clusterCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.clusterCa = ""; + + /** + * UserManagedKeysConfig etcdApiCa. + * @member {string} etcdApiCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.etcdApiCa = ""; + + /** + * UserManagedKeysConfig etcdPeerCa. + * @member {string} etcdPeerCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.etcdPeerCa = ""; + + /** + * UserManagedKeysConfig serviceAccountSigningKeys. + * @member {Array.} serviceAccountSigningKeys + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.serviceAccountSigningKeys = $util.emptyArray; + + /** + * UserManagedKeysConfig serviceAccountVerificationKeys. + * @member {Array.} serviceAccountVerificationKeys + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.serviceAccountVerificationKeys = $util.emptyArray; + + /** + * UserManagedKeysConfig aggregationCa. + * @member {string} aggregationCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.aggregationCa = ""; + + /** + * UserManagedKeysConfig controlPlaneDiskEncryptionKey. + * @member {string} controlPlaneDiskEncryptionKey + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.controlPlaneDiskEncryptionKey = ""; + + /** + * UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. + * @member {string} gkeopsEtcdBackupEncryptionKey + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.gkeopsEtcdBackupEncryptionKey = ""; + + /** + * Creates a new UserManagedKeysConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig instance + */ + UserManagedKeysConfig.create = function create(properties) { + return new UserManagedKeysConfig(properties); + }; + + /** + * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserManagedKeysConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterCa != null && Object.hasOwnProperty.call(message, "clusterCa")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.clusterCa); + if (message.etcdApiCa != null && Object.hasOwnProperty.call(message, "etcdApiCa")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etcdApiCa); + if (message.etcdPeerCa != null && Object.hasOwnProperty.call(message, "etcdPeerCa")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etcdPeerCa); + if (message.serviceAccountSigningKeys != null && message.serviceAccountSigningKeys.length) + for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.serviceAccountSigningKeys[i]); + if (message.serviceAccountVerificationKeys != null && message.serviceAccountVerificationKeys.length) + for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.serviceAccountVerificationKeys[i]); + if (message.aggregationCa != null && Object.hasOwnProperty.call(message, "aggregationCa")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.aggregationCa); + if (message.controlPlaneDiskEncryptionKey != null && Object.hasOwnProperty.call(message, "controlPlaneDiskEncryptionKey")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.controlPlaneDiskEncryptionKey); + if (message.gkeopsEtcdBackupEncryptionKey != null && Object.hasOwnProperty.call(message, "gkeopsEtcdBackupEncryptionKey")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.gkeopsEtcdBackupEncryptionKey); + return writer; + }; + + /** + * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserManagedKeysConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserManagedKeysConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserManagedKeysConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UserManagedKeysConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: { + message.clusterCa = reader.string(); + break; + } + case 11: { + message.etcdApiCa = reader.string(); + break; + } + case 12: { + message.etcdPeerCa = reader.string(); + break; + } + case 13: { + if (!(message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length)) + message.serviceAccountSigningKeys = []; + message.serviceAccountSigningKeys.push(reader.string()); + break; + } + case 14: { + if (!(message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length)) + message.serviceAccountVerificationKeys = []; + message.serviceAccountVerificationKeys.push(reader.string()); + break; + } + case 15: { + message.aggregationCa = reader.string(); + break; + } + case 16: { + message.controlPlaneDiskEncryptionKey = reader.string(); + break; + } + case 17: { + message.gkeopsEtcdBackupEncryptionKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserManagedKeysConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserManagedKeysConfig message. + * @function verify + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserManagedKeysConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) + if (!$util.isString(message.clusterCa)) + return "clusterCa: string expected"; + if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) + if (!$util.isString(message.etcdApiCa)) + return "etcdApiCa: string expected"; + if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) + if (!$util.isString(message.etcdPeerCa)) + return "etcdPeerCa: string expected"; + if (message.serviceAccountSigningKeys != null && message.hasOwnProperty("serviceAccountSigningKeys")) { + if (!Array.isArray(message.serviceAccountSigningKeys)) + return "serviceAccountSigningKeys: array expected"; + for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) + if (!$util.isString(message.serviceAccountSigningKeys[i])) + return "serviceAccountSigningKeys: string[] expected"; + } + if (message.serviceAccountVerificationKeys != null && message.hasOwnProperty("serviceAccountVerificationKeys")) { + if (!Array.isArray(message.serviceAccountVerificationKeys)) + return "serviceAccountVerificationKeys: array expected"; + for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) + if (!$util.isString(message.serviceAccountVerificationKeys[i])) + return "serviceAccountVerificationKeys: string[] expected"; + } + if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) + if (!$util.isString(message.aggregationCa)) + return "aggregationCa: string expected"; + if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) + if (!$util.isString(message.controlPlaneDiskEncryptionKey)) + return "controlPlaneDiskEncryptionKey: string expected"; + if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) + if (!$util.isString(message.gkeopsEtcdBackupEncryptionKey)) + return "gkeopsEtcdBackupEncryptionKey: string expected"; + return null; + }; + + /** + * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig + */ + UserManagedKeysConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UserManagedKeysConfig) + return object; + var message = new $root.google.container.v1.UserManagedKeysConfig(); + if (object.clusterCa != null) + message.clusterCa = String(object.clusterCa); + if (object.etcdApiCa != null) + message.etcdApiCa = String(object.etcdApiCa); + if (object.etcdPeerCa != null) + message.etcdPeerCa = String(object.etcdPeerCa); + if (object.serviceAccountSigningKeys) { + if (!Array.isArray(object.serviceAccountSigningKeys)) + throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountSigningKeys: array expected"); + message.serviceAccountSigningKeys = []; + for (var i = 0; i < object.serviceAccountSigningKeys.length; ++i) + message.serviceAccountSigningKeys[i] = String(object.serviceAccountSigningKeys[i]); + } + if (object.serviceAccountVerificationKeys) { + if (!Array.isArray(object.serviceAccountVerificationKeys)) + throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountVerificationKeys: array expected"); + message.serviceAccountVerificationKeys = []; + for (var i = 0; i < object.serviceAccountVerificationKeys.length; ++i) + message.serviceAccountVerificationKeys[i] = String(object.serviceAccountVerificationKeys[i]); + } + if (object.aggregationCa != null) + message.aggregationCa = String(object.aggregationCa); + if (object.controlPlaneDiskEncryptionKey != null) + message.controlPlaneDiskEncryptionKey = String(object.controlPlaneDiskEncryptionKey); + if (object.gkeopsEtcdBackupEncryptionKey != null) + message.gkeopsEtcdBackupEncryptionKey = String(object.gkeopsEtcdBackupEncryptionKey); + return message; + }; + + /** + * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {google.container.v1.UserManagedKeysConfig} message UserManagedKeysConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserManagedKeysConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceAccountSigningKeys = []; + object.serviceAccountVerificationKeys = []; + } + if (options.defaults) { + object.clusterCa = ""; + object.etcdApiCa = ""; + object.etcdPeerCa = ""; + object.aggregationCa = ""; + object.controlPlaneDiskEncryptionKey = ""; + object.gkeopsEtcdBackupEncryptionKey = ""; + } + if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) + object.clusterCa = message.clusterCa; + if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) + object.etcdApiCa = message.etcdApiCa; + if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) + object.etcdPeerCa = message.etcdPeerCa; + if (message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length) { + object.serviceAccountSigningKeys = []; + for (var j = 0; j < message.serviceAccountSigningKeys.length; ++j) + object.serviceAccountSigningKeys[j] = message.serviceAccountSigningKeys[j]; + } + if (message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length) { + object.serviceAccountVerificationKeys = []; + for (var j = 0; j < message.serviceAccountVerificationKeys.length; ++j) + object.serviceAccountVerificationKeys[j] = message.serviceAccountVerificationKeys[j]; + } + if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) + object.aggregationCa = message.aggregationCa; + if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) + object.controlPlaneDiskEncryptionKey = message.controlPlaneDiskEncryptionKey; + if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) + object.gkeopsEtcdBackupEncryptionKey = message.gkeopsEtcdBackupEncryptionKey; + return object; + }; + + /** + * Converts this UserManagedKeysConfig to JSON. + * @function toJSON + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + * @returns {Object.} JSON object + */ + UserManagedKeysConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserManagedKeysConfig + * @function getTypeUrl + * @memberof google.container.v1.UserManagedKeysConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserManagedKeysConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UserManagedKeysConfig"; + }; + + return UserManagedKeysConfig; + })(); + + v1.CompliancePostureConfig = (function() { + + /** + * Properties of a CompliancePostureConfig. + * @memberof google.container.v1 + * @interface ICompliancePostureConfig + * @property {google.container.v1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode + * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards + */ + + /** + * Constructs a new CompliancePostureConfig. + * @memberof google.container.v1 + * @classdesc Represents a CompliancePostureConfig. + * @implements ICompliancePostureConfig + * @constructor + * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set + */ + function CompliancePostureConfig(properties) { + this.complianceStandards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompliancePostureConfig mode. + * @member {google.container.v1.CompliancePostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1.CompliancePostureConfig + * @instance + */ + CompliancePostureConfig.prototype.mode = null; + + /** + * CompliancePostureConfig complianceStandards. + * @member {Array.} complianceStandards + * @memberof google.container.v1.CompliancePostureConfig + * @instance + */ + CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompliancePostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1.CompliancePostureConfig + * @instance + */ + Object.defineProperty(CompliancePostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompliancePostureConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig instance + */ + CompliancePostureConfig.create = function create(properties) { + return new CompliancePostureConfig(properties); + }; + + /** + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompliancePostureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.complianceStandards != null && message.complianceStandards.length) + for (var i = 0; i < message.complianceStandards.length; ++i) + $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompliancePostureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + if (!(message.complianceStandards && message.complianceStandards.length)) + message.complianceStandards = []; + message.complianceStandards.push($root.google.container.v1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompliancePostureConfig message. + * @function verify + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompliancePostureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { + if (!Array.isArray(message.complianceStandards)) + return "complianceStandards: array expected"; + for (var i = 0; i < message.complianceStandards.length; ++i) { + var error = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); + if (error) + return "complianceStandards." + error; + } + } + return null; + }; + + /** + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig + */ + CompliancePostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompliancePostureConfig) + return object; + var message = new $root.google.container.v1.CompliancePostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "ENABLED": + case 2: + message.mode = 2; + break; + } + if (object.complianceStandards) { + if (!Array.isArray(object.complianceStandards)) + throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: array expected"); + message.complianceStandards = []; + for (var i = 0; i < object.complianceStandards.length; ++i) { + if (typeof object.complianceStandards[i] !== "object") + throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: object expected"); + message.complianceStandards[i] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {google.container.v1.CompliancePostureConfig} message CompliancePostureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompliancePostureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.complianceStandards = []; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.complianceStandards && message.complianceStandards.length) { + object.complianceStandards = []; + for (var j = 0; j < message.complianceStandards.length; ++j) + object.complianceStandards[j] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); + } + return object; + }; + + /** + * Converts this CompliancePostureConfig to JSON. + * @function toJSON + * @memberof google.container.v1.CompliancePostureConfig + * @instance + * @returns {Object.} JSON object + */ + CompliancePostureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompliancePostureConfig + * @function getTypeUrl + * @memberof google.container.v1.CompliancePostureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1.CompliancePostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + CompliancePostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + CompliancePostureConfig.ComplianceStandard = (function() { + + /** + * Properties of a ComplianceStandard. + * @memberof google.container.v1.CompliancePostureConfig + * @interface IComplianceStandard + * @property {string|null} [standard] ComplianceStandard standard + */ + + /** + * Constructs a new ComplianceStandard. + * @memberof google.container.v1.CompliancePostureConfig + * @classdesc Represents a ComplianceStandard. + * @implements IComplianceStandard + * @constructor + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + */ + function ComplianceStandard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComplianceStandard standard. + * @member {string|null|undefined} standard + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + ComplianceStandard.prototype.standard = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComplianceStandard _standard. + * @member {"standard"|undefined} _standard + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + Object.defineProperty(ComplianceStandard.prototype, "_standard", { + get: $util.oneOfGetter($oneOfFields = ["standard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @function create + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance + */ + ComplianceStandard.create = function create(properties) { + return new ComplianceStandard(properties); + }; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); + return writer; + }; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.standard = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComplianceStandard message. + * @function verify + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComplianceStandard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + properties._standard = 1; + if (!$util.isString(message.standard)) + return "standard: string expected"; + } + return null; + }; + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + */ + ComplianceStandard.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompliancePostureConfig.ComplianceStandard) + return object; + var message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); + if (object.standard != null) + message.standard = String(object.standard); + return message; + }; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComplianceStandard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + object.standard = message.standard; + if (options.oneofs) + object._standard = "standard"; + } + return object; + }; + + /** + * Converts this ComplianceStandard to JSON. + * @function toJSON + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + * @returns {Object.} JSON object + */ + ComplianceStandard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComplianceStandard + * @function getTypeUrl + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig.ComplianceStandard"; + }; + + return ComplianceStandard; + })(); + + return CompliancePostureConfig; + })(); + + v1.K8sBetaAPIConfig = (function() { + + /** + * Properties of a K8sBetaAPIConfig. + * @memberof google.container.v1 + * @interface IK8sBetaAPIConfig + * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis + */ + + /** + * Constructs a new K8sBetaAPIConfig. + * @memberof google.container.v1 + * @classdesc Represents a K8sBetaAPIConfig. + * @implements IK8sBetaAPIConfig + * @constructor + * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set + */ + function K8sBetaAPIConfig(properties) { + this.enabledApis = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * K8sBetaAPIConfig enabledApis. + * @member {Array.} enabledApis + * @memberof google.container.v1.K8sBetaAPIConfig + * @instance + */ + K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; + + /** + * Creates a new K8sBetaAPIConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig instance + */ + K8sBetaAPIConfig.create = function create(properties) { + return new K8sBetaAPIConfig(properties); + }; + + /** + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + K8sBetaAPIConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabledApis != null && message.enabledApis.length) + for (var i = 0; i < message.enabledApis.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); + return writer; + }; + + /** + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + K8sBetaAPIConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.K8sBetaAPIConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.enabledApis && message.enabledApis.length)) + message.enabledApis = []; + message.enabledApis.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a K8sBetaAPIConfig message. + * @function verify + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + K8sBetaAPIConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { + if (!Array.isArray(message.enabledApis)) + return "enabledApis: array expected"; + for (var i = 0; i < message.enabledApis.length; ++i) + if (!$util.isString(message.enabledApis[i])) + return "enabledApis: string[] expected"; + } + return null; + }; + + /** + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + */ + K8sBetaAPIConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.K8sBetaAPIConfig) + return object; + var message = new $root.google.container.v1.K8sBetaAPIConfig(); + if (object.enabledApis) { + if (!Array.isArray(object.enabledApis)) + throw TypeError(".google.container.v1.K8sBetaAPIConfig.enabledApis: array expected"); + message.enabledApis = []; + for (var i = 0; i < object.enabledApis.length; ++i) + message.enabledApis[i] = String(object.enabledApis[i]); + } + return message; + }; + + /** + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {google.container.v1.K8sBetaAPIConfig} message K8sBetaAPIConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + K8sBetaAPIConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.enabledApis = []; + if (message.enabledApis && message.enabledApis.length) { + object.enabledApis = []; + for (var j = 0; j < message.enabledApis.length; ++j) + object.enabledApis[j] = message.enabledApis[j]; + } + return object; + }; + + /** + * Converts this K8sBetaAPIConfig to JSON. + * @function toJSON + * @memberof google.container.v1.K8sBetaAPIConfig + * @instance + * @returns {Object.} JSON object + */ + K8sBetaAPIConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for K8sBetaAPIConfig + * @function getTypeUrl + * @memberof google.container.v1.K8sBetaAPIConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.K8sBetaAPIConfig"; + }; + + return K8sBetaAPIConfig; + })(); + + v1.SecurityPostureConfig = (function() { + + /** + * Properties of a SecurityPostureConfig. + * @memberof google.container.v1 + * @interface ISecurityPostureConfig + * @property {google.container.v1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode + * @property {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode + */ + + /** + * Constructs a new SecurityPostureConfig. + * @memberof google.container.v1 + * @classdesc Represents a SecurityPostureConfig. + * @implements ISecurityPostureConfig + * @constructor + * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set + */ + function SecurityPostureConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityPostureConfig mode. + * @member {google.container.v1.SecurityPostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + SecurityPostureConfig.prototype.mode = null; + + /** + * SecurityPostureConfig vulnerabilityMode. + * @member {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + SecurityPostureConfig.prototype.vulnerabilityMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecurityPostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SecurityPostureConfig _vulnerabilityMode. + * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { + get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig instance + */ + SecurityPostureConfig.create = function create(properties) { + return new SecurityPostureConfig(properties); + }; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); + return writer; + }; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityPostureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.vulnerabilityMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityPostureConfig message. + * @function verify + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityPostureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + properties._vulnerabilityMode = 1; + switch (message.vulnerabilityMode) { + default: + return "vulnerabilityMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + */ + SecurityPostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecurityPostureConfig) + return object; + var message = new $root.google.container.v1.SecurityPostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "BASIC": + case 2: + message.mode = 2; + break; + case "ENTERPRISE": + case 3: + message.mode = 3; + break; + } + switch (object.vulnerabilityMode) { + default: + if (typeof object.vulnerabilityMode === "number") { + message.vulnerabilityMode = object.vulnerabilityMode; + break; + } + break; + case "VULNERABILITY_MODE_UNSPECIFIED": + case 0: + message.vulnerabilityMode = 0; + break; + case "VULNERABILITY_DISABLED": + case 1: + message.vulnerabilityMode = 1; + break; + case "VULNERABILITY_BASIC": + case 2: + message.vulnerabilityMode = 2; + break; + case "VULNERABILITY_ENTERPRISE": + case 3: + message.vulnerabilityMode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.SecurityPostureConfig} message SecurityPostureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityPostureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + object.vulnerabilityMode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; + if (options.oneofs) + object._vulnerabilityMode = "vulnerabilityMode"; + } + return object; + }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SecurityPostureConfig + * @instance + * @returns {Object.} JSON object + */ + SecurityPostureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityPostureConfig + * @function getTypeUrl + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecurityPostureConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1.SecurityPostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=2 BASIC value + * @property {number} ENTERPRISE=3 ENTERPRISE value + */ + SecurityPostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); + + /** + * VulnerabilityMode enum. + * @name google.container.v1.SecurityPostureConfig.VulnerabilityMode + * @enum {number} + * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value + * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value + * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value + * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value + */ + SecurityPostureConfig.VulnerabilityMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; + values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; + values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; + return values; + })(); + + return SecurityPostureConfig; + })(); + + v1.NodePoolAutoConfig = (function() { + + /** + * Properties of a NodePoolAutoConfig. + * @memberof google.container.v1 + * @interface INodePoolAutoConfig + * @property {google.container.v1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags + * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags + * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig + * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] NodePoolAutoConfig linuxNodeConfig + */ + + /** + * Constructs a new NodePoolAutoConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolAutoConfig. + * @implements INodePoolAutoConfig + * @constructor + * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set + */ + function NodePoolAutoConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolAutoConfig networkTags. + * @member {google.container.v1.INetworkTags|null|undefined} networkTags + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.networkTags = null; + + /** + * NodePoolAutoConfig resourceManagerTags. + * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.resourceManagerTags = null; + + /** + * NodePoolAutoConfig nodeKubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.nodeKubeletConfig = null; + + /** + * NodePoolAutoConfig linuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.linuxNodeConfig = null; + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig instance + */ + NodePoolAutoConfig.create = function create(properties) { + return new NodePoolAutoConfig(properties); + }; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) + $root.google.container.v1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 2: { + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolAutoConfig message. + * @function verify + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolAutoConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + var error = $root.google.container.v1.NetworkTags.verify(message.networkTags); + if (error) + return "networkTags." + error; + } + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); + if (error) + return "nodeKubeletConfig." + error; + } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } + return null; + }; + + /** + * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + */ + NodePoolAutoConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolAutoConfig) + return object; + var message = new $root.google.container.v1.NodePoolAutoConfig(); + if (object.networkTags != null) { + if (typeof object.networkTags !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.networkTags: object expected"); + message.networkTags = $root.google.container.v1.NetworkTags.fromObject(object.networkTags); + } + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.nodeKubeletConfig != null) { + if (typeof object.nodeKubeletConfig !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.NodePoolAutoConfig} message NodePoolAutoConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolAutoConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkTags = null; + object.resourceManagerTags = null; + object.nodeKubeletConfig = null; + object.linuxNodeConfig = null; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) + object.networkTags = $root.google.container.v1.NetworkTags.toObject(message.networkTags, options); + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) + object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); + return object; + }; + + /** + * Converts this NodePoolAutoConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + * @returns {Object.} JSON object + */ + NodePoolAutoConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolAutoConfig + * @function getTypeUrl + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolAutoConfig"; + }; + + return NodePoolAutoConfig; + })(); + + v1.NodePoolDefaults = (function() { + + /** + * Properties of a NodePoolDefaults. + * @memberof google.container.v1 + * @interface INodePoolDefaults + * @property {google.container.v1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults + */ + + /** + * Constructs a new NodePoolDefaults. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolDefaults. + * @implements INodePoolDefaults + * @constructor + * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set + */ + function NodePoolDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolDefaults nodeConfigDefaults. + * @member {google.container.v1.INodeConfigDefaults|null|undefined} nodeConfigDefaults + * @memberof google.container.v1.NodePoolDefaults + * @instance + */ + NodePoolDefaults.prototype.nodeConfigDefaults = null; + + /** + * Creates a new NodePoolDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults instance + */ + NodePoolDefaults.create = function create(properties) { + return new NodePoolDefaults(properties); + }; + + /** + * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) + $root.google.container.v1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolDefaults message. + * @function verify + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { + var error = $root.google.container.v1.NodeConfigDefaults.verify(message.nodeConfigDefaults); + if (error) + return "nodeConfigDefaults." + error; + } + return null; + }; + + /** + * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + */ + NodePoolDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolDefaults) + return object; + var message = new $root.google.container.v1.NodePoolDefaults(); + if (object.nodeConfigDefaults != null) { + if (typeof object.nodeConfigDefaults !== "object") + throw TypeError(".google.container.v1.NodePoolDefaults.nodeConfigDefaults: object expected"); + message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.NodePoolDefaults} message NodePoolDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nodeConfigDefaults = null; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) + object.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); + return object; + }; + + /** + * Converts this NodePoolDefaults to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolDefaults + * @instance + * @returns {Object.} JSON object + */ + NodePoolDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolDefaults + * @function getTypeUrl + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolDefaults"; + }; + + return NodePoolDefaults; + })(); + + v1.NodeConfigDefaults = (function() { + + /** + * Properties of a NodeConfigDefaults. + * @memberof google.container.v1 + * @interface INodeConfigDefaults + * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig + * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig + * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig + * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig + */ + + /** + * Constructs a new NodeConfigDefaults. + * @memberof google.container.v1 + * @classdesc Represents a NodeConfigDefaults. + * @implements INodeConfigDefaults + * @constructor + * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set + */ + function NodeConfigDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfigDefaults gcfsConfig. + * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.gcfsConfig = null; + + /** + * NodeConfigDefaults loggingConfig. + * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.loggingConfig = null; + + /** + * NodeConfigDefaults containerdConfig. + * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.containerdConfig = null; + + /** + * NodeConfigDefaults nodeKubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.nodeKubeletConfig = null; + + /** + * Creates a new NodeConfigDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set + * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults instance + */ + NodeConfigDefaults.create = function create(properties) { + return new NodeConfigDefaults(properties); + }; + + /** + * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {google.container.v1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfigDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {google.container.v1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfigDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfigDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeConfigDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfigDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfigDefaults message. + * @function verify + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfigDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); + if (error) + return "nodeKubeletConfig." + error; + } + return null; + }; + + /** + * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults + */ + NodeConfigDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeConfigDefaults) + return object; + var message = new $root.google.container.v1.NodeConfigDefaults(); + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1.NodeConfigDefaults.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1.NodeConfigDefaults.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1.NodeConfigDefaults.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.nodeKubeletConfig != null) { + if (typeof object.nodeKubeletConfig !== "object") + throw TypeError(".google.container.v1.NodeConfigDefaults.nodeKubeletConfig: object expected"); + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {google.container.v1.NodeConfigDefaults} message NodeConfigDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfigDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcfsConfig = null; + object.loggingConfig = null; + object.containerdConfig = null; + object.nodeKubeletConfig = null; + } + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) + object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + return object; + }; + + /** + * Converts this NodeConfigDefaults to JSON. + * @function toJSON + * @memberof google.container.v1.NodeConfigDefaults + * @instance + * @returns {Object.} JSON object + */ + NodeConfigDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfigDefaults + * @function getTypeUrl + * @memberof google.container.v1.NodeConfigDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfigDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeConfigDefaults"; + }; + + return NodeConfigDefaults; + })(); + + v1.ClusterUpdate = (function() { + + /** + * Properties of a ClusterUpdate. + * @memberof google.container.v1 + * @interface IClusterUpdate + * @property {string|null} [desiredNodeVersion] ClusterUpdate desiredNodeVersion + * @property {string|null} [desiredMonitoringService] ClusterUpdate desiredMonitoringService + * @property {google.container.v1.IAddonsConfig|null} [desiredAddonsConfig] ClusterUpdate desiredAddonsConfig + * @property {string|null} [desiredNodePoolId] ClusterUpdate desiredNodePoolId + * @property {string|null} [desiredImageType] ClusterUpdate desiredImageType + * @property {google.container.v1.IDatabaseEncryption|null} [desiredDatabaseEncryption] ClusterUpdate desiredDatabaseEncryption + * @property {google.container.v1.IWorkloadIdentityConfig|null} [desiredWorkloadIdentityConfig] ClusterUpdate desiredWorkloadIdentityConfig + * @property {google.container.v1.IMeshCertificates|null} [desiredMeshCertificates] ClusterUpdate desiredMeshCertificates + * @property {google.container.v1.IShieldedNodes|null} [desiredShieldedNodes] ClusterUpdate desiredShieldedNodes + * @property {google.container.v1.ICostManagementConfig|null} [desiredCostManagementConfig] ClusterUpdate desiredCostManagementConfig + * @property {google.container.v1.IDNSConfig|null} [desiredDnsConfig] ClusterUpdate desiredDnsConfig + * @property {google.container.v1.INodePoolAutoscaling|null} [desiredNodePoolAutoscaling] ClusterUpdate desiredNodePoolAutoscaling + * @property {Array.|null} [desiredLocations] ClusterUpdate desiredLocations + * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [desiredMasterAuthorizedNetworksConfig] ClusterUpdate desiredMasterAuthorizedNetworksConfig + * @property {google.container.v1.IClusterAutoscaling|null} [desiredClusterAutoscaling] ClusterUpdate desiredClusterAutoscaling + * @property {google.container.v1.IBinaryAuthorization|null} [desiredBinaryAuthorization] ClusterUpdate desiredBinaryAuthorization + * @property {string|null} [desiredLoggingService] ClusterUpdate desiredLoggingService + * @property {google.container.v1.IResourceUsageExportConfig|null} [desiredResourceUsageExportConfig] ClusterUpdate desiredResourceUsageExportConfig + * @property {google.container.v1.IVerticalPodAutoscaling|null} [desiredVerticalPodAutoscaling] ClusterUpdate desiredVerticalPodAutoscaling + * @property {google.container.v1.IPrivateClusterConfig|null} [desiredPrivateClusterConfig] ClusterUpdate desiredPrivateClusterConfig + * @property {google.container.v1.IIntraNodeVisibilityConfig|null} [desiredIntraNodeVisibilityConfig] ClusterUpdate desiredIntraNodeVisibilityConfig + * @property {google.container.v1.IDefaultSnatStatus|null} [desiredDefaultSnatStatus] ClusterUpdate desiredDefaultSnatStatus + * @property {google.container.v1.IReleaseChannel|null} [desiredReleaseChannel] ClusterUpdate desiredReleaseChannel + * @property {google.container.v1.IILBSubsettingConfig|null} [desiredL4ilbSubsettingConfig] ClusterUpdate desiredL4ilbSubsettingConfig + * @property {google.container.v1.DatapathProvider|null} [desiredDatapathProvider] ClusterUpdate desiredDatapathProvider + * @property {google.container.v1.PrivateIPv6GoogleAccess|null} [desiredPrivateIpv6GoogleAccess] ClusterUpdate desiredPrivateIpv6GoogleAccess + * @property {google.container.v1.INotificationConfig|null} [desiredNotificationConfig] ClusterUpdate desiredNotificationConfig + * @property {google.container.v1.IAuthenticatorGroupsConfig|null} [desiredAuthenticatorGroupsConfig] ClusterUpdate desiredAuthenticatorGroupsConfig + * @property {google.container.v1.ILoggingConfig|null} [desiredLoggingConfig] ClusterUpdate desiredLoggingConfig + * @property {google.container.v1.IMonitoringConfig|null} [desiredMonitoringConfig] ClusterUpdate desiredMonitoringConfig + * @property {google.container.v1.IIdentityServiceConfig|null} [desiredIdentityServiceConfig] ClusterUpdate desiredIdentityServiceConfig + * @property {google.container.v1.IServiceExternalIPsConfig|null} [desiredServiceExternalIpsConfig] ClusterUpdate desiredServiceExternalIpsConfig + * @property {boolean|null} [desiredEnablePrivateEndpoint] ClusterUpdate desiredEnablePrivateEndpoint + * @property {boolean|null} [desiredDefaultEnablePrivateNodes] ClusterUpdate desiredDefaultEnablePrivateNodes + * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [desiredControlPlaneEndpointsConfig] ClusterUpdate desiredControlPlaneEndpointsConfig + * @property {string|null} [desiredMasterVersion] ClusterUpdate desiredMasterVersion + * @property {google.container.v1.IGcfsConfig|null} [desiredGcfsConfig] ClusterUpdate desiredGcfsConfig + * @property {google.container.v1.INetworkTags|null} [desiredNodePoolAutoConfigNetworkTags] ClusterUpdate desiredNodePoolAutoConfigNetworkTags + * @property {google.container.v1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig + * @property {string|null} [etag] ClusterUpdate etag + * @property {google.container.v1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig + * @property {google.container.v1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet + * @property {google.container.v1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType + * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig + * @property {google.container.v1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig + * @property {google.container.v1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] ClusterUpdate enableK8sBetaApis + * @property {google.container.v1.ISecurityPostureConfig|null} [desiredSecurityPostureConfig] ClusterUpdate desiredSecurityPostureConfig + * @property {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [desiredNetworkPerformanceConfig] ClusterUpdate desiredNetworkPerformanceConfig + * @property {boolean|null} [desiredEnableFqdnNetworkPolicy] ClusterUpdate desiredEnableFqdnNetworkPolicy + * @property {google.container.v1.IWorkloadPolicyConfig|null} [desiredAutopilotWorkloadPolicyConfig] ClusterUpdate desiredAutopilotWorkloadPolicyConfig + * @property {google.container.v1.IK8sBetaAPIConfig|null} [desiredK8sBetaApis] ClusterUpdate desiredK8sBetaApis + * @property {google.container.v1.IContainerdConfig|null} [desiredContainerdConfig] ClusterUpdate desiredContainerdConfig + * @property {boolean|null} [desiredEnableMultiNetworking] ClusterUpdate desiredEnableMultiNetworking + * @property {google.container.v1.IResourceManagerTags|null} [desiredNodePoolAutoConfigResourceManagerTags] ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags + * @property {google.container.v1.InTransitEncryptionConfig|null} [desiredInTransitEncryptionConfig] ClusterUpdate desiredInTransitEncryptionConfig + * @property {boolean|null} [desiredEnableCiliumClusterwideNetworkPolicy] ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy + * @property {google.container.v1.ISecretManagerConfig|null} [desiredSecretManagerConfig] ClusterUpdate desiredSecretManagerConfig + * @property {google.container.v1.ICompliancePostureConfig|null} [desiredCompliancePostureConfig] ClusterUpdate desiredCompliancePostureConfig + * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodeKubeletConfig] ClusterUpdate desiredNodeKubeletConfig + * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig + * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] ClusterUpdate userManagedKeysConfig + * @property {google.container.v1.IRBACBindingConfig|null} [desiredRbacBindingConfig] ClusterUpdate desiredRbacBindingConfig + * @property {google.container.v1.IDesiredEnterpriseConfig|null} [desiredEnterpriseConfig] ClusterUpdate desiredEnterpriseConfig + * @property {google.container.v1.ILinuxNodeConfig|null} [desiredNodePoolAutoConfigLinuxNodeConfig] ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig + */ + + /** + * Constructs a new ClusterUpdate. + * @memberof google.container.v1 + * @classdesc Represents a ClusterUpdate. + * @implements IClusterUpdate + * @constructor + * @param {google.container.v1.IClusterUpdate=} [properties] Properties to set + */ + function ClusterUpdate(properties) { + this.desiredLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterUpdate desiredNodeVersion. + * @member {string} desiredNodeVersion + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodeVersion = ""; + + /** + * ClusterUpdate desiredMonitoringService. + * @member {string} desiredMonitoringService + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMonitoringService = ""; + + /** + * ClusterUpdate desiredAddonsConfig. + * @member {google.container.v1.IAddonsConfig|null|undefined} desiredAddonsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAddonsConfig = null; + + /** + * ClusterUpdate desiredNodePoolId. + * @member {string} desiredNodePoolId + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolId = ""; + + /** + * ClusterUpdate desiredImageType. + * @member {string} desiredImageType + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredImageType = ""; + + /** + * ClusterUpdate desiredDatabaseEncryption. + * @member {google.container.v1.IDatabaseEncryption|null|undefined} desiredDatabaseEncryption + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDatabaseEncryption = null; + + /** + * ClusterUpdate desiredWorkloadIdentityConfig. + * @member {google.container.v1.IWorkloadIdentityConfig|null|undefined} desiredWorkloadIdentityConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredWorkloadIdentityConfig = null; + + /** + * ClusterUpdate desiredMeshCertificates. + * @member {google.container.v1.IMeshCertificates|null|undefined} desiredMeshCertificates + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMeshCertificates = null; + + /** + * ClusterUpdate desiredShieldedNodes. + * @member {google.container.v1.IShieldedNodes|null|undefined} desiredShieldedNodes + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredShieldedNodes = null; + + /** + * ClusterUpdate desiredCostManagementConfig. + * @member {google.container.v1.ICostManagementConfig|null|undefined} desiredCostManagementConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredCostManagementConfig = null; + + /** + * ClusterUpdate desiredDnsConfig. + * @member {google.container.v1.IDNSConfig|null|undefined} desiredDnsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDnsConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoscaling. + * @member {google.container.v1.INodePoolAutoscaling|null|undefined} desiredNodePoolAutoscaling + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoscaling = null; + + /** + * ClusterUpdate desiredLocations. + * @member {Array.} desiredLocations + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLocations = $util.emptyArray; + + /** + * ClusterUpdate desiredMasterAuthorizedNetworksConfig. + * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} desiredMasterAuthorizedNetworksConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMasterAuthorizedNetworksConfig = null; + + /** + * ClusterUpdate desiredClusterAutoscaling. + * @member {google.container.v1.IClusterAutoscaling|null|undefined} desiredClusterAutoscaling + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredClusterAutoscaling = null; + + /** + * ClusterUpdate desiredBinaryAuthorization. + * @member {google.container.v1.IBinaryAuthorization|null|undefined} desiredBinaryAuthorization + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredBinaryAuthorization = null; + + /** + * ClusterUpdate desiredLoggingService. + * @member {string} desiredLoggingService + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLoggingService = ""; + + /** + * ClusterUpdate desiredResourceUsageExportConfig. + * @member {google.container.v1.IResourceUsageExportConfig|null|undefined} desiredResourceUsageExportConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredResourceUsageExportConfig = null; + + /** + * ClusterUpdate desiredVerticalPodAutoscaling. + * @member {google.container.v1.IVerticalPodAutoscaling|null|undefined} desiredVerticalPodAutoscaling + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredVerticalPodAutoscaling = null; + + /** + * ClusterUpdate desiredPrivateClusterConfig. + * @member {google.container.v1.IPrivateClusterConfig|null|undefined} desiredPrivateClusterConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredPrivateClusterConfig = null; + + /** + * ClusterUpdate desiredIntraNodeVisibilityConfig. + * @member {google.container.v1.IIntraNodeVisibilityConfig|null|undefined} desiredIntraNodeVisibilityConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredIntraNodeVisibilityConfig = null; + + /** + * ClusterUpdate desiredDefaultSnatStatus. + * @member {google.container.v1.IDefaultSnatStatus|null|undefined} desiredDefaultSnatStatus + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDefaultSnatStatus = null; + + /** + * ClusterUpdate desiredReleaseChannel. + * @member {google.container.v1.IReleaseChannel|null|undefined} desiredReleaseChannel + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredReleaseChannel = null; + + /** + * ClusterUpdate desiredL4ilbSubsettingConfig. + * @member {google.container.v1.IILBSubsettingConfig|null|undefined} desiredL4ilbSubsettingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredL4ilbSubsettingConfig = null; + + /** + * ClusterUpdate desiredDatapathProvider. + * @member {google.container.v1.DatapathProvider} desiredDatapathProvider + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDatapathProvider = 0; + + /** + * ClusterUpdate desiredPrivateIpv6GoogleAccess. + * @member {google.container.v1.PrivateIPv6GoogleAccess} desiredPrivateIpv6GoogleAccess + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredPrivateIpv6GoogleAccess = 0; + + /** + * ClusterUpdate desiredNotificationConfig. + * @member {google.container.v1.INotificationConfig|null|undefined} desiredNotificationConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNotificationConfig = null; + + /** + * ClusterUpdate desiredAuthenticatorGroupsConfig. + * @member {google.container.v1.IAuthenticatorGroupsConfig|null|undefined} desiredAuthenticatorGroupsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAuthenticatorGroupsConfig = null; + + /** + * ClusterUpdate desiredLoggingConfig. + * @member {google.container.v1.ILoggingConfig|null|undefined} desiredLoggingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLoggingConfig = null; + + /** + * ClusterUpdate desiredMonitoringConfig. + * @member {google.container.v1.IMonitoringConfig|null|undefined} desiredMonitoringConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMonitoringConfig = null; + + /** + * ClusterUpdate desiredIdentityServiceConfig. + * @member {google.container.v1.IIdentityServiceConfig|null|undefined} desiredIdentityServiceConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredIdentityServiceConfig = null; + + /** + * ClusterUpdate desiredServiceExternalIpsConfig. + * @member {google.container.v1.IServiceExternalIPsConfig|null|undefined} desiredServiceExternalIpsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredServiceExternalIpsConfig = null; + + /** + * ClusterUpdate desiredEnablePrivateEndpoint. + * @member {boolean|null|undefined} desiredEnablePrivateEndpoint + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnablePrivateEndpoint = null; + + /** + * ClusterUpdate desiredDefaultEnablePrivateNodes. + * @member {boolean|null|undefined} desiredDefaultEnablePrivateNodes + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDefaultEnablePrivateNodes = null; + + /** + * ClusterUpdate desiredControlPlaneEndpointsConfig. + * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} desiredControlPlaneEndpointsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredControlPlaneEndpointsConfig = null; + + /** + * ClusterUpdate desiredMasterVersion. + * @member {string} desiredMasterVersion + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMasterVersion = ""; + + /** + * ClusterUpdate desiredGcfsConfig. + * @member {google.container.v1.IGcfsConfig|null|undefined} desiredGcfsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredGcfsConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigNetworkTags. + * @member {google.container.v1.INetworkTags|null|undefined} desiredNodePoolAutoConfigNetworkTags + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigNetworkTags = null; + + /** + * ClusterUpdate desiredGatewayApiConfig. + * @member {google.container.v1.IGatewayAPIConfig|null|undefined} desiredGatewayApiConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredGatewayApiConfig = null; + + /** + * ClusterUpdate etag. + * @member {string} etag + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.etag = ""; + + /** + * ClusterUpdate desiredNodePoolLoggingConfig. + * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} desiredNodePoolLoggingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; + + /** + * ClusterUpdate desiredFleet. + * @member {google.container.v1.IFleet|null|undefined} desiredFleet + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredFleet = null; + + /** + * ClusterUpdate desiredStackType. + * @member {google.container.v1.StackType} desiredStackType + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredStackType = 0; + + /** + * ClusterUpdate additionalPodRangesConfig. + * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.additionalPodRangesConfig = null; + + /** + * ClusterUpdate removedAdditionalPodRangesConfig. + * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} removedAdditionalPodRangesConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.removedAdditionalPodRangesConfig = null; + + /** + * ClusterUpdate enableK8sBetaApis. + * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.enableK8sBetaApis = null; + + /** + * ClusterUpdate desiredSecurityPostureConfig. + * @member {google.container.v1.ISecurityPostureConfig|null|undefined} desiredSecurityPostureConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredSecurityPostureConfig = null; + + /** + * ClusterUpdate desiredNetworkPerformanceConfig. + * @member {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} desiredNetworkPerformanceConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNetworkPerformanceConfig = null; + + /** + * ClusterUpdate desiredEnableFqdnNetworkPolicy. + * @member {boolean|null|undefined} desiredEnableFqdnNetworkPolicy + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableFqdnNetworkPolicy = null; + + /** + * ClusterUpdate desiredAutopilotWorkloadPolicyConfig. + * @member {google.container.v1.IWorkloadPolicyConfig|null|undefined} desiredAutopilotWorkloadPolicyConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAutopilotWorkloadPolicyConfig = null; + + /** + * ClusterUpdate desiredK8sBetaApis. + * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} desiredK8sBetaApis + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredK8sBetaApis = null; + + /** + * ClusterUpdate desiredContainerdConfig. + * @member {google.container.v1.IContainerdConfig|null|undefined} desiredContainerdConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredContainerdConfig = null; + + /** + * ClusterUpdate desiredEnableMultiNetworking. + * @member {boolean|null|undefined} desiredEnableMultiNetworking + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableMultiNetworking = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. + * @member {google.container.v1.IResourceManagerTags|null|undefined} desiredNodePoolAutoConfigResourceManagerTags + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigResourceManagerTags = null; + + /** + * ClusterUpdate desiredInTransitEncryptionConfig. + * @member {google.container.v1.InTransitEncryptionConfig|null|undefined} desiredInTransitEncryptionConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredInTransitEncryptionConfig = null; + + /** + * ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. + * @member {boolean|null|undefined} desiredEnableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableCiliumClusterwideNetworkPolicy = null; + + /** + * ClusterUpdate desiredSecretManagerConfig. + * @member {google.container.v1.ISecretManagerConfig|null|undefined} desiredSecretManagerConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredSecretManagerConfig = null; + + /** + * ClusterUpdate desiredCompliancePostureConfig. + * @member {google.container.v1.ICompliancePostureConfig|null|undefined} desiredCompliancePostureConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredCompliancePostureConfig = null; + + /** + * ClusterUpdate desiredNodeKubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} desiredNodeKubeletConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodeKubeletConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} desiredNodePoolAutoConfigKubeletConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigKubeletConfig = null; + + /** + * ClusterUpdate userManagedKeysConfig. + * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.userManagedKeysConfig = null; + + /** + * ClusterUpdate desiredRbacBindingConfig. + * @member {google.container.v1.IRBACBindingConfig|null|undefined} desiredRbacBindingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredRbacBindingConfig = null; + + /** + * ClusterUpdate desiredEnterpriseConfig. + * @member {google.container.v1.IDesiredEnterpriseConfig|null|undefined} desiredEnterpriseConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnterpriseConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} desiredNodePoolAutoConfigLinuxNodeConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigLinuxNodeConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ClusterUpdate _desiredEnablePrivateEndpoint. + * @member {"desiredEnablePrivateEndpoint"|undefined} _desiredEnablePrivateEndpoint + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnablePrivateEndpoint", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnablePrivateEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredDefaultEnablePrivateNodes. + * @member {"desiredDefaultEnablePrivateNodes"|undefined} _desiredDefaultEnablePrivateNodes + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredDefaultEnablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["desiredDefaultEnablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableFqdnNetworkPolicy. + * @member {"desiredEnableFqdnNetworkPolicy"|undefined} _desiredEnableFqdnNetworkPolicy + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableFqdnNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableFqdnNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableMultiNetworking. + * @member {"desiredEnableMultiNetworking"|undefined} _desiredEnableMultiNetworking + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableMultiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableMultiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredInTransitEncryptionConfig. + * @member {"desiredInTransitEncryptionConfig"|undefined} _desiredInTransitEncryptionConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredInTransitEncryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredInTransitEncryptionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. + * @member {"desiredEnableCiliumClusterwideNetworkPolicy"|undefined} _desiredEnableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableCiliumClusterwideNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableCiliumClusterwideNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredSecretManagerConfig. + * @member {"desiredSecretManagerConfig"|undefined} _desiredSecretManagerConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredSecretManagerConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredSecretManagerConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredCompliancePostureConfig. + * @member {"desiredCompliancePostureConfig"|undefined} _desiredCompliancePostureConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredCompliancePostureConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredCompliancePostureConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredRbacBindingConfig. + * @member {"desiredRbacBindingConfig"|undefined} _desiredRbacBindingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredRbacBindingConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredRbacBindingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClusterUpdate instance using the specified properties. + * @function create + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {google.container.v1.IClusterUpdate=} [properties] Properties to set + * @returns {google.container.v1.ClusterUpdate} ClusterUpdate instance + */ + ClusterUpdate.create = function create(properties) { + return new ClusterUpdate(properties); + }; + + /** + * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {google.container.v1.IClusterUpdate} message ClusterUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredNodeVersion != null && Object.hasOwnProperty.call(message, "desiredNodeVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.desiredNodeVersion); + if (message.desiredMonitoringService != null && Object.hasOwnProperty.call(message, "desiredMonitoringService")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.desiredMonitoringService); + if (message.desiredAddonsConfig != null && Object.hasOwnProperty.call(message, "desiredAddonsConfig")) + $root.google.container.v1.AddonsConfig.encode(message.desiredAddonsConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.desiredNodePoolId != null && Object.hasOwnProperty.call(message, "desiredNodePoolId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.desiredNodePoolId); + if (message.desiredImageType != null && Object.hasOwnProperty.call(message, "desiredImageType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.desiredImageType); + if (message.desiredNodePoolAutoscaling != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoscaling")) + $root.google.container.v1.NodePoolAutoscaling.encode(message.desiredNodePoolAutoscaling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.desiredLocations != null && message.desiredLocations.length) + for (var i = 0; i < message.desiredLocations.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.desiredLocations[i]); + if (message.desiredMasterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "desiredMasterAuthorizedNetworksConfig")) + $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.desiredMasterAuthorizedNetworksConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.desiredClusterAutoscaling != null && Object.hasOwnProperty.call(message, "desiredClusterAutoscaling")) + $root.google.container.v1.ClusterAutoscaling.encode(message.desiredClusterAutoscaling, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.desiredBinaryAuthorization != null && Object.hasOwnProperty.call(message, "desiredBinaryAuthorization")) + $root.google.container.v1.BinaryAuthorization.encode(message.desiredBinaryAuthorization, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.desiredLoggingService != null && Object.hasOwnProperty.call(message, "desiredLoggingService")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.desiredLoggingService); + if (message.desiredResourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "desiredResourceUsageExportConfig")) + $root.google.container.v1.ResourceUsageExportConfig.encode(message.desiredResourceUsageExportConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.desiredVerticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "desiredVerticalPodAutoscaling")) + $root.google.container.v1.VerticalPodAutoscaling.encode(message.desiredVerticalPodAutoscaling, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.desiredPrivateClusterConfig != null && Object.hasOwnProperty.call(message, "desiredPrivateClusterConfig")) + $root.google.container.v1.PrivateClusterConfig.encode(message.desiredPrivateClusterConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.desiredIntraNodeVisibilityConfig != null && Object.hasOwnProperty.call(message, "desiredIntraNodeVisibilityConfig")) + $root.google.container.v1.IntraNodeVisibilityConfig.encode(message.desiredIntraNodeVisibilityConfig, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.desiredDefaultSnatStatus != null && Object.hasOwnProperty.call(message, "desiredDefaultSnatStatus")) + $root.google.container.v1.DefaultSnatStatus.encode(message.desiredDefaultSnatStatus, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.desiredReleaseChannel != null && Object.hasOwnProperty.call(message, "desiredReleaseChannel")) + $root.google.container.v1.ReleaseChannel.encode(message.desiredReleaseChannel, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.desiredL4ilbSubsettingConfig != null && Object.hasOwnProperty.call(message, "desiredL4ilbSubsettingConfig")) + $root.google.container.v1.ILBSubsettingConfig.encode(message.desiredL4ilbSubsettingConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.desiredDatabaseEncryption != null && Object.hasOwnProperty.call(message, "desiredDatabaseEncryption")) + $root.google.container.v1.DatabaseEncryption.encode(message.desiredDatabaseEncryption, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.desiredWorkloadIdentityConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadIdentityConfig")) + $root.google.container.v1.WorkloadIdentityConfig.encode(message.desiredWorkloadIdentityConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.desiredShieldedNodes != null && Object.hasOwnProperty.call(message, "desiredShieldedNodes")) + $root.google.container.v1.ShieldedNodes.encode(message.desiredShieldedNodes, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.desiredCostManagementConfig != null && Object.hasOwnProperty.call(message, "desiredCostManagementConfig")) + $root.google.container.v1.CostManagementConfig.encode(message.desiredCostManagementConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.desiredDatapathProvider != null && Object.hasOwnProperty.call(message, "desiredDatapathProvider")) + writer.uint32(/* id 50, wireType 0 =*/400).int32(message.desiredDatapathProvider); + if (message.desiredPrivateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "desiredPrivateIpv6GoogleAccess")) + writer.uint32(/* id 51, wireType 0 =*/408).int32(message.desiredPrivateIpv6GoogleAccess); + if (message.desiredDnsConfig != null && Object.hasOwnProperty.call(message, "desiredDnsConfig")) + $root.google.container.v1.DNSConfig.encode(message.desiredDnsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.desiredNotificationConfig != null && Object.hasOwnProperty.call(message, "desiredNotificationConfig")) + $root.google.container.v1.NotificationConfig.encode(message.desiredNotificationConfig, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.desiredServiceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "desiredServiceExternalIpsConfig")) + $root.google.container.v1.ServiceExternalIPsConfig.encode(message.desiredServiceExternalIpsConfig, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); + if (message.desiredAuthenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "desiredAuthenticatorGroupsConfig")) + $root.google.container.v1.AuthenticatorGroupsConfig.encode(message.desiredAuthenticatorGroupsConfig, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); + if (message.desiredLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredLoggingConfig")) + $root.google.container.v1.LoggingConfig.encode(message.desiredLoggingConfig, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); + if (message.desiredMonitoringConfig != null && Object.hasOwnProperty.call(message, "desiredMonitoringConfig")) + $root.google.container.v1.MonitoringConfig.encode(message.desiredMonitoringConfig, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); + if (message.desiredIdentityServiceConfig != null && Object.hasOwnProperty.call(message, "desiredIdentityServiceConfig")) + $root.google.container.v1.IdentityServiceConfig.encode(message.desiredIdentityServiceConfig, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); + if (message.desiredMeshCertificates != null && Object.hasOwnProperty.call(message, "desiredMeshCertificates")) + $root.google.container.v1.MeshCertificates.encode(message.desiredMeshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.desiredEnablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "desiredEnablePrivateEndpoint")) + writer.uint32(/* id 71, wireType 0 =*/568).bool(message.desiredEnablePrivateEndpoint); + if (message.desiredDefaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "desiredDefaultEnablePrivateNodes")) + writer.uint32(/* id 72, wireType 0 =*/576).bool(message.desiredDefaultEnablePrivateNodes); + if (message.desiredControlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "desiredControlPlaneEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.desiredControlPlaneEndpointsConfig, writer.uint32(/* id 73, wireType 2 =*/586).fork()).ldelim(); + if (message.desiredMasterVersion != null && Object.hasOwnProperty.call(message, "desiredMasterVersion")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.desiredMasterVersion); + if (message.desiredGcfsConfig != null && Object.hasOwnProperty.call(message, "desiredGcfsConfig")) + $root.google.container.v1.GcfsConfig.encode(message.desiredGcfsConfig, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigNetworkTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigNetworkTags")) + $root.google.container.v1.NetworkTags.encode(message.desiredNodePoolAutoConfigNetworkTags, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); + if (message.desiredGatewayApiConfig != null && Object.hasOwnProperty.call(message, "desiredGatewayApiConfig")) + $root.google.container.v1.GatewayAPIConfig.encode(message.desiredGatewayApiConfig, writer.uint32(/* id 114, wireType 2 =*/914).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); + if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) + $root.google.container.v1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); + if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) + $root.google.container.v1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); + if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) + writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); + if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) + $root.google.container.v1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); + if (message.removedAdditionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "removedAdditionalPodRangesConfig")) + $root.google.container.v1.AdditionalPodRangesConfig.encode(message.removedAdditionalPodRangesConfig, writer.uint32(/* id 121, wireType 2 =*/970).fork()).ldelim(); + if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) + $root.google.container.v1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 122, wireType 2 =*/978).fork()).ldelim(); + if (message.desiredSecurityPostureConfig != null && Object.hasOwnProperty.call(message, "desiredSecurityPostureConfig")) + $root.google.container.v1.SecurityPostureConfig.encode(message.desiredSecurityPostureConfig, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); + if (message.desiredNetworkPerformanceConfig != null && Object.hasOwnProperty.call(message, "desiredNetworkPerformanceConfig")) + $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.desiredNetworkPerformanceConfig, writer.uint32(/* id 125, wireType 2 =*/1002).fork()).ldelim(); + if (message.desiredEnableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableFqdnNetworkPolicy")) + writer.uint32(/* id 126, wireType 0 =*/1008).bool(message.desiredEnableFqdnNetworkPolicy); + if (message.desiredAutopilotWorkloadPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredAutopilotWorkloadPolicyConfig")) + $root.google.container.v1.WorkloadPolicyConfig.encode(message.desiredAutopilotWorkloadPolicyConfig, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); + if (message.desiredK8sBetaApis != null && Object.hasOwnProperty.call(message, "desiredK8sBetaApis")) + $root.google.container.v1.K8sBetaAPIConfig.encode(message.desiredK8sBetaApis, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); + if (message.desiredContainerdConfig != null && Object.hasOwnProperty.call(message, "desiredContainerdConfig")) + $root.google.container.v1.ContainerdConfig.encode(message.desiredContainerdConfig, writer.uint32(/* id 134, wireType 2 =*/1074).fork()).ldelim(); + if (message.desiredEnableMultiNetworking != null && Object.hasOwnProperty.call(message, "desiredEnableMultiNetworking")) + writer.uint32(/* id 135, wireType 0 =*/1080).bool(message.desiredEnableMultiNetworking); + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigResourceManagerTags")) + $root.google.container.v1.ResourceManagerTags.encode(message.desiredNodePoolAutoConfigResourceManagerTags, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); + if (message.desiredInTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "desiredInTransitEncryptionConfig")) + writer.uint32(/* id 137, wireType 0 =*/1096).int32(message.desiredInTransitEncryptionConfig); + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableCiliumClusterwideNetworkPolicy")) + writer.uint32(/* id 138, wireType 0 =*/1104).bool(message.desiredEnableCiliumClusterwideNetworkPolicy); + if (message.desiredSecretManagerConfig != null && Object.hasOwnProperty.call(message, "desiredSecretManagerConfig")) + $root.google.container.v1.SecretManagerConfig.encode(message.desiredSecretManagerConfig, writer.uint32(/* id 139, wireType 2 =*/1114).fork()).ldelim(); + if (message.desiredCompliancePostureConfig != null && Object.hasOwnProperty.call(message, "desiredCompliancePostureConfig")) + $root.google.container.v1.CompliancePostureConfig.encode(message.desiredCompliancePostureConfig, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); + if (message.desiredNodeKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodeKubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodeKubeletConfig, writer.uint32(/* id 141, wireType 2 =*/1130).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigKubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodePoolAutoConfigKubeletConfig, writer.uint32(/* id 142, wireType 2 =*/1138).fork()).ldelim(); + if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) + $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); + if (message.desiredRbacBindingConfig != null && Object.hasOwnProperty.call(message, "desiredRbacBindingConfig")) + $root.google.container.v1.RBACBindingConfig.encode(message.desiredRbacBindingConfig, writer.uint32(/* id 144, wireType 2 =*/1154).fork()).ldelim(); + if (message.desiredEnterpriseConfig != null && Object.hasOwnProperty.call(message, "desiredEnterpriseConfig")) + $root.google.container.v1.DesiredEnterpriseConfig.encode(message.desiredEnterpriseConfig, writer.uint32(/* id 147, wireType 2 =*/1178).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigLinuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.desiredNodePoolAutoConfigLinuxNodeConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {google.container.v1.IClusterUpdate} message ClusterUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ClusterUpdate} ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClusterUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.desiredNodeVersion = reader.string(); + break; + } + case 5: { + message.desiredMonitoringService = reader.string(); + break; + } + case 6: { + message.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.desiredNodePoolId = reader.string(); + break; + } + case 8: { + message.desiredImageType = reader.string(); + break; + } + case 46: { + message.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.decode(reader, reader.uint32()); + break; + } + case 47: { + message.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 67: { + message.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.decode(reader, reader.uint32()); + break; + } + case 48: { + message.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.decode(reader, reader.uint32()); + break; + } + case 49: { + message.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.decode(reader, reader.uint32()); + break; + } + case 53: { + message.desiredDnsConfig = $root.google.container.v1.DNSConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.desiredLocations && message.desiredLocations.length)) + message.desiredLocations = []; + message.desiredLocations.push(reader.string()); + break; + } + case 12: { + message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.decode(reader, reader.uint32()); + break; + } + case 16: { + message.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.decode(reader, reader.uint32()); + break; + } + case 19: { + message.desiredLoggingService = reader.string(); + break; + } + case 21: { + message.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 25: { + message.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 26: { + message.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.decode(reader, reader.uint32()); + break; + } + case 28: { + message.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.decode(reader, reader.uint32()); + break; + } + case 31: { + message.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 39: { + message.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.decode(reader, reader.uint32()); + break; + } + case 50: { + message.desiredDatapathProvider = reader.int32(); + break; + } + case 51: { + message.desiredPrivateIpv6GoogleAccess = reader.int32(); + break; + } + case 55: { + message.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 63: { + message.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); + break; + } + case 64: { + message.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 65: { + message.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } + case 66: { + message.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.decode(reader, reader.uint32()); + break; + } + case 60: { + message.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); + break; + } + case 71: { + message.desiredEnablePrivateEndpoint = reader.bool(); + break; + } + case 72: { + message.desiredDefaultEnablePrivateNodes = reader.bool(); + break; + } + case 73: { + message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.desiredMasterVersion = reader.string(); + break; + } + case 109: { + message.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 110: { + message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 114: { + message.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.decode(reader, reader.uint32()); + break; + } + case 115: { + message.etag = reader.string(); + break; + } + case 116: { + message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 117: { + message.desiredFleet = $root.google.container.v1.Fleet.decode(reader, reader.uint32()); + break; + } + case 119: { + message.desiredStackType = reader.int32(); + break; + } + case 120: { + message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 121: { + message.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 122: { + message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 124: { + message.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.decode(reader, reader.uint32()); + break; + } + case 125: { + message.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 126: { + message.desiredEnableFqdnNetworkPolicy = reader.bool(); + break; + } + case 128: { + message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 131: { + message.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 134: { + message.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 135: { + message.desiredEnableMultiNetworking = reader.bool(); + break; + } + case 136: { + message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 137: { + message.desiredInTransitEncryptionConfig = reader.int32(); + break; + } + case 138: { + message.desiredEnableCiliumClusterwideNetworkPolicy = reader.bool(); + break; + } + case 139: { + message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 140: { + message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); + break; + } + case 141: { + message.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 142: { + message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 143: { + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); + break; + } + case 144: { + message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); + break; + } + case 147: { + message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.decode(reader, reader.uint32()); + break; + } + case 150: { + message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ClusterUpdate} ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterUpdate message. + * @function verify + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) + if (!$util.isString(message.desiredNodeVersion)) + return "desiredNodeVersion: string expected"; + if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) + if (!$util.isString(message.desiredMonitoringService)) + return "desiredMonitoringService: string expected"; + if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) { + var error = $root.google.container.v1.AddonsConfig.verify(message.desiredAddonsConfig); + if (error) + return "desiredAddonsConfig." + error; + } + if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) + if (!$util.isString(message.desiredNodePoolId)) + return "desiredNodePoolId: string expected"; + if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) + if (!$util.isString(message.desiredImageType)) + return "desiredImageType: string expected"; + if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) { + var error = $root.google.container.v1.DatabaseEncryption.verify(message.desiredDatabaseEncryption); + if (error) + return "desiredDatabaseEncryption." + error; + } + if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) { + var error = $root.google.container.v1.WorkloadIdentityConfig.verify(message.desiredWorkloadIdentityConfig); + if (error) + return "desiredWorkloadIdentityConfig." + error; + } + if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) { + var error = $root.google.container.v1.MeshCertificates.verify(message.desiredMeshCertificates); + if (error) + return "desiredMeshCertificates." + error; + } + if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) { + var error = $root.google.container.v1.ShieldedNodes.verify(message.desiredShieldedNodes); + if (error) + return "desiredShieldedNodes." + error; + } + if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) { + var error = $root.google.container.v1.CostManagementConfig.verify(message.desiredCostManagementConfig); + if (error) + return "desiredCostManagementConfig." + error; + } + if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) { + var error = $root.google.container.v1.DNSConfig.verify(message.desiredDnsConfig); + if (error) + return "desiredDnsConfig." + error; + } + if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) { + var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.desiredNodePoolAutoscaling); + if (error) + return "desiredNodePoolAutoscaling." + error; + } + if (message.desiredLocations != null && message.hasOwnProperty("desiredLocations")) { + if (!Array.isArray(message.desiredLocations)) + return "desiredLocations: array expected"; + for (var i = 0; i < message.desiredLocations.length; ++i) + if (!$util.isString(message.desiredLocations[i])) + return "desiredLocations: string[] expected"; + } + if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) { + var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.desiredMasterAuthorizedNetworksConfig); + if (error) + return "desiredMasterAuthorizedNetworksConfig." + error; + } + if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) { + var error = $root.google.container.v1.ClusterAutoscaling.verify(message.desiredClusterAutoscaling); + if (error) + return "desiredClusterAutoscaling." + error; + } + if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) { + var error = $root.google.container.v1.BinaryAuthorization.verify(message.desiredBinaryAuthorization); + if (error) + return "desiredBinaryAuthorization." + error; + } + if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) + if (!$util.isString(message.desiredLoggingService)) + return "desiredLoggingService: string expected"; + if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) { + var error = $root.google.container.v1.ResourceUsageExportConfig.verify(message.desiredResourceUsageExportConfig); + if (error) + return "desiredResourceUsageExportConfig." + error; + } + if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) { + var error = $root.google.container.v1.VerticalPodAutoscaling.verify(message.desiredVerticalPodAutoscaling); + if (error) + return "desiredVerticalPodAutoscaling." + error; + } + if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) { + var error = $root.google.container.v1.PrivateClusterConfig.verify(message.desiredPrivateClusterConfig); + if (error) + return "desiredPrivateClusterConfig." + error; + } + if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) { + var error = $root.google.container.v1.IntraNodeVisibilityConfig.verify(message.desiredIntraNodeVisibilityConfig); + if (error) + return "desiredIntraNodeVisibilityConfig." + error; + } + if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) { + var error = $root.google.container.v1.DefaultSnatStatus.verify(message.desiredDefaultSnatStatus); + if (error) + return "desiredDefaultSnatStatus." + error; + } + if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) { + var error = $root.google.container.v1.ReleaseChannel.verify(message.desiredReleaseChannel); + if (error) + return "desiredReleaseChannel." + error; + } + if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) { + var error = $root.google.container.v1.ILBSubsettingConfig.verify(message.desiredL4ilbSubsettingConfig); + if (error) + return "desiredL4ilbSubsettingConfig." + error; + } + if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) + switch (message.desiredDatapathProvider) { + default: + return "desiredDatapathProvider: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) + switch (message.desiredPrivateIpv6GoogleAccess) { + default: + return "desiredPrivateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) { + var error = $root.google.container.v1.NotificationConfig.verify(message.desiredNotificationConfig); + if (error) + return "desiredNotificationConfig." + error; + } + if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) { + var error = $root.google.container.v1.AuthenticatorGroupsConfig.verify(message.desiredAuthenticatorGroupsConfig); + if (error) + return "desiredAuthenticatorGroupsConfig." + error; + } + if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) { + var error = $root.google.container.v1.LoggingConfig.verify(message.desiredLoggingConfig); + if (error) + return "desiredLoggingConfig." + error; + } + if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) { + var error = $root.google.container.v1.MonitoringConfig.verify(message.desiredMonitoringConfig); + if (error) + return "desiredMonitoringConfig." + error; + } + if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) { + var error = $root.google.container.v1.IdentityServiceConfig.verify(message.desiredIdentityServiceConfig); + if (error) + return "desiredIdentityServiceConfig." + error; + } + if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) { + var error = $root.google.container.v1.ServiceExternalIPsConfig.verify(message.desiredServiceExternalIpsConfig); + if (error) + return "desiredServiceExternalIpsConfig." + error; + } + if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { + properties._desiredEnablePrivateEndpoint = 1; + if (typeof message.desiredEnablePrivateEndpoint !== "boolean") + return "desiredEnablePrivateEndpoint: boolean expected"; + } + if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { + properties._desiredDefaultEnablePrivateNodes = 1; + if (typeof message.desiredDefaultEnablePrivateNodes !== "boolean") + return "desiredDefaultEnablePrivateNodes: boolean expected"; + } + if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.desiredControlPlaneEndpointsConfig); + if (error) + return "desiredControlPlaneEndpointsConfig." + error; + } + if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) + if (!$util.isString(message.desiredMasterVersion)) + return "desiredMasterVersion: string expected"; + if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) { + var error = $root.google.container.v1.GcfsConfig.verify(message.desiredGcfsConfig); + if (error) + return "desiredGcfsConfig." + error; + } + if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) { + var error = $root.google.container.v1.NetworkTags.verify(message.desiredNodePoolAutoConfigNetworkTags); + if (error) + return "desiredNodePoolAutoConfigNetworkTags." + error; + } + if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) { + var error = $root.google.container.v1.GatewayAPIConfig.verify(message.desiredGatewayApiConfig); + if (error) + return "desiredGatewayApiConfig." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) { + var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.desiredNodePoolLoggingConfig); + if (error) + return "desiredNodePoolLoggingConfig." + error; + } + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { + var error = $root.google.container.v1.Fleet.verify(message.desiredFleet); + if (error) + return "desiredFleet." + error; + } + if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) + switch (message.desiredStackType) { + default: + return "desiredStackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { + var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); + if (error) + return "additionalPodRangesConfig." + error; + } + if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) { + var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.removedAdditionalPodRangesConfig); + if (error) + return "removedAdditionalPodRangesConfig." + error; + } + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { + var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); + if (error) + return "enableK8sBetaApis." + error; + } + if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) { + var error = $root.google.container.v1.SecurityPostureConfig.verify(message.desiredSecurityPostureConfig); + if (error) + return "desiredSecurityPostureConfig." + error; + } + if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) { + var error = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.desiredNetworkPerformanceConfig); + if (error) + return "desiredNetworkPerformanceConfig." + error; + } + if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { + properties._desiredEnableFqdnNetworkPolicy = 1; + if (typeof message.desiredEnableFqdnNetworkPolicy !== "boolean") + return "desiredEnableFqdnNetworkPolicy: boolean expected"; + } + if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) { + var error = $root.google.container.v1.WorkloadPolicyConfig.verify(message.desiredAutopilotWorkloadPolicyConfig); + if (error) + return "desiredAutopilotWorkloadPolicyConfig." + error; + } + if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) { + var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.desiredK8sBetaApis); + if (error) + return "desiredK8sBetaApis." + error; + } + if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) { + var error = $root.google.container.v1.ContainerdConfig.verify(message.desiredContainerdConfig); + if (error) + return "desiredContainerdConfig." + error; + } + if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { + properties._desiredEnableMultiNetworking = 1; + if (typeof message.desiredEnableMultiNetworking !== "boolean") + return "desiredEnableMultiNetworking: boolean expected"; + } + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) { + var error = $root.google.container.v1.ResourceManagerTags.verify(message.desiredNodePoolAutoConfigResourceManagerTags); + if (error) + return "desiredNodePoolAutoConfigResourceManagerTags." + error; + } + if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { + properties._desiredInTransitEncryptionConfig = 1; + switch (message.desiredInTransitEncryptionConfig) { + default: + return "desiredInTransitEncryptionConfig: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { + properties._desiredEnableCiliumClusterwideNetworkPolicy = 1; + if (typeof message.desiredEnableCiliumClusterwideNetworkPolicy !== "boolean") + return "desiredEnableCiliumClusterwideNetworkPolicy: boolean expected"; + } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + properties._desiredSecretManagerConfig = 1; + { + var error = $root.google.container.v1.SecretManagerConfig.verify(message.desiredSecretManagerConfig); + if (error) + return "desiredSecretManagerConfig." + error; + } + } + if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { + properties._desiredCompliancePostureConfig = 1; + { + var error = $root.google.container.v1.CompliancePostureConfig.verify(message.desiredCompliancePostureConfig); + if (error) + return "desiredCompliancePostureConfig." + error; + } + } + if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.desiredNodeKubeletConfig); + if (error) + return "desiredNodeKubeletConfig." + error; + } + if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.desiredNodePoolAutoConfigKubeletConfig); + if (error) + return "desiredNodePoolAutoConfigKubeletConfig." + error; + } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); + if (error) + return "userManagedKeysConfig." + error; + } + if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { + properties._desiredRbacBindingConfig = 1; + { + var error = $root.google.container.v1.RBACBindingConfig.verify(message.desiredRbacBindingConfig); + if (error) + return "desiredRbacBindingConfig." + error; + } + } + if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) { + var error = $root.google.container.v1.DesiredEnterpriseConfig.verify(message.desiredEnterpriseConfig); + if (error) + return "desiredEnterpriseConfig." + error; + } + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.desiredNodePoolAutoConfigLinuxNodeConfig); + if (error) + return "desiredNodePoolAutoConfigLinuxNodeConfig." + error; + } + return null; + }; + + /** + * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ClusterUpdate} ClusterUpdate + */ + ClusterUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ClusterUpdate) + return object; + var message = new $root.google.container.v1.ClusterUpdate(); + if (object.desiredNodeVersion != null) + message.desiredNodeVersion = String(object.desiredNodeVersion); + if (object.desiredMonitoringService != null) + message.desiredMonitoringService = String(object.desiredMonitoringService); + if (object.desiredAddonsConfig != null) { + if (typeof object.desiredAddonsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredAddonsConfig: object expected"); + message.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.desiredAddonsConfig); + } + if (object.desiredNodePoolId != null) + message.desiredNodePoolId = String(object.desiredNodePoolId); + if (object.desiredImageType != null) + message.desiredImageType = String(object.desiredImageType); + if (object.desiredDatabaseEncryption != null) { + if (typeof object.desiredDatabaseEncryption !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredDatabaseEncryption: object expected"); + message.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.fromObject(object.desiredDatabaseEncryption); + } + if (object.desiredWorkloadIdentityConfig != null) { + if (typeof object.desiredWorkloadIdentityConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredWorkloadIdentityConfig: object expected"); + message.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.fromObject(object.desiredWorkloadIdentityConfig); + } + if (object.desiredMeshCertificates != null) { + if (typeof object.desiredMeshCertificates !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredMeshCertificates: object expected"); + message.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.fromObject(object.desiredMeshCertificates); + } + if (object.desiredShieldedNodes != null) { + if (typeof object.desiredShieldedNodes !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredShieldedNodes: object expected"); + message.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.fromObject(object.desiredShieldedNodes); + } + if (object.desiredCostManagementConfig != null) { + if (typeof object.desiredCostManagementConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredCostManagementConfig: object expected"); + message.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.fromObject(object.desiredCostManagementConfig); + } + if (object.desiredDnsConfig != null) { + if (typeof object.desiredDnsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredDnsConfig: object expected"); + message.desiredDnsConfig = $root.google.container.v1.DNSConfig.fromObject(object.desiredDnsConfig); + } + if (object.desiredNodePoolAutoscaling != null) { + if (typeof object.desiredNodePoolAutoscaling !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoscaling: object expected"); + message.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.desiredNodePoolAutoscaling); + } + if (object.desiredLocations) { + if (!Array.isArray(object.desiredLocations)) + throw TypeError(".google.container.v1.ClusterUpdate.desiredLocations: array expected"); + message.desiredLocations = []; + for (var i = 0; i < object.desiredLocations.length; ++i) + message.desiredLocations[i] = String(object.desiredLocations[i]); + } + if (object.desiredMasterAuthorizedNetworksConfig != null) { + if (typeof object.desiredMasterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredMasterAuthorizedNetworksConfig: object expected"); + message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.desiredMasterAuthorizedNetworksConfig); + } + if (object.desiredClusterAutoscaling != null) { + if (typeof object.desiredClusterAutoscaling !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredClusterAutoscaling: object expected"); + message.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.fromObject(object.desiredClusterAutoscaling); + } + if (object.desiredBinaryAuthorization != null) { + if (typeof object.desiredBinaryAuthorization !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredBinaryAuthorization: object expected"); + message.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.fromObject(object.desiredBinaryAuthorization); + } + if (object.desiredLoggingService != null) + message.desiredLoggingService = String(object.desiredLoggingService); + if (object.desiredResourceUsageExportConfig != null) { + if (typeof object.desiredResourceUsageExportConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredResourceUsageExportConfig: object expected"); + message.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.fromObject(object.desiredResourceUsageExportConfig); + } + if (object.desiredVerticalPodAutoscaling != null) { + if (typeof object.desiredVerticalPodAutoscaling !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredVerticalPodAutoscaling: object expected"); + message.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.fromObject(object.desiredVerticalPodAutoscaling); + } + if (object.desiredPrivateClusterConfig != null) { + if (typeof object.desiredPrivateClusterConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredPrivateClusterConfig: object expected"); + message.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.fromObject(object.desiredPrivateClusterConfig); + } + if (object.desiredIntraNodeVisibilityConfig != null) { + if (typeof object.desiredIntraNodeVisibilityConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredIntraNodeVisibilityConfig: object expected"); + message.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.fromObject(object.desiredIntraNodeVisibilityConfig); + } + if (object.desiredDefaultSnatStatus != null) { + if (typeof object.desiredDefaultSnatStatus !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredDefaultSnatStatus: object expected"); + message.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.fromObject(object.desiredDefaultSnatStatus); + } + if (object.desiredReleaseChannel != null) { + if (typeof object.desiredReleaseChannel !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredReleaseChannel: object expected"); + message.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.desiredReleaseChannel); + } + if (object.desiredL4ilbSubsettingConfig != null) { + if (typeof object.desiredL4ilbSubsettingConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredL4ilbSubsettingConfig: object expected"); + message.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.fromObject(object.desiredL4ilbSubsettingConfig); + } + switch (object.desiredDatapathProvider) { + default: + if (typeof object.desiredDatapathProvider === "number") { + message.desiredDatapathProvider = object.desiredDatapathProvider; + break; + } + break; + case "DATAPATH_PROVIDER_UNSPECIFIED": + case 0: + message.desiredDatapathProvider = 0; + break; + case "LEGACY_DATAPATH": + case 1: + message.desiredDatapathProvider = 1; + break; + case "ADVANCED_DATAPATH": + case 2: + message.desiredDatapathProvider = 2; + break; + } + switch (object.desiredPrivateIpv6GoogleAccess) { + default: + if (typeof object.desiredPrivateIpv6GoogleAccess === "number") { + message.desiredPrivateIpv6GoogleAccess = object.desiredPrivateIpv6GoogleAccess; + break; + } + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.desiredPrivateIpv6GoogleAccess = 0; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": + case 1: + message.desiredPrivateIpv6GoogleAccess = 1; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": + case 2: + message.desiredPrivateIpv6GoogleAccess = 2; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": + case 3: + message.desiredPrivateIpv6GoogleAccess = 3; + break; + } + if (object.desiredNotificationConfig != null) { + if (typeof object.desiredNotificationConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNotificationConfig: object expected"); + message.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.fromObject(object.desiredNotificationConfig); + } + if (object.desiredAuthenticatorGroupsConfig != null) { + if (typeof object.desiredAuthenticatorGroupsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredAuthenticatorGroupsConfig: object expected"); + message.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.fromObject(object.desiredAuthenticatorGroupsConfig); + } + if (object.desiredLoggingConfig != null) { + if (typeof object.desiredLoggingConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredLoggingConfig: object expected"); + message.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.fromObject(object.desiredLoggingConfig); + } + if (object.desiredMonitoringConfig != null) { + if (typeof object.desiredMonitoringConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredMonitoringConfig: object expected"); + message.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.fromObject(object.desiredMonitoringConfig); + } + if (object.desiredIdentityServiceConfig != null) { + if (typeof object.desiredIdentityServiceConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredIdentityServiceConfig: object expected"); + message.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.fromObject(object.desiredIdentityServiceConfig); + } + if (object.desiredServiceExternalIpsConfig != null) { + if (typeof object.desiredServiceExternalIpsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredServiceExternalIpsConfig: object expected"); + message.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.fromObject(object.desiredServiceExternalIpsConfig); + } + if (object.desiredEnablePrivateEndpoint != null) + message.desiredEnablePrivateEndpoint = Boolean(object.desiredEnablePrivateEndpoint); + if (object.desiredDefaultEnablePrivateNodes != null) + message.desiredDefaultEnablePrivateNodes = Boolean(object.desiredDefaultEnablePrivateNodes); + if (object.desiredControlPlaneEndpointsConfig != null) { + if (typeof object.desiredControlPlaneEndpointsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredControlPlaneEndpointsConfig: object expected"); + message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.desiredControlPlaneEndpointsConfig); + } + if (object.desiredMasterVersion != null) + message.desiredMasterVersion = String(object.desiredMasterVersion); + if (object.desiredGcfsConfig != null) { + if (typeof object.desiredGcfsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredGcfsConfig: object expected"); + message.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.desiredGcfsConfig); + } + if (object.desiredNodePoolAutoConfigNetworkTags != null) { + if (typeof object.desiredNodePoolAutoConfigNetworkTags !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigNetworkTags: object expected"); + message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.fromObject(object.desiredNodePoolAutoConfigNetworkTags); + } + if (object.desiredGatewayApiConfig != null) { + if (typeof object.desiredGatewayApiConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredGatewayApiConfig: object expected"); + message.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.fromObject(object.desiredGatewayApiConfig); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.desiredNodePoolLoggingConfig != null) { + if (typeof object.desiredNodePoolLoggingConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); + message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); + } + if (object.desiredFleet != null) { + if (typeof object.desiredFleet !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredFleet: object expected"); + message.desiredFleet = $root.google.container.v1.Fleet.fromObject(object.desiredFleet); + } + switch (object.desiredStackType) { + default: + if (typeof object.desiredStackType === "number") { + message.desiredStackType = object.desiredStackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.desiredStackType = 0; + break; + case "IPV4": + case 1: + message.desiredStackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.desiredStackType = 2; + break; + } + if (object.additionalPodRangesConfig != null) { + if (typeof object.additionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.additionalPodRangesConfig: object expected"); + message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); + } + if (object.removedAdditionalPodRangesConfig != null) { + if (typeof object.removedAdditionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.removedAdditionalPodRangesConfig: object expected"); + message.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.removedAdditionalPodRangesConfig); + } + if (object.enableK8sBetaApis != null) { + if (typeof object.enableK8sBetaApis !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.enableK8sBetaApis: object expected"); + message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); + } + if (object.desiredSecurityPostureConfig != null) { + if (typeof object.desiredSecurityPostureConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredSecurityPostureConfig: object expected"); + message.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.fromObject(object.desiredSecurityPostureConfig); + } + if (object.desiredNetworkPerformanceConfig != null) { + if (typeof object.desiredNetworkPerformanceConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNetworkPerformanceConfig: object expected"); + message.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.desiredNetworkPerformanceConfig); + } + if (object.desiredEnableFqdnNetworkPolicy != null) + message.desiredEnableFqdnNetworkPolicy = Boolean(object.desiredEnableFqdnNetworkPolicy); + if (object.desiredAutopilotWorkloadPolicyConfig != null) { + if (typeof object.desiredAutopilotWorkloadPolicyConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredAutopilotWorkloadPolicyConfig: object expected"); + message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.fromObject(object.desiredAutopilotWorkloadPolicyConfig); + } + if (object.desiredK8sBetaApis != null) { + if (typeof object.desiredK8sBetaApis !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredK8sBetaApis: object expected"); + message.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.desiredK8sBetaApis); + } + if (object.desiredContainerdConfig != null) { + if (typeof object.desiredContainerdConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredContainerdConfig: object expected"); + message.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.desiredContainerdConfig); + } + if (object.desiredEnableMultiNetworking != null) + message.desiredEnableMultiNetworking = Boolean(object.desiredEnableMultiNetworking); + if (object.desiredNodePoolAutoConfigResourceManagerTags != null) { + if (typeof object.desiredNodePoolAutoConfigResourceManagerTags !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigResourceManagerTags: object expected"); + message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.desiredNodePoolAutoConfigResourceManagerTags); + } + switch (object.desiredInTransitEncryptionConfig) { + default: + if (typeof object.desiredInTransitEncryptionConfig === "number") { + message.desiredInTransitEncryptionConfig = object.desiredInTransitEncryptionConfig; + break; + } + break; + case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": + case 0: + message.desiredInTransitEncryptionConfig = 0; + break; + case "IN_TRANSIT_ENCRYPTION_DISABLED": + case 1: + message.desiredInTransitEncryptionConfig = 1; + break; + case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": + case 2: + message.desiredInTransitEncryptionConfig = 2; + break; + } + if (object.desiredEnableCiliumClusterwideNetworkPolicy != null) + message.desiredEnableCiliumClusterwideNetworkPolicy = Boolean(object.desiredEnableCiliumClusterwideNetworkPolicy); + if (object.desiredSecretManagerConfig != null) { + if (typeof object.desiredSecretManagerConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredSecretManagerConfig: object expected"); + message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.desiredSecretManagerConfig); + } + if (object.desiredCompliancePostureConfig != null) { + if (typeof object.desiredCompliancePostureConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredCompliancePostureConfig: object expected"); + message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.desiredCompliancePostureConfig); + } + if (object.desiredNodeKubeletConfig != null) { + if (typeof object.desiredNodeKubeletConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodeKubeletConfig: object expected"); + message.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.desiredNodeKubeletConfig); + } + if (object.desiredNodePoolAutoConfigKubeletConfig != null) { + if (typeof object.desiredNodePoolAutoConfigKubeletConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigKubeletConfig: object expected"); + message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.desiredNodePoolAutoConfigKubeletConfig); + } + if (object.userManagedKeysConfig != null) { + if (typeof object.userManagedKeysConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.userManagedKeysConfig: object expected"); + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); + } + if (object.desiredRbacBindingConfig != null) { + if (typeof object.desiredRbacBindingConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredRbacBindingConfig: object expected"); + message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.desiredRbacBindingConfig); + } + if (object.desiredEnterpriseConfig != null) { + if (typeof object.desiredEnterpriseConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredEnterpriseConfig: object expected"); + message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.fromObject(object.desiredEnterpriseConfig); + } + if (object.desiredNodePoolAutoConfigLinuxNodeConfig != null) { + if (typeof object.desiredNodePoolAutoConfigLinuxNodeConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigLinuxNodeConfig: object expected"); + message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.desiredNodePoolAutoConfigLinuxNodeConfig); + } + return message; + }; + + /** + * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {google.container.v1.ClusterUpdate} message ClusterUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.desiredLocations = []; + if (options.defaults) { + object.desiredNodeVersion = ""; + object.desiredMonitoringService = ""; + object.desiredAddonsConfig = null; + object.desiredNodePoolId = ""; + object.desiredImageType = ""; + object.desiredNodePoolAutoscaling = null; + object.desiredMasterAuthorizedNetworksConfig = null; + object.desiredClusterAutoscaling = null; + object.desiredBinaryAuthorization = null; + object.desiredLoggingService = ""; + object.desiredResourceUsageExportConfig = null; + object.desiredVerticalPodAutoscaling = null; + object.desiredPrivateClusterConfig = null; + object.desiredIntraNodeVisibilityConfig = null; + object.desiredDefaultSnatStatus = null; + object.desiredReleaseChannel = null; + object.desiredL4ilbSubsettingConfig = null; + object.desiredDatabaseEncryption = null; + object.desiredWorkloadIdentityConfig = null; + object.desiredShieldedNodes = null; + object.desiredCostManagementConfig = null; + object.desiredDatapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; + object.desiredPrivateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; + object.desiredDnsConfig = null; + object.desiredNotificationConfig = null; + object.desiredServiceExternalIpsConfig = null; + object.desiredAuthenticatorGroupsConfig = null; + object.desiredLoggingConfig = null; + object.desiredMonitoringConfig = null; + object.desiredIdentityServiceConfig = null; + object.desiredMeshCertificates = null; + object.desiredControlPlaneEndpointsConfig = null; + object.desiredMasterVersion = ""; + object.desiredGcfsConfig = null; + object.desiredNodePoolAutoConfigNetworkTags = null; + object.desiredGatewayApiConfig = null; + object.etag = ""; + object.desiredNodePoolLoggingConfig = null; + object.desiredFleet = null; + object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; + object.additionalPodRangesConfig = null; + object.removedAdditionalPodRangesConfig = null; + object.enableK8sBetaApis = null; + object.desiredSecurityPostureConfig = null; + object.desiredNetworkPerformanceConfig = null; + object.desiredAutopilotWorkloadPolicyConfig = null; + object.desiredK8sBetaApis = null; + object.desiredContainerdConfig = null; + object.desiredNodePoolAutoConfigResourceManagerTags = null; + object.desiredNodeKubeletConfig = null; + object.desiredNodePoolAutoConfigKubeletConfig = null; + object.userManagedKeysConfig = null; + object.desiredEnterpriseConfig = null; + object.desiredNodePoolAutoConfigLinuxNodeConfig = null; + } + if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) + object.desiredNodeVersion = message.desiredNodeVersion; + if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) + object.desiredMonitoringService = message.desiredMonitoringService; + if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) + object.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.desiredAddonsConfig, options); + if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) + object.desiredNodePoolId = message.desiredNodePoolId; + if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) + object.desiredImageType = message.desiredImageType; + if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) + object.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.desiredNodePoolAutoscaling, options); + if (message.desiredLocations && message.desiredLocations.length) { + object.desiredLocations = []; + for (var j = 0; j < message.desiredLocations.length; ++j) + object.desiredLocations[j] = message.desiredLocations[j]; + } + if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) + object.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.desiredMasterAuthorizedNetworksConfig, options); + if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) + object.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.toObject(message.desiredClusterAutoscaling, options); + if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) + object.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.toObject(message.desiredBinaryAuthorization, options); + if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) + object.desiredLoggingService = message.desiredLoggingService; + if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) + object.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.toObject(message.desiredResourceUsageExportConfig, options); + if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) + object.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.toObject(message.desiredVerticalPodAutoscaling, options); + if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) + object.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.toObject(message.desiredPrivateClusterConfig, options); + if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) + object.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.toObject(message.desiredIntraNodeVisibilityConfig, options); + if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) + object.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.toObject(message.desiredDefaultSnatStatus, options); + if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) + object.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.desiredReleaseChannel, options); + if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) + object.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.toObject(message.desiredL4ilbSubsettingConfig, options); + if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) + object.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.toObject(message.desiredDatabaseEncryption, options); + if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) + object.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.toObject(message.desiredWorkloadIdentityConfig, options); + if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) + object.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.toObject(message.desiredShieldedNodes, options); + if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) + object.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.toObject(message.desiredCostManagementConfig, options); + if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) + object.desiredDatapathProvider = options.enums === String ? $root.google.container.v1.DatapathProvider[message.desiredDatapathProvider] === undefined ? message.desiredDatapathProvider : $root.google.container.v1.DatapathProvider[message.desiredDatapathProvider] : message.desiredDatapathProvider; + if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) + object.desiredPrivateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] === undefined ? message.desiredPrivateIpv6GoogleAccess : $root.google.container.v1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] : message.desiredPrivateIpv6GoogleAccess; + if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) + object.desiredDnsConfig = $root.google.container.v1.DNSConfig.toObject(message.desiredDnsConfig, options); + if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) + object.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.toObject(message.desiredNotificationConfig, options); + if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) + object.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.toObject(message.desiredServiceExternalIpsConfig, options); + if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) + object.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.toObject(message.desiredAuthenticatorGroupsConfig, options); + if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) + object.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.toObject(message.desiredLoggingConfig, options); + if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) + object.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.toObject(message.desiredMonitoringConfig, options); + if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) + object.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.toObject(message.desiredIdentityServiceConfig, options); + if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) + object.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.toObject(message.desiredMeshCertificates, options); + if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { + object.desiredEnablePrivateEndpoint = message.desiredEnablePrivateEndpoint; + if (options.oneofs) + object._desiredEnablePrivateEndpoint = "desiredEnablePrivateEndpoint"; + } + if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { + object.desiredDefaultEnablePrivateNodes = message.desiredDefaultEnablePrivateNodes; + if (options.oneofs) + object._desiredDefaultEnablePrivateNodes = "desiredDefaultEnablePrivateNodes"; + } + if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) + object.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.desiredControlPlaneEndpointsConfig, options); + if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) + object.desiredMasterVersion = message.desiredMasterVersion; + if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) + object.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.desiredGcfsConfig, options); + if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) + object.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.toObject(message.desiredNodePoolAutoConfigNetworkTags, options); + if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) + object.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.toObject(message.desiredGatewayApiConfig, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) + object.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) + object.desiredFleet = $root.google.container.v1.Fleet.toObject(message.desiredFleet, options); + if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) + object.desiredStackType = options.enums === String ? $root.google.container.v1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1.StackType[message.desiredStackType] : message.desiredStackType; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) + object.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); + if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) + object.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.removedAdditionalPodRangesConfig, options); + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) + object.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); + if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) + object.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.toObject(message.desiredSecurityPostureConfig, options); + if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) + object.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.desiredNetworkPerformanceConfig, options); + if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { + object.desiredEnableFqdnNetworkPolicy = message.desiredEnableFqdnNetworkPolicy; + if (options.oneofs) + object._desiredEnableFqdnNetworkPolicy = "desiredEnableFqdnNetworkPolicy"; + } + if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) + object.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.toObject(message.desiredAutopilotWorkloadPolicyConfig, options); + if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) + object.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.desiredK8sBetaApis, options); + if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) + object.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.desiredContainerdConfig, options); + if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { + object.desiredEnableMultiNetworking = message.desiredEnableMultiNetworking; + if (options.oneofs) + object._desiredEnableMultiNetworking = "desiredEnableMultiNetworking"; + } + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) + object.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.desiredNodePoolAutoConfigResourceManagerTags, options); + if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { + object.desiredInTransitEncryptionConfig = options.enums === String ? $root.google.container.v1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] === undefined ? message.desiredInTransitEncryptionConfig : $root.google.container.v1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] : message.desiredInTransitEncryptionConfig; + if (options.oneofs) + object._desiredInTransitEncryptionConfig = "desiredInTransitEncryptionConfig"; + } + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { + object.desiredEnableCiliumClusterwideNetworkPolicy = message.desiredEnableCiliumClusterwideNetworkPolicy; + if (options.oneofs) + object._desiredEnableCiliumClusterwideNetworkPolicy = "desiredEnableCiliumClusterwideNetworkPolicy"; + } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + object.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.desiredSecretManagerConfig, options); + if (options.oneofs) + object._desiredSecretManagerConfig = "desiredSecretManagerConfig"; + } + if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { + object.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.desiredCompliancePostureConfig, options); + if (options.oneofs) + object._desiredCompliancePostureConfig = "desiredCompliancePostureConfig"; + } + if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) + object.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodeKubeletConfig, options); + if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) + object.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodePoolAutoConfigKubeletConfig, options); + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) + object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); + if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { + object.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.desiredRbacBindingConfig, options); + if (options.oneofs) + object._desiredRbacBindingConfig = "desiredRbacBindingConfig"; + } + if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) + object.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.toObject(message.desiredEnterpriseConfig, options); + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) + object.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.desiredNodePoolAutoConfigLinuxNodeConfig, options); + return object; + }; + + /** + * Converts this ClusterUpdate to JSON. + * @function toJSON + * @memberof google.container.v1.ClusterUpdate + * @instance + * @returns {Object.} JSON object + */ + ClusterUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterUpdate + * @function getTypeUrl + * @memberof google.container.v1.ClusterUpdate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ClusterUpdate"; + }; + + return ClusterUpdate; + })(); + + v1.AdditionalPodRangesConfig = (function() { + + /** + * Properties of an AdditionalPodRangesConfig. + * @memberof google.container.v1 + * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames + * @property {Array.|null} [podRangeInfo] AdditionalPodRangesConfig podRangeInfo + */ + + /** + * Constructs a new AdditionalPodRangesConfig. + * @memberof google.container.v1 + * @classdesc Represents an AdditionalPodRangesConfig. + * @implements IAdditionalPodRangesConfig + * @constructor + * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set + */ + function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; + this.podRangeInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + + /** + * AdditionalPodRangesConfig podRangeInfo. + * @member {Array.} podRangeInfo + * @memberof google.container.v1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeInfo = $util.emptyArray; + + /** + * Creates a new AdditionalPodRangesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set + * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig instance + */ + AdditionalPodRangesConfig.create = function create(properties) { + return new AdditionalPodRangesConfig(properties); + }; + + /** + * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodRangesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); + if (message.podRangeInfo != null && message.podRangeInfo.length) + for (var i = 0; i < message.podRangeInfo.length; ++i) + $root.google.container.v1.RangeInfo.encode(message.podRangeInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodRangesConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalPodRangesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } + case 2: { + if (!(message.podRangeInfo && message.podRangeInfo.length)) + message.podRangeInfo = []; + message.podRangeInfo.push($root.google.container.v1.RangeInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodRangesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalPodRangesConfig message. + * @function verify + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalPodRangesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } + if (message.podRangeInfo != null && message.hasOwnProperty("podRangeInfo")) { + if (!Array.isArray(message.podRangeInfo)) + return "podRangeInfo: array expected"; + for (var i = 0; i < message.podRangeInfo.length; ++i) { + var error = $root.google.container.v1.RangeInfo.verify(message.podRangeInfo[i]); + if (error) + return "podRangeInfo." + error; + } + } + return null; + }; + + /** + * Creates an AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + */ + AdditionalPodRangesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdditionalPodRangesConfig) + return object; + var message = new $root.google.container.v1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + if (object.podRangeInfo) { + if (!Array.isArray(object.podRangeInfo)) + throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeInfo: array expected"); + message.podRangeInfo = []; + for (var i = 0; i < object.podRangeInfo.length; ++i) { + if (typeof object.podRangeInfo[i] !== "object") + throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeInfo: object expected"); + message.podRangeInfo[i] = $root.google.container.v1.RangeInfo.fromObject(object.podRangeInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1.AdditionalPodRangesConfig} message AdditionalPodRangesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.podRangeNames = []; + object.podRangeInfo = []; + } + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + if (message.podRangeInfo && message.podRangeInfo.length) { + object.podRangeInfo = []; + for (var j = 0; j < message.podRangeInfo.length; ++j) + object.podRangeInfo[j] = $root.google.container.v1.RangeInfo.toObject(message.podRangeInfo[j], options); + } + return object; + }; + + /** + * Converts this AdditionalPodRangesConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AdditionalPodRangesConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalPodRangesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalPodRangesConfig + * @function getTypeUrl + * @memberof google.container.v1.AdditionalPodRangesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalPodRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdditionalPodRangesConfig"; + }; + + return AdditionalPodRangesConfig; + })(); + + v1.RangeInfo = (function() { + + /** + * Properties of a RangeInfo. + * @memberof google.container.v1 + * @interface IRangeInfo + * @property {string|null} [rangeName] RangeInfo rangeName + * @property {number|null} [utilization] RangeInfo utilization + */ + + /** + * Constructs a new RangeInfo. + * @memberof google.container.v1 + * @classdesc Represents a RangeInfo. + * @implements IRangeInfo + * @constructor + * @param {google.container.v1.IRangeInfo=} [properties] Properties to set + */ + function RangeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RangeInfo rangeName. + * @member {string} rangeName + * @memberof google.container.v1.RangeInfo + * @instance + */ + RangeInfo.prototype.rangeName = ""; + + /** + * RangeInfo utilization. + * @member {number} utilization + * @memberof google.container.v1.RangeInfo + * @instance + */ + RangeInfo.prototype.utilization = 0; + + /** + * Creates a new RangeInfo instance using the specified properties. + * @function create + * @memberof google.container.v1.RangeInfo + * @static + * @param {google.container.v1.IRangeInfo=} [properties] Properties to set + * @returns {google.container.v1.RangeInfo} RangeInfo instance + */ + RangeInfo.create = function create(properties) { + return new RangeInfo(properties); + }; + + /** + * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RangeInfo + * @static + * @param {google.container.v1.IRangeInfo} message RangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); + if (message.utilization != null && Object.hasOwnProperty.call(message, "utilization")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.utilization); + return writer; + }; + + /** + * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RangeInfo + * @static + * @param {google.container.v1.IRangeInfo} message RangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RangeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RangeInfo} RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RangeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeName = reader.string(); + break; + } + case 2: { + message.utilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RangeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RangeInfo} RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RangeInfo message. + * @function verify + * @memberof google.container.v1.RangeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RangeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + if (!$util.isString(message.rangeName)) + return "rangeName: string expected"; + if (message.utilization != null && message.hasOwnProperty("utilization")) + if (typeof message.utilization !== "number") + return "utilization: number expected"; + return null; + }; + + /** + * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RangeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RangeInfo} RangeInfo + */ + RangeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RangeInfo) + return object; + var message = new $root.google.container.v1.RangeInfo(); + if (object.rangeName != null) + message.rangeName = String(object.rangeName); + if (object.utilization != null) + message.utilization = Number(object.utilization); + return message; + }; + + /** + * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RangeInfo + * @static + * @param {google.container.v1.RangeInfo} message RangeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RangeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rangeName = ""; + object.utilization = 0; + } + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + object.rangeName = message.rangeName; + if (message.utilization != null && message.hasOwnProperty("utilization")) + object.utilization = options.json && !isFinite(message.utilization) ? String(message.utilization) : message.utilization; + return object; + }; + + /** + * Converts this RangeInfo to JSON. + * @function toJSON + * @memberof google.container.v1.RangeInfo + * @instance + * @returns {Object.} JSON object + */ + RangeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RangeInfo + * @function getTypeUrl + * @memberof google.container.v1.RangeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RangeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RangeInfo"; + }; + + return RangeInfo; + })(); + + v1.DesiredEnterpriseConfig = (function() { + + /** + * Properties of a DesiredEnterpriseConfig. + * @memberof google.container.v1 + * @interface IDesiredEnterpriseConfig + * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] DesiredEnterpriseConfig desiredTier + */ + + /** + * Constructs a new DesiredEnterpriseConfig. + * @memberof google.container.v1 + * @classdesc Represents a DesiredEnterpriseConfig. + * @implements IDesiredEnterpriseConfig + * @constructor + * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set + */ + function DesiredEnterpriseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DesiredEnterpriseConfig desiredTier. + * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier + * @memberof google.container.v1.DesiredEnterpriseConfig + * @instance + */ + DesiredEnterpriseConfig.prototype.desiredTier = 0; + + /** + * Creates a new DesiredEnterpriseConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig instance + */ + DesiredEnterpriseConfig.create = function create(properties) { + return new DesiredEnterpriseConfig(properties); + }; + + /** + * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredEnterpriseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredTier); + return writer; + }; + + /** + * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredEnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredEnterpriseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DesiredEnterpriseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.desiredTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredEnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DesiredEnterpriseConfig message. + * @function verify + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DesiredEnterpriseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + switch (message.desiredTier) { + default: + return "desiredTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + */ + DesiredEnterpriseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DesiredEnterpriseConfig) + return object; + var message = new $root.google.container.v1.DesiredEnterpriseConfig(); + switch (object.desiredTier) { + default: + if (typeof object.desiredTier === "number") { + message.desiredTier = object.desiredTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.desiredTier = 0; + break; + case "STANDARD": + case 1: + message.desiredTier = 1; + break; + case "ENTERPRISE": + case 2: + message.desiredTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.DesiredEnterpriseConfig} message DesiredEnterpriseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DesiredEnterpriseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; + return object; + }; + + /** + * Converts this DesiredEnterpriseConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DesiredEnterpriseConfig + * @instance + * @returns {Object.} JSON object + */ + DesiredEnterpriseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DesiredEnterpriseConfig + * @function getTypeUrl + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DesiredEnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DesiredEnterpriseConfig"; + }; + + return DesiredEnterpriseConfig; + })(); + + v1.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.container.v1 + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {string|null} [zone] Operation zone + * @property {google.container.v1.Operation.Type|null} [operationType] Operation operationType + * @property {google.container.v1.Operation.Status|null} [status] Operation status + * @property {string|null} [detail] Operation detail + * @property {string|null} [statusMessage] Operation statusMessage + * @property {string|null} [selfLink] Operation selfLink + * @property {string|null} [targetLink] Operation targetLink + * @property {string|null} [location] Operation location + * @property {string|null} [startTime] Operation startTime + * @property {string|null} [endTime] Operation endTime + * @property {google.container.v1.IOperationProgress|null} [progress] Operation progress + * @property {Array.|null} [clusterConditions] Operation clusterConditions + * @property {Array.|null} [nodepoolConditions] Operation nodepoolConditions + * @property {google.rpc.IStatus|null} [error] Operation error + */ + + /** + * Constructs a new Operation. + * @memberof google.container.v1 + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.container.v1.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + this.clusterConditions = []; + this.nodepoolConditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation zone. + * @member {string} zone + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.zone = ""; + + /** + * Operation operationType. + * @member {google.container.v1.Operation.Type} operationType + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.operationType = 0; + + /** + * Operation status. + * @member {google.container.v1.Operation.Status} status + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.status = 0; + + /** + * Operation detail. + * @member {string} detail + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.detail = ""; + + /** + * Operation statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.statusMessage = ""; + + /** + * Operation selfLink. + * @member {string} selfLink + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.selfLink = ""; + + /** + * Operation targetLink. + * @member {string} targetLink + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.targetLink = ""; + + /** + * Operation location. + * @member {string} location + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.location = ""; + + /** + * Operation startTime. + * @member {string} startTime + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.startTime = ""; + + /** + * Operation endTime. + * @member {string} endTime + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.endTime = ""; + + /** + * Operation progress. + * @member {google.container.v1.IOperationProgress|null|undefined} progress + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.progress = null; + + /** + * Operation clusterConditions. + * @member {Array.} clusterConditions + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.clusterConditions = $util.emptyArray; + + /** + * Operation nodepoolConditions. + * @member {Array.} nodepoolConditions + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.nodepoolConditions = $util.emptyArray; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.container.v1.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.container.v1.Operation + * @static + * @param {google.container.v1.IOperation=} [properties] Properties to set + * @returns {google.container.v1.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Operation + * @static + * @param {google.container.v1.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operationType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selfLink); + if (message.targetLink != null && Object.hasOwnProperty.call(message, "targetLink")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetLink); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.detail); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.location); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.startTime); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.endTime); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.container.v1.OperationProgress.encode(message.progress, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.clusterConditions != null && message.clusterConditions.length) + for (var i = 0; i < message.clusterConditions.length; ++i) + $root.google.container.v1.StatusCondition.encode(message.clusterConditions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.nodepoolConditions != null && message.nodepoolConditions.length) + for (var i = 0; i < message.nodepoolConditions.length; ++i) + $root.google.container.v1.StatusCondition.encode(message.nodepoolConditions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Operation + * @static + * @param {google.container.v1.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationType = reader.int32(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 8: { + message.detail = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.selfLink = reader.string(); + break; + } + case 7: { + message.targetLink = reader.string(); + break; + } + case 9: { + message.location = reader.string(); + break; + } + case 10: { + message.startTime = reader.string(); + break; + } + case 11: { + message.endTime = reader.string(); + break; + } + case 12: { + message.progress = $root.google.container.v1.OperationProgress.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.clusterConditions && message.clusterConditions.length)) + message.clusterConditions = []; + message.clusterConditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.nodepoolConditions && message.nodepoolConditions.length)) + message.nodepoolConditions = []; + message.nodepoolConditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 15: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.container.v1.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 18: + case 19: + break; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.targetLink != null && message.hasOwnProperty("targetLink")) + if (!$util.isString(message.targetLink)) + return "targetLink: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isString(message.startTime)) + return "startTime: string expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isString(message.endTime)) + return "endTime: string expected"; + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.container.v1.OperationProgress.verify(message.progress); + if (error) + return "progress." + error; + } + if (message.clusterConditions != null && message.hasOwnProperty("clusterConditions")) { + if (!Array.isArray(message.clusterConditions)) + return "clusterConditions: array expected"; + for (var i = 0; i < message.clusterConditions.length; ++i) { + var error = $root.google.container.v1.StatusCondition.verify(message.clusterConditions[i]); + if (error) + return "clusterConditions." + error; + } + } + if (message.nodepoolConditions != null && message.hasOwnProperty("nodepoolConditions")) { + if (!Array.isArray(message.nodepoolConditions)) + return "nodepoolConditions: array expected"; + for (var i = 0; i < message.nodepoolConditions.length; ++i) { + var error = $root.google.container.v1.StatusCondition.verify(message.nodepoolConditions[i]); + if (error) + return "nodepoolConditions." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Operation) + return object; + var message = new $root.google.container.v1.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.zone != null) + message.zone = String(object.zone); + switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE_CLUSTER": + case 1: + message.operationType = 1; + break; + case "DELETE_CLUSTER": + case 2: + message.operationType = 2; + break; + case "UPGRADE_MASTER": + case 3: + message.operationType = 3; + break; + case "UPGRADE_NODES": + case 4: + message.operationType = 4; + break; + case "REPAIR_CLUSTER": + case 5: + message.operationType = 5; + break; + case "UPDATE_CLUSTER": + case 6: + message.operationType = 6; + break; + case "CREATE_NODE_POOL": + case 7: + message.operationType = 7; + break; + case "DELETE_NODE_POOL": + case 8: + message.operationType = 8; + break; + case "SET_NODE_POOL_MANAGEMENT": + case 9: + message.operationType = 9; + break; + case "AUTO_REPAIR_NODES": + case 10: + message.operationType = 10; + break; + case "AUTO_UPGRADE_NODES": + case 11: + message.operationType = 11; + break; + case "SET_LABELS": + case 12: + message.operationType = 12; + break; + case "SET_MASTER_AUTH": + case 13: + message.operationType = 13; + break; + case "SET_NODE_POOL_SIZE": + case 14: + message.operationType = 14; + break; + case "SET_NETWORK_POLICY": + case 15: + message.operationType = 15; + break; + case "SET_MAINTENANCE_POLICY": + case 16: + message.operationType = 16; + break; + case "RESIZE_CLUSTER": + case 18: + message.operationType = 18; + break; + case "FLEET_FEATURE_UPGRADE": + case 19: + message.operationType = 19; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "DONE": + case 3: + message.status = 3; + break; + case "ABORTING": + case 4: + message.status = 4; + break; + } + if (object.detail != null) + message.detail = String(object.detail); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.targetLink != null) + message.targetLink = String(object.targetLink); + if (object.location != null) + message.location = String(object.location); + if (object.startTime != null) + message.startTime = String(object.startTime); + if (object.endTime != null) + message.endTime = String(object.endTime); + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.container.v1.Operation.progress: object expected"); + message.progress = $root.google.container.v1.OperationProgress.fromObject(object.progress); + } + if (object.clusterConditions) { + if (!Array.isArray(object.clusterConditions)) + throw TypeError(".google.container.v1.Operation.clusterConditions: array expected"); + message.clusterConditions = []; + for (var i = 0; i < object.clusterConditions.length; ++i) { + if (typeof object.clusterConditions[i] !== "object") + throw TypeError(".google.container.v1.Operation.clusterConditions: object expected"); + message.clusterConditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.clusterConditions[i]); + } + } + if (object.nodepoolConditions) { + if (!Array.isArray(object.nodepoolConditions)) + throw TypeError(".google.container.v1.Operation.nodepoolConditions: array expected"); + message.nodepoolConditions = []; + for (var i = 0; i < object.nodepoolConditions.length; ++i) { + if (typeof object.nodepoolConditions[i] !== "object") + throw TypeError(".google.container.v1.Operation.nodepoolConditions: object expected"); + message.nodepoolConditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.nodepoolConditions[i]); + } + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.container.v1.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.Operation + * @static + * @param {google.container.v1.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.clusterConditions = []; + object.nodepoolConditions = []; + } + if (options.defaults) { + object.name = ""; + object.zone = ""; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.selfLink = ""; + object.targetLink = ""; + object.detail = ""; + object.location = ""; + object.startTime = ""; + object.endTime = ""; + object.progress = null; + object.error = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.container.v1.Operation.Type[message.operationType] === undefined ? message.operationType : $root.google.container.v1.Operation.Type[message.operationType] : message.operationType; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1.Operation.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.targetLink != null && message.hasOwnProperty("targetLink")) + object.targetLink = message.targetLink; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = message.startTime; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = message.endTime; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.container.v1.OperationProgress.toObject(message.progress, options); + if (message.clusterConditions && message.clusterConditions.length) { + object.clusterConditions = []; + for (var j = 0; j < message.clusterConditions.length; ++j) + object.clusterConditions[j] = $root.google.container.v1.StatusCondition.toObject(message.clusterConditions[j], options); + } + if (message.nodepoolConditions && message.nodepoolConditions.length) { + object.nodepoolConditions = []; + for (var j = 0; j < message.nodepoolConditions.length; ++j) + object.nodepoolConditions[j] = $root.google.container.v1.StatusCondition.toObject(message.nodepoolConditions[j], options); + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.container.v1.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.container.v1.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.Operation"; + }; + + /** + * Status enum. + * @name google.container.v1.Operation.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + * @property {number} ABORTING=4 ABORTING value + */ + Operation.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + values[valuesById[4] = "ABORTING"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.container.v1.Operation.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE_CLUSTER=1 CREATE_CLUSTER value + * @property {number} DELETE_CLUSTER=2 DELETE_CLUSTER value + * @property {number} UPGRADE_MASTER=3 UPGRADE_MASTER value + * @property {number} UPGRADE_NODES=4 UPGRADE_NODES value + * @property {number} REPAIR_CLUSTER=5 REPAIR_CLUSTER value + * @property {number} UPDATE_CLUSTER=6 UPDATE_CLUSTER value + * @property {number} CREATE_NODE_POOL=7 CREATE_NODE_POOL value + * @property {number} DELETE_NODE_POOL=8 DELETE_NODE_POOL value + * @property {number} SET_NODE_POOL_MANAGEMENT=9 SET_NODE_POOL_MANAGEMENT value + * @property {number} AUTO_REPAIR_NODES=10 AUTO_REPAIR_NODES value + * @property {number} AUTO_UPGRADE_NODES=11 AUTO_UPGRADE_NODES value + * @property {number} SET_LABELS=12 SET_LABELS value + * @property {number} SET_MASTER_AUTH=13 SET_MASTER_AUTH value + * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value + * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value + * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value + * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value + * @property {number} FLEET_FEATURE_UPGRADE=19 FLEET_FEATURE_UPGRADE value + */ + Operation.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE_CLUSTER"] = 1; + values[valuesById[2] = "DELETE_CLUSTER"] = 2; + values[valuesById[3] = "UPGRADE_MASTER"] = 3; + values[valuesById[4] = "UPGRADE_NODES"] = 4; + values[valuesById[5] = "REPAIR_CLUSTER"] = 5; + values[valuesById[6] = "UPDATE_CLUSTER"] = 6; + values[valuesById[7] = "CREATE_NODE_POOL"] = 7; + values[valuesById[8] = "DELETE_NODE_POOL"] = 8; + values[valuesById[9] = "SET_NODE_POOL_MANAGEMENT"] = 9; + values[valuesById[10] = "AUTO_REPAIR_NODES"] = 10; + values[valuesById[11] = "AUTO_UPGRADE_NODES"] = 11; + values[valuesById[12] = "SET_LABELS"] = 12; + values[valuesById[13] = "SET_MASTER_AUTH"] = 13; + values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; + values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; + values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; + values[valuesById[18] = "RESIZE_CLUSTER"] = 18; + values[valuesById[19] = "FLEET_FEATURE_UPGRADE"] = 19; + return values; + })(); + + return Operation; + })(); + + v1.OperationProgress = (function() { + + /** + * Properties of an OperationProgress. + * @memberof google.container.v1 + * @interface IOperationProgress + * @property {string|null} [name] OperationProgress name + * @property {google.container.v1.Operation.Status|null} [status] OperationProgress status + * @property {Array.|null} [metrics] OperationProgress metrics + * @property {Array.|null} [stages] OperationProgress stages + */ + + /** + * Constructs a new OperationProgress. + * @memberof google.container.v1 + * @classdesc Represents an OperationProgress. + * @implements IOperationProgress + * @constructor + * @param {google.container.v1.IOperationProgress=} [properties] Properties to set + */ + function OperationProgress(properties) { + this.metrics = []; + this.stages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationProgress name. + * @member {string} name + * @memberof google.container.v1.OperationProgress + * @instance + */ + OperationProgress.prototype.name = ""; + + /** + * OperationProgress status. + * @member {google.container.v1.Operation.Status} status + * @memberof google.container.v1.OperationProgress + * @instance + */ + OperationProgress.prototype.status = 0; + + /** + * OperationProgress metrics. + * @member {Array.} metrics + * @memberof google.container.v1.OperationProgress + * @instance + */ + OperationProgress.prototype.metrics = $util.emptyArray; + + /** + * OperationProgress stages. + * @member {Array.} stages + * @memberof google.container.v1.OperationProgress + * @instance + */ + OperationProgress.prototype.stages = $util.emptyArray; + + /** + * Creates a new OperationProgress instance using the specified properties. + * @function create + * @memberof google.container.v1.OperationProgress + * @static + * @param {google.container.v1.IOperationProgress=} [properties] Properties to set + * @returns {google.container.v1.OperationProgress} OperationProgress instance + */ + OperationProgress.create = function create(properties) { + return new OperationProgress(properties); + }; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. + * @function encode + * @memberof google.container.v1.OperationProgress + * @static + * @param {google.container.v1.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.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.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.container.v1.OperationProgress.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stages != null && message.stages.length) + for (var i = 0; i < message.stages.length; ++i) + $root.google.container.v1.OperationProgress.encode(message.stages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.OperationProgress + * @static + * @param {google.container.v1.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.OperationProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.OperationProgress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.status = reader.int32(); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.container.v1.OperationProgress.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stages && message.stages.length)) + message.stages = []; + message.stages.push($root.google.container.v1.OperationProgress.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.OperationProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationProgress message. + * @function verify + * @memberof google.container.v1.OperationProgress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationProgress.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.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + 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) { + var error = $root.google.container.v1.OperationProgress.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.stages != null && message.hasOwnProperty("stages")) { + if (!Array.isArray(message.stages)) + return "stages: array expected"; + for (var i = 0; i < message.stages.length; ++i) { + var error = $root.google.container.v1.OperationProgress.verify(message.stages[i]); + if (error) + return "stages." + error; + } + } + return null; + }; + + /** + * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.OperationProgress + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.OperationProgress} OperationProgress + */ + OperationProgress.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.OperationProgress) + return object; + var message = new $root.google.container.v1.OperationProgress(); + if (object.name != null) + message.name = String(object.name); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "DONE": + case 3: + message.status = 3; + break; + case "ABORTING": + case 4: + message.status = 4; + break; + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.container.v1.OperationProgress.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.container.v1.OperationProgress.metrics: object expected"); + message.metrics[i] = $root.google.container.v1.OperationProgress.Metric.fromObject(object.metrics[i]); + } + } + if (object.stages) { + if (!Array.isArray(object.stages)) + throw TypeError(".google.container.v1.OperationProgress.stages: array expected"); + message.stages = []; + for (var i = 0; i < object.stages.length; ++i) { + if (typeof object.stages[i] !== "object") + throw TypeError(".google.container.v1.OperationProgress.stages: object expected"); + message.stages[i] = $root.google.container.v1.OperationProgress.fromObject(object.stages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.OperationProgress + * @static + * @param {google.container.v1.OperationProgress} message OperationProgress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationProgress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metrics = []; + object.stages = []; + } + if (options.defaults) { + object.name = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1.Operation.Status[message.status] : message.status; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.container.v1.OperationProgress.Metric.toObject(message.metrics[j], options); + } + if (message.stages && message.stages.length) { + object.stages = []; + for (var j = 0; j < message.stages.length; ++j) + object.stages[j] = $root.google.container.v1.OperationProgress.toObject(message.stages[j], options); + } + return object; + }; + + /** + * Converts this OperationProgress to JSON. + * @function toJSON + * @memberof google.container.v1.OperationProgress + * @instance + * @returns {Object.} JSON object + */ + OperationProgress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationProgress + * @function getTypeUrl + * @memberof google.container.v1.OperationProgress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.OperationProgress"; + }; + + OperationProgress.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.container.v1.OperationProgress + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {number|Long|null} [intValue] Metric intValue + * @property {number|null} [doubleValue] Metric doubleValue + * @property {string|null} [stringValue] Metric stringValue + */ + + /** + * Constructs a new Metric. + * @memberof google.container.v1.OperationProgress + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.container.v1.OperationProgress.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.container.v1.OperationProgress.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric intValue. + * @member {number|Long|null|undefined} intValue + * @memberof google.container.v1.OperationProgress.Metric + * @instance + */ + Metric.prototype.intValue = null; + + /** + * Metric doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.container.v1.OperationProgress.Metric + * @instance + */ + Metric.prototype.doubleValue = null; + + /** + * Metric stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.container.v1.OperationProgress.Metric + * @instance + */ + Metric.prototype.stringValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Metric value. + * @member {"intValue"|"doubleValue"|"stringValue"|undefined} value + * @memberof google.container.v1.OperationProgress.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {google.container.v1.OperationProgress.IMetric=} [properties] Properties to set + * @returns {google.container.v1.OperationProgress.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. + * @function encode + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {google.container.v1.OperationProgress.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.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.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.intValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {google.container.v1.OperationProgress.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.OperationProgress.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.OperationProgress.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.intValue = reader.int64(); + break; + } + case 3: { + message.doubleValue = reader.double(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.OperationProgress.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.OperationProgress.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.OperationProgress.Metric) + return object; + var message = new $root.google.container.v1.OperationProgress.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {google.container.v1.OperationProgress.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.value = "intValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.container.v1.OperationProgress.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.container.v1.OperationProgress.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.OperationProgress.Metric"; + }; + + return Metric; + })(); + + return OperationProgress; + })(); + + v1.CreateClusterRequest = (function() { + + /** + * Properties of a CreateClusterRequest. + * @memberof google.container.v1 + * @interface ICreateClusterRequest + * @property {string|null} [projectId] CreateClusterRequest projectId + * @property {string|null} [zone] CreateClusterRequest zone + * @property {google.container.v1.ICluster|null} [cluster] CreateClusterRequest cluster + * @property {string|null} [parent] CreateClusterRequest parent + */ + + /** + * Constructs a new CreateClusterRequest. + * @memberof google.container.v1 + * @classdesc Represents a CreateClusterRequest. + * @implements ICreateClusterRequest + * @constructor + * @param {google.container.v1.ICreateClusterRequest=} [properties] Properties to set + */ + function CreateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.projectId = ""; + + /** + * CreateClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.zone = ""; + + /** + * CreateClusterRequest cluster. + * @member {google.container.v1.ICluster|null|undefined} cluster + * @memberof google.container.v1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.cluster = null; + + /** + * CreateClusterRequest parent. + * @member {string} parent + * @memberof google.container.v1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.parent = ""; + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {google.container.v1.ICreateClusterRequest=} [properties] Properties to set + * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest instance + */ + CreateClusterRequest.create = function create(properties) { + return new CreateClusterRequest(properties); + }; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {google.container.v1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.google.container.v1.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {google.container.v1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CreateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.cluster = $root.google.container.v1.Cluster.decode(reader, reader.uint32()); + break; + } + case 5: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateClusterRequest message. + * @function verify + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.google.container.v1.Cluster.verify(message.cluster); + if (error) + return "cluster." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest + */ + CreateClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CreateClusterRequest) + return object; + var message = new $root.google.container.v1.CreateClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".google.container.v1.CreateClusterRequest.cluster: object expected"); + message.cluster = $root.google.container.v1.Cluster.fromObject(object.cluster); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {google.container.v1.CreateClusterRequest} message CreateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.cluster = null; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.google.container.v1.Cluster.toObject(message.cluster, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CreateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + CreateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateClusterRequest + * @function getTypeUrl + * @memberof google.container.v1.CreateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CreateClusterRequest"; + }; + + return CreateClusterRequest; + })(); + + v1.GetClusterRequest = (function() { + + /** + * Properties of a GetClusterRequest. + * @memberof google.container.v1 + * @interface IGetClusterRequest + * @property {string|null} [projectId] GetClusterRequest projectId + * @property {string|null} [zone] GetClusterRequest zone + * @property {string|null} [clusterId] GetClusterRequest clusterId + * @property {string|null} [name] GetClusterRequest name + */ + + /** + * Constructs a new GetClusterRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetClusterRequest. + * @implements IGetClusterRequest + * @constructor + * @param {google.container.v1.IGetClusterRequest=} [properties] Properties to set + */ + function GetClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.projectId = ""; + + /** + * GetClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.zone = ""; + + /** + * GetClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.clusterId = ""; + + /** + * GetClusterRequest name. + * @member {string} name + * @memberof google.container.v1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.name = ""; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {google.container.v1.IGetClusterRequest=} [properties] Properties to set + * @returns {google.container.v1.GetClusterRequest} GetClusterRequest instance + */ + GetClusterRequest.create = function create(properties) { + return new GetClusterRequest(properties); + }; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {google.container.v1.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {google.container.v1.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetClusterRequest message. + * @function verify + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetClusterRequest} GetClusterRequest + */ + GetClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetClusterRequest) + return object; + var message = new $root.google.container.v1.GetClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {google.container.v1.GetClusterRequest} message GetClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetClusterRequest + * @instance + * @returns {Object.} JSON object + */ + GetClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetClusterRequest + * @function getTypeUrl + * @memberof google.container.v1.GetClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetClusterRequest"; + }; + + return GetClusterRequest; + })(); + + v1.UpdateClusterRequest = (function() { + + /** + * Properties of an UpdateClusterRequest. + * @memberof google.container.v1 + * @interface IUpdateClusterRequest + * @property {string|null} [projectId] UpdateClusterRequest projectId + * @property {string|null} [zone] UpdateClusterRequest zone + * @property {string|null} [clusterId] UpdateClusterRequest clusterId + * @property {google.container.v1.IClusterUpdate|null} [update] UpdateClusterRequest update + * @property {string|null} [name] UpdateClusterRequest name + */ + + /** + * Constructs a new UpdateClusterRequest. + * @memberof google.container.v1 + * @classdesc Represents an UpdateClusterRequest. + * @implements IUpdateClusterRequest + * @constructor + * @param {google.container.v1.IUpdateClusterRequest=} [properties] Properties to set + */ + function UpdateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.projectId = ""; + + /** + * UpdateClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.zone = ""; + + /** + * UpdateClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.clusterId = ""; + + /** + * UpdateClusterRequest update. + * @member {google.container.v1.IClusterUpdate|null|undefined} update + * @memberof google.container.v1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.update = null; + + /** + * UpdateClusterRequest name. + * @member {string} name + * @memberof google.container.v1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.name = ""; + + /** + * Creates a new UpdateClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {google.container.v1.IUpdateClusterRequest=} [properties] Properties to set + * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest instance + */ + UpdateClusterRequest.create = function create(properties) { + return new UpdateClusterRequest(properties); + }; + + /** + * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {google.container.v1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.container.v1.ClusterUpdate.encode(message.update, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {google.container.v1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.update = $root.google.container.v1.ClusterUpdate.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateClusterRequest message. + * @function verify + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.update != null && message.hasOwnProperty("update")) { + var error = $root.google.container.v1.ClusterUpdate.verify(message.update); + if (error) + return "update." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest + */ + UpdateClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpdateClusterRequest) + return object; + var message = new $root.google.container.v1.UpdateClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.container.v1.UpdateClusterRequest.update: object expected"); + message.update = $root.google.container.v1.ClusterUpdate.fromObject(object.update); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {google.container.v1.UpdateClusterRequest} message UpdateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.update = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.update != null && message.hasOwnProperty("update")) + object.update = $root.google.container.v1.ClusterUpdate.toObject(message.update, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UpdateClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1.UpdateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateClusterRequest + * @function getTypeUrl + * @memberof google.container.v1.UpdateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpdateClusterRequest"; + }; + + return UpdateClusterRequest; + })(); + + v1.UpdateNodePoolRequest = (function() { + + /** + * Properties of an UpdateNodePoolRequest. + * @memberof google.container.v1 + * @interface IUpdateNodePoolRequest + * @property {string|null} [projectId] UpdateNodePoolRequest projectId + * @property {string|null} [zone] UpdateNodePoolRequest zone + * @property {string|null} [clusterId] UpdateNodePoolRequest clusterId + * @property {string|null} [nodePoolId] UpdateNodePoolRequest nodePoolId + * @property {string|null} [nodeVersion] UpdateNodePoolRequest nodeVersion + * @property {string|null} [imageType] UpdateNodePoolRequest imageType + * @property {string|null} [name] UpdateNodePoolRequest name + * @property {Array.|null} [locations] UpdateNodePoolRequest locations + * @property {google.container.v1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] UpdateNodePoolRequest workloadMetadataConfig + * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] UpdateNodePoolRequest upgradeSettings + * @property {google.container.v1.INetworkTags|null} [tags] UpdateNodePoolRequest tags + * @property {google.container.v1.INodeTaints|null} [taints] UpdateNodePoolRequest taints + * @property {google.container.v1.INodeLabels|null} [labels] UpdateNodePoolRequest labels + * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] UpdateNodePoolRequest linuxNodeConfig + * @property {google.container.v1.INodeKubeletConfig|null} [kubeletConfig] UpdateNodePoolRequest kubeletConfig + * @property {google.container.v1.INodeNetworkConfig|null} [nodeNetworkConfig] UpdateNodePoolRequest nodeNetworkConfig + * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] UpdateNodePoolRequest gcfsConfig + * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] UpdateNodePoolRequest confidentialNodes + * @property {google.container.v1.IVirtualNIC|null} [gvnic] UpdateNodePoolRequest gvnic + * @property {string|null} [etag] UpdateNodePoolRequest etag + * @property {google.container.v1.IFastSocket|null} [fastSocket] UpdateNodePoolRequest fastSocket + * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] UpdateNodePoolRequest loggingConfig + * @property {google.container.v1.IResourceLabels|null} [resourceLabels] UpdateNodePoolRequest resourceLabels + * @property {google.container.v1.IWindowsNodeConfig|null} [windowsNodeConfig] UpdateNodePoolRequest windowsNodeConfig + * @property {Array.|null} [accelerators] UpdateNodePoolRequest accelerators + * @property {string|null} [machineType] UpdateNodePoolRequest machineType + * @property {string|null} [diskType] UpdateNodePoolRequest diskType + * @property {number|Long|null} [diskSizeGb] UpdateNodePoolRequest diskSizeGb + * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] UpdateNodePoolRequest resourceManagerTags + * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] UpdateNodePoolRequest containerdConfig + * @property {google.container.v1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] UpdateNodePoolRequest queuedProvisioning + * @property {Array.|null} [storagePools] UpdateNodePoolRequest storagePools + */ + + /** + * Constructs a new UpdateNodePoolRequest. + * @memberof google.container.v1 + * @classdesc Represents an UpdateNodePoolRequest. + * @implements IUpdateNodePoolRequest + * @constructor + * @param {google.container.v1.IUpdateNodePoolRequest=} [properties] Properties to set + */ + function UpdateNodePoolRequest(properties) { + this.locations = []; + this.accelerators = []; + this.storagePools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.projectId = ""; + + /** + * UpdateNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.zone = ""; + + /** + * UpdateNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.clusterId = ""; + + /** + * UpdateNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodePoolId = ""; + + /** + * UpdateNodePoolRequest nodeVersion. + * @member {string} nodeVersion + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodeVersion = ""; + + /** + * UpdateNodePoolRequest imageType. + * @member {string} imageType + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.imageType = ""; + + /** + * UpdateNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.name = ""; + + /** + * UpdateNodePoolRequest locations. + * @member {Array.} locations + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.locations = $util.emptyArray; + + /** + * UpdateNodePoolRequest workloadMetadataConfig. + * @member {google.container.v1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.workloadMetadataConfig = null; + + /** + * UpdateNodePoolRequest upgradeSettings. + * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.upgradeSettings = null; + + /** + * UpdateNodePoolRequest tags. + * @member {google.container.v1.INetworkTags|null|undefined} tags + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.tags = null; + + /** + * UpdateNodePoolRequest taints. + * @member {google.container.v1.INodeTaints|null|undefined} taints + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.taints = null; + + /** + * UpdateNodePoolRequest labels. + * @member {google.container.v1.INodeLabels|null|undefined} labels + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.labels = null; + + /** + * UpdateNodePoolRequest linuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.linuxNodeConfig = null; + + /** + * UpdateNodePoolRequest kubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} kubeletConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.kubeletConfig = null; + + /** + * UpdateNodePoolRequest nodeNetworkConfig. + * @member {google.container.v1.INodeNetworkConfig|null|undefined} nodeNetworkConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodeNetworkConfig = null; + + /** + * UpdateNodePoolRequest gcfsConfig. + * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.gcfsConfig = null; + + /** + * UpdateNodePoolRequest confidentialNodes. + * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.confidentialNodes = null; + + /** + * UpdateNodePoolRequest gvnic. + * @member {google.container.v1.IVirtualNIC|null|undefined} gvnic + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.gvnic = null; + + /** + * UpdateNodePoolRequest etag. + * @member {string} etag + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.etag = ""; + + /** + * UpdateNodePoolRequest fastSocket. + * @member {google.container.v1.IFastSocket|null|undefined} fastSocket + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.fastSocket = null; + + /** + * UpdateNodePoolRequest loggingConfig. + * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.loggingConfig = null; + + /** + * UpdateNodePoolRequest resourceLabels. + * @member {google.container.v1.IResourceLabels|null|undefined} resourceLabels + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.resourceLabels = null; + + /** + * UpdateNodePoolRequest windowsNodeConfig. + * @member {google.container.v1.IWindowsNodeConfig|null|undefined} windowsNodeConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.windowsNodeConfig = null; + + /** + * UpdateNodePoolRequest accelerators. + * @member {Array.} accelerators + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.accelerators = $util.emptyArray; + + /** + * UpdateNodePoolRequest machineType. + * @member {string} machineType + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.machineType = ""; + + /** + * UpdateNodePoolRequest diskType. + * @member {string} diskType + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.diskType = ""; + + /** + * UpdateNodePoolRequest diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UpdateNodePoolRequest resourceManagerTags. + * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.resourceManagerTags = null; + + /** + * UpdateNodePoolRequest containerdConfig. + * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.containerdConfig = null; + + /** + * UpdateNodePoolRequest queuedProvisioning. + * @member {google.container.v1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.queuedProvisioning = null; + + /** + * UpdateNodePoolRequest storagePools. + * @member {Array.} storagePools + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.storagePools = $util.emptyArray; + + /** + * Creates a new UpdateNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {google.container.v1.IUpdateNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest instance + */ + UpdateNodePoolRequest.create = function create(properties) { + return new UpdateNodePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {google.container.v1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.nodeVersion != null && Object.hasOwnProperty.call(message, "nodeVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeVersion); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.imageType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.name); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) + $root.google.container.v1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.container.v1.NetworkTags.encode(message.tags, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.taints != null && Object.hasOwnProperty.call(message, "taints")) + $root.google.container.v1.NodeTaints.encode(message.taints, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + $root.google.container.v1.NodeLabels.encode(message.labels, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.nodeNetworkConfig != null && Object.hasOwnProperty.call(message, "nodeNetworkConfig")) + $root.google.container.v1.NodeNetworkConfig.encode(message.nodeNetworkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) + $root.google.container.v1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.etag); + if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) + $root.google.container.v1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + $root.google.container.v1.ResourceLabels.encode(message.resourceLabels, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) + $root.google.container.v1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.accelerators != null && message.accelerators.length) + for (var i = 0; i < message.accelerators.length; ++i) + $root.google.container.v1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.machineType); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.diskType); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 38, wireType 0 =*/304).int64(message.diskSizeGb); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) + $root.google.container.v1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + writer.uint32(/* id 43, wireType 2 =*/346).string(message.storagePools[i]); + return writer; + }; + + /** + * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {google.container.v1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.nodeVersion = reader.string(); + break; + } + case 6: { + message.imageType = reader.string(); + break; + } + case 8: { + message.name = reader.string(); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + message.tags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 17: { + message.taints = $root.google.container.v1.NodeTaints.decode(reader, reader.uint32()); + break; + } + case 18: { + message.labels = $root.google.container.v1.NodeLabels.decode(reader, reader.uint32()); + break; + } + case 19: { + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + case 20: { + message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 23: { + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 29: { + message.gvnic = $root.google.container.v1.VirtualNIC.decode(reader, reader.uint32()); + break; + } + case 30: { + message.etag = reader.string(); + break; + } + case 31: { + message.fastSocket = $root.google.container.v1.FastSocket.decode(reader, reader.uint32()); + break; + } + case 32: { + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 33: { + message.resourceLabels = $root.google.container.v1.ResourceLabels.decode(reader, reader.uint32()); + break; + } + case 34: { + message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.decode(reader, reader.uint32()); + break; + } + case 35: { + if (!(message.accelerators && message.accelerators.length)) + message.accelerators = []; + message.accelerators.push($root.google.container.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 36: { + message.machineType = reader.string(); + break; + } + case 37: { + message.diskType = reader.string(); + break; + } + case 38: { + message.diskSizeGb = reader.int64(); + break; + } + case 39: { + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 40: { + message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 42: { + message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); + break; + } + case 43: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateNodePoolRequest message. + * @function verify + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) + if (!$util.isString(message.nodeVersion)) + return "nodeVersion: string expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { + var error = $root.google.container.v1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); + if (error) + return "workloadMetadataConfig." + error; + } + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + var error = $root.google.container.v1.NetworkTags.verify(message.tags); + if (error) + return "tags." + error; + } + if (message.taints != null && message.hasOwnProperty("taints")) { + var error = $root.google.container.v1.NodeTaints.verify(message.taints); + if (error) + return "taints." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + var error = $root.google.container.v1.NodeLabels.verify(message.labels); + if (error) + return "labels." + error; + } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.kubeletConfig); + if (error) + return "kubeletConfig." + error; + } + if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) { + var error = $root.google.container.v1.NodeNetworkConfig.verify(message.nodeNetworkConfig); + if (error) + return "nodeNetworkConfig." + error; + } + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.gvnic != null && message.hasOwnProperty("gvnic")) { + var error = $root.google.container.v1.VirtualNIC.verify(message.gvnic); + if (error) + return "gvnic." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + var error = $root.google.container.v1.FastSocket.verify(message.fastSocket); + if (error) + return "fastSocket." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + var error = $root.google.container.v1.ResourceLabels.verify(message.resourceLabels); + if (error) + return "resourceLabels." + error; + } + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { + var error = $root.google.container.v1.WindowsNodeConfig.verify(message.windowsNodeConfig); + if (error) + return "windowsNodeConfig." + error; + } + if (message.accelerators != null && message.hasOwnProperty("accelerators")) { + if (!Array.isArray(message.accelerators)) + return "accelerators: array expected"; + for (var i = 0; i < message.accelerators.length; ++i) { + var error = $root.google.container.v1.AcceleratorConfig.verify(message.accelerators[i]); + if (error) + return "accelerators." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { + var error = $root.google.container.v1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); + if (error) + return "queuedProvisioning." + error; + } + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) + if (!$util.isString(message.storagePools[i])) + return "storagePools: string[] expected"; + } + return null; + }; + + /** + * Creates an UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest + */ + UpdateNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpdateNodePoolRequest) + return object; + var message = new $root.google.container.v1.UpdateNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.nodeVersion != null) + message.nodeVersion = String(object.nodeVersion); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.name != null) + message.name = String(object.name); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1.UpdateNodePoolRequest.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.workloadMetadataConfig != null) { + if (typeof object.workloadMetadataConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.workloadMetadataConfig: object expected"); + message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); + } + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.tags: object expected"); + message.tags = $root.google.container.v1.NetworkTags.fromObject(object.tags); + } + if (object.taints != null) { + if (typeof object.taints !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.taints: object expected"); + message.taints = $root.google.container.v1.NodeTaints.fromObject(object.taints); + } + if (object.labels != null) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.labels: object expected"); + message.labels = $root.google.container.v1.NodeLabels.fromObject(object.labels); + } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } + if (object.kubeletConfig != null) { + if (typeof object.kubeletConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.kubeletConfig: object expected"); + message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.kubeletConfig); + } + if (object.nodeNetworkConfig != null) { + if (typeof object.nodeNetworkConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.nodeNetworkConfig: object expected"); + message.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.fromObject(object.nodeNetworkConfig); + } + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.gvnic != null) { + if (typeof object.gvnic !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.gvnic: object expected"); + message.gvnic = $root.google.container.v1.VirtualNIC.fromObject(object.gvnic); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.fastSocket != null) { + if (typeof object.fastSocket !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.fastSocket: object expected"); + message.fastSocket = $root.google.container.v1.FastSocket.fromObject(object.fastSocket); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.resourceLabels != null) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.resourceLabels: object expected"); + message.resourceLabels = $root.google.container.v1.ResourceLabels.fromObject(object.resourceLabels); + } + if (object.windowsNodeConfig != null) { + if (typeof object.windowsNodeConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.windowsNodeConfig: object expected"); + message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); + } + if (object.accelerators) { + if (!Array.isArray(object.accelerators)) + throw TypeError(".google.container.v1.UpdateNodePoolRequest.accelerators: array expected"); + message.accelerators = []; + for (var i = 0; i < object.accelerators.length; ++i) { + if (typeof object.accelerators[i] !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.accelerators: object expected"); + message.accelerators[i] = $root.google.container.v1.AcceleratorConfig.fromObject(object.accelerators[i]); + } + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.queuedProvisioning != null) { + if (typeof object.queuedProvisioning !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.queuedProvisioning: object expected"); + message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); + } + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.container.v1.UpdateNodePoolRequest.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) + message.storagePools[i] = String(object.storagePools[i]); + } + return message; + }; + + /** + * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {google.container.v1.UpdateNodePoolRequest} message UpdateNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.locations = []; + object.accelerators = []; + object.storagePools = []; + } + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.nodeVersion = ""; + object.imageType = ""; + object.name = ""; + object.workloadMetadataConfig = null; + object.upgradeSettings = null; + object.tags = null; + object.taints = null; + object.labels = null; + object.linuxNodeConfig = null; + object.kubeletConfig = null; + object.nodeNetworkConfig = null; + object.gcfsConfig = null; + object.confidentialNodes = null; + object.gvnic = null; + object.etag = ""; + object.fastSocket = null; + object.loggingConfig = null; + object.resourceLabels = null; + object.windowsNodeConfig = null; + object.machineType = ""; + object.diskType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + object.resourceManagerTags = null; + object.containerdConfig = null; + object.queuedProvisioning = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) + object.nodeVersion = message.nodeVersion; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) + object.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.tags != null && message.hasOwnProperty("tags")) + object.tags = $root.google.container.v1.NetworkTags.toObject(message.tags, options); + if (message.taints != null && message.hasOwnProperty("taints")) + object.taints = $root.google.container.v1.NodeTaints.toObject(message.taints, options); + if (message.labels != null && message.hasOwnProperty("labels")) + object.labels = $root.google.container.v1.NodeLabels.toObject(message.labels, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) + object.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.kubeletConfig, options); + if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) + object.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.toObject(message.nodeNetworkConfig, options); + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.gvnic != null && message.hasOwnProperty("gvnic")) + object.gvnic = $root.google.container.v1.VirtualNIC.toObject(message.gvnic, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) + object.fastSocket = $root.google.container.v1.FastSocket.toObject(message.fastSocket, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) + object.resourceLabels = $root.google.container.v1.ResourceLabels.toObject(message.resourceLabels, options); + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) + object.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); + if (message.accelerators && message.accelerators.length) { + object.accelerators = []; + for (var j = 0; j < message.accelerators.length; ++j) + object.accelerators[j] = $root.google.container.v1.AcceleratorConfig.toObject(message.accelerators[j], options); + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) + object.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = message.storagePools[j]; + } + return object; + }; + + /** + * Converts this UpdateNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1.UpdateNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpdateNodePoolRequest"; + }; + + return UpdateNodePoolRequest; + })(); + + v1.SetNodePoolAutoscalingRequest = (function() { + + /** + * Properties of a SetNodePoolAutoscalingRequest. + * @memberof google.container.v1 + * @interface ISetNodePoolAutoscalingRequest + * @property {string|null} [projectId] SetNodePoolAutoscalingRequest projectId + * @property {string|null} [zone] SetNodePoolAutoscalingRequest zone + * @property {string|null} [clusterId] SetNodePoolAutoscalingRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolAutoscalingRequest nodePoolId + * @property {google.container.v1.INodePoolAutoscaling|null} [autoscaling] SetNodePoolAutoscalingRequest autoscaling + * @property {string|null} [name] SetNodePoolAutoscalingRequest name + */ + + /** + * Constructs a new SetNodePoolAutoscalingRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetNodePoolAutoscalingRequest. + * @implements ISetNodePoolAutoscalingRequest + * @constructor + * @param {google.container.v1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set + */ + function SetNodePoolAutoscalingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolAutoscalingRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.projectId = ""; + + /** + * SetNodePoolAutoscalingRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.zone = ""; + + /** + * SetNodePoolAutoscalingRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.clusterId = ""; + + /** + * SetNodePoolAutoscalingRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolAutoscalingRequest autoscaling. + * @member {google.container.v1.INodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.autoscaling = null; + + /** + * SetNodePoolAutoscalingRequest name. + * @member {string} name + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set + * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest instance + */ + SetNodePoolAutoscalingRequest.create = function create(properties) { + return new SetNodePoolAutoscalingRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolAutoscalingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolAutoscalingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolAutoscalingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolAutoscalingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolAutoscalingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolAutoscalingRequest message. + * @function verify + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolAutoscalingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + */ + SetNodePoolAutoscalingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetNodePoolAutoscalingRequest) + return object; + var message = new $root.google.container.v1.SetNodePoolAutoscalingRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1.SetNodePoolAutoscalingRequest.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.autoscaling); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1.SetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolAutoscalingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.autoscaling = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolAutoscalingRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolAutoscalingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolAutoscalingRequest + * @function getTypeUrl + * @memberof google.container.v1.SetNodePoolAutoscalingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolAutoscalingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetNodePoolAutoscalingRequest"; + }; + + return SetNodePoolAutoscalingRequest; + })(); + + v1.SetLoggingServiceRequest = (function() { + + /** + * Properties of a SetLoggingServiceRequest. + * @memberof google.container.v1 + * @interface ISetLoggingServiceRequest + * @property {string|null} [projectId] SetLoggingServiceRequest projectId + * @property {string|null} [zone] SetLoggingServiceRequest zone + * @property {string|null} [clusterId] SetLoggingServiceRequest clusterId + * @property {string|null} [loggingService] SetLoggingServiceRequest loggingService + * @property {string|null} [name] SetLoggingServiceRequest name + */ + + /** + * Constructs a new SetLoggingServiceRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetLoggingServiceRequest. + * @implements ISetLoggingServiceRequest + * @constructor + * @param {google.container.v1.ISetLoggingServiceRequest=} [properties] Properties to set + */ + function SetLoggingServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLoggingServiceRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.projectId = ""; + + /** + * SetLoggingServiceRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.zone = ""; + + /** + * SetLoggingServiceRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.clusterId = ""; + + /** + * SetLoggingServiceRequest loggingService. + * @member {string} loggingService + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.loggingService = ""; + + /** + * SetLoggingServiceRequest name. + * @member {string} name + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.name = ""; + + /** + * Creates a new SetLoggingServiceRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {google.container.v1.ISetLoggingServiceRequest=} [properties] Properties to set + * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest instance + */ + SetLoggingServiceRequest.create = function create(properties) { + return new SetLoggingServiceRequest(properties); + }; + + /** + * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {google.container.v1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLoggingServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.loggingService); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {google.container.v1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLoggingServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLoggingServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLoggingServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.loggingService = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLoggingServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLoggingServiceRequest message. + * @function verify + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLoggingServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + if (!$util.isString(message.loggingService)) + return "loggingService: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest + */ + SetLoggingServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetLoggingServiceRequest) + return object; + var message = new $root.google.container.v1.SetLoggingServiceRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.loggingService != null) + message.loggingService = String(object.loggingService); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {google.container.v1.SetLoggingServiceRequest} message SetLoggingServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLoggingServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.loggingService = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + object.loggingService = message.loggingService; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLoggingServiceRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetLoggingServiceRequest + * @instance + * @returns {Object.} JSON object + */ + SetLoggingServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLoggingServiceRequest + * @function getTypeUrl + * @memberof google.container.v1.SetLoggingServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLoggingServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetLoggingServiceRequest"; + }; + + return SetLoggingServiceRequest; + })(); + + v1.SetMonitoringServiceRequest = (function() { + + /** + * Properties of a SetMonitoringServiceRequest. + * @memberof google.container.v1 + * @interface ISetMonitoringServiceRequest + * @property {string|null} [projectId] SetMonitoringServiceRequest projectId + * @property {string|null} [zone] SetMonitoringServiceRequest zone + * @property {string|null} [clusterId] SetMonitoringServiceRequest clusterId + * @property {string|null} [monitoringService] SetMonitoringServiceRequest monitoringService + * @property {string|null} [name] SetMonitoringServiceRequest name + */ + + /** + * Constructs a new SetMonitoringServiceRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetMonitoringServiceRequest. + * @implements ISetMonitoringServiceRequest + * @constructor + * @param {google.container.v1.ISetMonitoringServiceRequest=} [properties] Properties to set + */ + function SetMonitoringServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMonitoringServiceRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.projectId = ""; + + /** + * SetMonitoringServiceRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.zone = ""; + + /** + * SetMonitoringServiceRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.clusterId = ""; + + /** + * SetMonitoringServiceRequest monitoringService. + * @member {string} monitoringService + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.monitoringService = ""; + + /** + * SetMonitoringServiceRequest name. + * @member {string} name + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.name = ""; + + /** + * Creates a new SetMonitoringServiceRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1.ISetMonitoringServiceRequest=} [properties] Properties to set + * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest instance + */ + SetMonitoringServiceRequest.create = function create(properties) { + return new SetMonitoringServiceRequest(properties); + }; + + /** + * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMonitoringServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.monitoringService); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMonitoringServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMonitoringServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMonitoringServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.monitoringService = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMonitoringServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMonitoringServiceRequest message. + * @function verify + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMonitoringServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + if (!$util.isString(message.monitoringService)) + return "monitoringService: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + */ + SetMonitoringServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetMonitoringServiceRequest) + return object; + var message = new $root.google.container.v1.SetMonitoringServiceRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.monitoringService != null) + message.monitoringService = String(object.monitoringService); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1.SetMonitoringServiceRequest} message SetMonitoringServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMonitoringServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.monitoringService = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + object.monitoringService = message.monitoringService; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMonitoringServiceRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetMonitoringServiceRequest + * @instance + * @returns {Object.} JSON object + */ + SetMonitoringServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMonitoringServiceRequest + * @function getTypeUrl + * @memberof google.container.v1.SetMonitoringServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMonitoringServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetMonitoringServiceRequest"; + }; + + return SetMonitoringServiceRequest; + })(); + + v1.SetAddonsConfigRequest = (function() { + + /** + * Properties of a SetAddonsConfigRequest. + * @memberof google.container.v1 + * @interface ISetAddonsConfigRequest + * @property {string|null} [projectId] SetAddonsConfigRequest projectId + * @property {string|null} [zone] SetAddonsConfigRequest zone + * @property {string|null} [clusterId] SetAddonsConfigRequest clusterId + * @property {google.container.v1.IAddonsConfig|null} [addonsConfig] SetAddonsConfigRequest addonsConfig + * @property {string|null} [name] SetAddonsConfigRequest name + */ + + /** + * Constructs a new SetAddonsConfigRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetAddonsConfigRequest. + * @implements ISetAddonsConfigRequest + * @constructor + * @param {google.container.v1.ISetAddonsConfigRequest=} [properties] Properties to set + */ + function SetAddonsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetAddonsConfigRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.projectId = ""; + + /** + * SetAddonsConfigRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.zone = ""; + + /** + * SetAddonsConfigRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.clusterId = ""; + + /** + * SetAddonsConfigRequest addonsConfig. + * @member {google.container.v1.IAddonsConfig|null|undefined} addonsConfig + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.addonsConfig = null; + + /** + * SetAddonsConfigRequest name. + * @member {string} name + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.name = ""; + + /** + * Creates a new SetAddonsConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {google.container.v1.ISetAddonsConfigRequest=} [properties] Properties to set + * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest instance + */ + SetAddonsConfigRequest.create = function create(properties) { + return new SetAddonsConfigRequest(properties); + }; + + /** + * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {google.container.v1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetAddonsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) + $root.google.container.v1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {google.container.v1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetAddonsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetAddonsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetAddonsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.addonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetAddonsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetAddonsConfigRequest message. + * @function verify + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetAddonsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { + var error = $root.google.container.v1.AddonsConfig.verify(message.addonsConfig); + if (error) + return "addonsConfig." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest + */ + SetAddonsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetAddonsConfigRequest) + return object; + var message = new $root.google.container.v1.SetAddonsConfigRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.addonsConfig != null) { + if (typeof object.addonsConfig !== "object") + throw TypeError(".google.container.v1.SetAddonsConfigRequest.addonsConfig: object expected"); + message.addonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.addonsConfig); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {google.container.v1.SetAddonsConfigRequest} message SetAddonsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetAddonsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.addonsConfig = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) + object.addonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.addonsConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetAddonsConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetAddonsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + SetAddonsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetAddonsConfigRequest + * @function getTypeUrl + * @memberof google.container.v1.SetAddonsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetAddonsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetAddonsConfigRequest"; + }; + + return SetAddonsConfigRequest; + })(); + + v1.SetLocationsRequest = (function() { + + /** + * Properties of a SetLocationsRequest. + * @memberof google.container.v1 + * @interface ISetLocationsRequest + * @property {string|null} [projectId] SetLocationsRequest projectId + * @property {string|null} [zone] SetLocationsRequest zone + * @property {string|null} [clusterId] SetLocationsRequest clusterId + * @property {Array.|null} [locations] SetLocationsRequest locations + * @property {string|null} [name] SetLocationsRequest name + */ + + /** + * Constructs a new SetLocationsRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetLocationsRequest. + * @implements ISetLocationsRequest + * @constructor + * @param {google.container.v1.ISetLocationsRequest=} [properties] Properties to set + */ + function SetLocationsRequest(properties) { + this.locations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLocationsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.projectId = ""; + + /** + * SetLocationsRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.zone = ""; + + /** + * SetLocationsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.clusterId = ""; + + /** + * SetLocationsRequest locations. + * @member {Array.} locations + * @memberof google.container.v1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.locations = $util.emptyArray; + + /** + * SetLocationsRequest name. + * @member {string} name + * @memberof google.container.v1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.name = ""; + + /** + * Creates a new SetLocationsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {google.container.v1.ISetLocationsRequest=} [properties] Properties to set + * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest instance + */ + SetLocationsRequest.create = function create(properties) { + return new SetLocationsRequest(properties); + }; + + /** + * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {google.container.v1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locations[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {google.container.v1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLocationsRequest message. + * @function verify + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest + */ + SetLocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetLocationsRequest) + return object; + var message = new $root.google.container.v1.SetLocationsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1.SetLocationsRequest.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {google.container.v1.SetLocationsRequest} message SetLocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLocationsRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetLocationsRequest + * @instance + * @returns {Object.} JSON object + */ + SetLocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLocationsRequest + * @function getTypeUrl + * @memberof google.container.v1.SetLocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetLocationsRequest"; + }; + + return SetLocationsRequest; + })(); + + v1.UpdateMasterRequest = (function() { + + /** + * Properties of an UpdateMasterRequest. + * @memberof google.container.v1 + * @interface IUpdateMasterRequest + * @property {string|null} [projectId] UpdateMasterRequest projectId + * @property {string|null} [zone] UpdateMasterRequest zone + * @property {string|null} [clusterId] UpdateMasterRequest clusterId + * @property {string|null} [masterVersion] UpdateMasterRequest masterVersion + * @property {string|null} [name] UpdateMasterRequest name + */ + + /** + * Constructs a new UpdateMasterRequest. + * @memberof google.container.v1 + * @classdesc Represents an UpdateMasterRequest. + * @implements IUpdateMasterRequest + * @constructor + * @param {google.container.v1.IUpdateMasterRequest=} [properties] Properties to set + */ + function UpdateMasterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMasterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.projectId = ""; + + /** + * UpdateMasterRequest zone. + * @member {string} zone + * @memberof google.container.v1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.zone = ""; + + /** + * UpdateMasterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.clusterId = ""; + + /** + * UpdateMasterRequest masterVersion. + * @member {string} masterVersion + * @memberof google.container.v1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.masterVersion = ""; + + /** + * UpdateMasterRequest name. + * @member {string} name + * @memberof google.container.v1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.name = ""; + + /** + * Creates a new UpdateMasterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {google.container.v1.IUpdateMasterRequest=} [properties] Properties to set + * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest instance + */ + UpdateMasterRequest.create = function create(properties) { + return new UpdateMasterRequest(properties); + }; + + /** + * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {google.container.v1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMasterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.masterVersion != null && Object.hasOwnProperty.call(message, "masterVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {google.container.v1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMasterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateMasterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.masterVersion = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMasterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMasterRequest message. + * @function verify + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMasterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) + if (!$util.isString(message.masterVersion)) + return "masterVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest + */ + UpdateMasterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpdateMasterRequest) + return object; + var message = new $root.google.container.v1.UpdateMasterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.masterVersion != null) + message.masterVersion = String(object.masterVersion); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {google.container.v1.UpdateMasterRequest} message UpdateMasterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMasterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.masterVersion = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) + object.masterVersion = message.masterVersion; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UpdateMasterRequest to JSON. + * @function toJSON + * @memberof google.container.v1.UpdateMasterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMasterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMasterRequest + * @function getTypeUrl + * @memberof google.container.v1.UpdateMasterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMasterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpdateMasterRequest"; + }; + + return UpdateMasterRequest; + })(); + + v1.SetMasterAuthRequest = (function() { + + /** + * Properties of a SetMasterAuthRequest. + * @memberof google.container.v1 + * @interface ISetMasterAuthRequest + * @property {string|null} [projectId] SetMasterAuthRequest projectId + * @property {string|null} [zone] SetMasterAuthRequest zone + * @property {string|null} [clusterId] SetMasterAuthRequest clusterId + * @property {google.container.v1.SetMasterAuthRequest.Action|null} [action] SetMasterAuthRequest action + * @property {google.container.v1.IMasterAuth|null} [update] SetMasterAuthRequest update + * @property {string|null} [name] SetMasterAuthRequest name + */ + + /** + * Constructs a new SetMasterAuthRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetMasterAuthRequest. + * @implements ISetMasterAuthRequest + * @constructor + * @param {google.container.v1.ISetMasterAuthRequest=} [properties] Properties to set + */ + function SetMasterAuthRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMasterAuthRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.projectId = ""; + + /** + * SetMasterAuthRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.zone = ""; + + /** + * SetMasterAuthRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.clusterId = ""; + + /** + * SetMasterAuthRequest action. + * @member {google.container.v1.SetMasterAuthRequest.Action} action + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.action = 0; + + /** + * SetMasterAuthRequest update. + * @member {google.container.v1.IMasterAuth|null|undefined} update + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.update = null; + + /** + * SetMasterAuthRequest name. + * @member {string} name + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.name = ""; + + /** + * Creates a new SetMasterAuthRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {google.container.v1.ISetMasterAuthRequest=} [properties] Properties to set + * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest instance + */ + SetMasterAuthRequest.create = function create(properties) { + return new SetMasterAuthRequest(properties); + }; + + /** + * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {google.container.v1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMasterAuthRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.container.v1.MasterAuth.encode(message.update, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {google.container.v1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMasterAuthRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMasterAuthRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMasterAuthRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.action = reader.int32(); + break; + } + case 5: { + message.update = $root.google.container.v1.MasterAuth.decode(reader, reader.uint32()); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMasterAuthRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMasterAuthRequest message. + * @function verify + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMasterAuthRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.update != null && message.hasOwnProperty("update")) { + var error = $root.google.container.v1.MasterAuth.verify(message.update); + if (error) + return "update." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest + */ + SetMasterAuthRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetMasterAuthRequest) + return object; + var message = new $root.google.container.v1.SetMasterAuthRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "UNKNOWN": + case 0: + message.action = 0; + break; + case "SET_PASSWORD": + case 1: + message.action = 1; + break; + case "GENERATE_PASSWORD": + case 2: + message.action = 2; + break; + case "SET_USERNAME": + case 3: + message.action = 3; + break; + } + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.container.v1.SetMasterAuthRequest.update: object expected"); + message.update = $root.google.container.v1.MasterAuth.fromObject(object.update); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {google.container.v1.SetMasterAuthRequest} message SetMasterAuthRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMasterAuthRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.action = options.enums === String ? "UNKNOWN" : 0; + object.update = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.container.v1.SetMasterAuthRequest.Action[message.action] === undefined ? message.action : $root.google.container.v1.SetMasterAuthRequest.Action[message.action] : message.action; + if (message.update != null && message.hasOwnProperty("update")) + object.update = $root.google.container.v1.MasterAuth.toObject(message.update, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMasterAuthRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetMasterAuthRequest + * @instance + * @returns {Object.} JSON object + */ + SetMasterAuthRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMasterAuthRequest + * @function getTypeUrl + * @memberof google.container.v1.SetMasterAuthRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMasterAuthRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetMasterAuthRequest"; + }; + + /** + * Action enum. + * @name google.container.v1.SetMasterAuthRequest.Action + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} SET_PASSWORD=1 SET_PASSWORD value + * @property {number} GENERATE_PASSWORD=2 GENERATE_PASSWORD value + * @property {number} SET_USERNAME=3 SET_USERNAME value + */ + SetMasterAuthRequest.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "SET_PASSWORD"] = 1; + values[valuesById[2] = "GENERATE_PASSWORD"] = 2; + values[valuesById[3] = "SET_USERNAME"] = 3; + return values; + })(); + + return SetMasterAuthRequest; + })(); + + v1.DeleteClusterRequest = (function() { + + /** + * Properties of a DeleteClusterRequest. + * @memberof google.container.v1 + * @interface IDeleteClusterRequest + * @property {string|null} [projectId] DeleteClusterRequest projectId + * @property {string|null} [zone] DeleteClusterRequest zone + * @property {string|null} [clusterId] DeleteClusterRequest clusterId + * @property {string|null} [name] DeleteClusterRequest name + */ + + /** + * Constructs a new DeleteClusterRequest. + * @memberof google.container.v1 + * @classdesc Represents a DeleteClusterRequest. + * @implements IDeleteClusterRequest + * @constructor + * @param {google.container.v1.IDeleteClusterRequest=} [properties] Properties to set + */ + function DeleteClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.projectId = ""; + + /** + * DeleteClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.zone = ""; + + /** + * DeleteClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.clusterId = ""; + + /** + * DeleteClusterRequest name. + * @member {string} name + * @memberof google.container.v1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.name = ""; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {google.container.v1.IDeleteClusterRequest=} [properties] Properties to set + * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest instance + */ + DeleteClusterRequest.create = function create(properties) { + return new DeleteClusterRequest(properties); + }; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {google.container.v1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {google.container.v1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DeleteClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteClusterRequest message. + * @function verify + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest + */ + DeleteClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DeleteClusterRequest) + return object; + var message = new $root.google.container.v1.DeleteClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {google.container.v1.DeleteClusterRequest} message DeleteClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1.DeleteClusterRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteClusterRequest + * @function getTypeUrl + * @memberof google.container.v1.DeleteClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DeleteClusterRequest"; + }; + + return DeleteClusterRequest; + })(); + + v1.ListClustersRequest = (function() { + + /** + * Properties of a ListClustersRequest. + * @memberof google.container.v1 + * @interface IListClustersRequest + * @property {string|null} [projectId] ListClustersRequest projectId + * @property {string|null} [zone] ListClustersRequest zone + * @property {string|null} [parent] ListClustersRequest parent + */ + + /** + * Constructs a new ListClustersRequest. + * @memberof google.container.v1 + * @classdesc Represents a ListClustersRequest. + * @implements IListClustersRequest + * @constructor + * @param {google.container.v1.IListClustersRequest=} [properties] Properties to set + */ + function ListClustersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.projectId = ""; + + /** + * ListClustersRequest zone. + * @member {string} zone + * @memberof google.container.v1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.zone = ""; + + /** + * ListClustersRequest parent. + * @member {string} parent + * @memberof google.container.v1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.parent = ""; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {google.container.v1.IListClustersRequest=} [properties] Properties to set + * @returns {google.container.v1.ListClustersRequest} ListClustersRequest instance + */ + ListClustersRequest.create = function create(properties) { + return new ListClustersRequest(properties); + }; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {google.container.v1.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {google.container.v1.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListClustersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersRequest message. + * @function verify + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListClustersRequest} ListClustersRequest + */ + ListClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListClustersRequest) + return object; + var message = new $root.google.container.v1.ListClustersRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {google.container.v1.ListClustersRequest} message ListClustersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListClustersRequest to JSON. + * @function toJSON + * @memberof google.container.v1.ListClustersRequest + * @instance + * @returns {Object.} JSON object + */ + ListClustersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersRequest + * @function getTypeUrl + * @memberof google.container.v1.ListClustersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListClustersRequest"; + }; + + return ListClustersRequest; + })(); + + v1.ListClustersResponse = (function() { + + /** + * Properties of a ListClustersResponse. + * @memberof google.container.v1 + * @interface IListClustersResponse + * @property {Array.|null} [clusters] ListClustersResponse clusters + * @property {Array.|null} [missingZones] ListClustersResponse missingZones + */ + + /** + * Constructs a new ListClustersResponse. + * @memberof google.container.v1 + * @classdesc Represents a ListClustersResponse. + * @implements IListClustersResponse + * @constructor + * @param {google.container.v1.IListClustersResponse=} [properties] Properties to set + */ + function ListClustersResponse(properties) { + this.clusters = []; + this.missingZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersResponse clusters. + * @member {Array.} clusters + * @memberof google.container.v1.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.clusters = $util.emptyArray; + + /** + * ListClustersResponse missingZones. + * @member {Array.} missingZones + * @memberof google.container.v1.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.missingZones = $util.emptyArray; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {google.container.v1.IListClustersResponse=} [properties] Properties to set + * @returns {google.container.v1.ListClustersResponse} ListClustersResponse instance + */ + ListClustersResponse.create = function create(properties) { + return new ListClustersResponse(properties); + }; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {google.container.v1.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusters != null && message.clusters.length) + for (var i = 0; i < message.clusters.length; ++i) + $root.google.container.v1.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.missingZones != null && message.missingZones.length) + for (var i = 0; i < message.missingZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); + return writer; + }; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {google.container.v1.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListClustersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.clusters && message.clusters.length)) + message.clusters = []; + message.clusters.push($root.google.container.v1.Cluster.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.missingZones && message.missingZones.length)) + message.missingZones = []; + message.missingZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersResponse message. + * @function verify + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusters != null && message.hasOwnProperty("clusters")) { + if (!Array.isArray(message.clusters)) + return "clusters: array expected"; + for (var i = 0; i < message.clusters.length; ++i) { + var error = $root.google.container.v1.Cluster.verify(message.clusters[i]); + if (error) + return "clusters." + error; + } + } + if (message.missingZones != null && message.hasOwnProperty("missingZones")) { + if (!Array.isArray(message.missingZones)) + return "missingZones: array expected"; + for (var i = 0; i < message.missingZones.length; ++i) + if (!$util.isString(message.missingZones[i])) + return "missingZones: string[] expected"; + } + return null; + }; + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListClustersResponse} ListClustersResponse + */ + ListClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListClustersResponse) + return object; + var message = new $root.google.container.v1.ListClustersResponse(); + if (object.clusters) { + if (!Array.isArray(object.clusters)) + throw TypeError(".google.container.v1.ListClustersResponse.clusters: array expected"); + message.clusters = []; + for (var i = 0; i < object.clusters.length; ++i) { + if (typeof object.clusters[i] !== "object") + throw TypeError(".google.container.v1.ListClustersResponse.clusters: object expected"); + message.clusters[i] = $root.google.container.v1.Cluster.fromObject(object.clusters[i]); + } + } + if (object.missingZones) { + if (!Array.isArray(object.missingZones)) + throw TypeError(".google.container.v1.ListClustersResponse.missingZones: array expected"); + message.missingZones = []; + for (var i = 0; i < object.missingZones.length; ++i) + message.missingZones[i] = String(object.missingZones[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {google.container.v1.ListClustersResponse} message ListClustersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.clusters = []; + object.missingZones = []; + } + if (message.clusters && message.clusters.length) { + object.clusters = []; + for (var j = 0; j < message.clusters.length; ++j) + object.clusters[j] = $root.google.container.v1.Cluster.toObject(message.clusters[j], options); + } + if (message.missingZones && message.missingZones.length) { + object.missingZones = []; + for (var j = 0; j < message.missingZones.length; ++j) + object.missingZones[j] = message.missingZones[j]; + } + return object; + }; + + /** + * Converts this ListClustersResponse to JSON. + * @function toJSON + * @memberof google.container.v1.ListClustersResponse + * @instance + * @returns {Object.} JSON object + */ + ListClustersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersResponse + * @function getTypeUrl + * @memberof google.container.v1.ListClustersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListClustersResponse"; + }; + + return ListClustersResponse; + })(); + + v1.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.container.v1 + * @interface IGetOperationRequest + * @property {string|null} [projectId] GetOperationRequest projectId + * @property {string|null} [zone] GetOperationRequest zone + * @property {string|null} [operationId] GetOperationRequest operationId + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.container.v1.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.projectId = ""; + + /** + * GetOperationRequest zone. + * @member {string} zone + * @memberof google.container.v1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.zone = ""; + + /** + * GetOperationRequest operationId. + * @member {string} operationId + * @memberof google.container.v1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.operationId = ""; + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.container.v1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {google.container.v1.IGetOperationRequest=} [properties] Properties to set + * @returns {google.container.v1.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {google.container.v1.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {google.container.v1.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationId = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationId != null && message.hasOwnProperty("operationId")) + if (!$util.isString(message.operationId)) + return "operationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetOperationRequest) + return object; + var message = new $root.google.container.v1.GetOperationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.operationId != null) + message.operationId = String(object.operationId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {google.container.v1.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.operationId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationId != null && message.hasOwnProperty("operationId")) + object.operationId = message.operationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.container.v1.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + v1.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.container.v1 + * @interface IListOperationsRequest + * @property {string|null} [projectId] ListOperationsRequest projectId + * @property {string|null} [zone] ListOperationsRequest zone + * @property {string|null} [parent] ListOperationsRequest parent + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.container.v1 + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.container.v1.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.projectId = ""; + + /** + * ListOperationsRequest zone. + * @member {string} zone + * @memberof google.container.v1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.zone = ""; + + /** + * ListOperationsRequest parent. + * @member {string} parent + * @memberof google.container.v1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.parent = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {google.container.v1.IListOperationsRequest=} [properties] Properties to set + * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {google.container.v1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {google.container.v1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListOperationsRequest) + return object; + var message = new $root.google.container.v1.ListOperationsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {google.container.v1.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.container.v1.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.container.v1.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + v1.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.container.v1 + * @interface ICancelOperationRequest + * @property {string|null} [projectId] CancelOperationRequest projectId + * @property {string|null} [zone] CancelOperationRequest zone + * @property {string|null} [operationId] CancelOperationRequest operationId + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.container.v1 + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.container.v1.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.projectId = ""; + + /** + * CancelOperationRequest zone. + * @member {string} zone + * @memberof google.container.v1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.zone = ""; + + /** + * CancelOperationRequest operationId. + * @member {string} operationId + * @memberof google.container.v1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.operationId = ""; + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.container.v1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {google.container.v1.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {google.container.v1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {google.container.v1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationId = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationId != null && message.hasOwnProperty("operationId")) + if (!$util.isString(message.operationId)) + return "operationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CancelOperationRequest) + return object; + var message = new $root.google.container.v1.CancelOperationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.operationId != null) + message.operationId = String(object.operationId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {google.container.v1.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.operationId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationId != null && message.hasOwnProperty("operationId")) + object.operationId = message.operationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.container.v1.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + v1.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.container.v1 + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {Array.|null} [missingZones] ListOperationsResponse missingZones + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.container.v1 + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.container.v1.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + this.missingZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.container.v1.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse missingZones. + * @member {Array.} missingZones + * @memberof google.container.v1.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.missingZones = $util.emptyArray; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {google.container.v1.IListOperationsResponse=} [properties] Properties to set + * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {google.container.v1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.container.v1.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.missingZones != null && message.missingZones.length) + for (var i = 0; i < message.missingZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {google.container.v1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.container.v1.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.missingZones && message.missingZones.length)) + message.missingZones = []; + message.missingZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.container.v1.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.missingZones != null && message.hasOwnProperty("missingZones")) { + if (!Array.isArray(message.missingZones)) + return "missingZones: array expected"; + for (var i = 0; i < message.missingZones.length; ++i) + if (!$util.isString(message.missingZones[i])) + return "missingZones: string[] expected"; + } + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListOperationsResponse) + return object; + var message = new $root.google.container.v1.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.container.v1.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.container.v1.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.container.v1.Operation.fromObject(object.operations[i]); + } + } + if (object.missingZones) { + if (!Array.isArray(object.missingZones)) + throw TypeError(".google.container.v1.ListOperationsResponse.missingZones: array expected"); + message.missingZones = []; + for (var i = 0; i < object.missingZones.length; ++i) + message.missingZones[i] = String(object.missingZones[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {google.container.v1.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.operations = []; + object.missingZones = []; + } + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.container.v1.Operation.toObject(message.operations[j], options); + } + if (message.missingZones && message.missingZones.length) { + object.missingZones = []; + for (var j = 0; j < message.missingZones.length; ++j) + object.missingZones[j] = message.missingZones[j]; + } + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.container.v1.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.container.v1.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + v1.GetServerConfigRequest = (function() { + + /** + * Properties of a GetServerConfigRequest. + * @memberof google.container.v1 + * @interface IGetServerConfigRequest + * @property {string|null} [projectId] GetServerConfigRequest projectId + * @property {string|null} [zone] GetServerConfigRequest zone + * @property {string|null} [name] GetServerConfigRequest name + */ + + /** + * Constructs a new GetServerConfigRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetServerConfigRequest. + * @implements IGetServerConfigRequest + * @constructor + * @param {google.container.v1.IGetServerConfigRequest=} [properties] Properties to set + */ + function GetServerConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServerConfigRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.projectId = ""; + + /** + * GetServerConfigRequest zone. + * @member {string} zone + * @memberof google.container.v1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.zone = ""; + + /** + * GetServerConfigRequest name. + * @member {string} name + * @memberof google.container.v1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.name = ""; + + /** + * Creates a new GetServerConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {google.container.v1.IGetServerConfigRequest=} [properties] Properties to set + * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest instance + */ + GetServerConfigRequest.create = function create(properties) { + return new GetServerConfigRequest(properties); + }; + + /** + * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {google.container.v1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {google.container.v1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetServerConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServerConfigRequest message. + * @function verify + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServerConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest + */ + GetServerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetServerConfigRequest) + return object; + var message = new $root.google.container.v1.GetServerConfigRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {google.container.v1.GetServerConfigRequest} message GetServerConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServerConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetServerConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetServerConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetServerConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetServerConfigRequest + * @function getTypeUrl + * @memberof google.container.v1.GetServerConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetServerConfigRequest"; + }; + + return GetServerConfigRequest; + })(); + + v1.ServerConfig = (function() { + + /** + * Properties of a ServerConfig. + * @memberof google.container.v1 + * @interface IServerConfig + * @property {string|null} [defaultClusterVersion] ServerConfig defaultClusterVersion + * @property {Array.|null} [validNodeVersions] ServerConfig validNodeVersions + * @property {string|null} [defaultImageType] ServerConfig defaultImageType + * @property {Array.|null} [validImageTypes] ServerConfig validImageTypes + * @property {Array.|null} [validMasterVersions] ServerConfig validMasterVersions + * @property {Array.|null} [channels] ServerConfig channels + */ + + /** + * Constructs a new ServerConfig. + * @memberof google.container.v1 + * @classdesc Represents a ServerConfig. + * @implements IServerConfig + * @constructor + * @param {google.container.v1.IServerConfig=} [properties] Properties to set + */ + function ServerConfig(properties) { + this.validNodeVersions = []; + this.validImageTypes = []; + this.validMasterVersions = []; + this.channels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerConfig defaultClusterVersion. + * @member {string} defaultClusterVersion + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.defaultClusterVersion = ""; + + /** + * ServerConfig validNodeVersions. + * @member {Array.} validNodeVersions + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.validNodeVersions = $util.emptyArray; + + /** + * ServerConfig defaultImageType. + * @member {string} defaultImageType + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.defaultImageType = ""; + + /** + * ServerConfig validImageTypes. + * @member {Array.} validImageTypes + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.validImageTypes = $util.emptyArray; + + /** + * ServerConfig validMasterVersions. + * @member {Array.} validMasterVersions + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.validMasterVersions = $util.emptyArray; + + /** + * ServerConfig channels. + * @member {Array.} channels + * @memberof google.container.v1.ServerConfig + * @instance + */ + ServerConfig.prototype.channels = $util.emptyArray; + + /** + * Creates a new ServerConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ServerConfig + * @static + * @param {google.container.v1.IServerConfig=} [properties] Properties to set + * @returns {google.container.v1.ServerConfig} ServerConfig instance + */ + ServerConfig.create = function create(properties) { + return new ServerConfig(properties); + }; + + /** + * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ServerConfig + * @static + * @param {google.container.v1.IServerConfig} message ServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultClusterVersion != null && Object.hasOwnProperty.call(message, "defaultClusterVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultClusterVersion); + if (message.validNodeVersions != null && message.validNodeVersions.length) + for (var i = 0; i < message.validNodeVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validNodeVersions[i]); + if (message.defaultImageType != null && Object.hasOwnProperty.call(message, "defaultImageType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultImageType); + if (message.validImageTypes != null && message.validImageTypes.length) + for (var i = 0; i < message.validImageTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validImageTypes[i]); + if (message.validMasterVersions != null && message.validMasterVersions.length) + for (var i = 0; i < message.validMasterVersions.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.validMasterVersions[i]); + if (message.channels != null && message.channels.length) + for (var i = 0; i < message.channels.length; ++i) + $root.google.container.v1.ServerConfig.ReleaseChannelConfig.encode(message.channels[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ServerConfig + * @static + * @param {google.container.v1.IServerConfig} message ServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ServerConfig} ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.defaultClusterVersion = reader.string(); + break; + } + case 3: { + if (!(message.validNodeVersions && message.validNodeVersions.length)) + message.validNodeVersions = []; + message.validNodeVersions.push(reader.string()); + break; + } + case 4: { + message.defaultImageType = reader.string(); + break; + } + case 5: { + if (!(message.validImageTypes && message.validImageTypes.length)) + message.validImageTypes = []; + message.validImageTypes.push(reader.string()); + break; + } + case 6: { + if (!(message.validMasterVersions && message.validMasterVersions.length)) + message.validMasterVersions = []; + message.validMasterVersions.push(reader.string()); + break; + } + case 9: { + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.google.container.v1.ServerConfig.ReleaseChannelConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ServerConfig} ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerConfig message. + * @function verify + * @memberof google.container.v1.ServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) + if (!$util.isString(message.defaultClusterVersion)) + return "defaultClusterVersion: string expected"; + if (message.validNodeVersions != null && message.hasOwnProperty("validNodeVersions")) { + if (!Array.isArray(message.validNodeVersions)) + return "validNodeVersions: array expected"; + for (var i = 0; i < message.validNodeVersions.length; ++i) + if (!$util.isString(message.validNodeVersions[i])) + return "validNodeVersions: string[] expected"; + } + if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) + if (!$util.isString(message.defaultImageType)) + return "defaultImageType: string expected"; + if (message.validImageTypes != null && message.hasOwnProperty("validImageTypes")) { + if (!Array.isArray(message.validImageTypes)) + return "validImageTypes: array expected"; + for (var i = 0; i < message.validImageTypes.length; ++i) + if (!$util.isString(message.validImageTypes[i])) + return "validImageTypes: string[] expected"; + } + if (message.validMasterVersions != null && message.hasOwnProperty("validMasterVersions")) { + if (!Array.isArray(message.validMasterVersions)) + return "validMasterVersions: array expected"; + for (var i = 0; i < message.validMasterVersions.length; ++i) + if (!$util.isString(message.validMasterVersions[i])) + return "validMasterVersions: string[] expected"; + } + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (var i = 0; i < message.channels.length; ++i) { + var error = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + return null; + }; + + /** + * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ServerConfig} ServerConfig + */ + ServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ServerConfig) + return object; + var message = new $root.google.container.v1.ServerConfig(); + if (object.defaultClusterVersion != null) + message.defaultClusterVersion = String(object.defaultClusterVersion); + if (object.validNodeVersions) { + if (!Array.isArray(object.validNodeVersions)) + throw TypeError(".google.container.v1.ServerConfig.validNodeVersions: array expected"); + message.validNodeVersions = []; + for (var i = 0; i < object.validNodeVersions.length; ++i) + message.validNodeVersions[i] = String(object.validNodeVersions[i]); + } + if (object.defaultImageType != null) + message.defaultImageType = String(object.defaultImageType); + if (object.validImageTypes) { + if (!Array.isArray(object.validImageTypes)) + throw TypeError(".google.container.v1.ServerConfig.validImageTypes: array expected"); + message.validImageTypes = []; + for (var i = 0; i < object.validImageTypes.length; ++i) + message.validImageTypes[i] = String(object.validImageTypes[i]); + } + if (object.validMasterVersions) { + if (!Array.isArray(object.validMasterVersions)) + throw TypeError(".google.container.v1.ServerConfig.validMasterVersions: array expected"); + message.validMasterVersions = []; + for (var i = 0; i < object.validMasterVersions.length; ++i) + message.validMasterVersions[i] = String(object.validMasterVersions[i]); + } + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".google.container.v1.ServerConfig.channels: array expected"); + message.channels = []; + for (var i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".google.container.v1.ServerConfig.channels: object expected"); + message.channels[i] = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.fromObject(object.channels[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ServerConfig + * @static + * @param {google.container.v1.ServerConfig} message ServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validNodeVersions = []; + object.validImageTypes = []; + object.validMasterVersions = []; + object.channels = []; + } + if (options.defaults) { + object.defaultClusterVersion = ""; + object.defaultImageType = ""; + } + if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) + object.defaultClusterVersion = message.defaultClusterVersion; + if (message.validNodeVersions && message.validNodeVersions.length) { + object.validNodeVersions = []; + for (var j = 0; j < message.validNodeVersions.length; ++j) + object.validNodeVersions[j] = message.validNodeVersions[j]; + } + if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) + object.defaultImageType = message.defaultImageType; + if (message.validImageTypes && message.validImageTypes.length) { + object.validImageTypes = []; + for (var j = 0; j < message.validImageTypes.length; ++j) + object.validImageTypes[j] = message.validImageTypes[j]; + } + if (message.validMasterVersions && message.validMasterVersions.length) { + object.validMasterVersions = []; + for (var j = 0; j < message.validMasterVersions.length; ++j) + object.validMasterVersions[j] = message.validMasterVersions[j]; + } + if (message.channels && message.channels.length) { + object.channels = []; + for (var j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.toObject(message.channels[j], options); + } + return object; + }; + + /** + * Converts this ServerConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ServerConfig + * @instance + * @returns {Object.} JSON object + */ + ServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerConfig + * @function getTypeUrl + * @memberof google.container.v1.ServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ServerConfig"; + }; + + ServerConfig.ReleaseChannelConfig = (function() { + + /** + * Properties of a ReleaseChannelConfig. + * @memberof google.container.v1.ServerConfig + * @interface IReleaseChannelConfig + * @property {google.container.v1.ReleaseChannel.Channel|null} [channel] ReleaseChannelConfig channel + * @property {string|null} [defaultVersion] ReleaseChannelConfig defaultVersion + * @property {Array.|null} [validVersions] ReleaseChannelConfig validVersions + * @property {string|null} [upgradeTargetVersion] ReleaseChannelConfig upgradeTargetVersion + */ + + /** + * Constructs a new ReleaseChannelConfig. + * @memberof google.container.v1.ServerConfig + * @classdesc Represents a ReleaseChannelConfig. + * @implements IReleaseChannelConfig + * @constructor + * @param {google.container.v1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set + */ + function ReleaseChannelConfig(properties) { + this.validVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseChannelConfig channel. + * @member {google.container.v1.ReleaseChannel.Channel} channel + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.channel = 0; + + /** + * ReleaseChannelConfig defaultVersion. + * @member {string} defaultVersion + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.defaultVersion = ""; + + /** + * ReleaseChannelConfig validVersions. + * @member {Array.} validVersions + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.validVersions = $util.emptyArray; + + /** + * ReleaseChannelConfig upgradeTargetVersion. + * @member {string} upgradeTargetVersion + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.upgradeTargetVersion = ""; + + /** + * Creates a new ReleaseChannelConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set + * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig instance + */ + ReleaseChannelConfig.create = function create(properties) { + return new ReleaseChannelConfig(properties); + }; + + /** + * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannelConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + if (message.defaultVersion != null && Object.hasOwnProperty.call(message, "defaultVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultVersion); + if (message.validVersions != null && message.validVersions.length) + for (var i = 0; i < message.validVersions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.validVersions[i]); + if (message.upgradeTargetVersion != null && Object.hasOwnProperty.call(message, "upgradeTargetVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.upgradeTargetVersion); + return writer; + }; + + /** + * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannelConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServerConfig.ReleaseChannelConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + case 2: { + message.defaultVersion = reader.string(); + break; + } + case 4: { + if (!(message.validVersions && message.validVersions.length)) + message.validVersions = []; + message.validVersions.push(reader.string()); + break; + } + case 5: { + message.upgradeTargetVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannelConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseChannelConfig message. + * @function verify + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseChannelConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) + if (!$util.isString(message.defaultVersion)) + return "defaultVersion: 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) + if (!$util.isString(message.validVersions[i])) + return "validVersions: string[] expected"; + } + if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) + if (!$util.isString(message.upgradeTargetVersion)) + return "upgradeTargetVersion: string expected"; + return null; + }; + + /** + * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + */ + ReleaseChannelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ServerConfig.ReleaseChannelConfig) + return object; + var message = new $root.google.container.v1.ServerConfig.ReleaseChannelConfig(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "RAPID": + case 1: + message.channel = 1; + break; + case "REGULAR": + case 2: + message.channel = 2; + break; + case "STABLE": + case 3: + message.channel = 3; + break; + case "EXTENDED": + case 4: + message.channel = 4; + break; + } + if (object.defaultVersion != null) + message.defaultVersion = String(object.defaultVersion); + if (object.validVersions) { + if (!Array.isArray(object.validVersions)) + throw TypeError(".google.container.v1.ServerConfig.ReleaseChannelConfig.validVersions: array expected"); + message.validVersions = []; + for (var i = 0; i < object.validVersions.length; ++i) + message.validVersions[i] = String(object.validVersions[i]); + } + if (object.upgradeTargetVersion != null) + message.upgradeTargetVersion = String(object.upgradeTargetVersion); + return message; + }; + + /** + * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1.ServerConfig.ReleaseChannelConfig} message ReleaseChannelConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseChannelConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validVersions = []; + if (options.defaults) { + object.channel = options.enums === String ? "UNSPECIFIED" : 0; + object.defaultVersion = ""; + object.upgradeTargetVersion = ""; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.ReleaseChannel.Channel[message.channel] : message.channel; + if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) + object.defaultVersion = message.defaultVersion; + if (message.validVersions && message.validVersions.length) { + object.validVersions = []; + for (var j = 0; j < message.validVersions.length; ++j) + object.validVersions[j] = message.validVersions[j]; + } + if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) + object.upgradeTargetVersion = message.upgradeTargetVersion; + return object; + }; + + /** + * Converts this ReleaseChannelConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + * @returns {Object.} JSON object + */ + ReleaseChannelConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseChannelConfig + * @function getTypeUrl + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ServerConfig.ReleaseChannelConfig"; + }; + + return ReleaseChannelConfig; + })(); + + return ServerConfig; + })(); + + v1.CreateNodePoolRequest = (function() { + + /** + * Properties of a CreateNodePoolRequest. + * @memberof google.container.v1 + * @interface ICreateNodePoolRequest + * @property {string|null} [projectId] CreateNodePoolRequest projectId + * @property {string|null} [zone] CreateNodePoolRequest zone + * @property {string|null} [clusterId] CreateNodePoolRequest clusterId + * @property {google.container.v1.INodePool|null} [nodePool] CreateNodePoolRequest nodePool + * @property {string|null} [parent] CreateNodePoolRequest parent + */ + + /** + * Constructs a new CreateNodePoolRequest. + * @memberof google.container.v1 + * @classdesc Represents a CreateNodePoolRequest. + * @implements ICreateNodePoolRequest + * @constructor + * @param {google.container.v1.ICreateNodePoolRequest=} [properties] Properties to set + */ + function CreateNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.projectId = ""; + + /** + * CreateNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.zone = ""; + + /** + * CreateNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.clusterId = ""; + + /** + * CreateNodePoolRequest nodePool. + * @member {google.container.v1.INodePool|null|undefined} nodePool + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.nodePool = null; + + /** + * CreateNodePoolRequest parent. + * @member {string} parent + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.parent = ""; + + /** + * Creates a new CreateNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {google.container.v1.ICreateNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest instance + */ + CreateNodePoolRequest.create = function create(properties) { + return new CreateNodePoolRequest(properties); + }; + + /** + * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {google.container.v1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePool != null && Object.hasOwnProperty.call(message, "nodePool")) + $root.google.container.v1.NodePool.encode(message.nodePool, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {google.container.v1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CreateNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePool = $root.google.container.v1.NodePool.decode(reader, reader.uint32()); + break; + } + case 6: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateNodePoolRequest message. + * @function verify + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePool != null && message.hasOwnProperty("nodePool")) { + var error = $root.google.container.v1.NodePool.verify(message.nodePool); + if (error) + return "nodePool." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest + */ + CreateNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CreateNodePoolRequest) + return object; + var message = new $root.google.container.v1.CreateNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePool != null) { + if (typeof object.nodePool !== "object") + throw TypeError(".google.container.v1.CreateNodePoolRequest.nodePool: object expected"); + message.nodePool = $root.google.container.v1.NodePool.fromObject(object.nodePool); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {google.container.v1.CreateNodePoolRequest} message CreateNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePool = null; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePool != null && message.hasOwnProperty("nodePool")) + object.nodePool = $root.google.container.v1.NodePool.toObject(message.nodePool, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CreateNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1.CreateNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CreateNodePoolRequest"; + }; + + return CreateNodePoolRequest; + })(); + + v1.DeleteNodePoolRequest = (function() { + + /** + * Properties of a DeleteNodePoolRequest. + * @memberof google.container.v1 + * @interface IDeleteNodePoolRequest + * @property {string|null} [projectId] DeleteNodePoolRequest projectId + * @property {string|null} [zone] DeleteNodePoolRequest zone + * @property {string|null} [clusterId] DeleteNodePoolRequest clusterId + * @property {string|null} [nodePoolId] DeleteNodePoolRequest nodePoolId + * @property {string|null} [name] DeleteNodePoolRequest name + */ + + /** + * Constructs a new DeleteNodePoolRequest. + * @memberof google.container.v1 + * @classdesc Represents a DeleteNodePoolRequest. + * @implements IDeleteNodePoolRequest + * @constructor + * @param {google.container.v1.IDeleteNodePoolRequest=} [properties] Properties to set + */ + function DeleteNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.projectId = ""; + + /** + * DeleteNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.zone = ""; + + /** + * DeleteNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.clusterId = ""; + + /** + * DeleteNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.nodePoolId = ""; + + /** + * DeleteNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.name = ""; + + /** + * Creates a new DeleteNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {google.container.v1.IDeleteNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest instance + */ + DeleteNodePoolRequest.create = function create(properties) { + return new DeleteNodePoolRequest(properties); + }; + + /** + * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {google.container.v1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {google.container.v1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DeleteNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteNodePoolRequest message. + * @function verify + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest + */ + DeleteNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DeleteNodePoolRequest) + return object; + var message = new $root.google.container.v1.DeleteNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {google.container.v1.DeleteNodePoolRequest} message DeleteNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1.DeleteNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1.DeleteNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DeleteNodePoolRequest"; + }; + + return DeleteNodePoolRequest; + })(); + + v1.ListNodePoolsRequest = (function() { + + /** + * Properties of a ListNodePoolsRequest. + * @memberof google.container.v1 + * @interface IListNodePoolsRequest + * @property {string|null} [projectId] ListNodePoolsRequest projectId + * @property {string|null} [zone] ListNodePoolsRequest zone + * @property {string|null} [clusterId] ListNodePoolsRequest clusterId + * @property {string|null} [parent] ListNodePoolsRequest parent + */ + + /** + * Constructs a new ListNodePoolsRequest. + * @memberof google.container.v1 + * @classdesc Represents a ListNodePoolsRequest. + * @implements IListNodePoolsRequest + * @constructor + * @param {google.container.v1.IListNodePoolsRequest=} [properties] Properties to set + */ + function ListNodePoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNodePoolsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.projectId = ""; + + /** + * ListNodePoolsRequest zone. + * @member {string} zone + * @memberof google.container.v1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.zone = ""; + + /** + * ListNodePoolsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.clusterId = ""; + + /** + * ListNodePoolsRequest parent. + * @member {string} parent + * @memberof google.container.v1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.parent = ""; + + /** + * Creates a new ListNodePoolsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {google.container.v1.IListNodePoolsRequest=} [properties] Properties to set + * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest instance + */ + ListNodePoolsRequest.create = function create(properties) { + return new ListNodePoolsRequest(properties); + }; + + /** + * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {google.container.v1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {google.container.v1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListNodePoolsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 5: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNodePoolsRequest message. + * @function verify + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNodePoolsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest + */ + ListNodePoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListNodePoolsRequest) + return object; + var message = new $root.google.container.v1.ListNodePoolsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {google.container.v1.ListNodePoolsRequest} message ListNodePoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNodePoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListNodePoolsRequest to JSON. + * @function toJSON + * @memberof google.container.v1.ListNodePoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListNodePoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNodePoolsRequest + * @function getTypeUrl + * @memberof google.container.v1.ListNodePoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListNodePoolsRequest"; + }; + + return ListNodePoolsRequest; + })(); + + v1.GetNodePoolRequest = (function() { + + /** + * Properties of a GetNodePoolRequest. + * @memberof google.container.v1 + * @interface IGetNodePoolRequest + * @property {string|null} [projectId] GetNodePoolRequest projectId + * @property {string|null} [zone] GetNodePoolRequest zone + * @property {string|null} [clusterId] GetNodePoolRequest clusterId + * @property {string|null} [nodePoolId] GetNodePoolRequest nodePoolId + * @property {string|null} [name] GetNodePoolRequest name + */ + + /** + * Constructs a new GetNodePoolRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetNodePoolRequest. + * @implements IGetNodePoolRequest + * @constructor + * @param {google.container.v1.IGetNodePoolRequest=} [properties] Properties to set + */ + function GetNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.projectId = ""; + + /** + * GetNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.zone = ""; + + /** + * GetNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.clusterId = ""; + + /** + * GetNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.nodePoolId = ""; + + /** + * GetNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.name = ""; + + /** + * Creates a new GetNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {google.container.v1.IGetNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest instance + */ + GetNodePoolRequest.create = function create(properties) { + return new GetNodePoolRequest(properties); + }; + + /** + * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {google.container.v1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {google.container.v1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNodePoolRequest message. + * @function verify + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest + */ + GetNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetNodePoolRequest) + return object; + var message = new $root.google.container.v1.GetNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {google.container.v1.GetNodePoolRequest} message GetNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1.GetNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetNodePoolRequest"; + }; + + return GetNodePoolRequest; + })(); + + v1.BlueGreenSettings = (function() { + + /** + * Properties of a BlueGreenSettings. + * @memberof google.container.v1 + * @interface IBlueGreenSettings + * @property {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null} [standardRolloutPolicy] BlueGreenSettings standardRolloutPolicy + * @property {google.protobuf.IDuration|null} [nodePoolSoakDuration] BlueGreenSettings nodePoolSoakDuration + */ + + /** + * Constructs a new BlueGreenSettings. + * @memberof google.container.v1 + * @classdesc Represents a BlueGreenSettings. + * @implements IBlueGreenSettings + * @constructor + * @param {google.container.v1.IBlueGreenSettings=} [properties] Properties to set + */ + function BlueGreenSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlueGreenSettings standardRolloutPolicy. + * @member {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null|undefined} standardRolloutPolicy + * @memberof google.container.v1.BlueGreenSettings + * @instance + */ + BlueGreenSettings.prototype.standardRolloutPolicy = null; + + /** + * BlueGreenSettings nodePoolSoakDuration. + * @member {google.protobuf.IDuration|null|undefined} nodePoolSoakDuration + * @memberof google.container.v1.BlueGreenSettings + * @instance + */ + BlueGreenSettings.prototype.nodePoolSoakDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BlueGreenSettings rolloutPolicy. + * @member {"standardRolloutPolicy"|undefined} rolloutPolicy + * @memberof google.container.v1.BlueGreenSettings + * @instance + */ + Object.defineProperty(BlueGreenSettings.prototype, "rolloutPolicy", { + get: $util.oneOfGetter($oneOfFields = ["standardRolloutPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BlueGreenSettings _nodePoolSoakDuration. + * @member {"nodePoolSoakDuration"|undefined} _nodePoolSoakDuration + * @memberof google.container.v1.BlueGreenSettings + * @instance + */ + Object.defineProperty(BlueGreenSettings.prototype, "_nodePoolSoakDuration", { + get: $util.oneOfGetter($oneOfFields = ["nodePoolSoakDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BlueGreenSettings instance using the specified properties. + * @function create + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {google.container.v1.IBlueGreenSettings=} [properties] Properties to set + * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings instance + */ + BlueGreenSettings.create = function create(properties) { + return new BlueGreenSettings(properties); + }; + + /** + * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. + * @function encode + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {google.container.v1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standardRolloutPolicy != null && Object.hasOwnProperty.call(message, "standardRolloutPolicy")) + $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.encode(message.standardRolloutPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodePoolSoakDuration != null && Object.hasOwnProperty.call(message, "nodePoolSoakDuration")) + $root.google.protobuf.Duration.encode(message.nodePoolSoakDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {google.container.v1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BlueGreenSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nodePoolSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlueGreenSettings message. + * @function verify + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlueGreenSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { + properties.rolloutPolicy = 1; + { + var error = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify(message.standardRolloutPolicy); + if (error) + return "standardRolloutPolicy." + error; + } + } + if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { + properties._nodePoolSoakDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.nodePoolSoakDuration); + if (error) + return "nodePoolSoakDuration." + error; + } + } + return null; + }; + + /** + * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings + */ + BlueGreenSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.BlueGreenSettings) + return object; + var message = new $root.google.container.v1.BlueGreenSettings(); + if (object.standardRolloutPolicy != null) { + if (typeof object.standardRolloutPolicy !== "object") + throw TypeError(".google.container.v1.BlueGreenSettings.standardRolloutPolicy: object expected"); + message.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.fromObject(object.standardRolloutPolicy); + } + if (object.nodePoolSoakDuration != null) { + if (typeof object.nodePoolSoakDuration !== "object") + throw TypeError(".google.container.v1.BlueGreenSettings.nodePoolSoakDuration: object expected"); + message.nodePoolSoakDuration = $root.google.protobuf.Duration.fromObject(object.nodePoolSoakDuration); + } + return message; + }; + + /** + * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {google.container.v1.BlueGreenSettings} message BlueGreenSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlueGreenSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { + object.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.toObject(message.standardRolloutPolicy, options); + if (options.oneofs) + object.rolloutPolicy = "standardRolloutPolicy"; + } + if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { + object.nodePoolSoakDuration = $root.google.protobuf.Duration.toObject(message.nodePoolSoakDuration, options); + if (options.oneofs) + object._nodePoolSoakDuration = "nodePoolSoakDuration"; + } + return object; + }; + + /** + * Converts this BlueGreenSettings to JSON. + * @function toJSON + * @memberof google.container.v1.BlueGreenSettings + * @instance + * @returns {Object.} JSON object + */ + BlueGreenSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlueGreenSettings + * @function getTypeUrl + * @memberof google.container.v1.BlueGreenSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlueGreenSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.BlueGreenSettings"; + }; + + BlueGreenSettings.StandardRolloutPolicy = (function() { + + /** + * Properties of a StandardRolloutPolicy. + * @memberof google.container.v1.BlueGreenSettings + * @interface IStandardRolloutPolicy + * @property {number|null} [batchPercentage] StandardRolloutPolicy batchPercentage + * @property {number|null} [batchNodeCount] StandardRolloutPolicy batchNodeCount + * @property {google.protobuf.IDuration|null} [batchSoakDuration] StandardRolloutPolicy batchSoakDuration + */ + + /** + * Constructs a new StandardRolloutPolicy. + * @memberof google.container.v1.BlueGreenSettings + * @classdesc Represents a StandardRolloutPolicy. + * @implements IStandardRolloutPolicy + * @constructor + * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set + */ + function StandardRolloutPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardRolloutPolicy batchPercentage. + * @member {number|null|undefined} batchPercentage + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchPercentage = null; + + /** + * StandardRolloutPolicy batchNodeCount. + * @member {number|null|undefined} batchNodeCount + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchNodeCount = null; + + /** + * StandardRolloutPolicy batchSoakDuration. + * @member {google.protobuf.IDuration|null|undefined} batchSoakDuration + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchSoakDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StandardRolloutPolicy updateBatchSize. + * @member {"batchPercentage"|"batchNodeCount"|undefined} updateBatchSize + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + Object.defineProperty(StandardRolloutPolicy.prototype, "updateBatchSize", { + get: $util.oneOfGetter($oneOfFields = ["batchPercentage", "batchNodeCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * StandardRolloutPolicy _batchSoakDuration. + * @member {"batchSoakDuration"|undefined} _batchSoakDuration + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + Object.defineProperty(StandardRolloutPolicy.prototype, "_batchSoakDuration", { + get: $util.oneOfGetter($oneOfFields = ["batchSoakDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StandardRolloutPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set + * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy instance + */ + StandardRolloutPolicy.create = function create(properties) { + return new StandardRolloutPolicy(properties); + }; + + /** + * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardRolloutPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batchPercentage != null && Object.hasOwnProperty.call(message, "batchPercentage")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.batchPercentage); + if (message.batchNodeCount != null && Object.hasOwnProperty.call(message, "batchNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchNodeCount); + if (message.batchSoakDuration != null && Object.hasOwnProperty.call(message, "batchSoakDuration")) + $root.google.protobuf.Duration.encode(message.batchSoakDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardRolloutPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.batchPercentage = reader.float(); + break; + } + case 2: { + message.batchNodeCount = reader.int32(); + break; + } + case 3: { + message.batchSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardRolloutPolicy message. + * @function verify + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardRolloutPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { + properties.updateBatchSize = 1; + if (typeof message.batchPercentage !== "number") + return "batchPercentage: number expected"; + } + if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { + if (properties.updateBatchSize === 1) + return "updateBatchSize: multiple values"; + properties.updateBatchSize = 1; + if (!$util.isInteger(message.batchNodeCount)) + return "batchNodeCount: integer expected"; + } + if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { + properties._batchSoakDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.batchSoakDuration); + if (error) + return "batchSoakDuration." + error; + } + } + return null; + }; + + /** + * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + */ + StandardRolloutPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy) + return object; + var message = new $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy(); + if (object.batchPercentage != null) + message.batchPercentage = Number(object.batchPercentage); + if (object.batchNodeCount != null) + message.batchNodeCount = object.batchNodeCount | 0; + if (object.batchSoakDuration != null) { + if (typeof object.batchSoakDuration !== "object") + throw TypeError(".google.container.v1.BlueGreenSettings.StandardRolloutPolicy.batchSoakDuration: object expected"); + message.batchSoakDuration = $root.google.protobuf.Duration.fromObject(object.batchSoakDuration); + } + return message; + }; + + /** + * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} message StandardRolloutPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardRolloutPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { + object.batchPercentage = options.json && !isFinite(message.batchPercentage) ? String(message.batchPercentage) : message.batchPercentage; + if (options.oneofs) + object.updateBatchSize = "batchPercentage"; + } + if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { + object.batchNodeCount = message.batchNodeCount; + if (options.oneofs) + object.updateBatchSize = "batchNodeCount"; + } + if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { + object.batchSoakDuration = $root.google.protobuf.Duration.toObject(message.batchSoakDuration, options); + if (options.oneofs) + object._batchSoakDuration = "batchSoakDuration"; + } + return object; + }; + + /** + * Converts this StandardRolloutPolicy to JSON. + * @function toJSON + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @instance + * @returns {Object.} JSON object + */ + StandardRolloutPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardRolloutPolicy + * @function getTypeUrl + * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"; + }; + + return StandardRolloutPolicy; + })(); + + return BlueGreenSettings; + })(); + + v1.NodePool = (function() { + + /** + * Properties of a NodePool. + * @memberof google.container.v1 + * @interface INodePool + * @property {string|null} [name] NodePool name + * @property {google.container.v1.INodeConfig|null} [config] NodePool config + * @property {number|null} [initialNodeCount] NodePool initialNodeCount + * @property {Array.|null} [locations] NodePool locations + * @property {google.container.v1.INodeNetworkConfig|null} [networkConfig] NodePool networkConfig + * @property {string|null} [selfLink] NodePool selfLink + * @property {string|null} [version] NodePool version + * @property {Array.|null} [instanceGroupUrls] NodePool instanceGroupUrls + * @property {google.container.v1.NodePool.Status|null} [status] NodePool status + * @property {string|null} [statusMessage] NodePool statusMessage + * @property {google.container.v1.INodePoolAutoscaling|null} [autoscaling] NodePool autoscaling + * @property {google.container.v1.INodeManagement|null} [management] NodePool management + * @property {google.container.v1.IMaxPodsConstraint|null} [maxPodsConstraint] NodePool maxPodsConstraint + * @property {Array.|null} [conditions] NodePool conditions + * @property {number|null} [podIpv4CidrSize] NodePool podIpv4CidrSize + * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] NodePool upgradeSettings + * @property {google.container.v1.NodePool.IPlacementPolicy|null} [placementPolicy] NodePool placementPolicy + * @property {google.container.v1.NodePool.IUpdateInfo|null} [updateInfo] NodePool updateInfo + * @property {string|null} [etag] NodePool etag + * @property {google.container.v1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] NodePool queuedProvisioning + * @property {google.container.v1.IBestEffortProvisioning|null} [bestEffortProvisioning] NodePool bestEffortProvisioning + */ + + /** + * Constructs a new NodePool. + * @memberof google.container.v1 + * @classdesc Represents a NodePool. + * @implements INodePool + * @constructor + * @param {google.container.v1.INodePool=} [properties] Properties to set + */ + function NodePool(properties) { + this.locations = []; + this.instanceGroupUrls = []; + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePool name. + * @member {string} name + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.name = ""; + + /** + * NodePool config. + * @member {google.container.v1.INodeConfig|null|undefined} config + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.config = null; + + /** + * NodePool initialNodeCount. + * @member {number} initialNodeCount + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.initialNodeCount = 0; + + /** + * NodePool locations. + * @member {Array.} locations + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.locations = $util.emptyArray; + + /** + * NodePool networkConfig. + * @member {google.container.v1.INodeNetworkConfig|null|undefined} networkConfig + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.networkConfig = null; + + /** + * NodePool selfLink. + * @member {string} selfLink + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.selfLink = ""; + + /** + * NodePool version. + * @member {string} version + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.version = ""; + + /** + * NodePool instanceGroupUrls. + * @member {Array.} instanceGroupUrls + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.instanceGroupUrls = $util.emptyArray; + + /** + * NodePool status. + * @member {google.container.v1.NodePool.Status} status + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.status = 0; + + /** + * NodePool statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.statusMessage = ""; + + /** + * NodePool autoscaling. + * @member {google.container.v1.INodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.autoscaling = null; + + /** + * NodePool management. + * @member {google.container.v1.INodeManagement|null|undefined} management + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.management = null; + + /** + * NodePool maxPodsConstraint. + * @member {google.container.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.maxPodsConstraint = null; + + /** + * NodePool conditions. + * @member {Array.} conditions + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.conditions = $util.emptyArray; + + /** + * NodePool podIpv4CidrSize. + * @member {number} podIpv4CidrSize + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.podIpv4CidrSize = 0; + + /** + * NodePool upgradeSettings. + * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.upgradeSettings = null; + + /** + * NodePool placementPolicy. + * @member {google.container.v1.NodePool.IPlacementPolicy|null|undefined} placementPolicy + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.placementPolicy = null; + + /** + * NodePool updateInfo. + * @member {google.container.v1.NodePool.IUpdateInfo|null|undefined} updateInfo + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.updateInfo = null; + + /** + * NodePool etag. + * @member {string} etag + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.etag = ""; + + /** + * NodePool queuedProvisioning. + * @member {google.container.v1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.queuedProvisioning = null; + + /** + * NodePool bestEffortProvisioning. + * @member {google.container.v1.IBestEffortProvisioning|null|undefined} bestEffortProvisioning + * @memberof google.container.v1.NodePool + * @instance + */ + NodePool.prototype.bestEffortProvisioning = null; + + /** + * Creates a new NodePool instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool + * @static + * @param {google.container.v1.INodePool=} [properties] Properties to set + * @returns {google.container.v1.NodePool} NodePool instance + */ + NodePool.create = function create(properties) { + return new NodePool(properties); + }; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool + * @static + * @param {google.container.v1.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.container.v1.NodeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) + $root.google.container.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.podIpv4CidrSize != null && Object.hasOwnProperty.call(message, "podIpv4CidrSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.podIpv4CidrSize); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.container.v1.NodeNetworkConfig.encode(message.networkConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.version); + if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.instanceGroupUrls[i]); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 103, wireType 0 =*/824).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.statusMessage); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.container.v1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.placementPolicy != null && Object.hasOwnProperty.call(message, "placementPolicy")) + $root.google.container.v1.NodePool.PlacementPolicy.encode(message.placementPolicy, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); + if (message.updateInfo != null && Object.hasOwnProperty.call(message, "updateInfo")) + $root.google.container.v1.NodePool.UpdateInfo.encode(message.updateInfo, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.etag); + if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) + $root.google.container.v1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); + if (message.bestEffortProvisioning != null && Object.hasOwnProperty.call(message, "bestEffortProvisioning")) + $root.google.container.v1.BestEffortProvisioning.encode(message.bestEffortProvisioning, writer.uint32(/* id 113, wireType 2 =*/906).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool + * @static + * @param {google.container.v1.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.container.v1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.initialNodeCount = reader.int32(); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.networkConfig = $root.google.container.v1.NodeNetworkConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.selfLink = reader.string(); + break; + } + case 101: { + message.version = reader.string(); + break; + } + case 102: { + if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) + message.instanceGroupUrls = []; + message.instanceGroupUrls.push(reader.string()); + break; + } + case 103: { + message.status = reader.int32(); + break; + } + case 104: { + message.statusMessage = reader.string(); + break; + } + case 4: { + message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 5: { + message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 6: { + message.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 105: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 7: { + message.podIpv4CidrSize = reader.int32(); + break; + } + case 107: { + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 108: { + message.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.decode(reader, reader.uint32()); + break; + } + case 109: { + message.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.decode(reader, reader.uint32()); + break; + } + case 110: { + message.etag = reader.string(); + break; + } + case 112: { + message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); + break; + } + case 113: { + message.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePool message. + * @function verify + * @memberof google.container.v1.NodePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.container.v1.NodeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + if (!$util.isInteger(message.initialNodeCount)) + return "initialNodeCount: integer expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.container.v1.NodeNetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { + if (!Array.isArray(message.instanceGroupUrls)) + return "instanceGroupUrls: array expected"; + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + if (!$util.isString(message.instanceGroupUrls[i])) + return "instanceGroupUrls: string[] expected"; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { + var error = $root.google.container.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); + if (error) + return "maxPodsConstraint." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.container.v1.StatusCondition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) + if (!$util.isInteger(message.podIpv4CidrSize)) + return "podIpv4CidrSize: integer expected"; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) { + var error = $root.google.container.v1.NodePool.PlacementPolicy.verify(message.placementPolicy); + if (error) + return "placementPolicy." + error; + } + if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) { + var error = $root.google.container.v1.NodePool.UpdateInfo.verify(message.updateInfo); + if (error) + return "updateInfo." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { + var error = $root.google.container.v1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); + if (error) + return "queuedProvisioning." + error; + } + if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) { + var error = $root.google.container.v1.BestEffortProvisioning.verify(message.bestEffortProvisioning); + if (error) + return "bestEffortProvisioning." + error; + } + return null; + }; + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool} NodePool + */ + NodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool) + return object; + var message = new $root.google.container.v1.NodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.container.v1.NodePool.config: object expected"); + message.config = $root.google.container.v1.NodeConfig.fromObject(object.config); + } + if (object.initialNodeCount != null) + message.initialNodeCount = object.initialNodeCount | 0; + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1.NodePool.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.container.v1.NodePool.networkConfig: object expected"); + message.networkConfig = $root.google.container.v1.NodeNetworkConfig.fromObject(object.networkConfig); + } + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.version != null) + message.version = String(object.version); + if (object.instanceGroupUrls) { + if (!Array.isArray(object.instanceGroupUrls)) + throw TypeError(".google.container.v1.NodePool.instanceGroupUrls: array expected"); + message.instanceGroupUrls = []; + for (var i = 0; i < object.instanceGroupUrls.length; ++i) + message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROVISIONING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "RUNNING_WITH_ERROR": + case 3: + message.status = 3; + break; + case "RECONCILING": + case 4: + message.status = 4; + break; + case "STOPPING": + case 5: + message.status = 5; + break; + case "ERROR": + case 6: + message.status = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1.NodePool.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.autoscaling); + } + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1.NodePool.management: object expected"); + message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); + } + if (object.maxPodsConstraint != null) { + if (typeof object.maxPodsConstraint !== "object") + throw TypeError(".google.container.v1.NodePool.maxPodsConstraint: object expected"); + message.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); + } + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.container.v1.NodePool.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.container.v1.NodePool.conditions: object expected"); + message.conditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.conditions[i]); + } + } + if (object.podIpv4CidrSize != null) + message.podIpv4CidrSize = object.podIpv4CidrSize | 0; + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1.NodePool.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.placementPolicy != null) { + if (typeof object.placementPolicy !== "object") + throw TypeError(".google.container.v1.NodePool.placementPolicy: object expected"); + message.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.fromObject(object.placementPolicy); + } + if (object.updateInfo != null) { + if (typeof object.updateInfo !== "object") + throw TypeError(".google.container.v1.NodePool.updateInfo: object expected"); + message.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.fromObject(object.updateInfo); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.queuedProvisioning != null) { + if (typeof object.queuedProvisioning !== "object") + throw TypeError(".google.container.v1.NodePool.queuedProvisioning: object expected"); + message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); + } + if (object.bestEffortProvisioning != null) { + if (typeof object.bestEffortProvisioning !== "object") + throw TypeError(".google.container.v1.NodePool.bestEffortProvisioning: object expected"); + message.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.fromObject(object.bestEffortProvisioning); + } + return message; + }; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool + * @static + * @param {google.container.v1.NodePool} message NodePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.locations = []; + object.instanceGroupUrls = []; + object.conditions = []; + } + if (options.defaults) { + object.name = ""; + object.config = null; + object.initialNodeCount = 0; + object.autoscaling = null; + object.management = null; + object.maxPodsConstraint = null; + object.podIpv4CidrSize = 0; + object.networkConfig = null; + object.selfLink = ""; + object.version = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.upgradeSettings = null; + object.placementPolicy = null; + object.updateInfo = null; + object.etag = ""; + object.queuedProvisioning = null; + object.bestEffortProvisioning = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.container.v1.NodeConfig.toObject(message.config, options); + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + object.initialNodeCount = message.initialNodeCount; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); + if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) + object.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); + if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) + object.podIpv4CidrSize = message.podIpv4CidrSize; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.container.v1.NodeNetworkConfig.toObject(message.networkConfig, options); + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.instanceGroupUrls && message.instanceGroupUrls.length) { + object.instanceGroupUrls = []; + for (var j = 0; j < message.instanceGroupUrls.length; ++j) + object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1.NodePool.Status[message.status] === undefined ? message.status : $root.google.container.v1.NodePool.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.container.v1.StatusCondition.toObject(message.conditions[j], options); + } + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) + object.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.toObject(message.placementPolicy, options); + if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) + object.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.toObject(message.updateInfo, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) + object.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); + if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) + object.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.toObject(message.bestEffortProvisioning, options); + return object; + }; + + /** + * Converts this NodePool to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool + * @instance + * @returns {Object.} JSON object + */ + NodePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePool + * @function getTypeUrl + * @memberof google.container.v1.NodePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool"; + }; + + NodePool.UpgradeSettings = (function() { + + /** + * Properties of an UpgradeSettings. + * @memberof google.container.v1.NodePool + * @interface IUpgradeSettings + * @property {number|null} [maxSurge] UpgradeSettings maxSurge + * @property {number|null} [maxUnavailable] UpgradeSettings maxUnavailable + * @property {google.container.v1.NodePoolUpdateStrategy|null} [strategy] UpgradeSettings strategy + * @property {google.container.v1.IBlueGreenSettings|null} [blueGreenSettings] UpgradeSettings blueGreenSettings + */ + + /** + * Constructs a new UpgradeSettings. + * @memberof google.container.v1.NodePool + * @classdesc Represents an UpgradeSettings. + * @implements IUpgradeSettings + * @constructor + * @param {google.container.v1.NodePool.IUpgradeSettings=} [properties] Properties to set + */ + function UpgradeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeSettings maxSurge. + * @member {number} maxSurge + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.maxSurge = 0; + + /** + * UpgradeSettings maxUnavailable. + * @member {number} maxUnavailable + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.maxUnavailable = 0; + + /** + * UpgradeSettings strategy. + * @member {google.container.v1.NodePoolUpdateStrategy|null|undefined} strategy + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.strategy = null; + + /** + * UpgradeSettings blueGreenSettings. + * @member {google.container.v1.IBlueGreenSettings|null|undefined} blueGreenSettings + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.blueGreenSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpgradeSettings _strategy. + * @member {"strategy"|undefined} _strategy + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + Object.defineProperty(UpgradeSettings.prototype, "_strategy", { + get: $util.oneOfGetter($oneOfFields = ["strategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpgradeSettings _blueGreenSettings. + * @member {"blueGreenSettings"|undefined} _blueGreenSettings + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + */ + Object.defineProperty(UpgradeSettings.prototype, "_blueGreenSettings", { + get: $util.oneOfGetter($oneOfFields = ["blueGreenSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpgradeSettings instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1.NodePool.IUpgradeSettings=} [properties] Properties to set + * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings instance + */ + UpgradeSettings.create = function create(properties) { + return new UpgradeSettings(properties); + }; + + /** + * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxSurge != null && Object.hasOwnProperty.call(message, "maxSurge")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxSurge); + if (message.maxUnavailable != null && Object.hasOwnProperty.call(message, "maxUnavailable")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxUnavailable); + if (message.strategy != null && Object.hasOwnProperty.call(message, "strategy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.strategy); + if (message.blueGreenSettings != null && Object.hasOwnProperty.call(message, "blueGreenSettings")) + $root.google.container.v1.BlueGreenSettings.encode(message.blueGreenSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpgradeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxSurge = reader.int32(); + break; + } + case 2: { + message.maxUnavailable = reader.int32(); + break; + } + case 3: { + message.strategy = reader.int32(); + break; + } + case 4: { + message.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeSettings message. + * @function verify + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) + if (!$util.isInteger(message.maxSurge)) + return "maxSurge: integer expected"; + if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) + if (!$util.isInteger(message.maxUnavailable)) + return "maxUnavailable: integer expected"; + if (message.strategy != null && message.hasOwnProperty("strategy")) { + properties._strategy = 1; + switch (message.strategy) { + default: + return "strategy: enum value expected"; + case 0: + case 2: + case 3: + break; + } + } + if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { + properties._blueGreenSettings = 1; + { + var error = $root.google.container.v1.BlueGreenSettings.verify(message.blueGreenSettings); + if (error) + return "blueGreenSettings." + error; + } + } + return null; + }; + + /** + * Creates an UpgradeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings + */ + UpgradeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool.UpgradeSettings) + return object; + var message = new $root.google.container.v1.NodePool.UpgradeSettings(); + if (object.maxSurge != null) + message.maxSurge = object.maxSurge | 0; + if (object.maxUnavailable != null) + message.maxUnavailable = object.maxUnavailable | 0; + switch (object.strategy) { + default: + if (typeof object.strategy === "number") { + message.strategy = object.strategy; + break; + } + break; + case "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": + case 0: + message.strategy = 0; + break; + case "BLUE_GREEN": + case 2: + message.strategy = 2; + break; + case "SURGE": + case 3: + message.strategy = 3; + break; + } + if (object.blueGreenSettings != null) { + if (typeof object.blueGreenSettings !== "object") + throw TypeError(".google.container.v1.NodePool.UpgradeSettings.blueGreenSettings: object expected"); + message.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.fromObject(object.blueGreenSettings); + } + return message; + }; + + /** + * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1.NodePool.UpgradeSettings} message UpgradeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxSurge = 0; + object.maxUnavailable = 0; + } + if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) + object.maxSurge = message.maxSurge; + if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) + object.maxUnavailable = message.maxUnavailable; + if (message.strategy != null && message.hasOwnProperty("strategy")) { + object.strategy = options.enums === String ? $root.google.container.v1.NodePoolUpdateStrategy[message.strategy] === undefined ? message.strategy : $root.google.container.v1.NodePoolUpdateStrategy[message.strategy] : message.strategy; + if (options.oneofs) + object._strategy = "strategy"; + } + if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { + object.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.toObject(message.blueGreenSettings, options); + if (options.oneofs) + object._blueGreenSettings = "blueGreenSettings"; + } + return object; + }; + + /** + * Converts this UpgradeSettings to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool.UpgradeSettings + * @instance + * @returns {Object.} JSON object + */ + UpgradeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeSettings + * @function getTypeUrl + * @memberof google.container.v1.NodePool.UpgradeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool.UpgradeSettings"; + }; + + return UpgradeSettings; + })(); + + NodePool.UpdateInfo = (function() { + + /** + * Properties of an UpdateInfo. + * @memberof google.container.v1.NodePool + * @interface IUpdateInfo + * @property {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null} [blueGreenInfo] UpdateInfo blueGreenInfo + */ + + /** + * Constructs a new UpdateInfo. + * @memberof google.container.v1.NodePool + * @classdesc Represents an UpdateInfo. + * @implements IUpdateInfo + * @constructor + * @param {google.container.v1.NodePool.IUpdateInfo=} [properties] Properties to set + */ + function UpdateInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateInfo blueGreenInfo. + * @member {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null|undefined} blueGreenInfo + * @memberof google.container.v1.NodePool.UpdateInfo + * @instance + */ + UpdateInfo.prototype.blueGreenInfo = null; + + /** + * Creates a new UpdateInfo instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {google.container.v1.NodePool.IUpdateInfo=} [properties] Properties to set + * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo instance + */ + UpdateInfo.create = function create(properties) { + return new UpdateInfo(properties); + }; + + /** + * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {google.container.v1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blueGreenInfo != null && Object.hasOwnProperty.call(message, "blueGreenInfo")) + $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.encode(message.blueGreenInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {google.container.v1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpdateInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateInfo message. + * @function verify + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) { + var error = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify(message.blueGreenInfo); + if (error) + return "blueGreenInfo." + error; + } + return null; + }; + + /** + * Creates an UpdateInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo + */ + UpdateInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool.UpdateInfo) + return object; + var message = new $root.google.container.v1.NodePool.UpdateInfo(); + if (object.blueGreenInfo != null) { + if (typeof object.blueGreenInfo !== "object") + throw TypeError(".google.container.v1.NodePool.UpdateInfo.blueGreenInfo: object expected"); + message.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.fromObject(object.blueGreenInfo); + } + return message; + }; + + /** + * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {google.container.v1.NodePool.UpdateInfo} message UpdateInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.blueGreenInfo = null; + if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) + object.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.toObject(message.blueGreenInfo, options); + return object; + }; + + /** + * Converts this UpdateInfo to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool.UpdateInfo + * @instance + * @returns {Object.} JSON object + */ + UpdateInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateInfo + * @function getTypeUrl + * @memberof google.container.v1.NodePool.UpdateInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool.UpdateInfo"; + }; + + UpdateInfo.BlueGreenInfo = (function() { + + /** + * Properties of a BlueGreenInfo. + * @memberof google.container.v1.NodePool.UpdateInfo + * @interface IBlueGreenInfo + * @property {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null} [phase] BlueGreenInfo phase + * @property {Array.|null} [blueInstanceGroupUrls] BlueGreenInfo blueInstanceGroupUrls + * @property {Array.|null} [greenInstanceGroupUrls] BlueGreenInfo greenInstanceGroupUrls + * @property {string|null} [bluePoolDeletionStartTime] BlueGreenInfo bluePoolDeletionStartTime + * @property {string|null} [greenPoolVersion] BlueGreenInfo greenPoolVersion + */ + + /** + * Constructs a new BlueGreenInfo. + * @memberof google.container.v1.NodePool.UpdateInfo + * @classdesc Represents a BlueGreenInfo. + * @implements IBlueGreenInfo + * @constructor + * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set + */ + function BlueGreenInfo(properties) { + this.blueInstanceGroupUrls = []; + this.greenInstanceGroupUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlueGreenInfo phase. + * @member {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase} phase + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.phase = 0; + + /** + * BlueGreenInfo blueInstanceGroupUrls. + * @member {Array.} blueInstanceGroupUrls + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.blueInstanceGroupUrls = $util.emptyArray; + + /** + * BlueGreenInfo greenInstanceGroupUrls. + * @member {Array.} greenInstanceGroupUrls + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.greenInstanceGroupUrls = $util.emptyArray; + + /** + * BlueGreenInfo bluePoolDeletionStartTime. + * @member {string} bluePoolDeletionStartTime + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.bluePoolDeletionStartTime = ""; + + /** + * BlueGreenInfo greenPoolVersion. + * @member {string} greenPoolVersion + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.greenPoolVersion = ""; + + /** + * Creates a new BlueGreenInfo instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set + * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo instance + */ + BlueGreenInfo.create = function create(properties) { + return new BlueGreenInfo(properties); + }; + + /** + * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.phase); + if (message.blueInstanceGroupUrls != null && message.blueInstanceGroupUrls.length) + for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.blueInstanceGroupUrls[i]); + if (message.greenInstanceGroupUrls != null && message.greenInstanceGroupUrls.length) + for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.greenInstanceGroupUrls[i]); + if (message.bluePoolDeletionStartTime != null && Object.hasOwnProperty.call(message, "bluePoolDeletionStartTime")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.bluePoolDeletionStartTime); + if (message.greenPoolVersion != null && Object.hasOwnProperty.call(message, "greenPoolVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.greenPoolVersion); + return writer; + }; + + /** + * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phase = reader.int32(); + break; + } + case 2: { + if (!(message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length)) + message.blueInstanceGroupUrls = []; + message.blueInstanceGroupUrls.push(reader.string()); + break; + } + case 3: { + if (!(message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length)) + message.greenInstanceGroupUrls = []; + message.greenInstanceGroupUrls.push(reader.string()); + break; + } + case 4: { + message.bluePoolDeletionStartTime = reader.string(); + break; + } + case 5: { + message.greenPoolVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlueGreenInfo message. + * @function verify + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlueGreenInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phase != null && message.hasOwnProperty("phase")) + switch (message.phase) { + default: + return "phase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.blueInstanceGroupUrls != null && message.hasOwnProperty("blueInstanceGroupUrls")) { + if (!Array.isArray(message.blueInstanceGroupUrls)) + return "blueInstanceGroupUrls: array expected"; + for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) + if (!$util.isString(message.blueInstanceGroupUrls[i])) + return "blueInstanceGroupUrls: string[] expected"; + } + if (message.greenInstanceGroupUrls != null && message.hasOwnProperty("greenInstanceGroupUrls")) { + if (!Array.isArray(message.greenInstanceGroupUrls)) + return "greenInstanceGroupUrls: array expected"; + for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) + if (!$util.isString(message.greenInstanceGroupUrls[i])) + return "greenInstanceGroupUrls: string[] expected"; + } + if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) + if (!$util.isString(message.bluePoolDeletionStartTime)) + return "bluePoolDeletionStartTime: string expected"; + if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) + if (!$util.isString(message.greenPoolVersion)) + return "greenPoolVersion: string expected"; + return null; + }; + + /** + * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + */ + BlueGreenInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo) + return object; + var message = new $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo(); + switch (object.phase) { + default: + if (typeof object.phase === "number") { + message.phase = object.phase; + break; + } + break; + case "PHASE_UNSPECIFIED": + case 0: + message.phase = 0; + break; + case "UPDATE_STARTED": + case 1: + message.phase = 1; + break; + case "CREATING_GREEN_POOL": + case 2: + message.phase = 2; + break; + case "CORDONING_BLUE_POOL": + case 3: + message.phase = 3; + break; + case "DRAINING_BLUE_POOL": + case 4: + message.phase = 4; + break; + case "NODE_POOL_SOAKING": + case 5: + message.phase = 5; + break; + case "DELETING_BLUE_POOL": + case 6: + message.phase = 6; + break; + case "ROLLBACK_STARTED": + case 7: + message.phase = 7; + break; + } + if (object.blueInstanceGroupUrls) { + if (!Array.isArray(object.blueInstanceGroupUrls)) + throw TypeError(".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.blueInstanceGroupUrls: array expected"); + message.blueInstanceGroupUrls = []; + for (var i = 0; i < object.blueInstanceGroupUrls.length; ++i) + message.blueInstanceGroupUrls[i] = String(object.blueInstanceGroupUrls[i]); + } + if (object.greenInstanceGroupUrls) { + if (!Array.isArray(object.greenInstanceGroupUrls)) + throw TypeError(".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.greenInstanceGroupUrls: array expected"); + message.greenInstanceGroupUrls = []; + for (var i = 0; i < object.greenInstanceGroupUrls.length; ++i) + message.greenInstanceGroupUrls[i] = String(object.greenInstanceGroupUrls[i]); + } + if (object.bluePoolDeletionStartTime != null) + message.bluePoolDeletionStartTime = String(object.bluePoolDeletionStartTime); + if (object.greenPoolVersion != null) + message.greenPoolVersion = String(object.greenPoolVersion); + return message; + }; + + /** + * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} message BlueGreenInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlueGreenInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.blueInstanceGroupUrls = []; + object.greenInstanceGroupUrls = []; + } + if (options.defaults) { + object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; + object.bluePoolDeletionStartTime = ""; + object.greenPoolVersion = ""; + } + if (message.phase != null && message.hasOwnProperty("phase")) + object.phase = options.enums === String ? $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] === undefined ? message.phase : $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] : message.phase; + if (message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length) { + object.blueInstanceGroupUrls = []; + for (var j = 0; j < message.blueInstanceGroupUrls.length; ++j) + object.blueInstanceGroupUrls[j] = message.blueInstanceGroupUrls[j]; + } + if (message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length) { + object.greenInstanceGroupUrls = []; + for (var j = 0; j < message.greenInstanceGroupUrls.length; ++j) + object.greenInstanceGroupUrls[j] = message.greenInstanceGroupUrls[j]; + } + if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) + object.bluePoolDeletionStartTime = message.bluePoolDeletionStartTime; + if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) + object.greenPoolVersion = message.greenPoolVersion; + return object; + }; + + /** + * Converts this BlueGreenInfo to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + * @returns {Object.} JSON object + */ + BlueGreenInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlueGreenInfo + * @function getTypeUrl + * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlueGreenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"; + }; + + /** + * Phase enum. + * @name google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase + * @enum {number} + * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value + * @property {number} UPDATE_STARTED=1 UPDATE_STARTED value + * @property {number} CREATING_GREEN_POOL=2 CREATING_GREEN_POOL value + * @property {number} CORDONING_BLUE_POOL=3 CORDONING_BLUE_POOL value + * @property {number} DRAINING_BLUE_POOL=4 DRAINING_BLUE_POOL value + * @property {number} NODE_POOL_SOAKING=5 NODE_POOL_SOAKING value + * @property {number} DELETING_BLUE_POOL=6 DELETING_BLUE_POOL value + * @property {number} ROLLBACK_STARTED=7 ROLLBACK_STARTED value + */ + BlueGreenInfo.Phase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPDATE_STARTED"] = 1; + values[valuesById[2] = "CREATING_GREEN_POOL"] = 2; + values[valuesById[3] = "CORDONING_BLUE_POOL"] = 3; + values[valuesById[4] = "DRAINING_BLUE_POOL"] = 4; + values[valuesById[5] = "NODE_POOL_SOAKING"] = 5; + values[valuesById[6] = "DELETING_BLUE_POOL"] = 6; + values[valuesById[7] = "ROLLBACK_STARTED"] = 7; + return values; + })(); + + return BlueGreenInfo; + })(); + + return UpdateInfo; + })(); + + /** + * Status enum. + * @name google.container.v1.NodePool.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RUNNING_WITH_ERROR=3 RUNNING_WITH_ERROR value + * @property {number} RECONCILING=4 RECONCILING value + * @property {number} STOPPING=5 STOPPING value + * @property {number} ERROR=6 ERROR value + */ + NodePool.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RUNNING_WITH_ERROR"] = 3; + values[valuesById[4] = "RECONCILING"] = 4; + values[valuesById[5] = "STOPPING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + NodePool.PlacementPolicy = (function() { + + /** + * Properties of a PlacementPolicy. + * @memberof google.container.v1.NodePool + * @interface IPlacementPolicy + * @property {google.container.v1.NodePool.PlacementPolicy.Type|null} [type] PlacementPolicy type + * @property {string|null} [tpuTopology] PlacementPolicy tpuTopology + * @property {string|null} [policyName] PlacementPolicy policyName + */ + + /** + * Constructs a new PlacementPolicy. + * @memberof google.container.v1.NodePool + * @classdesc Represents a PlacementPolicy. + * @implements IPlacementPolicy + * @constructor + * @param {google.container.v1.NodePool.IPlacementPolicy=} [properties] Properties to set + */ + function PlacementPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlacementPolicy type. + * @member {google.container.v1.NodePool.PlacementPolicy.Type} type + * @memberof google.container.v1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.type = 0; + + /** + * PlacementPolicy tpuTopology. + * @member {string} tpuTopology + * @memberof google.container.v1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.tpuTopology = ""; + + /** + * PlacementPolicy policyName. + * @member {string} policyName + * @memberof google.container.v1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.policyName = ""; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1.NodePool.IPlacementPolicy=} [properties] Properties to set + * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy instance + */ + PlacementPolicy.create = function create(properties) { + return new PlacementPolicy(properties); + }; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.tpuTopology != null && Object.hasOwnProperty.call(message, "tpuTopology")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tpuTopology); + if (message.policyName != null && Object.hasOwnProperty.call(message, "policyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.policyName); + return writer; + }; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.PlacementPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.tpuTopology = reader.string(); + break; + } + case 3: { + message.policyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacementPolicy message. + * @function verify + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacementPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) + if (!$util.isString(message.tpuTopology)) + return "tpuTopology: string expected"; + if (message.policyName != null && message.hasOwnProperty("policyName")) + if (!$util.isString(message.policyName)) + return "policyName: string expected"; + return null; + }; + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy + */ + PlacementPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool.PlacementPolicy) + return object; + var message = new $root.google.container.v1.NodePool.PlacementPolicy(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "COMPACT": + case 1: + message.type = 1; + break; + } + if (object.tpuTopology != null) + message.tpuTopology = String(object.tpuTopology); + if (object.policyName != null) + message.policyName = String(object.policyName); + return message; + }; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1.NodePool.PlacementPolicy} message PlacementPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacementPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.tpuTopology = ""; + object.policyName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1.NodePool.PlacementPolicy.Type[message.type] === undefined ? message.type : $root.google.container.v1.NodePool.PlacementPolicy.Type[message.type] : message.type; + if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) + object.tpuTopology = message.tpuTopology; + if (message.policyName != null && message.hasOwnProperty("policyName")) + object.policyName = message.policyName; + return object; + }; + + /** + * Converts this PlacementPolicy to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool.PlacementPolicy + * @instance + * @returns {Object.} JSON object + */ + PlacementPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacementPolicy + * @function getTypeUrl + * @memberof google.container.v1.NodePool.PlacementPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool.PlacementPolicy"; + }; + + /** + * Type enum. + * @name google.container.v1.NodePool.PlacementPolicy.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} COMPACT=1 COMPACT value + */ + PlacementPolicy.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPACT"] = 1; + return values; + })(); + + return PlacementPolicy; + })(); + + NodePool.QueuedProvisioning = (function() { + + /** + * Properties of a QueuedProvisioning. + * @memberof google.container.v1.NodePool + * @interface IQueuedProvisioning + * @property {boolean|null} [enabled] QueuedProvisioning enabled + */ + + /** + * Constructs a new QueuedProvisioning. + * @memberof google.container.v1.NodePool + * @classdesc Represents a QueuedProvisioning. + * @implements IQueuedProvisioning + * @constructor + * @param {google.container.v1.NodePool.IQueuedProvisioning=} [properties] Properties to set + */ + function QueuedProvisioning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueuedProvisioning enabled. + * @member {boolean} enabled + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @instance + */ + QueuedProvisioning.prototype.enabled = false; + + /** + * Creates a new QueuedProvisioning instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1.NodePool.IQueuedProvisioning=} [properties] Properties to set + * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning instance + */ + QueuedProvisioning.create = function create(properties) { + return new QueuedProvisioning(properties); + }; + + /** + * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueuedProvisioning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueuedProvisioning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueuedProvisioning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.QueuedProvisioning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueuedProvisioning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueuedProvisioning message. + * @function verify + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueuedProvisioning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning + */ + QueuedProvisioning.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePool.QueuedProvisioning) + return object; + var message = new $root.google.container.v1.NodePool.QueuedProvisioning(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1.NodePool.QueuedProvisioning} message QueuedProvisioning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueuedProvisioning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this QueuedProvisioning to JSON. + * @function toJSON + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @instance + * @returns {Object.} JSON object + */ + QueuedProvisioning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueuedProvisioning + * @function getTypeUrl + * @memberof google.container.v1.NodePool.QueuedProvisioning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueuedProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePool.QueuedProvisioning"; + }; + + return QueuedProvisioning; + })(); + + return NodePool; + })(); + + v1.NodeManagement = (function() { + + /** + * Properties of a NodeManagement. + * @memberof google.container.v1 + * @interface INodeManagement + * @property {boolean|null} [autoUpgrade] NodeManagement autoUpgrade + * @property {boolean|null} [autoRepair] NodeManagement autoRepair + * @property {google.container.v1.IAutoUpgradeOptions|null} [upgradeOptions] NodeManagement upgradeOptions + */ + + /** + * Constructs a new NodeManagement. + * @memberof google.container.v1 + * @classdesc Represents a NodeManagement. + * @implements INodeManagement + * @constructor + * @param {google.container.v1.INodeManagement=} [properties] Properties to set + */ + function NodeManagement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeManagement autoUpgrade. + * @member {boolean} autoUpgrade + * @memberof google.container.v1.NodeManagement + * @instance + */ + NodeManagement.prototype.autoUpgrade = false; + + /** + * NodeManagement autoRepair. + * @member {boolean} autoRepair + * @memberof google.container.v1.NodeManagement + * @instance + */ + NodeManagement.prototype.autoRepair = false; + + /** + * NodeManagement upgradeOptions. + * @member {google.container.v1.IAutoUpgradeOptions|null|undefined} upgradeOptions + * @memberof google.container.v1.NodeManagement + * @instance + */ + NodeManagement.prototype.upgradeOptions = null; + + /** + * Creates a new NodeManagement instance using the specified properties. + * @function create + * @memberof google.container.v1.NodeManagement + * @static + * @param {google.container.v1.INodeManagement=} [properties] Properties to set + * @returns {google.container.v1.NodeManagement} NodeManagement instance + */ + NodeManagement.create = function create(properties) { + return new NodeManagement(properties); + }; + + /** + * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodeManagement + * @static + * @param {google.container.v1.INodeManagement} message NodeManagement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeManagement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoUpgrade != null && Object.hasOwnProperty.call(message, "autoUpgrade")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.autoUpgrade); + if (message.autoRepair != null && Object.hasOwnProperty.call(message, "autoRepair")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRepair); + if (message.upgradeOptions != null && Object.hasOwnProperty.call(message, "upgradeOptions")) + $root.google.container.v1.AutoUpgradeOptions.encode(message.upgradeOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodeManagement + * @static + * @param {google.container.v1.INodeManagement} message NodeManagement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeManagement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeManagement message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodeManagement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodeManagement} NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeManagement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeManagement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.autoUpgrade = reader.bool(); + break; + } + case 2: { + message.autoRepair = reader.bool(); + break; + } + case 10: { + message.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeManagement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodeManagement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodeManagement} NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeManagement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeManagement message. + * @function verify + * @memberof google.container.v1.NodeManagement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeManagement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) + if (typeof message.autoUpgrade !== "boolean") + return "autoUpgrade: boolean expected"; + if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) + if (typeof message.autoRepair !== "boolean") + return "autoRepair: boolean expected"; + if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) { + var error = $root.google.container.v1.AutoUpgradeOptions.verify(message.upgradeOptions); + if (error) + return "upgradeOptions." + error; + } + return null; + }; + + /** + * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodeManagement + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodeManagement} NodeManagement + */ + NodeManagement.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodeManagement) + return object; + var message = new $root.google.container.v1.NodeManagement(); + if (object.autoUpgrade != null) + message.autoUpgrade = Boolean(object.autoUpgrade); + if (object.autoRepair != null) + message.autoRepair = Boolean(object.autoRepair); + if (object.upgradeOptions != null) { + if (typeof object.upgradeOptions !== "object") + throw TypeError(".google.container.v1.NodeManagement.upgradeOptions: object expected"); + message.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.fromObject(object.upgradeOptions); + } + return message; + }; + + /** + * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodeManagement + * @static + * @param {google.container.v1.NodeManagement} message NodeManagement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeManagement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoUpgrade = false; + object.autoRepair = false; + object.upgradeOptions = null; + } + if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) + object.autoUpgrade = message.autoUpgrade; + if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) + object.autoRepair = message.autoRepair; + if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) + object.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.toObject(message.upgradeOptions, options); + return object; + }; + + /** + * Converts this NodeManagement to JSON. + * @function toJSON + * @memberof google.container.v1.NodeManagement + * @instance + * @returns {Object.} JSON object + */ + NodeManagement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeManagement + * @function getTypeUrl + * @memberof google.container.v1.NodeManagement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeManagement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodeManagement"; + }; + + return NodeManagement; + })(); + + v1.BestEffortProvisioning = (function() { + + /** + * Properties of a BestEffortProvisioning. + * @memberof google.container.v1 + * @interface IBestEffortProvisioning + * @property {boolean|null} [enabled] BestEffortProvisioning enabled + * @property {number|null} [minProvisionNodes] BestEffortProvisioning minProvisionNodes + */ + + /** + * Constructs a new BestEffortProvisioning. + * @memberof google.container.v1 + * @classdesc Represents a BestEffortProvisioning. + * @implements IBestEffortProvisioning + * @constructor + * @param {google.container.v1.IBestEffortProvisioning=} [properties] Properties to set + */ + function BestEffortProvisioning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BestEffortProvisioning enabled. + * @member {boolean} enabled + * @memberof google.container.v1.BestEffortProvisioning + * @instance + */ + BestEffortProvisioning.prototype.enabled = false; + + /** + * BestEffortProvisioning minProvisionNodes. + * @member {number} minProvisionNodes + * @memberof google.container.v1.BestEffortProvisioning + * @instance + */ + BestEffortProvisioning.prototype.minProvisionNodes = 0; + + /** + * Creates a new BestEffortProvisioning instance using the specified properties. + * @function create + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {google.container.v1.IBestEffortProvisioning=} [properties] Properties to set + * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning instance + */ + BestEffortProvisioning.create = function create(properties) { + return new BestEffortProvisioning(properties); + }; + + /** + * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. + * @function encode + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {google.container.v1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BestEffortProvisioning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.minProvisionNodes != null && Object.hasOwnProperty.call(message, "minProvisionNodes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minProvisionNodes); + return writer; + }; + + /** + * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {google.container.v1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BestEffortProvisioning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BestEffortProvisioning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BestEffortProvisioning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.minProvisionNodes = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BestEffortProvisioning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BestEffortProvisioning message. + * @function verify + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BestEffortProvisioning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) + if (!$util.isInteger(message.minProvisionNodes)) + return "minProvisionNodes: integer expected"; + return null; + }; + + /** + * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning + */ + BestEffortProvisioning.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.BestEffortProvisioning) + return object; + var message = new $root.google.container.v1.BestEffortProvisioning(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.minProvisionNodes != null) + message.minProvisionNodes = object.minProvisionNodes | 0; + return message; + }; + + /** + * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {google.container.v1.BestEffortProvisioning} message BestEffortProvisioning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BestEffortProvisioning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.minProvisionNodes = 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) + object.minProvisionNodes = message.minProvisionNodes; + return object; + }; + + /** + * Converts this BestEffortProvisioning to JSON. + * @function toJSON + * @memberof google.container.v1.BestEffortProvisioning + * @instance + * @returns {Object.} JSON object + */ + BestEffortProvisioning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BestEffortProvisioning + * @function getTypeUrl + * @memberof google.container.v1.BestEffortProvisioning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BestEffortProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.BestEffortProvisioning"; + }; + + return BestEffortProvisioning; + })(); + + v1.AutoUpgradeOptions = (function() { + + /** + * Properties of an AutoUpgradeOptions. + * @memberof google.container.v1 + * @interface IAutoUpgradeOptions + * @property {string|null} [autoUpgradeStartTime] AutoUpgradeOptions autoUpgradeStartTime + * @property {string|null} [description] AutoUpgradeOptions description + */ + + /** + * Constructs a new AutoUpgradeOptions. + * @memberof google.container.v1 + * @classdesc Represents an AutoUpgradeOptions. + * @implements IAutoUpgradeOptions + * @constructor + * @param {google.container.v1.IAutoUpgradeOptions=} [properties] Properties to set + */ + function AutoUpgradeOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoUpgradeOptions autoUpgradeStartTime. + * @member {string} autoUpgradeStartTime + * @memberof google.container.v1.AutoUpgradeOptions + * @instance + */ + AutoUpgradeOptions.prototype.autoUpgradeStartTime = ""; + + /** + * AutoUpgradeOptions description. + * @member {string} description + * @memberof google.container.v1.AutoUpgradeOptions + * @instance + */ + AutoUpgradeOptions.prototype.description = ""; + + /** + * Creates a new AutoUpgradeOptions instance using the specified properties. + * @function create + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {google.container.v1.IAutoUpgradeOptions=} [properties] Properties to set + * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions instance + */ + AutoUpgradeOptions.create = function create(properties) { + return new AutoUpgradeOptions(properties); + }; + + /** + * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {google.container.v1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoUpgradeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoUpgradeStartTime != null && Object.hasOwnProperty.call(message, "autoUpgradeStartTime")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.autoUpgradeStartTime); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {google.container.v1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoUpgradeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoUpgradeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutoUpgradeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.autoUpgradeStartTime = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoUpgradeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoUpgradeOptions message. + * @function verify + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoUpgradeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) + if (!$util.isString(message.autoUpgradeStartTime)) + return "autoUpgradeStartTime: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions + */ + AutoUpgradeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AutoUpgradeOptions) + return object; + var message = new $root.google.container.v1.AutoUpgradeOptions(); + if (object.autoUpgradeStartTime != null) + message.autoUpgradeStartTime = String(object.autoUpgradeStartTime); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {google.container.v1.AutoUpgradeOptions} message AutoUpgradeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoUpgradeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoUpgradeStartTime = ""; + object.description = ""; + } + if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) + object.autoUpgradeStartTime = message.autoUpgradeStartTime; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AutoUpgradeOptions to JSON. + * @function toJSON + * @memberof google.container.v1.AutoUpgradeOptions + * @instance + * @returns {Object.} JSON object + */ + AutoUpgradeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoUpgradeOptions + * @function getTypeUrl + * @memberof google.container.v1.AutoUpgradeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoUpgradeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AutoUpgradeOptions"; + }; + + return AutoUpgradeOptions; + })(); + + v1.MaintenancePolicy = (function() { + + /** + * Properties of a MaintenancePolicy. + * @memberof google.container.v1 + * @interface IMaintenancePolicy + * @property {google.container.v1.IMaintenanceWindow|null} [window] MaintenancePolicy window + * @property {string|null} [resourceVersion] MaintenancePolicy resourceVersion + */ + + /** + * Constructs a new MaintenancePolicy. + * @memberof google.container.v1 + * @classdesc Represents a MaintenancePolicy. + * @implements IMaintenancePolicy + * @constructor + * @param {google.container.v1.IMaintenancePolicy=} [properties] Properties to set + */ + function MaintenancePolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenancePolicy window. + * @member {google.container.v1.IMaintenanceWindow|null|undefined} window + * @memberof google.container.v1.MaintenancePolicy + * @instance + */ + MaintenancePolicy.prototype.window = null; + + /** + * MaintenancePolicy resourceVersion. + * @member {string} resourceVersion + * @memberof google.container.v1.MaintenancePolicy + * @instance + */ + MaintenancePolicy.prototype.resourceVersion = ""; + + /** + * Creates a new MaintenancePolicy instance using the specified properties. + * @function create + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {google.container.v1.IMaintenancePolicy=} [properties] Properties to set + * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy instance + */ + MaintenancePolicy.create = function create(properties) { + return new MaintenancePolicy(properties); + }; + + /** + * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {google.container.v1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenancePolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.window != null && Object.hasOwnProperty.call(message, "window")) + $root.google.container.v1.MaintenanceWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceVersion != null && Object.hasOwnProperty.call(message, "resourceVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceVersion); + return writer; + }; + + /** + * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {google.container.v1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenancePolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenancePolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.window = $root.google.container.v1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resourceVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenancePolicy message. + * @function verify + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenancePolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.container.v1.MaintenanceWindow.verify(message.window); + if (error) + return "window." + error; + } + if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) + if (!$util.isString(message.resourceVersion)) + return "resourceVersion: string expected"; + return null; + }; + + /** + * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy + */ + MaintenancePolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MaintenancePolicy) + return object; + var message = new $root.google.container.v1.MaintenancePolicy(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.container.v1.MaintenancePolicy.window: object expected"); + message.window = $root.google.container.v1.MaintenanceWindow.fromObject(object.window); + } + if (object.resourceVersion != null) + message.resourceVersion = String(object.resourceVersion); + return message; + }; + + /** + * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {google.container.v1.MaintenancePolicy} message MaintenancePolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenancePolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.window = null; + object.resourceVersion = ""; + } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.container.v1.MaintenanceWindow.toObject(message.window, options); + if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) + object.resourceVersion = message.resourceVersion; + return object; + }; + + /** + * Converts this MaintenancePolicy to JSON. + * @function toJSON + * @memberof google.container.v1.MaintenancePolicy + * @instance + * @returns {Object.} JSON object + */ + MaintenancePolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenancePolicy + * @function getTypeUrl + * @memberof google.container.v1.MaintenancePolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MaintenancePolicy"; + }; + + return MaintenancePolicy; + })(); + + v1.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.container.v1 + * @interface IMaintenanceWindow + * @property {google.container.v1.IDailyMaintenanceWindow|null} [dailyMaintenanceWindow] MaintenanceWindow dailyMaintenanceWindow + * @property {google.container.v1.IRecurringTimeWindow|null} [recurringWindow] MaintenanceWindow recurringWindow + * @property {Object.|null} [maintenanceExclusions] MaintenanceWindow maintenanceExclusions + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.container.v1 + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.container.v1.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + this.maintenanceExclusions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow dailyMaintenanceWindow. + * @member {google.container.v1.IDailyMaintenanceWindow|null|undefined} dailyMaintenanceWindow + * @memberof google.container.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.dailyMaintenanceWindow = null; + + /** + * MaintenanceWindow recurringWindow. + * @member {google.container.v1.IRecurringTimeWindow|null|undefined} recurringWindow + * @memberof google.container.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.recurringWindow = null; + + /** + * MaintenanceWindow maintenanceExclusions. + * @member {Object.} maintenanceExclusions + * @memberof google.container.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.maintenanceExclusions = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MaintenanceWindow policy. + * @member {"dailyMaintenanceWindow"|"recurringWindow"|undefined} policy + * @memberof google.container.v1.MaintenanceWindow + * @instance + */ + Object.defineProperty(MaintenanceWindow.prototype, "policy", { + get: $util.oneOfGetter($oneOfFields = ["dailyMaintenanceWindow", "recurringWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {google.container.v1.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {google.container.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dailyMaintenanceWindow != null && Object.hasOwnProperty.call(message, "dailyMaintenanceWindow")) + $root.google.container.v1.DailyMaintenanceWindow.encode(message.dailyMaintenanceWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recurringWindow != null && Object.hasOwnProperty.call(message, "recurringWindow")) + $root.google.container.v1.RecurringTimeWindow.encode(message.recurringWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maintenanceExclusions != null && Object.hasOwnProperty.call(message, "maintenanceExclusions")) + for (var keys = Object.keys(message.maintenanceExclusions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.container.v1.TimeWindow.encode(message.maintenanceExclusions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {google.container.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenanceWindow(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recurringWindow = $root.google.container.v1.RecurringTimeWindow.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.maintenanceExclusions === $util.emptyObject) + message.maintenanceExclusions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.container.v1.TimeWindow.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.maintenanceExclusions[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { + properties.policy = 1; + { + var error = $root.google.container.v1.DailyMaintenanceWindow.verify(message.dailyMaintenanceWindow); + if (error) + return "dailyMaintenanceWindow." + error; + } + } + if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { + if (properties.policy === 1) + return "policy: multiple values"; + properties.policy = 1; + { + var error = $root.google.container.v1.RecurringTimeWindow.verify(message.recurringWindow); + if (error) + return "recurringWindow." + error; + } + } + if (message.maintenanceExclusions != null && message.hasOwnProperty("maintenanceExclusions")) { + if (!$util.isObject(message.maintenanceExclusions)) + return "maintenanceExclusions: object expected"; + var key = Object.keys(message.maintenanceExclusions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.container.v1.TimeWindow.verify(message.maintenanceExclusions[key[i]]); + if (error) + return "maintenanceExclusions." + error; + } + } + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MaintenanceWindow) + return object; + var message = new $root.google.container.v1.MaintenanceWindow(); + if (object.dailyMaintenanceWindow != null) { + if (typeof object.dailyMaintenanceWindow !== "object") + throw TypeError(".google.container.v1.MaintenanceWindow.dailyMaintenanceWindow: object expected"); + message.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.fromObject(object.dailyMaintenanceWindow); + } + if (object.recurringWindow != null) { + if (typeof object.recurringWindow !== "object") + throw TypeError(".google.container.v1.MaintenanceWindow.recurringWindow: object expected"); + message.recurringWindow = $root.google.container.v1.RecurringTimeWindow.fromObject(object.recurringWindow); + } + if (object.maintenanceExclusions) { + if (typeof object.maintenanceExclusions !== "object") + throw TypeError(".google.container.v1.MaintenanceWindow.maintenanceExclusions: object expected"); + message.maintenanceExclusions = {}; + for (var keys = Object.keys(object.maintenanceExclusions), i = 0; i < keys.length; ++i) { + if (typeof object.maintenanceExclusions[keys[i]] !== "object") + throw TypeError(".google.container.v1.MaintenanceWindow.maintenanceExclusions: object expected"); + message.maintenanceExclusions[keys[i]] = $root.google.container.v1.TimeWindow.fromObject(object.maintenanceExclusions[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {google.container.v1.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.maintenanceExclusions = {}; + if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { + object.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.toObject(message.dailyMaintenanceWindow, options); + if (options.oneofs) + object.policy = "dailyMaintenanceWindow"; + } + if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { + object.recurringWindow = $root.google.container.v1.RecurringTimeWindow.toObject(message.recurringWindow, options); + if (options.oneofs) + object.policy = "recurringWindow"; + } + var keys2; + if (message.maintenanceExclusions && (keys2 = Object.keys(message.maintenanceExclusions)).length) { + object.maintenanceExclusions = {}; + for (var j = 0; j < keys2.length; ++j) + object.maintenanceExclusions[keys2[j]] = $root.google.container.v1.TimeWindow.toObject(message.maintenanceExclusions[keys2[j]], options); + } + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.container.v1.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.container.v1.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MaintenanceWindow"; + }; + + return MaintenanceWindow; + })(); + + v1.TimeWindow = (function() { + + /** + * Properties of a TimeWindow. + * @memberof google.container.v1 + * @interface ITimeWindow + * @property {google.container.v1.IMaintenanceExclusionOptions|null} [maintenanceExclusionOptions] TimeWindow maintenanceExclusionOptions + * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime + */ + + /** + * Constructs a new TimeWindow. + * @memberof google.container.v1 + * @classdesc Represents a TimeWindow. + * @implements ITimeWindow + * @constructor + * @param {google.container.v1.ITimeWindow=} [properties] Properties to set + */ + function TimeWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeWindow maintenanceExclusionOptions. + * @member {google.container.v1.IMaintenanceExclusionOptions|null|undefined} maintenanceExclusionOptions + * @memberof google.container.v1.TimeWindow + * @instance + */ + TimeWindow.prototype.maintenanceExclusionOptions = null; + + /** + * TimeWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.container.v1.TimeWindow + * @instance + */ + TimeWindow.prototype.startTime = null; + + /** + * TimeWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.container.v1.TimeWindow + * @instance + */ + TimeWindow.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeWindow options. + * @member {"maintenanceExclusionOptions"|undefined} options + * @memberof google.container.v1.TimeWindow + * @instance + */ + Object.defineProperty(TimeWindow.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["maintenanceExclusionOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeWindow instance using the specified properties. + * @function create + * @memberof google.container.v1.TimeWindow + * @static + * @param {google.container.v1.ITimeWindow=} [properties] Properties to set + * @returns {google.container.v1.TimeWindow} TimeWindow instance + */ + TimeWindow.create = function create(properties) { + return new TimeWindow(properties); + }; + + /** + * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1.TimeWindow + * @static + * @param {google.container.v1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maintenanceExclusionOptions != null && Object.hasOwnProperty.call(message, "maintenanceExclusionOptions")) + $root.google.container.v1.MaintenanceExclusionOptions.encode(message.maintenanceExclusionOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.TimeWindow + * @static + * @param {google.container.v1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.TimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.TimeWindow} TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.TimeWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.decode(reader, reader.uint32()); + break; + } + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.TimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.TimeWindow} TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeWindow message. + * @function verify + * @memberof google.container.v1.TimeWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { + properties.options = 1; + { + var error = $root.google.container.v1.MaintenanceExclusionOptions.verify(message.maintenanceExclusionOptions); + if (error) + return "maintenanceExclusionOptions." + error; + } + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.TimeWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.TimeWindow} TimeWindow + */ + TimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.TimeWindow) + return object; + var message = new $root.google.container.v1.TimeWindow(); + if (object.maintenanceExclusionOptions != null) { + if (typeof object.maintenanceExclusionOptions !== "object") + throw TypeError(".google.container.v1.TimeWindow.maintenanceExclusionOptions: object expected"); + message.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.fromObject(object.maintenanceExclusionOptions); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.container.v1.TimeWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.container.v1.TimeWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.TimeWindow + * @static + * @param {google.container.v1.TimeWindow} message TimeWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { + object.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.toObject(message.maintenanceExclusionOptions, options); + if (options.oneofs) + object.options = "maintenanceExclusionOptions"; + } + return object; + }; + + /** + * Converts this TimeWindow to JSON. + * @function toJSON + * @memberof google.container.v1.TimeWindow + * @instance + * @returns {Object.} JSON object + */ + TimeWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeWindow + * @function getTypeUrl + * @memberof google.container.v1.TimeWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.TimeWindow"; + }; + + return TimeWindow; + })(); + + v1.MaintenanceExclusionOptions = (function() { + + /** + * Properties of a MaintenanceExclusionOptions. + * @memberof google.container.v1 + * @interface IMaintenanceExclusionOptions + * @property {google.container.v1.MaintenanceExclusionOptions.Scope|null} [scope] MaintenanceExclusionOptions scope + */ + + /** + * Constructs a new MaintenanceExclusionOptions. + * @memberof google.container.v1 + * @classdesc Represents a MaintenanceExclusionOptions. + * @implements IMaintenanceExclusionOptions + * @constructor + * @param {google.container.v1.IMaintenanceExclusionOptions=} [properties] Properties to set + */ + function MaintenanceExclusionOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceExclusionOptions scope. + * @member {google.container.v1.MaintenanceExclusionOptions.Scope} scope + * @memberof google.container.v1.MaintenanceExclusionOptions + * @instance + */ + MaintenanceExclusionOptions.prototype.scope = 0; + + /** + * Creates a new MaintenanceExclusionOptions instance using the specified properties. + * @function create + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1.IMaintenanceExclusionOptions=} [properties] Properties to set + * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions instance + */ + MaintenanceExclusionOptions.create = function create(properties) { + return new MaintenanceExclusionOptions(properties); + }; + + /** + * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceExclusionOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + return writer; + }; + + /** + * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceExclusionOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceExclusionOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenanceExclusionOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceExclusionOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceExclusionOptions message. + * @function verify + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceExclusionOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + */ + MaintenanceExclusionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MaintenanceExclusionOptions) + return object; + var message = new $root.google.container.v1.MaintenanceExclusionOptions(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "NO_UPGRADES": + case 0: + message.scope = 0; + break; + case "NO_MINOR_UPGRADES": + case 1: + message.scope = 1; + break; + case "NO_MINOR_OR_NODE_UPGRADES": + case 2: + message.scope = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1.MaintenanceExclusionOptions} message MaintenanceExclusionOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceExclusionOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scope = options.enums === String ? "NO_UPGRADES" : 0; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.container.v1.MaintenanceExclusionOptions.Scope[message.scope] === undefined ? message.scope : $root.google.container.v1.MaintenanceExclusionOptions.Scope[message.scope] : message.scope; + return object; + }; + + /** + * Converts this MaintenanceExclusionOptions to JSON. + * @function toJSON + * @memberof google.container.v1.MaintenanceExclusionOptions + * @instance + * @returns {Object.} JSON object + */ + MaintenanceExclusionOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceExclusionOptions + * @function getTypeUrl + * @memberof google.container.v1.MaintenanceExclusionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceExclusionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MaintenanceExclusionOptions"; + }; + + /** + * Scope enum. + * @name google.container.v1.MaintenanceExclusionOptions.Scope + * @enum {number} + * @property {number} NO_UPGRADES=0 NO_UPGRADES value + * @property {number} NO_MINOR_UPGRADES=1 NO_MINOR_UPGRADES value + * @property {number} NO_MINOR_OR_NODE_UPGRADES=2 NO_MINOR_OR_NODE_UPGRADES value + */ + MaintenanceExclusionOptions.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NO_UPGRADES"] = 0; + values[valuesById[1] = "NO_MINOR_UPGRADES"] = 1; + values[valuesById[2] = "NO_MINOR_OR_NODE_UPGRADES"] = 2; + return values; + })(); + + return MaintenanceExclusionOptions; + })(); + + v1.RecurringTimeWindow = (function() { + + /** + * Properties of a RecurringTimeWindow. + * @memberof google.container.v1 + * @interface IRecurringTimeWindow + * @property {google.container.v1.ITimeWindow|null} [window] RecurringTimeWindow window + * @property {string|null} [recurrence] RecurringTimeWindow recurrence + */ + + /** + * Constructs a new RecurringTimeWindow. + * @memberof google.container.v1 + * @classdesc Represents a RecurringTimeWindow. + * @implements IRecurringTimeWindow + * @constructor + * @param {google.container.v1.IRecurringTimeWindow=} [properties] Properties to set + */ + function RecurringTimeWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecurringTimeWindow window. + * @member {google.container.v1.ITimeWindow|null|undefined} window + * @memberof google.container.v1.RecurringTimeWindow + * @instance + */ + RecurringTimeWindow.prototype.window = null; + + /** + * RecurringTimeWindow recurrence. + * @member {string} recurrence + * @memberof google.container.v1.RecurringTimeWindow + * @instance + */ + RecurringTimeWindow.prototype.recurrence = ""; + + /** + * Creates a new RecurringTimeWindow instance using the specified properties. + * @function create + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {google.container.v1.IRecurringTimeWindow=} [properties] Properties to set + * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow instance + */ + RecurringTimeWindow.create = function create(properties) { + return new RecurringTimeWindow(properties); + }; + + /** + * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {google.container.v1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringTimeWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.window != null && Object.hasOwnProperty.call(message, "window")) + $root.google.container.v1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.recurrence); + return writer; + }; + + /** + * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {google.container.v1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringTimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringTimeWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RecurringTimeWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.window = $root.google.container.v1.TimeWindow.decode(reader, reader.uint32()); + break; + } + case 2: { + message.recurrence = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringTimeWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringTimeWindow message. + * @function verify + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringTimeWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.container.v1.TimeWindow.verify(message.window); + if (error) + return "window." + error; + } + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + if (!$util.isString(message.recurrence)) + return "recurrence: string expected"; + return null; + }; + + /** + * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow + */ + RecurringTimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RecurringTimeWindow) + return object; + var message = new $root.google.container.v1.RecurringTimeWindow(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.container.v1.RecurringTimeWindow.window: object expected"); + message.window = $root.google.container.v1.TimeWindow.fromObject(object.window); + } + if (object.recurrence != null) + message.recurrence = String(object.recurrence); + return message; + }; + + /** + * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {google.container.v1.RecurringTimeWindow} message RecurringTimeWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringTimeWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.window = null; + object.recurrence = ""; + } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.container.v1.TimeWindow.toObject(message.window, options); + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + object.recurrence = message.recurrence; + return object; + }; + + /** + * Converts this RecurringTimeWindow to JSON. + * @function toJSON + * @memberof google.container.v1.RecurringTimeWindow + * @instance + * @returns {Object.} JSON object + */ + RecurringTimeWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecurringTimeWindow + * @function getTypeUrl + * @memberof google.container.v1.RecurringTimeWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringTimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RecurringTimeWindow"; + }; + + return RecurringTimeWindow; + })(); + + v1.DailyMaintenanceWindow = (function() { + + /** + * Properties of a DailyMaintenanceWindow. + * @memberof google.container.v1 + * @interface IDailyMaintenanceWindow + * @property {string|null} [startTime] DailyMaintenanceWindow startTime + * @property {string|null} [duration] DailyMaintenanceWindow duration + */ + + /** + * Constructs a new DailyMaintenanceWindow. + * @memberof google.container.v1 + * @classdesc Represents a DailyMaintenanceWindow. + * @implements IDailyMaintenanceWindow + * @constructor + * @param {google.container.v1.IDailyMaintenanceWindow=} [properties] Properties to set + */ + function DailyMaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DailyMaintenanceWindow startTime. + * @member {string} startTime + * @memberof google.container.v1.DailyMaintenanceWindow + * @instance + */ + DailyMaintenanceWindow.prototype.startTime = ""; + + /** + * DailyMaintenanceWindow duration. + * @member {string} duration + * @memberof google.container.v1.DailyMaintenanceWindow + * @instance + */ + DailyMaintenanceWindow.prototype.duration = ""; + + /** + * Creates a new DailyMaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {google.container.v1.IDailyMaintenanceWindow=} [properties] Properties to set + * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow instance + */ + DailyMaintenanceWindow.create = function create(properties) { + return new DailyMaintenanceWindow(properties); + }; + + /** + * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {google.container.v1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailyMaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.startTime); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.duration); + return writer; + }; + + /** + * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {google.container.v1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailyMaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailyMaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DailyMaintenanceWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.startTime = reader.string(); + break; + } + case 3: { + message.duration = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailyMaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DailyMaintenanceWindow message. + * @function verify + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DailyMaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isString(message.startTime)) + return "startTime: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isString(message.duration)) + return "duration: string expected"; + return null; + }; + + /** + * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow + */ + DailyMaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DailyMaintenanceWindow) + return object; + var message = new $root.google.container.v1.DailyMaintenanceWindow(); + if (object.startTime != null) + message.startTime = String(object.startTime); + if (object.duration != null) + message.duration = String(object.duration); + return message; + }; + + /** + * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {google.container.v1.DailyMaintenanceWindow} message DailyMaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DailyMaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = ""; + object.duration = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = message.startTime; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + return object; + }; + + /** + * Converts this DailyMaintenanceWindow to JSON. + * @function toJSON + * @memberof google.container.v1.DailyMaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + DailyMaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DailyMaintenanceWindow + * @function getTypeUrl + * @memberof google.container.v1.DailyMaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DailyMaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DailyMaintenanceWindow"; + }; + + return DailyMaintenanceWindow; + })(); + + v1.SetNodePoolManagementRequest = (function() { + + /** + * Properties of a SetNodePoolManagementRequest. + * @memberof google.container.v1 + * @interface ISetNodePoolManagementRequest + * @property {string|null} [projectId] SetNodePoolManagementRequest projectId + * @property {string|null} [zone] SetNodePoolManagementRequest zone + * @property {string|null} [clusterId] SetNodePoolManagementRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolManagementRequest nodePoolId + * @property {google.container.v1.INodeManagement|null} [management] SetNodePoolManagementRequest management + * @property {string|null} [name] SetNodePoolManagementRequest name + */ + + /** + * Constructs a new SetNodePoolManagementRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetNodePoolManagementRequest. + * @implements ISetNodePoolManagementRequest + * @constructor + * @param {google.container.v1.ISetNodePoolManagementRequest=} [properties] Properties to set + */ + function SetNodePoolManagementRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolManagementRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.projectId = ""; + + /** + * SetNodePoolManagementRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.zone = ""; + + /** + * SetNodePoolManagementRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.clusterId = ""; + + /** + * SetNodePoolManagementRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolManagementRequest management. + * @member {google.container.v1.INodeManagement|null|undefined} management + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.management = null; + + /** + * SetNodePoolManagementRequest name. + * @member {string} name + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolManagementRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1.ISetNodePoolManagementRequest=} [properties] Properties to set + * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest instance + */ + SetNodePoolManagementRequest.create = function create(properties) { + return new SetNodePoolManagementRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolManagementRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolManagementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolManagementRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolManagementRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolManagementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolManagementRequest message. + * @function verify + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolManagementRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + */ + SetNodePoolManagementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetNodePoolManagementRequest) + return object; + var message = new $root.google.container.v1.SetNodePoolManagementRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1.SetNodePoolManagementRequest.management: object expected"); + message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1.SetNodePoolManagementRequest} message SetNodePoolManagementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolManagementRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.management = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolManagementRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetNodePoolManagementRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolManagementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolManagementRequest + * @function getTypeUrl + * @memberof google.container.v1.SetNodePoolManagementRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolManagementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetNodePoolManagementRequest"; + }; + + return SetNodePoolManagementRequest; + })(); + + v1.SetNodePoolSizeRequest = (function() { + + /** + * Properties of a SetNodePoolSizeRequest. + * @memberof google.container.v1 + * @interface ISetNodePoolSizeRequest + * @property {string|null} [projectId] SetNodePoolSizeRequest projectId + * @property {string|null} [zone] SetNodePoolSizeRequest zone + * @property {string|null} [clusterId] SetNodePoolSizeRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolSizeRequest nodePoolId + * @property {number|null} [nodeCount] SetNodePoolSizeRequest nodeCount + * @property {string|null} [name] SetNodePoolSizeRequest name + */ + + /** + * Constructs a new SetNodePoolSizeRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetNodePoolSizeRequest. + * @implements ISetNodePoolSizeRequest + * @constructor + * @param {google.container.v1.ISetNodePoolSizeRequest=} [properties] Properties to set + */ + function SetNodePoolSizeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolSizeRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.projectId = ""; + + /** + * SetNodePoolSizeRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.zone = ""; + + /** + * SetNodePoolSizeRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.clusterId = ""; + + /** + * SetNodePoolSizeRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolSizeRequest nodeCount. + * @member {number} nodeCount + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.nodeCount = 0; + + /** + * SetNodePoolSizeRequest name. + * @member {string} name + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolSizeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1.ISetNodePoolSizeRequest=} [properties] Properties to set + * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest instance + */ + SetNodePoolSizeRequest.create = function create(properties) { + return new SetNodePoolSizeRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolSizeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nodeCount); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolSizeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolSizeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolSizeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.nodeCount = reader.int32(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolSizeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolSizeRequest message. + * @function verify + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolSizeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + */ + SetNodePoolSizeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetNodePoolSizeRequest) + return object; + var message = new $root.google.container.v1.SetNodePoolSizeRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1.SetNodePoolSizeRequest} message SetNodePoolSizeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolSizeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.nodeCount = 0; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolSizeRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetNodePoolSizeRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolSizeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolSizeRequest + * @function getTypeUrl + * @memberof google.container.v1.SetNodePoolSizeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolSizeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetNodePoolSizeRequest"; + }; + + return SetNodePoolSizeRequest; + })(); + + v1.CompleteNodePoolUpgradeRequest = (function() { + + /** + * Properties of a CompleteNodePoolUpgradeRequest. + * @memberof google.container.v1 + * @interface ICompleteNodePoolUpgradeRequest + * @property {string|null} [name] CompleteNodePoolUpgradeRequest name + */ + + /** + * Constructs a new CompleteNodePoolUpgradeRequest. + * @memberof google.container.v1 + * @classdesc Represents a CompleteNodePoolUpgradeRequest. + * @implements ICompleteNodePoolUpgradeRequest + * @constructor + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set + */ + function CompleteNodePoolUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteNodePoolUpgradeRequest name. + * @member {string} name + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @instance + */ + CompleteNodePoolUpgradeRequest.prototype.name = ""; + + /** + * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set + * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest instance + */ + CompleteNodePoolUpgradeRequest.create = function create(properties) { + return new CompleteNodePoolUpgradeRequest(properties); + }; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteNodePoolUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompleteNodePoolUpgradeRequest(); + 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 CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteNodePoolUpgradeRequest message. + * @function verify + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + */ + CompleteNodePoolUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompleteNodePoolUpgradeRequest) + return object; + var message = new $root.google.container.v1.CompleteNodePoolUpgradeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1.CompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteNodePoolUpgradeRequest + * @function getTypeUrl + * @memberof google.container.v1.CompleteNodePoolUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CompleteNodePoolUpgradeRequest"; + }; + + return CompleteNodePoolUpgradeRequest; + })(); + + v1.RollbackNodePoolUpgradeRequest = (function() { + + /** + * Properties of a RollbackNodePoolUpgradeRequest. + * @memberof google.container.v1 + * @interface IRollbackNodePoolUpgradeRequest + * @property {string|null} [projectId] RollbackNodePoolUpgradeRequest projectId + * @property {string|null} [zone] RollbackNodePoolUpgradeRequest zone + * @property {string|null} [clusterId] RollbackNodePoolUpgradeRequest clusterId + * @property {string|null} [nodePoolId] RollbackNodePoolUpgradeRequest nodePoolId + * @property {string|null} [name] RollbackNodePoolUpgradeRequest name + * @property {boolean|null} [respectPdb] RollbackNodePoolUpgradeRequest respectPdb + */ + + /** + * Constructs a new RollbackNodePoolUpgradeRequest. + * @memberof google.container.v1 + * @classdesc Represents a RollbackNodePoolUpgradeRequest. + * @implements IRollbackNodePoolUpgradeRequest + * @constructor + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set + */ + function RollbackNodePoolUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackNodePoolUpgradeRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.projectId = ""; + + /** + * RollbackNodePoolUpgradeRequest zone. + * @member {string} zone + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.zone = ""; + + /** + * RollbackNodePoolUpgradeRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.clusterId = ""; + + /** + * RollbackNodePoolUpgradeRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.nodePoolId = ""; + + /** + * RollbackNodePoolUpgradeRequest name. + * @member {string} name + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.name = ""; + + /** + * RollbackNodePoolUpgradeRequest respectPdb. + * @member {boolean} respectPdb + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.respectPdb = false; + + /** + * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set + * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest instance + */ + RollbackNodePoolUpgradeRequest.create = function create(properties) { + return new RollbackNodePoolUpgradeRequest(properties); + }; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackNodePoolUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.respectPdb != null && Object.hasOwnProperty.call(message, "respectPdb")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.respectPdb); + return writer; + }; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackNodePoolUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RollbackNodePoolUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + message.respectPdb = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RollbackNodePoolUpgradeRequest message. + * @function verify + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RollbackNodePoolUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) + if (typeof message.respectPdb !== "boolean") + return "respectPdb: boolean expected"; + return null; + }; + + /** + * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + */ + RollbackNodePoolUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RollbackNodePoolUpgradeRequest) + return object; + var message = new $root.google.container.v1.RollbackNodePoolUpgradeRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + if (object.respectPdb != null) + message.respectPdb = Boolean(object.respectPdb); + return message; + }; + + /** + * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1.RollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RollbackNodePoolUpgradeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + object.respectPdb = false; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) + object.respectPdb = message.respectPdb; + return object; + }; + + /** + * Converts this RollbackNodePoolUpgradeRequest to JSON. + * @function toJSON + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + RollbackNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RollbackNodePoolUpgradeRequest + * @function getTypeUrl + * @memberof google.container.v1.RollbackNodePoolUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RollbackNodePoolUpgradeRequest"; + }; + + return RollbackNodePoolUpgradeRequest; + })(); + + v1.ListNodePoolsResponse = (function() { + + /** + * Properties of a ListNodePoolsResponse. + * @memberof google.container.v1 + * @interface IListNodePoolsResponse + * @property {Array.|null} [nodePools] ListNodePoolsResponse nodePools + */ + + /** + * Constructs a new ListNodePoolsResponse. + * @memberof google.container.v1 + * @classdesc Represents a ListNodePoolsResponse. + * @implements IListNodePoolsResponse + * @constructor + * @param {google.container.v1.IListNodePoolsResponse=} [properties] Properties to set + */ + function ListNodePoolsResponse(properties) { + this.nodePools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNodePoolsResponse nodePools. + * @member {Array.} nodePools + * @memberof google.container.v1.ListNodePoolsResponse + * @instance + */ + ListNodePoolsResponse.prototype.nodePools = $util.emptyArray; + + /** + * Creates a new ListNodePoolsResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {google.container.v1.IListNodePoolsResponse=} [properties] Properties to set + * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse instance + */ + ListNodePoolsResponse.create = function create(properties) { + return new ListNodePoolsResponse(properties); + }; + + /** + * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {google.container.v1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.container.v1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {google.container.v1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListNodePoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.container.v1.NodePool.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNodePoolsResponse message. + * @function verify + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNodePoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.container.v1.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + return null; + }; + + /** + * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse + */ + ListNodePoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListNodePoolsResponse) + return object; + var message = new $root.google.container.v1.ListNodePoolsResponse(); + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.container.v1.ListNodePoolsResponse.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.container.v1.ListNodePoolsResponse.nodePools: object expected"); + message.nodePools[i] = $root.google.container.v1.NodePool.fromObject(object.nodePools[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {google.container.v1.ListNodePoolsResponse} message ListNodePoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNodePoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodePools = []; + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.container.v1.NodePool.toObject(message.nodePools[j], options); + } + return object; + }; + + /** + * Converts this ListNodePoolsResponse to JSON. + * @function toJSON + * @memberof google.container.v1.ListNodePoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListNodePoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNodePoolsResponse + * @function getTypeUrl + * @memberof google.container.v1.ListNodePoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListNodePoolsResponse"; + }; + + return ListNodePoolsResponse; + })(); + + v1.ClusterAutoscaling = (function() { + + /** + * Properties of a ClusterAutoscaling. + * @memberof google.container.v1 + * @interface IClusterAutoscaling + * @property {boolean|null} [enableNodeAutoprovisioning] ClusterAutoscaling enableNodeAutoprovisioning + * @property {Array.|null} [resourceLimits] ClusterAutoscaling resourceLimits + * @property {google.container.v1.ClusterAutoscaling.AutoscalingProfile|null} [autoscalingProfile] ClusterAutoscaling autoscalingProfile + * @property {google.container.v1.IAutoprovisioningNodePoolDefaults|null} [autoprovisioningNodePoolDefaults] ClusterAutoscaling autoprovisioningNodePoolDefaults + * @property {Array.|null} [autoprovisioningLocations] ClusterAutoscaling autoprovisioningLocations + */ + + /** + * Constructs a new ClusterAutoscaling. + * @memberof google.container.v1 + * @classdesc Represents a ClusterAutoscaling. + * @implements IClusterAutoscaling + * @constructor + * @param {google.container.v1.IClusterAutoscaling=} [properties] Properties to set + */ + function ClusterAutoscaling(properties) { + this.resourceLimits = []; + this.autoprovisioningLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterAutoscaling enableNodeAutoprovisioning. + * @member {boolean} enableNodeAutoprovisioning + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.enableNodeAutoprovisioning = false; + + /** + * ClusterAutoscaling resourceLimits. + * @member {Array.} resourceLimits + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.resourceLimits = $util.emptyArray; + + /** + * ClusterAutoscaling autoscalingProfile. + * @member {google.container.v1.ClusterAutoscaling.AutoscalingProfile} autoscalingProfile + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoscalingProfile = 0; + + /** + * ClusterAutoscaling autoprovisioningNodePoolDefaults. + * @member {google.container.v1.IAutoprovisioningNodePoolDefaults|null|undefined} autoprovisioningNodePoolDefaults + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoprovisioningNodePoolDefaults = null; + + /** + * ClusterAutoscaling autoprovisioningLocations. + * @member {Array.} autoprovisioningLocations + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoprovisioningLocations = $util.emptyArray; + + /** + * Creates a new ClusterAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {google.container.v1.IClusterAutoscaling=} [properties] Properties to set + * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling instance + */ + ClusterAutoscaling.create = function create(properties) { + return new ClusterAutoscaling(properties); + }; + + /** + * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {google.container.v1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNodeAutoprovisioning != null && Object.hasOwnProperty.call(message, "enableNodeAutoprovisioning")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNodeAutoprovisioning); + if (message.resourceLimits != null && message.resourceLimits.length) + for (var i = 0; i < message.resourceLimits.length; ++i) + $root.google.container.v1.ResourceLimit.encode(message.resourceLimits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoscalingProfile != null && Object.hasOwnProperty.call(message, "autoscalingProfile")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.autoscalingProfile); + if (message.autoprovisioningNodePoolDefaults != null && Object.hasOwnProperty.call(message, "autoprovisioningNodePoolDefaults")) + $root.google.container.v1.AutoprovisioningNodePoolDefaults.encode(message.autoprovisioningNodePoolDefaults, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.autoprovisioningLocations != null && message.autoprovisioningLocations.length) + for (var i = 0; i < message.autoprovisioningLocations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.autoprovisioningLocations[i]); + return writer; + }; + + /** + * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {google.container.v1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClusterAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNodeAutoprovisioning = reader.bool(); + break; + } + case 2: { + if (!(message.resourceLimits && message.resourceLimits.length)) + message.resourceLimits = []; + message.resourceLimits.push($root.google.container.v1.ResourceLimit.decode(reader, reader.uint32())); + break; + } + case 3: { + message.autoscalingProfile = reader.int32(); + break; + } + case 4: { + message.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.autoprovisioningLocations && message.autoprovisioningLocations.length)) + message.autoprovisioningLocations = []; + message.autoprovisioningLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterAutoscaling message. + * @function verify + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) + if (typeof message.enableNodeAutoprovisioning !== "boolean") + return "enableNodeAutoprovisioning: boolean expected"; + if (message.resourceLimits != null && message.hasOwnProperty("resourceLimits")) { + if (!Array.isArray(message.resourceLimits)) + return "resourceLimits: array expected"; + for (var i = 0; i < message.resourceLimits.length; ++i) { + var error = $root.google.container.v1.ResourceLimit.verify(message.resourceLimits[i]); + if (error) + return "resourceLimits." + error; + } + } + if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) + switch (message.autoscalingProfile) { + default: + return "autoscalingProfile: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) { + var error = $root.google.container.v1.AutoprovisioningNodePoolDefaults.verify(message.autoprovisioningNodePoolDefaults); + if (error) + return "autoprovisioningNodePoolDefaults." + error; + } + if (message.autoprovisioningLocations != null && message.hasOwnProperty("autoprovisioningLocations")) { + if (!Array.isArray(message.autoprovisioningLocations)) + return "autoprovisioningLocations: array expected"; + for (var i = 0; i < message.autoprovisioningLocations.length; ++i) + if (!$util.isString(message.autoprovisioningLocations[i])) + return "autoprovisioningLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling + */ + ClusterAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ClusterAutoscaling) + return object; + var message = new $root.google.container.v1.ClusterAutoscaling(); + if (object.enableNodeAutoprovisioning != null) + message.enableNodeAutoprovisioning = Boolean(object.enableNodeAutoprovisioning); + if (object.resourceLimits) { + if (!Array.isArray(object.resourceLimits)) + throw TypeError(".google.container.v1.ClusterAutoscaling.resourceLimits: array expected"); + message.resourceLimits = []; + for (var i = 0; i < object.resourceLimits.length; ++i) { + if (typeof object.resourceLimits[i] !== "object") + throw TypeError(".google.container.v1.ClusterAutoscaling.resourceLimits: object expected"); + message.resourceLimits[i] = $root.google.container.v1.ResourceLimit.fromObject(object.resourceLimits[i]); + } + } + switch (object.autoscalingProfile) { + default: + if (typeof object.autoscalingProfile === "number") { + message.autoscalingProfile = object.autoscalingProfile; + break; + } + break; + case "PROFILE_UNSPECIFIED": + case 0: + message.autoscalingProfile = 0; + break; + case "OPTIMIZE_UTILIZATION": + case 1: + message.autoscalingProfile = 1; + break; + case "BALANCED": + case 2: + message.autoscalingProfile = 2; + break; + } + if (object.autoprovisioningNodePoolDefaults != null) { + if (typeof object.autoprovisioningNodePoolDefaults !== "object") + throw TypeError(".google.container.v1.ClusterAutoscaling.autoprovisioningNodePoolDefaults: object expected"); + message.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.fromObject(object.autoprovisioningNodePoolDefaults); + } + if (object.autoprovisioningLocations) { + if (!Array.isArray(object.autoprovisioningLocations)) + throw TypeError(".google.container.v1.ClusterAutoscaling.autoprovisioningLocations: array expected"); + message.autoprovisioningLocations = []; + for (var i = 0; i < object.autoprovisioningLocations.length; ++i) + message.autoprovisioningLocations[i] = String(object.autoprovisioningLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {google.container.v1.ClusterAutoscaling} message ClusterAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceLimits = []; + object.autoprovisioningLocations = []; + } + if (options.defaults) { + object.enableNodeAutoprovisioning = false; + object.autoscalingProfile = options.enums === String ? "PROFILE_UNSPECIFIED" : 0; + object.autoprovisioningNodePoolDefaults = null; + } + if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) + object.enableNodeAutoprovisioning = message.enableNodeAutoprovisioning; + if (message.resourceLimits && message.resourceLimits.length) { + object.resourceLimits = []; + for (var j = 0; j < message.resourceLimits.length; ++j) + object.resourceLimits[j] = $root.google.container.v1.ResourceLimit.toObject(message.resourceLimits[j], options); + } + if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) + object.autoscalingProfile = options.enums === String ? $root.google.container.v1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] === undefined ? message.autoscalingProfile : $root.google.container.v1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] : message.autoscalingProfile; + if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) + object.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.toObject(message.autoprovisioningNodePoolDefaults, options); + if (message.autoprovisioningLocations && message.autoprovisioningLocations.length) { + object.autoprovisioningLocations = []; + for (var j = 0; j < message.autoprovisioningLocations.length; ++j) + object.autoprovisioningLocations[j] = message.autoprovisioningLocations[j]; + } + return object; + }; + + /** + * Converts this ClusterAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1.ClusterAutoscaling + * @instance + * @returns {Object.} JSON object + */ + ClusterAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterAutoscaling + * @function getTypeUrl + * @memberof google.container.v1.ClusterAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ClusterAutoscaling"; + }; + + /** + * AutoscalingProfile enum. + * @name google.container.v1.ClusterAutoscaling.AutoscalingProfile + * @enum {number} + * @property {number} PROFILE_UNSPECIFIED=0 PROFILE_UNSPECIFIED value + * @property {number} OPTIMIZE_UTILIZATION=1 OPTIMIZE_UTILIZATION value + * @property {number} BALANCED=2 BALANCED value + */ + ClusterAutoscaling.AutoscalingProfile = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROFILE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIMIZE_UTILIZATION"] = 1; + values[valuesById[2] = "BALANCED"] = 2; + return values; + })(); + + return ClusterAutoscaling; + })(); + + v1.AutoprovisioningNodePoolDefaults = (function() { + + /** + * Properties of an AutoprovisioningNodePoolDefaults. + * @memberof google.container.v1 + * @interface IAutoprovisioningNodePoolDefaults + * @property {Array.|null} [oauthScopes] AutoprovisioningNodePoolDefaults oauthScopes + * @property {string|null} [serviceAccount] AutoprovisioningNodePoolDefaults serviceAccount + * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] AutoprovisioningNodePoolDefaults upgradeSettings + * @property {google.container.v1.INodeManagement|null} [management] AutoprovisioningNodePoolDefaults management + * @property {string|null} [minCpuPlatform] AutoprovisioningNodePoolDefaults minCpuPlatform + * @property {number|null} [diskSizeGb] AutoprovisioningNodePoolDefaults diskSizeGb + * @property {string|null} [diskType] AutoprovisioningNodePoolDefaults diskType + * @property {google.container.v1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] AutoprovisioningNodePoolDefaults shieldedInstanceConfig + * @property {string|null} [bootDiskKmsKey] AutoprovisioningNodePoolDefaults bootDiskKmsKey + * @property {string|null} [imageType] AutoprovisioningNodePoolDefaults imageType + * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled + */ + + /** + * Constructs a new AutoprovisioningNodePoolDefaults. + * @memberof google.container.v1 + * @classdesc Represents an AutoprovisioningNodePoolDefaults. + * @implements IAutoprovisioningNodePoolDefaults + * @constructor + * @param {google.container.v1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set + */ + function AutoprovisioningNodePoolDefaults(properties) { + this.oauthScopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoprovisioningNodePoolDefaults oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.oauthScopes = $util.emptyArray; + + /** + * AutoprovisioningNodePoolDefaults serviceAccount. + * @member {string} serviceAccount + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.serviceAccount = ""; + + /** + * AutoprovisioningNodePoolDefaults upgradeSettings. + * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.upgradeSettings = null; + + /** + * AutoprovisioningNodePoolDefaults management. + * @member {google.container.v1.INodeManagement|null|undefined} management + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.management = null; + + /** + * AutoprovisioningNodePoolDefaults minCpuPlatform. + * @member {string} minCpuPlatform + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.minCpuPlatform = ""; + + /** + * AutoprovisioningNodePoolDefaults diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.diskSizeGb = 0; + + /** + * AutoprovisioningNodePoolDefaults diskType. + * @member {string} diskType + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.diskType = ""; + + /** + * AutoprovisioningNodePoolDefaults shieldedInstanceConfig. + * @member {google.container.v1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.shieldedInstanceConfig = null; + + /** + * AutoprovisioningNodePoolDefaults bootDiskKmsKey. + * @member {string} bootDiskKmsKey + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.bootDiskKmsKey = ""; + + /** + * AutoprovisioningNodePoolDefaults imageType. + * @member {string} imageType + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.imageType = ""; + + /** + * AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. + * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.insecureKubeletReadonlyPortEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. + * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + */ + Object.defineProperty(AutoprovisioningNodePoolDefaults.prototype, "_insecureKubeletReadonlyPortEnabled", { + get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set + * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults instance + */ + AutoprovisioningNodePoolDefaults.create = function create(properties) { + return new AutoprovisioningNodePoolDefaults(properties); + }; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoprovisioningNodePoolDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.minCpuPlatform); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskSizeGb); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.diskType); + if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) + $root.google.container.v1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.bootDiskKmsKey); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.imageType); + if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.insecureKubeletReadonlyPortEnabled); + return writer; + }; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoprovisioningNodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoprovisioningNodePoolDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutoprovisioningNodePoolDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 2: { + message.serviceAccount = reader.string(); + break; + } + case 3: { + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 4: { + message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 5: { + message.minCpuPlatform = reader.string(); + break; + } + case 6: { + message.diskSizeGb = reader.int32(); + break; + } + case 7: { + message.diskType = reader.string(); + break; + } + case 8: { + message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.bootDiskKmsKey = reader.string(); + break; + } + case 10: { + message.imageType = reader.string(); + break; + } + case 13: { + message.insecureKubeletReadonlyPortEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoprovisioningNodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoprovisioningNodePoolDefaults message. + * @function verify + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoprovisioningNodePoolDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { + var error = $root.google.container.v1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); + if (error) + return "shieldedInstanceConfig." + error; + } + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + if (!$util.isString(message.bootDiskKmsKey)) + return "bootDiskKmsKey: string expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + properties._insecureKubeletReadonlyPortEnabled = 1; + if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") + return "insecureKubeletReadonlyPortEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates an AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + */ + AutoprovisioningNodePoolDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AutoprovisioningNodePoolDefaults) + return object; + var message = new $root.google.container.v1.AutoprovisioningNodePoolDefaults(); + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.management: object expected"); + message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.shieldedInstanceConfig != null) { + if (typeof object.shieldedInstanceConfig !== "object") + throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.shieldedInstanceConfig: object expected"); + message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); + } + if (object.bootDiskKmsKey != null) + message.bootDiskKmsKey = String(object.bootDiskKmsKey); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.insecureKubeletReadonlyPortEnabled != null) + message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); + return message; + }; + + /** + * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1.AutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoprovisioningNodePoolDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.oauthScopes = []; + if (options.defaults) { + object.serviceAccount = ""; + object.upgradeSettings = null; + object.management = null; + object.minCpuPlatform = ""; + object.diskSizeGb = 0; + object.diskType = ""; + object.shieldedInstanceConfig = null; + object.bootDiskKmsKey = ""; + object.imageType = ""; + } + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + object.minCpuPlatform = message.minCpuPlatform; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) + object.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + object.bootDiskKmsKey = message.bootDiskKmsKey; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; + if (options.oneofs) + object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; + } + return object; + }; + + /** + * Converts this AutoprovisioningNodePoolDefaults to JSON. + * @function toJSON + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @instance + * @returns {Object.} JSON object + */ + AutoprovisioningNodePoolDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoprovisioningNodePoolDefaults + * @function getTypeUrl + * @memberof google.container.v1.AutoprovisioningNodePoolDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoprovisioningNodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AutoprovisioningNodePoolDefaults"; + }; + + return AutoprovisioningNodePoolDefaults; + })(); + + v1.ResourceLimit = (function() { + + /** + * Properties of a ResourceLimit. + * @memberof google.container.v1 + * @interface IResourceLimit + * @property {string|null} [resourceType] ResourceLimit resourceType + * @property {number|Long|null} [minimum] ResourceLimit minimum + * @property {number|Long|null} [maximum] ResourceLimit maximum + */ + + /** + * Constructs a new ResourceLimit. + * @memberof google.container.v1 + * @classdesc Represents a ResourceLimit. + * @implements IResourceLimit + * @constructor + * @param {google.container.v1.IResourceLimit=} [properties] Properties to set + */ + function ResourceLimit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceLimit resourceType. + * @member {string} resourceType + * @memberof google.container.v1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.resourceType = ""; + + /** + * ResourceLimit minimum. + * @member {number|Long} minimum + * @memberof google.container.v1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.minimum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResourceLimit maximum. + * @member {number|Long} maximum + * @memberof google.container.v1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.maximum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ResourceLimit instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceLimit + * @static + * @param {google.container.v1.IResourceLimit=} [properties] Properties to set + * @returns {google.container.v1.ResourceLimit} ResourceLimit instance + */ + ResourceLimit.create = function create(properties) { + return new ResourceLimit(properties); + }; + + /** + * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceLimit + * @static + * @param {google.container.v1.IResourceLimit} message ResourceLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLimit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.minimum); + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maximum); + return writer; + }; + + /** + * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceLimit + * @static + * @param {google.container.v1.IResourceLimit} message ResourceLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLimit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceLimit} ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLimit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceLimit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.minimum = reader.int64(); + break; + } + case 3: { + message.maximum = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceLimit} ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLimit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceLimit message. + * @function verify + * @memberof google.container.v1.ResourceLimit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLimit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.minimum != null && message.hasOwnProperty("minimum")) + if (!$util.isInteger(message.minimum) && !(message.minimum && $util.isInteger(message.minimum.low) && $util.isInteger(message.minimum.high))) + return "minimum: integer|Long expected"; + if (message.maximum != null && message.hasOwnProperty("maximum")) + if (!$util.isInteger(message.maximum) && !(message.maximum && $util.isInteger(message.maximum.low) && $util.isInteger(message.maximum.high))) + return "maximum: integer|Long expected"; + return null; + }; + + /** + * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceLimit + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceLimit} ResourceLimit + */ + ResourceLimit.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceLimit) + return object; + var message = new $root.google.container.v1.ResourceLimit(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.minimum != null) + if ($util.Long) + (message.minimum = $util.Long.fromValue(object.minimum)).unsigned = false; + else if (typeof object.minimum === "string") + message.minimum = parseInt(object.minimum, 10); + else if (typeof object.minimum === "number") + message.minimum = object.minimum; + else if (typeof object.minimum === "object") + message.minimum = new $util.LongBits(object.minimum.low >>> 0, object.minimum.high >>> 0).toNumber(); + if (object.maximum != null) + if ($util.Long) + (message.maximum = $util.Long.fromValue(object.maximum)).unsigned = false; + else if (typeof object.maximum === "string") + message.maximum = parseInt(object.maximum, 10); + else if (typeof object.maximum === "number") + message.maximum = object.maximum; + else if (typeof object.maximum === "object") + message.maximum = new $util.LongBits(object.maximum.low >>> 0, object.maximum.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceLimit + * @static + * @param {google.container.v1.ResourceLimit} message ResourceLimit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLimit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minimum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minimum = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maximum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maximum = options.longs === String ? "0" : 0; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.minimum != null && message.hasOwnProperty("minimum")) + if (typeof message.minimum === "number") + object.minimum = options.longs === String ? String(message.minimum) : message.minimum; + else + object.minimum = options.longs === String ? $util.Long.prototype.toString.call(message.minimum) : options.longs === Number ? new $util.LongBits(message.minimum.low >>> 0, message.minimum.high >>> 0).toNumber() : message.minimum; + if (message.maximum != null && message.hasOwnProperty("maximum")) + if (typeof message.maximum === "number") + object.maximum = options.longs === String ? String(message.maximum) : message.maximum; + else + object.maximum = options.longs === String ? $util.Long.prototype.toString.call(message.maximum) : options.longs === Number ? new $util.LongBits(message.maximum.low >>> 0, message.maximum.high >>> 0).toNumber() : message.maximum; + return object; + }; + + /** + * Converts this ResourceLimit to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceLimit + * @instance + * @returns {Object.} JSON object + */ + ResourceLimit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceLimit + * @function getTypeUrl + * @memberof google.container.v1.ResourceLimit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceLimit"; + }; + + return ResourceLimit; + })(); + + v1.NodePoolAutoscaling = (function() { + + /** + * Properties of a NodePoolAutoscaling. + * @memberof google.container.v1 + * @interface INodePoolAutoscaling + * @property {boolean|null} [enabled] NodePoolAutoscaling enabled + * @property {number|null} [minNodeCount] NodePoolAutoscaling minNodeCount + * @property {number|null} [maxNodeCount] NodePoolAutoscaling maxNodeCount + * @property {boolean|null} [autoprovisioned] NodePoolAutoscaling autoprovisioned + * @property {google.container.v1.NodePoolAutoscaling.LocationPolicy|null} [locationPolicy] NodePoolAutoscaling locationPolicy + * @property {number|null} [totalMinNodeCount] NodePoolAutoscaling totalMinNodeCount + * @property {number|null} [totalMaxNodeCount] NodePoolAutoscaling totalMaxNodeCount + */ + + /** + * Constructs a new NodePoolAutoscaling. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolAutoscaling. + * @implements INodePoolAutoscaling + * @constructor + * @param {google.container.v1.INodePoolAutoscaling=} [properties] Properties to set + */ + function NodePoolAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolAutoscaling enabled. + * @member {boolean} enabled + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.enabled = false; + + /** + * NodePoolAutoscaling minNodeCount. + * @member {number} minNodeCount + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.minNodeCount = 0; + + /** + * NodePoolAutoscaling maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.maxNodeCount = 0; + + /** + * NodePoolAutoscaling autoprovisioned. + * @member {boolean} autoprovisioned + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.autoprovisioned = false; + + /** + * NodePoolAutoscaling locationPolicy. + * @member {google.container.v1.NodePoolAutoscaling.LocationPolicy} locationPolicy + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.locationPolicy = 0; + + /** + * NodePoolAutoscaling totalMinNodeCount. + * @member {number} totalMinNodeCount + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.totalMinNodeCount = 0; + + /** + * NodePoolAutoscaling totalMaxNodeCount. + * @member {number} totalMaxNodeCount + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.totalMaxNodeCount = 0; + + /** + * Creates a new NodePoolAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {google.container.v1.INodePoolAutoscaling=} [properties] Properties to set + * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling instance + */ + NodePoolAutoscaling.create = function create(properties) { + return new NodePoolAutoscaling(properties); + }; + + /** + * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {google.container.v1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minNodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); + if (message.autoprovisioned != null && Object.hasOwnProperty.call(message, "autoprovisioned")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autoprovisioned); + if (message.locationPolicy != null && Object.hasOwnProperty.call(message, "locationPolicy")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.locationPolicy); + if (message.totalMinNodeCount != null && Object.hasOwnProperty.call(message, "totalMinNodeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalMinNodeCount); + if (message.totalMaxNodeCount != null && Object.hasOwnProperty.call(message, "totalMaxNodeCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.totalMaxNodeCount); + return writer; + }; + + /** + * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {google.container.v1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.minNodeCount = reader.int32(); + break; + } + case 3: { + message.maxNodeCount = reader.int32(); + break; + } + case 4: { + message.autoprovisioned = reader.bool(); + break; + } + case 5: { + message.locationPolicy = reader.int32(); + break; + } + case 6: { + message.totalMinNodeCount = reader.int32(); + break; + } + case 7: { + message.totalMaxNodeCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolAutoscaling message. + * @function verify + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean 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.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) + if (typeof message.autoprovisioned !== "boolean") + return "autoprovisioned: boolean expected"; + if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) + switch (message.locationPolicy) { + default: + return "locationPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) + if (!$util.isInteger(message.totalMinNodeCount)) + return "totalMinNodeCount: integer expected"; + if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) + if (!$util.isInteger(message.totalMaxNodeCount)) + return "totalMaxNodeCount: integer expected"; + return null; + }; + + /** + * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling + */ + NodePoolAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolAutoscaling) + return object; + var message = new $root.google.container.v1.NodePoolAutoscaling(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.minNodeCount != null) + message.minNodeCount = object.minNodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; + if (object.autoprovisioned != null) + message.autoprovisioned = Boolean(object.autoprovisioned); + switch (object.locationPolicy) { + default: + if (typeof object.locationPolicy === "number") { + message.locationPolicy = object.locationPolicy; + break; + } + break; + case "LOCATION_POLICY_UNSPECIFIED": + case 0: + message.locationPolicy = 0; + break; + case "BALANCED": + case 1: + message.locationPolicy = 1; + break; + case "ANY": + case 2: + message.locationPolicy = 2; + break; + } + if (object.totalMinNodeCount != null) + message.totalMinNodeCount = object.totalMinNodeCount | 0; + if (object.totalMaxNodeCount != null) + message.totalMaxNodeCount = object.totalMaxNodeCount | 0; + return message; + }; + + /** + * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {google.container.v1.NodePoolAutoscaling} message NodePoolAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.minNodeCount = 0; + object.maxNodeCount = 0; + object.autoprovisioned = false; + object.locationPolicy = options.enums === String ? "LOCATION_POLICY_UNSPECIFIED" : 0; + object.totalMinNodeCount = 0; + object.totalMaxNodeCount = 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + object.minNodeCount = message.minNodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; + if (message.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) + object.autoprovisioned = message.autoprovisioned; + if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) + object.locationPolicy = options.enums === String ? $root.google.container.v1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] === undefined ? message.locationPolicy : $root.google.container.v1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] : message.locationPolicy; + if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) + object.totalMinNodeCount = message.totalMinNodeCount; + if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) + object.totalMaxNodeCount = message.totalMaxNodeCount; + return object; + }; + + /** + * Converts this NodePoolAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolAutoscaling + * @instance + * @returns {Object.} JSON object + */ + NodePoolAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolAutoscaling + * @function getTypeUrl + * @memberof google.container.v1.NodePoolAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolAutoscaling"; + }; + + /** + * LocationPolicy enum. + * @name google.container.v1.NodePoolAutoscaling.LocationPolicy + * @enum {number} + * @property {number} LOCATION_POLICY_UNSPECIFIED=0 LOCATION_POLICY_UNSPECIFIED value + * @property {number} BALANCED=1 BALANCED value + * @property {number} ANY=2 ANY value + */ + NodePoolAutoscaling.LocationPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "BALANCED"] = 1; + values[valuesById[2] = "ANY"] = 2; + return values; + })(); + + return NodePoolAutoscaling; + })(); + + v1.SetLabelsRequest = (function() { + + /** + * Properties of a SetLabelsRequest. + * @memberof google.container.v1 + * @interface ISetLabelsRequest + * @property {string|null} [projectId] SetLabelsRequest projectId + * @property {string|null} [zone] SetLabelsRequest zone + * @property {string|null} [clusterId] SetLabelsRequest clusterId + * @property {Object.|null} [resourceLabels] SetLabelsRequest resourceLabels + * @property {string|null} [labelFingerprint] SetLabelsRequest labelFingerprint + * @property {string|null} [name] SetLabelsRequest name + */ + + /** + * Constructs a new SetLabelsRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetLabelsRequest. + * @implements ISetLabelsRequest + * @constructor + * @param {google.container.v1.ISetLabelsRequest=} [properties] Properties to set + */ + function SetLabelsRequest(properties) { + this.resourceLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLabelsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.projectId = ""; + + /** + * SetLabelsRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.zone = ""; + + /** + * SetLabelsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.clusterId = ""; + + /** + * SetLabelsRequest resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.resourceLabels = $util.emptyObject; + + /** + * SetLabelsRequest labelFingerprint. + * @member {string} labelFingerprint + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.labelFingerprint = ""; + + /** + * SetLabelsRequest name. + * @member {string} name + * @memberof google.container.v1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.name = ""; + + /** + * Creates a new SetLabelsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {google.container.v1.ISetLabelsRequest=} [properties] Properties to set + * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest instance + */ + SetLabelsRequest.create = function create(properties) { + return new SetLabelsRequest(properties); + }; + + /** + * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {google.container.v1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLabelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), 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.resourceLabels[keys[i]]).ldelim(); + if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.labelFingerprint); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {google.container.v1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLabelsRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 5: { + message.labelFingerprint = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLabelsRequest message. + * @function verify + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLabelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + if (!$util.isString(message.labelFingerprint)) + return "labelFingerprint: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest + */ + SetLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetLabelsRequest) + return object; + var message = new $root.google.container.v1.SetLabelsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1.SetLabelsRequest.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.labelFingerprint != null) + message.labelFingerprint = String(object.labelFingerprint); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {google.container.v1.SetLabelsRequest} message SetLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLabelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceLabels = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.labelFingerprint = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + var keys2; + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + object.labelFingerprint = message.labelFingerprint; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLabelsRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + SetLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLabelsRequest + * @function getTypeUrl + * @memberof google.container.v1.SetLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetLabelsRequest"; + }; + + return SetLabelsRequest; + })(); + + v1.SetLegacyAbacRequest = (function() { + + /** + * Properties of a SetLegacyAbacRequest. + * @memberof google.container.v1 + * @interface ISetLegacyAbacRequest + * @property {string|null} [projectId] SetLegacyAbacRequest projectId + * @property {string|null} [zone] SetLegacyAbacRequest zone + * @property {string|null} [clusterId] SetLegacyAbacRequest clusterId + * @property {boolean|null} [enabled] SetLegacyAbacRequest enabled + * @property {string|null} [name] SetLegacyAbacRequest name + */ + + /** + * Constructs a new SetLegacyAbacRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetLegacyAbacRequest. + * @implements ISetLegacyAbacRequest + * @constructor + * @param {google.container.v1.ISetLegacyAbacRequest=} [properties] Properties to set + */ + function SetLegacyAbacRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLegacyAbacRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.projectId = ""; + + /** + * SetLegacyAbacRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.zone = ""; + + /** + * SetLegacyAbacRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.clusterId = ""; + + /** + * SetLegacyAbacRequest enabled. + * @member {boolean} enabled + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.enabled = false; + + /** + * SetLegacyAbacRequest name. + * @member {string} name + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.name = ""; + + /** + * Creates a new SetLegacyAbacRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {google.container.v1.ISetLegacyAbacRequest=} [properties] Properties to set + * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest instance + */ + SetLegacyAbacRequest.create = function create(properties) { + return new SetLegacyAbacRequest(properties); + }; + + /** + * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {google.container.v1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLegacyAbacRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {google.container.v1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLegacyAbacRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLegacyAbacRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLegacyAbacRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.enabled = reader.bool(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLegacyAbacRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLegacyAbacRequest message. + * @function verify + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLegacyAbacRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest + */ + SetLegacyAbacRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetLegacyAbacRequest) + return object; + var message = new $root.google.container.v1.SetLegacyAbacRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {google.container.v1.SetLegacyAbacRequest} message SetLegacyAbacRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLegacyAbacRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.enabled = false; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLegacyAbacRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetLegacyAbacRequest + * @instance + * @returns {Object.} JSON object + */ + SetLegacyAbacRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLegacyAbacRequest + * @function getTypeUrl + * @memberof google.container.v1.SetLegacyAbacRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLegacyAbacRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetLegacyAbacRequest"; + }; + + return SetLegacyAbacRequest; + })(); + + v1.StartIPRotationRequest = (function() { + + /** + * Properties of a StartIPRotationRequest. + * @memberof google.container.v1 + * @interface IStartIPRotationRequest + * @property {string|null} [projectId] StartIPRotationRequest projectId + * @property {string|null} [zone] StartIPRotationRequest zone + * @property {string|null} [clusterId] StartIPRotationRequest clusterId + * @property {string|null} [name] StartIPRotationRequest name + * @property {boolean|null} [rotateCredentials] StartIPRotationRequest rotateCredentials + */ + + /** + * Constructs a new StartIPRotationRequest. + * @memberof google.container.v1 + * @classdesc Represents a StartIPRotationRequest. + * @implements IStartIPRotationRequest + * @constructor + * @param {google.container.v1.IStartIPRotationRequest=} [properties] Properties to set + */ + function StartIPRotationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartIPRotationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.projectId = ""; + + /** + * StartIPRotationRequest zone. + * @member {string} zone + * @memberof google.container.v1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.zone = ""; + + /** + * StartIPRotationRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.clusterId = ""; + + /** + * StartIPRotationRequest name. + * @member {string} name + * @memberof google.container.v1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.name = ""; + + /** + * StartIPRotationRequest rotateCredentials. + * @member {boolean} rotateCredentials + * @memberof google.container.v1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.rotateCredentials = false; + + /** + * Creates a new StartIPRotationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {google.container.v1.IStartIPRotationRequest=} [properties] Properties to set + * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest instance + */ + StartIPRotationRequest.create = function create(properties) { + return new StartIPRotationRequest(properties); + }; + + /** + * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {google.container.v1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartIPRotationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.rotateCredentials != null && Object.hasOwnProperty.call(message, "rotateCredentials")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.rotateCredentials); + return writer; + }; + + /** + * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {google.container.v1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartIPRotationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StartIPRotationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + message.rotateCredentials = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartIPRotationRequest message. + * @function verify + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartIPRotationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) + if (typeof message.rotateCredentials !== "boolean") + return "rotateCredentials: boolean expected"; + return null; + }; + + /** + * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest + */ + StartIPRotationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.StartIPRotationRequest) + return object; + var message = new $root.google.container.v1.StartIPRotationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + if (object.rotateCredentials != null) + message.rotateCredentials = Boolean(object.rotateCredentials); + return message; + }; + + /** + * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {google.container.v1.StartIPRotationRequest} message StartIPRotationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartIPRotationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + object.rotateCredentials = false; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) + object.rotateCredentials = message.rotateCredentials; + return object; + }; + + /** + * Converts this StartIPRotationRequest to JSON. + * @function toJSON + * @memberof google.container.v1.StartIPRotationRequest + * @instance + * @returns {Object.} JSON object + */ + StartIPRotationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartIPRotationRequest + * @function getTypeUrl + * @memberof google.container.v1.StartIPRotationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.StartIPRotationRequest"; + }; + + return StartIPRotationRequest; + })(); + + v1.CompleteIPRotationRequest = (function() { + + /** + * Properties of a CompleteIPRotationRequest. + * @memberof google.container.v1 + * @interface ICompleteIPRotationRequest + * @property {string|null} [projectId] CompleteIPRotationRequest projectId + * @property {string|null} [zone] CompleteIPRotationRequest zone + * @property {string|null} [clusterId] CompleteIPRotationRequest clusterId + * @property {string|null} [name] CompleteIPRotationRequest name + */ + + /** + * Constructs a new CompleteIPRotationRequest. + * @memberof google.container.v1 + * @classdesc Represents a CompleteIPRotationRequest. + * @implements ICompleteIPRotationRequest + * @constructor + * @param {google.container.v1.ICompleteIPRotationRequest=} [properties] Properties to set + */ + function CompleteIPRotationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteIPRotationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.projectId = ""; + + /** + * CompleteIPRotationRequest zone. + * @member {string} zone + * @memberof google.container.v1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.zone = ""; + + /** + * CompleteIPRotationRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.clusterId = ""; + + /** + * CompleteIPRotationRequest name. + * @member {string} name + * @memberof google.container.v1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.name = ""; + + /** + * Creates a new CompleteIPRotationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {google.container.v1.ICompleteIPRotationRequest=} [properties] Properties to set + * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest instance + */ + CompleteIPRotationRequest.create = function create(properties) { + return new CompleteIPRotationRequest(properties); + }; + + /** + * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {google.container.v1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteIPRotationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {google.container.v1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteIPRotationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompleteIPRotationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteIPRotationRequest message. + * @function verify + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteIPRotationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest + */ + CompleteIPRotationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompleteIPRotationRequest) + return object; + var message = new $root.google.container.v1.CompleteIPRotationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {google.container.v1.CompleteIPRotationRequest} message CompleteIPRotationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteIPRotationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CompleteIPRotationRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CompleteIPRotationRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteIPRotationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteIPRotationRequest + * @function getTypeUrl + * @memberof google.container.v1.CompleteIPRotationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CompleteIPRotationRequest"; + }; + + return CompleteIPRotationRequest; + })(); + + v1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.container.v1 + * @interface IAcceleratorConfig + * @property {number|Long|null} [acceleratorCount] AcceleratorConfig acceleratorCount + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {string|null} [gpuPartitionSize] AcceleratorConfig gpuPartitionSize + * @property {google.container.v1.IGPUSharingConfig|null} [gpuSharingConfig] AcceleratorConfig gpuSharingConfig + * @property {google.container.v1.IGPUDriverInstallationConfig|null} [gpuDriverInstallationConfig] AcceleratorConfig gpuDriverInstallationConfig + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.container.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.container.v1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|Long} acceleratorCount + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AcceleratorConfig acceleratorType. + * @member {string} acceleratorType + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = ""; + + /** + * AcceleratorConfig gpuPartitionSize. + * @member {string} gpuPartitionSize + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuPartitionSize = ""; + + /** + * AcceleratorConfig gpuSharingConfig. + * @member {google.container.v1.IGPUSharingConfig|null|undefined} gpuSharingConfig + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuSharingConfig = null; + + /** + * AcceleratorConfig gpuDriverInstallationConfig. + * @member {google.container.v1.IGPUDriverInstallationConfig|null|undefined} gpuDriverInstallationConfig + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuDriverInstallationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _gpuSharingConfig. + * @member {"gpuSharingConfig"|undefined} _gpuSharingConfig + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_gpuSharingConfig", { + get: $util.oneOfGetter($oneOfFields = ["gpuSharingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _gpuDriverInstallationConfig. + * @member {"gpuDriverInstallationConfig"|undefined} _gpuDriverInstallationConfig + * @memberof google.container.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_gpuDriverInstallationConfig", { + get: $util.oneOfGetter($oneOfFields = ["gpuDriverInstallationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {google.container.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {google.container.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.acceleratorCount); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.acceleratorType); + if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gpuPartitionSize); + if (message.gpuSharingConfig != null && Object.hasOwnProperty.call(message, "gpuSharingConfig")) + $root.google.container.v1.GPUSharingConfig.encode(message.gpuSharingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.gpuDriverInstallationConfig != null && Object.hasOwnProperty.call(message, "gpuDriverInstallationConfig")) + $root.google.container.v1.GPUDriverInstallationConfig.encode(message.gpuDriverInstallationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {google.container.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorCount = reader.int64(); + break; + } + case 2: { + message.acceleratorType = reader.string(); + break; + } + case 3: { + message.gpuPartitionSize = reader.string(); + break; + } + case 5: { + message.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) + if (!$util.isInteger(message.acceleratorCount) && !(message.acceleratorCount && $util.isInteger(message.acceleratorCount.low) && $util.isInteger(message.acceleratorCount.high))) + return "acceleratorCount: integer|Long expected"; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + if (!$util.isString(message.gpuPartitionSize)) + return "gpuPartitionSize: string expected"; + if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { + properties._gpuSharingConfig = 1; + { + var error = $root.google.container.v1.GPUSharingConfig.verify(message.gpuSharingConfig); + if (error) + return "gpuSharingConfig." + error; + } + } + if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { + properties._gpuDriverInstallationConfig = 1; + { + var error = $root.google.container.v1.GPUDriverInstallationConfig.verify(message.gpuDriverInstallationConfig); + if (error) + return "gpuDriverInstallationConfig." + error; + } + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AcceleratorConfig) + return object; + var message = new $root.google.container.v1.AcceleratorConfig(); + if (object.acceleratorCount != null) + if ($util.Long) + (message.acceleratorCount = $util.Long.fromValue(object.acceleratorCount)).unsigned = false; + else if (typeof object.acceleratorCount === "string") + message.acceleratorCount = parseInt(object.acceleratorCount, 10); + else if (typeof object.acceleratorCount === "number") + message.acceleratorCount = object.acceleratorCount; + else if (typeof object.acceleratorCount === "object") + message.acceleratorCount = new $util.LongBits(object.acceleratorCount.low >>> 0, object.acceleratorCount.high >>> 0).toNumber(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.gpuPartitionSize != null) + message.gpuPartitionSize = String(object.gpuPartitionSize); + if (object.gpuSharingConfig != null) { + if (typeof object.gpuSharingConfig !== "object") + throw TypeError(".google.container.v1.AcceleratorConfig.gpuSharingConfig: object expected"); + message.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.fromObject(object.gpuSharingConfig); + } + if (object.gpuDriverInstallationConfig != null) { + if (typeof object.gpuDriverInstallationConfig !== "object") + throw TypeError(".google.container.v1.AcceleratorConfig.gpuDriverInstallationConfig: object expected"); + message.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.fromObject(object.gpuDriverInstallationConfig); + } + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {google.container.v1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.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.acceleratorCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.acceleratorCount = options.longs === String ? "0" : 0; + object.acceleratorType = ""; + object.gpuPartitionSize = ""; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) + if (typeof message.acceleratorCount === "number") + object.acceleratorCount = options.longs === String ? String(message.acceleratorCount) : message.acceleratorCount; + else + object.acceleratorCount = options.longs === String ? $util.Long.prototype.toString.call(message.acceleratorCount) : options.longs === Number ? new $util.LongBits(message.acceleratorCount.low >>> 0, message.acceleratorCount.high >>> 0).toNumber() : message.acceleratorCount; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) + object.acceleratorType = message.acceleratorType; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + object.gpuPartitionSize = message.gpuPartitionSize; + if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { + object.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.toObject(message.gpuSharingConfig, options); + if (options.oneofs) + object._gpuSharingConfig = "gpuSharingConfig"; + } + if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { + object.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.toObject(message.gpuDriverInstallationConfig, options); + if (options.oneofs) + object._gpuDriverInstallationConfig = "gpuDriverInstallationConfig"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.container.v1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1.GPUSharingConfig = (function() { + + /** + * Properties of a GPUSharingConfig. + * @memberof google.container.v1 + * @interface IGPUSharingConfig + * @property {number|Long|null} [maxSharedClientsPerGpu] GPUSharingConfig maxSharedClientsPerGpu + * @property {google.container.v1.GPUSharingConfig.GPUSharingStrategy|null} [gpuSharingStrategy] GPUSharingConfig gpuSharingStrategy + */ + + /** + * Constructs a new GPUSharingConfig. + * @memberof google.container.v1 + * @classdesc Represents a GPUSharingConfig. + * @implements IGPUSharingConfig + * @constructor + * @param {google.container.v1.IGPUSharingConfig=} [properties] Properties to set + */ + function GPUSharingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GPUSharingConfig maxSharedClientsPerGpu. + * @member {number|Long} maxSharedClientsPerGpu + * @memberof google.container.v1.GPUSharingConfig + * @instance + */ + GPUSharingConfig.prototype.maxSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GPUSharingConfig gpuSharingStrategy. + * @member {google.container.v1.GPUSharingConfig.GPUSharingStrategy|null|undefined} gpuSharingStrategy + * @memberof google.container.v1.GPUSharingConfig + * @instance + */ + GPUSharingConfig.prototype.gpuSharingStrategy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GPUSharingConfig _gpuSharingStrategy. + * @member {"gpuSharingStrategy"|undefined} _gpuSharingStrategy + * @memberof google.container.v1.GPUSharingConfig + * @instance + */ + Object.defineProperty(GPUSharingConfig.prototype, "_gpuSharingStrategy", { + get: $util.oneOfGetter($oneOfFields = ["gpuSharingStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GPUSharingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {google.container.v1.IGPUSharingConfig=} [properties] Properties to set + * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig instance + */ + GPUSharingConfig.create = function create(properties) { + return new GPUSharingConfig(properties); + }; + + /** + * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {google.container.v1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUSharingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxSharedClientsPerGpu")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxSharedClientsPerGpu); + if (message.gpuSharingStrategy != null && Object.hasOwnProperty.call(message, "gpuSharingStrategy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gpuSharingStrategy); + return writer; + }; + + /** + * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {google.container.v1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUSharingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUSharingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GPUSharingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxSharedClientsPerGpu = reader.int64(); + break; + } + case 2: { + message.gpuSharingStrategy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUSharingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GPUSharingConfig message. + * @function verify + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GPUSharingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) + if (!$util.isInteger(message.maxSharedClientsPerGpu) && !(message.maxSharedClientsPerGpu && $util.isInteger(message.maxSharedClientsPerGpu.low) && $util.isInteger(message.maxSharedClientsPerGpu.high))) + return "maxSharedClientsPerGpu: integer|Long expected"; + if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { + properties._gpuSharingStrategy = 1; + switch (message.gpuSharingStrategy) { + default: + return "gpuSharingStrategy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig + */ + GPUSharingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GPUSharingConfig) + return object; + var message = new $root.google.container.v1.GPUSharingConfig(); + if (object.maxSharedClientsPerGpu != null) + if ($util.Long) + (message.maxSharedClientsPerGpu = $util.Long.fromValue(object.maxSharedClientsPerGpu)).unsigned = false; + else if (typeof object.maxSharedClientsPerGpu === "string") + message.maxSharedClientsPerGpu = parseInt(object.maxSharedClientsPerGpu, 10); + else if (typeof object.maxSharedClientsPerGpu === "number") + message.maxSharedClientsPerGpu = object.maxSharedClientsPerGpu; + else if (typeof object.maxSharedClientsPerGpu === "object") + message.maxSharedClientsPerGpu = new $util.LongBits(object.maxSharedClientsPerGpu.low >>> 0, object.maxSharedClientsPerGpu.high >>> 0).toNumber(); + switch (object.gpuSharingStrategy) { + default: + if (typeof object.gpuSharingStrategy === "number") { + message.gpuSharingStrategy = object.gpuSharingStrategy; + break; + } + break; + case "GPU_SHARING_STRATEGY_UNSPECIFIED": + case 0: + message.gpuSharingStrategy = 0; + break; + case "TIME_SHARING": + case 1: + message.gpuSharingStrategy = 1; + break; + case "MPS": + case 2: + message.gpuSharingStrategy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {google.container.v1.GPUSharingConfig} message GPUSharingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GPUSharingConfig.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.maxSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxSharedClientsPerGpu = options.longs === String ? "0" : 0; + if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) + if (typeof message.maxSharedClientsPerGpu === "number") + object.maxSharedClientsPerGpu = options.longs === String ? String(message.maxSharedClientsPerGpu) : message.maxSharedClientsPerGpu; + else + object.maxSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxSharedClientsPerGpu.low >>> 0, message.maxSharedClientsPerGpu.high >>> 0).toNumber() : message.maxSharedClientsPerGpu; + if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { + object.gpuSharingStrategy = options.enums === String ? $root.google.container.v1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] === undefined ? message.gpuSharingStrategy : $root.google.container.v1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] : message.gpuSharingStrategy; + if (options.oneofs) + object._gpuSharingStrategy = "gpuSharingStrategy"; + } + return object; + }; + + /** + * Converts this GPUSharingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GPUSharingConfig + * @instance + * @returns {Object.} JSON object + */ + GPUSharingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GPUSharingConfig + * @function getTypeUrl + * @memberof google.container.v1.GPUSharingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GPUSharingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GPUSharingConfig"; + }; + + /** + * GPUSharingStrategy enum. + * @name google.container.v1.GPUSharingConfig.GPUSharingStrategy + * @enum {number} + * @property {number} GPU_SHARING_STRATEGY_UNSPECIFIED=0 GPU_SHARING_STRATEGY_UNSPECIFIED value + * @property {number} TIME_SHARING=1 TIME_SHARING value + * @property {number} MPS=2 MPS value + */ + GPUSharingConfig.GPUSharingStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_SHARING_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIME_SHARING"] = 1; + values[valuesById[2] = "MPS"] = 2; + return values; + })(); + + return GPUSharingConfig; + })(); + + v1.GPUDriverInstallationConfig = (function() { + + /** + * Properties of a GPUDriverInstallationConfig. + * @memberof google.container.v1 + * @interface IGPUDriverInstallationConfig + * @property {google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null} [gpuDriverVersion] GPUDriverInstallationConfig gpuDriverVersion + */ + + /** + * Constructs a new GPUDriverInstallationConfig. + * @memberof google.container.v1 + * @classdesc Represents a GPUDriverInstallationConfig. + * @implements IGPUDriverInstallationConfig + * @constructor + * @param {google.container.v1.IGPUDriverInstallationConfig=} [properties] Properties to set + */ + function GPUDriverInstallationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GPUDriverInstallationConfig gpuDriverVersion. + * @member {google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null|undefined} gpuDriverVersion + * @memberof google.container.v1.GPUDriverInstallationConfig + * @instance + */ + GPUDriverInstallationConfig.prototype.gpuDriverVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GPUDriverInstallationConfig _gpuDriverVersion. + * @member {"gpuDriverVersion"|undefined} _gpuDriverVersion + * @memberof google.container.v1.GPUDriverInstallationConfig + * @instance + */ + Object.defineProperty(GPUDriverInstallationConfig.prototype, "_gpuDriverVersion", { + get: $util.oneOfGetter($oneOfFields = ["gpuDriverVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GPUDriverInstallationConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1.IGPUDriverInstallationConfig=} [properties] Properties to set + * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig instance + */ + GPUDriverInstallationConfig.create = function create(properties) { + return new GPUDriverInstallationConfig(properties); + }; + + /** + * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUDriverInstallationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gpuDriverVersion != null && Object.hasOwnProperty.call(message, "gpuDriverVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gpuDriverVersion); + return writer; + }; + + /** + * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUDriverInstallationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUDriverInstallationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GPUDriverInstallationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gpuDriverVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUDriverInstallationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GPUDriverInstallationConfig message. + * @function verify + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GPUDriverInstallationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { + properties._gpuDriverVersion = 1; + switch (message.gpuDriverVersion) { + default: + return "gpuDriverVersion: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + */ + GPUDriverInstallationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GPUDriverInstallationConfig) + return object; + var message = new $root.google.container.v1.GPUDriverInstallationConfig(); + switch (object.gpuDriverVersion) { + default: + if (typeof object.gpuDriverVersion === "number") { + message.gpuDriverVersion = object.gpuDriverVersion; + break; + } + break; + case "GPU_DRIVER_VERSION_UNSPECIFIED": + case 0: + message.gpuDriverVersion = 0; + break; + case "INSTALLATION_DISABLED": + case 1: + message.gpuDriverVersion = 1; + break; + case "DEFAULT": + case 2: + message.gpuDriverVersion = 2; + break; + case "LATEST": + case 3: + message.gpuDriverVersion = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1.GPUDriverInstallationConfig} message GPUDriverInstallationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GPUDriverInstallationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { + object.gpuDriverVersion = options.enums === String ? $root.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] === undefined ? message.gpuDriverVersion : $root.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] : message.gpuDriverVersion; + if (options.oneofs) + object._gpuDriverVersion = "gpuDriverVersion"; + } + return object; + }; + + /** + * Converts this GPUDriverInstallationConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GPUDriverInstallationConfig + * @instance + * @returns {Object.} JSON object + */ + GPUDriverInstallationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GPUDriverInstallationConfig + * @function getTypeUrl + * @memberof google.container.v1.GPUDriverInstallationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GPUDriverInstallationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GPUDriverInstallationConfig"; + }; + + /** + * GPUDriverVersion enum. + * @name google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion + * @enum {number} + * @property {number} GPU_DRIVER_VERSION_UNSPECIFIED=0 GPU_DRIVER_VERSION_UNSPECIFIED value + * @property {number} INSTALLATION_DISABLED=1 INSTALLATION_DISABLED value + * @property {number} DEFAULT=2 DEFAULT value + * @property {number} LATEST=3 LATEST value + */ + GPUDriverInstallationConfig.GPUDriverVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_DRIVER_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLATION_DISABLED"] = 1; + values[valuesById[2] = "DEFAULT"] = 2; + values[valuesById[3] = "LATEST"] = 3; + return values; + })(); + + return GPUDriverInstallationConfig; + })(); + + v1.WorkloadMetadataConfig = (function() { + + /** + * Properties of a WorkloadMetadataConfig. + * @memberof google.container.v1 + * @interface IWorkloadMetadataConfig + * @property {google.container.v1.WorkloadMetadataConfig.Mode|null} [mode] WorkloadMetadataConfig mode + */ + + /** + * Constructs a new WorkloadMetadataConfig. + * @memberof google.container.v1 + * @classdesc Represents a WorkloadMetadataConfig. + * @implements IWorkloadMetadataConfig + * @constructor + * @param {google.container.v1.IWorkloadMetadataConfig=} [properties] Properties to set + */ + function WorkloadMetadataConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadMetadataConfig mode. + * @member {google.container.v1.WorkloadMetadataConfig.Mode} mode + * @memberof google.container.v1.WorkloadMetadataConfig + * @instance + */ + WorkloadMetadataConfig.prototype.mode = 0; + + /** + * Creates a new WorkloadMetadataConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {google.container.v1.IWorkloadMetadataConfig=} [properties] Properties to set + * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig instance + */ + WorkloadMetadataConfig.create = function create(properties) { + return new WorkloadMetadataConfig(properties); + }; + + /** + * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {google.container.v1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadMetadataConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {google.container.v1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadMetadataConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadMetadataConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadMetadataConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadMetadataConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadMetadataConfig message. + * @function verify + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadMetadataConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig + */ + WorkloadMetadataConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.WorkloadMetadataConfig) + return object; + var message = new $root.google.container.v1.WorkloadMetadataConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "GCE_METADATA": + case 1: + message.mode = 1; + break; + case "GKE_METADATA": + case 2: + message.mode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {google.container.v1.WorkloadMetadataConfig} message WorkloadMetadataConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadMetadataConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.container.v1.WorkloadMetadataConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.WorkloadMetadataConfig.Mode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this WorkloadMetadataConfig to JSON. + * @function toJSON + * @memberof google.container.v1.WorkloadMetadataConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadMetadataConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadMetadataConfig + * @function getTypeUrl + * @memberof google.container.v1.WorkloadMetadataConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadMetadataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.WorkloadMetadataConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1.WorkloadMetadataConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} GCE_METADATA=1 GCE_METADATA value + * @property {number} GKE_METADATA=2 GKE_METADATA value + */ + WorkloadMetadataConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCE_METADATA"] = 1; + values[valuesById[2] = "GKE_METADATA"] = 2; + return values; + })(); + + return WorkloadMetadataConfig; + })(); + + v1.SetNetworkPolicyRequest = (function() { + + /** + * Properties of a SetNetworkPolicyRequest. + * @memberof google.container.v1 + * @interface ISetNetworkPolicyRequest + * @property {string|null} [projectId] SetNetworkPolicyRequest projectId + * @property {string|null} [zone] SetNetworkPolicyRequest zone + * @property {string|null} [clusterId] SetNetworkPolicyRequest clusterId + * @property {google.container.v1.INetworkPolicy|null} [networkPolicy] SetNetworkPolicyRequest networkPolicy + * @property {string|null} [name] SetNetworkPolicyRequest name + */ + + /** + * Constructs a new SetNetworkPolicyRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetNetworkPolicyRequest. + * @implements ISetNetworkPolicyRequest + * @constructor + * @param {google.container.v1.ISetNetworkPolicyRequest=} [properties] Properties to set + */ + function SetNetworkPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNetworkPolicyRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.projectId = ""; + + /** + * SetNetworkPolicyRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.zone = ""; + + /** + * SetNetworkPolicyRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.clusterId = ""; + + /** + * SetNetworkPolicyRequest networkPolicy. + * @member {google.container.v1.INetworkPolicy|null|undefined} networkPolicy + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.networkPolicy = null; + + /** + * SetNetworkPolicyRequest name. + * @member {string} name + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.name = ""; + + /** + * Creates a new SetNetworkPolicyRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1.ISetNetworkPolicyRequest=} [properties] Properties to set + * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest instance + */ + SetNetworkPolicyRequest.create = function create(properties) { + return new SetNetworkPolicyRequest(properties); + }; + + /** + * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNetworkPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) + $root.google.container.v1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNetworkPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNetworkPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNetworkPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.networkPolicy = $root.google.container.v1.NetworkPolicy.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNetworkPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNetworkPolicyRequest message. + * @function verify + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNetworkPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { + var error = $root.google.container.v1.NetworkPolicy.verify(message.networkPolicy); + if (error) + return "networkPolicy." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + */ + SetNetworkPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetNetworkPolicyRequest) + return object; + var message = new $root.google.container.v1.SetNetworkPolicyRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.networkPolicy != null) { + if (typeof object.networkPolicy !== "object") + throw TypeError(".google.container.v1.SetNetworkPolicyRequest.networkPolicy: object expected"); + message.networkPolicy = $root.google.container.v1.NetworkPolicy.fromObject(object.networkPolicy); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1.SetNetworkPolicyRequest} message SetNetworkPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNetworkPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.networkPolicy = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) + object.networkPolicy = $root.google.container.v1.NetworkPolicy.toObject(message.networkPolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNetworkPolicyRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetNetworkPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetNetworkPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNetworkPolicyRequest + * @function getTypeUrl + * @memberof google.container.v1.SetNetworkPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNetworkPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetNetworkPolicyRequest"; + }; + + return SetNetworkPolicyRequest; + })(); + + v1.SetMaintenancePolicyRequest = (function() { + + /** + * Properties of a SetMaintenancePolicyRequest. + * @memberof google.container.v1 + * @interface ISetMaintenancePolicyRequest + * @property {string|null} [projectId] SetMaintenancePolicyRequest projectId + * @property {string|null} [zone] SetMaintenancePolicyRequest zone + * @property {string|null} [clusterId] SetMaintenancePolicyRequest clusterId + * @property {google.container.v1.IMaintenancePolicy|null} [maintenancePolicy] SetMaintenancePolicyRequest maintenancePolicy + * @property {string|null} [name] SetMaintenancePolicyRequest name + */ + + /** + * Constructs a new SetMaintenancePolicyRequest. + * @memberof google.container.v1 + * @classdesc Represents a SetMaintenancePolicyRequest. + * @implements ISetMaintenancePolicyRequest + * @constructor + * @param {google.container.v1.ISetMaintenancePolicyRequest=} [properties] Properties to set + */ + function SetMaintenancePolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMaintenancePolicyRequest projectId. + * @member {string} projectId + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.projectId = ""; + + /** + * SetMaintenancePolicyRequest zone. + * @member {string} zone + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.zone = ""; + + /** + * SetMaintenancePolicyRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.clusterId = ""; + + /** + * SetMaintenancePolicyRequest maintenancePolicy. + * @member {google.container.v1.IMaintenancePolicy|null|undefined} maintenancePolicy + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.maintenancePolicy = null; + + /** + * SetMaintenancePolicyRequest name. + * @member {string} name + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.name = ""; + + /** + * Creates a new SetMaintenancePolicyRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1.ISetMaintenancePolicyRequest=} [properties] Properties to set + * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest instance + */ + SetMaintenancePolicyRequest.create = function create(properties) { + return new SetMaintenancePolicyRequest(properties); + }; + + /** + * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMaintenancePolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) + $root.google.container.v1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMaintenancePolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMaintenancePolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMaintenancePolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMaintenancePolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMaintenancePolicyRequest message. + * @function verify + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMaintenancePolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { + var error = $root.google.container.v1.MaintenancePolicy.verify(message.maintenancePolicy); + if (error) + return "maintenancePolicy." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + */ + SetMaintenancePolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SetMaintenancePolicyRequest) + return object; + var message = new $root.google.container.v1.SetMaintenancePolicyRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.maintenancePolicy != null) { + if (typeof object.maintenancePolicy !== "object") + throw TypeError(".google.container.v1.SetMaintenancePolicyRequest.maintenancePolicy: object expected"); + message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.fromObject(object.maintenancePolicy); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1.SetMaintenancePolicyRequest} message SetMaintenancePolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMaintenancePolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.maintenancePolicy = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) + object.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.toObject(message.maintenancePolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMaintenancePolicyRequest to JSON. + * @function toJSON + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetMaintenancePolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMaintenancePolicyRequest + * @function getTypeUrl + * @memberof google.container.v1.SetMaintenancePolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMaintenancePolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SetMaintenancePolicyRequest"; + }; + + return SetMaintenancePolicyRequest; + })(); + + v1.StatusCondition = (function() { + + /** + * Properties of a StatusCondition. + * @memberof google.container.v1 + * @interface IStatusCondition + * @property {google.container.v1.StatusCondition.Code|null} [code] StatusCondition code + * @property {string|null} [message] StatusCondition message + * @property {google.rpc.Code|null} [canonicalCode] StatusCondition canonicalCode + */ + + /** + * Constructs a new StatusCondition. + * @memberof google.container.v1 + * @classdesc Represents a StatusCondition. + * @implements IStatusCondition + * @constructor + * @param {google.container.v1.IStatusCondition=} [properties] Properties to set + */ + function StatusCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusCondition code. + * @member {google.container.v1.StatusCondition.Code} code + * @memberof google.container.v1.StatusCondition + * @instance + */ + StatusCondition.prototype.code = 0; + + /** + * StatusCondition message. + * @member {string} message + * @memberof google.container.v1.StatusCondition + * @instance + */ + StatusCondition.prototype.message = ""; + + /** + * StatusCondition canonicalCode. + * @member {google.rpc.Code} canonicalCode + * @memberof google.container.v1.StatusCondition + * @instance + */ + StatusCondition.prototype.canonicalCode = 0; + + /** + * Creates a new StatusCondition instance using the specified properties. + * @function create + * @memberof google.container.v1.StatusCondition + * @static + * @param {google.container.v1.IStatusCondition=} [properties] Properties to set + * @returns {google.container.v1.StatusCondition} StatusCondition instance + */ + StatusCondition.create = function create(properties) { + return new StatusCondition(properties); + }; + + /** + * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. + * @function encode + * @memberof google.container.v1.StatusCondition + * @static + * @param {google.container.v1.IStatusCondition} message StatusCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.canonicalCode != null && Object.hasOwnProperty.call(message, "canonicalCode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.canonicalCode); + return writer; + }; + + /** + * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.StatusCondition + * @static + * @param {google.container.v1.IStatusCondition} message StatusCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusCondition message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.StatusCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.StatusCondition} StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StatusCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.canonicalCode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatusCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.StatusCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.StatusCondition} StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusCondition message. + * @function verify + * @memberof google.container.v1.StatusCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 7: + case 9: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) + switch (message.canonicalCode) { + default: + return "canonicalCode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 16: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + return null; + }; + + /** + * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.StatusCondition + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.StatusCondition} StatusCondition + */ + StatusCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.StatusCondition) + return object; + var message = new $root.google.container.v1.StatusCondition(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "UNKNOWN": + case 0: + message.code = 0; + break; + case "GCE_STOCKOUT": + case 1: + message.code = 1; + break; + case "GKE_SERVICE_ACCOUNT_DELETED": + case 2: + message.code = 2; + break; + case "GCE_QUOTA_EXCEEDED": + case 3: + message.code = 3; + break; + case "SET_BY_OPERATOR": + case 4: + message.code = 4; + break; + case "CLOUD_KMS_KEY_ERROR": + case 7: + message.code = 7; + break; + case "CA_EXPIRING": + case 9: + message.code = 9; + break; + } + if (object.message != null) + message.message = String(object.message); + switch (object.canonicalCode) { + default: + if (typeof object.canonicalCode === "number") { + message.canonicalCode = object.canonicalCode; + break; + } + break; + case "OK": + case 0: + message.canonicalCode = 0; + break; + case "CANCELLED": + case 1: + message.canonicalCode = 1; + break; + case "UNKNOWN": + case 2: + message.canonicalCode = 2; + break; + case "INVALID_ARGUMENT": + case 3: + message.canonicalCode = 3; + break; + case "DEADLINE_EXCEEDED": + case 4: + message.canonicalCode = 4; + break; + case "NOT_FOUND": + case 5: + message.canonicalCode = 5; + break; + case "ALREADY_EXISTS": + case 6: + message.canonicalCode = 6; + break; + case "PERMISSION_DENIED": + case 7: + message.canonicalCode = 7; + break; + case "UNAUTHENTICATED": + case 16: + message.canonicalCode = 16; + break; + case "RESOURCE_EXHAUSTED": + case 8: + message.canonicalCode = 8; + break; + case "FAILED_PRECONDITION": + case 9: + message.canonicalCode = 9; + break; + case "ABORTED": + case 10: + message.canonicalCode = 10; + break; + case "OUT_OF_RANGE": + case 11: + message.canonicalCode = 11; + break; + case "UNIMPLEMENTED": + case 12: + message.canonicalCode = 12; + break; + case "INTERNAL": + case 13: + message.canonicalCode = 13; + break; + case "UNAVAILABLE": + case 14: + message.canonicalCode = 14; + break; + case "DATA_LOSS": + case 15: + message.canonicalCode = 15; + break; + } + return message; + }; + + /** + * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.StatusCondition + * @static + * @param {google.container.v1.StatusCondition} message StatusCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = options.enums === String ? "UNKNOWN" : 0; + object.message = ""; + object.canonicalCode = options.enums === String ? "OK" : 0; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.container.v1.StatusCondition.Code[message.code] === undefined ? message.code : $root.google.container.v1.StatusCondition.Code[message.code] : message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) + object.canonicalCode = options.enums === String ? $root.google.rpc.Code[message.canonicalCode] === undefined ? message.canonicalCode : $root.google.rpc.Code[message.canonicalCode] : message.canonicalCode; + return object; + }; + + /** + * Converts this StatusCondition to JSON. + * @function toJSON + * @memberof google.container.v1.StatusCondition + * @instance + * @returns {Object.} JSON object + */ + StatusCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatusCondition + * @function getTypeUrl + * @memberof google.container.v1.StatusCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.StatusCondition"; + }; + + /** + * Code enum. + * @name google.container.v1.StatusCondition.Code + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} GCE_STOCKOUT=1 GCE_STOCKOUT value + * @property {number} GKE_SERVICE_ACCOUNT_DELETED=2 GKE_SERVICE_ACCOUNT_DELETED value + * @property {number} GCE_QUOTA_EXCEEDED=3 GCE_QUOTA_EXCEEDED value + * @property {number} SET_BY_OPERATOR=4 SET_BY_OPERATOR value + * @property {number} CLOUD_KMS_KEY_ERROR=7 CLOUD_KMS_KEY_ERROR value + * @property {number} CA_EXPIRING=9 CA_EXPIRING value + */ + StatusCondition.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "GCE_STOCKOUT"] = 1; + values[valuesById[2] = "GKE_SERVICE_ACCOUNT_DELETED"] = 2; + values[valuesById[3] = "GCE_QUOTA_EXCEEDED"] = 3; + values[valuesById[4] = "SET_BY_OPERATOR"] = 4; + values[valuesById[7] = "CLOUD_KMS_KEY_ERROR"] = 7; + values[valuesById[9] = "CA_EXPIRING"] = 9; + return values; + })(); + + return StatusCondition; + })(); + + v1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.container.v1 + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {string|null} [subnetwork] NetworkConfig subnetwork + * @property {boolean|null} [enableIntraNodeVisibility] NetworkConfig enableIntraNodeVisibility + * @property {google.container.v1.IDefaultSnatStatus|null} [defaultSnatStatus] NetworkConfig defaultSnatStatus + * @property {boolean|null} [enableL4ilbSubsetting] NetworkConfig enableL4ilbSubsetting + * @property {google.container.v1.DatapathProvider|null} [datapathProvider] NetworkConfig datapathProvider + * @property {google.container.v1.PrivateIPv6GoogleAccess|null} [privateIpv6GoogleAccess] NetworkConfig privateIpv6GoogleAccess + * @property {google.container.v1.IDNSConfig|null} [dnsConfig] NetworkConfig dnsConfig + * @property {google.container.v1.IServiceExternalIPsConfig|null} [serviceExternalIpsConfig] NetworkConfig serviceExternalIpsConfig + * @property {google.container.v1.IGatewayAPIConfig|null} [gatewayApiConfig] NetworkConfig gatewayApiConfig + * @property {boolean|null} [enableMultiNetworking] NetworkConfig enableMultiNetworking + * @property {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [networkPerformanceConfig] NetworkConfig networkPerformanceConfig + * @property {boolean|null} [enableFqdnNetworkPolicy] NetworkConfig enableFqdnNetworkPolicy + * @property {google.container.v1.InTransitEncryptionConfig|null} [inTransitEncryptionConfig] NetworkConfig inTransitEncryptionConfig + * @property {boolean|null} [enableCiliumClusterwideNetworkPolicy] NetworkConfig enableCiliumClusterwideNetworkPolicy + * @property {boolean|null} [defaultEnablePrivateNodes] NetworkConfig defaultEnablePrivateNodes + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.container.v1 + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.container.v1.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig network. + * @member {string} network + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.network = ""; + + /** + * NetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.subnetwork = ""; + + /** + * NetworkConfig enableIntraNodeVisibility. + * @member {boolean} enableIntraNodeVisibility + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableIntraNodeVisibility = false; + + /** + * NetworkConfig defaultSnatStatus. + * @member {google.container.v1.IDefaultSnatStatus|null|undefined} defaultSnatStatus + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.defaultSnatStatus = null; + + /** + * NetworkConfig enableL4ilbSubsetting. + * @member {boolean} enableL4ilbSubsetting + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableL4ilbSubsetting = false; + + /** + * NetworkConfig datapathProvider. + * @member {google.container.v1.DatapathProvider} datapathProvider + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.datapathProvider = 0; + + /** + * NetworkConfig privateIpv6GoogleAccess. + * @member {google.container.v1.PrivateIPv6GoogleAccess} privateIpv6GoogleAccess + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.privateIpv6GoogleAccess = 0; + + /** + * NetworkConfig dnsConfig. + * @member {google.container.v1.IDNSConfig|null|undefined} dnsConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.dnsConfig = null; + + /** + * NetworkConfig serviceExternalIpsConfig. + * @member {google.container.v1.IServiceExternalIPsConfig|null|undefined} serviceExternalIpsConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.serviceExternalIpsConfig = null; + + /** + * NetworkConfig gatewayApiConfig. + * @member {google.container.v1.IGatewayAPIConfig|null|undefined} gatewayApiConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.gatewayApiConfig = null; + + /** + * NetworkConfig enableMultiNetworking. + * @member {boolean} enableMultiNetworking + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableMultiNetworking = false; + + /** + * NetworkConfig networkPerformanceConfig. + * @member {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.networkPerformanceConfig = null; + + /** + * NetworkConfig enableFqdnNetworkPolicy. + * @member {boolean|null|undefined} enableFqdnNetworkPolicy + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableFqdnNetworkPolicy = null; + + /** + * NetworkConfig inTransitEncryptionConfig. + * @member {google.container.v1.InTransitEncryptionConfig|null|undefined} inTransitEncryptionConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.inTransitEncryptionConfig = null; + + /** + * NetworkConfig enableCiliumClusterwideNetworkPolicy. + * @member {boolean|null|undefined} enableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableCiliumClusterwideNetworkPolicy = null; + + /** + * NetworkConfig defaultEnablePrivateNodes. + * @member {boolean|null|undefined} defaultEnablePrivateNodes + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.defaultEnablePrivateNodes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkConfig _enableFqdnNetworkPolicy. + * @member {"enableFqdnNetworkPolicy"|undefined} _enableFqdnNetworkPolicy + * @memberof google.container.v1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_enableFqdnNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["enableFqdnNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkConfig _inTransitEncryptionConfig. + * @member {"inTransitEncryptionConfig"|undefined} _inTransitEncryptionConfig + * @memberof google.container.v1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_inTransitEncryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["inTransitEncryptionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkConfig _enableCiliumClusterwideNetworkPolicy. + * @member {"enableCiliumClusterwideNetworkPolicy"|undefined} _enableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_enableCiliumClusterwideNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["enableCiliumClusterwideNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkConfig _defaultEnablePrivateNodes. + * @member {"defaultEnablePrivateNodes"|undefined} _defaultEnablePrivateNodes + * @memberof google.container.v1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_defaultEnablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["defaultEnablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NetworkConfig + * @static + * @param {google.container.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.container.v1.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NetworkConfig + * @static + * @param {google.container.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.enableIntraNodeVisibility != null && Object.hasOwnProperty.call(message, "enableIntraNodeVisibility")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableIntraNodeVisibility); + if (message.defaultSnatStatus != null && Object.hasOwnProperty.call(message, "defaultSnatStatus")) + $root.google.container.v1.DefaultSnatStatus.encode(message.defaultSnatStatus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enableL4ilbSubsetting != null && Object.hasOwnProperty.call(message, "enableL4ilbSubsetting")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableL4ilbSubsetting); + if (message.datapathProvider != null && Object.hasOwnProperty.call(message, "datapathProvider")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.datapathProvider); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.privateIpv6GoogleAccess); + if (message.dnsConfig != null && Object.hasOwnProperty.call(message, "dnsConfig")) + $root.google.container.v1.DNSConfig.encode(message.dnsConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.serviceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "serviceExternalIpsConfig")) + $root.google.container.v1.ServiceExternalIPsConfig.encode(message.serviceExternalIpsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.gatewayApiConfig != null && Object.hasOwnProperty.call(message, "gatewayApiConfig")) + $root.google.container.v1.GatewayAPIConfig.encode(message.gatewayApiConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.enableMultiNetworking != null && Object.hasOwnProperty.call(message, "enableMultiNetworking")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableMultiNetworking); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.enableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableFqdnNetworkPolicy")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableFqdnNetworkPolicy); + if (message.inTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "inTransitEncryptionConfig")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.inTransitEncryptionConfig); + if (message.enableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableCiliumClusterwideNetworkPolicy")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.enableCiliumClusterwideNetworkPolicy); + if (message.defaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "defaultEnablePrivateNodes")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.defaultEnablePrivateNodes); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NetworkConfig + * @static + * @param {google.container.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.enableIntraNodeVisibility = reader.bool(); + break; + } + case 7: { + message.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.decode(reader, reader.uint32()); + break; + } + case 10: { + message.enableL4ilbSubsetting = reader.bool(); + break; + } + case 11: { + message.datapathProvider = reader.int32(); + break; + } + case 12: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 13: { + message.dnsConfig = $root.google.container.v1.DNSConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.enableMultiNetworking = reader.bool(); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.enableFqdnNetworkPolicy = reader.bool(); + break; + } + case 20: { + message.inTransitEncryptionConfig = reader.int32(); + break; + } + case 21: { + message.enableCiliumClusterwideNetworkPolicy = reader.bool(); + break; + } + case 22: { + message.defaultEnablePrivateNodes = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.container.v1.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) + if (typeof message.enableIntraNodeVisibility !== "boolean") + return "enableIntraNodeVisibility: boolean expected"; + if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) { + var error = $root.google.container.v1.DefaultSnatStatus.verify(message.defaultSnatStatus); + if (error) + return "defaultSnatStatus." + error; + } + if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) + if (typeof message.enableL4ilbSubsetting !== "boolean") + return "enableL4ilbSubsetting: boolean expected"; + if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) + switch (message.datapathProvider) { + default: + return "datapathProvider: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) { + var error = $root.google.container.v1.DNSConfig.verify(message.dnsConfig); + if (error) + return "dnsConfig." + error; + } + if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) { + var error = $root.google.container.v1.ServiceExternalIPsConfig.verify(message.serviceExternalIpsConfig); + if (error) + return "serviceExternalIpsConfig." + error; + } + if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) { + var error = $root.google.container.v1.GatewayAPIConfig.verify(message.gatewayApiConfig); + if (error) + return "gatewayApiConfig." + error; + } + if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) + if (typeof message.enableMultiNetworking !== "boolean") + return "enableMultiNetworking: boolean expected"; + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + var error = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { + properties._enableFqdnNetworkPolicy = 1; + if (typeof message.enableFqdnNetworkPolicy !== "boolean") + return "enableFqdnNetworkPolicy: boolean expected"; + } + if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { + properties._inTransitEncryptionConfig = 1; + switch (message.inTransitEncryptionConfig) { + default: + return "inTransitEncryptionConfig: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { + properties._enableCiliumClusterwideNetworkPolicy = 1; + if (typeof message.enableCiliumClusterwideNetworkPolicy !== "boolean") + return "enableCiliumClusterwideNetworkPolicy: boolean expected"; + } + if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { + properties._defaultEnablePrivateNodes = 1; + if (typeof message.defaultEnablePrivateNodes !== "boolean") + return "defaultEnablePrivateNodes: boolean expected"; + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NetworkConfig) + return object; + var message = new $root.google.container.v1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.enableIntraNodeVisibility != null) + message.enableIntraNodeVisibility = Boolean(object.enableIntraNodeVisibility); + if (object.defaultSnatStatus != null) { + if (typeof object.defaultSnatStatus !== "object") + throw TypeError(".google.container.v1.NetworkConfig.defaultSnatStatus: object expected"); + message.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.fromObject(object.defaultSnatStatus); + } + if (object.enableL4ilbSubsetting != null) + message.enableL4ilbSubsetting = Boolean(object.enableL4ilbSubsetting); + switch (object.datapathProvider) { + default: + if (typeof object.datapathProvider === "number") { + message.datapathProvider = object.datapathProvider; + break; + } + break; + case "DATAPATH_PROVIDER_UNSPECIFIED": + case 0: + message.datapathProvider = 0; + break; + case "LEGACY_DATAPATH": + case 1: + message.datapathProvider = 1; + break; + case "ADVANCED_DATAPATH": + case 2: + message.datapathProvider = 2; + break; + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.dnsConfig != null) { + if (typeof object.dnsConfig !== "object") + throw TypeError(".google.container.v1.NetworkConfig.dnsConfig: object expected"); + message.dnsConfig = $root.google.container.v1.DNSConfig.fromObject(object.dnsConfig); + } + if (object.serviceExternalIpsConfig != null) { + if (typeof object.serviceExternalIpsConfig !== "object") + throw TypeError(".google.container.v1.NetworkConfig.serviceExternalIpsConfig: object expected"); + message.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.fromObject(object.serviceExternalIpsConfig); + } + if (object.gatewayApiConfig != null) { + if (typeof object.gatewayApiConfig !== "object") + throw TypeError(".google.container.v1.NetworkConfig.gatewayApiConfig: object expected"); + message.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.fromObject(object.gatewayApiConfig); + } + if (object.enableMultiNetworking != null) + message.enableMultiNetworking = Boolean(object.enableMultiNetworking); + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.container.v1.NetworkConfig.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.enableFqdnNetworkPolicy != null) + message.enableFqdnNetworkPolicy = Boolean(object.enableFqdnNetworkPolicy); + switch (object.inTransitEncryptionConfig) { + default: + if (typeof object.inTransitEncryptionConfig === "number") { + message.inTransitEncryptionConfig = object.inTransitEncryptionConfig; + break; + } + break; + case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": + case 0: + message.inTransitEncryptionConfig = 0; + break; + case "IN_TRANSIT_ENCRYPTION_DISABLED": + case 1: + message.inTransitEncryptionConfig = 1; + break; + case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": + case 2: + message.inTransitEncryptionConfig = 2; + break; + } + if (object.enableCiliumClusterwideNetworkPolicy != null) + message.enableCiliumClusterwideNetworkPolicy = Boolean(object.enableCiliumClusterwideNetworkPolicy); + if (object.defaultEnablePrivateNodes != null) + message.defaultEnablePrivateNodes = Boolean(object.defaultEnablePrivateNodes); + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NetworkConfig + * @static + * @param {google.container.v1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.subnetwork = ""; + object.enableIntraNodeVisibility = false; + object.defaultSnatStatus = null; + object.enableL4ilbSubsetting = false; + object.datapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; + object.privateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; + object.dnsConfig = null; + object.serviceExternalIpsConfig = null; + object.gatewayApiConfig = null; + object.enableMultiNetworking = false; + object.networkPerformanceConfig = null; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) + object.enableIntraNodeVisibility = message.enableIntraNodeVisibility; + if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) + object.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.toObject(message.defaultSnatStatus, options); + if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) + object.enableL4ilbSubsetting = message.enableL4ilbSubsetting; + if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) + object.datapathProvider = options.enums === String ? $root.google.container.v1.DatapathProvider[message.datapathProvider] === undefined ? message.datapathProvider : $root.google.container.v1.DatapathProvider[message.datapathProvider] : message.datapathProvider; + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.container.v1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) + object.dnsConfig = $root.google.container.v1.DNSConfig.toObject(message.dnsConfig, options); + if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) + object.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.toObject(message.serviceExternalIpsConfig, options); + if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) + object.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.toObject(message.gatewayApiConfig, options); + if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) + object.enableMultiNetworking = message.enableMultiNetworking; + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) + object.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { + object.enableFqdnNetworkPolicy = message.enableFqdnNetworkPolicy; + if (options.oneofs) + object._enableFqdnNetworkPolicy = "enableFqdnNetworkPolicy"; + } + if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { + object.inTransitEncryptionConfig = options.enums === String ? $root.google.container.v1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] === undefined ? message.inTransitEncryptionConfig : $root.google.container.v1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] : message.inTransitEncryptionConfig; + if (options.oneofs) + object._inTransitEncryptionConfig = "inTransitEncryptionConfig"; + } + if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { + object.enableCiliumClusterwideNetworkPolicy = message.enableCiliumClusterwideNetworkPolicy; + if (options.oneofs) + object._enableCiliumClusterwideNetworkPolicy = "enableCiliumClusterwideNetworkPolicy"; + } + if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { + object.defaultEnablePrivateNodes = message.defaultEnablePrivateNodes; + if (options.oneofs) + object._defaultEnablePrivateNodes = "defaultEnablePrivateNodes"; + } + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.container.v1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NetworkConfig"; + }; + + NetworkConfig.ClusterNetworkPerformanceConfig = (function() { + + /** + * Properties of a ClusterNetworkPerformanceConfig. + * @memberof google.container.v1.NetworkConfig + * @interface IClusterNetworkPerformanceConfig + * @property {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] ClusterNetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new ClusterNetworkPerformanceConfig. + * @memberof google.container.v1.NetworkConfig + * @classdesc Represents a ClusterNetworkPerformanceConfig. + * @implements IClusterNetworkPerformanceConfig + * @constructor + * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set + */ + function ClusterNetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterNetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + */ + ClusterNetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + */ + Object.defineProperty(ClusterNetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig instance + */ + ClusterNetworkPerformanceConfig.create = function create(properties) { + return new ClusterNetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterNetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterNetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterNetworkPerformanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterNetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterNetworkPerformanceConfig message. + * @function verify + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterNetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + */ + ClusterNetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig) + return object; + var message = new $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "TIER_1": + case 1: + message.totalEgressBandwidthTier = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterNetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this ClusterNetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterNetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterNetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterNetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} TIER_1=1 TIER_1 value + */ + ClusterNetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIER_1"] = 1; + return values; + })(); + + return ClusterNetworkPerformanceConfig; + })(); + + return NetworkConfig; + })(); + + v1.GatewayAPIConfig = (function() { + + /** + * Properties of a GatewayAPIConfig. + * @memberof google.container.v1 + * @interface IGatewayAPIConfig + * @property {google.container.v1.GatewayAPIConfig.Channel|null} [channel] GatewayAPIConfig channel + */ + + /** + * Constructs a new GatewayAPIConfig. + * @memberof google.container.v1 + * @classdesc Represents a GatewayAPIConfig. + * @implements IGatewayAPIConfig + * @constructor + * @param {google.container.v1.IGatewayAPIConfig=} [properties] Properties to set + */ + function GatewayAPIConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GatewayAPIConfig channel. + * @member {google.container.v1.GatewayAPIConfig.Channel} channel + * @memberof google.container.v1.GatewayAPIConfig + * @instance + */ + GatewayAPIConfig.prototype.channel = 0; + + /** + * Creates a new GatewayAPIConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {google.container.v1.IGatewayAPIConfig=} [properties] Properties to set + * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig instance + */ + GatewayAPIConfig.create = function create(properties) { + return new GatewayAPIConfig(properties); + }; + + /** + * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {google.container.v1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayAPIConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + return writer; + }; + + /** + * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {google.container.v1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayAPIConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GatewayAPIConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayAPIConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GatewayAPIConfig message. + * @function verify + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GatewayAPIConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig + */ + GatewayAPIConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GatewayAPIConfig) + return object; + var message = new $root.google.container.v1.GatewayAPIConfig(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "CHANNEL_UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "CHANNEL_DISABLED": + case 1: + message.channel = 1; + break; + case "CHANNEL_EXPERIMENTAL": + case 3: + message.channel = 3; + break; + case "CHANNEL_STANDARD": + case 4: + message.channel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {google.container.v1.GatewayAPIConfig} message GatewayAPIConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GatewayAPIConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = options.enums === String ? "CHANNEL_UNSPECIFIED" : 0; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1.GatewayAPIConfig.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.GatewayAPIConfig.Channel[message.channel] : message.channel; + return object; + }; + + /** + * Converts this GatewayAPIConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GatewayAPIConfig + * @instance + * @returns {Object.} JSON object + */ + GatewayAPIConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GatewayAPIConfig + * @function getTypeUrl + * @memberof google.container.v1.GatewayAPIConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GatewayAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GatewayAPIConfig"; + }; + + /** + * Channel enum. + * @name google.container.v1.GatewayAPIConfig.Channel + * @enum {number} + * @property {number} CHANNEL_UNSPECIFIED=0 CHANNEL_UNSPECIFIED value + * @property {number} CHANNEL_DISABLED=1 CHANNEL_DISABLED value + * @property {number} CHANNEL_EXPERIMENTAL=3 CHANNEL_EXPERIMENTAL value + * @property {number} CHANNEL_STANDARD=4 CHANNEL_STANDARD value + */ + GatewayAPIConfig.Channel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANNEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CHANNEL_DISABLED"] = 1; + values[valuesById[3] = "CHANNEL_EXPERIMENTAL"] = 3; + values[valuesById[4] = "CHANNEL_STANDARD"] = 4; + return values; + })(); + + return GatewayAPIConfig; + })(); + + v1.ServiceExternalIPsConfig = (function() { + + /** + * Properties of a ServiceExternalIPsConfig. + * @memberof google.container.v1 + * @interface IServiceExternalIPsConfig + * @property {boolean|null} [enabled] ServiceExternalIPsConfig enabled + */ + + /** + * Constructs a new ServiceExternalIPsConfig. + * @memberof google.container.v1 + * @classdesc Represents a ServiceExternalIPsConfig. + * @implements IServiceExternalIPsConfig + * @constructor + * @param {google.container.v1.IServiceExternalIPsConfig=} [properties] Properties to set + */ + function ServiceExternalIPsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceExternalIPsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ServiceExternalIPsConfig + * @instance + */ + ServiceExternalIPsConfig.prototype.enabled = false; + + /** + * Creates a new ServiceExternalIPsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1.IServiceExternalIPsConfig=} [properties] Properties to set + * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig instance + */ + ServiceExternalIPsConfig.create = function create(properties) { + return new ServiceExternalIPsConfig(properties); + }; + + /** + * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceExternalIPsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceExternalIPsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceExternalIPsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServiceExternalIPsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceExternalIPsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceExternalIPsConfig message. + * @function verify + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceExternalIPsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + */ + ServiceExternalIPsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ServiceExternalIPsConfig) + return object; + var message = new $root.google.container.v1.ServiceExternalIPsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1.ServiceExternalIPsConfig} message ServiceExternalIPsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceExternalIPsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ServiceExternalIPsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ServiceExternalIPsConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceExternalIPsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceExternalIPsConfig + * @function getTypeUrl + * @memberof google.container.v1.ServiceExternalIPsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceExternalIPsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ServiceExternalIPsConfig"; + }; + + return ServiceExternalIPsConfig; + })(); + + v1.GetOpenIDConfigRequest = (function() { + + /** + * Properties of a GetOpenIDConfigRequest. + * @memberof google.container.v1 + * @interface IGetOpenIDConfigRequest + * @property {string|null} [parent] GetOpenIDConfigRequest parent + */ + + /** + * Constructs a new GetOpenIDConfigRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetOpenIDConfigRequest. + * @implements IGetOpenIDConfigRequest + * @constructor + * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set + */ + function GetOpenIDConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOpenIDConfigRequest parent. + * @member {string} parent + * @memberof google.container.v1.GetOpenIDConfigRequest + * @instance + */ + GetOpenIDConfigRequest.prototype.parent = ""; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest instance + */ + GetOpenIDConfigRequest.create = function create(properties) { + return new GetOpenIDConfigRequest(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.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); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOpenIDConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigRequest message. + * @function verify + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + */ + GetOpenIDConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetOpenIDConfigRequest) + return object; + var message = new $root.google.container.v1.GetOpenIDConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.GetOpenIDConfigRequest} message GetOpenIDConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetOpenIDConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOpenIDConfigRequest + * @function getTypeUrl + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOpenIDConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetOpenIDConfigRequest"; + }; + + return GetOpenIDConfigRequest; + })(); + + v1.GetOpenIDConfigResponse = (function() { + + /** + * Properties of a GetOpenIDConfigResponse. + * @memberof google.container.v1 + * @interface IGetOpenIDConfigResponse + * @property {string|null} [issuer] GetOpenIDConfigResponse issuer + * @property {string|null} [jwksUri] GetOpenIDConfigResponse jwksUri + * @property {Array.|null} [responseTypesSupported] GetOpenIDConfigResponse responseTypesSupported + * @property {Array.|null} [subjectTypesSupported] GetOpenIDConfigResponse subjectTypesSupported + * @property {Array.|null} [idTokenSigningAlgValuesSupported] GetOpenIDConfigResponse idTokenSigningAlgValuesSupported + * @property {Array.|null} [claimsSupported] GetOpenIDConfigResponse claimsSupported + * @property {Array.|null} [grantTypes] GetOpenIDConfigResponse grantTypes + */ + + /** + * Constructs a new GetOpenIDConfigResponse. + * @memberof google.container.v1 + * @classdesc Represents a GetOpenIDConfigResponse. + * @implements IGetOpenIDConfigResponse + * @constructor + * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set + */ + function GetOpenIDConfigResponse(properties) { + this.responseTypesSupported = []; + this.subjectTypesSupported = []; + this.idTokenSigningAlgValuesSupported = []; + this.claimsSupported = []; + this.grantTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOpenIDConfigResponse issuer. + * @member {string} issuer + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.issuer = ""; + + /** + * GetOpenIDConfigResponse jwksUri. + * @member {string} jwksUri + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.jwksUri = ""; + + /** + * GetOpenIDConfigResponse responseTypesSupported. + * @member {Array.} responseTypesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.responseTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse subjectTypesSupported. + * @member {Array.} subjectTypesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.subjectTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. + * @member {Array.} idTokenSigningAlgValuesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.idTokenSigningAlgValuesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse claimsSupported. + * @member {Array.} claimsSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.claimsSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse grantTypes. + * @member {Array.} grantTypes + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.grantTypes = $util.emptyArray; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse instance + */ + GetOpenIDConfigResponse.create = function create(properties) { + return new GetOpenIDConfigResponse(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jwksUri); + if (message.responseTypesSupported != null && message.responseTypesSupported.length) + for (var i = 0; i < message.responseTypesSupported.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.responseTypesSupported[i]); + if (message.subjectTypesSupported != null && message.subjectTypesSupported.length) + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjectTypesSupported[i]); + if (message.idTokenSigningAlgValuesSupported != null && message.idTokenSigningAlgValuesSupported.length) + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.idTokenSigningAlgValuesSupported[i]); + if (message.claimsSupported != null && message.claimsSupported.length) + for (var i = 0; i < message.claimsSupported.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.claimsSupported[i]); + if (message.grantTypes != null && message.grantTypes.length) + for (var i = 0; i < message.grantTypes.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.grantTypes[i]); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOpenIDConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issuer = reader.string(); + break; + } + case 2: { + message.jwksUri = reader.string(); + break; + } + case 3: { + if (!(message.responseTypesSupported && message.responseTypesSupported.length)) + message.responseTypesSupported = []; + message.responseTypesSupported.push(reader.string()); + break; + } + case 4: { + if (!(message.subjectTypesSupported && message.subjectTypesSupported.length)) + message.subjectTypesSupported = []; + message.subjectTypesSupported.push(reader.string()); + break; + } + case 5: { + if (!(message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length)) + message.idTokenSigningAlgValuesSupported = []; + message.idTokenSigningAlgValuesSupported.push(reader.string()); + break; + } + case 6: { + if (!(message.claimsSupported && message.claimsSupported.length)) + message.claimsSupported = []; + message.claimsSupported.push(reader.string()); + break; + } + case 7: { + if (!(message.grantTypes && message.grantTypes.length)) + message.grantTypes = []; + message.grantTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigResponse message. + * @function verify + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + if (!$util.isString(message.jwksUri)) + return "jwksUri: string expected"; + if (message.responseTypesSupported != null && message.hasOwnProperty("responseTypesSupported")) { + if (!Array.isArray(message.responseTypesSupported)) + return "responseTypesSupported: array expected"; + for (var i = 0; i < message.responseTypesSupported.length; ++i) + if (!$util.isString(message.responseTypesSupported[i])) + return "responseTypesSupported: string[] expected"; + } + if (message.subjectTypesSupported != null && message.hasOwnProperty("subjectTypesSupported")) { + if (!Array.isArray(message.subjectTypesSupported)) + return "subjectTypesSupported: array expected"; + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + if (!$util.isString(message.subjectTypesSupported[i])) + return "subjectTypesSupported: string[] expected"; + } + if (message.idTokenSigningAlgValuesSupported != null && message.hasOwnProperty("idTokenSigningAlgValuesSupported")) { + if (!Array.isArray(message.idTokenSigningAlgValuesSupported)) + return "idTokenSigningAlgValuesSupported: array expected"; + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + if (!$util.isString(message.idTokenSigningAlgValuesSupported[i])) + return "idTokenSigningAlgValuesSupported: string[] expected"; + } + if (message.claimsSupported != null && message.hasOwnProperty("claimsSupported")) { + if (!Array.isArray(message.claimsSupported)) + return "claimsSupported: array expected"; + for (var i = 0; i < message.claimsSupported.length; ++i) + if (!$util.isString(message.claimsSupported[i])) + return "claimsSupported: string[] expected"; + } + if (message.grantTypes != null && message.hasOwnProperty("grantTypes")) { + if (!Array.isArray(message.grantTypes)) + return "grantTypes: array expected"; + for (var i = 0; i < message.grantTypes.length; ++i) + if (!$util.isString(message.grantTypes[i])) + return "grantTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + */ + GetOpenIDConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetOpenIDConfigResponse) + return object; + var message = new $root.google.container.v1.GetOpenIDConfigResponse(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.jwksUri != null) + message.jwksUri = String(object.jwksUri); + if (object.responseTypesSupported) { + if (!Array.isArray(object.responseTypesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.responseTypesSupported: array expected"); + message.responseTypesSupported = []; + for (var i = 0; i < object.responseTypesSupported.length; ++i) + message.responseTypesSupported[i] = String(object.responseTypesSupported[i]); + } + if (object.subjectTypesSupported) { + if (!Array.isArray(object.subjectTypesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.subjectTypesSupported: array expected"); + message.subjectTypesSupported = []; + for (var i = 0; i < object.subjectTypesSupported.length; ++i) + message.subjectTypesSupported[i] = String(object.subjectTypesSupported[i]); + } + if (object.idTokenSigningAlgValuesSupported) { + if (!Array.isArray(object.idTokenSigningAlgValuesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.idTokenSigningAlgValuesSupported: array expected"); + message.idTokenSigningAlgValuesSupported = []; + for (var i = 0; i < object.idTokenSigningAlgValuesSupported.length; ++i) + message.idTokenSigningAlgValuesSupported[i] = String(object.idTokenSigningAlgValuesSupported[i]); + } + if (object.claimsSupported) { + if (!Array.isArray(object.claimsSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.claimsSupported: array expected"); + message.claimsSupported = []; + for (var i = 0; i < object.claimsSupported.length; ++i) + message.claimsSupported[i] = String(object.claimsSupported[i]); + } + if (object.grantTypes) { + if (!Array.isArray(object.grantTypes)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.grantTypes: array expected"); + message.grantTypes = []; + for (var i = 0; i < object.grantTypes.length; ++i) + message.grantTypes[i] = String(object.grantTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.GetOpenIDConfigResponse} message GetOpenIDConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.responseTypesSupported = []; + object.subjectTypesSupported = []; + object.idTokenSigningAlgValuesSupported = []; + object.claimsSupported = []; + object.grantTypes = []; + } + if (options.defaults) { + object.issuer = ""; + object.jwksUri = ""; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + object.jwksUri = message.jwksUri; + if (message.responseTypesSupported && message.responseTypesSupported.length) { + object.responseTypesSupported = []; + for (var j = 0; j < message.responseTypesSupported.length; ++j) + object.responseTypesSupported[j] = message.responseTypesSupported[j]; + } + if (message.subjectTypesSupported && message.subjectTypesSupported.length) { + object.subjectTypesSupported = []; + for (var j = 0; j < message.subjectTypesSupported.length; ++j) + object.subjectTypesSupported[j] = message.subjectTypesSupported[j]; + } + if (message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length) { + object.idTokenSigningAlgValuesSupported = []; + for (var j = 0; j < message.idTokenSigningAlgValuesSupported.length; ++j) + object.idTokenSigningAlgValuesSupported[j] = message.idTokenSigningAlgValuesSupported[j]; + } + if (message.claimsSupported && message.claimsSupported.length) { + object.claimsSupported = []; + for (var j = 0; j < message.claimsSupported.length; ++j) + object.claimsSupported[j] = message.claimsSupported[j]; + } + if (message.grantTypes && message.grantTypes.length) { + object.grantTypes = []; + for (var j = 0; j < message.grantTypes.length; ++j) + object.grantTypes[j] = message.grantTypes[j]; + } + return object; + }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @function toJSON + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOpenIDConfigResponse + * @function getTypeUrl + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOpenIDConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetOpenIDConfigResponse"; + }; + + return GetOpenIDConfigResponse; + })(); + + v1.GetJSONWebKeysRequest = (function() { + + /** + * Properties of a GetJSONWebKeysRequest. + * @memberof google.container.v1 + * @interface IGetJSONWebKeysRequest + * @property {string|null} [parent] GetJSONWebKeysRequest parent + */ + + /** + * Constructs a new GetJSONWebKeysRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetJSONWebKeysRequest. + * @implements IGetJSONWebKeysRequest + * @constructor + * @param {google.container.v1.IGetJSONWebKeysRequest=} [properties] Properties to set + */ + function GetJSONWebKeysRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJSONWebKeysRequest parent. + * @member {string} parent + * @memberof google.container.v1.GetJSONWebKeysRequest + * @instance + */ + GetJSONWebKeysRequest.prototype.parent = ""; + + /** + * Creates a new GetJSONWebKeysRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1.IGetJSONWebKeysRequest=} [properties] Properties to set + * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest instance + */ + GetJSONWebKeysRequest.create = function create(properties) { + return new GetJSONWebKeysRequest(properties); + }; + + /** + * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysRequest.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); + return writer; + }; + + /** + * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetJSONWebKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJSONWebKeysRequest message. + * @function verify + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJSONWebKeysRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + */ + GetJSONWebKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetJSONWebKeysRequest) + return object; + var message = new $root.google.container.v1.GetJSONWebKeysRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1.GetJSONWebKeysRequest} message GetJSONWebKeysRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJSONWebKeysRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this GetJSONWebKeysRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetJSONWebKeysRequest + * @instance + * @returns {Object.} JSON object + */ + GetJSONWebKeysRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJSONWebKeysRequest + * @function getTypeUrl + * @memberof google.container.v1.GetJSONWebKeysRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJSONWebKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetJSONWebKeysRequest"; + }; + + return GetJSONWebKeysRequest; + })(); + + v1.Jwk = (function() { + + /** + * Properties of a Jwk. + * @memberof google.container.v1 + * @interface IJwk + * @property {string|null} [kty] Jwk kty + * @property {string|null} [alg] Jwk alg + * @property {string|null} [use] Jwk use + * @property {string|null} [kid] Jwk kid + * @property {string|null} [n] Jwk n + * @property {string|null} [e] Jwk e + * @property {string|null} [x] Jwk x + * @property {string|null} [y] Jwk y + * @property {string|null} [crv] Jwk crv + */ + + /** + * Constructs a new Jwk. + * @memberof google.container.v1 + * @classdesc Represents a Jwk. + * @implements IJwk + * @constructor + * @param {google.container.v1.IJwk=} [properties] Properties to set + */ + function Jwk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Jwk kty. + * @member {string} kty + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.kty = ""; + + /** + * Jwk alg. + * @member {string} alg + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.alg = ""; + + /** + * Jwk use. + * @member {string} use + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.use = ""; + + /** + * Jwk kid. + * @member {string} kid + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.kid = ""; + + /** + * Jwk n. + * @member {string} n + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.n = ""; + + /** + * Jwk e. + * @member {string} e + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.e = ""; + + /** + * Jwk x. + * @member {string} x + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.x = ""; + + /** + * Jwk y. + * @member {string} y + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.y = ""; + + /** + * Jwk crv. + * @member {string} crv + * @memberof google.container.v1.Jwk + * @instance + */ + Jwk.prototype.crv = ""; + + /** + * Creates a new Jwk instance using the specified properties. + * @function create + * @memberof google.container.v1.Jwk + * @static + * @param {google.container.v1.IJwk=} [properties] Properties to set + * @returns {google.container.v1.Jwk} Jwk instance + */ + Jwk.create = function create(properties) { + return new Jwk(properties); + }; + + /** + * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Jwk + * @static + * @param {google.container.v1.IJwk} message Jwk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kty != null && Object.hasOwnProperty.call(message, "kty")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kty); + if (message.alg != null && Object.hasOwnProperty.call(message, "alg")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.alg); + if (message.use != null && Object.hasOwnProperty.call(message, "use")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.use); + if (message.kid != null && Object.hasOwnProperty.call(message, "kid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kid); + if (message.n != null && Object.hasOwnProperty.call(message, "n")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.n); + if (message.e != null && Object.hasOwnProperty.call(message, "e")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.e); + if (message.x != null && Object.hasOwnProperty.call(message, "x")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.x); + if (message.y != null && Object.hasOwnProperty.call(message, "y")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.y); + if (message.crv != null && Object.hasOwnProperty.call(message, "crv")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.crv); + return writer; + }; + + /** + * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Jwk + * @static + * @param {google.container.v1.IJwk} message Jwk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Jwk message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Jwk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Jwk} Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Jwk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kty = reader.string(); + break; + } + case 2: { + message.alg = reader.string(); + break; + } + case 3: { + message.use = reader.string(); + break; + } + case 4: { + message.kid = reader.string(); + break; + } + case 5: { + message.n = reader.string(); + break; + } + case 6: { + message.e = reader.string(); + break; + } + case 7: { + message.x = reader.string(); + break; + } + case 8: { + message.y = reader.string(); + break; + } + case 9: { + message.crv = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Jwk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Jwk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Jwk} Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Jwk message. + * @function verify + * @memberof google.container.v1.Jwk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Jwk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kty != null && message.hasOwnProperty("kty")) + if (!$util.isString(message.kty)) + return "kty: string expected"; + if (message.alg != null && message.hasOwnProperty("alg")) + if (!$util.isString(message.alg)) + return "alg: string expected"; + if (message.use != null && message.hasOwnProperty("use")) + if (!$util.isString(message.use)) + return "use: string expected"; + if (message.kid != null && message.hasOwnProperty("kid")) + if (!$util.isString(message.kid)) + return "kid: string expected"; + if (message.n != null && message.hasOwnProperty("n")) + if (!$util.isString(message.n)) + return "n: string expected"; + if (message.e != null && message.hasOwnProperty("e")) + if (!$util.isString(message.e)) + return "e: string expected"; + if (message.x != null && message.hasOwnProperty("x")) + if (!$util.isString(message.x)) + return "x: string expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (!$util.isString(message.y)) + return "y: string expected"; + if (message.crv != null && message.hasOwnProperty("crv")) + if (!$util.isString(message.crv)) + return "crv: string expected"; + return null; + }; + + /** + * Creates a Jwk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Jwk + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Jwk} Jwk + */ + Jwk.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Jwk) + return object; + var message = new $root.google.container.v1.Jwk(); + if (object.kty != null) + message.kty = String(object.kty); + if (object.alg != null) + message.alg = String(object.alg); + if (object.use != null) + message.use = String(object.use); + if (object.kid != null) + message.kid = String(object.kid); + if (object.n != null) + message.n = String(object.n); + if (object.e != null) + message.e = String(object.e); + if (object.x != null) + message.x = String(object.x); + if (object.y != null) + message.y = String(object.y); + if (object.crv != null) + message.crv = String(object.crv); + return message; + }; + + /** + * Creates a plain object from a Jwk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.Jwk + * @static + * @param {google.container.v1.Jwk} message Jwk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Jwk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kty = ""; + object.alg = ""; + object.use = ""; + object.kid = ""; + object.n = ""; + object.e = ""; + object.x = ""; + object.y = ""; + object.crv = ""; + } + if (message.kty != null && message.hasOwnProperty("kty")) + object.kty = message.kty; + if (message.alg != null && message.hasOwnProperty("alg")) + object.alg = message.alg; + if (message.use != null && message.hasOwnProperty("use")) + object.use = message.use; + if (message.kid != null && message.hasOwnProperty("kid")) + object.kid = message.kid; + if (message.n != null && message.hasOwnProperty("n")) + object.n = message.n; + if (message.e != null && message.hasOwnProperty("e")) + object.e = message.e; + if (message.x != null && message.hasOwnProperty("x")) + object.x = message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = message.y; + if (message.crv != null && message.hasOwnProperty("crv")) + object.crv = message.crv; + return object; + }; + + /** + * Converts this Jwk to JSON. + * @function toJSON + * @memberof google.container.v1.Jwk + * @instance + * @returns {Object.} JSON object + */ + Jwk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Jwk + * @function getTypeUrl + * @memberof google.container.v1.Jwk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Jwk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.Jwk"; + }; + + return Jwk; + })(); + + v1.GetJSONWebKeysResponse = (function() { + + /** + * Properties of a GetJSONWebKeysResponse. + * @memberof google.container.v1 + * @interface IGetJSONWebKeysResponse + * @property {Array.|null} [keys] GetJSONWebKeysResponse keys + */ + + /** + * Constructs a new GetJSONWebKeysResponse. + * @memberof google.container.v1 + * @classdesc Represents a GetJSONWebKeysResponse. + * @implements IGetJSONWebKeysResponse + * @constructor + * @param {google.container.v1.IGetJSONWebKeysResponse=} [properties] Properties to set + */ + function GetJSONWebKeysResponse(properties) { + this.keys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJSONWebKeysResponse keys. + * @member {Array.} keys + * @memberof google.container.v1.GetJSONWebKeysResponse + * @instance + */ + GetJSONWebKeysResponse.prototype.keys = $util.emptyArray; + + /** + * Creates a new GetJSONWebKeysResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1.IGetJSONWebKeysResponse=} [properties] Properties to set + * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse instance + */ + GetJSONWebKeysResponse.create = function create(properties) { + return new GetJSONWebKeysResponse(properties); + }; + + /** + * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.google.container.v1.Jwk.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetJSONWebKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.google.container.v1.Jwk.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJSONWebKeysResponse message. + * @function verify + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJSONWebKeysResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.google.container.v1.Jwk.verify(message.keys[i]); + if (error) + return "keys." + error; + } + } + return null; + }; + + /** + * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + */ + GetJSONWebKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetJSONWebKeysResponse) + return object; + var message = new $root.google.container.v1.GetJSONWebKeysResponse(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".google.container.v1.GetJSONWebKeysResponse.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".google.container.v1.GetJSONWebKeysResponse.keys: object expected"); + message.keys[i] = $root.google.container.v1.Jwk.fromObject(object.keys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1.GetJSONWebKeysResponse} message GetJSONWebKeysResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJSONWebKeysResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keys = []; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.google.container.v1.Jwk.toObject(message.keys[j], options); + } + return object; + }; + + /** + * Converts this GetJSONWebKeysResponse to JSON. + * @function toJSON + * @memberof google.container.v1.GetJSONWebKeysResponse + * @instance + * @returns {Object.} JSON object + */ + GetJSONWebKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJSONWebKeysResponse + * @function getTypeUrl + * @memberof google.container.v1.GetJSONWebKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJSONWebKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GetJSONWebKeysResponse"; + }; + + return GetJSONWebKeysResponse; + })(); + + v1.CheckAutopilotCompatibilityRequest = (function() { + + /** + * Properties of a CheckAutopilotCompatibilityRequest. + * @memberof google.container.v1 + * @interface ICheckAutopilotCompatibilityRequest + * @property {string|null} [name] CheckAutopilotCompatibilityRequest name + */ + + /** + * Constructs a new CheckAutopilotCompatibilityRequest. + * @memberof google.container.v1 + * @classdesc Represents a CheckAutopilotCompatibilityRequest. + * @implements ICheckAutopilotCompatibilityRequest + * @constructor + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set + */ + function CheckAutopilotCompatibilityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAutopilotCompatibilityRequest name. + * @member {string} name + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @instance + */ + CheckAutopilotCompatibilityRequest.prototype.name = ""; + + /** + * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set + * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest instance + */ + CheckAutopilotCompatibilityRequest.create = function create(properties) { + return new CheckAutopilotCompatibilityRequest(properties); + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CheckAutopilotCompatibilityRequest(); + 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 CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAutopilotCompatibilityRequest message. + * @function verify + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + */ + CheckAutopilotCompatibilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CheckAutopilotCompatibilityRequest) + return object; + var message = new $root.google.container.v1.CheckAutopilotCompatibilityRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1.CheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest to JSON. + * @function toJSON + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @instance + * @returns {Object.} JSON object + */ + CheckAutopilotCompatibilityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityRequest + * @function getTypeUrl + * @memberof google.container.v1.CheckAutopilotCompatibilityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAutopilotCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CheckAutopilotCompatibilityRequest"; + }; + + return CheckAutopilotCompatibilityRequest; + })(); + + v1.AutopilotCompatibilityIssue = (function() { + + /** + * Properties of an AutopilotCompatibilityIssue. + * @memberof google.container.v1 + * @interface IAutopilotCompatibilityIssue + * @property {google.protobuf.ITimestamp|null} [lastObservation] AutopilotCompatibilityIssue lastObservation + * @property {string|null} [constraintType] AutopilotCompatibilityIssue constraintType + * @property {google.container.v1.AutopilotCompatibilityIssue.IssueType|null} [incompatibilityType] AutopilotCompatibilityIssue incompatibilityType + * @property {Array.|null} [subjects] AutopilotCompatibilityIssue subjects + * @property {string|null} [documentationUrl] AutopilotCompatibilityIssue documentationUrl + * @property {string|null} [description] AutopilotCompatibilityIssue description + */ + + /** + * Constructs a new AutopilotCompatibilityIssue. + * @memberof google.container.v1 + * @classdesc Represents an AutopilotCompatibilityIssue. + * @implements IAutopilotCompatibilityIssue + * @constructor + * @param {google.container.v1.IAutopilotCompatibilityIssue=} [properties] Properties to set + */ + function AutopilotCompatibilityIssue(properties) { + this.subjects = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutopilotCompatibilityIssue lastObservation. + * @member {google.protobuf.ITimestamp|null|undefined} lastObservation + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.lastObservation = null; + + /** + * AutopilotCompatibilityIssue constraintType. + * @member {string} constraintType + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.constraintType = ""; + + /** + * AutopilotCompatibilityIssue incompatibilityType. + * @member {google.container.v1.AutopilotCompatibilityIssue.IssueType} incompatibilityType + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.incompatibilityType = 0; + + /** + * AutopilotCompatibilityIssue subjects. + * @member {Array.} subjects + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.subjects = $util.emptyArray; + + /** + * AutopilotCompatibilityIssue documentationUrl. + * @member {string} documentationUrl + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.documentationUrl = ""; + + /** + * AutopilotCompatibilityIssue description. + * @member {string} description + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.description = ""; + + /** + * Creates a new AutopilotCompatibilityIssue instance using the specified properties. + * @function create + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1.IAutopilotCompatibilityIssue=} [properties] Properties to set + * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue instance + */ + AutopilotCompatibilityIssue.create = function create(properties) { + return new AutopilotCompatibilityIssue(properties); + }; + + /** + * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotCompatibilityIssue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastObservation != null && Object.hasOwnProperty.call(message, "lastObservation")) + $root.google.protobuf.Timestamp.encode(message.lastObservation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.constraintType); + if (message.incompatibilityType != null && Object.hasOwnProperty.call(message, "incompatibilityType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.incompatibilityType); + if (message.subjects != null && message.subjects.length) + for (var i = 0; i < message.subjects.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjects[i]); + if (message.documentationUrl != null && Object.hasOwnProperty.call(message, "documentationUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.documentationUrl); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + return writer; + }; + + /** + * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotCompatibilityIssue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotCompatibilityIssue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutopilotCompatibilityIssue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastObservation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.constraintType = reader.string(); + break; + } + case 3: { + message.incompatibilityType = reader.int32(); + break; + } + case 4: { + if (!(message.subjects && message.subjects.length)) + message.subjects = []; + message.subjects.push(reader.string()); + break; + } + case 5: { + message.documentationUrl = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotCompatibilityIssue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutopilotCompatibilityIssue message. + * @function verify + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutopilotCompatibilityIssue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastObservation); + if (error) + return "lastObservation." + error; + } + if (message.constraintType != null && message.hasOwnProperty("constraintType")) + if (!$util.isString(message.constraintType)) + return "constraintType: string expected"; + if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) + switch (message.incompatibilityType) { + default: + return "incompatibilityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.subjects != null && message.hasOwnProperty("subjects")) { + if (!Array.isArray(message.subjects)) + return "subjects: array expected"; + for (var i = 0; i < message.subjects.length; ++i) + if (!$util.isString(message.subjects[i])) + return "subjects: string[] expected"; + } + if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) + if (!$util.isString(message.documentationUrl)) + return "documentationUrl: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + */ + AutopilotCompatibilityIssue.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AutopilotCompatibilityIssue) + return object; + var message = new $root.google.container.v1.AutopilotCompatibilityIssue(); + if (object.lastObservation != null) { + if (typeof object.lastObservation !== "object") + throw TypeError(".google.container.v1.AutopilotCompatibilityIssue.lastObservation: object expected"); + message.lastObservation = $root.google.protobuf.Timestamp.fromObject(object.lastObservation); + } + if (object.constraintType != null) + message.constraintType = String(object.constraintType); + switch (object.incompatibilityType) { + default: + if (typeof object.incompatibilityType === "number") { + message.incompatibilityType = object.incompatibilityType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.incompatibilityType = 0; + break; + case "INCOMPATIBILITY": + case 1: + message.incompatibilityType = 1; + break; + case "ADDITIONAL_CONFIG_REQUIRED": + case 2: + message.incompatibilityType = 2; + break; + case "PASSED_WITH_OPTIONAL_CONFIG": + case 3: + message.incompatibilityType = 3; + break; + } + if (object.subjects) { + if (!Array.isArray(object.subjects)) + throw TypeError(".google.container.v1.AutopilotCompatibilityIssue.subjects: array expected"); + message.subjects = []; + for (var i = 0; i < object.subjects.length; ++i) + message.subjects[i] = String(object.subjects[i]); + } + if (object.documentationUrl != null) + message.documentationUrl = String(object.documentationUrl); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1.AutopilotCompatibilityIssue} message AutopilotCompatibilityIssue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutopilotCompatibilityIssue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subjects = []; + if (options.defaults) { + object.lastObservation = null; + object.constraintType = ""; + object.incompatibilityType = options.enums === String ? "UNSPECIFIED" : 0; + object.documentationUrl = ""; + object.description = ""; + } + if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) + object.lastObservation = $root.google.protobuf.Timestamp.toObject(message.lastObservation, options); + if (message.constraintType != null && message.hasOwnProperty("constraintType")) + object.constraintType = message.constraintType; + if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) + object.incompatibilityType = options.enums === String ? $root.google.container.v1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] === undefined ? message.incompatibilityType : $root.google.container.v1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] : message.incompatibilityType; + if (message.subjects && message.subjects.length) { + object.subjects = []; + for (var j = 0; j < message.subjects.length; ++j) + object.subjects[j] = message.subjects[j]; + } + if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) + object.documentationUrl = message.documentationUrl; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AutopilotCompatibilityIssue to JSON. + * @function toJSON + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @instance + * @returns {Object.} JSON object + */ + AutopilotCompatibilityIssue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutopilotCompatibilityIssue + * @function getTypeUrl + * @memberof google.container.v1.AutopilotCompatibilityIssue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutopilotCompatibilityIssue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AutopilotCompatibilityIssue"; + }; + + /** + * IssueType enum. + * @name google.container.v1.AutopilotCompatibilityIssue.IssueType + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} INCOMPATIBILITY=1 INCOMPATIBILITY value + * @property {number} ADDITIONAL_CONFIG_REQUIRED=2 ADDITIONAL_CONFIG_REQUIRED value + * @property {number} PASSED_WITH_OPTIONAL_CONFIG=3 PASSED_WITH_OPTIONAL_CONFIG value + */ + AutopilotCompatibilityIssue.IssueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBILITY"] = 1; + values[valuesById[2] = "ADDITIONAL_CONFIG_REQUIRED"] = 2; + values[valuesById[3] = "PASSED_WITH_OPTIONAL_CONFIG"] = 3; + return values; + })(); + + return AutopilotCompatibilityIssue; + })(); + + v1.CheckAutopilotCompatibilityResponse = (function() { + + /** + * Properties of a CheckAutopilotCompatibilityResponse. + * @memberof google.container.v1 + * @interface ICheckAutopilotCompatibilityResponse + * @property {Array.|null} [issues] CheckAutopilotCompatibilityResponse issues + * @property {string|null} [summary] CheckAutopilotCompatibilityResponse summary + */ + + /** + * Constructs a new CheckAutopilotCompatibilityResponse. + * @memberof google.container.v1 + * @classdesc Represents a CheckAutopilotCompatibilityResponse. + * @implements ICheckAutopilotCompatibilityResponse + * @constructor + * @param {google.container.v1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set + */ + function CheckAutopilotCompatibilityResponse(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAutopilotCompatibilityResponse issues. + * @member {Array.} issues + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @instance + */ + CheckAutopilotCompatibilityResponse.prototype.issues = $util.emptyArray; + + /** + * CheckAutopilotCompatibilityResponse summary. + * @member {string} summary + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @instance + */ + CheckAutopilotCompatibilityResponse.prototype.summary = ""; + + /** + * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set + * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse instance + */ + CheckAutopilotCompatibilityResponse.create = function create(properties) { + return new CheckAutopilotCompatibilityResponse(properties); + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.container.v1.AutopilotCompatibilityIssue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); + return writer; + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CheckAutopilotCompatibilityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.container.v1.AutopilotCompatibilityIssue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.summary = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAutopilotCompatibilityResponse message. + * @function verify + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAutopilotCompatibilityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.container.v1.AutopilotCompatibilityIssue.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; + + /** + * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + */ + CheckAutopilotCompatibilityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CheckAutopilotCompatibilityResponse) + return object; + var message = new $root.google.container.v1.CheckAutopilotCompatibilityResponse(); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.container.v1.CheckAutopilotCompatibilityResponse.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.container.v1.CheckAutopilotCompatibilityResponse.issues: object expected"); + message.issues[i] = $root.google.container.v1.AutopilotCompatibilityIssue.fromObject(object.issues[i]); + } + } + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1.CheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAutopilotCompatibilityResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (options.defaults) + object.summary = ""; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.container.v1.AutopilotCompatibilityIssue.toObject(message.issues[j], options); + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + return object; + }; + + /** + * Converts this CheckAutopilotCompatibilityResponse to JSON. + * @function toJSON + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @instance + * @returns {Object.} JSON object + */ + CheckAutopilotCompatibilityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityResponse + * @function getTypeUrl + * @memberof google.container.v1.CheckAutopilotCompatibilityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAutopilotCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CheckAutopilotCompatibilityResponse"; + }; + + return CheckAutopilotCompatibilityResponse; + })(); + + v1.ReleaseChannel = (function() { + + /** + * Properties of a ReleaseChannel. + * @memberof google.container.v1 + * @interface IReleaseChannel + * @property {google.container.v1.ReleaseChannel.Channel|null} [channel] ReleaseChannel channel + */ + + /** + * Constructs a new ReleaseChannel. + * @memberof google.container.v1 + * @classdesc Represents a ReleaseChannel. + * @implements IReleaseChannel + * @constructor + * @param {google.container.v1.IReleaseChannel=} [properties] Properties to set + */ + function ReleaseChannel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseChannel channel. + * @member {google.container.v1.ReleaseChannel.Channel} channel + * @memberof google.container.v1.ReleaseChannel + * @instance + */ + ReleaseChannel.prototype.channel = 0; + + /** + * Creates a new ReleaseChannel instance using the specified properties. + * @function create + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {google.container.v1.IReleaseChannel=} [properties] Properties to set + * @returns {google.container.v1.ReleaseChannel} ReleaseChannel instance + */ + ReleaseChannel.create = function create(properties) { + return new ReleaseChannel(properties); + }; + + /** + * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {google.container.v1.IReleaseChannel} message ReleaseChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + return writer; + }; + + /** + * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {google.container.v1.IReleaseChannel} message ReleaseChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ReleaseChannel} ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ReleaseChannel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ReleaseChannel} ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseChannel message. + * @function verify + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseChannel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ReleaseChannel} ReleaseChannel + */ + ReleaseChannel.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ReleaseChannel) + return object; + var message = new $root.google.container.v1.ReleaseChannel(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "RAPID": + case 1: + message.channel = 1; + break; + case "REGULAR": + case 2: + message.channel = 2; + break; + case "STABLE": + case 3: + message.channel = 3; + break; + case "EXTENDED": + case 4: + message.channel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {google.container.v1.ReleaseChannel} message ReleaseChannel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseChannel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = options.enums === String ? "UNSPECIFIED" : 0; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.ReleaseChannel.Channel[message.channel] : message.channel; + return object; + }; + + /** + * Converts this ReleaseChannel to JSON. + * @function toJSON + * @memberof google.container.v1.ReleaseChannel + * @instance + * @returns {Object.} JSON object + */ + ReleaseChannel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseChannel + * @function getTypeUrl + * @memberof google.container.v1.ReleaseChannel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseChannel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ReleaseChannel"; + }; + + /** + * Channel enum. + * @name google.container.v1.ReleaseChannel.Channel + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} RAPID=1 RAPID value + * @property {number} REGULAR=2 REGULAR value + * @property {number} STABLE=3 STABLE value + * @property {number} EXTENDED=4 EXTENDED value + */ + ReleaseChannel.Channel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "RAPID"] = 1; + values[valuesById[2] = "REGULAR"] = 2; + values[valuesById[3] = "STABLE"] = 3; + values[valuesById[4] = "EXTENDED"] = 4; + return values; + })(); + + return ReleaseChannel; + })(); + + v1.CostManagementConfig = (function() { + + /** + * Properties of a CostManagementConfig. + * @memberof google.container.v1 + * @interface ICostManagementConfig + * @property {boolean|null} [enabled] CostManagementConfig enabled + */ + + /** + * Constructs a new CostManagementConfig. + * @memberof google.container.v1 + * @classdesc Represents a CostManagementConfig. + * @implements ICostManagementConfig + * @constructor + * @param {google.container.v1.ICostManagementConfig=} [properties] Properties to set + */ + function CostManagementConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CostManagementConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.CostManagementConfig + * @instance + */ + CostManagementConfig.prototype.enabled = false; + + /** + * Creates a new CostManagementConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {google.container.v1.ICostManagementConfig=} [properties] Properties to set + * @returns {google.container.v1.CostManagementConfig} CostManagementConfig instance + */ + CostManagementConfig.create = function create(properties) { + return new CostManagementConfig(properties); + }; + + /** + * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {google.container.v1.ICostManagementConfig} message CostManagementConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CostManagementConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {google.container.v1.ICostManagementConfig} message CostManagementConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CostManagementConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CostManagementConfig} CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CostManagementConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CostManagementConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CostManagementConfig} CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CostManagementConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CostManagementConfig message. + * @function verify + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CostManagementConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CostManagementConfig} CostManagementConfig + */ + CostManagementConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CostManagementConfig) + return object; + var message = new $root.google.container.v1.CostManagementConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {google.container.v1.CostManagementConfig} message CostManagementConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CostManagementConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this CostManagementConfig to JSON. + * @function toJSON + * @memberof google.container.v1.CostManagementConfig + * @instance + * @returns {Object.} JSON object + */ + CostManagementConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CostManagementConfig + * @function getTypeUrl + * @memberof google.container.v1.CostManagementConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CostManagementConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CostManagementConfig"; + }; + + return CostManagementConfig; + })(); + + v1.IntraNodeVisibilityConfig = (function() { + + /** + * Properties of an IntraNodeVisibilityConfig. + * @memberof google.container.v1 + * @interface IIntraNodeVisibilityConfig + * @property {boolean|null} [enabled] IntraNodeVisibilityConfig enabled + */ + + /** + * Constructs a new IntraNodeVisibilityConfig. + * @memberof google.container.v1 + * @classdesc Represents an IntraNodeVisibilityConfig. + * @implements IIntraNodeVisibilityConfig + * @constructor + * @param {google.container.v1.IIntraNodeVisibilityConfig=} [properties] Properties to set + */ + function IntraNodeVisibilityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntraNodeVisibilityConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @instance + */ + IntraNodeVisibilityConfig.prototype.enabled = false; + + /** + * Creates a new IntraNodeVisibilityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1.IIntraNodeVisibilityConfig=} [properties] Properties to set + * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig instance + */ + IntraNodeVisibilityConfig.create = function create(properties) { + return new IntraNodeVisibilityConfig(properties); + }; + + /** + * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntraNodeVisibilityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntraNodeVisibilityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntraNodeVisibilityConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IntraNodeVisibilityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntraNodeVisibilityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntraNodeVisibilityConfig message. + * @function verify + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntraNodeVisibilityConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates an IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + */ + IntraNodeVisibilityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.IntraNodeVisibilityConfig) + return object; + var message = new $root.google.container.v1.IntraNodeVisibilityConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1.IntraNodeVisibilityConfig} message IntraNodeVisibilityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntraNodeVisibilityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this IntraNodeVisibilityConfig to JSON. + * @function toJSON + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @instance + * @returns {Object.} JSON object + */ + IntraNodeVisibilityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntraNodeVisibilityConfig + * @function getTypeUrl + * @memberof google.container.v1.IntraNodeVisibilityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntraNodeVisibilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.IntraNodeVisibilityConfig"; + }; + + return IntraNodeVisibilityConfig; + })(); + + v1.ILBSubsettingConfig = (function() { + + /** + * Properties of a ILBSubsettingConfig. + * @memberof google.container.v1 + * @interface IILBSubsettingConfig + * @property {boolean|null} [enabled] ILBSubsettingConfig enabled + */ + + /** + * Constructs a new ILBSubsettingConfig. + * @memberof google.container.v1 + * @classdesc Represents a ILBSubsettingConfig. + * @implements IILBSubsettingConfig + * @constructor + * @param {google.container.v1.IILBSubsettingConfig=} [properties] Properties to set + */ + function ILBSubsettingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ILBSubsettingConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ILBSubsettingConfig + * @instance + */ + ILBSubsettingConfig.prototype.enabled = false; + + /** + * Creates a new ILBSubsettingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {google.container.v1.IILBSubsettingConfig=} [properties] Properties to set + * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig instance + */ + ILBSubsettingConfig.create = function create(properties) { + return new ILBSubsettingConfig(properties); + }; + + /** + * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {google.container.v1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ILBSubsettingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {google.container.v1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ILBSubsettingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ILBSubsettingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ILBSubsettingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ILBSubsettingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ILBSubsettingConfig message. + * @function verify + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ILBSubsettingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig + */ + ILBSubsettingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ILBSubsettingConfig) + return object; + var message = new $root.google.container.v1.ILBSubsettingConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {google.container.v1.ILBSubsettingConfig} message ILBSubsettingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ILBSubsettingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ILBSubsettingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ILBSubsettingConfig + * @instance + * @returns {Object.} JSON object + */ + ILBSubsettingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ILBSubsettingConfig + * @function getTypeUrl + * @memberof google.container.v1.ILBSubsettingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ILBSubsettingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ILBSubsettingConfig"; + }; + + return ILBSubsettingConfig; + })(); + + v1.DNSConfig = (function() { + + /** + * Properties of a DNSConfig. + * @memberof google.container.v1 + * @interface IDNSConfig + * @property {google.container.v1.DNSConfig.Provider|null} [clusterDns] DNSConfig clusterDns + * @property {google.container.v1.DNSConfig.DNSScope|null} [clusterDnsScope] DNSConfig clusterDnsScope + * @property {string|null} [clusterDnsDomain] DNSConfig clusterDnsDomain + * @property {string|null} [additiveVpcScopeDnsDomain] DNSConfig additiveVpcScopeDnsDomain + */ + + /** + * Constructs a new DNSConfig. + * @memberof google.container.v1 + * @classdesc Represents a DNSConfig. + * @implements IDNSConfig + * @constructor + * @param {google.container.v1.IDNSConfig=} [properties] Properties to set + */ + function DNSConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DNSConfig clusterDns. + * @member {google.container.v1.DNSConfig.Provider} clusterDns + * @memberof google.container.v1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDns = 0; + + /** + * DNSConfig clusterDnsScope. + * @member {google.container.v1.DNSConfig.DNSScope} clusterDnsScope + * @memberof google.container.v1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDnsScope = 0; + + /** + * DNSConfig clusterDnsDomain. + * @member {string} clusterDnsDomain + * @memberof google.container.v1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDnsDomain = ""; + + /** + * DNSConfig additiveVpcScopeDnsDomain. + * @member {string} additiveVpcScopeDnsDomain + * @memberof google.container.v1.DNSConfig + * @instance + */ + DNSConfig.prototype.additiveVpcScopeDnsDomain = ""; + + /** + * Creates a new DNSConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DNSConfig + * @static + * @param {google.container.v1.IDNSConfig=} [properties] Properties to set + * @returns {google.container.v1.DNSConfig} DNSConfig instance + */ + DNSConfig.create = function create(properties) { + return new DNSConfig(properties); + }; + + /** + * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DNSConfig + * @static + * @param {google.container.v1.IDNSConfig} message DNSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterDns != null && Object.hasOwnProperty.call(message, "clusterDns")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterDns); + if (message.clusterDnsScope != null && Object.hasOwnProperty.call(message, "clusterDnsScope")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.clusterDnsScope); + if (message.clusterDnsDomain != null && Object.hasOwnProperty.call(message, "clusterDnsDomain")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterDnsDomain); + if (message.additiveVpcScopeDnsDomain != null && Object.hasOwnProperty.call(message, "additiveVpcScopeDnsDomain")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.additiveVpcScopeDnsDomain); + return writer; + }; + + /** + * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DNSConfig + * @static + * @param {google.container.v1.IDNSConfig} message DNSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DNSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DNSConfig} DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DNSConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clusterDns = reader.int32(); + break; + } + case 2: { + message.clusterDnsScope = reader.int32(); + break; + } + case 3: { + message.clusterDnsDomain = reader.string(); + break; + } + case 5: { + message.additiveVpcScopeDnsDomain = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DNSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DNSConfig} DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSConfig message. + * @function verify + * @memberof google.container.v1.DNSConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) + switch (message.clusterDns) { + default: + return "clusterDns: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) + switch (message.clusterDnsScope) { + default: + return "clusterDnsScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) + if (!$util.isString(message.clusterDnsDomain)) + return "clusterDnsDomain: string expected"; + if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) + if (!$util.isString(message.additiveVpcScopeDnsDomain)) + return "additiveVpcScopeDnsDomain: string expected"; + return null; + }; + + /** + * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DNSConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DNSConfig} DNSConfig + */ + DNSConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DNSConfig) + return object; + var message = new $root.google.container.v1.DNSConfig(); + switch (object.clusterDns) { + default: + if (typeof object.clusterDns === "number") { + message.clusterDns = object.clusterDns; + break; + } + break; + case "PROVIDER_UNSPECIFIED": + case 0: + message.clusterDns = 0; + break; + case "PLATFORM_DEFAULT": + case 1: + message.clusterDns = 1; + break; + case "CLOUD_DNS": + case 2: + message.clusterDns = 2; + break; + case "KUBE_DNS": + case 3: + message.clusterDns = 3; + break; + } + switch (object.clusterDnsScope) { + default: + if (typeof object.clusterDnsScope === "number") { + message.clusterDnsScope = object.clusterDnsScope; + break; + } + break; + case "DNS_SCOPE_UNSPECIFIED": + case 0: + message.clusterDnsScope = 0; + break; + case "CLUSTER_SCOPE": + case 1: + message.clusterDnsScope = 1; + break; + case "VPC_SCOPE": + case 2: + message.clusterDnsScope = 2; + break; + } + if (object.clusterDnsDomain != null) + message.clusterDnsDomain = String(object.clusterDnsDomain); + if (object.additiveVpcScopeDnsDomain != null) + message.additiveVpcScopeDnsDomain = String(object.additiveVpcScopeDnsDomain); + return message; + }; + + /** + * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DNSConfig + * @static + * @param {google.container.v1.DNSConfig} message DNSConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterDns = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; + object.clusterDnsScope = options.enums === String ? "DNS_SCOPE_UNSPECIFIED" : 0; + object.clusterDnsDomain = ""; + object.additiveVpcScopeDnsDomain = ""; + } + if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) + object.clusterDns = options.enums === String ? $root.google.container.v1.DNSConfig.Provider[message.clusterDns] === undefined ? message.clusterDns : $root.google.container.v1.DNSConfig.Provider[message.clusterDns] : message.clusterDns; + if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) + object.clusterDnsScope = options.enums === String ? $root.google.container.v1.DNSConfig.DNSScope[message.clusterDnsScope] === undefined ? message.clusterDnsScope : $root.google.container.v1.DNSConfig.DNSScope[message.clusterDnsScope] : message.clusterDnsScope; + if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) + object.clusterDnsDomain = message.clusterDnsDomain; + if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) + object.additiveVpcScopeDnsDomain = message.additiveVpcScopeDnsDomain; + return object; + }; + + /** + * Converts this DNSConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DNSConfig + * @instance + * @returns {Object.} JSON object + */ + DNSConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DNSConfig + * @function getTypeUrl + * @memberof google.container.v1.DNSConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DNSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DNSConfig"; + }; + + /** + * Provider enum. + * @name google.container.v1.DNSConfig.Provider + * @enum {number} + * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value + * @property {number} PLATFORM_DEFAULT=1 PLATFORM_DEFAULT value + * @property {number} CLOUD_DNS=2 CLOUD_DNS value + * @property {number} KUBE_DNS=3 KUBE_DNS value + */ + DNSConfig.Provider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLATFORM_DEFAULT"] = 1; + values[valuesById[2] = "CLOUD_DNS"] = 2; + values[valuesById[3] = "KUBE_DNS"] = 3; + return values; + })(); + + /** + * DNSScope enum. + * @name google.container.v1.DNSConfig.DNSScope + * @enum {number} + * @property {number} DNS_SCOPE_UNSPECIFIED=0 DNS_SCOPE_UNSPECIFIED value + * @property {number} CLUSTER_SCOPE=1 CLUSTER_SCOPE value + * @property {number} VPC_SCOPE=2 VPC_SCOPE value + */ + DNSConfig.DNSScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DNS_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLUSTER_SCOPE"] = 1; + values[valuesById[2] = "VPC_SCOPE"] = 2; + return values; + })(); + + return DNSConfig; + })(); + + v1.MaxPodsConstraint = (function() { + + /** + * Properties of a MaxPodsConstraint. + * @memberof google.container.v1 + * @interface IMaxPodsConstraint + * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode + */ + + /** + * Constructs a new MaxPodsConstraint. + * @memberof google.container.v1 + * @classdesc Represents a MaxPodsConstraint. + * @implements IMaxPodsConstraint + * @constructor + * @param {google.container.v1.IMaxPodsConstraint=} [properties] Properties to set + */ + function MaxPodsConstraint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaxPodsConstraint maxPodsPerNode. + * @member {number|Long} maxPodsPerNode + * @memberof google.container.v1.MaxPodsConstraint + * @instance + */ + MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new MaxPodsConstraint instance using the specified properties. + * @function create + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {google.container.v1.IMaxPodsConstraint=} [properties] Properties to set + * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint instance + */ + MaxPodsConstraint.create = function create(properties) { + return new MaxPodsConstraint(properties); + }; + + /** + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1.MaxPodsConstraint.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {google.container.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1.MaxPodsConstraint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {google.container.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.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; + }; + + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaxPodsConstraint message. + * @function verify + * @memberof google.container.v1.MaxPodsConstraint + * @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) { + 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; + }; + + /** + * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MaxPodsConstraint + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint + */ + MaxPodsConstraint.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MaxPodsConstraint) + return object; + var message = new $root.google.container.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.container.v1.MaxPodsConstraint + * @static + * @param {google.container.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.container.v1.MaxPodsConstraint + * @instance + * @returns {Object.} JSON object + */ + MaxPodsConstraint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaxPodsConstraint + * @function getTypeUrl + * @memberof google.container.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.container.v1.MaxPodsConstraint"; + }; + + return MaxPodsConstraint; + })(); + + v1.WorkloadIdentityConfig = (function() { + + /** + * Properties of a WorkloadIdentityConfig. + * @memberof google.container.v1 + * @interface IWorkloadIdentityConfig + * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool + */ + + /** + * Constructs a new WorkloadIdentityConfig. + * @memberof google.container.v1 + * @classdesc Represents a WorkloadIdentityConfig. + * @implements IWorkloadIdentityConfig + * @constructor + * @param {google.container.v1.IWorkloadIdentityConfig=} [properties] Properties to set + */ + function WorkloadIdentityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadIdentityConfig workloadPool. + * @member {string} workloadPool + * @memberof google.container.v1.WorkloadIdentityConfig + * @instance + */ + WorkloadIdentityConfig.prototype.workloadPool = ""; + + /** + * Creates a new WorkloadIdentityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {google.container.v1.IWorkloadIdentityConfig=} [properties] Properties to set + * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig instance + */ + WorkloadIdentityConfig.create = function create(properties) { + return new WorkloadIdentityConfig(properties); + }; + + /** + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1.WorkloadIdentityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {google.container.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadIdentityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workloadPool != null && Object.hasOwnProperty.call(message, "workloadPool")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadPool); + return writer; + }; + + /** + * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadIdentityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {google.container.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadIdentityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.workloadPool = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadIdentityConfig message. + * @function verify + * @memberof google.container.v1.WorkloadIdentityConfig + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) + if (!$util.isString(message.workloadPool)) + return "workloadPool: string expected"; + return null; + }; + + /** + * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + */ + WorkloadIdentityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.WorkloadIdentityConfig) + return object; + var message = new $root.google.container.v1.WorkloadIdentityConfig(); + if (object.workloadPool != null) + message.workloadPool = String(object.workloadPool); + return message; + }; + + /** + * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {google.container.v1.WorkloadIdentityConfig} message WorkloadIdentityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadIdentityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workloadPool = ""; + if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) + object.workloadPool = message.workloadPool; + return object; + }; + + /** + * Converts this WorkloadIdentityConfig to JSON. + * @function toJSON + * @memberof google.container.v1.WorkloadIdentityConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadIdentityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadIdentityConfig + * @function getTypeUrl + * @memberof google.container.v1.WorkloadIdentityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.WorkloadIdentityConfig"; + }; + + return WorkloadIdentityConfig; + })(); + + v1.IdentityServiceConfig = (function() { + + /** + * Properties of an IdentityServiceConfig. + * @memberof google.container.v1 + * @interface IIdentityServiceConfig + * @property {boolean|null} [enabled] IdentityServiceConfig enabled + */ + + /** + * Constructs a new IdentityServiceConfig. + * @memberof google.container.v1 + * @classdesc Represents an IdentityServiceConfig. + * @implements IIdentityServiceConfig + * @constructor + * @param {google.container.v1.IIdentityServiceConfig=} [properties] Properties to set + */ + function IdentityServiceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentityServiceConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.IdentityServiceConfig + * @instance + */ + IdentityServiceConfig.prototype.enabled = false; + + /** + * Creates a new IdentityServiceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {google.container.v1.IIdentityServiceConfig=} [properties] Properties to set + * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig instance + */ + IdentityServiceConfig.create = function create(properties) { + return new IdentityServiceConfig(properties); + }; + + /** + * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {google.container.v1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityServiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {google.container.v1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityServiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityServiceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IdentityServiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityServiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityServiceConfig message. + * @function verify + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityServiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates an IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig + */ + IdentityServiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.IdentityServiceConfig) + return object; + var message = new $root.google.container.v1.IdentityServiceConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {google.container.v1.IdentityServiceConfig} message IdentityServiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityServiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this IdentityServiceConfig to JSON. + * @function toJSON + * @memberof google.container.v1.IdentityServiceConfig + * @instance + * @returns {Object.} JSON object + */ + IdentityServiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IdentityServiceConfig + * @function getTypeUrl + * @memberof google.container.v1.IdentityServiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IdentityServiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.IdentityServiceConfig"; + }; + + return IdentityServiceConfig; + })(); + + v1.MeshCertificates = (function() { + + /** + * Properties of a MeshCertificates. + * @memberof google.container.v1 + * @interface IMeshCertificates + * @property {google.protobuf.IBoolValue|null} [enableCertificates] MeshCertificates enableCertificates + */ + + /** + * Constructs a new MeshCertificates. + * @memberof google.container.v1 + * @classdesc Represents a MeshCertificates. + * @implements IMeshCertificates + * @constructor + * @param {google.container.v1.IMeshCertificates=} [properties] Properties to set + */ + function MeshCertificates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeshCertificates enableCertificates. + * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates + * @memberof google.container.v1.MeshCertificates + * @instance + */ + MeshCertificates.prototype.enableCertificates = null; + + /** + * Creates a new MeshCertificates instance using the specified properties. + * @function create + * @memberof google.container.v1.MeshCertificates + * @static + * @param {google.container.v1.IMeshCertificates=} [properties] Properties to set + * @returns {google.container.v1.MeshCertificates} MeshCertificates instance + */ + MeshCertificates.create = function create(properties) { + return new MeshCertificates(properties); + }; + + /** + * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MeshCertificates + * @static + * @param {google.container.v1.IMeshCertificates} message MeshCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshCertificates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) + $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MeshCertificates + * @static + * @param {google.container.v1.IMeshCertificates} message MeshCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshCertificates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MeshCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MeshCertificates} MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshCertificates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MeshCertificates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MeshCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MeshCertificates} MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshCertificates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeshCertificates message. + * @function verify + * @memberof google.container.v1.MeshCertificates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeshCertificates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); + if (error) + return "enableCertificates." + error; + } + return null; + }; + + /** + * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MeshCertificates + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MeshCertificates} MeshCertificates + */ + MeshCertificates.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MeshCertificates) + return object; + var message = new $root.google.container.v1.MeshCertificates(); + if (object.enableCertificates != null) { + if (typeof object.enableCertificates !== "object") + throw TypeError(".google.container.v1.MeshCertificates.enableCertificates: object expected"); + message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); + } + return message; + }; + + /** + * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MeshCertificates + * @static + * @param {google.container.v1.MeshCertificates} message MeshCertificates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeshCertificates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableCertificates = null; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) + object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); + return object; + }; + + /** + * Converts this MeshCertificates to JSON. + * @function toJSON + * @memberof google.container.v1.MeshCertificates + * @instance + * @returns {Object.} JSON object + */ + MeshCertificates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MeshCertificates + * @function getTypeUrl + * @memberof google.container.v1.MeshCertificates + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeshCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MeshCertificates"; + }; + + return MeshCertificates; + })(); + + v1.DatabaseEncryption = (function() { + + /** + * Properties of a DatabaseEncryption. + * @memberof google.container.v1 + * @interface IDatabaseEncryption + * @property {string|null} [keyName] DatabaseEncryption keyName + * @property {google.container.v1.DatabaseEncryption.State|null} [state] DatabaseEncryption state + * @property {google.container.v1.DatabaseEncryption.CurrentState|null} [currentState] DatabaseEncryption currentState + * @property {Array.|null} [decryptionKeys] DatabaseEncryption decryptionKeys + * @property {Array.|null} [lastOperationErrors] DatabaseEncryption lastOperationErrors + */ + + /** + * Constructs a new DatabaseEncryption. + * @memberof google.container.v1 + * @classdesc Represents a DatabaseEncryption. + * @implements IDatabaseEncryption + * @constructor + * @param {google.container.v1.IDatabaseEncryption=} [properties] Properties to set + */ + function DatabaseEncryption(properties) { + this.decryptionKeys = []; + this.lastOperationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseEncryption keyName. + * @member {string} keyName + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.keyName = ""; + + /** + * DatabaseEncryption state. + * @member {google.container.v1.DatabaseEncryption.State} state + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.state = 0; + + /** + * DatabaseEncryption currentState. + * @member {google.container.v1.DatabaseEncryption.CurrentState|null|undefined} currentState + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.currentState = null; + + /** + * DatabaseEncryption decryptionKeys. + * @member {Array.} decryptionKeys + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.decryptionKeys = $util.emptyArray; + + /** + * DatabaseEncryption lastOperationErrors. + * @member {Array.} lastOperationErrors + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.lastOperationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatabaseEncryption _currentState. + * @member {"currentState"|undefined} _currentState + * @memberof google.container.v1.DatabaseEncryption + * @instance + */ + Object.defineProperty(DatabaseEncryption.prototype, "_currentState", { + get: $util.oneOfGetter($oneOfFields = ["currentState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatabaseEncryption instance using the specified properties. + * @function create + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {google.container.v1.IDatabaseEncryption=} [properties] Properties to set + * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption instance + */ + DatabaseEncryption.create = function create(properties) { + return new DatabaseEncryption(properties); + }; + + /** + * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {google.container.v1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.currentState != null && Object.hasOwnProperty.call(message, "currentState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currentState); + if (message.decryptionKeys != null && message.decryptionKeys.length) + for (var i = 0; i < message.decryptionKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.decryptionKeys[i]); + if (message.lastOperationErrors != null && message.lastOperationErrors.length) + for (var i = 0; i < message.lastOperationErrors.length; ++i) + $root.google.container.v1.DatabaseEncryption.OperationError.encode(message.lastOperationErrors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {google.container.v1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEncryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DatabaseEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyName = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.currentState = reader.int32(); + break; + } + case 4: { + if (!(message.decryptionKeys && message.decryptionKeys.length)) + message.decryptionKeys = []; + message.decryptionKeys.push(reader.string()); + break; + } + case 5: { + if (!(message.lastOperationErrors && message.lastOperationErrors.length)) + message.lastOperationErrors = []; + message.lastOperationErrors.push($root.google.container.v1.DatabaseEncryption.OperationError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseEncryption message. + * @function verify + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.currentState != null && message.hasOwnProperty("currentState")) { + properties._currentState = 1; + switch (message.currentState) { + default: + return "currentState: enum value expected"; + case 0: + case 7: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.decryptionKeys != null && message.hasOwnProperty("decryptionKeys")) { + if (!Array.isArray(message.decryptionKeys)) + return "decryptionKeys: array expected"; + for (var i = 0; i < message.decryptionKeys.length; ++i) + if (!$util.isString(message.decryptionKeys[i])) + return "decryptionKeys: string[] expected"; + } + if (message.lastOperationErrors != null && message.hasOwnProperty("lastOperationErrors")) { + if (!Array.isArray(message.lastOperationErrors)) + return "lastOperationErrors: array expected"; + for (var i = 0; i < message.lastOperationErrors.length; ++i) { + var error = $root.google.container.v1.DatabaseEncryption.OperationError.verify(message.lastOperationErrors[i]); + if (error) + return "lastOperationErrors." + error; + } + } + return null; + }; + + /** + * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption + */ + DatabaseEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DatabaseEncryption) + return object; + var message = new $root.google.container.v1.DatabaseEncryption(); + if (object.keyName != null) + message.keyName = String(object.keyName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "UNKNOWN": + case 0: + message.state = 0; + break; + case "ENCRYPTED": + case 1: + message.state = 1; + break; + case "DECRYPTED": + case 2: + message.state = 2; + break; + } + switch (object.currentState) { + default: + if (typeof object.currentState === "number") { + message.currentState = object.currentState; + break; + } + break; + case "CURRENT_STATE_UNSPECIFIED": + case 0: + message.currentState = 0; + break; + case "CURRENT_STATE_ENCRYPTED": + case 7: + message.currentState = 7; + break; + case "CURRENT_STATE_DECRYPTED": + case 2: + message.currentState = 2; + break; + case "CURRENT_STATE_ENCRYPTION_PENDING": + case 3: + message.currentState = 3; + break; + case "CURRENT_STATE_ENCRYPTION_ERROR": + case 4: + message.currentState = 4; + break; + case "CURRENT_STATE_DECRYPTION_PENDING": + case 5: + message.currentState = 5; + break; + case "CURRENT_STATE_DECRYPTION_ERROR": + case 6: + message.currentState = 6; + break; + } + if (object.decryptionKeys) { + if (!Array.isArray(object.decryptionKeys)) + throw TypeError(".google.container.v1.DatabaseEncryption.decryptionKeys: array expected"); + message.decryptionKeys = []; + for (var i = 0; i < object.decryptionKeys.length; ++i) + message.decryptionKeys[i] = String(object.decryptionKeys[i]); + } + if (object.lastOperationErrors) { + if (!Array.isArray(object.lastOperationErrors)) + throw TypeError(".google.container.v1.DatabaseEncryption.lastOperationErrors: array expected"); + message.lastOperationErrors = []; + for (var i = 0; i < object.lastOperationErrors.length; ++i) { + if (typeof object.lastOperationErrors[i] !== "object") + throw TypeError(".google.container.v1.DatabaseEncryption.lastOperationErrors: object expected"); + message.lastOperationErrors[i] = $root.google.container.v1.DatabaseEncryption.OperationError.fromObject(object.lastOperationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {google.container.v1.DatabaseEncryption} message DatabaseEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.decryptionKeys = []; + object.lastOperationErrors = []; + } + if (options.defaults) { + object.keyName = ""; + object.state = options.enums === String ? "UNKNOWN" : 0; + } + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.container.v1.DatabaseEncryption.State[message.state] === undefined ? message.state : $root.google.container.v1.DatabaseEncryption.State[message.state] : message.state; + if (message.currentState != null && message.hasOwnProperty("currentState")) { + object.currentState = options.enums === String ? $root.google.container.v1.DatabaseEncryption.CurrentState[message.currentState] === undefined ? message.currentState : $root.google.container.v1.DatabaseEncryption.CurrentState[message.currentState] : message.currentState; + if (options.oneofs) + object._currentState = "currentState"; + } + if (message.decryptionKeys && message.decryptionKeys.length) { + object.decryptionKeys = []; + for (var j = 0; j < message.decryptionKeys.length; ++j) + object.decryptionKeys[j] = message.decryptionKeys[j]; + } + if (message.lastOperationErrors && message.lastOperationErrors.length) { + object.lastOperationErrors = []; + for (var j = 0; j < message.lastOperationErrors.length; ++j) + object.lastOperationErrors[j] = $root.google.container.v1.DatabaseEncryption.OperationError.toObject(message.lastOperationErrors[j], options); + } + return object; + }; + + /** + * Converts this DatabaseEncryption to JSON. + * @function toJSON + * @memberof google.container.v1.DatabaseEncryption + * @instance + * @returns {Object.} JSON object + */ + DatabaseEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseEncryption + * @function getTypeUrl + * @memberof google.container.v1.DatabaseEncryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DatabaseEncryption"; + }; + + /** + * State enum. + * @name google.container.v1.DatabaseEncryption.State + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ENCRYPTED=1 ENCRYPTED value + * @property {number} DECRYPTED=2 DECRYPTED value + */ + DatabaseEncryption.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ENCRYPTED"] = 1; + values[valuesById[2] = "DECRYPTED"] = 2; + return values; + })(); + + /** + * CurrentState enum. + * @name google.container.v1.DatabaseEncryption.CurrentState + * @enum {number} + * @property {number} CURRENT_STATE_UNSPECIFIED=0 CURRENT_STATE_UNSPECIFIED value + * @property {number} CURRENT_STATE_ENCRYPTED=7 CURRENT_STATE_ENCRYPTED value + * @property {number} CURRENT_STATE_DECRYPTED=2 CURRENT_STATE_DECRYPTED value + * @property {number} CURRENT_STATE_ENCRYPTION_PENDING=3 CURRENT_STATE_ENCRYPTION_PENDING value + * @property {number} CURRENT_STATE_ENCRYPTION_ERROR=4 CURRENT_STATE_ENCRYPTION_ERROR value + * @property {number} CURRENT_STATE_DECRYPTION_PENDING=5 CURRENT_STATE_DECRYPTION_PENDING value + * @property {number} CURRENT_STATE_DECRYPTION_ERROR=6 CURRENT_STATE_DECRYPTION_ERROR value + */ + DatabaseEncryption.CurrentState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CURRENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[7] = "CURRENT_STATE_ENCRYPTED"] = 7; + values[valuesById[2] = "CURRENT_STATE_DECRYPTED"] = 2; + values[valuesById[3] = "CURRENT_STATE_ENCRYPTION_PENDING"] = 3; + values[valuesById[4] = "CURRENT_STATE_ENCRYPTION_ERROR"] = 4; + values[valuesById[5] = "CURRENT_STATE_DECRYPTION_PENDING"] = 5; + values[valuesById[6] = "CURRENT_STATE_DECRYPTION_ERROR"] = 6; + return values; + })(); + + DatabaseEncryption.OperationError = (function() { + + /** + * Properties of an OperationError. + * @memberof google.container.v1.DatabaseEncryption + * @interface IOperationError + * @property {string|null} [keyName] OperationError keyName + * @property {string|null} [errorMessage] OperationError errorMessage + * @property {google.protobuf.ITimestamp|null} [timestamp] OperationError timestamp + */ + + /** + * Constructs a new OperationError. + * @memberof google.container.v1.DatabaseEncryption + * @classdesc Represents an OperationError. + * @implements IOperationError + * @constructor + * @param {google.container.v1.DatabaseEncryption.IOperationError=} [properties] Properties to set + */ + function OperationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationError keyName. + * @member {string} keyName + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.keyName = ""; + + /** + * OperationError errorMessage. + * @member {string} errorMessage + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.errorMessage = ""; + + /** + * OperationError timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.timestamp = null; + + /** + * Creates a new OperationError instance using the specified properties. + * @function create + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1.DatabaseEncryption.IOperationError=} [properties] Properties to set + * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError instance + */ + OperationError.create = function create(properties) { + return new OperationError(properties); + }; + + /** + * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationError message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DatabaseEncryption.OperationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyName = reader.string(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + case 3: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationError message. + * @function verify + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates an OperationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError + */ + OperationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DatabaseEncryption.OperationError) + return object; + var message = new $root.google.container.v1.DatabaseEncryption.OperationError(); + if (object.keyName != null) + message.keyName = String(object.keyName); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.container.v1.DatabaseEncryption.OperationError.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from an OperationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1.DatabaseEncryption.OperationError} message OperationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyName = ""; + object.errorMessage = ""; + object.timestamp = null; + } + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this OperationError to JSON. + * @function toJSON + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @instance + * @returns {Object.} JSON object + */ + OperationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationError + * @function getTypeUrl + * @memberof google.container.v1.DatabaseEncryption.OperationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DatabaseEncryption.OperationError"; + }; + + return OperationError; + })(); + + return DatabaseEncryption; + })(); + + v1.ListUsableSubnetworksRequest = (function() { + + /** + * Properties of a ListUsableSubnetworksRequest. + * @memberof google.container.v1 + * @interface IListUsableSubnetworksRequest + * @property {string|null} [parent] ListUsableSubnetworksRequest parent + * @property {string|null} [filter] ListUsableSubnetworksRequest filter + * @property {number|null} [pageSize] ListUsableSubnetworksRequest pageSize + * @property {string|null} [pageToken] ListUsableSubnetworksRequest pageToken + */ + + /** + * Constructs a new ListUsableSubnetworksRequest. + * @memberof google.container.v1 + * @classdesc Represents a ListUsableSubnetworksRequest. + * @implements IListUsableSubnetworksRequest + * @constructor + * @param {google.container.v1.IListUsableSubnetworksRequest=} [properties] Properties to set + */ + function ListUsableSubnetworksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUsableSubnetworksRequest parent. + * @member {string} parent + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.parent = ""; + + /** + * ListUsableSubnetworksRequest filter. + * @member {string} filter + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.filter = ""; + + /** + * ListUsableSubnetworksRequest pageSize. + * @member {number} pageSize + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.pageSize = 0; + + /** + * ListUsableSubnetworksRequest pageToken. + * @member {string} pageToken + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUsableSubnetworksRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1.IListUsableSubnetworksRequest=} [properties] Properties to set + * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest instance + */ + ListUsableSubnetworksRequest.create = function create(properties) { + return new ListUsableSubnetworksRequest(properties); + }; + + /** + * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListUsableSubnetworksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUsableSubnetworksRequest message. + * @function verify + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUsableSubnetworksRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + */ + ListUsableSubnetworksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListUsableSubnetworksRequest) + return object; + var message = new $root.google.container.v1.ListUsableSubnetworksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1.ListUsableSubnetworksRequest} message ListUsableSubnetworksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUsableSubnetworksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUsableSubnetworksRequest to JSON. + * @function toJSON + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @instance + * @returns {Object.} JSON object + */ + ListUsableSubnetworksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUsableSubnetworksRequest + * @function getTypeUrl + * @memberof google.container.v1.ListUsableSubnetworksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUsableSubnetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListUsableSubnetworksRequest"; + }; + + return ListUsableSubnetworksRequest; + })(); + + v1.ListUsableSubnetworksResponse = (function() { + + /** + * Properties of a ListUsableSubnetworksResponse. + * @memberof google.container.v1 + * @interface IListUsableSubnetworksResponse + * @property {Array.|null} [subnetworks] ListUsableSubnetworksResponse subnetworks + * @property {string|null} [nextPageToken] ListUsableSubnetworksResponse nextPageToken + */ + + /** + * Constructs a new ListUsableSubnetworksResponse. + * @memberof google.container.v1 + * @classdesc Represents a ListUsableSubnetworksResponse. + * @implements IListUsableSubnetworksResponse + * @constructor + * @param {google.container.v1.IListUsableSubnetworksResponse=} [properties] Properties to set + */ + function ListUsableSubnetworksResponse(properties) { + this.subnetworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUsableSubnetworksResponse subnetworks. + * @member {Array.} subnetworks + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @instance + */ + ListUsableSubnetworksResponse.prototype.subnetworks = $util.emptyArray; + + /** + * ListUsableSubnetworksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @instance + */ + ListUsableSubnetworksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUsableSubnetworksResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1.IListUsableSubnetworksResponse=} [properties] Properties to set + * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse instance + */ + ListUsableSubnetworksResponse.create = function create(properties) { + return new ListUsableSubnetworksResponse(properties); + }; + + /** + * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetworks != null && message.subnetworks.length) + for (var i = 0; i < message.subnetworks.length; ++i) + $root.google.container.v1.UsableSubnetwork.encode(message.subnetworks[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 ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListUsableSubnetworksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.subnetworks && message.subnetworks.length)) + message.subnetworks = []; + message.subnetworks.push($root.google.container.v1.UsableSubnetwork.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUsableSubnetworksResponse message. + * @function verify + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUsableSubnetworksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetworks != null && message.hasOwnProperty("subnetworks")) { + if (!Array.isArray(message.subnetworks)) + return "subnetworks: array expected"; + for (var i = 0; i < message.subnetworks.length; ++i) { + var error = $root.google.container.v1.UsableSubnetwork.verify(message.subnetworks[i]); + if (error) + return "subnetworks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + */ + ListUsableSubnetworksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ListUsableSubnetworksResponse) + return object; + var message = new $root.google.container.v1.ListUsableSubnetworksResponse(); + if (object.subnetworks) { + if (!Array.isArray(object.subnetworks)) + throw TypeError(".google.container.v1.ListUsableSubnetworksResponse.subnetworks: array expected"); + message.subnetworks = []; + for (var i = 0; i < object.subnetworks.length; ++i) { + if (typeof object.subnetworks[i] !== "object") + throw TypeError(".google.container.v1.ListUsableSubnetworksResponse.subnetworks: object expected"); + message.subnetworks[i] = $root.google.container.v1.UsableSubnetwork.fromObject(object.subnetworks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1.ListUsableSubnetworksResponse} message ListUsableSubnetworksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUsableSubnetworksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subnetworks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.subnetworks && message.subnetworks.length) { + object.subnetworks = []; + for (var j = 0; j < message.subnetworks.length; ++j) + object.subnetworks[j] = $root.google.container.v1.UsableSubnetwork.toObject(message.subnetworks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUsableSubnetworksResponse to JSON. + * @function toJSON + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @instance + * @returns {Object.} JSON object + */ + ListUsableSubnetworksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUsableSubnetworksResponse + * @function getTypeUrl + * @memberof google.container.v1.ListUsableSubnetworksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUsableSubnetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ListUsableSubnetworksResponse"; + }; + + return ListUsableSubnetworksResponse; + })(); + + v1.UsableSubnetworkSecondaryRange = (function() { + + /** + * Properties of a UsableSubnetworkSecondaryRange. + * @memberof google.container.v1 + * @interface IUsableSubnetworkSecondaryRange + * @property {string|null} [rangeName] UsableSubnetworkSecondaryRange rangeName + * @property {string|null} [ipCidrRange] UsableSubnetworkSecondaryRange ipCidrRange + * @property {google.container.v1.UsableSubnetworkSecondaryRange.Status|null} [status] UsableSubnetworkSecondaryRange status + */ + + /** + * Constructs a new UsableSubnetworkSecondaryRange. + * @memberof google.container.v1 + * @classdesc Represents a UsableSubnetworkSecondaryRange. + * @implements IUsableSubnetworkSecondaryRange + * @constructor + * @param {google.container.v1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set + */ + function UsableSubnetworkSecondaryRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsableSubnetworkSecondaryRange rangeName. + * @member {string} rangeName + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.rangeName = ""; + + /** + * UsableSubnetworkSecondaryRange ipCidrRange. + * @member {string} ipCidrRange + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.ipCidrRange = ""; + + /** + * UsableSubnetworkSecondaryRange status. + * @member {google.container.v1.UsableSubnetworkSecondaryRange.Status} status + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.status = 0; + + /** + * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. + * @function create + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set + * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange instance + */ + UsableSubnetworkSecondaryRange.create = function create(properties) { + return new UsableSubnetworkSecondaryRange(properties); + }; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetworkSecondaryRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipCidrRange); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + return writer; + }; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetworkSecondaryRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetworkSecondaryRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UsableSubnetworkSecondaryRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeName = reader.string(); + break; + } + case 2: { + message.ipCidrRange = reader.string(); + break; + } + case 3: { + message.status = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetworkSecondaryRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsableSubnetworkSecondaryRange message. + * @function verify + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsableSubnetworkSecondaryRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + if (!$util.isString(message.rangeName)) + return "rangeName: string expected"; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + */ + UsableSubnetworkSecondaryRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UsableSubnetworkSecondaryRange) + return object; + var message = new $root.google.container.v1.UsableSubnetworkSecondaryRange(); + if (object.rangeName != null) + message.rangeName = String(object.rangeName); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "UNUSED": + case 1: + message.status = 1; + break; + case "IN_USE_SERVICE": + case 2: + message.status = 2; + break; + case "IN_USE_SHAREABLE_POD": + case 3: + message.status = 3; + break; + case "IN_USE_MANAGED_POD": + case 4: + message.status = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1.UsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsableSubnetworkSecondaryRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rangeName = ""; + object.ipCidrRange = ""; + object.status = options.enums === String ? "UNKNOWN" : 0; + } + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + object.rangeName = message.rangeName; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + object.ipCidrRange = message.ipCidrRange; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1.UsableSubnetworkSecondaryRange.Status[message.status] === undefined ? message.status : $root.google.container.v1.UsableSubnetworkSecondaryRange.Status[message.status] : message.status; + return object; + }; + + /** + * Converts this UsableSubnetworkSecondaryRange to JSON. + * @function toJSON + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @instance + * @returns {Object.} JSON object + */ + UsableSubnetworkSecondaryRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsableSubnetworkSecondaryRange + * @function getTypeUrl + * @memberof google.container.v1.UsableSubnetworkSecondaryRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsableSubnetworkSecondaryRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UsableSubnetworkSecondaryRange"; + }; + + /** + * Status enum. + * @name google.container.v1.UsableSubnetworkSecondaryRange.Status + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} UNUSED=1 UNUSED value + * @property {number} IN_USE_SERVICE=2 IN_USE_SERVICE value + * @property {number} IN_USE_SHAREABLE_POD=3 IN_USE_SHAREABLE_POD value + * @property {number} IN_USE_MANAGED_POD=4 IN_USE_MANAGED_POD value + */ + UsableSubnetworkSecondaryRange.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "UNUSED"] = 1; + values[valuesById[2] = "IN_USE_SERVICE"] = 2; + values[valuesById[3] = "IN_USE_SHAREABLE_POD"] = 3; + values[valuesById[4] = "IN_USE_MANAGED_POD"] = 4; + return values; + })(); + + return UsableSubnetworkSecondaryRange; + })(); + + v1.UsableSubnetwork = (function() { + + /** + * Properties of a UsableSubnetwork. + * @memberof google.container.v1 + * @interface IUsableSubnetwork + * @property {string|null} [subnetwork] UsableSubnetwork subnetwork + * @property {string|null} [network] UsableSubnetwork network + * @property {string|null} [ipCidrRange] UsableSubnetwork ipCidrRange + * @property {Array.|null} [secondaryIpRanges] UsableSubnetwork secondaryIpRanges + * @property {string|null} [statusMessage] UsableSubnetwork statusMessage + */ + + /** + * Constructs a new UsableSubnetwork. + * @memberof google.container.v1 + * @classdesc Represents a UsableSubnetwork. + * @implements IUsableSubnetwork + * @constructor + * @param {google.container.v1.IUsableSubnetwork=} [properties] Properties to set + */ + function UsableSubnetwork(properties) { + this.secondaryIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsableSubnetwork subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.subnetwork = ""; + + /** + * UsableSubnetwork network. + * @member {string} network + * @memberof google.container.v1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.network = ""; + + /** + * UsableSubnetwork ipCidrRange. + * @member {string} ipCidrRange + * @memberof google.container.v1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.ipCidrRange = ""; + + /** + * UsableSubnetwork secondaryIpRanges. + * @member {Array.} secondaryIpRanges + * @memberof google.container.v1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.secondaryIpRanges = $util.emptyArray; + + /** + * UsableSubnetwork statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.statusMessage = ""; + + /** + * Creates a new UsableSubnetwork instance using the specified properties. + * @function create + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {google.container.v1.IUsableSubnetwork=} [properties] Properties to set + * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork instance + */ + UsableSubnetwork.create = function create(properties) { + return new UsableSubnetwork(properties); + }; + + /** + * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {google.container.v1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipCidrRange); + if (message.secondaryIpRanges != null && message.secondaryIpRanges.length) + for (var i = 0; i < message.secondaryIpRanges.length; ++i) + $root.google.container.v1.UsableSubnetworkSecondaryRange.encode(message.secondaryIpRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + return writer; + }; + + /** + * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {google.container.v1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UsableSubnetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 2: { + message.network = reader.string(); + break; + } + case 3: { + message.ipCidrRange = reader.string(); + break; + } + case 4: { + if (!(message.secondaryIpRanges && message.secondaryIpRanges.length)) + message.secondaryIpRanges = []; + message.secondaryIpRanges.push($root.google.container.v1.UsableSubnetworkSecondaryRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsableSubnetwork message. + * @function verify + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsableSubnetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + if (message.secondaryIpRanges != null && message.hasOwnProperty("secondaryIpRanges")) { + if (!Array.isArray(message.secondaryIpRanges)) + return "secondaryIpRanges: array expected"; + for (var i = 0; i < message.secondaryIpRanges.length; ++i) { + var error = $root.google.container.v1.UsableSubnetworkSecondaryRange.verify(message.secondaryIpRanges[i]); + if (error) + return "secondaryIpRanges." + error; + } + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + return null; + }; + + /** + * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork + */ + UsableSubnetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UsableSubnetwork) + return object; + var message = new $root.google.container.v1.UsableSubnetwork(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.network != null) + message.network = String(object.network); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.secondaryIpRanges) { + if (!Array.isArray(object.secondaryIpRanges)) + throw TypeError(".google.container.v1.UsableSubnetwork.secondaryIpRanges: array expected"); + message.secondaryIpRanges = []; + for (var i = 0; i < object.secondaryIpRanges.length; ++i) { + if (typeof object.secondaryIpRanges[i] !== "object") + throw TypeError(".google.container.v1.UsableSubnetwork.secondaryIpRanges: object expected"); + message.secondaryIpRanges[i] = $root.google.container.v1.UsableSubnetworkSecondaryRange.fromObject(object.secondaryIpRanges[i]); + } + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + return message; + }; + + /** + * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {google.container.v1.UsableSubnetwork} message UsableSubnetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsableSubnetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.secondaryIpRanges = []; + if (options.defaults) { + object.subnetwork = ""; + object.network = ""; + object.ipCidrRange = ""; + object.statusMessage = ""; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + object.ipCidrRange = message.ipCidrRange; + if (message.secondaryIpRanges && message.secondaryIpRanges.length) { + object.secondaryIpRanges = []; + for (var j = 0; j < message.secondaryIpRanges.length; ++j) + object.secondaryIpRanges[j] = $root.google.container.v1.UsableSubnetworkSecondaryRange.toObject(message.secondaryIpRanges[j], options); + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + return object; + }; + + /** + * Converts this UsableSubnetwork to JSON. + * @function toJSON + * @memberof google.container.v1.UsableSubnetwork + * @instance + * @returns {Object.} JSON object + */ + UsableSubnetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsableSubnetwork + * @function getTypeUrl + * @memberof google.container.v1.UsableSubnetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsableSubnetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UsableSubnetwork"; + }; + + return UsableSubnetwork; + })(); + + v1.ResourceUsageExportConfig = (function() { + + /** + * Properties of a ResourceUsageExportConfig. + * @memberof google.container.v1 + * @interface IResourceUsageExportConfig + * @property {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null} [bigqueryDestination] ResourceUsageExportConfig bigqueryDestination + * @property {boolean|null} [enableNetworkEgressMetering] ResourceUsageExportConfig enableNetworkEgressMetering + * @property {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null} [consumptionMeteringConfig] ResourceUsageExportConfig consumptionMeteringConfig + */ + + /** + * Constructs a new ResourceUsageExportConfig. + * @memberof google.container.v1 + * @classdesc Represents a ResourceUsageExportConfig. + * @implements IResourceUsageExportConfig + * @constructor + * @param {google.container.v1.IResourceUsageExportConfig=} [properties] Properties to set + */ + function ResourceUsageExportConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceUsageExportConfig bigqueryDestination. + * @member {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.container.v1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.bigqueryDestination = null; + + /** + * ResourceUsageExportConfig enableNetworkEgressMetering. + * @member {boolean} enableNetworkEgressMetering + * @memberof google.container.v1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.enableNetworkEgressMetering = false; + + /** + * ResourceUsageExportConfig consumptionMeteringConfig. + * @member {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null|undefined} consumptionMeteringConfig + * @memberof google.container.v1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.consumptionMeteringConfig = null; + + /** + * Creates a new ResourceUsageExportConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {google.container.v1.IResourceUsageExportConfig=} [properties] Properties to set + * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig instance + */ + ResourceUsageExportConfig.create = function create(properties) { + return new ResourceUsageExportConfig(properties); + }; + + /** + * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {google.container.v1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsageExportConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryDestination != null && Object.hasOwnProperty.call(message, "bigqueryDestination")) + $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enableNetworkEgressMetering != null && Object.hasOwnProperty.call(message, "enableNetworkEgressMetering")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNetworkEgressMetering); + if (message.consumptionMeteringConfig != null && Object.hasOwnProperty.call(message, "consumptionMeteringConfig")) + $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.encode(message.consumptionMeteringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {google.container.v1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsageExportConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsageExportConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enableNetworkEgressMetering = reader.bool(); + break; + } + case 3: { + message.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsageExportConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceUsageExportConfig message. + * @function verify + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceUsageExportConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + var error = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } + if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) + if (typeof message.enableNetworkEgressMetering !== "boolean") + return "enableNetworkEgressMetering: boolean expected"; + if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) { + var error = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify(message.consumptionMeteringConfig); + if (error) + return "consumptionMeteringConfig." + error; + } + return null; + }; + + /** + * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig + */ + ResourceUsageExportConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceUsageExportConfig) + return object; + var message = new $root.google.container.v1.ResourceUsageExportConfig(); + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.container.v1.ResourceUsageExportConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.fromObject(object.bigqueryDestination); + } + if (object.enableNetworkEgressMetering != null) + message.enableNetworkEgressMetering = Boolean(object.enableNetworkEgressMetering); + if (object.consumptionMeteringConfig != null) { + if (typeof object.consumptionMeteringConfig !== "object") + throw TypeError(".google.container.v1.ResourceUsageExportConfig.consumptionMeteringConfig: object expected"); + message.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.fromObject(object.consumptionMeteringConfig); + } + return message; + }; + + /** + * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {google.container.v1.ResourceUsageExportConfig} message ResourceUsageExportConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceUsageExportConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bigqueryDestination = null; + object.enableNetworkEgressMetering = false; + object.consumptionMeteringConfig = null; + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + object.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) + object.enableNetworkEgressMetering = message.enableNetworkEgressMetering; + if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) + object.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.toObject(message.consumptionMeteringConfig, options); + return object; + }; + + /** + * Converts this ResourceUsageExportConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceUsageExportConfig + * @instance + * @returns {Object.} JSON object + */ + ResourceUsageExportConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceUsageExportConfig + * @function getTypeUrl + * @memberof google.container.v1.ResourceUsageExportConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceUsageExportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig"; + }; + + ResourceUsageExportConfig.BigQueryDestination = (function() { + + /** + * Properties of a BigQueryDestination. + * @memberof google.container.v1.ResourceUsageExportConfig + * @interface IBigQueryDestination + * @property {string|null} [datasetId] BigQueryDestination datasetId + */ + + /** + * Constructs a new BigQueryDestination. + * @memberof google.container.v1.ResourceUsageExportConfig + * @classdesc Represents a BigQueryDestination. + * @implements IBigQueryDestination + * @constructor + * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set + */ + function BigQueryDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDestination datasetId. + * @member {string} datasetId + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.datasetId = ""; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set + * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination instance + */ + BigQueryDestination.create = function create(properties) { + return new BigQueryDestination(properties); + }; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); + return writer; + }; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datasetId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDestination message. + * @function verify + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + return null; + }; + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + */ + BigQueryDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination) + return object; + var message = new $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + return message; + }; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} message BigQueryDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasetId = ""; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + return object; + }; + + /** + * Converts this BigQueryDestination to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @instance + * @returns {Object.} JSON object + */ + BigQueryDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDestination + * @function getTypeUrl + * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"; + }; + + return BigQueryDestination; + })(); + + ResourceUsageExportConfig.ConsumptionMeteringConfig = (function() { + + /** + * Properties of a ConsumptionMeteringConfig. + * @memberof google.container.v1.ResourceUsageExportConfig + * @interface IConsumptionMeteringConfig + * @property {boolean|null} [enabled] ConsumptionMeteringConfig enabled + */ + + /** + * Constructs a new ConsumptionMeteringConfig. + * @memberof google.container.v1.ResourceUsageExportConfig + * @classdesc Represents a ConsumptionMeteringConfig. + * @implements IConsumptionMeteringConfig + * @constructor + * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set + */ + function ConsumptionMeteringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumptionMeteringConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @instance + */ + ConsumptionMeteringConfig.prototype.enabled = false; + + /** + * Creates a new ConsumptionMeteringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set + * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig instance + */ + ConsumptionMeteringConfig.create = function create(properties) { + return new ConsumptionMeteringConfig(properties); + }; + + /** + * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumptionMeteringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumptionMeteringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumptionMeteringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumptionMeteringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumptionMeteringConfig message. + * @function verify + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumptionMeteringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + */ + ConsumptionMeteringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig) + return object; + var message = new $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} message ConsumptionMeteringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumptionMeteringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConsumptionMeteringConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @instance + * @returns {Object.} JSON object + */ + ConsumptionMeteringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumptionMeteringConfig + * @function getTypeUrl + * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumptionMeteringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"; + }; + + return ConsumptionMeteringConfig; + })(); + + return ResourceUsageExportConfig; + })(); + + v1.VerticalPodAutoscaling = (function() { + + /** + * Properties of a VerticalPodAutoscaling. + * @memberof google.container.v1 + * @interface IVerticalPodAutoscaling + * @property {boolean|null} [enabled] VerticalPodAutoscaling enabled + */ + + /** + * Constructs a new VerticalPodAutoscaling. + * @memberof google.container.v1 + * @classdesc Represents a VerticalPodAutoscaling. + * @implements IVerticalPodAutoscaling + * @constructor + * @param {google.container.v1.IVerticalPodAutoscaling=} [properties] Properties to set + */ + function VerticalPodAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerticalPodAutoscaling enabled. + * @member {boolean} enabled + * @memberof google.container.v1.VerticalPodAutoscaling + * @instance + */ + VerticalPodAutoscaling.prototype.enabled = false; + + /** + * Creates a new VerticalPodAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {google.container.v1.IVerticalPodAutoscaling=} [properties] Properties to set + * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling instance + */ + VerticalPodAutoscaling.create = function create(properties) { + return new VerticalPodAutoscaling(properties); + }; + + /** + * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {google.container.v1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerticalPodAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {google.container.v1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerticalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerticalPodAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.VerticalPodAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerticalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerticalPodAutoscaling message. + * @function verify + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerticalPodAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling + */ + VerticalPodAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.VerticalPodAutoscaling) + return object; + var message = new $root.google.container.v1.VerticalPodAutoscaling(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {google.container.v1.VerticalPodAutoscaling} message VerticalPodAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerticalPodAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this VerticalPodAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1.VerticalPodAutoscaling + * @instance + * @returns {Object.} JSON object + */ + VerticalPodAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerticalPodAutoscaling + * @function getTypeUrl + * @memberof google.container.v1.VerticalPodAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerticalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.VerticalPodAutoscaling"; + }; + + return VerticalPodAutoscaling; + })(); + + v1.DefaultSnatStatus = (function() { + + /** + * Properties of a DefaultSnatStatus. + * @memberof google.container.v1 + * @interface IDefaultSnatStatus + * @property {boolean|null} [disabled] DefaultSnatStatus disabled + */ + + /** + * Constructs a new DefaultSnatStatus. + * @memberof google.container.v1 + * @classdesc Represents a DefaultSnatStatus. + * @implements IDefaultSnatStatus + * @constructor + * @param {google.container.v1.IDefaultSnatStatus=} [properties] Properties to set + */ + function DefaultSnatStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultSnatStatus disabled. + * @member {boolean} disabled + * @memberof google.container.v1.DefaultSnatStatus + * @instance + */ + DefaultSnatStatus.prototype.disabled = false; + + /** + * Creates a new DefaultSnatStatus instance using the specified properties. + * @function create + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {google.container.v1.IDefaultSnatStatus=} [properties] Properties to set + * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus instance + */ + DefaultSnatStatus.create = function create(properties) { + return new DefaultSnatStatus(properties); + }; + + /** + * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {google.container.v1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultSnatStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {google.container.v1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultSnatStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultSnatStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DefaultSnatStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultSnatStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultSnatStatus message. + * @function verify + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultSnatStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus + */ + DefaultSnatStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DefaultSnatStatus) + return object; + var message = new $root.google.container.v1.DefaultSnatStatus(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {google.container.v1.DefaultSnatStatus} message DefaultSnatStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultSnatStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this DefaultSnatStatus to JSON. + * @function toJSON + * @memberof google.container.v1.DefaultSnatStatus + * @instance + * @returns {Object.} JSON object + */ + DefaultSnatStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DefaultSnatStatus + * @function getTypeUrl + * @memberof google.container.v1.DefaultSnatStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DefaultSnatStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DefaultSnatStatus"; + }; + + return DefaultSnatStatus; + })(); + + v1.ShieldedNodes = (function() { + + /** + * Properties of a ShieldedNodes. + * @memberof google.container.v1 + * @interface IShieldedNodes + * @property {boolean|null} [enabled] ShieldedNodes enabled + */ + + /** + * Constructs a new ShieldedNodes. + * @memberof google.container.v1 + * @classdesc Represents a ShieldedNodes. + * @implements IShieldedNodes + * @constructor + * @param {google.container.v1.IShieldedNodes=} [properties] Properties to set + */ + function ShieldedNodes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShieldedNodes enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ShieldedNodes + * @instance + */ + ShieldedNodes.prototype.enabled = false; + + /** + * Creates a new ShieldedNodes instance using the specified properties. + * @function create + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {google.container.v1.IShieldedNodes=} [properties] Properties to set + * @returns {google.container.v1.ShieldedNodes} ShieldedNodes instance + */ + ShieldedNodes.create = function create(properties) { + return new ShieldedNodes(properties); + }; + + /** + * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {google.container.v1.IShieldedNodes} message ShieldedNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedNodes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {google.container.v1.IShieldedNodes} message ShieldedNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedNodes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ShieldedNodes} ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedNodes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ShieldedNodes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ShieldedNodes} ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedNodes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShieldedNodes message. + * @function verify + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShieldedNodes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ShieldedNodes} ShieldedNodes + */ + ShieldedNodes.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ShieldedNodes) + return object; + var message = new $root.google.container.v1.ShieldedNodes(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {google.container.v1.ShieldedNodes} message ShieldedNodes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShieldedNodes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ShieldedNodes to JSON. + * @function toJSON + * @memberof google.container.v1.ShieldedNodes + * @instance + * @returns {Object.} JSON object + */ + ShieldedNodes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShieldedNodes + * @function getTypeUrl + * @memberof google.container.v1.ShieldedNodes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShieldedNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ShieldedNodes"; + }; + + return ShieldedNodes; + })(); + + v1.VirtualNIC = (function() { + + /** + * Properties of a VirtualNIC. + * @memberof google.container.v1 + * @interface IVirtualNIC + * @property {boolean|null} [enabled] VirtualNIC enabled + */ + + /** + * Constructs a new VirtualNIC. + * @memberof google.container.v1 + * @classdesc Represents a VirtualNIC. + * @implements IVirtualNIC + * @constructor + * @param {google.container.v1.IVirtualNIC=} [properties] Properties to set + */ + function VirtualNIC(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VirtualNIC enabled. + * @member {boolean} enabled + * @memberof google.container.v1.VirtualNIC + * @instance + */ + VirtualNIC.prototype.enabled = false; + + /** + * Creates a new VirtualNIC instance using the specified properties. + * @function create + * @memberof google.container.v1.VirtualNIC + * @static + * @param {google.container.v1.IVirtualNIC=} [properties] Properties to set + * @returns {google.container.v1.VirtualNIC} VirtualNIC instance + */ + VirtualNIC.create = function create(properties) { + return new VirtualNIC(properties); + }; + + /** + * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. + * @function encode + * @memberof google.container.v1.VirtualNIC + * @static + * @param {google.container.v1.IVirtualNIC} message VirtualNIC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualNIC.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.VirtualNIC + * @static + * @param {google.container.v1.IVirtualNIC} message VirtualNIC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualNIC.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.VirtualNIC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.VirtualNIC} VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualNIC.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.VirtualNIC(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.VirtualNIC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.VirtualNIC} VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualNIC.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualNIC message. + * @function verify + * @memberof google.container.v1.VirtualNIC + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualNIC.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.VirtualNIC + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.VirtualNIC} VirtualNIC + */ + VirtualNIC.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.VirtualNIC) + return object; + var message = new $root.google.container.v1.VirtualNIC(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.VirtualNIC + * @static + * @param {google.container.v1.VirtualNIC} message VirtualNIC + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualNIC.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this VirtualNIC to JSON. + * @function toJSON + * @memberof google.container.v1.VirtualNIC + * @instance + * @returns {Object.} JSON object + */ + VirtualNIC.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualNIC + * @function getTypeUrl + * @memberof google.container.v1.VirtualNIC + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualNIC.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.VirtualNIC"; + }; + + return VirtualNIC; + })(); + + v1.FastSocket = (function() { + + /** + * Properties of a FastSocket. + * @memberof google.container.v1 + * @interface IFastSocket + * @property {boolean|null} [enabled] FastSocket enabled + */ + + /** + * Constructs a new FastSocket. + * @memberof google.container.v1 + * @classdesc Represents a FastSocket. + * @implements IFastSocket + * @constructor + * @param {google.container.v1.IFastSocket=} [properties] Properties to set + */ + function FastSocket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FastSocket enabled. + * @member {boolean} enabled + * @memberof google.container.v1.FastSocket + * @instance + */ + FastSocket.prototype.enabled = false; + + /** + * Creates a new FastSocket instance using the specified properties. + * @function create + * @memberof google.container.v1.FastSocket + * @static + * @param {google.container.v1.IFastSocket=} [properties] Properties to set + * @returns {google.container.v1.FastSocket} FastSocket instance + */ + FastSocket.create = function create(properties) { + return new FastSocket(properties); + }; + + /** + * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. + * @function encode + * @memberof google.container.v1.FastSocket + * @static + * @param {google.container.v1.IFastSocket} message FastSocket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FastSocket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.FastSocket + * @static + * @param {google.container.v1.IFastSocket} message FastSocket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FastSocket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FastSocket message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.FastSocket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.FastSocket} FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FastSocket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.FastSocket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FastSocket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.FastSocket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.FastSocket} FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FastSocket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FastSocket message. + * @function verify + * @memberof google.container.v1.FastSocket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FastSocket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.FastSocket + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.FastSocket} FastSocket + */ + FastSocket.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.FastSocket) + return object; + var message = new $root.google.container.v1.FastSocket(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a FastSocket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.FastSocket + * @static + * @param {google.container.v1.FastSocket} message FastSocket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FastSocket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this FastSocket to JSON. + * @function toJSON + * @memberof google.container.v1.FastSocket + * @instance + * @returns {Object.} JSON object + */ + FastSocket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FastSocket + * @function getTypeUrl + * @memberof google.container.v1.FastSocket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FastSocket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.FastSocket"; + }; + + return FastSocket; + })(); + + /** + * PrivateIPv6GoogleAccess enum. + * @name google.container.v1.PrivateIPv6GoogleAccess + * @enum {number} + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED=1 PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE=2 PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL=3 PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL value + */ + v1.PrivateIPv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED"] = 1; + values[valuesById[2] = "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL"] = 3; + return values; + })(); + + v1.NotificationConfig = (function() { + + /** + * Properties of a NotificationConfig. + * @memberof google.container.v1 + * @interface INotificationConfig + * @property {google.container.v1.NotificationConfig.IPubSub|null} [pubsub] NotificationConfig pubsub + */ + + /** + * Constructs a new NotificationConfig. + * @memberof google.container.v1 + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig + * @constructor + * @param {google.container.v1.INotificationConfig=} [properties] Properties to set + */ + function NotificationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationConfig pubsub. + * @member {google.container.v1.NotificationConfig.IPubSub|null|undefined} pubsub + * @memberof google.container.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.pubsub = null; + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NotificationConfig + * @static + * @param {google.container.v1.INotificationConfig=} [properties] Properties to set + * @returns {google.container.v1.NotificationConfig} NotificationConfig instance + */ + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); + }; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NotificationConfig + * @static + * @param {google.container.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) + $root.google.container.v1.NotificationConfig.PubSub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NotificationConfig + * @static + * @param {google.container.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pubsub = $root.google.container.v1.NotificationConfig.PubSub.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationConfig message. + * @function verify + * @memberof google.container.v1.NotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) { + var error = $root.google.container.v1.NotificationConfig.PubSub.verify(message.pubsub); + if (error) + return "pubsub." + error; + } + return null; + }; + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NotificationConfig} NotificationConfig + */ + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NotificationConfig) + return object; + var message = new $root.google.container.v1.NotificationConfig(); + if (object.pubsub != null) { + if (typeof object.pubsub !== "object") + throw TypeError(".google.container.v1.NotificationConfig.pubsub: object expected"); + message.pubsub = $root.google.container.v1.NotificationConfig.PubSub.fromObject(object.pubsub); + } + return message; + }; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NotificationConfig + * @static + * @param {google.container.v1.NotificationConfig} message NotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pubsub = null; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) + object.pubsub = $root.google.container.v1.NotificationConfig.PubSub.toObject(message.pubsub, options); + return object; + }; + + /** + * Converts this NotificationConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NotificationConfig + * @instance + * @returns {Object.} JSON object + */ + NotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationConfig + * @function getTypeUrl + * @memberof google.container.v1.NotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NotificationConfig"; + }; + + /** + * EventType enum. + * @name google.container.v1.NotificationConfig.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} UPGRADE_AVAILABLE_EVENT=1 UPGRADE_AVAILABLE_EVENT value + * @property {number} UPGRADE_EVENT=2 UPGRADE_EVENT value + * @property {number} SECURITY_BULLETIN_EVENT=3 SECURITY_BULLETIN_EVENT value + */ + NotificationConfig.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPGRADE_AVAILABLE_EVENT"] = 1; + values[valuesById[2] = "UPGRADE_EVENT"] = 2; + values[valuesById[3] = "SECURITY_BULLETIN_EVENT"] = 3; + return values; + })(); + + NotificationConfig.PubSub = (function() { + + /** + * Properties of a PubSub. + * @memberof google.container.v1.NotificationConfig + * @interface IPubSub + * @property {boolean|null} [enabled] PubSub enabled + * @property {string|null} [topic] PubSub topic + * @property {google.container.v1.NotificationConfig.IFilter|null} [filter] PubSub filter + */ + + /** + * Constructs a new PubSub. + * @memberof google.container.v1.NotificationConfig + * @classdesc Represents a PubSub. + * @implements IPubSub + * @constructor + * @param {google.container.v1.NotificationConfig.IPubSub=} [properties] Properties to set + */ + function PubSub(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubSub enabled. + * @member {boolean} enabled + * @memberof google.container.v1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.enabled = false; + + /** + * PubSub topic. + * @member {string} topic + * @memberof google.container.v1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.topic = ""; + + /** + * PubSub filter. + * @member {google.container.v1.NotificationConfig.IFilter|null|undefined} filter + * @memberof google.container.v1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.filter = null; + + /** + * Creates a new PubSub instance using the specified properties. + * @function create + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {google.container.v1.NotificationConfig.IPubSub=} [properties] Properties to set + * @returns {google.container.v1.NotificationConfig.PubSub} PubSub instance + */ + PubSub.create = function create(properties) { + return new PubSub(properties); + }; + + /** + * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {google.container.v1.NotificationConfig.IPubSub} message PubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSub.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.container.v1.NotificationConfig.Filter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {google.container.v1.NotificationConfig.IPubSub} message PubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSub.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSub message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NotificationConfig.PubSub} PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSub.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig.PubSub(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.topic = reader.string(); + break; + } + case 3: { + message.filter = $root.google.container.v1.NotificationConfig.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubSub message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NotificationConfig.PubSub} PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSub.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSub message. + * @function verify + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSub.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.container.v1.NotificationConfig.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + return null; + }; + + /** + * Creates a PubSub message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NotificationConfig.PubSub} PubSub + */ + PubSub.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NotificationConfig.PubSub) + return object; + var message = new $root.google.container.v1.NotificationConfig.PubSub(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.topic != null) + message.topic = String(object.topic); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.container.v1.NotificationConfig.PubSub.filter: object expected"); + message.filter = $root.google.container.v1.NotificationConfig.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a PubSub message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {google.container.v1.NotificationConfig.PubSub} message PubSub + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSub.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.topic = ""; + object.filter = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.container.v1.NotificationConfig.Filter.toObject(message.filter, options); + return object; + }; + + /** + * Converts this PubSub to JSON. + * @function toJSON + * @memberof google.container.v1.NotificationConfig.PubSub + * @instance + * @returns {Object.} JSON object + */ + PubSub.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSub + * @function getTypeUrl + * @memberof google.container.v1.NotificationConfig.PubSub + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NotificationConfig.PubSub"; + }; + + return PubSub; + })(); + + NotificationConfig.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.container.v1.NotificationConfig + * @interface IFilter + * @property {Array.|null} [eventType] Filter eventType + */ + + /** + * Constructs a new Filter. + * @memberof google.container.v1.NotificationConfig + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.container.v1.NotificationConfig.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + this.eventType = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter eventType. + * @member {Array.} eventType + * @memberof google.container.v1.NotificationConfig.Filter + * @instance + */ + Filter.prototype.eventType = $util.emptyArray; + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {google.container.v1.NotificationConfig.IFilter=} [properties] Properties to set + * @returns {google.container.v1.NotificationConfig.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {google.container.v1.NotificationConfig.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventType != null && message.eventType.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.eventType.length; ++i) + writer.int32(message.eventType[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {google.container.v1.NotificationConfig.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NotificationConfig.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.eventType && message.eventType.length)) + message.eventType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.eventType.push(reader.int32()); + } else + message.eventType.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NotificationConfig.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventType != null && message.hasOwnProperty("eventType")) { + if (!Array.isArray(message.eventType)) + return "eventType: array expected"; + for (var i = 0; i < message.eventType.length; ++i) + switch (message.eventType[i]) { + default: + return "eventType: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NotificationConfig.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NotificationConfig.Filter) + return object; + var message = new $root.google.container.v1.NotificationConfig.Filter(); + if (object.eventType) { + if (!Array.isArray(object.eventType)) + throw TypeError(".google.container.v1.NotificationConfig.Filter.eventType: array expected"); + message.eventType = []; + for (var i = 0; i < object.eventType.length; ++i) + switch (object.eventType[i]) { + default: + if (typeof object.eventType[i] === "number") { + message.eventType[i] = object.eventType[i]; + break; + } + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.eventType[i] = 0; + break; + case "UPGRADE_AVAILABLE_EVENT": + case 1: + message.eventType[i] = 1; + break; + case "UPGRADE_EVENT": + case 2: + message.eventType[i] = 2; + break; + case "SECURITY_BULLETIN_EVENT": + case 3: + message.eventType[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {google.container.v1.NotificationConfig.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.eventType = []; + if (message.eventType && message.eventType.length) { + object.eventType = []; + for (var j = 0; j < message.eventType.length; ++j) + object.eventType[j] = options.enums === String ? $root.google.container.v1.NotificationConfig.EventType[message.eventType[j]] === undefined ? message.eventType[j] : $root.google.container.v1.NotificationConfig.EventType[message.eventType[j]] : message.eventType[j]; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.container.v1.NotificationConfig.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.container.v1.NotificationConfig.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NotificationConfig.Filter"; + }; + + return Filter; + })(); + + return NotificationConfig; + })(); + + v1.ConfidentialNodes = (function() { + + /** + * Properties of a ConfidentialNodes. + * @memberof google.container.v1 + * @interface IConfidentialNodes + * @property {boolean|null} [enabled] ConfidentialNodes enabled + */ + + /** + * Constructs a new ConfidentialNodes. + * @memberof google.container.v1 + * @classdesc Represents a ConfidentialNodes. + * @implements IConfidentialNodes + * @constructor + * @param {google.container.v1.IConfidentialNodes=} [properties] Properties to set + */ + function ConfidentialNodes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialNodes enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ConfidentialNodes + * @instance + */ + ConfidentialNodes.prototype.enabled = false; + + /** + * Creates a new ConfidentialNodes instance using the specified properties. + * @function create + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {google.container.v1.IConfidentialNodes=} [properties] Properties to set + * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes instance + */ + ConfidentialNodes.create = function create(properties) { + return new ConfidentialNodes(properties); + }; + + /** + * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {google.container.v1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialNodes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {google.container.v1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialNodes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialNodes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ConfidentialNodes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialNodes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialNodes message. + * @function verify + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialNodes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes + */ + ConfidentialNodes.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ConfidentialNodes) + return object; + var message = new $root.google.container.v1.ConfidentialNodes(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {google.container.v1.ConfidentialNodes} message ConfidentialNodes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialNodes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConfidentialNodes to JSON. + * @function toJSON + * @memberof google.container.v1.ConfidentialNodes + * @instance + * @returns {Object.} JSON object + */ + ConfidentialNodes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialNodes + * @function getTypeUrl + * @memberof google.container.v1.ConfidentialNodes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ConfidentialNodes"; + }; + + return ConfidentialNodes; + })(); + + /** + * UpgradeResourceType enum. + * @name google.container.v1.UpgradeResourceType + * @enum {number} + * @property {number} UPGRADE_RESOURCE_TYPE_UNSPECIFIED=0 UPGRADE_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} MASTER=1 MASTER value + * @property {number} NODE_POOL=2 NODE_POOL value + */ + v1.UpgradeResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPGRADE_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MASTER"] = 1; + values[valuesById[2] = "NODE_POOL"] = 2; + return values; + })(); + + v1.UpgradeEvent = (function() { + + /** + * Properties of an UpgradeEvent. + * @memberof google.container.v1 + * @interface IUpgradeEvent + * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeEvent resourceType + * @property {string|null} [operation] UpgradeEvent operation + * @property {google.protobuf.ITimestamp|null} [operationStartTime] UpgradeEvent operationStartTime + * @property {string|null} [currentVersion] UpgradeEvent currentVersion + * @property {string|null} [targetVersion] UpgradeEvent targetVersion + * @property {string|null} [resource] UpgradeEvent resource + */ + + /** + * Constructs a new UpgradeEvent. + * @memberof google.container.v1 + * @classdesc Represents an UpgradeEvent. + * @implements IUpgradeEvent + * @constructor + * @param {google.container.v1.IUpgradeEvent=} [properties] Properties to set + */ + function UpgradeEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeEvent resourceType. + * @member {google.container.v1.UpgradeResourceType} resourceType + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.resourceType = 0; + + /** + * UpgradeEvent operation. + * @member {string} operation + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.operation = ""; + + /** + * UpgradeEvent operationStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} operationStartTime + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.operationStartTime = null; + + /** + * UpgradeEvent currentVersion. + * @member {string} currentVersion + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.currentVersion = ""; + + /** + * UpgradeEvent targetVersion. + * @member {string} targetVersion + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.targetVersion = ""; + + /** + * UpgradeEvent resource. + * @member {string} resource + * @memberof google.container.v1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.resource = ""; + + /** + * Creates a new UpgradeEvent instance using the specified properties. + * @function create + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {google.container.v1.IUpgradeEvent=} [properties] Properties to set + * @returns {google.container.v1.UpgradeEvent} UpgradeEvent instance + */ + UpgradeEvent.create = function create(properties) { + return new UpgradeEvent(properties); + }; + + /** + * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {google.container.v1.IUpgradeEvent} message UpgradeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); + if (message.operationStartTime != null && Object.hasOwnProperty.call(message, "operationStartTime")) + $root.google.protobuf.Timestamp.encode(message.operationStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.currentVersion); + if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetVersion); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.resource); + return writer; + }; + + /** + * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {google.container.v1.IUpgradeEvent} message UpgradeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpgradeEvent} UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.int32(); + break; + } + case 2: { + message.operation = reader.string(); + break; + } + case 3: { + message.operationStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.currentVersion = reader.string(); + break; + } + case 5: { + message.targetVersion = reader.string(); + break; + } + case 6: { + message.resource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpgradeEvent} UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeEvent message. + * @function verify + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.operationStartTime); + if (error) + return "operationStartTime." + error; + } + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + if (!$util.isString(message.currentVersion)) + return "currentVersion: string expected"; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + if (!$util.isString(message.targetVersion)) + return "targetVersion: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + return null; + }; + + /** + * Creates an UpgradeEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpgradeEvent} UpgradeEvent + */ + UpgradeEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpgradeEvent) + return object; + var message = new $root.google.container.v1.UpgradeEvent(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.operation != null) + message.operation = String(object.operation); + if (object.operationStartTime != null) { + if (typeof object.operationStartTime !== "object") + throw TypeError(".google.container.v1.UpgradeEvent.operationStartTime: object expected"); + message.operationStartTime = $root.google.protobuf.Timestamp.fromObject(object.operationStartTime); + } + if (object.currentVersion != null) + message.currentVersion = String(object.currentVersion); + if (object.targetVersion != null) + message.targetVersion = String(object.targetVersion); + if (object.resource != null) + message.resource = String(object.resource); + return message; + }; + + /** + * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {google.container.v1.UpgradeEvent} message UpgradeEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.operation = ""; + object.operationStartTime = null; + object.currentVersion = ""; + object.targetVersion = ""; + object.resource = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) + object.operationStartTime = $root.google.protobuf.Timestamp.toObject(message.operationStartTime, options); + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = message.currentVersion; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + object.targetVersion = message.targetVersion; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + return object; + }; + + /** + * Converts this UpgradeEvent to JSON. + * @function toJSON + * @memberof google.container.v1.UpgradeEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeEvent + * @function getTypeUrl + * @memberof google.container.v1.UpgradeEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpgradeEvent"; + }; + + return UpgradeEvent; + })(); + + v1.UpgradeInfoEvent = (function() { + + /** + * Properties of an UpgradeInfoEvent. + * @memberof google.container.v1 + * @interface IUpgradeInfoEvent + * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeInfoEvent resourceType + * @property {string|null} [operation] UpgradeInfoEvent operation + * @property {google.protobuf.ITimestamp|null} [startTime] UpgradeInfoEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpgradeInfoEvent endTime + * @property {string|null} [currentVersion] UpgradeInfoEvent currentVersion + * @property {string|null} [targetVersion] UpgradeInfoEvent targetVersion + * @property {string|null} [resource] UpgradeInfoEvent resource + * @property {google.container.v1.UpgradeInfoEvent.State|null} [state] UpgradeInfoEvent state + * @property {string|null} [description] UpgradeInfoEvent description + */ + + /** + * Constructs a new UpgradeInfoEvent. + * @memberof google.container.v1 + * @classdesc Represents an UpgradeInfoEvent. + * @implements IUpgradeInfoEvent + * @constructor + * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set + */ + function UpgradeInfoEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeInfoEvent resourceType. + * @member {google.container.v1.UpgradeResourceType} resourceType + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.resourceType = 0; + + /** + * UpgradeInfoEvent operation. + * @member {string} operation + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.operation = ""; + + /** + * UpgradeInfoEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.startTime = null; + + /** + * UpgradeInfoEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.endTime = null; + + /** + * UpgradeInfoEvent currentVersion. + * @member {string} currentVersion + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.currentVersion = ""; + + /** + * UpgradeInfoEvent targetVersion. + * @member {string} targetVersion + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.targetVersion = ""; + + /** + * UpgradeInfoEvent resource. + * @member {string} resource + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.resource = ""; + + /** + * UpgradeInfoEvent state. + * @member {google.container.v1.UpgradeInfoEvent.State} state + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.state = 0; + + /** + * UpgradeInfoEvent description. + * @member {string} description + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.description = ""; + + /** + * Creates a new UpgradeInfoEvent instance using the specified properties. + * @function create + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent instance + */ + UpgradeInfoEvent.create = function create(properties) { + return new UpgradeInfoEvent(properties); + }; + + /** + * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeInfoEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currentVersion); + if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetVersion); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resource); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.description); + return writer; + }; + + /** + * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeInfoEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeInfoEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeInfoEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.int32(); + break; + } + case 2: { + message.operation = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currentVersion = reader.string(); + break; + } + case 6: { + message.targetVersion = reader.string(); + break; + } + case 7: { + message.resource = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 11: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeInfoEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeInfoEvent message. + * @function verify + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeInfoEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + if (!$util.isString(message.currentVersion)) + return "currentVersion: string expected"; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + if (!$util.isString(message.targetVersion)) + return "targetVersion: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + */ + UpgradeInfoEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpgradeInfoEvent) + return object; + var message = new $root.google.container.v1.UpgradeInfoEvent(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.operation != null) + message.operation = String(object.operation); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.container.v1.UpgradeInfoEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.container.v1.UpgradeInfoEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.currentVersion != null) + message.currentVersion = String(object.currentVersion); + if (object.targetVersion != null) + message.targetVersion = String(object.targetVersion); + if (object.resource != null) + message.resource = String(object.resource); + 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 "STARTED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "CANCELED": + case 6: + message.state = 6; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.UpgradeInfoEvent} message UpgradeInfoEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeInfoEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.operation = ""; + object.startTime = null; + object.endTime = null; + object.currentVersion = ""; + object.targetVersion = ""; + object.resource = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.description = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = message.currentVersion; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + object.targetVersion = message.targetVersion; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.container.v1.UpgradeInfoEvent.State[message.state] === undefined ? message.state : $root.google.container.v1.UpgradeInfoEvent.State[message.state] : message.state; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this UpgradeInfoEvent to JSON. + * @function toJSON + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeInfoEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeInfoEvent + * @function getTypeUrl + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeInfoEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpgradeInfoEvent"; + }; + + /** + * State enum. + * @name google.container.v1.UpgradeInfoEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=3 STARTED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} CANCELED=6 CANCELED value + */ + UpgradeInfoEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[3] = "STARTED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + return values; + })(); + + return UpgradeInfoEvent; + })(); + + v1.UpgradeAvailableEvent = (function() { + + /** + * Properties of an UpgradeAvailableEvent. + * @memberof google.container.v1 + * @interface IUpgradeAvailableEvent + * @property {string|null} [version] UpgradeAvailableEvent version + * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeAvailableEvent resourceType + * @property {google.container.v1.IReleaseChannel|null} [releaseChannel] UpgradeAvailableEvent releaseChannel + * @property {string|null} [resource] UpgradeAvailableEvent resource + */ + + /** + * Constructs a new UpgradeAvailableEvent. + * @memberof google.container.v1 + * @classdesc Represents an UpgradeAvailableEvent. + * @implements IUpgradeAvailableEvent + * @constructor + * @param {google.container.v1.IUpgradeAvailableEvent=} [properties] Properties to set + */ + function UpgradeAvailableEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeAvailableEvent version. + * @member {string} version + * @memberof google.container.v1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.version = ""; + + /** + * UpgradeAvailableEvent resourceType. + * @member {google.container.v1.UpgradeResourceType} resourceType + * @memberof google.container.v1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.resourceType = 0; + + /** + * UpgradeAvailableEvent releaseChannel. + * @member {google.container.v1.IReleaseChannel|null|undefined} releaseChannel + * @memberof google.container.v1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.releaseChannel = null; + + /** + * UpgradeAvailableEvent resource. + * @member {string} resource + * @memberof google.container.v1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.resource = ""; + + /** + * Creates a new UpgradeAvailableEvent instance using the specified properties. + * @function create + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {google.container.v1.IUpgradeAvailableEvent=} [properties] Properties to set + * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent instance + */ + UpgradeAvailableEvent.create = function create(properties) { + return new UpgradeAvailableEvent(properties); + }; + + /** + * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {google.container.v1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeAvailableEvent.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + $root.google.container.v1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); + return writer; + }; + + /** + * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {google.container.v1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeAvailableEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeAvailableEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeAvailableEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.resourceType = reader.int32(); + break; + } + case 3: { + message.releaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeAvailableEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeAvailableEvent message. + * @function verify + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeAvailableEvent.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.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + var error = $root.google.container.v1.ReleaseChannel.verify(message.releaseChannel); + if (error) + return "releaseChannel." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + return null; + }; + + /** + * Creates an UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent + */ + UpgradeAvailableEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpgradeAvailableEvent) + return object; + var message = new $root.google.container.v1.UpgradeAvailableEvent(); + if (object.version != null) + message.version = String(object.version); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.releaseChannel != null) { + if (typeof object.releaseChannel !== "object") + throw TypeError(".google.container.v1.UpgradeAvailableEvent.releaseChannel: object expected"); + message.releaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.releaseChannel); + } + if (object.resource != null) + message.resource = String(object.resource); + return message; + }; + + /** + * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {google.container.v1.UpgradeAvailableEvent} message UpgradeAvailableEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeAvailableEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.releaseChannel = null; + object.resource = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.releaseChannel, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + return object; + }; + + /** + * Converts this UpgradeAvailableEvent to JSON. + * @function toJSON + * @memberof google.container.v1.UpgradeAvailableEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeAvailableEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeAvailableEvent + * @function getTypeUrl + * @memberof google.container.v1.UpgradeAvailableEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeAvailableEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpgradeAvailableEvent"; + }; + + return UpgradeAvailableEvent; + })(); + + v1.SecurityBulletinEvent = (function() { + + /** + * Properties of a SecurityBulletinEvent. + * @memberof google.container.v1 + * @interface ISecurityBulletinEvent + * @property {string|null} [resourceTypeAffected] SecurityBulletinEvent resourceTypeAffected + * @property {string|null} [bulletinId] SecurityBulletinEvent bulletinId + * @property {Array.|null} [cveIds] SecurityBulletinEvent cveIds + * @property {string|null} [severity] SecurityBulletinEvent severity + * @property {string|null} [bulletinUri] SecurityBulletinEvent bulletinUri + * @property {string|null} [briefDescription] SecurityBulletinEvent briefDescription + * @property {Array.|null} [affectedSupportedMinors] SecurityBulletinEvent affectedSupportedMinors + * @property {Array.|null} [patchedVersions] SecurityBulletinEvent patchedVersions + * @property {string|null} [suggestedUpgradeTarget] SecurityBulletinEvent suggestedUpgradeTarget + * @property {boolean|null} [manualStepsRequired] SecurityBulletinEvent manualStepsRequired + */ + + /** + * Constructs a new SecurityBulletinEvent. + * @memberof google.container.v1 + * @classdesc Represents a SecurityBulletinEvent. + * @implements ISecurityBulletinEvent + * @constructor + * @param {google.container.v1.ISecurityBulletinEvent=} [properties] Properties to set + */ + function SecurityBulletinEvent(properties) { + this.cveIds = []; + this.affectedSupportedMinors = []; + this.patchedVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityBulletinEvent resourceTypeAffected. + * @member {string} resourceTypeAffected + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.resourceTypeAffected = ""; + + /** + * SecurityBulletinEvent bulletinId. + * @member {string} bulletinId + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.bulletinId = ""; + + /** + * SecurityBulletinEvent cveIds. + * @member {Array.} cveIds + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.cveIds = $util.emptyArray; + + /** + * SecurityBulletinEvent severity. + * @member {string} severity + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.severity = ""; + + /** + * SecurityBulletinEvent bulletinUri. + * @member {string} bulletinUri + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.bulletinUri = ""; + + /** + * SecurityBulletinEvent briefDescription. + * @member {string} briefDescription + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.briefDescription = ""; + + /** + * SecurityBulletinEvent affectedSupportedMinors. + * @member {Array.} affectedSupportedMinors + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.affectedSupportedMinors = $util.emptyArray; + + /** + * SecurityBulletinEvent patchedVersions. + * @member {Array.} patchedVersions + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.patchedVersions = $util.emptyArray; + + /** + * SecurityBulletinEvent suggestedUpgradeTarget. + * @member {string} suggestedUpgradeTarget + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.suggestedUpgradeTarget = ""; + + /** + * SecurityBulletinEvent manualStepsRequired. + * @member {boolean} manualStepsRequired + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.manualStepsRequired = false; + + /** + * Creates a new SecurityBulletinEvent instance using the specified properties. + * @function create + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {google.container.v1.ISecurityBulletinEvent=} [properties] Properties to set + * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent instance + */ + SecurityBulletinEvent.create = function create(properties) { + return new SecurityBulletinEvent(properties); + }; + + /** + * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {google.container.v1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletinEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceTypeAffected != null && Object.hasOwnProperty.call(message, "resourceTypeAffected")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypeAffected); + if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletinId); + if (message.cveIds != null && message.cveIds.length) + for (var i = 0; i < message.cveIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cveIds[i]); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); + if (message.bulletinUri != null && Object.hasOwnProperty.call(message, "bulletinUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bulletinUri); + if (message.briefDescription != null && Object.hasOwnProperty.call(message, "briefDescription")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.briefDescription); + if (message.affectedSupportedMinors != null && message.affectedSupportedMinors.length) + for (var i = 0; i < message.affectedSupportedMinors.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.affectedSupportedMinors[i]); + if (message.patchedVersions != null && message.patchedVersions.length) + for (var i = 0; i < message.patchedVersions.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.patchedVersions[i]); + if (message.suggestedUpgradeTarget != null && Object.hasOwnProperty.call(message, "suggestedUpgradeTarget")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.suggestedUpgradeTarget); + if (message.manualStepsRequired != null && Object.hasOwnProperty.call(message, "manualStepsRequired")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.manualStepsRequired); + return writer; + }; + + /** + * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {google.container.v1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletinEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletinEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityBulletinEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceTypeAffected = reader.string(); + break; + } + case 2: { + message.bulletinId = reader.string(); + break; + } + case 3: { + if (!(message.cveIds && message.cveIds.length)) + message.cveIds = []; + message.cveIds.push(reader.string()); + break; + } + case 4: { + message.severity = reader.string(); + break; + } + case 5: { + message.bulletinUri = reader.string(); + break; + } + case 6: { + message.briefDescription = reader.string(); + break; + } + case 7: { + if (!(message.affectedSupportedMinors && message.affectedSupportedMinors.length)) + message.affectedSupportedMinors = []; + message.affectedSupportedMinors.push(reader.string()); + break; + } + case 8: { + if (!(message.patchedVersions && message.patchedVersions.length)) + message.patchedVersions = []; + message.patchedVersions.push(reader.string()); + break; + } + case 9: { + message.suggestedUpgradeTarget = reader.string(); + break; + } + case 10: { + message.manualStepsRequired = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletinEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityBulletinEvent message. + * @function verify + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityBulletinEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) + if (!$util.isString(message.resourceTypeAffected)) + return "resourceTypeAffected: string expected"; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + if (!$util.isString(message.bulletinId)) + return "bulletinId: string expected"; + if (message.cveIds != null && message.hasOwnProperty("cveIds")) { + if (!Array.isArray(message.cveIds)) + return "cveIds: array expected"; + for (var i = 0; i < message.cveIds.length; ++i) + if (!$util.isString(message.cveIds[i])) + return "cveIds: string[] expected"; + } + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) + if (!$util.isString(message.bulletinUri)) + return "bulletinUri: string expected"; + if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) + if (!$util.isString(message.briefDescription)) + return "briefDescription: string expected"; + if (message.affectedSupportedMinors != null && message.hasOwnProperty("affectedSupportedMinors")) { + if (!Array.isArray(message.affectedSupportedMinors)) + return "affectedSupportedMinors: array expected"; + for (var i = 0; i < message.affectedSupportedMinors.length; ++i) + if (!$util.isString(message.affectedSupportedMinors[i])) + return "affectedSupportedMinors: string[] expected"; + } + if (message.patchedVersions != null && message.hasOwnProperty("patchedVersions")) { + if (!Array.isArray(message.patchedVersions)) + return "patchedVersions: array expected"; + for (var i = 0; i < message.patchedVersions.length; ++i) + if (!$util.isString(message.patchedVersions[i])) + return "patchedVersions: string[] expected"; + } + if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) + if (!$util.isString(message.suggestedUpgradeTarget)) + return "suggestedUpgradeTarget: string expected"; + if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) + if (typeof message.manualStepsRequired !== "boolean") + return "manualStepsRequired: boolean expected"; + return null; + }; + + /** + * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent + */ + SecurityBulletinEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecurityBulletinEvent) + return object; + var message = new $root.google.container.v1.SecurityBulletinEvent(); + if (object.resourceTypeAffected != null) + message.resourceTypeAffected = String(object.resourceTypeAffected); + if (object.bulletinId != null) + message.bulletinId = String(object.bulletinId); + if (object.cveIds) { + if (!Array.isArray(object.cveIds)) + throw TypeError(".google.container.v1.SecurityBulletinEvent.cveIds: array expected"); + message.cveIds = []; + for (var i = 0; i < object.cveIds.length; ++i) + message.cveIds[i] = String(object.cveIds[i]); + } + if (object.severity != null) + message.severity = String(object.severity); + if (object.bulletinUri != null) + message.bulletinUri = String(object.bulletinUri); + if (object.briefDescription != null) + message.briefDescription = String(object.briefDescription); + if (object.affectedSupportedMinors) { + if (!Array.isArray(object.affectedSupportedMinors)) + throw TypeError(".google.container.v1.SecurityBulletinEvent.affectedSupportedMinors: array expected"); + message.affectedSupportedMinors = []; + for (var i = 0; i < object.affectedSupportedMinors.length; ++i) + message.affectedSupportedMinors[i] = String(object.affectedSupportedMinors[i]); + } + if (object.patchedVersions) { + if (!Array.isArray(object.patchedVersions)) + throw TypeError(".google.container.v1.SecurityBulletinEvent.patchedVersions: array expected"); + message.patchedVersions = []; + for (var i = 0; i < object.patchedVersions.length; ++i) + message.patchedVersions[i] = String(object.patchedVersions[i]); + } + if (object.suggestedUpgradeTarget != null) + message.suggestedUpgradeTarget = String(object.suggestedUpgradeTarget); + if (object.manualStepsRequired != null) + message.manualStepsRequired = Boolean(object.manualStepsRequired); + return message; + }; + + /** + * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {google.container.v1.SecurityBulletinEvent} message SecurityBulletinEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityBulletinEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cveIds = []; + object.affectedSupportedMinors = []; + object.patchedVersions = []; + } + if (options.defaults) { + object.resourceTypeAffected = ""; + object.bulletinId = ""; + object.severity = ""; + object.bulletinUri = ""; + object.briefDescription = ""; + object.suggestedUpgradeTarget = ""; + object.manualStepsRequired = false; + } + if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) + object.resourceTypeAffected = message.resourceTypeAffected; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + object.bulletinId = message.bulletinId; + if (message.cveIds && message.cveIds.length) { + object.cveIds = []; + for (var j = 0; j < message.cveIds.length; ++j) + object.cveIds[j] = message.cveIds[j]; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) + object.bulletinUri = message.bulletinUri; + if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) + object.briefDescription = message.briefDescription; + if (message.affectedSupportedMinors && message.affectedSupportedMinors.length) { + object.affectedSupportedMinors = []; + for (var j = 0; j < message.affectedSupportedMinors.length; ++j) + object.affectedSupportedMinors[j] = message.affectedSupportedMinors[j]; + } + if (message.patchedVersions && message.patchedVersions.length) { + object.patchedVersions = []; + for (var j = 0; j < message.patchedVersions.length; ++j) + object.patchedVersions[j] = message.patchedVersions[j]; + } + if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) + object.suggestedUpgradeTarget = message.suggestedUpgradeTarget; + if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) + object.manualStepsRequired = message.manualStepsRequired; + return object; + }; + + /** + * Converts this SecurityBulletinEvent to JSON. + * @function toJSON + * @memberof google.container.v1.SecurityBulletinEvent + * @instance + * @returns {Object.} JSON object + */ + SecurityBulletinEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityBulletinEvent + * @function getTypeUrl + * @memberof google.container.v1.SecurityBulletinEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityBulletinEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecurityBulletinEvent"; + }; + + return SecurityBulletinEvent; + })(); + + v1.Autopilot = (function() { + + /** + * Properties of an Autopilot. + * @memberof google.container.v1 + * @interface IAutopilot + * @property {boolean|null} [enabled] Autopilot enabled + * @property {google.container.v1.IWorkloadPolicyConfig|null} [workloadPolicyConfig] Autopilot workloadPolicyConfig + */ + + /** + * Constructs a new Autopilot. + * @memberof google.container.v1 + * @classdesc Represents an Autopilot. + * @implements IAutopilot + * @constructor + * @param {google.container.v1.IAutopilot=} [properties] Properties to set + */ + function Autopilot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Autopilot enabled. + * @member {boolean} enabled + * @memberof google.container.v1.Autopilot + * @instance + */ + Autopilot.prototype.enabled = false; + + /** + * Autopilot workloadPolicyConfig. + * @member {google.container.v1.IWorkloadPolicyConfig|null|undefined} workloadPolicyConfig + * @memberof google.container.v1.Autopilot + * @instance + */ + Autopilot.prototype.workloadPolicyConfig = null; + + /** + * Creates a new Autopilot instance using the specified properties. + * @function create + * @memberof google.container.v1.Autopilot + * @static + * @param {google.container.v1.IAutopilot=} [properties] Properties to set + * @returns {google.container.v1.Autopilot} Autopilot instance + */ + Autopilot.create = function create(properties) { + return new Autopilot(properties); + }; + + /** + * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Autopilot + * @static + * @param {google.container.v1.IAutopilot} message Autopilot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Autopilot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.workloadPolicyConfig != null && Object.hasOwnProperty.call(message, "workloadPolicyConfig")) + $root.google.container.v1.WorkloadPolicyConfig.encode(message.workloadPolicyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Autopilot + * @static + * @param {google.container.v1.IAutopilot} message Autopilot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Autopilot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Autopilot message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Autopilot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Autopilot} Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Autopilot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Autopilot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Autopilot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Autopilot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Autopilot} Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Autopilot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Autopilot message. + * @function verify + * @memberof google.container.v1.Autopilot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Autopilot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) { + var error = $root.google.container.v1.WorkloadPolicyConfig.verify(message.workloadPolicyConfig); + if (error) + return "workloadPolicyConfig." + error; + } + return null; + }; + + /** + * Creates an Autopilot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Autopilot + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Autopilot} Autopilot + */ + Autopilot.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Autopilot) + return object; + var message = new $root.google.container.v1.Autopilot(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.workloadPolicyConfig != null) { + if (typeof object.workloadPolicyConfig !== "object") + throw TypeError(".google.container.v1.Autopilot.workloadPolicyConfig: object expected"); + message.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.fromObject(object.workloadPolicyConfig); + } + return message; + }; + + /** + * Creates a plain object from an Autopilot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.Autopilot + * @static + * @param {google.container.v1.Autopilot} message Autopilot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Autopilot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.workloadPolicyConfig = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) + object.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.toObject(message.workloadPolicyConfig, options); + return object; + }; + + /** + * Converts this Autopilot to JSON. + * @function toJSON + * @memberof google.container.v1.Autopilot + * @instance + * @returns {Object.} JSON object + */ + Autopilot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Autopilot + * @function getTypeUrl + * @memberof google.container.v1.Autopilot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Autopilot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.Autopilot"; + }; + + return Autopilot; + })(); + + v1.WorkloadPolicyConfig = (function() { + + /** + * Properties of a WorkloadPolicyConfig. + * @memberof google.container.v1 + * @interface IWorkloadPolicyConfig + * @property {boolean|null} [allowNetAdmin] WorkloadPolicyConfig allowNetAdmin + */ + + /** + * Constructs a new WorkloadPolicyConfig. + * @memberof google.container.v1 + * @classdesc Represents a WorkloadPolicyConfig. + * @implements IWorkloadPolicyConfig + * @constructor + * @param {google.container.v1.IWorkloadPolicyConfig=} [properties] Properties to set + */ + function WorkloadPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadPolicyConfig allowNetAdmin. + * @member {boolean|null|undefined} allowNetAdmin + * @memberof google.container.v1.WorkloadPolicyConfig + * @instance + */ + WorkloadPolicyConfig.prototype.allowNetAdmin = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WorkloadPolicyConfig _allowNetAdmin. + * @member {"allowNetAdmin"|undefined} _allowNetAdmin + * @memberof google.container.v1.WorkloadPolicyConfig + * @instance + */ + Object.defineProperty(WorkloadPolicyConfig.prototype, "_allowNetAdmin", { + get: $util.oneOfGetter($oneOfFields = ["allowNetAdmin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WorkloadPolicyConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {google.container.v1.IWorkloadPolicyConfig=} [properties] Properties to set + * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig instance + */ + WorkloadPolicyConfig.create = function create(properties) { + return new WorkloadPolicyConfig(properties); + }; + + /** + * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {google.container.v1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowNetAdmin != null && Object.hasOwnProperty.call(message, "allowNetAdmin")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowNetAdmin); + return writer; + }; + + /** + * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {google.container.v1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowNetAdmin = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadPolicyConfig message. + * @function verify + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { + properties._allowNetAdmin = 1; + if (typeof message.allowNetAdmin !== "boolean") + return "allowNetAdmin: boolean expected"; + } + return null; + }; + + /** + * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig + */ + WorkloadPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.WorkloadPolicyConfig) + return object; + var message = new $root.google.container.v1.WorkloadPolicyConfig(); + if (object.allowNetAdmin != null) + message.allowNetAdmin = Boolean(object.allowNetAdmin); + return message; + }; + + /** + * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {google.container.v1.WorkloadPolicyConfig} message WorkloadPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { + object.allowNetAdmin = message.allowNetAdmin; + if (options.oneofs) + object._allowNetAdmin = "allowNetAdmin"; + } + return object; + }; + + /** + * Converts this WorkloadPolicyConfig to JSON. + * @function toJSON + * @memberof google.container.v1.WorkloadPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadPolicyConfig + * @function getTypeUrl + * @memberof google.container.v1.WorkloadPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.WorkloadPolicyConfig"; + }; + + return WorkloadPolicyConfig; + })(); + + v1.LoggingConfig = (function() { + + /** + * Properties of a LoggingConfig. + * @memberof google.container.v1 + * @interface ILoggingConfig + * @property {google.container.v1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig + */ + + /** + * Constructs a new LoggingConfig. + * @memberof google.container.v1 + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig + * @constructor + * @param {google.container.v1.ILoggingConfig=} [properties] Properties to set + */ + function LoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingConfig componentConfig. + * @member {google.container.v1.ILoggingComponentConfig|null|undefined} componentConfig + * @memberof google.container.v1.LoggingConfig + * @instance + */ + LoggingConfig.prototype.componentConfig = null; + + /** + * Creates a new LoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LoggingConfig + * @static + * @param {google.container.v1.ILoggingConfig=} [properties] Properties to set + * @returns {google.container.v1.LoggingConfig} LoggingConfig instance + */ + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); + }; + + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1.LoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LoggingConfig + * @static + * @param {google.container.v1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) + $root.google.container.v1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LoggingConfig + * @static + * @param {google.container.v1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LoggingConfig} LoggingConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.componentConfig = $root.google.container.v1.LoggingComponentConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LoggingConfig} LoggingConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingConfig message. + * @function verify + * @memberof google.container.v1.LoggingConfig + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { + var error = $root.google.container.v1.LoggingComponentConfig.verify(message.componentConfig); + if (error) + return "componentConfig." + error; + } + return null; + }; + + /** + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LoggingConfig} LoggingConfig + */ + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LoggingConfig) + return object; + var message = new $root.google.container.v1.LoggingConfig(); + if (object.componentConfig != null) { + if (typeof object.componentConfig !== "object") + throw TypeError(".google.container.v1.LoggingConfig.componentConfig: object expected"); + message.componentConfig = $root.google.container.v1.LoggingComponentConfig.fromObject(object.componentConfig); + } + return message; + }; + + /** + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LoggingConfig + * @static + * @param {google.container.v1.LoggingConfig} message LoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingConfig.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.container.v1.LoggingComponentConfig.toObject(message.componentConfig, options); + return object; + }; + + /** + * Converts this LoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LoggingConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingConfig + * @function getTypeUrl + * @memberof google.container.v1.LoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LoggingConfig"; + }; + + return LoggingConfig; + })(); + + v1.LoggingComponentConfig = (function() { + + /** + * Properties of a LoggingComponentConfig. + * @memberof google.container.v1 + * @interface ILoggingComponentConfig + * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents + */ + + /** + * Constructs a new LoggingComponentConfig. + * @memberof google.container.v1 + * @classdesc Represents a LoggingComponentConfig. + * @implements ILoggingComponentConfig + * @constructor + * @param {google.container.v1.ILoggingComponentConfig=} [properties] Properties to set + */ + function LoggingComponentConfig(properties) { + this.enableComponents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingComponentConfig enableComponents. + * @member {Array.} enableComponents + * @memberof google.container.v1.LoggingComponentConfig + * @instance + */ + LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; + + /** + * Creates a new LoggingComponentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {google.container.v1.ILoggingComponentConfig=} [properties] Properties to set + * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig instance + */ + LoggingComponentConfig.create = function create(properties) { + return new LoggingComponentConfig(properties); + }; + + /** + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1.LoggingComponentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {google.container.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingComponentConfig.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(); + } + return writer; + }; + + /** + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingComponentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {google.container.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingComponentConfig(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingComponentConfig message. + * @function verify + * @memberof google.container.v1.LoggingComponentConfig + * @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) { + 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: + case 3: + case 4: + case 5: + case 7: + case 8: + break; + } + } + return null; + }; + + /** + * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig + */ + LoggingComponentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LoggingComponentConfig) + return object; + var message = new $root.google.container.v1.LoggingComponentConfig(); + if (object.enableComponents) { + if (!Array.isArray(object.enableComponents)) + throw TypeError(".google.container.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; + case "APISERVER": + case 3: + message.enableComponents[i] = 3; + break; + case "SCHEDULER": + case 4: + message.enableComponents[i] = 4; + break; + case "CONTROLLER_MANAGER": + case 5: + message.enableComponents[i] = 5; + break; + case "KCP_SSHD": + case 7: + message.enableComponents[i] = 7; + break; + case "KCP_CONNECTION": + case 8: + message.enableComponents[i] = 8; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {google.container.v1.LoggingComponentConfig} message LoggingComponentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingComponentConfig.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.container.v1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } + return object; + }; + + /** + * Converts this LoggingComponentConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LoggingComponentConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingComponentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingComponentConfig + * @function getTypeUrl + * @memberof google.container.v1.LoggingComponentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LoggingComponentConfig"; + }; + + /** + * Component enum. + * @name google.container.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 + * @property {number} APISERVER=3 APISERVER value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value + * @property {number} KCP_SSHD=7 KCP_SSHD value + * @property {number} KCP_CONNECTION=8 KCP_CONNECTION 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; + values[valuesById[3] = "APISERVER"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + values[valuesById[7] = "KCP_SSHD"] = 7; + values[valuesById[8] = "KCP_CONNECTION"] = 8; + return values; + })(); + + return LoggingComponentConfig; + })(); + + v1.RayClusterLoggingConfig = (function() { + + /** + * Properties of a RayClusterLoggingConfig. + * @memberof google.container.v1 + * @interface IRayClusterLoggingConfig + * @property {boolean|null} [enabled] RayClusterLoggingConfig enabled + */ + + /** + * Constructs a new RayClusterLoggingConfig. + * @memberof google.container.v1 + * @classdesc Represents a RayClusterLoggingConfig. + * @implements IRayClusterLoggingConfig + * @constructor + * @param {google.container.v1.IRayClusterLoggingConfig=} [properties] Properties to set + */ + function RayClusterLoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayClusterLoggingConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.RayClusterLoggingConfig + * @instance + */ + RayClusterLoggingConfig.prototype.enabled = false; + + /** + * Creates a new RayClusterLoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {google.container.v1.IRayClusterLoggingConfig=} [properties] Properties to set + * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig instance + */ + RayClusterLoggingConfig.create = function create(properties) { + return new RayClusterLoggingConfig(properties); + }; + + /** + * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {google.container.v1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterLoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {google.container.v1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterLoggingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayClusterLoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterLoggingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayClusterLoggingConfig message. + * @function verify + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayClusterLoggingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig + */ + RayClusterLoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RayClusterLoggingConfig) + return object; + var message = new $root.google.container.v1.RayClusterLoggingConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {google.container.v1.RayClusterLoggingConfig} message RayClusterLoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayClusterLoggingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this RayClusterLoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.RayClusterLoggingConfig + * @instance + * @returns {Object.} JSON object + */ + RayClusterLoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayClusterLoggingConfig + * @function getTypeUrl + * @memberof google.container.v1.RayClusterLoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayClusterLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RayClusterLoggingConfig"; + }; + + return RayClusterLoggingConfig; + })(); + + v1.MonitoringConfig = (function() { + + /** + * Properties of a MonitoringConfig. + * @memberof google.container.v1 + * @interface IMonitoringConfig + * @property {google.container.v1.IMonitoringComponentConfig|null} [componentConfig] MonitoringConfig componentConfig + * @property {google.container.v1.IManagedPrometheusConfig|null} [managedPrometheusConfig] MonitoringConfig managedPrometheusConfig + * @property {google.container.v1.IAdvancedDatapathObservabilityConfig|null} [advancedDatapathObservabilityConfig] MonitoringConfig advancedDatapathObservabilityConfig + */ + + /** + * Constructs a new MonitoringConfig. + * @memberof google.container.v1 + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig + * @constructor + * @param {google.container.v1.IMonitoringConfig=} [properties] Properties to set + */ + function MonitoringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringConfig componentConfig. + * @member {google.container.v1.IMonitoringComponentConfig|null|undefined} componentConfig + * @memberof google.container.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.componentConfig = null; + + /** + * MonitoringConfig managedPrometheusConfig. + * @member {google.container.v1.IManagedPrometheusConfig|null|undefined} managedPrometheusConfig + * @memberof google.container.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.managedPrometheusConfig = null; + + /** + * MonitoringConfig advancedDatapathObservabilityConfig. + * @member {google.container.v1.IAdvancedDatapathObservabilityConfig|null|undefined} advancedDatapathObservabilityConfig + * @memberof google.container.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.advancedDatapathObservabilityConfig = null; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {google.container.v1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.container.v1.MonitoringConfig} MonitoringConfig instance + */ + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); + }; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1.MonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {google.container.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) + $root.google.container.v1.MonitoringComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.managedPrometheusConfig != null && Object.hasOwnProperty.call(message, "managedPrometheusConfig")) + $root.google.container.v1.ManagedPrometheusConfig.encode(message.managedPrometheusConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.advancedDatapathObservabilityConfig != null && Object.hasOwnProperty.call(message, "advancedDatapathObservabilityConfig")) + $root.google.container.v1.AdvancedDatapathObservabilityConfig.encode(message.advancedDatapathObservabilityConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {google.container.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.container.v1.MonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.componentConfig = $root.google.container.v1.MonitoringComponentConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringConfig message. + * @function verify + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { + var error = $root.google.container.v1.MonitoringComponentConfig.verify(message.componentConfig); + if (error) + return "componentConfig." + error; + } + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) { + var error = $root.google.container.v1.ManagedPrometheusConfig.verify(message.managedPrometheusConfig); + if (error) + return "managedPrometheusConfig." + error; + } + if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) { + var error = $root.google.container.v1.AdvancedDatapathObservabilityConfig.verify(message.advancedDatapathObservabilityConfig); + if (error) + return "advancedDatapathObservabilityConfig." + error; + } + return null; + }; + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MonitoringConfig} MonitoringConfig + */ + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MonitoringConfig) + return object; + var message = new $root.google.container.v1.MonitoringConfig(); + if (object.componentConfig != null) { + if (typeof object.componentConfig !== "object") + throw TypeError(".google.container.v1.MonitoringConfig.componentConfig: object expected"); + message.componentConfig = $root.google.container.v1.MonitoringComponentConfig.fromObject(object.componentConfig); + } + if (object.managedPrometheusConfig != null) { + if (typeof object.managedPrometheusConfig !== "object") + throw TypeError(".google.container.v1.MonitoringConfig.managedPrometheusConfig: object expected"); + message.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.fromObject(object.managedPrometheusConfig); + } + if (object.advancedDatapathObservabilityConfig != null) { + if (typeof object.advancedDatapathObservabilityConfig !== "object") + throw TypeError(".google.container.v1.MonitoringConfig.advancedDatapathObservabilityConfig: object expected"); + message.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.fromObject(object.advancedDatapathObservabilityConfig); + } + return message; + }; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {google.container.v1.MonitoringConfig} message MonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.componentConfig = null; + object.managedPrometheusConfig = null; + object.advancedDatapathObservabilityConfig = null; + } + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) + object.componentConfig = $root.google.container.v1.MonitoringComponentConfig.toObject(message.componentConfig, options); + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) + object.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.toObject(message.managedPrometheusConfig, options); + if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) + object.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.toObject(message.advancedDatapathObservabilityConfig, options); + return object; + }; + + /** + * Converts this MonitoringConfig to JSON. + * @function toJSON + * @memberof google.container.v1.MonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringConfig + * @function getTypeUrl + * @memberof google.container.v1.MonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MonitoringConfig"; + }; + + return MonitoringConfig; + })(); + + v1.AdvancedDatapathObservabilityConfig = (function() { + + /** + * Properties of an AdvancedDatapathObservabilityConfig. + * @memberof google.container.v1 + * @interface IAdvancedDatapathObservabilityConfig + * @property {boolean|null} [enableMetrics] AdvancedDatapathObservabilityConfig enableMetrics + * @property {google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|null} [relayMode] AdvancedDatapathObservabilityConfig relayMode + * @property {boolean|null} [enableRelay] AdvancedDatapathObservabilityConfig enableRelay + */ + + /** + * Constructs a new AdvancedDatapathObservabilityConfig. + * @memberof google.container.v1 + * @classdesc Represents an AdvancedDatapathObservabilityConfig. + * @implements IAdvancedDatapathObservabilityConfig + * @constructor + * @param {google.container.v1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set + */ + function AdvancedDatapathObservabilityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedDatapathObservabilityConfig enableMetrics. + * @member {boolean} enableMetrics + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.enableMetrics = false; + + /** + * AdvancedDatapathObservabilityConfig relayMode. + * @member {google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode} relayMode + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.relayMode = 0; + + /** + * AdvancedDatapathObservabilityConfig enableRelay. + * @member {boolean|null|undefined} enableRelay + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.enableRelay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedDatapathObservabilityConfig _enableRelay. + * @member {"enableRelay"|undefined} _enableRelay + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @instance + */ + Object.defineProperty(AdvancedDatapathObservabilityConfig.prototype, "_enableRelay", { + get: $util.oneOfGetter($oneOfFields = ["enableRelay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set + * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig instance + */ + AdvancedDatapathObservabilityConfig.create = function create(properties) { + return new AdvancedDatapathObservabilityConfig(properties); + }; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedDatapathObservabilityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableMetrics != null && Object.hasOwnProperty.call(message, "enableMetrics")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableMetrics); + if (message.relayMode != null && Object.hasOwnProperty.call(message, "relayMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relayMode); + if (message.enableRelay != null && Object.hasOwnProperty.call(message, "enableRelay")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableRelay); + return writer; + }; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedDatapathObservabilityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedDatapathObservabilityConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdvancedDatapathObservabilityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableMetrics = reader.bool(); + break; + } + case 2: { + message.relayMode = reader.int32(); + break; + } + case 3: { + message.enableRelay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedDatapathObservabilityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedDatapathObservabilityConfig message. + * @function verify + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedDatapathObservabilityConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) + if (typeof message.enableMetrics !== "boolean") + return "enableMetrics: boolean expected"; + if (message.relayMode != null && message.hasOwnProperty("relayMode")) + switch (message.relayMode) { + default: + return "relayMode: enum value expected"; + case 0: + case 1: + case 3: + case 4: + break; + } + if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { + properties._enableRelay = 1; + if (typeof message.enableRelay !== "boolean") + return "enableRelay: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + */ + AdvancedDatapathObservabilityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdvancedDatapathObservabilityConfig) + return object; + var message = new $root.google.container.v1.AdvancedDatapathObservabilityConfig(); + if (object.enableMetrics != null) + message.enableMetrics = Boolean(object.enableMetrics); + switch (object.relayMode) { + default: + if (typeof object.relayMode === "number") { + message.relayMode = object.relayMode; + break; + } + break; + case "RELAY_MODE_UNSPECIFIED": + case 0: + message.relayMode = 0; + break; + case "DISABLED": + case 1: + message.relayMode = 1; + break; + case "INTERNAL_VPC_LB": + case 3: + message.relayMode = 3; + break; + case "EXTERNAL_LB": + case 4: + message.relayMode = 4; + break; + } + if (object.enableRelay != null) + message.enableRelay = Boolean(object.enableRelay); + return message; + }; + + /** + * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1.AdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedDatapathObservabilityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableMetrics = false; + object.relayMode = options.enums === String ? "RELAY_MODE_UNSPECIFIED" : 0; + } + if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) + object.enableMetrics = message.enableMetrics; + if (message.relayMode != null && message.hasOwnProperty("relayMode")) + object.relayMode = options.enums === String ? $root.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] === undefined ? message.relayMode : $root.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] : message.relayMode; + if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { + object.enableRelay = message.enableRelay; + if (options.oneofs) + object._enableRelay = "enableRelay"; + } + return object; + }; + + /** + * Converts this AdvancedDatapathObservabilityConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @instance + * @returns {Object.} JSON object + */ + AdvancedDatapathObservabilityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedDatapathObservabilityConfig + * @function getTypeUrl + * @memberof google.container.v1.AdvancedDatapathObservabilityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedDatapathObservabilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdvancedDatapathObservabilityConfig"; + }; + + /** + * RelayMode enum. + * @name google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode + * @enum {number} + * @property {number} RELAY_MODE_UNSPECIFIED=0 RELAY_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} INTERNAL_VPC_LB=3 INTERNAL_VPC_LB value + * @property {number} EXTERNAL_LB=4 EXTERNAL_LB value + */ + AdvancedDatapathObservabilityConfig.RelayMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELAY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[3] = "INTERNAL_VPC_LB"] = 3; + values[valuesById[4] = "EXTERNAL_LB"] = 4; + return values; + })(); + + return AdvancedDatapathObservabilityConfig; + })(); + + v1.RayClusterMonitoringConfig = (function() { + + /** + * Properties of a RayClusterMonitoringConfig. + * @memberof google.container.v1 + * @interface IRayClusterMonitoringConfig + * @property {boolean|null} [enabled] RayClusterMonitoringConfig enabled + */ + + /** + * Constructs a new RayClusterMonitoringConfig. + * @memberof google.container.v1 + * @classdesc Represents a RayClusterMonitoringConfig. + * @implements IRayClusterMonitoringConfig + * @constructor + * @param {google.container.v1.IRayClusterMonitoringConfig=} [properties] Properties to set + */ + function RayClusterMonitoringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayClusterMonitoringConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.RayClusterMonitoringConfig + * @instance + */ + RayClusterMonitoringConfig.prototype.enabled = false; + + /** + * Creates a new RayClusterMonitoringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1.IRayClusterMonitoringConfig=} [properties] Properties to set + * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig instance + */ + RayClusterMonitoringConfig.create = function create(properties) { + return new RayClusterMonitoringConfig(properties); + }; + + /** + * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterMonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterMonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterMonitoringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayClusterMonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterMonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayClusterMonitoringConfig message. + * @function verify + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayClusterMonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + */ + RayClusterMonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RayClusterMonitoringConfig) + return object; + var message = new $root.google.container.v1.RayClusterMonitoringConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1.RayClusterMonitoringConfig} message RayClusterMonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayClusterMonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this RayClusterMonitoringConfig to JSON. + * @function toJSON + * @memberof google.container.v1.RayClusterMonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + RayClusterMonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayClusterMonitoringConfig + * @function getTypeUrl + * @memberof google.container.v1.RayClusterMonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayClusterMonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.RayClusterMonitoringConfig"; + }; + + return RayClusterMonitoringConfig; + })(); + + v1.NodePoolLoggingConfig = (function() { + + /** + * Properties of a NodePoolLoggingConfig. + * @memberof google.container.v1 + * @interface INodePoolLoggingConfig + * @property {google.container.v1.ILoggingVariantConfig|null} [variantConfig] NodePoolLoggingConfig variantConfig + */ + + /** + * Constructs a new NodePoolLoggingConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolLoggingConfig. + * @implements INodePoolLoggingConfig + * @constructor + * @param {google.container.v1.INodePoolLoggingConfig=} [properties] Properties to set + */ + function NodePoolLoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolLoggingConfig variantConfig. + * @member {google.container.v1.ILoggingVariantConfig|null|undefined} variantConfig + * @memberof google.container.v1.NodePoolLoggingConfig + * @instance + */ + NodePoolLoggingConfig.prototype.variantConfig = null; + + /** + * Creates a new NodePoolLoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {google.container.v1.INodePoolLoggingConfig=} [properties] Properties to set + * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig instance + */ + NodePoolLoggingConfig.create = function create(properties) { + return new NodePoolLoggingConfig(properties); + }; + + /** + * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {google.container.v1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolLoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variantConfig != null && Object.hasOwnProperty.call(message, "variantConfig")) + $root.google.container.v1.LoggingVariantConfig.encode(message.variantConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {google.container.v1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolLoggingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolLoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.variantConfig = $root.google.container.v1.LoggingVariantConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolLoggingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolLoggingConfig message. + * @function verify + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolLoggingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) { + var error = $root.google.container.v1.LoggingVariantConfig.verify(message.variantConfig); + if (error) + return "variantConfig." + error; + } + return null; + }; + + /** + * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig + */ + NodePoolLoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolLoggingConfig) + return object; + var message = new $root.google.container.v1.NodePoolLoggingConfig(); + if (object.variantConfig != null) { + if (typeof object.variantConfig !== "object") + throw TypeError(".google.container.v1.NodePoolLoggingConfig.variantConfig: object expected"); + message.variantConfig = $root.google.container.v1.LoggingVariantConfig.fromObject(object.variantConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {google.container.v1.NodePoolLoggingConfig} message NodePoolLoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolLoggingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.variantConfig = null; + if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) + object.variantConfig = $root.google.container.v1.LoggingVariantConfig.toObject(message.variantConfig, options); + return object; + }; + + /** + * Converts this NodePoolLoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolLoggingConfig + * @instance + * @returns {Object.} JSON object + */ + NodePoolLoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolLoggingConfig + * @function getTypeUrl + * @memberof google.container.v1.NodePoolLoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolLoggingConfig"; + }; + + return NodePoolLoggingConfig; + })(); + + v1.LoggingVariantConfig = (function() { + + /** + * Properties of a LoggingVariantConfig. + * @memberof google.container.v1 + * @interface ILoggingVariantConfig + * @property {google.container.v1.LoggingVariantConfig.Variant|null} [variant] LoggingVariantConfig variant + */ + + /** + * Constructs a new LoggingVariantConfig. + * @memberof google.container.v1 + * @classdesc Represents a LoggingVariantConfig. + * @implements ILoggingVariantConfig + * @constructor + * @param {google.container.v1.ILoggingVariantConfig=} [properties] Properties to set + */ + function LoggingVariantConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingVariantConfig variant. + * @member {google.container.v1.LoggingVariantConfig.Variant} variant + * @memberof google.container.v1.LoggingVariantConfig + * @instance + */ + LoggingVariantConfig.prototype.variant = 0; + + /** + * Creates a new LoggingVariantConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {google.container.v1.ILoggingVariantConfig=} [properties] Properties to set + * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig instance + */ + LoggingVariantConfig.create = function create(properties) { + return new LoggingVariantConfig(properties); + }; + + /** + * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {google.container.v1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingVariantConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.variant); + return writer; + }; + + /** + * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {google.container.v1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingVariantConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingVariantConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingVariantConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.variant = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingVariantConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingVariantConfig message. + * @function verify + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingVariantConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variant != null && message.hasOwnProperty("variant")) + switch (message.variant) { + default: + return "variant: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig + */ + LoggingVariantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LoggingVariantConfig) + return object; + var message = new $root.google.container.v1.LoggingVariantConfig(); + switch (object.variant) { + default: + if (typeof object.variant === "number") { + message.variant = object.variant; + break; + } + break; + case "VARIANT_UNSPECIFIED": + case 0: + message.variant = 0; + break; + case "DEFAULT": + case 1: + message.variant = 1; + break; + case "MAX_THROUGHPUT": + case 2: + message.variant = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {google.container.v1.LoggingVariantConfig} message LoggingVariantConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingVariantConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.variant = options.enums === String ? "VARIANT_UNSPECIFIED" : 0; + if (message.variant != null && message.hasOwnProperty("variant")) + object.variant = options.enums === String ? $root.google.container.v1.LoggingVariantConfig.Variant[message.variant] === undefined ? message.variant : $root.google.container.v1.LoggingVariantConfig.Variant[message.variant] : message.variant; + return object; + }; + + /** + * Converts this LoggingVariantConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LoggingVariantConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingVariantConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingVariantConfig + * @function getTypeUrl + * @memberof google.container.v1.LoggingVariantConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingVariantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LoggingVariantConfig"; + }; + + /** + * Variant enum. + * @name google.container.v1.LoggingVariantConfig.Variant + * @enum {number} + * @property {number} VARIANT_UNSPECIFIED=0 VARIANT_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} MAX_THROUGHPUT=2 MAX_THROUGHPUT value + */ + LoggingVariantConfig.Variant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "MAX_THROUGHPUT"] = 2; + return values; + })(); + + return LoggingVariantConfig; + })(); + + v1.MonitoringComponentConfig = (function() { + + /** + * Properties of a MonitoringComponentConfig. + * @memberof google.container.v1 + * @interface IMonitoringComponentConfig + * @property {Array.|null} [enableComponents] MonitoringComponentConfig enableComponents + */ + + /** + * Constructs a new MonitoringComponentConfig. + * @memberof google.container.v1 + * @classdesc Represents a MonitoringComponentConfig. + * @implements IMonitoringComponentConfig + * @constructor + * @param {google.container.v1.IMonitoringComponentConfig=} [properties] Properties to set + */ + function MonitoringComponentConfig(properties) { + this.enableComponents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringComponentConfig enableComponents. + * @member {Array.} enableComponents + * @memberof google.container.v1.MonitoringComponentConfig + * @instance + */ + MonitoringComponentConfig.prototype.enableComponents = $util.emptyArray; + + /** + * Creates a new MonitoringComponentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {google.container.v1.IMonitoringComponentConfig=} [properties] Properties to set + * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig instance + */ + MonitoringComponentConfig.create = function create(properties) { + return new MonitoringComponentConfig(properties); + }; + + /** + * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {google.container.v1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringComponentConfig.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(); + } + return writer; + }; + + /** + * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {google.container.v1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringComponentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MonitoringComponentConfig(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringComponentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringComponentConfig message. + * @function verify + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringComponentConfig.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 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + } + return null; + }; + + /** + * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig + */ + MonitoringComponentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.MonitoringComponentConfig) + return object; + var message = new $root.google.container.v1.MonitoringComponentConfig(); + if (object.enableComponents) { + if (!Array.isArray(object.enableComponents)) + throw TypeError(".google.container.v1.MonitoringComponentConfig.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 "APISERVER": + case 3: + message.enableComponents[i] = 3; + break; + case "SCHEDULER": + case 4: + message.enableComponents[i] = 4; + break; + case "CONTROLLER_MANAGER": + case 5: + message.enableComponents[i] = 5; + break; + case "STORAGE": + case 7: + message.enableComponents[i] = 7; + break; + case "HPA": + case 8: + message.enableComponents[i] = 8; + break; + case "POD": + case 9: + message.enableComponents[i] = 9; + break; + case "DAEMONSET": + case 10: + message.enableComponents[i] = 10; + break; + case "DEPLOYMENT": + case 11: + message.enableComponents[i] = 11; + break; + case "STATEFULSET": + case 12: + message.enableComponents[i] = 12; + break; + case "CADVISOR": + case 13: + message.enableComponents[i] = 13; + break; + case "KUBELET": + case 14: + message.enableComponents[i] = 14; + break; + case "DCGM": + case 15: + message.enableComponents[i] = 15; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {google.container.v1.MonitoringComponentConfig} message MonitoringComponentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringComponentConfig.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.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } + return object; + }; + + /** + * Converts this MonitoringComponentConfig to JSON. + * @function toJSON + * @memberof google.container.v1.MonitoringComponentConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringComponentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringComponentConfig + * @function getTypeUrl + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MonitoringComponentConfig"; + }; + + /** + * Component enum. + * @name google.container.v1.MonitoringComponentConfig.Component + * @enum {number} + * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value + * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value + * @property {number} APISERVER=3 APISERVER value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value + * @property {number} STORAGE=7 STORAGE value + * @property {number} HPA=8 HPA value + * @property {number} POD=9 POD value + * @property {number} DAEMONSET=10 DAEMONSET value + * @property {number} DEPLOYMENT=11 DEPLOYMENT value + * @property {number} STATEFULSET=12 STATEFULSET value + * @property {number} CADVISOR=13 CADVISOR value + * @property {number} KUBELET=14 KUBELET value + * @property {number} DCGM=15 DCGM value + */ + MonitoringComponentConfig.Component = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; + values[valuesById[3] = "APISERVER"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + values[valuesById[7] = "STORAGE"] = 7; + values[valuesById[8] = "HPA"] = 8; + values[valuesById[9] = "POD"] = 9; + values[valuesById[10] = "DAEMONSET"] = 10; + values[valuesById[11] = "DEPLOYMENT"] = 11; + values[valuesById[12] = "STATEFULSET"] = 12; + values[valuesById[13] = "CADVISOR"] = 13; + values[valuesById[14] = "KUBELET"] = 14; + values[valuesById[15] = "DCGM"] = 15; + return values; + })(); + + return MonitoringComponentConfig; + })(); + + /** + * DatapathProvider enum. + * @name google.container.v1.DatapathProvider + * @enum {number} + * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value + * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value + * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value + */ + v1.DatapathProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY_DATAPATH"] = 1; + values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; + return values; + })(); + + /** + * NodePoolUpdateStrategy enum. + * @name google.container.v1.NodePoolUpdateStrategy + * @enum {number} + * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value + * @property {number} BLUE_GREEN=2 BLUE_GREEN value + * @property {number} SURGE=3 SURGE value + */ + v1.NodePoolUpdateStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[2] = "BLUE_GREEN"] = 2; + values[valuesById[3] = "SURGE"] = 3; + return values; + })(); + + v1.ManagedPrometheusConfig = (function() { + + /** + * Properties of a ManagedPrometheusConfig. + * @memberof google.container.v1 + * @interface IManagedPrometheusConfig + * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled + */ + + /** + * Constructs a new ManagedPrometheusConfig. + * @memberof google.container.v1 + * @classdesc Represents a ManagedPrometheusConfig. + * @implements IManagedPrometheusConfig + * @constructor + * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set + */ + function ManagedPrometheusConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagedPrometheusConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ManagedPrometheusConfig + * @instance + */ + ManagedPrometheusConfig.prototype.enabled = false; + + /** + * Creates a new ManagedPrometheusConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig instance + */ + ManagedPrometheusConfig.create = function create(properties) { + return new ManagedPrometheusConfig(properties); + }; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.container.v1.ManagedPrometheusConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagedPrometheusConfig message. + * @function verify + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagedPrometheusConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + */ + ManagedPrometheusConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ManagedPrometheusConfig) + return object; + var message = new $root.google.container.v1.ManagedPrometheusConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.ManagedPrometheusConfig} message ManagedPrometheusConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagedPrometheusConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ManagedPrometheusConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ManagedPrometheusConfig + * @instance + * @returns {Object.} JSON object + */ + ManagedPrometheusConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagedPrometheusConfig + * @function getTypeUrl + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ManagedPrometheusConfig"; + }; + + return ManagedPrometheusConfig; + })(); + + v1.Fleet = (function() { + + /** + * Properties of a Fleet. + * @memberof google.container.v1 + * @interface IFleet + * @property {string|null} [project] Fleet project + * @property {string|null} [membership] Fleet membership + * @property {boolean|null} [preRegistered] Fleet preRegistered + */ + + /** + * Constructs a new Fleet. + * @memberof google.container.v1 + * @classdesc Represents a Fleet. + * @implements IFleet + * @constructor + * @param {google.container.v1.IFleet=} [properties] Properties to set + */ + function Fleet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fleet project. + * @member {string} project + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.project = ""; + + /** + * Fleet membership. + * @member {string} membership + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.membership = ""; + + /** + * Fleet preRegistered. + * @member {boolean} preRegistered + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.preRegistered = false; + + /** + * Creates a new Fleet instance using the specified properties. + * @function create + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet=} [properties] Properties to set + * @returns {google.container.v1.Fleet} Fleet instance + */ + Fleet.create = function create(properties) { + return new Fleet(properties); + }; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.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.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); + return writer; + }; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fleet message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Fleet} Fleet + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Fleet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.membership = reader.string(); + break; + } + case 3: { + message.preRegistered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fleet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Fleet} Fleet + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fleet message. + * @function verify + * @memberof google.container.v1.Fleet + * @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) { + 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.preRegistered != null && message.hasOwnProperty("preRegistered")) + if (typeof message.preRegistered !== "boolean") + return "preRegistered: boolean expected"; + return null; + }; + + /** + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Fleet + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Fleet} Fleet + */ + Fleet.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Fleet) + return object; + var message = new $root.google.container.v1.Fleet(); + if (object.project != null) + message.project = String(object.project); + if (object.membership != null) + message.membership = String(object.membership); + if (object.preRegistered != null) + message.preRegistered = Boolean(object.preRegistered); + return message; + }; + + /** + * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.Fleet} message Fleet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fleet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.membership = ""; + object.preRegistered = false; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; + if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) + object.preRegistered = message.preRegistered; + return object; + }; + + /** + * Converts this Fleet to JSON. + * @function toJSON + * @memberof google.container.v1.Fleet + * @instance + * @returns {Object.} JSON object + */ + Fleet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Fleet + * @function getTypeUrl + * @memberof google.container.v1.Fleet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.Fleet"; + }; + + return Fleet; + })(); + + /** + * StackType enum. + * @name google.container.v1.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4=1 IPV4 value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + v1.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + v1.ControlPlaneEndpointsConfig = (function() { + + /** + * Properties of a ControlPlaneEndpointsConfig. + * @memberof google.container.v1 + * @interface IControlPlaneEndpointsConfig + * @property {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null} [dnsEndpointConfig] ControlPlaneEndpointsConfig dnsEndpointConfig + * @property {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null} [ipEndpointsConfig] ControlPlaneEndpointsConfig ipEndpointsConfig + */ + + /** + * Constructs a new ControlPlaneEndpointsConfig. + * @memberof google.container.v1 + * @classdesc Represents a ControlPlaneEndpointsConfig. + * @implements IControlPlaneEndpointsConfig + * @constructor + * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set + */ + function ControlPlaneEndpointsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ControlPlaneEndpointsConfig dnsEndpointConfig. + * @member {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null|undefined} dnsEndpointConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @instance + */ + ControlPlaneEndpointsConfig.prototype.dnsEndpointConfig = null; + + /** + * ControlPlaneEndpointsConfig ipEndpointsConfig. + * @member {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null|undefined} ipEndpointsConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @instance + */ + ControlPlaneEndpointsConfig.prototype.ipEndpointsConfig = null; + + /** + * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig instance + */ + ControlPlaneEndpointsConfig.create = function create(properties) { + return new ControlPlaneEndpointsConfig(properties); + }; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlPlaneEndpointsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsEndpointConfig != null && Object.hasOwnProperty.call(message, "dnsEndpointConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.encode(message.dnsEndpointConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ipEndpointsConfig != null && Object.hasOwnProperty.call(message, "ipEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.encode(message.ipEndpointsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlPlaneEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlPlaneEndpointsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlPlaneEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ControlPlaneEndpointsConfig message. + * @function verify + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ControlPlaneEndpointsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify(message.dnsEndpointConfig); + if (error) + return "dnsEndpointConfig." + error; + } + if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify(message.ipEndpointsConfig); + if (error) + return "ipEndpointsConfig." + error; + } + return null; + }; + + /** + * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig + */ + ControlPlaneEndpointsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig) + return object; + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); + if (object.dnsEndpointConfig != null) { + if (typeof object.dnsEndpointConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.dnsEndpointConfig: object expected"); + message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.fromObject(object.dnsEndpointConfig); + } + if (object.ipEndpointsConfig != null) { + if (typeof object.ipEndpointsConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.ipEndpointsConfig: object expected"); + message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.fromObject(object.ipEndpointsConfig); + } + return message; + }; + + /** + * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ControlPlaneEndpointsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dnsEndpointConfig = null; + object.ipEndpointsConfig = null; + } + if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) + object.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.toObject(message.dnsEndpointConfig, options); + if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) + object.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.toObject(message.ipEndpointsConfig, options); + return object; + }; + + /** + * Converts this ControlPlaneEndpointsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @instance + * @returns {Object.} JSON object + */ + ControlPlaneEndpointsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ControlPlaneEndpointsConfig + * @function getTypeUrl + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ControlPlaneEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig"; + }; + + ControlPlaneEndpointsConfig.DNSEndpointConfig = (function() { + + /** + * Properties of a DNSEndpointConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @interface IDNSEndpointConfig + * @property {string|null} [endpoint] DNSEndpointConfig endpoint + * @property {boolean|null} [allowExternalTraffic] DNSEndpointConfig allowExternalTraffic + */ + + /** + * Constructs a new DNSEndpointConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @classdesc Represents a DNSEndpointConfig. + * @implements IDNSEndpointConfig + * @constructor + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set + */ + function DNSEndpointConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DNSEndpointConfig endpoint. + * @member {string} endpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + DNSEndpointConfig.prototype.endpoint = ""; + + /** + * DNSEndpointConfig allowExternalTraffic. + * @member {boolean|null|undefined} allowExternalTraffic + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + DNSEndpointConfig.prototype.allowExternalTraffic = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DNSEndpointConfig _allowExternalTraffic. + * @member {"allowExternalTraffic"|undefined} _allowExternalTraffic + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + Object.defineProperty(DNSEndpointConfig.prototype, "_allowExternalTraffic", { + get: $util.oneOfGetter($oneOfFields = ["allowExternalTraffic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DNSEndpointConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig instance + */ + DNSEndpointConfig.create = function create(properties) { + return new DNSEndpointConfig(properties); + }; + + /** + * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSEndpointConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpoint); + if (message.allowExternalTraffic != null && Object.hasOwnProperty.call(message, "allowExternalTraffic")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowExternalTraffic); + return writer; + }; + + /** + * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSEndpointConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSEndpointConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.endpoint = reader.string(); + break; + } + case 3: { + message.allowExternalTraffic = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSEndpointConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSEndpointConfig message. + * @function verify + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSEndpointConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { + properties._allowExternalTraffic = 1; + if (typeof message.allowExternalTraffic !== "boolean") + return "allowExternalTraffic: boolean expected"; + } + return null; + }; + + /** + * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + */ + DNSEndpointConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig) + return object; + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.allowExternalTraffic != null) + message.allowExternalTraffic = Boolean(object.allowExternalTraffic); + return message; + }; + + /** + * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} message DNSEndpointConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSEndpointConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endpoint = ""; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { + object.allowExternalTraffic = message.allowExternalTraffic; + if (options.oneofs) + object._allowExternalTraffic = "allowExternalTraffic"; + } + return object; + }; + + /** + * Converts this DNSEndpointConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + * @returns {Object.} JSON object + */ + DNSEndpointConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DNSEndpointConfig + * @function getTypeUrl + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DNSEndpointConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"; + }; + + return DNSEndpointConfig; + })(); + + ControlPlaneEndpointsConfig.IPEndpointsConfig = (function() { + + /** + * Properties of a IPEndpointsConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @interface IIPEndpointsConfig + * @property {boolean|null} [enabled] IPEndpointsConfig enabled + * @property {boolean|null} [enablePublicEndpoint] IPEndpointsConfig enablePublicEndpoint + * @property {boolean|null} [globalAccess] IPEndpointsConfig globalAccess + * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [authorizedNetworksConfig] IPEndpointsConfig authorizedNetworksConfig + * @property {string|null} [publicEndpoint] IPEndpointsConfig publicEndpoint + * @property {string|null} [privateEndpoint] IPEndpointsConfig privateEndpoint + * @property {string|null} [privateEndpointSubnetwork] IPEndpointsConfig privateEndpointSubnetwork + */ + + /** + * Constructs a new IPEndpointsConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @classdesc Represents a IPEndpointsConfig. + * @implements IIPEndpointsConfig + * @constructor + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set + */ + function IPEndpointsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPEndpointsConfig enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.enabled = null; + + /** + * IPEndpointsConfig enablePublicEndpoint. + * @member {boolean|null|undefined} enablePublicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.enablePublicEndpoint = null; + + /** + * IPEndpointsConfig globalAccess. + * @member {boolean|null|undefined} globalAccess + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.globalAccess = null; + + /** + * IPEndpointsConfig authorizedNetworksConfig. + * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} authorizedNetworksConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.authorizedNetworksConfig = null; + + /** + * IPEndpointsConfig publicEndpoint. + * @member {string} publicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.publicEndpoint = ""; + + /** + * IPEndpointsConfig privateEndpoint. + * @member {string} privateEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.privateEndpoint = ""; + + /** + * IPEndpointsConfig privateEndpointSubnetwork. + * @member {string} privateEndpointSubnetwork + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.privateEndpointSubnetwork = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IPEndpointsConfig _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IPEndpointsConfig _enablePublicEndpoint. + * @member {"enablePublicEndpoint"|undefined} _enablePublicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_enablePublicEndpoint", { + get: $util.oneOfGetter($oneOfFields = ["enablePublicEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IPEndpointsConfig _globalAccess. + * @member {"globalAccess"|undefined} _globalAccess + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_globalAccess", { + get: $util.oneOfGetter($oneOfFields = ["globalAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IPEndpointsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig instance + */ + IPEndpointsConfig.create = function create(properties) { + return new IPEndpointsConfig(properties); + }; + + /** + * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPEndpointsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.enablePublicEndpoint != null && Object.hasOwnProperty.call(message, "enablePublicEndpoint")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePublicEndpoint); + if (message.globalAccess != null && Object.hasOwnProperty.call(message, "globalAccess")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.globalAccess); + if (message.authorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "authorizedNetworksConfig")) + $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.authorizedNetworksConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); + if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.privateEndpoint); + if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.privateEndpointSubnetwork); + return writer; + }; + + /** + * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPEndpointsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.enablePublicEndpoint = reader.bool(); + break; + } + case 3: { + message.globalAccess = reader.bool(); + break; + } + case 4: { + message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.publicEndpoint = reader.string(); + break; + } + case 6: { + message.privateEndpoint = reader.string(); + break; + } + case 7: { + message.privateEndpointSubnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPEndpointsConfig message. + * @function verify + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPEndpointsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { + properties._enablePublicEndpoint = 1; + if (typeof message.enablePublicEndpoint !== "boolean") + return "enablePublicEndpoint: boolean expected"; + } + if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { + properties._globalAccess = 1; + if (typeof message.globalAccess !== "boolean") + return "globalAccess: boolean expected"; + } + if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) { + var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.authorizedNetworksConfig); + if (error) + return "authorizedNetworksConfig." + error; + } + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + if (!$util.isString(message.publicEndpoint)) + return "publicEndpoint: string expected"; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + if (!$util.isString(message.privateEndpoint)) + return "privateEndpoint: string expected"; + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + if (!$util.isString(message.privateEndpointSubnetwork)) + return "privateEndpointSubnetwork: string expected"; + return null; + }; + + /** + * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + */ + IPEndpointsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig) + return object; + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.enablePublicEndpoint != null) + message.enablePublicEndpoint = Boolean(object.enablePublicEndpoint); + if (object.globalAccess != null) + message.globalAccess = Boolean(object.globalAccess); + if (object.authorizedNetworksConfig != null) { + if (typeof object.authorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorizedNetworksConfig: object expected"); + message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.authorizedNetworksConfig); + } + if (object.publicEndpoint != null) + message.publicEndpoint = String(object.publicEndpoint); + if (object.privateEndpoint != null) + message.privateEndpoint = String(object.privateEndpoint); + if (object.privateEndpointSubnetwork != null) + message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); + return message; + }; + + /** + * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} message IPEndpointsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPEndpointsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.authorizedNetworksConfig = null; + object.publicEndpoint = ""; + object.privateEndpoint = ""; + object.privateEndpointSubnetwork = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { + object.enablePublicEndpoint = message.enablePublicEndpoint; + if (options.oneofs) + object._enablePublicEndpoint = "enablePublicEndpoint"; + } + if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { + object.globalAccess = message.globalAccess; + if (options.oneofs) + object._globalAccess = "globalAccess"; + } + if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) + object.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.authorizedNetworksConfig, options); + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + object.publicEndpoint = message.publicEndpoint; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + object.privateEndpoint = message.privateEndpoint; + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; + return object; + }; + + /** + * Converts this IPEndpointsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + * @returns {Object.} JSON object + */ + IPEndpointsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IPEndpointsConfig + * @function getTypeUrl + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"; + }; + + return IPEndpointsConfig; + })(); + + return ControlPlaneEndpointsConfig; + })(); + + /** + * IPv6AccessType enum. + * @name google.container.v1.IPv6AccessType + * @enum {number} + * @property {number} IPV6_ACCESS_TYPE_UNSPECIFIED=0 IPV6_ACCESS_TYPE_UNSPECIFIED value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + v1.IPv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IPV6_ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + v1.LocalNvmeSsdBlockConfig = (function() { + + /** + * Properties of a LocalNvmeSsdBlockConfig. + * @memberof google.container.v1 + * @interface ILocalNvmeSsdBlockConfig + * @property {number|null} [localSsdCount] LocalNvmeSsdBlockConfig localSsdCount + */ + + /** + * Constructs a new LocalNvmeSsdBlockConfig. + * @memberof google.container.v1 + * @classdesc Represents a LocalNvmeSsdBlockConfig. + * @implements ILocalNvmeSsdBlockConfig + * @constructor + * @param {google.container.v1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set + */ + function LocalNvmeSsdBlockConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocalNvmeSsdBlockConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @instance + */ + LocalNvmeSsdBlockConfig.prototype.localSsdCount = 0; + + /** + * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set + * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig instance + */ + LocalNvmeSsdBlockConfig.create = function create(properties) { + return new LocalNvmeSsdBlockConfig(properties); + }; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalNvmeSsdBlockConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); + return writer; + }; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalNvmeSsdBlockConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalNvmeSsdBlockConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LocalNvmeSsdBlockConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.localSsdCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalNvmeSsdBlockConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalNvmeSsdBlockConfig message. + * @function verify + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalNvmeSsdBlockConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + return null; + }; + + /** + * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + */ + LocalNvmeSsdBlockConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LocalNvmeSsdBlockConfig) + return object; + var message = new $root.google.container.v1.LocalNvmeSsdBlockConfig(); + if (object.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + return message; + }; + + /** + * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1.LocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalNvmeSsdBlockConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localSsdCount = 0; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + return object; + }; + + /** + * Converts this LocalNvmeSsdBlockConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @instance + * @returns {Object.} JSON object + */ + LocalNvmeSsdBlockConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalNvmeSsdBlockConfig + * @function getTypeUrl + * @memberof google.container.v1.LocalNvmeSsdBlockConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalNvmeSsdBlockConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LocalNvmeSsdBlockConfig"; + }; + + return LocalNvmeSsdBlockConfig; + })(); + + v1.EphemeralStorageLocalSsdConfig = (function() { + + /** + * Properties of an EphemeralStorageLocalSsdConfig. + * @memberof google.container.v1 + * @interface IEphemeralStorageLocalSsdConfig + * @property {number|null} [localSsdCount] EphemeralStorageLocalSsdConfig localSsdCount + */ + + /** + * Constructs a new EphemeralStorageLocalSsdConfig. + * @memberof google.container.v1 + * @classdesc Represents an EphemeralStorageLocalSsdConfig. + * @implements IEphemeralStorageLocalSsdConfig + * @constructor + * @param {google.container.v1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set + */ + function EphemeralStorageLocalSsdConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EphemeralStorageLocalSsdConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @instance + */ + EphemeralStorageLocalSsdConfig.prototype.localSsdCount = 0; + + /** + * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set + * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig instance + */ + EphemeralStorageLocalSsdConfig.create = function create(properties) { + return new EphemeralStorageLocalSsdConfig(properties); + }; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageLocalSsdConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); + return writer; + }; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageLocalSsdConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageLocalSsdConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EphemeralStorageLocalSsdConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.localSsdCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageLocalSsdConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EphemeralStorageLocalSsdConfig message. + * @function verify + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EphemeralStorageLocalSsdConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + return null; + }; + + /** + * Creates an EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + */ + EphemeralStorageLocalSsdConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.EphemeralStorageLocalSsdConfig) + return object; + var message = new $root.google.container.v1.EphemeralStorageLocalSsdConfig(); + if (object.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + return message; + }; + + /** + * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1.EphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EphemeralStorageLocalSsdConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localSsdCount = 0; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + return object; + }; + + /** + * Converts this EphemeralStorageLocalSsdConfig to JSON. + * @function toJSON + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @instance + * @returns {Object.} JSON object + */ + EphemeralStorageLocalSsdConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EphemeralStorageLocalSsdConfig + * @function getTypeUrl + * @memberof google.container.v1.EphemeralStorageLocalSsdConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EphemeralStorageLocalSsdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.EphemeralStorageLocalSsdConfig"; + }; + + return EphemeralStorageLocalSsdConfig; + })(); + + v1.ResourceManagerTags = (function() { + + /** + * Properties of a ResourceManagerTags. + * @memberof google.container.v1 + * @interface IResourceManagerTags + * @property {Object.|null} [tags] ResourceManagerTags tags + */ + + /** + * Constructs a new ResourceManagerTags. + * @memberof google.container.v1 + * @classdesc Represents a ResourceManagerTags. + * @implements IResourceManagerTags + * @constructor + * @param {google.container.v1.IResourceManagerTags=} [properties] Properties to set + */ + function ResourceManagerTags(properties) { + this.tags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceManagerTags tags. + * @member {Object.} tags + * @memberof google.container.v1.ResourceManagerTags + * @instance + */ + ResourceManagerTags.prototype.tags = $util.emptyObject; + + /** + * Creates a new ResourceManagerTags instance using the specified properties. + * @function create + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {google.container.v1.IResourceManagerTags=} [properties] Properties to set + * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags instance + */ + ResourceManagerTags.create = function create(properties) { + return new ResourceManagerTags(properties); + }; + + /** + * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {google.container.v1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceManagerTags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {google.container.v1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceManagerTags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceManagerTags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceManagerTags(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceManagerTags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceManagerTags message. + * @function verify + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceManagerTags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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"; + } + return null; + }; + + /** + * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags + */ + ResourceManagerTags.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ResourceManagerTags) + return object; + var message = new $root.google.container.v1.ResourceManagerTags(); + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.container.v1.ResourceManagerTags.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]]); + } + return message; + }; + + /** + * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {google.container.v1.ResourceManagerTags} message ResourceManagerTags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceManagerTags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.tags = {}; + 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]]; + } + return object; + }; + + /** + * Converts this ResourceManagerTags to JSON. + * @function toJSON + * @memberof google.container.v1.ResourceManagerTags + * @instance + * @returns {Object.} JSON object + */ + ResourceManagerTags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceManagerTags + * @function getTypeUrl + * @memberof google.container.v1.ResourceManagerTags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceManagerTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ResourceManagerTags"; + }; + + return ResourceManagerTags; + })(); + + v1.EnterpriseConfig = (function() { + + /** + * Properties of an EnterpriseConfig. + * @memberof google.container.v1 + * @interface IEnterpriseConfig + * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [clusterTier] EnterpriseConfig clusterTier + * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] EnterpriseConfig desiredTier + */ + + /** + * Constructs a new EnterpriseConfig. + * @memberof google.container.v1 + * @classdesc Represents an EnterpriseConfig. + * @implements IEnterpriseConfig + * @constructor + * @param {google.container.v1.IEnterpriseConfig=} [properties] Properties to set + */ + function EnterpriseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnterpriseConfig clusterTier. + * @member {google.container.v1.EnterpriseConfig.ClusterTier} clusterTier + * @memberof google.container.v1.EnterpriseConfig + * @instance + */ + EnterpriseConfig.prototype.clusterTier = 0; + + /** + * EnterpriseConfig desiredTier. + * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier + * @memberof google.container.v1.EnterpriseConfig + * @instance + */ + EnterpriseConfig.prototype.desiredTier = 0; + + /** + * Creates a new EnterpriseConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {google.container.v1.IEnterpriseConfig=} [properties] Properties to set + * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig instance + */ + EnterpriseConfig.create = function create(properties) { + return new EnterpriseConfig(properties); + }; + + /** + * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {google.container.v1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnterpriseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterTier); + if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.desiredTier); + return writer; + }; + + /** + * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {google.container.v1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnterpriseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EnterpriseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clusterTier = reader.int32(); + break; + } + case 2: { + message.desiredTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnterpriseConfig message. + * @function verify + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnterpriseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) + switch (message.clusterTier) { + default: + return "clusterTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + switch (message.desiredTier) { + default: + return "desiredTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig + */ + EnterpriseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.EnterpriseConfig) + return object; + var message = new $root.google.container.v1.EnterpriseConfig(); + switch (object.clusterTier) { + default: + if (typeof object.clusterTier === "number") { + message.clusterTier = object.clusterTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.clusterTier = 0; + break; + case "STANDARD": + case 1: + message.clusterTier = 1; + break; + case "ENTERPRISE": + case 2: + message.clusterTier = 2; + break; + } + switch (object.desiredTier) { + default: + if (typeof object.desiredTier === "number") { + message.desiredTier = object.desiredTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.desiredTier = 0; + break; + case "STANDARD": + case 1: + message.desiredTier = 1; + break; + case "ENTERPRISE": + case 2: + message.desiredTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {google.container.v1.EnterpriseConfig} message EnterpriseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnterpriseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + } + if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) + object.clusterTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] : message.clusterTier; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; + return object; + }; + + /** + * Converts this EnterpriseConfig to JSON. + * @function toJSON + * @memberof google.container.v1.EnterpriseConfig + * @instance + * @returns {Object.} JSON object + */ + EnterpriseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnterpriseConfig + * @function getTypeUrl + * @memberof google.container.v1.EnterpriseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.EnterpriseConfig"; + }; + + /** + * ClusterTier enum. + * @name google.container.v1.EnterpriseConfig.ClusterTier + * @enum {number} + * @property {number} CLUSTER_TIER_UNSPECIFIED=0 CLUSTER_TIER_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} ENTERPRISE=2 ENTERPRISE value + */ + EnterpriseConfig.ClusterTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLUSTER_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "ENTERPRISE"] = 2; + return values; + })(); + + return EnterpriseConfig; + })(); + + v1.SecretManagerConfig = (function() { + + /** + * Properties of a SecretManagerConfig. + * @memberof google.container.v1 + * @interface ISecretManagerConfig + * @property {boolean|null} [enabled] SecretManagerConfig enabled + */ + + /** + * Constructs a new SecretManagerConfig. + * @memberof google.container.v1 + * @classdesc Represents a SecretManagerConfig. + * @implements ISecretManagerConfig + * @constructor + * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set + */ + function SecretManagerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretManagerConfig enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.container.v1.SecretManagerConfig + * @instance + */ + SecretManagerConfig.prototype.enabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecretManagerConfig _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.container.v1.SecretManagerConfig + * @instance + */ + Object.defineProperty(SecretManagerConfig.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig instance + */ + SecretManagerConfig.create = function create(properties) { + return new SecretManagerConfig(properties); + }; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecretManagerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretManagerConfig message. + * @function verify + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretManagerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + return null; + }; + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + */ + SecretManagerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecretManagerConfig) + return object; + var message = new $root.google.container.v1.SecretManagerConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.SecretManagerConfig} message SecretManagerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretManagerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + return object; + }; + + /** + * Converts this SecretManagerConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SecretManagerConfig + * @instance + * @returns {Object.} JSON object + */ + SecretManagerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretManagerConfig + * @function getTypeUrl + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecretManagerConfig"; + }; + + return SecretManagerConfig; + })(); + + v1.SecondaryBootDisk = (function() { + + /** + * Properties of a SecondaryBootDisk. + * @memberof google.container.v1 + * @interface ISecondaryBootDisk + * @property {google.container.v1.SecondaryBootDisk.Mode|null} [mode] SecondaryBootDisk mode + * @property {string|null} [diskImage] SecondaryBootDisk diskImage + */ + + /** + * Constructs a new SecondaryBootDisk. + * @memberof google.container.v1 + * @classdesc Represents a SecondaryBootDisk. + * @implements ISecondaryBootDisk + * @constructor + * @param {google.container.v1.ISecondaryBootDisk=} [properties] Properties to set + */ + function SecondaryBootDisk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecondaryBootDisk mode. + * @member {google.container.v1.SecondaryBootDisk.Mode} mode + * @memberof google.container.v1.SecondaryBootDisk + * @instance + */ + SecondaryBootDisk.prototype.mode = 0; + + /** + * SecondaryBootDisk diskImage. + * @member {string} diskImage + * @memberof google.container.v1.SecondaryBootDisk + * @instance + */ + SecondaryBootDisk.prototype.diskImage = ""; + + /** + * Creates a new SecondaryBootDisk instance using the specified properties. + * @function create + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {google.container.v1.ISecondaryBootDisk=} [properties] Properties to set + * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk instance + */ + SecondaryBootDisk.create = function create(properties) { + return new SecondaryBootDisk(properties); + }; + + /** + * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {google.container.v1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.diskImage != null && Object.hasOwnProperty.call(message, "diskImage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.diskImage); + return writer; + }; + + /** + * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {google.container.v1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDisk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecondaryBootDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.diskImage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecondaryBootDisk message. + * @function verify + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecondaryBootDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + break; + } + if (message.diskImage != null && message.hasOwnProperty("diskImage")) + if (!$util.isString(message.diskImage)) + return "diskImage: string expected"; + return null; + }; + + /** + * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk + */ + SecondaryBootDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecondaryBootDisk) + return object; + var message = new $root.google.container.v1.SecondaryBootDisk(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "CONTAINER_IMAGE_CACHE": + case 1: + message.mode = 1; + break; + } + if (object.diskImage != null) + message.diskImage = String(object.diskImage); + return message; + }; + + /** + * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {google.container.v1.SecondaryBootDisk} message SecondaryBootDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecondaryBootDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.diskImage = ""; + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.container.v1.SecondaryBootDisk.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecondaryBootDisk.Mode[message.mode] : message.mode; + if (message.diskImage != null && message.hasOwnProperty("diskImage")) + object.diskImage = message.diskImage; + return object; + }; + + /** + * Converts this SecondaryBootDisk to JSON. + * @function toJSON + * @memberof google.container.v1.SecondaryBootDisk + * @instance + * @returns {Object.} JSON object + */ + SecondaryBootDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecondaryBootDisk + * @function getTypeUrl + * @memberof google.container.v1.SecondaryBootDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecondaryBootDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecondaryBootDisk"; + }; + + /** + * Mode enum. + * @name google.container.v1.SecondaryBootDisk.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} CONTAINER_IMAGE_CACHE=1 CONTAINER_IMAGE_CACHE value + */ + SecondaryBootDisk.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINER_IMAGE_CACHE"] = 1; + return values; + })(); + + return SecondaryBootDisk; + })(); + + /** + * InTransitEncryptionConfig enum. + * @name google.container.v1.InTransitEncryptionConfig + * @enum {number} + * @property {number} IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED=0 IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED value + * @property {number} IN_TRANSIT_ENCRYPTION_DISABLED=1 IN_TRANSIT_ENCRYPTION_DISABLED value + * @property {number} IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT=2 IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT value + */ + v1.InTransitEncryptionConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_TRANSIT_ENCRYPTION_DISABLED"] = 1; + values[valuesById[2] = "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT"] = 2; + return values; + })(); + + v1.SecondaryBootDiskUpdateStrategy = (function() { + + /** + * Properties of a SecondaryBootDiskUpdateStrategy. + * @memberof google.container.v1 + * @interface ISecondaryBootDiskUpdateStrategy + */ + + /** + * Constructs a new SecondaryBootDiskUpdateStrategy. + * @memberof google.container.v1 + * @classdesc Represents a SecondaryBootDiskUpdateStrategy. + * @implements ISecondaryBootDiskUpdateStrategy + * @constructor + * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set + */ + function SecondaryBootDiskUpdateStrategy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. + * @function create + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set + * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy instance + */ + SecondaryBootDiskUpdateStrategy.create = function create(properties) { + return new SecondaryBootDiskUpdateStrategy(properties); + }; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDiskUpdateStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDiskUpdateStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDiskUpdateStrategy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecondaryBootDiskUpdateStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDiskUpdateStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecondaryBootDiskUpdateStrategy message. + * @function verify + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecondaryBootDiskUpdateStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + */ + SecondaryBootDiskUpdateStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecondaryBootDiskUpdateStrategy) + return object; + return new $root.google.container.v1.SecondaryBootDiskUpdateStrategy(); + }; + + /** + * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1.SecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecondaryBootDiskUpdateStrategy.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SecondaryBootDiskUpdateStrategy to JSON. + * @function toJSON + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @instance + * @returns {Object.} JSON object + */ + SecondaryBootDiskUpdateStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecondaryBootDiskUpdateStrategy + * @function getTypeUrl + * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecondaryBootDiskUpdateStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecondaryBootDiskUpdateStrategy"; + }; + + return SecondaryBootDiskUpdateStrategy; + })(); + + return v1; + })(); + + return container; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.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.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.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.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), 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.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + /** + * Code enum. + * @name google.rpc.Code + * @enum {number} + * @property {number} OK=0 OK value + * @property {number} CANCELLED=1 CANCELLED value + * @property {number} UNKNOWN=2 UNKNOWN value + * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value + * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value + * @property {number} NOT_FOUND=5 NOT_FOUND value + * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value + * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value + * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value + * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value + * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value + * @property {number} ABORTED=10 ABORTED value + * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value + * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value + * @property {number} INTERNAL=13 INTERNAL value + * @property {number} UNAVAILABLE=14 UNAVAILABLE value + * @property {number} DATA_LOSS=15 DATA_LOSS value + */ + rpc.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OK"] = 0; + values[valuesById[1] = "CANCELLED"] = 1; + values[valuesById[2] = "UNKNOWN"] = 2; + values[valuesById[3] = "INVALID_ARGUMENT"] = 3; + values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; + values[valuesById[5] = "NOT_FOUND"] = 5; + values[valuesById[6] = "ALREADY_EXISTS"] = 6; + values[valuesById[7] = "PERMISSION_DENIED"] = 7; + values[valuesById[16] = "UNAUTHENTICATED"] = 16; + values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; + values[valuesById[9] = "FAILED_PRECONDITION"] = 9; + values[valuesById[10] = "ABORTED"] = 10; + values[valuesById[11] = "OUT_OF_RANGE"] = 11; + values[valuesById[12] = "UNIMPLEMENTED"] = 12; + values[valuesById[13] = "INTERNAL"] = 13; + values[valuesById[14] = "UNAVAILABLE"] = 14; + values[valuesById[15] = "DATA_LOSS"] = 15; + return values; + })(); + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-container/v1/protos/protos.json b/owl-bot-staging/google-container/v1/protos/protos.json new file mode 100644 index 00000000000..6404a29c92a --- /dev/null +++ b/owl-bot-staging/google-container/v1/protos/protos.json @@ -0,0 +1,8766 @@ +{ + "nested": { + "google": { + "nested": { + "container": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Container.V1", + "go_package": "cloud.google.com/go/container/apiv1/containerpb;containerpb", + "java_multiple_files": true, + "java_outer_classname": "ClusterServiceProto", + "java_package": "com.google.container.v1", + "php_namespace": "Google\\Cloud\\Container\\V1", + "ruby_package": "Google::Cloud::Container::V1", + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" + }, + "nested": { + "ClusterManager": { + "options": { + "(google.api.default_host)": "container.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListClusters": { + "requestType": "ListClustersRequest", + "responseType": "ListClustersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/clusters", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/clusters", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/clusters" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCluster": { + "requestType": "GetClusterRequest", + "responseType": "Cluster", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/clusters/*}", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCluster": { + "requestType": "CreateClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/clusters", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,cluster" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/clusters", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster" + }, + { + "(google.api.method_signature)": "parent,cluster" + } + ] + }, + "UpdateCluster": { + "requestType": "UpdateClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).put": "/v1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.put": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,update" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{name=projects/*/locations/*/clusters/*}", + "body": "*", + "additional_bindings": { + "put": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,update" + }, + { + "(google.api.method_signature)": "name,update" + } + ] + }, + "UpdateNodePool": { + "requestType": "UpdateNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).put": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", + "body": "*" + } + } + } + ] + }, + "SetNodePoolAutoscaling": { + "requestType": "SetNodePoolAutoscalingRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", + "body": "*" + } + } + } + ] + }, + "SetLoggingService": { + "requestType": "SetLoggingServiceRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLogging", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,logging_service" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLogging", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" + }, + { + "(google.api.method_signature)": "name,logging_service" + } + ] + }, + "SetMonitoringService": { + "requestType": "SetMonitoringServiceRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,monitoring_service" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" + }, + { + "(google.api.method_signature)": "name,monitoring_service" + } + ] + }, + "SetAddonsConfig": { + "requestType": "SetAddonsConfigRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setAddons", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,addons_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setAddons", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" + }, + { + "(google.api.method_signature)": "name,addons_config" + } + ] + }, + "SetLocations": { + "requestType": "SetLocationsRequest", + "responseType": "Operation", + "options": { + "deprecated": true, + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLocations", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,locations" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLocations", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,locations" + }, + { + "(google.api.method_signature)": "name,locations" + } + ] + }, + "UpdateMaster": { + "requestType": "UpdateMasterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,master_version" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" + }, + { + "(google.api.method_signature)": "name,master_version" + } + ] + }, + "SetMasterAuth": { + "requestType": "SetMasterAuthRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", + "body": "*" + } + } + } + ] + }, + "DeleteCluster": { + "requestType": "DeleteClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).additional_bindings.delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/clusters/*}", + "additional_bindings": { + "delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/operations", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/operations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/operations", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/operations" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/operations/*}", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/operations/*}", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,operation_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/operations/*}:cancel", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/operations/*}:cancel", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,operation_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetServerConfig": { + "requestType": "GetServerConfigRequest", + "responseType": "ServerConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*}/serverConfig", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/serverconfig", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*}/serverConfig", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/serverconfig" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetJSONWebKeys": { + "requestType": "GetJSONWebKeysRequest", + "responseType": "GetJSONWebKeysResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" + } + } + ] + }, + "ListNodePools": { + "requestType": "ListNodePoolsRequest", + "responseType": "ListNodePoolsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetNodePool": { + "requestType": "GetNodePoolRequest", + "responseType": "NodePool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "additional_bindings": { + "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateNodePool": { + "requestType": "CreateNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,node_pool" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" + }, + { + "(google.api.method_signature)": "parent,node_pool" + } + ] + }, + "DeleteNodePool": { + "requestType": "DeleteNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).additional_bindings.delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "additional_bindings": { + "delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CompleteNodePoolUpgrade": { + "requestType": "CompleteNodePoolUpgradeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", + "body": "*" + } + } + ] + }, + "RollbackNodePoolUpgrade": { + "requestType": "RollbackNodePoolUpgradeRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetNodePoolManagement": { + "requestType": "SetNodePoolManagementRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", + "body": "*" + } + } + } + ] + }, + "SetLabels": { + "requestType": "SetLabelsRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", + "body": "*" + } + } + } + ] + }, + "SetLegacyAbac": { + "requestType": "SetLegacyAbacRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,enabled" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" + }, + { + "(google.api.method_signature)": "name,enabled" + } + ] + }, + "StartIPRotation": { + "requestType": "StartIPRotationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CompleteIPRotation": { + "requestType": "CompleteIPRotationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetNodePoolSize": { + "requestType": "SetNodePoolSizeRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", + "body": "*" + } + } + } + ] + }, + "SetNetworkPolicy": { + "requestType": "SetNetworkPolicyRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,network_policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" + }, + { + "(google.api.method_signature)": "name,network_policy" + } + ] + }, + "SetMaintenancePolicy": { + "requestType": "SetMaintenancePolicyRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,maintenance_policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" + }, + { + "(google.api.method_signature)": "name,maintenance_policy" + } + ] + }, + "ListUsableSubnetworks": { + "requestType": "ListUsableSubnetworksRequest", + "responseType": "ListUsableSubnetworksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/aggregated/usableSubnetworks" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/aggregated/usableSubnetworks" + } + } + ] + }, + "CheckAutopilotCompatibility": { + "requestType": "CheckAutopilotCompatibilityRequest", + "responseType": "CheckAutopilotCompatibilityResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + } + } + ] + } + } + }, + "LinuxNodeConfig": { + "oneofs": { + "_hugepages": { + "oneof": [ + "hugepages" + ] + } + }, + "fields": { + "sysctls": { + "keyType": "string", + "type": "string", + "id": 1 + }, + "cgroupMode": { + "type": "CgroupMode", + "id": 2 + }, + "hugepages": { + "type": "HugepagesConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "CgroupMode": { + "values": { + "CGROUP_MODE_UNSPECIFIED": 0, + "CGROUP_MODE_V1": 1, + "CGROUP_MODE_V2": 2 + } + }, + "HugepagesConfig": { + "oneofs": { + "_hugepageSize2m": { + "oneof": [ + "hugepageSize2m" + ] + }, + "_hugepageSize1g": { + "oneof": [ + "hugepageSize1g" + ] + } + }, + "fields": { + "hugepageSize2m": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "hugepageSize1g": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + } + } + }, + "WindowsNodeConfig": { + "fields": { + "osVersion": { + "type": "OSVersion", + "id": 1 + } + }, + "nested": { + "OSVersion": { + "values": { + "OS_VERSION_UNSPECIFIED": 0, + "OS_VERSION_LTSC2019": 1, + "OS_VERSION_LTSC2022": 2 + } + } + } + }, + "NodeKubeletConfig": { + "oneofs": { + "_insecureKubeletReadonlyPortEnabled": { + "oneof": [ + "insecureKubeletReadonlyPortEnabled" + ] + } + }, + "fields": { + "cpuManagerPolicy": { + "type": "string", + "id": 1 + }, + "cpuCfsQuota": { + "type": "google.protobuf.BoolValue", + "id": 2 + }, + "cpuCfsQuotaPeriod": { + "type": "string", + "id": 3 + }, + "podPidsLimit": { + "type": "int64", + "id": 4 + }, + "insecureKubeletReadonlyPortEnabled": { + "type": "bool", + "id": 7, + "options": { + "proto3_optional": true + } + } + } + }, + "NodeConfig": { + "oneofs": { + "_fastSocket": { + "oneof": [ + "fastSocket" + ] + }, + "_secondaryBootDiskUpdateStrategy": { + "oneof": [ + "secondaryBootDiskUpdateStrategy" + ] + }, + "_localSsdEncryptionMode": { + "oneof": [ + "localSsdEncryptionMode" + ] + } + }, + "fields": { + "machineType": { + "type": "string", + "id": 1 + }, + "diskSizeGb": { + "type": "int32", + "id": 2 + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "serviceAccount": { + "type": "string", + "id": 9 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "imageType": { + "type": "string", + "id": 5 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "localSsdCount": { + "type": "int32", + "id": 7 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "preemptible": { + "type": "bool", + "id": 10 + }, + "accelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 11 + }, + "diskType": { + "type": "string", + "id": 12 + }, + "minCpuPlatform": { + "type": "string", + "id": 13 + }, + "workloadMetadataConfig": { + "type": "WorkloadMetadataConfig", + "id": 14 + }, + "taints": { + "rule": "repeated", + "type": "NodeTaint", + "id": 15 + }, + "sandboxConfig": { + "type": "SandboxConfig", + "id": 17 + }, + "nodeGroup": { + "type": "string", + "id": 18 + }, + "reservationAffinity": { + "type": "ReservationAffinity", + "id": 19 + }, + "shieldedInstanceConfig": { + "type": "ShieldedInstanceConfig", + "id": 20 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 21 + }, + "kubeletConfig": { + "type": "NodeKubeletConfig", + "id": 22 + }, + "bootDiskKmsKey": { + "type": "string", + "id": 23 + }, + "gcfsConfig": { + "type": "GcfsConfig", + "id": 25 + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 26 + }, + "gvnic": { + "type": "VirtualNIC", + "id": 29 + }, + "spot": { + "type": "bool", + "id": 32 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 35 + }, + "fastSocket": { + "type": "FastSocket", + "id": 36, + "options": { + "proto3_optional": true + } + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 37 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 38 + }, + "windowsNodeConfig": { + "type": "WindowsNodeConfig", + "id": 39 + }, + "localNvmeSsdBlockConfig": { + "type": "LocalNvmeSsdBlockConfig", + "id": 40 + }, + "ephemeralStorageLocalSsdConfig": { + "type": "EphemeralStorageLocalSsdConfig", + "id": 41 + }, + "soleTenantConfig": { + "type": "SoleTenantConfig", + "id": 42 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 43 + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 45 + }, + "enableConfidentialStorage": { + "type": "bool", + "id": 46, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secondaryBootDisks": { + "rule": "repeated", + "type": "SecondaryBootDisk", + "id": 48 + }, + "storagePools": { + "rule": "repeated", + "type": "string", + "id": 49 + }, + "secondaryBootDiskUpdateStrategy": { + "type": "SecondaryBootDiskUpdateStrategy", + "id": 50, + "options": { + "proto3_optional": true + } + }, + "localSsdEncryptionMode": { + "type": "LocalSsdEncryptionMode", + "id": 54, + "options": { + "proto3_optional": true + } + }, + "effectiveCgroupMode": { + "type": "EffectiveCgroupMode", + "id": 55, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LocalSsdEncryptionMode": { + "values": { + "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": 0, + "STANDARD_ENCRYPTION": 1, + "EPHEMERAL_KEY_ENCRYPTION": 2 + } + }, + "EffectiveCgroupMode": { + "values": { + "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": 0, + "EFFECTIVE_CGROUP_MODE_V1": 1, + "EFFECTIVE_CGROUP_MODE_V2": 2 + } + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + } + }, + "fields": { + "threadsPerCore": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enableNestedVirtualization": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "NodeNetworkConfig": { + "oneofs": { + "_enablePrivateNodes": { + "oneof": [ + "enablePrivateNodes" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + } + }, + "fields": { + "createPodRange": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "podRange": { + "type": "string", + "id": 5 + }, + "podIpv4CidrBlock": { + "type": "string", + "id": 6 + }, + "enablePrivateNodes": { + "type": "bool", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "podCidrOverprovisionConfig": { + "type": "PodCIDROverprovisionConfig", + "id": 13 + }, + "additionalNodeNetworkConfigs": { + "rule": "repeated", + "type": "AdditionalNodeNetworkConfig", + "id": 14 + }, + "additionalPodNetworkConfigs": { + "rule": "repeated", + "type": "AdditionalPodNetworkConfig", + "id": 15 + }, + "podIpv4RangeUtilization": { + "type": "double", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "TIER_1": 1 + } + } + } + } + } + }, + "AdditionalNodeNetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1 + }, + "subnetwork": { + "type": "string", + "id": 2 + } + } + }, + "AdditionalPodNetworkConfig": { + "oneofs": { + "_maxPodsPerNode": { + "oneof": [ + "maxPodsPerNode" + ] + } + }, + "fields": { + "subnetwork": { + "type": "string", + "id": 1 + }, + "secondaryPodRange": { + "type": "string", + "id": 2 + }, + "maxPodsPerNode": { + "type": "MaxPodsConstraint", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "ShieldedInstanceConfig": { + "fields": { + "enableSecureBoot": { + "type": "bool", + "id": 1 + }, + "enableIntegrityMonitoring": { + "type": "bool", + "id": 2 + } + } + }, + "SandboxConfig": { + "fields": { + "type": { + "type": "Type", + "id": 2 + } + }, + "nested": { + "Type": { + "values": { + "UNSPECIFIED": 0, + "GVISOR": 1 + } + } + } + }, + "GcfsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ReservationAffinity": { + "fields": { + "consumeReservationType": { + "type": "Type", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "SoleTenantConfig": { + "fields": { + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 1 + } + }, + "nested": { + "NodeAffinity": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "operator": { + "type": "Operator", + "id": 2 + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } + } + } + } + }, + "ContainerdConfig": { + "fields": { + "privateRegistryAccessConfig": { + "type": "PrivateRegistryAccessConfig", + "id": 1 + } + }, + "nested": { + "PrivateRegistryAccessConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "certificateAuthorityDomainConfig": { + "rule": "repeated", + "type": "CertificateAuthorityDomainConfig", + "id": 2 + } + }, + "nested": { + "CertificateAuthorityDomainConfig": { + "oneofs": { + "certificateConfig": { + "oneof": [ + "gcpSecretManagerCertificateConfig" + ] + } + }, + "fields": { + "fqdns": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "gcpSecretManagerCertificateConfig": { + "type": "GCPSecretManagerCertificateConfig", + "id": 2 + } + }, + "nested": { + "GCPSecretManagerCertificateConfig": { + "fields": { + "secretUri": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } + }, + "NodeTaint": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "effect": { + "type": "Effect", + "id": 3 + } + }, + "nested": { + "Effect": { + "values": { + "EFFECT_UNSPECIFIED": 0, + "NO_SCHEDULE": 1, + "PREFER_NO_SCHEDULE": 2, + "NO_EXECUTE": 3 + } + } + } + }, + "NodeTaints": { + "fields": { + "taints": { + "rule": "repeated", + "type": "NodeTaint", + "id": 1 + } + } + }, + "NodeLabels": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "ResourceLabels": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "NetworkTags": { + "fields": { + "tags": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "MasterAuth": { + "fields": { + "username": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "password": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clientCertificateConfig": { + "type": "ClientCertificateConfig", + "id": 3 + }, + "clusterCaCertificate": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientCertificate": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientKey": { + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ClientCertificateConfig": { + "fields": { + "issueClientCertificate": { + "type": "bool", + "id": 1 + } + } + }, + "AddonsConfig": { + "fields": { + "httpLoadBalancing": { + "type": "HttpLoadBalancing", + "id": 1 + }, + "horizontalPodAutoscaling": { + "type": "HorizontalPodAutoscaling", + "id": 2 + }, + "kubernetesDashboard": { + "type": "KubernetesDashboard", + "id": 3, + "options": { + "deprecated": true + } + }, + "networkPolicyConfig": { + "type": "NetworkPolicyConfig", + "id": 4 + }, + "cloudRunConfig": { + "type": "CloudRunConfig", + "id": 7 + }, + "dnsCacheConfig": { + "type": "DnsCacheConfig", + "id": 8 + }, + "configConnectorConfig": { + "type": "ConfigConnectorConfig", + "id": 10 + }, + "gcePersistentDiskCsiDriverConfig": { + "type": "GcePersistentDiskCsiDriverConfig", + "id": 11 + }, + "gcpFilestoreCsiDriverConfig": { + "type": "GcpFilestoreCsiDriverConfig", + "id": 14 + }, + "gkeBackupAgentConfig": { + "type": "GkeBackupAgentConfig", + "id": 16 + }, + "gcsFuseCsiDriverConfig": { + "type": "GcsFuseCsiDriverConfig", + "id": 17 + }, + "statefulHaConfig": { + "type": "StatefulHAConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "parallelstoreCsiDriverConfig": { + "type": "ParallelstoreCsiDriverConfig", + "id": 19 + }, + "rayOperatorConfig": { + "type": "RayOperatorConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "HttpLoadBalancing": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "HorizontalPodAutoscaling": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "KubernetesDashboard": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "NetworkPolicyConfig": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "DnsCacheConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "PrivateClusterMasterGlobalAccessConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateNodes": { + "type": "bool", + "id": 1, + "options": { + "deprecated": true + } + }, + "enablePrivateEndpoint": { + "type": "bool", + "id": 2, + "options": { + "deprecated": true + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 3 + }, + "privateEndpoint": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "publicEndpoint": { + "type": "string", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peeringName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "masterGlobalAccessConfig": { + "type": "PrivateClusterMasterGlobalAccessConfig", + "id": 8, + "options": { + "deprecated": true + } + }, + "privateEndpointSubnetwork": { + "type": "string", + "id": 10, + "options": { + "deprecated": true + } + } + } + }, + "AuthenticatorGroupsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "securityGroup": { + "type": "string", + "id": 2 + } + } + }, + "CloudRunConfig": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 3 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "LOAD_BALANCER_TYPE_EXTERNAL": 1, + "LOAD_BALANCER_TYPE_INTERNAL": 2 + } + } + } + }, + "ConfigConnectorConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcePersistentDiskCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcpFilestoreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcsFuseCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ParallelstoreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "RayOperatorConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "rayClusterLoggingConfig": { + "type": "RayClusterLoggingConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rayClusterMonitoringConfig": { + "type": "RayClusterMonitoringConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GkeBackupAgentConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "StatefulHAConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "MasterAuthorizedNetworksConfig": { + "oneofs": { + "_gcpPublicCidrsAccessEnabled": { + "oneof": [ + "gcpPublicCidrsAccessEnabled" + ] + }, + "_privateEndpointEnforcementEnabled": { + "oneof": [ + "privateEndpointEnforcementEnabled" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "cidrBlocks": { + "rule": "repeated", + "type": "CidrBlock", + "id": 2 + }, + "gcpPublicCidrsAccessEnabled": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "privateEndpointEnforcementEnabled": { + "type": "bool", + "id": 5, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "CidrBlock": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "cidrBlock": { + "type": "string", + "id": 2 + } + } + } + } + }, + "LegacyAbac": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "NetworkPolicy": { + "fields": { + "provider": { + "type": "Provider", + "id": 1 + }, + "enabled": { + "type": "bool", + "id": 2 + } + }, + "nested": { + "Provider": { + "values": { + "PROVIDER_UNSPECIFIED": 0, + "CALICO": 1 + } + } + } + }, + "BinaryAuthorization": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "deprecated": true + } + }, + "evaluationMode": { + "type": "EvaluationMode", + "id": 2 + } + }, + "nested": { + "EvaluationMode": { + "values": { + "EVALUATION_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "PROJECT_SINGLETON_POLICY_ENFORCE": 2 + } + } + } + }, + "PodCIDROverprovisionConfig": { + "fields": { + "disable": { + "type": "bool", + "id": 1 + } + } + }, + "IPAllocationPolicy": { + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1 + }, + "createSubnetwork": { + "type": "bool", + "id": 2 + }, + "subnetworkName": { + "type": "string", + "id": 3 + }, + "clusterIpv4Cidr": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "nodeIpv4Cidr": { + "type": "string", + "id": 5, + "options": { + "deprecated": true + } + }, + "servicesIpv4Cidr": { + "type": "string", + "id": 6, + "options": { + "deprecated": true + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 7 + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 8 + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 9 + }, + "nodeIpv4CidrBlock": { + "type": "string", + "id": 10 + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 11 + }, + "tpuIpv4CidrBlock": { + "type": "string", + "id": 13 + }, + "useRoutes": { + "type": "bool", + "id": 15 + }, + "stackType": { + "type": "StackType", + "id": 16 + }, + "ipv6AccessType": { + "type": "IPv6AccessType", + "id": 17 + }, + "podCidrOverprovisionConfig": { + "type": "PodCIDROverprovisionConfig", + "id": 21 + }, + "subnetIpv6CidrBlock": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "servicesIpv6CidrBlock": { + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultPodIpv4RangeUtilization": { + "type": "double", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Cluster": { + "oneofs": { + "_nodePoolDefaults": { + "oneof": [ + "nodePoolDefaults" + ] + }, + "_satisfiesPzs": { + "oneof": [ + "satisfiesPzs" + ] + }, + "_satisfiesPzi": { + "oneof": [ + "satisfiesPzi" + ] + }, + "_userManagedKeysConfig": { + "oneof": [ + "userManagedKeysConfig" + ] + }, + "_rbacBindingConfig": { + "oneof": [ + "rbacBindingConfig" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "initialNodeCount": { + "type": "int32", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 4, + "options": { + "deprecated": true + } + }, + "masterAuth": { + "type": "MasterAuth", + "id": 5 + }, + "loggingService": { + "type": "string", + "id": 6 + }, + "monitoringService": { + "type": "string", + "id": 7 + }, + "network": { + "type": "string", + "id": 8 + }, + "clusterIpv4Cidr": { + "type": "string", + "id": 9 + }, + "addonsConfig": { + "type": "AddonsConfig", + "id": 10 + }, + "subnetwork": { + "type": "string", + "id": 11 + }, + "nodePools": { + "rule": "repeated", + "type": "NodePool", + "id": 12 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "enableKubernetesAlpha": { + "type": "bool", + "id": 14 + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 15 + }, + "labelFingerprint": { + "type": "string", + "id": 16 + }, + "legacyAbac": { + "type": "LegacyAbac", + "id": 18 + }, + "networkPolicy": { + "type": "NetworkPolicy", + "id": 19 + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 20 + }, + "masterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 22, + "options": { + "deprecated": true + } + }, + "maintenancePolicy": { + "type": "MaintenancePolicy", + "id": 23 + }, + "binaryAuthorization": { + "type": "BinaryAuthorization", + "id": 24 + }, + "autoscaling": { + "type": "ClusterAutoscaling", + "id": 26 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 27 + }, + "defaultMaxPodsConstraint": { + "type": "MaxPodsConstraint", + "id": 30 + }, + "resourceUsageExportConfig": { + "type": "ResourceUsageExportConfig", + "id": 33 + }, + "authenticatorGroupsConfig": { + "type": "AuthenticatorGroupsConfig", + "id": 34 + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 37 + }, + "databaseEncryption": { + "type": "DatabaseEncryption", + "id": 38 + }, + "verticalPodAutoscaling": { + "type": "VerticalPodAutoscaling", + "id": 39 + }, + "shieldedNodes": { + "type": "ShieldedNodes", + "id": 40 + }, + "releaseChannel": { + "type": "ReleaseChannel", + "id": 41 + }, + "workloadIdentityConfig": { + "type": "WorkloadIdentityConfig", + "id": 43 + }, + "meshCertificates": { + "type": "MeshCertificates", + "id": 67 + }, + "costManagementConfig": { + "type": "CostManagementConfig", + "id": 45 + }, + "notificationConfig": { + "type": "NotificationConfig", + "id": 49 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 50 + }, + "identityServiceConfig": { + "type": "IdentityServiceConfig", + "id": 54 + }, + "selfLink": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "zone": { + "type": "string", + "id": 101, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endpoint": { + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "initialClusterVersion": { + "type": "string", + "id": 103 + }, + "currentMasterVersion": { + "type": "string", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentNodeVersion": { + "type": "string", + "id": 105, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "string", + "id": 106, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 107, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 108, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeIpv4CidrSize": { + "type": "int32", + "id": 109, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "servicesIpv4Cidr": { + "type": "string", + "id": 110, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 111, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentNodeCount": { + "type": "int32", + "id": 112, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "string", + "id": 113, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 114, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enableTpu": { + "type": "bool", + "id": 115 + }, + "tpuIpv4CidrBlock": { + "type": "string", + "id": 116, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "conditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 118 + }, + "autopilot": { + "type": "Autopilot", + "id": 128 + }, + "id": { + "type": "string", + "id": 129, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodePoolDefaults": { + "type": "NodePoolDefaults", + "id": 131, + "options": { + "proto3_optional": true + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 132 + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 133 + }, + "nodePoolAutoConfig": { + "type": "NodePoolAutoConfig", + "id": 136 + }, + "etag": { + "type": "string", + "id": 139 + }, + "fleet": { + "type": "Fleet", + "id": 140 + }, + "securityPostureConfig": { + "type": "SecurityPostureConfig", + "id": 145 + }, + "controlPlaneEndpointsConfig": { + "type": "ControlPlaneEndpointsConfig", + "id": 146 + }, + "enableK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 143 + }, + "enterpriseConfig": { + "type": "EnterpriseConfig", + "id": 149 + }, + "secretManagerConfig": { + "type": "SecretManagerConfig", + "id": 150 + }, + "compliancePostureConfig": { + "type": "CompliancePostureConfig", + "id": 151 + }, + "satisfiesPzs": { + "type": "bool", + "id": 152, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 153, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "userManagedKeysConfig": { + "type": "UserManagedKeysConfig", + "id": 154, + "options": { + "proto3_optional": true + } + }, + "rbacBindingConfig": { + "type": "RBACBindingConfig", + "id": 156, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RECONCILING": 3, + "STOPPING": 4, + "ERROR": 5, + "DEGRADED": 6 + } + } + } + }, + "RBACBindingConfig": { + "oneofs": { + "_enableInsecureBindingSystemUnauthenticated": { + "oneof": [ + "enableInsecureBindingSystemUnauthenticated" + ] + }, + "_enableInsecureBindingSystemAuthenticated": { + "oneof": [ + "enableInsecureBindingSystemAuthenticated" + ] + } + }, + "fields": { + "enableInsecureBindingSystemUnauthenticated": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enableInsecureBindingSystemAuthenticated": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "UserManagedKeysConfig": { + "fields": { + "clusterCa": { + "type": "string", + "id": 10, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "etcdApiCa": { + "type": "string", + "id": 11, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "etcdPeerCa": { + "type": "string", + "id": 12, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "serviceAccountSigningKeys": { + "rule": "repeated", + "type": "string", + "id": 13, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "serviceAccountVerificationKeys": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "aggregationCa": { + "type": "string", + "id": 15, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "controlPlaneDiskEncryptionKey": { + "type": "string", + "id": 16, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "gkeopsEtcdBackupEncryptionKey": { + "type": "string", + "id": 17, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + } + }, + "CompliancePostureConfig": { + "oneofs": { + "_mode": { + "oneof": [ + "mode" + ] + } + }, + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "complianceStandards": { + "rule": "repeated", + "type": "ComplianceStandard", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + }, + "ComplianceStandard": { + "oneofs": { + "_standard": { + "oneof": [ + "standard" + ] + } + }, + "fields": { + "standard": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "K8sBetaAPIConfig": { + "fields": { + "enabledApis": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "SecurityPostureConfig": { + "oneofs": { + "_mode": { + "oneof": [ + "mode" + ] + }, + "_vulnerabilityMode": { + "oneof": [ + "vulnerabilityMode" + ] + } + }, + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "vulnerabilityMode": { + "type": "VulnerabilityMode", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "BASIC": 2, + "ENTERPRISE": 3 + } + }, + "VulnerabilityMode": { + "values": { + "VULNERABILITY_MODE_UNSPECIFIED": 0, + "VULNERABILITY_DISABLED": 1, + "VULNERABILITY_BASIC": 2, + "VULNERABILITY_ENTERPRISE": 3 + } + } + } + }, + "NodePoolAutoConfig": { + "fields": { + "networkTags": { + "type": "NetworkTags", + "id": 1 + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 2 + }, + "nodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 3 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NodePoolDefaults": { + "fields": { + "nodeConfigDefaults": { + "type": "NodeConfigDefaults", + "id": 1 + } + } + }, + "NodeConfigDefaults": { + "fields": { + "gcfsConfig": { + "type": "GcfsConfig", + "id": 1 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 3 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 4 + }, + "nodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 6 + } + } + }, + "ClusterUpdate": { + "oneofs": { + "_desiredEnablePrivateEndpoint": { + "oneof": [ + "desiredEnablePrivateEndpoint" + ] + }, + "_desiredDefaultEnablePrivateNodes": { + "oneof": [ + "desiredDefaultEnablePrivateNodes" + ] + }, + "_desiredEnableFqdnNetworkPolicy": { + "oneof": [ + "desiredEnableFqdnNetworkPolicy" + ] + }, + "_desiredEnableMultiNetworking": { + "oneof": [ + "desiredEnableMultiNetworking" + ] + }, + "_desiredInTransitEncryptionConfig": { + "oneof": [ + "desiredInTransitEncryptionConfig" + ] + }, + "_desiredEnableCiliumClusterwideNetworkPolicy": { + "oneof": [ + "desiredEnableCiliumClusterwideNetworkPolicy" + ] + }, + "_desiredSecretManagerConfig": { + "oneof": [ + "desiredSecretManagerConfig" + ] + }, + "_desiredCompliancePostureConfig": { + "oneof": [ + "desiredCompliancePostureConfig" + ] + }, + "_desiredRbacBindingConfig": { + "oneof": [ + "desiredRbacBindingConfig" + ] + } + }, + "fields": { + "desiredNodeVersion": { + "type": "string", + "id": 4 + }, + "desiredMonitoringService": { + "type": "string", + "id": 5 + }, + "desiredAddonsConfig": { + "type": "AddonsConfig", + "id": 6 + }, + "desiredNodePoolId": { + "type": "string", + "id": 7 + }, + "desiredImageType": { + "type": "string", + "id": 8 + }, + "desiredDatabaseEncryption": { + "type": "DatabaseEncryption", + "id": 46 + }, + "desiredWorkloadIdentityConfig": { + "type": "WorkloadIdentityConfig", + "id": 47 + }, + "desiredMeshCertificates": { + "type": "MeshCertificates", + "id": 67 + }, + "desiredShieldedNodes": { + "type": "ShieldedNodes", + "id": 48 + }, + "desiredCostManagementConfig": { + "type": "CostManagementConfig", + "id": 49 + }, + "desiredDnsConfig": { + "type": "DNSConfig", + "id": 53 + }, + "desiredNodePoolAutoscaling": { + "type": "NodePoolAutoscaling", + "id": 9 + }, + "desiredLocations": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "desiredMasterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 12, + "options": { + "deprecated": true + } + }, + "desiredClusterAutoscaling": { + "type": "ClusterAutoscaling", + "id": 15 + }, + "desiredBinaryAuthorization": { + "type": "BinaryAuthorization", + "id": 16 + }, + "desiredLoggingService": { + "type": "string", + "id": 19 + }, + "desiredResourceUsageExportConfig": { + "type": "ResourceUsageExportConfig", + "id": 21 + }, + "desiredVerticalPodAutoscaling": { + "type": "VerticalPodAutoscaling", + "id": 22 + }, + "desiredPrivateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 25, + "options": { + "deprecated": true + } + }, + "desiredIntraNodeVisibilityConfig": { + "type": "IntraNodeVisibilityConfig", + "id": 26 + }, + "desiredDefaultSnatStatus": { + "type": "DefaultSnatStatus", + "id": 28 + }, + "desiredReleaseChannel": { + "type": "ReleaseChannel", + "id": 31 + }, + "desiredL4ilbSubsettingConfig": { + "type": "ILBSubsettingConfig", + "id": 39 + }, + "desiredDatapathProvider": { + "type": "DatapathProvider", + "id": 50 + }, + "desiredPrivateIpv6GoogleAccess": { + "type": "PrivateIPv6GoogleAccess", + "id": 51 + }, + "desiredNotificationConfig": { + "type": "NotificationConfig", + "id": 55 + }, + "desiredAuthenticatorGroupsConfig": { + "type": "AuthenticatorGroupsConfig", + "id": 63 + }, + "desiredLoggingConfig": { + "type": "LoggingConfig", + "id": 64 + }, + "desiredMonitoringConfig": { + "type": "MonitoringConfig", + "id": 65 + }, + "desiredIdentityServiceConfig": { + "type": "IdentityServiceConfig", + "id": 66 + }, + "desiredServiceExternalIpsConfig": { + "type": "ServiceExternalIPsConfig", + "id": 60 + }, + "desiredEnablePrivateEndpoint": { + "type": "bool", + "id": 71, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "desiredDefaultEnablePrivateNodes": { + "type": "bool", + "id": 72, + "options": { + "proto3_optional": true + } + }, + "desiredControlPlaneEndpointsConfig": { + "type": "ControlPlaneEndpointsConfig", + "id": 73 + }, + "desiredMasterVersion": { + "type": "string", + "id": 100 + }, + "desiredGcfsConfig": { + "type": "GcfsConfig", + "id": 109 + }, + "desiredNodePoolAutoConfigNetworkTags": { + "type": "NetworkTags", + "id": 110 + }, + "desiredGatewayApiConfig": { + "type": "GatewayAPIConfig", + "id": 114 + }, + "etag": { + "type": "string", + "id": 115 + }, + "desiredNodePoolLoggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 116 + }, + "desiredFleet": { + "type": "Fleet", + "id": 117 + }, + "desiredStackType": { + "type": "StackType", + "id": 119 + }, + "additionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 120 + }, + "removedAdditionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 121 + }, + "enableK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 122 + }, + "desiredSecurityPostureConfig": { + "type": "SecurityPostureConfig", + "id": 124 + }, + "desiredNetworkPerformanceConfig": { + "type": "NetworkConfig.ClusterNetworkPerformanceConfig", + "id": 125 + }, + "desiredEnableFqdnNetworkPolicy": { + "type": "bool", + "id": 126, + "options": { + "proto3_optional": true + } + }, + "desiredAutopilotWorkloadPolicyConfig": { + "type": "WorkloadPolicyConfig", + "id": 128 + }, + "desiredK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 131 + }, + "desiredContainerdConfig": { + "type": "ContainerdConfig", + "id": 134 + }, + "desiredEnableMultiNetworking": { + "type": "bool", + "id": 135, + "options": { + "proto3_optional": true + } + }, + "desiredNodePoolAutoConfigResourceManagerTags": { + "type": "ResourceManagerTags", + "id": 136 + }, + "desiredInTransitEncryptionConfig": { + "type": "InTransitEncryptionConfig", + "id": 137, + "options": { + "proto3_optional": true + } + }, + "desiredEnableCiliumClusterwideNetworkPolicy": { + "type": "bool", + "id": 138, + "options": { + "proto3_optional": true + } + }, + "desiredSecretManagerConfig": { + "type": "SecretManagerConfig", + "id": 139, + "options": { + "proto3_optional": true + } + }, + "desiredCompliancePostureConfig": { + "type": "CompliancePostureConfig", + "id": 140, + "options": { + "proto3_optional": true + } + }, + "desiredNodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 141 + }, + "desiredNodePoolAutoConfigKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 142 + }, + "userManagedKeysConfig": { + "type": "UserManagedKeysConfig", + "id": 143 + }, + "desiredRbacBindingConfig": { + "type": "RBACBindingConfig", + "id": 144, + "options": { + "proto3_optional": true + } + }, + "desiredEnterpriseConfig": { + "type": "DesiredEnterpriseConfig", + "id": 147 + }, + "desiredNodePoolAutoConfigLinuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 150 + } + } + }, + "AdditionalPodRangesConfig": { + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "podRangeInfo": { + "rule": "repeated", + "type": "RangeInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RangeInfo": { + "fields": { + "rangeName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "utilization": { + "type": "double", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DesiredEnterpriseConfig": { + "fields": { + "desiredTier": { + "type": "EnterpriseConfig.ClusterTier", + "id": 1 + } + } + }, + "Operation": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "operationType": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detail": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "selfLink": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetLink": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "progress": { + "type": "OperationProgress", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clusterConditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 13, + "options": { + "deprecated": true + } + }, + "nodepoolConditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 14, + "options": { + "deprecated": true + } + }, + "error": { + "type": "google.rpc.Status", + "id": 15 + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "DONE": 3, + "ABORTING": 4 + } + }, + "Type": { + "valuesOptions": { + "AUTO_UPGRADE_NODES": { + "deprecated": true + }, + "SET_LABELS": { + "deprecated": true + }, + "SET_MASTER_AUTH": { + "deprecated": true + }, + "SET_NETWORK_POLICY": { + "deprecated": true + }, + "SET_MAINTENANCE_POLICY": { + "deprecated": true + } + }, + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE_CLUSTER": 1, + "DELETE_CLUSTER": 2, + "UPGRADE_MASTER": 3, + "UPGRADE_NODES": 4, + "REPAIR_CLUSTER": 5, + "UPDATE_CLUSTER": 6, + "CREATE_NODE_POOL": 7, + "DELETE_NODE_POOL": 8, + "SET_NODE_POOL_MANAGEMENT": 9, + "AUTO_REPAIR_NODES": 10, + "AUTO_UPGRADE_NODES": 11, + "SET_LABELS": 12, + "SET_MASTER_AUTH": 13, + "SET_NODE_POOL_SIZE": 14, + "SET_NETWORK_POLICY": 15, + "SET_MAINTENANCE_POLICY": 16, + "RESIZE_CLUSTER": 18, + "FLEET_FEATURE_UPGRADE": 19 + } + } + } + }, + "OperationProgress": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "status": { + "type": "Operation.Status", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "stages": { + "rule": "repeated", + "type": "OperationProgress", + "id": 4 + } + }, + "nested": { + "Metric": { + "oneofs": { + "value": { + "oneof": [ + "intValue", + "doubleValue", + "stringValue" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "intValue": { + "type": "int64", + "id": 2 + }, + "doubleValue": { + "type": "double", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + } + } + } + } + }, + "CreateClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "cluster": { + "type": "Cluster", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 5 + } + } + }, + "GetClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "UpdateClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "update": { + "type": "ClusterUpdate", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "UpdateNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "nodeVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "imageType": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 8 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "workloadMetadataConfig": { + "type": "WorkloadMetadataConfig", + "id": 14 + }, + "upgradeSettings": { + "type": "NodePool.UpgradeSettings", + "id": 15 + }, + "tags": { + "type": "NetworkTags", + "id": 16 + }, + "taints": { + "type": "NodeTaints", + "id": 17 + }, + "labels": { + "type": "NodeLabels", + "id": 18 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 19 + }, + "kubeletConfig": { + "type": "NodeKubeletConfig", + "id": 20 + }, + "nodeNetworkConfig": { + "type": "NodeNetworkConfig", + "id": 21 + }, + "gcfsConfig": { + "type": "GcfsConfig", + "id": 22 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 23 + }, + "gvnic": { + "type": "VirtualNIC", + "id": 29 + }, + "etag": { + "type": "string", + "id": 30 + }, + "fastSocket": { + "type": "FastSocket", + "id": 31 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 32 + }, + "resourceLabels": { + "type": "ResourceLabels", + "id": 33 + }, + "windowsNodeConfig": { + "type": "WindowsNodeConfig", + "id": 34 + }, + "accelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 35 + }, + "machineType": { + "type": "string", + "id": 36, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskType": { + "type": "string", + "id": 37, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskSizeGb": { + "type": "int64", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 39 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 40 + }, + "queuedProvisioning": { + "type": "NodePool.QueuedProvisioning", + "id": 42 + }, + "storagePools": { + "rule": "repeated", + "type": "string", + "id": 43 + } + } + }, + "SetNodePoolAutoscalingRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "autoscaling": { + "type": "NodePoolAutoscaling", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetLoggingServiceRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "loggingService": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "SetMonitoringServiceRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "monitoringService": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetAddonsConfigRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "addonsConfig": { + "type": "AddonsConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetLocationsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "UpdateMasterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "masterVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetMasterAuthRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "action": { + "type": "Action", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "update": { + "type": "MasterAuth", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + }, + "nested": { + "Action": { + "values": { + "UNKNOWN": 0, + "SET_PASSWORD": 1, + "GENERATE_PASSWORD": 2, + "SET_USERNAME": 3 + } + } + } + }, + "DeleteClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ListClustersRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "ListClustersResponse": { + "fields": { + "clusters": { + "rule": "repeated", + "type": "Cluster", + "id": 1 + }, + "missingZones": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "GetOperationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "operationId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "ListOperationsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "CancelOperationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "operationId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "missingZones": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "GetServerConfigRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ServerConfig": { + "fields": { + "defaultClusterVersion": { + "type": "string", + "id": 1 + }, + "validNodeVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "defaultImageType": { + "type": "string", + "id": 4 + }, + "validImageTypes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "validMasterVersions": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "channels": { + "rule": "repeated", + "type": "ReleaseChannelConfig", + "id": 9 + } + }, + "nested": { + "ReleaseChannelConfig": { + "fields": { + "channel": { + "type": "ReleaseChannel.Channel", + "id": 1 + }, + "defaultVersion": { + "type": "string", + "id": 2 + }, + "validVersions": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "upgradeTargetVersion": { + "type": "string", + "id": 5 + } + } + } + } + }, + "CreateNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePool": { + "type": "NodePool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 6 + } + } + }, + "DeleteNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "ListNodePoolsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "parent": { + "type": "string", + "id": 5 + } + } + }, + "GetNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "BlueGreenSettings": { + "oneofs": { + "rolloutPolicy": { + "oneof": [ + "standardRolloutPolicy" + ] + }, + "_nodePoolSoakDuration": { + "oneof": [ + "nodePoolSoakDuration" + ] + } + }, + "fields": { + "standardRolloutPolicy": { + "type": "StandardRolloutPolicy", + "id": 1 + }, + "nodePoolSoakDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "StandardRolloutPolicy": { + "oneofs": { + "updateBatchSize": { + "oneof": [ + "batchPercentage", + "batchNodeCount" + ] + }, + "_batchSoakDuration": { + "oneof": [ + "batchSoakDuration" + ] + } + }, + "fields": { + "batchPercentage": { + "type": "float", + "id": 1 + }, + "batchNodeCount": { + "type": "int32", + "id": 2 + }, + "batchSoakDuration": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "NodePool": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "NodeConfig", + "id": 2 + }, + "initialNodeCount": { + "type": "int32", + "id": 3 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "networkConfig": { + "type": "NodeNetworkConfig", + "id": 14 + }, + "selfLink": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "version": { + "type": "string", + "id": 101 + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 104, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoscaling": { + "type": "NodePoolAutoscaling", + "id": 4 + }, + "management": { + "type": "NodeManagement", + "id": 5 + }, + "maxPodsConstraint": { + "type": "MaxPodsConstraint", + "id": 6 + }, + "conditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 105 + }, + "podIpv4CidrSize": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "upgradeSettings": { + "type": "UpgradeSettings", + "id": 107 + }, + "placementPolicy": { + "type": "PlacementPolicy", + "id": 108 + }, + "updateInfo": { + "type": "UpdateInfo", + "id": 109, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 110 + }, + "queuedProvisioning": { + "type": "QueuedProvisioning", + "id": 112 + }, + "bestEffortProvisioning": { + "type": "BestEffortProvisioning", + "id": 113 + } + }, + "nested": { + "UpgradeSettings": { + "oneofs": { + "_strategy": { + "oneof": [ + "strategy" + ] + }, + "_blueGreenSettings": { + "oneof": [ + "blueGreenSettings" + ] + } + }, + "fields": { + "maxSurge": { + "type": "int32", + "id": 1 + }, + "maxUnavailable": { + "type": "int32", + "id": 2 + }, + "strategy": { + "type": "NodePoolUpdateStrategy", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "blueGreenSettings": { + "type": "BlueGreenSettings", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "UpdateInfo": { + "fields": { + "blueGreenInfo": { + "type": "BlueGreenInfo", + "id": 1 + } + }, + "nested": { + "BlueGreenInfo": { + "fields": { + "phase": { + "type": "Phase", + "id": 1 + }, + "blueInstanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "greenInstanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "bluePoolDeletionStartTime": { + "type": "string", + "id": 4 + }, + "greenPoolVersion": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Phase": { + "values": { + "PHASE_UNSPECIFIED": 0, + "UPDATE_STARTED": 1, + "CREATING_GREEN_POOL": 2, + "CORDONING_BLUE_POOL": 3, + "DRAINING_BLUE_POOL": 4, + "NODE_POOL_SOAKING": 5, + "DELETING_BLUE_POOL": 6, + "ROLLBACK_STARTED": 7 + } + } + } + } + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RUNNING_WITH_ERROR": 3, + "RECONCILING": 4, + "STOPPING": 5, + "ERROR": 6 + } + }, + "PlacementPolicy": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "tpuTopology": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "policyName": { + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "COMPACT": 1 + } + } + } + }, + "QueuedProvisioning": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + } + } + }, + "NodeManagement": { + "fields": { + "autoUpgrade": { + "type": "bool", + "id": 1 + }, + "autoRepair": { + "type": "bool", + "id": 2 + }, + "upgradeOptions": { + "type": "AutoUpgradeOptions", + "id": 10 + } + } + }, + "BestEffortProvisioning": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "minProvisionNodes": { + "type": "int32", + "id": 2 + } + } + }, + "AutoUpgradeOptions": { + "fields": { + "autoUpgradeStartTime": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "MaintenancePolicy": { + "fields": { + "window": { + "type": "MaintenanceWindow", + "id": 1 + }, + "resourceVersion": { + "type": "string", + "id": 3 + } + } + }, + "MaintenanceWindow": { + "oneofs": { + "policy": { + "oneof": [ + "dailyMaintenanceWindow", + "recurringWindow" + ] + } + }, + "fields": { + "dailyMaintenanceWindow": { + "type": "DailyMaintenanceWindow", + "id": 2 + }, + "recurringWindow": { + "type": "RecurringTimeWindow", + "id": 3 + }, + "maintenanceExclusions": { + "keyType": "string", + "type": "TimeWindow", + "id": 4 + } + } + }, + "TimeWindow": { + "oneofs": { + "options": { + "oneof": [ + "maintenanceExclusionOptions" + ] + } + }, + "fields": { + "maintenanceExclusionOptions": { + "type": "MaintenanceExclusionOptions", + "id": 3 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "MaintenanceExclusionOptions": { + "fields": { + "scope": { + "type": "Scope", + "id": 1 + } + }, + "nested": { + "Scope": { + "values": { + "NO_UPGRADES": 0, + "NO_MINOR_UPGRADES": 1, + "NO_MINOR_OR_NODE_UPGRADES": 2 + } + } + } + }, + "RecurringTimeWindow": { + "fields": { + "window": { + "type": "TimeWindow", + "id": 1 + }, + "recurrence": { + "type": "string", + "id": 2 + } + } + }, + "DailyMaintenanceWindow": { + "fields": { + "startTime": { + "type": "string", + "id": 2 + }, + "duration": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SetNodePoolManagementRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "management": { + "type": "NodeManagement", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetNodePoolSizeRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "nodeCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "CompleteNodePoolUpgradeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "RollbackNodePoolUpgradeRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 6 + }, + "respectPdb": { + "type": "bool", + "id": 7 + } + } + }, + "ListNodePoolsResponse": { + "fields": { + "nodePools": { + "rule": "repeated", + "type": "NodePool", + "id": 1 + } + } + }, + "ClusterAutoscaling": { + "fields": { + "enableNodeAutoprovisioning": { + "type": "bool", + "id": 1 + }, + "resourceLimits": { + "rule": "repeated", + "type": "ResourceLimit", + "id": 2 + }, + "autoscalingProfile": { + "type": "AutoscalingProfile", + "id": 3 + }, + "autoprovisioningNodePoolDefaults": { + "type": "AutoprovisioningNodePoolDefaults", + "id": 4 + }, + "autoprovisioningLocations": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "AutoscalingProfile": { + "values": { + "PROFILE_UNSPECIFIED": 0, + "OPTIMIZE_UTILIZATION": 1, + "BALANCED": 2 + } + } + } + }, + "AutoprovisioningNodePoolDefaults": { + "oneofs": { + "_insecureKubeletReadonlyPortEnabled": { + "oneof": [ + "insecureKubeletReadonlyPortEnabled" + ] + } + }, + "fields": { + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "serviceAccount": { + "type": "string", + "id": 2 + }, + "upgradeSettings": { + "type": "NodePool.UpgradeSettings", + "id": 3 + }, + "management": { + "type": "NodeManagement", + "id": 4 + }, + "minCpuPlatform": { + "type": "string", + "id": 5, + "options": { + "deprecated": true + } + }, + "diskSizeGb": { + "type": "int32", + "id": 6 + }, + "diskType": { + "type": "string", + "id": 7 + }, + "shieldedInstanceConfig": { + "type": "ShieldedInstanceConfig", + "id": 8 + }, + "bootDiskKmsKey": { + "type": "string", + "id": 9 + }, + "imageType": { + "type": "string", + "id": 10 + }, + "insecureKubeletReadonlyPortEnabled": { + "type": "bool", + "id": 13, + "options": { + "proto3_optional": true + } + } + } + }, + "ResourceLimit": { + "fields": { + "resourceType": { + "type": "string", + "id": 1 + }, + "minimum": { + "type": "int64", + "id": 2 + }, + "maximum": { + "type": "int64", + "id": 3 + } + } + }, + "NodePoolAutoscaling": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "minNodeCount": { + "type": "int32", + "id": 2 + }, + "maxNodeCount": { + "type": "int32", + "id": 3 + }, + "autoprovisioned": { + "type": "bool", + "id": 4 + }, + "locationPolicy": { + "type": "LocationPolicy", + "id": 5 + }, + "totalMinNodeCount": { + "type": "int32", + "id": 6 + }, + "totalMaxNodeCount": { + "type": "int32", + "id": 7 + } + }, + "nested": { + "LocationPolicy": { + "values": { + "LOCATION_POLICY_UNSPECIFIED": 0, + "BALANCED": 1, + "ANY": 2 + } + } + } + }, + "SetLabelsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "labelFingerprint": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetLegacyAbacRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "enabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "StartIPRotationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 6 + }, + "rotateCredentials": { + "type": "bool", + "id": 7 + } + } + }, + "CompleteIPRotationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_gpuSharingConfig": { + "oneof": [ + "gpuSharingConfig" + ] + }, + "_gpuDriverInstallationConfig": { + "oneof": [ + "gpuDriverInstallationConfig" + ] + } + }, + "fields": { + "acceleratorCount": { + "type": "int64", + "id": 1 + }, + "acceleratorType": { + "type": "string", + "id": 2 + }, + "gpuPartitionSize": { + "type": "string", + "id": 3 + }, + "gpuSharingConfig": { + "type": "GPUSharingConfig", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "gpuDriverInstallationConfig": { + "type": "GPUDriverInstallationConfig", + "id": 6, + "options": { + "proto3_optional": true + } + } + } + }, + "GPUSharingConfig": { + "oneofs": { + "_gpuSharingStrategy": { + "oneof": [ + "gpuSharingStrategy" + ] + } + }, + "fields": { + "maxSharedClientsPerGpu": { + "type": "int64", + "id": 1 + }, + "gpuSharingStrategy": { + "type": "GPUSharingStrategy", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "GPUSharingStrategy": { + "values": { + "GPU_SHARING_STRATEGY_UNSPECIFIED": 0, + "TIME_SHARING": 1, + "MPS": 2 + } + } + } + }, + "GPUDriverInstallationConfig": { + "oneofs": { + "_gpuDriverVersion": { + "oneof": [ + "gpuDriverVersion" + ] + } + }, + "fields": { + "gpuDriverVersion": { + "type": "GPUDriverVersion", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "GPUDriverVersion": { + "values": { + "GPU_DRIVER_VERSION_UNSPECIFIED": 0, + "INSTALLATION_DISABLED": 1, + "DEFAULT": 2, + "LATEST": 3 + } + } + } + }, + "WorkloadMetadataConfig": { + "fields": { + "mode": { + "type": "Mode", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "GCE_METADATA": 1, + "GKE_METADATA": 2 + } + } + } + }, + "SetNetworkPolicyRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + }, + "networkPolicy": { + "type": "NetworkPolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetMaintenancePolicyRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maintenancePolicy": { + "type": "MaintenancePolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "StatusCondition": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "deprecated": true + } + }, + "message": { + "type": "string", + "id": 2 + }, + "canonicalCode": { + "type": "google.rpc.Code", + "id": 3 + } + }, + "nested": { + "Code": { + "values": { + "UNKNOWN": 0, + "GCE_STOCKOUT": 1, + "GKE_SERVICE_ACCOUNT_DELETED": 2, + "GCE_QUOTA_EXCEEDED": 3, + "SET_BY_OPERATOR": 4, + "CLOUD_KMS_KEY_ERROR": 7, + "CA_EXPIRING": 9 + } + } + } + }, + "NetworkConfig": { + "oneofs": { + "_enableFqdnNetworkPolicy": { + "oneof": [ + "enableFqdnNetworkPolicy" + ] + }, + "_inTransitEncryptionConfig": { + "oneof": [ + "inTransitEncryptionConfig" + ] + }, + "_enableCiliumClusterwideNetworkPolicy": { + "oneof": [ + "enableCiliumClusterwideNetworkPolicy" + ] + }, + "_defaultEnablePrivateNodes": { + "oneof": [ + "defaultEnablePrivateNodes" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "subnetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enableIntraNodeVisibility": { + "type": "bool", + "id": 5 + }, + "defaultSnatStatus": { + "type": "DefaultSnatStatus", + "id": 7 + }, + "enableL4ilbSubsetting": { + "type": "bool", + "id": 10 + }, + "datapathProvider": { + "type": "DatapathProvider", + "id": 11 + }, + "privateIpv6GoogleAccess": { + "type": "PrivateIPv6GoogleAccess", + "id": 12 + }, + "dnsConfig": { + "type": "DNSConfig", + "id": 13 + }, + "serviceExternalIpsConfig": { + "type": "ServiceExternalIPsConfig", + "id": 15 + }, + "gatewayApiConfig": { + "type": "GatewayAPIConfig", + "id": 16 + }, + "enableMultiNetworking": { + "type": "bool", + "id": 17 + }, + "networkPerformanceConfig": { + "type": "ClusterNetworkPerformanceConfig", + "id": 18 + }, + "enableFqdnNetworkPolicy": { + "type": "bool", + "id": 19, + "options": { + "proto3_optional": true + } + }, + "inTransitEncryptionConfig": { + "type": "InTransitEncryptionConfig", + "id": 20, + "options": { + "proto3_optional": true + } + }, + "enableCiliumClusterwideNetworkPolicy": { + "type": "bool", + "id": 21, + "options": { + "proto3_optional": true + } + }, + "defaultEnablePrivateNodes": { + "type": "bool", + "id": 22, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "ClusterNetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "TIER_1": 1 + } + } + } + } + } + }, + "GatewayAPIConfig": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "valuesOptions": { + "CHANNEL_EXPERIMENTAL": { + "deprecated": true + } + }, + "values": { + "CHANNEL_UNSPECIFIED": 0, + "CHANNEL_DISABLED": 1, + "CHANNEL_EXPERIMENTAL": 3, + "CHANNEL_STANDARD": 4 + } + } + } + }, + "ServiceExternalIPsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GetOpenIDConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "GetOpenIDConfigResponse": { + "fields": { + "issuer": { + "type": "string", + "id": 1 + }, + "jwksUri": { + "type": "string", + "id": 2 + }, + "responseTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "subjectTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "idTokenSigningAlgValuesSupported": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "claimsSupported": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "grantTypes": { + "rule": "repeated", + "type": "string", + "id": 7 + } + } + }, + "GetJSONWebKeysRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "Jwk": { + "fields": { + "kty": { + "type": "string", + "id": 1 + }, + "alg": { + "type": "string", + "id": 2 + }, + "use": { + "type": "string", + "id": 3 + }, + "kid": { + "type": "string", + "id": 4 + }, + "n": { + "type": "string", + "id": 5 + }, + "e": { + "type": "string", + "id": 6 + }, + "x": { + "type": "string", + "id": 7 + }, + "y": { + "type": "string", + "id": 8 + }, + "crv": { + "type": "string", + "id": 9 + } + } + }, + "GetJSONWebKeysResponse": { + "fields": { + "keys": { + "rule": "repeated", + "type": "Jwk", + "id": 1 + } + } + }, + "CheckAutopilotCompatibilityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "AutopilotCompatibilityIssue": { + "fields": { + "lastObservation": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "constraintType": { + "type": "string", + "id": 2 + }, + "incompatibilityType": { + "type": "IssueType", + "id": 3 + }, + "subjects": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "documentationUrl": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + } + }, + "nested": { + "IssueType": { + "values": { + "UNSPECIFIED": 0, + "INCOMPATIBILITY": 1, + "ADDITIONAL_CONFIG_REQUIRED": 2, + "PASSED_WITH_OPTIONAL_CONFIG": 3 + } + } + } + }, + "CheckAutopilotCompatibilityResponse": { + "fields": { + "issues": { + "rule": "repeated", + "type": "AutopilotCompatibilityIssue", + "id": 1 + }, + "summary": { + "type": "string", + "id": 2 + } + } + }, + "ReleaseChannel": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "values": { + "UNSPECIFIED": 0, + "RAPID": 1, + "REGULAR": 2, + "STABLE": 3, + "EXTENDED": 4 + } + } + } + }, + "CostManagementConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "IntraNodeVisibilityConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ILBSubsettingConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "DNSConfig": { + "fields": { + "clusterDns": { + "type": "Provider", + "id": 1 + }, + "clusterDnsScope": { + "type": "DNSScope", + "id": 2 + }, + "clusterDnsDomain": { + "type": "string", + "id": 3 + }, + "additiveVpcScopeDnsDomain": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Provider": { + "values": { + "PROVIDER_UNSPECIFIED": 0, + "PLATFORM_DEFAULT": 1, + "CLOUD_DNS": 2, + "KUBE_DNS": 3 + } + }, + "DNSScope": { + "values": { + "DNS_SCOPE_UNSPECIFIED": 0, + "CLUSTER_SCOPE": 1, + "VPC_SCOPE": 2 + } + } + } + }, + "MaxPodsConstraint": { + "fields": { + "maxPodsPerNode": { + "type": "int64", + "id": 1 + } + } + }, + "WorkloadIdentityConfig": { + "fields": { + "workloadPool": { + "type": "string", + "id": 2 + } + } + }, + "IdentityServiceConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "MeshCertificates": { + "fields": { + "enableCertificates": { + "type": "google.protobuf.BoolValue", + "id": 1 + } + } + }, + "DatabaseEncryption": { + "oneofs": { + "_currentState": { + "oneof": [ + "currentState" + ] + } + }, + "fields": { + "keyName": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "currentState": { + "type": "CurrentState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "decryptionKeys": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastOperationErrors": { + "rule": "repeated", + "type": "OperationError", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "UNKNOWN": 0, + "ENCRYPTED": 1, + "DECRYPTED": 2 + } + }, + "CurrentState": { + "values": { + "CURRENT_STATE_UNSPECIFIED": 0, + "CURRENT_STATE_ENCRYPTED": 7, + "CURRENT_STATE_DECRYPTED": 2, + "CURRENT_STATE_ENCRYPTION_PENDING": 3, + "CURRENT_STATE_ENCRYPTION_ERROR": 4, + "CURRENT_STATE_DECRYPTION_PENDING": 5, + "CURRENT_STATE_DECRYPTION_ERROR": 6 + } + }, + "OperationError": { + "fields": { + "keyName": { + "type": "string", + "id": 1 + }, + "errorMessage": { + "type": "string", + "id": 2 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + } + } + }, + "ListUsableSubnetworksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListUsableSubnetworksResponse": { + "fields": { + "subnetworks": { + "rule": "repeated", + "type": "UsableSubnetwork", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UsableSubnetworkSecondaryRange": { + "fields": { + "rangeName": { + "type": "string", + "id": 1 + }, + "ipCidrRange": { + "type": "string", + "id": 2 + }, + "status": { + "type": "Status", + "id": 3 + } + }, + "nested": { + "Status": { + "values": { + "UNKNOWN": 0, + "UNUSED": 1, + "IN_USE_SERVICE": 2, + "IN_USE_SHAREABLE_POD": 3, + "IN_USE_MANAGED_POD": 4 + } + } + } + }, + "UsableSubnetwork": { + "fields": { + "subnetwork": { + "type": "string", + "id": 1 + }, + "network": { + "type": "string", + "id": 2 + }, + "ipCidrRange": { + "type": "string", + "id": 3 + }, + "secondaryIpRanges": { + "rule": "repeated", + "type": "UsableSubnetworkSecondaryRange", + "id": 4 + }, + "statusMessage": { + "type": "string", + "id": 5 + } + } + }, + "ResourceUsageExportConfig": { + "fields": { + "bigqueryDestination": { + "type": "BigQueryDestination", + "id": 1 + }, + "enableNetworkEgressMetering": { + "type": "bool", + "id": 2 + }, + "consumptionMeteringConfig": { + "type": "ConsumptionMeteringConfig", + "id": 3 + } + }, + "nested": { + "BigQueryDestination": { + "fields": { + "datasetId": { + "type": "string", + "id": 1 + } + } + }, + "ConsumptionMeteringConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + } + } + }, + "VerticalPodAutoscaling": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "DefaultSnatStatus": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "ShieldedNodes": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "VirtualNIC": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "FastSocket": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "PrivateIPv6GoogleAccess": { + "values": { + "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": 1, + "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": 2, + "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": 3 + } + }, + "NotificationConfig": { + "fields": { + "pubsub": { + "type": "PubSub", + "id": 1 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "UPGRADE_AVAILABLE_EVENT": 1, + "UPGRADE_EVENT": 2, + "SECURITY_BULLETIN_EVENT": 3 + } + }, + "PubSub": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "topic": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" + } + }, + "filter": { + "type": "Filter", + "id": 3 + } + } + }, + "Filter": { + "fields": { + "eventType": { + "rule": "repeated", + "type": "EventType", + "id": 1 + } + } + } + } + }, + "ConfidentialNodes": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "UpgradeResourceType": { + "values": { + "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": 0, + "MASTER": 1, + "NODE_POOL": 2 + } + }, + "UpgradeEvent": { + "fields": { + "resourceType": { + "type": "UpgradeResourceType", + "id": 1 + }, + "operation": { + "type": "string", + "id": 2 + }, + "operationStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "currentVersion": { + "type": "string", + "id": 4 + }, + "targetVersion": { + "type": "string", + "id": 5 + }, + "resource": { + "type": "string", + "id": 6 + } + } + }, + "UpgradeInfoEvent": { + "fields": { + "resourceType": { + "type": "UpgradeResourceType", + "id": 1 + }, + "operation": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "currentVersion": { + "type": "string", + "id": 5 + }, + "targetVersion": { + "type": "string", + "id": 6 + }, + "resource": { + "type": "string", + "id": 7 + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 11 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "CANCELED": 6 + } + } + } + }, + "UpgradeAvailableEvent": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "resourceType": { + "type": "UpgradeResourceType", + "id": 2 + }, + "releaseChannel": { + "type": "ReleaseChannel", + "id": 3 + }, + "resource": { + "type": "string", + "id": 4 + } + } + }, + "SecurityBulletinEvent": { + "fields": { + "resourceTypeAffected": { + "type": "string", + "id": 1 + }, + "bulletinId": { + "type": "string", + "id": 2 + }, + "cveIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "severity": { + "type": "string", + "id": 4 + }, + "bulletinUri": { + "type": "string", + "id": 5 + }, + "briefDescription": { + "type": "string", + "id": 6 + }, + "affectedSupportedMinors": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "patchedVersions": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "suggestedUpgradeTarget": { + "type": "string", + "id": 9 + }, + "manualStepsRequired": { + "type": "bool", + "id": 10 + } + } + }, + "Autopilot": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "workloadPolicyConfig": { + "type": "WorkloadPolicyConfig", + "id": 2 + } + } + }, + "WorkloadPolicyConfig": { + "oneofs": { + "_allowNetAdmin": { + "oneof": [ + "allowNetAdmin" + ] + } + }, + "fields": { + "allowNetAdmin": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "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, + "APISERVER": 3, + "SCHEDULER": 4, + "CONTROLLER_MANAGER": 5, + "KCP_SSHD": 7, + "KCP_CONNECTION": 8 + } + } + } + }, + "RayClusterLoggingConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "MonitoringConfig": { + "fields": { + "componentConfig": { + "type": "MonitoringComponentConfig", + "id": 1 + }, + "managedPrometheusConfig": { + "type": "ManagedPrometheusConfig", + "id": 2 + }, + "advancedDatapathObservabilityConfig": { + "type": "AdvancedDatapathObservabilityConfig", + "id": 3 + } + } + }, + "AdvancedDatapathObservabilityConfig": { + "oneofs": { + "_enableRelay": { + "oneof": [ + "enableRelay" + ] + } + }, + "fields": { + "enableMetrics": { + "type": "bool", + "id": 1 + }, + "relayMode": { + "type": "RelayMode", + "id": 2 + }, + "enableRelay": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RelayMode": { + "values": { + "RELAY_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "INTERNAL_VPC_LB": 3, + "EXTERNAL_LB": 4 + } + } + } + }, + "RayClusterMonitoringConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "NodePoolLoggingConfig": { + "fields": { + "variantConfig": { + "type": "LoggingVariantConfig", + "id": 1 + } + } + }, + "LoggingVariantConfig": { + "fields": { + "variant": { + "type": "Variant", + "id": 1 + } + }, + "nested": { + "Variant": { + "values": { + "VARIANT_UNSPECIFIED": 0, + "DEFAULT": 1, + "MAX_THROUGHPUT": 2 + } + } + } + }, + "MonitoringComponentConfig": { + "fields": { + "enableComponents": { + "rule": "repeated", + "type": "Component", + "id": 1 + } + }, + "nested": { + "Component": { + "values": { + "COMPONENT_UNSPECIFIED": 0, + "SYSTEM_COMPONENTS": 1, + "APISERVER": 3, + "SCHEDULER": 4, + "CONTROLLER_MANAGER": 5, + "STORAGE": 7, + "HPA": 8, + "POD": 9, + "DAEMONSET": 10, + "DEPLOYMENT": 11, + "STATEFULSET": 12, + "CADVISOR": 13, + "KUBELET": 14, + "DCGM": 15 + } + } + } + }, + "DatapathProvider": { + "values": { + "DATAPATH_PROVIDER_UNSPECIFIED": 0, + "LEGACY_DATAPATH": 1, + "ADVANCED_DATAPATH": 2 + } + }, + "NodePoolUpdateStrategy": { + "values": { + "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": 0, + "BLUE_GREEN": 2, + "SURGE": 3 + } + }, + "ManagedPrometheusConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "Fleet": { + "fields": { + "project": { + "type": "string", + "id": 1 + }, + "membership": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "preRegistered": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4": 1, + "IPV4_IPV6": 2 + } + }, + "ControlPlaneEndpointsConfig": { + "fields": { + "dnsEndpointConfig": { + "type": "DNSEndpointConfig", + "id": 1 + }, + "ipEndpointsConfig": { + "type": "IPEndpointsConfig", + "id": 3 + } + }, + "nested": { + "DNSEndpointConfig": { + "oneofs": { + "_allowExternalTraffic": { + "oneof": [ + "allowExternalTraffic" + ] + } + }, + "fields": { + "endpoint": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "allowExternalTraffic": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "IPEndpointsConfig": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + }, + "_enablePublicEndpoint": { + "oneof": [ + "enablePublicEndpoint" + ] + }, + "_globalAccess": { + "oneof": [ + "globalAccess" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enablePublicEndpoint": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "globalAccess": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "authorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 4 + }, + "publicEndpoint": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "privateEndpoint": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "privateEndpointSubnetwork": { + "type": "string", + "id": 7 + } + } + } + } + }, + "IPv6AccessType": { + "values": { + "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "LocalNvmeSsdBlockConfig": { + "fields": { + "localSsdCount": { + "type": "int32", + "id": 1 + } + } + }, + "EphemeralStorageLocalSsdConfig": { + "fields": { + "localSsdCount": { + "type": "int32", + "id": 1 + } + } + }, + "ResourceManagerTags": { + "fields": { + "tags": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EnterpriseConfig": { + "fields": { + "clusterTier": { + "type": "ClusterTier", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "desiredTier": { + "type": "ClusterTier", + "id": 2 + } + }, + "nested": { + "ClusterTier": { + "values": { + "CLUSTER_TIER_UNSPECIFIED": 0, + "STANDARD": 1, + "ENTERPRISE": 2 + } + } + } + }, + "SecretManagerConfig": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "SecondaryBootDisk": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + }, + "diskImage": { + "type": "string", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "CONTAINER_IMAGE_CACHE": 1 + } + } + } + }, + "InTransitEncryptionConfig": { + "values": { + "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": 0, + "IN_TRANSIT_ENCRYPTION_DISABLED": 1, + "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": 2 + } + }, + "SecondaryBootDiskUpdateStrategy": { + "fields": {} + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC", + "cc_enable_arenas": true + }, + "nested": { + "Code": { + "values": { + "OK": 0, + "CANCELLED": 1, + "UNKNOWN": 2, + "INVALID_ARGUMENT": 3, + "DEADLINE_EXCEEDED": 4, + "NOT_FOUND": 5, + "ALREADY_EXISTS": 6, + "PERMISSION_DENIED": 7, + "UNAUTHENTICATED": 16, + "RESOURCE_EXHAUSTED": 8, + "FAILED_PRECONDITION": 9, + "ABORTED": 10, + "OUT_OF_RANGE": 11, + "UNIMPLEMENTED": 12, + "INTERNAL": 13, + "UNAVAILABLE": 14, + "DATA_LOSS": 15 + } + }, + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js new file mode 100644 index 00000000000..436d9310438 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_CancelOperation_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. + */ + /** + * The name (project, location, operation id) of the operation to cancel. + * Specified in the format `projects/* /locations/* /operations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCancelOperation() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.cancelOperation(request); + console.log(response); + } + + callCancelOperation(); + // [END container_v1_generated_ClusterManager_CancelOperation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js new file mode 100644 index 00000000000..b6d786247a8 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_CheckAutopilotCompatibility_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. + */ + /** + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCheckAutopilotCompatibility() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.checkAutopilotCompatibility(request); + console.log(response); + } + + callCheckAutopilotCompatibility(); + // [END container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js new file mode 100644 index 00000000000..1f17528b893 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_CompleteIPRotation_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. + */ + /** + * The name (project, location, cluster name) of the cluster to complete IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCompleteIPRotation() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.completeIPRotation(request); + console.log(response); + } + + callCompleteIPRotation(); + // [END container_v1_generated_ClusterManager_CompleteIPRotation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js new file mode 100644 index 00000000000..27f869557dd --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * complete upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCompleteNodePoolUpgrade() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.completeNodePoolUpgrade(request); + console.log(response); + } + + callCompleteNodePoolUpgrade(); + // [END container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js new file mode 100644 index 00000000000..53903512545 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(cluster) { + // [START container_v1_generated_ClusterManager_CreateCluster_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. A cluster + * resource (https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) + */ + // const cluster = {} + /** + * The parent (project and location) where the cluster will be created. + * Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCreateCluster() { + // Construct request + const request = { + cluster, + }; + + // Run request + const response = await containerClient.createCluster(request); + console.log(response); + } + + callCreateCluster(); + // [END container_v1_generated_ClusterManager_CreateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js new file mode 100644 index 00000000000..5beae0c3c32 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(nodePool) { + // [START container_v1_generated_ClusterManager_CreateNodePool_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 node pool to create. + */ + // const nodePool = {} + /** + * The parent (project, location, cluster name) where the node pool will be + * created. Specified in the format + * `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCreateNodePool() { + // Construct request + const request = { + nodePool, + }; + + // Run request + const response = await containerClient.createNodePool(request); + console.log(response); + } + + callCreateNodePool(); + // [END container_v1_generated_ClusterManager_CreateNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js new file mode 100644 index 00000000000..070c083a2b8 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_DeleteCluster_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. + */ + /** + * The name (project, location, cluster) of the cluster to delete. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callDeleteCluster() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.deleteCluster(request); + console.log(response); + } + + callDeleteCluster(); + // [END container_v1_generated_ClusterManager_DeleteCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js new file mode 100644 index 00000000000..5e683fc4fac --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_DeleteNodePool_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * delete. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callDeleteNodePool() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.deleteNodePool(request); + console.log(response); + } + + callDeleteNodePool(); + // [END container_v1_generated_ClusterManager_DeleteNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js new file mode 100644 index 00000000000..52830f015f9 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_GetCluster_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. + */ + /** + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetCluster() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getCluster(request); + console.log(response); + } + + callGetCluster(); + // [END container_v1_generated_ClusterManager_GetCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js new file mode 100644 index 00000000000..0b960261b88 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_GetJSONWebKeys_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. + */ + /** + * The cluster (project, location, cluster name) to get keys for. Specified in + * the format `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetJSONWebKeys() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getJSONWebKeys(request); + console.log(response); + } + + callGetJSONWebKeys(); + // [END container_v1_generated_ClusterManager_GetJSONWebKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js new file mode 100644 index 00000000000..09b9a51ef52 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_GetNodePool_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * get. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetNodePool() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getNodePool(request); + console.log(response); + } + + callGetNodePool(); + // [END container_v1_generated_ClusterManager_GetNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js new file mode 100644 index 00000000000..7a949f35e18 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_GetOperation_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. + */ + /** + * The name (project, location, operation id) of the operation to get. + * Specified in the format `projects/* /locations/* /operations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetOperation() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getOperation(request); + console.log(response); + } + + callGetOperation(); + // [END container_v1_generated_ClusterManager_GetOperation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js new file mode 100644 index 00000000000..a30f036dd59 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_GetServerConfig_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. + */ + /** + * The name (project and location) of the server config to get, + * specified in the format `projects/* /locations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetServerConfig() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getServerConfig(request); + console.log(response); + } + + callGetServerConfig(); + // [END container_v1_generated_ClusterManager_GetServerConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js new file mode 100644 index 00000000000..88f813780a8 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_ListClusters_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. + */ + /** + * The parent (project and location) where the clusters will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListClusters() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.listClusters(request); + console.log(response); + } + + callListClusters(); + // [END container_v1_generated_ClusterManager_ListClusters_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js new file mode 100644 index 00000000000..df166d52370 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_ListNodePools_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. + */ + /** + * The parent (project, location, cluster name) where the node pools will be + * listed. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListNodePools() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.listNodePools(request); + console.log(response); + } + + callListNodePools(); + // [END container_v1_generated_ClusterManager_ListNodePools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js new file mode 100644 index 00000000000..8cb23250609 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_ListOperations_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. + */ + /** + * The parent (project and location) where the operations will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListOperations() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.listOperations(request); + console.log(response); + } + + callListOperations(); + // [END container_v1_generated_ClusterManager_ListOperations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js new file mode 100644 index 00000000000..459e08ffb2a --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js @@ -0,0 +1,82 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_ListUsableSubnetworks_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. + */ + /** + * The parent project where subnetworks are usable. + * Specified in the format `projects/*`. + */ + // const parent = 'abc123' + /** + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + */ + // const filter = 'abc123' + /** + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + // const pageSize = 1234 + /** + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + */ + // const pageToken = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListUsableSubnetworks() { + // Construct request + const request = { + }; + + // Run request + const iterable = containerClient.listUsableSubnetworksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUsableSubnetworks(); + // [END container_v1_generated_ClusterManager_ListUsableSubnetworks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js new file mode 100644 index 00000000000..cab5eb8bb05 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node poll to + * rollback upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + /** + * Option for rollback to ignore the PodDisruptionBudget. + * Default value is false. + */ + // const respectPdb = true + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callRollbackNodePoolUpgrade() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.rollbackNodePoolUpgrade(request); + console.log(response); + } + + callRollbackNodePoolUpgrade(); + // [END container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js new file mode 100644 index 00000000000..0a56b5477ef --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(addonsConfig) { + // [START container_v1_generated_ClusterManager_SetAddonsConfig_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 desired configurations for the various addons available to + * run in the cluster. + */ + // const addonsConfig = {} + /** + * The name (project, location, cluster) of the cluster to set addons. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetAddonsConfig() { + // Construct request + const request = { + addonsConfig, + }; + + // Run request + const response = await containerClient.setAddonsConfig(request); + console.log(response); + } + + callSetAddonsConfig(); + // [END container_v1_generated_ClusterManager_SetAddonsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js new file mode 100644 index 00000000000..f4bcccaf538 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(resourceLabels, labelFingerprint) { + // [START container_v1_generated_ClusterManager_SetLabels_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 labels to set for that cluster. + */ + // const resourceLabels = [1,2,3,4] + /** + * Required. The fingerprint of the previous set of labels for this resource, + * used to detect conflicts. The fingerprint is initially generated by + * Kubernetes Engine and changes after every request to modify or update + * labels. You must always provide an up-to-date fingerprint hash when + * updating or changing labels. Make a `get()` request to the + * resource to get the latest fingerprint. + */ + // const labelFingerprint = 'abc123' + /** + * The name (project, location, cluster name) of the cluster to set labels. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLabels() { + // Construct request + const request = { + resourceLabels, + labelFingerprint, + }; + + // Run request + const response = await containerClient.setLabels(request); + console.log(response); + } + + callSetLabels(); + // [END container_v1_generated_ClusterManager_SetLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js new file mode 100644 index 00000000000..9ee434d645b --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(enabled) { + // [START container_v1_generated_ClusterManager_SetLegacyAbac_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. Whether ABAC authorization will be enabled in the cluster. + */ + // const enabled = true + /** + * The name (project, location, cluster name) of the cluster to set legacy + * abac. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLegacyAbac() { + // Construct request + const request = { + enabled, + }; + + // Run request + const response = await containerClient.setLegacyAbac(request); + console.log(response); + } + + callSetLegacyAbac(); + // [END container_v1_generated_ClusterManager_SetLegacyAbac_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js new file mode 100644 index 00000000000..1028dcfb16b --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(locations) { + // [START container_v1_generated_ClusterManager_SetLocations_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 desired list of Google Compute Engine + * zones (https://cloud.google.com/compute/docs/zones#available) in which the + * cluster's nodes should be located. Changing the locations a cluster is in + * will result in nodes being either created or removed from the cluster, + * depending on whether locations are being added or removed. + * This list must always include the cluster's primary zone. + */ + // const locations = ['abc','def'] + /** + * The name (project, location, cluster) of the cluster to set locations. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLocations() { + // Construct request + const request = { + locations, + }; + + // Run request + const response = await containerClient.setLocations(request); + console.log(response); + } + + callSetLocations(); + // [END container_v1_generated_ClusterManager_SetLocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js new file mode 100644 index 00000000000..537c9f07334 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(loggingService) { + // [START container_v1_generated_ClusterManager_SetLoggingService_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 logging service the cluster should use to write logs. + * Currently available options: + * * `logging.googleapis.com/kubernetes` - The Cloud Logging + * service with a Kubernetes-native resource model + * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + * available as of GKE 1.15). + * * `none` - no logs will be exported from the cluster. + * If left as an empty string,`logging.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + */ + // const loggingService = 'abc123' + /** + * The name (project, location, cluster) of the cluster to set logging. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLoggingService() { + // Construct request + const request = { + loggingService, + }; + + // Run request + const response = await containerClient.setLoggingService(request); + console.log(response); + } + + callSetLoggingService(); + // [END container_v1_generated_ClusterManager_SetLoggingService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js new file mode 100644 index 00000000000..6e51209ae4c --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, maintenancePolicy) { + // [START container_v1_generated_ClusterManager_SetMaintenancePolicy_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 Google Developers Console project ID or project + * number (https://cloud.google.com/resource-manager/docs/creating-managing-projects). + */ + // const projectId = 'abc123' + /** + * Required. The name of the Google Compute Engine + * zone (https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. + */ + // const zone = 'abc123' + /** + * Required. The name of the cluster to update. + */ + // const clusterId = 'abc123' + /** + * Required. The maintenance policy to be set for the cluster. An empty field + * clears the existing maintenance policy. + */ + // const maintenancePolicy = {} + /** + * The name (project, location, cluster name) of the cluster to set + * maintenance policy. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMaintenancePolicy() { + // Construct request + const request = { + projectId, + zone, + clusterId, + maintenancePolicy, + }; + + // Run request + const response = await containerClient.setMaintenancePolicy(request); + console.log(response); + } + + callSetMaintenancePolicy(); + // [END container_v1_generated_ClusterManager_SetMaintenancePolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js new file mode 100644 index 00000000000..fa2074336b4 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(action, update) { + // [START container_v1_generated_ClusterManager_SetMasterAuth_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 exact form of action to be taken on the master auth. + */ + // const action = {} + /** + * Required. A description of the update. + */ + // const update = {} + /** + * The name (project, location, cluster) of the cluster to set auth. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMasterAuth() { + // Construct request + const request = { + action, + update, + }; + + // Run request + const response = await containerClient.setMasterAuth(request); + console.log(response); + } + + callSetMasterAuth(); + // [END container_v1_generated_ClusterManager_SetMasterAuth_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js new file mode 100644 index 00000000000..4a09b3607a3 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(monitoringService) { + // [START container_v1_generated_ClusterManager_SetMonitoringService_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 monitoring service the cluster should use to write metrics. + * Currently available options: + * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + * service with a Kubernetes-native resource model + * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + * longer available as of GKE 1.15). + * * `none` - No metrics will be exported from the cluster. + * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + */ + // const monitoringService = 'abc123' + /** + * The name (project, location, cluster) of the cluster to set monitoring. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMonitoringService() { + // Construct request + const request = { + monitoringService, + }; + + // Run request + const response = await containerClient.setMonitoringService(request); + console.log(response); + } + + callSetMonitoringService(); + // [END container_v1_generated_ClusterManager_SetMonitoringService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js new file mode 100644 index 00000000000..1e7cf4d7728 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(networkPolicy) { + // [START container_v1_generated_ClusterManager_SetNetworkPolicy_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. Configuration options for the NetworkPolicy feature. + */ + // const networkPolicy = {} + /** + * The name (project, location, cluster name) of the cluster to set networking + * policy. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNetworkPolicy() { + // Construct request + const request = { + networkPolicy, + }; + + // Run request + const response = await containerClient.setNetworkPolicy(request); + console.log(response); + } + + callSetNetworkPolicy(); + // [END container_v1_generated_ClusterManager_SetNetworkPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js new file mode 100644 index 00000000000..6fc084c3122 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(autoscaling) { + // [START container_v1_generated_ClusterManager_SetNodePoolAutoscaling_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. Autoscaling configuration for the node pool. + */ + // const autoscaling = {} + /** + * The name (project, location, cluster, node pool) of the node pool to set + * autoscaler settings. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolAutoscaling() { + // Construct request + const request = { + autoscaling, + }; + + // Run request + const response = await containerClient.setNodePoolAutoscaling(request); + console.log(response); + } + + callSetNodePoolAutoscaling(); + // [END container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js new file mode 100644 index 00000000000..a476987baf4 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(management) { + // [START container_v1_generated_ClusterManager_SetNodePoolManagement_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. NodeManagement configuration for the node pool. + */ + // const management = {} + /** + * The name (project, location, cluster, node pool id) of the node pool to set + * management properties. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolManagement() { + // Construct request + const request = { + management, + }; + + // Run request + const response = await containerClient.setNodePoolManagement(request); + console.log(response); + } + + callSetNodePoolManagement(); + // [END container_v1_generated_ClusterManager_SetNodePoolManagement_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js new file mode 100644 index 00000000000..5506f38d9a8 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(nodeCount) { + // [START container_v1_generated_ClusterManager_SetNodePoolSize_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 desired node count for the pool. + */ + // const nodeCount = 1234 + /** + * The name (project, location, cluster, node pool id) of the node pool to set + * size. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolSize() { + // Construct request + const request = { + nodeCount, + }; + + // Run request + const response = await containerClient.setNodePoolSize(request); + console.log(response); + } + + callSetNodePoolSize(); + // [END container_v1_generated_ClusterManager_SetNodePoolSize_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js new file mode 100644 index 00000000000..03e439c8167 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1_generated_ClusterManager_StartIPRotation_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. + */ + /** + * The name (project, location, cluster name) of the cluster to start IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + /** + * Whether to rotate credentials during IP rotation. + */ + // const rotateCredentials = true + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callStartIPRotation() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.startIPRotation(request); + console.log(response); + } + + callStartIPRotation(); + // [END container_v1_generated_ClusterManager_StartIPRotation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js new file mode 100644 index 00000000000..5aca91359b4 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(update) { + // [START container_v1_generated_ClusterManager_UpdateCluster_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. A description of the update. + */ + // const update = {} + /** + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateCluster() { + // Construct request + const request = { + update, + }; + + // Run request + const response = await containerClient.updateCluster(request); + console.log(response); + } + + callUpdateCluster(); + // [END container_v1_generated_ClusterManager_UpdateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js new file mode 100644 index 00000000000..223587e64a2 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(masterVersion) { + // [START container_v1_generated_ClusterManager_UpdateMaster_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 Kubernetes version to change the master to. + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the default Kubernetes version + */ + // const masterVersion = 'abc123' + /** + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateMaster() { + // Construct request + const request = { + masterVersion, + }; + + // Run request + const response = await containerClient.updateMaster(request); + console.log(response); + } + + callUpdateMaster(); + // [END container_v1_generated_ClusterManager_UpdateMaster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js new file mode 100644 index 00000000000..482516b2a33 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js @@ -0,0 +1,212 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(nodeVersion, imageType) { + // [START container_v1_generated_ClusterManager_UpdateNodePool_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 Kubernetes version to change the nodes to (typically an + * upgrade). + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the Kubernetes master version + */ + // const nodeVersion = 'abc123' + /** + * Required. The desired image type for the node pool. Please see + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + * available image types. + */ + // const imageType = 'abc123' + /** + * The name (project, location, cluster, node pool) of the node pool to + * update. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + /** + * The desired list of Google Compute Engine + * zones (https://cloud.google.com/compute/docs/zones#available) in which the + * node pool's nodes should be located. Changing the locations for a node pool + * will result in nodes being either created or removed from the node pool, + * depending on whether locations are being added or removed. + */ + // const locations = ['abc','def'] + /** + * The desired workload metadata config for the node pool. + */ + // const workloadMetadataConfig = {} + /** + * Upgrade settings control disruption and speed of the upgrade. + */ + // const upgradeSettings = {} + /** + * The desired network tags to be applied to all nodes in the node pool. + * If this field is not present, the tags will not be changed. Otherwise, + * the existing network tags will be *replaced* with the provided tags. + */ + // const tags = {} + /** + * The desired node taints to be applied to all nodes in the node pool. + * If this field is not present, the taints will not be changed. Otherwise, + * the existing node taints will be *replaced* with the provided taints. + */ + // const taints = {} + /** + * The desired node labels to be applied to all nodes in the node pool. + * If this field is not present, the labels will not be changed. Otherwise, + * the existing node labels will be *replaced* with the provided labels. + */ + // const labels = {} + /** + * Parameters that can be configured on Linux nodes. + */ + // const linuxNodeConfig = {} + /** + * Node kubelet configs. + */ + // const kubeletConfig = {} + /** + * Node network config. + */ + // const nodeNetworkConfig = {} + /** + * GCFS config. + */ + // const gcfsConfig = {} + /** + * Confidential nodes config. + * All the nodes in the node pool will be Confidential VM once enabled. + */ + // const confidentialNodes = {} + /** + * Enable or disable gvnic on the node pool. + */ + // const gvnic = {} + /** + * The current etag of the node pool. + * If an etag is provided and does not match the current etag of the node + * pool, update will be blocked and an ABORTED error will be returned. + */ + // const etag = 'abc123' + /** + * Enable or disable NCCL fast socket for the node pool. + */ + // const fastSocket = {} + /** + * Logging configuration. + */ + // const loggingConfig = {} + /** + * The resource labels for the node pool to use to annotate any related + * Google Compute Engine resources. + */ + // const resourceLabels = {} + /** + * Parameters that can be configured on Windows nodes. + */ + // const windowsNodeConfig = {} + /** + * A list of hardware accelerators to be attached to each node. + * See https://cloud.google.com/compute/docs/gpus for more information about + * support for GPUs. + */ + // const accelerators = [1,2,3,4] + /** + * Optional. The desired Google Compute Engine machine + * type (https://cloud.google.com/compute/docs/machine-types) for nodes in the + * node pool. Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified machine type. + */ + // const machineType = 'abc123' + /** + * Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or + * 'pd-balanced') for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk type. + */ + // const diskType = 'abc123' + /** + * Optional. The desired disk size for nodes in the node pool specified in GB. + * The smallest allowed disk size is 10GB. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk size. + */ + // const diskSizeGb = 1234 + /** + * Desired resource manager tag keys and values to be attached to the nodes + * for managing Compute Engine firewalls using Network Firewall Policies. + * Existing tags will be replaced with new values. + */ + // const resourceManagerTags = {} + /** + * The desired containerd config for nodes in the node pool. + * Initiates an upgrade operation that recreates the nodes with the new + * config. + */ + // const containerdConfig = {} + /** + * Specifies the configuration of queued provisioning. + */ + // const queuedProvisioning = {} + /** + * List of Storage Pools where boot disks are provisioned. + * Existing Storage Pools will be replaced with storage-pools. + */ + // const storagePools = ['abc','def'] + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateNodePool() { + // Construct request + const request = { + nodeVersion, + imageType, + }; + + // Run request + const response = await containerClient.updateNodePool(request); + console.log(response); + } + + callUpdateNodePool(); + // [END container_v1_generated_ClusterManager_UpdateNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json b/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json new file mode 100644 index 00000000000..f4bec21d271 --- /dev/null +++ b/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -0,0 +1,1947 @@ +{ + "clientLibrary": { + "name": "nodejs-container", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.container.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "container_v1_generated_ClusterManager_ListClusters_async", + "title": "ClusterManager listClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all clusters owned by a project in either the specified zone or all zones.", + "canonical": true, + "file": "cluster_manager.list_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListClusters", + "fullName": "google.container.v1.ClusterManager.ListClusters", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.ListClustersResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "ListClusters", + "fullName": "google.container.v1.ClusterManager.ListClusters", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_GetCluster_async", + "title": "ClusterManager getCluster Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific cluster.", + "canonical": true, + "file": "cluster_manager.get_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCluster", + "fullName": "google.container.v1.ClusterManager.GetCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Cluster", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "GetCluster", + "fullName": "google.container.v1.ClusterManager.GetCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CreateCluster_async", + "title": "ClusterManager createCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", + "canonical": true, + "file": "cluster_manager.create_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCluster", + "fullName": "google.container.v1.ClusterManager.CreateCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster", + "type": ".google.container.v1.Cluster" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CreateCluster", + "fullName": "google.container.v1.ClusterManager.CreateCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_UpdateCluster_async", + "title": "ClusterManager updateCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific cluster.", + "canonical": true, + "file": "cluster_manager.update_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCluster", + "fullName": "google.container.v1.ClusterManager.UpdateCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "update", + "type": ".google.container.v1.ClusterUpdate" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateCluster", + "fullName": "google.container.v1.ClusterManager.UpdateCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_UpdateNodePool_async", + "title": "ClusterManager updateNodePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the version and/or image type for the specified node pool.", + "canonical": true, + "file": "cluster_manager.update_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 204, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateNodePool", + "fullName": "google.container.v1.ClusterManager.UpdateNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "node_version", + "type": "TYPE_STRING" + }, + { + "name": "image_type", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "locations", + "type": "TYPE_STRING[]" + }, + { + "name": "workload_metadata_config", + "type": ".google.container.v1.WorkloadMetadataConfig" + }, + { + "name": "upgrade_settings", + "type": ".google.container.v1.NodePool.UpgradeSettings" + }, + { + "name": "tags", + "type": ".google.container.v1.NetworkTags" + }, + { + "name": "taints", + "type": ".google.container.v1.NodeTaints" + }, + { + "name": "labels", + "type": ".google.container.v1.NodeLabels" + }, + { + "name": "linux_node_config", + "type": ".google.container.v1.LinuxNodeConfig" + }, + { + "name": "kubelet_config", + "type": ".google.container.v1.NodeKubeletConfig" + }, + { + "name": "node_network_config", + "type": ".google.container.v1.NodeNetworkConfig" + }, + { + "name": "gcfs_config", + "type": ".google.container.v1.GcfsConfig" + }, + { + "name": "confidential_nodes", + "type": ".google.container.v1.ConfidentialNodes" + }, + { + "name": "gvnic", + "type": ".google.container.v1.VirtualNIC" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "fast_socket", + "type": ".google.container.v1.FastSocket" + }, + { + "name": "logging_config", + "type": ".google.container.v1.NodePoolLoggingConfig" + }, + { + "name": "resource_labels", + "type": ".google.container.v1.ResourceLabels" + }, + { + "name": "windows_node_config", + "type": ".google.container.v1.WindowsNodeConfig" + }, + { + "name": "accelerators", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "machine_type", + "type": "TYPE_STRING" + }, + { + "name": "disk_type", + "type": "TYPE_STRING" + }, + { + "name": "disk_size_gb", + "type": "TYPE_INT64" + }, + { + "name": "resource_manager_tags", + "type": ".google.container.v1.ResourceManagerTags" + }, + { + "name": "containerd_config", + "type": ".google.container.v1.ContainerdConfig" + }, + { + "name": "queued_provisioning", + "type": ".google.container.v1.NodePool.QueuedProvisioning" + }, + { + "name": "storage_pools", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateNodePool", + "fullName": "google.container.v1.ClusterManager.UpdateNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async", + "title": "ClusterManager setNodePoolAutoscaling Sample", + "origin": "API_DEFINITION", + "description": " Sets the autoscaling settings for the specified node pool.", + "canonical": true, + "file": "cluster_manager.set_node_pool_autoscaling.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolAutoscaling", + "fullName": "google.container.v1.ClusterManager.SetNodePoolAutoscaling", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "autoscaling", + "type": ".google.container.v1.NodePoolAutoscaling" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolAutoscaling", + "fullName": "google.container.v1.ClusterManager.SetNodePoolAutoscaling", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetLoggingService_async", + "title": "ClusterManager setLoggingService Sample", + "origin": "API_DEFINITION", + "description": " Sets the logging service for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_logging_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLoggingService", + "fullName": "google.container.v1.ClusterManager.SetLoggingService", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "logging_service", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLoggingService", + "fullName": "google.container.v1.ClusterManager.SetLoggingService", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetMonitoringService_async", + "title": "ClusterManager setMonitoringService Sample", + "origin": "API_DEFINITION", + "description": " Sets the monitoring service for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_monitoring_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMonitoringService", + "fullName": "google.container.v1.ClusterManager.SetMonitoringService", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "monitoring_service", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMonitoringService", + "fullName": "google.container.v1.ClusterManager.SetMonitoringService", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetAddonsConfig_async", + "title": "ClusterManager setAddonsConfig Sample", + "origin": "API_DEFINITION", + "description": " Sets the addons for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_addons_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetAddonsConfig", + "fullName": "google.container.v1.ClusterManager.SetAddonsConfig", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "addons_config", + "type": ".google.container.v1.AddonsConfig" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetAddonsConfig", + "fullName": "google.container.v1.ClusterManager.SetAddonsConfig", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetLocations_async", + "title": "ClusterManager setLocations Sample", + "origin": "API_DEFINITION", + "description": " Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.", + "canonical": true, + "file": "cluster_manager.set_locations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLocations", + "fullName": "google.container.v1.ClusterManager.SetLocations", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "locations", + "type": "TYPE_STRING[]" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLocations", + "fullName": "google.container.v1.ClusterManager.SetLocations", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_UpdateMaster_async", + "title": "ClusterManager updateMaster Sample", + "origin": "API_DEFINITION", + "description": " Updates the master for a specific cluster.", + "canonical": true, + "file": "cluster_manager.update_master.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMaster", + "fullName": "google.container.v1.ClusterManager.UpdateMaster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "master_version", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateMaster", + "fullName": "google.container.v1.ClusterManager.UpdateMaster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetMasterAuth_async", + "title": "ClusterManager setMasterAuth Sample", + "origin": "API_DEFINITION", + "description": " Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", + "canonical": true, + "file": "cluster_manager.set_master_auth.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMasterAuth", + "fullName": "google.container.v1.ClusterManager.SetMasterAuth", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "action", + "type": ".google.container.v1.SetMasterAuthRequest.Action" + }, + { + "name": "update", + "type": ".google.container.v1.MasterAuth" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMasterAuth", + "fullName": "google.container.v1.ClusterManager.SetMasterAuth", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_DeleteCluster_async", + "title": "ClusterManager deleteCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", + "canonical": true, + "file": "cluster_manager.delete_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCluster", + "fullName": "google.container.v1.ClusterManager.DeleteCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "DeleteCluster", + "fullName": "google.container.v1.ClusterManager.DeleteCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_ListOperations_async", + "title": "ClusterManager listOperations Sample", + "origin": "API_DEFINITION", + "description": " Lists all operations in a project in a specific zone or all zones.", + "canonical": true, + "file": "cluster_manager.list_operations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.container.v1.ClusterManager.ListOperations", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.ListOperationsResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.container.v1.ClusterManager.ListOperations", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_GetOperation_async", + "title": "ClusterManager getOperation Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified operation.", + "canonical": true, + "file": "cluster_manager.get_operation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.container.v1.ClusterManager.GetOperation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "operation_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.container.v1.ClusterManager.GetOperation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CancelOperation_async", + "title": "ClusterManager cancelOperation Sample", + "origin": "API_DEFINITION", + "description": " Cancels the specified operation.", + "canonical": true, + "file": "cluster_manager.cancel_operation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.container.v1.ClusterManager.CancelOperation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "operation_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.container.v1.ClusterManager.CancelOperation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_GetServerConfig_async", + "title": "ClusterManager getServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns configuration info about the Google Kubernetes Engine service.", + "canonical": true, + "file": "cluster_manager.get_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServerConfig", + "fullName": "google.container.v1.ClusterManager.GetServerConfig", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.ServerConfig", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "GetServerConfig", + "fullName": "google.container.v1.ClusterManager.GetServerConfig", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_GetJSONWebKeys_async", + "title": "ClusterManager getJSONWebKeys Sample", + "origin": "API_DEFINITION", + "description": " Gets the public component of the cluster signing keys in JSON Web Key format.", + "canonical": true, + "file": "cluster_manager.get_j_s_o_n_web_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1.ClusterManager.GetJSONWebKeys", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.GetJSONWebKeysResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1.ClusterManager.GetJSONWebKeys", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_ListNodePools_async", + "title": "ClusterManager listNodePools Sample", + "origin": "API_DEFINITION", + "description": " Lists the node pools for a cluster.", + "canonical": true, + "file": "cluster_manager.list_node_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNodePools", + "fullName": "google.container.v1.ClusterManager.ListNodePools", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.ListNodePoolsResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "ListNodePools", + "fullName": "google.container.v1.ClusterManager.ListNodePools", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_GetNodePool_async", + "title": "ClusterManager getNodePool Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the requested node pool.", + "canonical": true, + "file": "cluster_manager.get_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNodePool", + "fullName": "google.container.v1.ClusterManager.GetNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.NodePool", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "GetNodePool", + "fullName": "google.container.v1.ClusterManager.GetNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CreateNodePool_async", + "title": "ClusterManager createNodePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a node pool for a cluster.", + "canonical": true, + "file": "cluster_manager.create_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateNodePool", + "fullName": "google.container.v1.ClusterManager.CreateNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool", + "type": ".google.container.v1.NodePool" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CreateNodePool", + "fullName": "google.container.v1.ClusterManager.CreateNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_DeleteNodePool_async", + "title": "ClusterManager deleteNodePool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a node pool from a cluster.", + "canonical": true, + "file": "cluster_manager.delete_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteNodePool", + "fullName": "google.container.v1.ClusterManager.DeleteNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "DeleteNodePool", + "fullName": "google.container.v1.ClusterManager.DeleteNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async", + "title": "ClusterManager completeNodePoolUpgrade Sample", + "origin": "API_DEFINITION", + "description": " CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", + "canonical": true, + "file": "cluster_manager.complete_node_pool_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CompleteNodePoolUpgrade", + "fullName": "google.container.v1.ClusterManager.CompleteNodePoolUpgrade", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CompleteNodePoolUpgrade", + "fullName": "google.container.v1.ClusterManager.CompleteNodePoolUpgrade", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async", + "title": "ClusterManager rollbackNodePoolUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", + "canonical": true, + "file": "cluster_manager.rollback_node_pool_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackNodePoolUpgrade", + "fullName": "google.container.v1.ClusterManager.RollbackNodePoolUpgrade", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "respect_pdb", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "RollbackNodePoolUpgrade", + "fullName": "google.container.v1.ClusterManager.RollbackNodePoolUpgrade", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetNodePoolManagement_async", + "title": "ClusterManager setNodePoolManagement Sample", + "origin": "API_DEFINITION", + "description": " Sets the NodeManagement options for a node pool.", + "canonical": true, + "file": "cluster_manager.set_node_pool_management.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolManagement", + "fullName": "google.container.v1.ClusterManager.SetNodePoolManagement", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "management", + "type": ".google.container.v1.NodeManagement" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolManagement", + "fullName": "google.container.v1.ClusterManager.SetNodePoolManagement", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetLabels_async", + "title": "ClusterManager setLabels Sample", + "origin": "API_DEFINITION", + "description": " Sets labels on a cluster.", + "canonical": true, + "file": "cluster_manager.set_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLabels", + "fullName": "google.container.v1.ClusterManager.SetLabels", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "resource_labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "label_fingerprint", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLabels", + "fullName": "google.container.v1.ClusterManager.SetLabels", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetLegacyAbac_async", + "title": "ClusterManager setLegacyAbac Sample", + "origin": "API_DEFINITION", + "description": " Enables or disables the ABAC authorization mechanism on a cluster.", + "canonical": true, + "file": "cluster_manager.set_legacy_abac.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLegacyAbac", + "fullName": "google.container.v1.ClusterManager.SetLegacyAbac", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "enabled", + "type": "TYPE_BOOL" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLegacyAbac", + "fullName": "google.container.v1.ClusterManager.SetLegacyAbac", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_StartIPRotation_async", + "title": "ClusterManager startIPRotation Sample", + "origin": "API_DEFINITION", + "description": " Starts master IP rotation.", + "canonical": true, + "file": "cluster_manager.start_i_p_rotation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StartIPRotation", + "fullName": "google.container.v1.ClusterManager.StartIPRotation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rotate_credentials", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "StartIPRotation", + "fullName": "google.container.v1.ClusterManager.StartIPRotation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CompleteIPRotation_async", + "title": "ClusterManager completeIPRotation Sample", + "origin": "API_DEFINITION", + "description": " Completes master IP rotation.", + "canonical": true, + "file": "cluster_manager.complete_i_p_rotation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CompleteIPRotation", + "fullName": "google.container.v1.ClusterManager.CompleteIPRotation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CompleteIPRotation", + "fullName": "google.container.v1.ClusterManager.CompleteIPRotation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetNodePoolSize_async", + "title": "ClusterManager setNodePoolSize Sample", + "origin": "API_DEFINITION", + "description": " Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1.NodePool.locations].", + "canonical": true, + "file": "cluster_manager.set_node_pool_size.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolSize", + "fullName": "google.container.v1.ClusterManager.SetNodePoolSize", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "node_count", + "type": "TYPE_INT32" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolSize", + "fullName": "google.container.v1.ClusterManager.SetNodePoolSize", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetNetworkPolicy_async", + "title": "ClusterManager setNetworkPolicy Sample", + "origin": "API_DEFINITION", + "description": " Enables or disables Network Policy for a cluster.", + "canonical": true, + "file": "cluster_manager.set_network_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNetworkPolicy", + "fullName": "google.container.v1.ClusterManager.SetNetworkPolicy", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "network_policy", + "type": ".google.container.v1.NetworkPolicy" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNetworkPolicy", + "fullName": "google.container.v1.ClusterManager.SetNetworkPolicy", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_SetMaintenancePolicy_async", + "title": "ClusterManager setMaintenancePolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the maintenance policy for a cluster.", + "canonical": true, + "file": "cluster_manager.set_maintenance_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMaintenancePolicy", + "fullName": "google.container.v1.ClusterManager.SetMaintenancePolicy", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "maintenance_policy", + "type": ".google.container.v1.MaintenancePolicy" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMaintenancePolicy", + "fullName": "google.container.v1.ClusterManager.SetMaintenancePolicy", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_ListUsableSubnetworks_async", + "title": "ClusterManager listUsableSubnetworks Sample", + "origin": "API_DEFINITION", + "description": " Lists subnetworks that are usable for creating clusters in a project.", + "canonical": true, + "file": "cluster_manager.list_usable_subnetworks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUsableSubnetworks", + "fullName": "google.container.v1.ClusterManager.ListUsableSubnetworks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.ListUsableSubnetworksResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "ListUsableSubnetworks", + "fullName": "google.container.v1.ClusterManager.ListUsableSubnetworks", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async", + "title": "ClusterManager checkAutopilotCompatibility Sample", + "origin": "API_DEFINITION", + "description": " Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.", + "canonical": true, + "file": "cluster_manager.check_autopilot_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckAutopilotCompatibility", + "fullName": "google.container.v1.ClusterManager.CheckAutopilotCompatibility", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1.CheckAutopilotCompatibilityResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1.ClusterManagerClient" + }, + "method": { + "shortName": "CheckAutopilotCompatibility", + "fullName": "google.container.v1.ClusterManager.CheckAutopilotCompatibility", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1.ClusterManager" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-container/v1/src/index.ts b/owl-bot-staging/google-container/v1/src/index.ts new file mode 100644 index 00000000000..3052cac4844 --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 ClusterManagerClient = v1.ClusterManagerClient; +type ClusterManagerClient = v1.ClusterManagerClient; +export {v1, ClusterManagerClient}; +export default {v1, ClusterManagerClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts new file mode 100644 index 00000000000..08bababfe0d --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts @@ -0,0 +1,3712 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} 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/cluster_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cluster_manager_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Kubernetes Engine Cluster Manager v1 + * @class + * @memberof v1 + */ +export class ClusterManagerClient { + 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}; + private _universeDomain: string; + private _servicePath: string; + 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}; + clusterManagerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ClusterManagerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ClusterManagerClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ClusterManagerClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'container.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._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 = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + caPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}' + ), + cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}' + ), + }; + + // 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 = { + listUsableSubnetworks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'subnetworks') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.container.v1.ClusterManager', 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.clusterManagerStub) { + return this.clusterManagerStub; + } + + // Put together the "service stub" for + // google.container.v1.ClusterManager. + this.clusterManagerStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.container.v1.ClusterManager') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.container.v1.ClusterManager, + 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 clusterManagerStubMethods = + ['listClusters', 'getCluster', 'createCluster', 'updateCluster', 'updateNodePool', 'setNodePoolAutoscaling', 'setLoggingService', 'setMonitoringService', 'setAddonsConfig', 'setLocations', 'updateMaster', 'setMasterAuth', 'deleteCluster', 'listOperations', 'getOperation', 'cancelOperation', 'getServerConfig', 'getJsonWebKeys', 'listNodePools', 'getNodePool', 'createNodePool', 'deleteNodePool', 'completeNodePoolUpgrade', 'rollbackNodePoolUpgrade', 'setNodePoolManagement', 'setLabels', 'setLegacyAbac', 'startIpRotation', 'completeIpRotation', 'setNodePoolSize', 'setNetworkPolicy', 'setMaintenancePolicy', 'listUsableSubnetworks', 'checkAutopilotCompatibility']; + for (const methodName of clusterManagerStubMethods) { + const callPromise = this.clusterManagerStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.clusterManagerStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'container.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'container.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Lists all clusters owned by a project in either the specified zone or all + * zones. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides, or "-" for all zones. This field has been deprecated and + * replaced by the parent field. + * @param {string} request.parent + * The parent (project and location) where the clusters will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.ListClustersResponse|ListClustersResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.list_clusters.js + * region_tag:container_v1_generated_ClusterManager_ListClusters_async + */ + listClusters( + request?: protos.google.container.v1.IListClustersRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|undefined, {}|undefined + ]>; + listClusters( + request: protos.google.container.v1.IListClustersRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|null|undefined, + {}|null|undefined>): void; + listClusters( + request: protos.google.container.v1.IListClustersRequest, + callback: Callback< + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|null|undefined, + {}|null|undefined>): void; + listClusters( + request?: protos.google.container.v1.IListClustersRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IListClustersResponse, + protos.google.container.v1.IListClustersRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.listClusters(request, options, callback); + } +/** + * Gets the details of a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to retrieve. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Cluster|Cluster}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.get_cluster.js + * region_tag:container_v1_generated_ClusterManager_GetCluster_async + */ + getCluster( + request?: protos.google.container.v1.IGetClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|undefined, {}|undefined + ]>; + getCluster( + request: protos.google.container.v1.IGetClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|null|undefined, + {}|null|undefined>): void; + getCluster( + request: protos.google.container.v1.IGetClusterRequest, + callback: Callback< + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|null|undefined, + {}|null|undefined>): void; + getCluster( + request?: protos.google.container.v1.IGetClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.ICluster, + protos.google.container.v1.IGetClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCluster(request, options, callback); + } +/** + * Creates a cluster, consisting of the specified number and type of Google + * Compute Engine instances. + * + * By default, the cluster is created in the project's + * [default + * network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + * + * One firewall is added for the cluster. After cluster creation, + * the Kubelet creates routes for each node to allow the containers + * on that node to communicate with all other instances in the + * cluster. + * + * Finally, an entry is added to the project's global metadata indicating + * which CIDR range the cluster is using. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {google.container.v1.Cluster} request.cluster + * Required. A [cluster + * resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) + * @param {string} request.parent + * The parent (project and location) where the cluster will be created. + * Specified in the format `projects/* /locations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.create_cluster.js + * region_tag:container_v1_generated_ClusterManager_CreateCluster_async + */ + createCluster( + request?: protos.google.container.v1.ICreateClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|undefined, {}|undefined + ]>; + createCluster( + request: protos.google.container.v1.ICreateClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): void; + createCluster( + request: protos.google.container.v1.ICreateClusterRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): void; + createCluster( + request?: protos.google.container.v1.ICreateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCluster(request, options, callback); + } +/** + * Updates the settings of a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.ClusterUpdate} request.update + * Required. A description of the update. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.update_cluster.js + * region_tag:container_v1_generated_ClusterManager_UpdateCluster_async + */ + updateCluster( + request?: protos.google.container.v1.IUpdateClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|undefined, {}|undefined + ]>; + updateCluster( + request: protos.google.container.v1.IUpdateClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): void; + updateCluster( + request: protos.google.container.v1.IUpdateClusterRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): void; + updateCluster( + request?: protos.google.container.v1.IUpdateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCluster(request, options, callback); + } +/** + * Updates the version and/or image type for the specified node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodeVersion + * Required. The Kubernetes version to change the nodes to (typically an + * upgrade). + * + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the Kubernetes master version + * @param {string} request.imageType + * Required. The desired image type for the node pool. Please see + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + * available image types. + * @param {string} request.name + * The name (project, location, cluster, node pool) of the node pool to + * update. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {string[]} request.locations + * The desired list of Google Compute Engine + * [zones](https://cloud.google.com/compute/docs/zones#available) in which the + * node pool's nodes should be located. Changing the locations for a node pool + * will result in nodes being either created or removed from the node pool, + * depending on whether locations are being added or removed. + * @param {google.container.v1.WorkloadMetadataConfig} request.workloadMetadataConfig + * The desired workload metadata config for the node pool. + * @param {google.container.v1.NodePool.UpgradeSettings} request.upgradeSettings + * Upgrade settings control disruption and speed of the upgrade. + * @param {google.container.v1.NetworkTags} request.tags + * The desired network tags to be applied to all nodes in the node pool. + * If this field is not present, the tags will not be changed. Otherwise, + * the existing network tags will be *replaced* with the provided tags. + * @param {google.container.v1.NodeTaints} request.taints + * The desired node taints to be applied to all nodes in the node pool. + * If this field is not present, the taints will not be changed. Otherwise, + * the existing node taints will be *replaced* with the provided taints. + * @param {google.container.v1.NodeLabels} request.labels + * The desired node labels to be applied to all nodes in the node pool. + * If this field is not present, the labels will not be changed. Otherwise, + * the existing node labels will be *replaced* with the provided labels. + * @param {google.container.v1.LinuxNodeConfig} request.linuxNodeConfig + * Parameters that can be configured on Linux nodes. + * @param {google.container.v1.NodeKubeletConfig} request.kubeletConfig + * Node kubelet configs. + * @param {google.container.v1.NodeNetworkConfig} request.nodeNetworkConfig + * Node network config. + * @param {google.container.v1.GcfsConfig} request.gcfsConfig + * GCFS config. + * @param {google.container.v1.ConfidentialNodes} request.confidentialNodes + * Confidential nodes config. + * All the nodes in the node pool will be Confidential VM once enabled. + * @param {google.container.v1.VirtualNIC} request.gvnic + * Enable or disable gvnic on the node pool. + * @param {string} request.etag + * The current etag of the node pool. + * If an etag is provided and does not match the current etag of the node + * pool, update will be blocked and an ABORTED error will be returned. + * @param {google.container.v1.FastSocket} request.fastSocket + * Enable or disable NCCL fast socket for the node pool. + * @param {google.container.v1.NodePoolLoggingConfig} request.loggingConfig + * Logging configuration. + * @param {google.container.v1.ResourceLabels} request.resourceLabels + * The resource labels for the node pool to use to annotate any related + * Google Compute Engine resources. + * @param {google.container.v1.WindowsNodeConfig} request.windowsNodeConfig + * Parameters that can be configured on Windows nodes. + * @param {number[]} request.accelerators + * A list of hardware accelerators to be attached to each node. + * See https://cloud.google.com/compute/docs/gpus for more information about + * support for GPUs. + * @param {string} [request.machineType] + * Optional. The desired [Google Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types) for nodes in the + * node pool. Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified machine type. + * @param {string} [request.diskType] + * Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or + * 'pd-balanced') for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk type. + * @param {number} [request.diskSizeGb] + * Optional. The desired disk size for nodes in the node pool specified in GB. + * The smallest allowed disk size is 10GB. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk size. + * @param {google.container.v1.ResourceManagerTags} request.resourceManagerTags + * Desired resource manager tag keys and values to be attached to the nodes + * for managing Compute Engine firewalls using Network Firewall Policies. + * Existing tags will be replaced with new values. + * @param {google.container.v1.ContainerdConfig} request.containerdConfig + * The desired containerd config for nodes in the node pool. + * Initiates an upgrade operation that recreates the nodes with the new + * config. + * @param {google.container.v1.NodePool.QueuedProvisioning} request.queuedProvisioning + * Specifies the configuration of queued provisioning. + * @param {string[]} request.storagePools + * List of Storage Pools where boot disks are provisioned. + * Existing Storage Pools will be replaced with storage-pools. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.update_node_pool.js + * region_tag:container_v1_generated_ClusterManager_UpdateNodePool_async + */ + updateNodePool( + request?: protos.google.container.v1.IUpdateNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|undefined, {}|undefined + ]>; + updateNodePool( + request: protos.google.container.v1.IUpdateNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + updateNodePool( + request: protos.google.container.v1.IUpdateNodePoolRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + updateNodePool( + request?: protos.google.container.v1.IUpdateNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateNodePool(request, options, callback); + } +/** + * Sets the autoscaling settings for the specified node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.NodePoolAutoscaling} request.autoscaling + * Required. Autoscaling configuration for the node pool. + * @param {string} request.name + * The name (project, location, cluster, node pool) of the node pool to set + * autoscaler settings. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js + * region_tag:container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async + */ + setNodePoolAutoscaling( + request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|undefined, {}|undefined + ]>; + setNodePoolAutoscaling( + request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolAutoscaling( + request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolAutoscaling( + request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolAutoscalingRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolAutoscaling(request, options, callback); + } +/** + * Sets the logging service for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.loggingService + * Required. The logging service the cluster should use to write logs. + * Currently available options: + * + * * `logging.googleapis.com/kubernetes` - The Cloud Logging + * service with a Kubernetes-native resource model + * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + * available as of GKE 1.15). + * * `none` - no logs will be exported from the cluster. + * + * If left as an empty string,`logging.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set logging. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_logging_service.js + * region_tag:container_v1_generated_ClusterManager_SetLoggingService_async + */ + setLoggingService( + request?: protos.google.container.v1.ISetLoggingServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|undefined, {}|undefined + ]>; + setLoggingService( + request: protos.google.container.v1.ISetLoggingServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): void; + setLoggingService( + request: protos.google.container.v1.ISetLoggingServiceRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): void; + setLoggingService( + request?: protos.google.container.v1.ISetLoggingServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLoggingServiceRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLoggingService(request, options, callback); + } +/** + * Sets the monitoring service for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.monitoringService + * Required. The monitoring service the cluster should use to write metrics. + * Currently available options: + * + * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + * service with a Kubernetes-native resource model + * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + * longer available as of GKE 1.15). + * * `none` - No metrics will be exported from the cluster. + * + * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set monitoring. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_monitoring_service.js + * region_tag:container_v1_generated_ClusterManager_SetMonitoringService_async + */ + setMonitoringService( + request?: protos.google.container.v1.ISetMonitoringServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|undefined, {}|undefined + ]>; + setMonitoringService( + request: protos.google.container.v1.ISetMonitoringServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): void; + setMonitoringService( + request: protos.google.container.v1.ISetMonitoringServiceRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): void; + setMonitoringService( + request?: protos.google.container.v1.ISetMonitoringServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMonitoringServiceRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMonitoringService(request, options, callback); + } +/** + * Sets the addons for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.AddonsConfig} request.addonsConfig + * Required. The desired configurations for the various addons available to + * run in the cluster. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set addons. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_addons_config.js + * region_tag:container_v1_generated_ClusterManager_SetAddonsConfig_async + */ + setAddonsConfig( + request?: protos.google.container.v1.ISetAddonsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|undefined, {}|undefined + ]>; + setAddonsConfig( + request: protos.google.container.v1.ISetAddonsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): void; + setAddonsConfig( + request: protos.google.container.v1.ISetAddonsConfigRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): void; + setAddonsConfig( + request?: protos.google.container.v1.ISetAddonsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetAddonsConfigRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setAddonsConfig(request, options, callback); + } +/** + * Sets the locations for a specific cluster. + * Deprecated. Use + * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) + * instead. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string[]} request.locations + * Required. The desired list of Google Compute Engine + * [zones](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster's nodes should be located. Changing the locations a cluster is in + * will result in nodes being either created or removed from the cluster, + * depending on whether locations are being added or removed. + * + * This list must always include the cluster's primary zone. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set locations. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_locations.js + * region_tag:container_v1_generated_ClusterManager_SetLocations_async + * @deprecated SetLocations is deprecated and may be removed in a future version. + */ + setLocations( + request?: protos.google.container.v1.ISetLocationsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|undefined, {}|undefined + ]>; + setLocations( + request: protos.google.container.v1.ISetLocationsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): void; + setLocations( + request: protos.google.container.v1.ISetLocationsRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): void; + setLocations( + request?: protos.google.container.v1.ISetLocationsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLocationsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + this.warn('DEP$ClusterManager-$SetLocations','SetLocations is deprecated and may be removed in a future version.', 'DeprecationWarning'); + return this.innerApiCalls.setLocations(request, options, callback); + } +/** + * Updates the master for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.masterVersion + * Required. The Kubernetes version to change the master to. + * + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the default Kubernetes version + * @param {string} request.name + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.update_master.js + * region_tag:container_v1_generated_ClusterManager_UpdateMaster_async + */ + updateMaster( + request?: protos.google.container.v1.IUpdateMasterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|undefined, {}|undefined + ]>; + updateMaster( + request: protos.google.container.v1.IUpdateMasterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): void; + updateMaster( + request: protos.google.container.v1.IUpdateMasterRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): void; + updateMaster( + request?: protos.google.container.v1.IUpdateMasterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IUpdateMasterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateMaster(request, options, callback); + } +/** + * Sets master auth materials. Currently supports changing the admin password + * or a specific cluster, either via password generation or explicitly setting + * the password. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.SetMasterAuthRequest.Action} request.action + * Required. The exact form of action to be taken on the master auth. + * @param {google.container.v1.MasterAuth} request.update + * Required. A description of the update. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set auth. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_master_auth.js + * region_tag:container_v1_generated_ClusterManager_SetMasterAuth_async + */ + setMasterAuth( + request?: protos.google.container.v1.ISetMasterAuthRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|undefined, {}|undefined + ]>; + setMasterAuth( + request: protos.google.container.v1.ISetMasterAuthRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): void; + setMasterAuth( + request: protos.google.container.v1.ISetMasterAuthRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): void; + setMasterAuth( + request?: protos.google.container.v1.ISetMasterAuthRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMasterAuthRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMasterAuth(request, options, callback); + } +/** + * Deletes the cluster, including the Kubernetes endpoint and all worker + * nodes. + * + * Firewalls and routes that were configured during cluster creation + * are also deleted. + * + * Other Google Compute Engine resources that might be in use by the cluster, + * such as load balancer resources, are not deleted if they weren't present + * when the cluster was initially created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to delete. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to delete. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.delete_cluster.js + * region_tag:container_v1_generated_ClusterManager_DeleteCluster_async + */ + deleteCluster( + request?: protos.google.container.v1.IDeleteClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|undefined, {}|undefined + ]>; + deleteCluster( + request: protos.google.container.v1.IDeleteClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): void; + deleteCluster( + request: protos.google.container.v1.IDeleteClusterRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): void; + deleteCluster( + request?: protos.google.container.v1.IDeleteClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteCluster(request, options, callback); + } +/** + * Lists all operations in a project in a specific zone or all zones. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) to return + * operations for, or `-` for all zones. This field has been deprecated and + * replaced by the parent field. + * @param {string} request.parent + * The parent (project and location) where the operations will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.ListOperationsResponse|ListOperationsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.list_operations.js + * region_tag:container_v1_generated_ClusterManager_ListOperations_async + */ + listOperations( + request?: protos.google.container.v1.IListOperationsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|undefined, {}|undefined + ]>; + listOperations( + request: protos.google.container.v1.IListOperationsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|null|undefined, + {}|null|undefined>): void; + listOperations( + request: protos.google.container.v1.IListOperationsRequest, + callback: Callback< + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|null|undefined, + {}|null|undefined>): void; + listOperations( + request?: protos.google.container.v1.IListOperationsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IListOperationsResponse, + protos.google.container.v1.IListOperationsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.listOperations(request, options, callback); + } +/** + * Gets the specified operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.operationId + * Deprecated. The server-assigned `name` of the operation. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, operation id) of the operation to get. + * Specified in the format `projects/* /locations/* /operations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.get_operation.js + * region_tag:container_v1_generated_ClusterManager_GetOperation_async + */ + getOperation( + request?: protos.google.container.v1.IGetOperationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|undefined, {}|undefined + ]>; + getOperation( + request: protos.google.container.v1.IGetOperationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|null|undefined, + {}|null|undefined>): void; + getOperation( + request: protos.google.container.v1.IGetOperationRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|null|undefined, + {}|null|undefined>): void; + getOperation( + request?: protos.google.container.v1.IGetOperationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IGetOperationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'operation_id': request.operationId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getOperation(request, options, callback); + } +/** + * Cancels the specified operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * operation resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.operationId + * Deprecated. The server-assigned `name` of the operation. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, operation id) of the operation to cancel. + * Specified in the format `projects/* /locations/* /operations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.cancel_operation.js + * region_tag:container_v1_generated_ClusterManager_CancelOperation_async + */ + cancelOperation( + request?: protos.google.container.v1.ICancelOperationRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|undefined, {}|undefined + ]>; + cancelOperation( + request: protos.google.container.v1.ICancelOperationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): void; + cancelOperation( + request: protos.google.container.v1.ICancelOperationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): void; + cancelOperation( + request?: protos.google.container.v1.ICancelOperationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICancelOperationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'operation_id': request.operationId ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelOperation(request, options, callback); + } +/** + * Returns configuration info about the Google Kubernetes Engine service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) to return + * operations for. This field has been deprecated and replaced by the name + * field. + * @param {string} request.name + * The name (project and location) of the server config to get, + * specified in the format `projects/* /locations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.ServerConfig|ServerConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.get_server_config.js + * region_tag:container_v1_generated_ClusterManager_GetServerConfig_async + */ + getServerConfig( + request?: protos.google.container.v1.IGetServerConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|undefined, {}|undefined + ]>; + getServerConfig( + request: protos.google.container.v1.IGetServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getServerConfig( + request: protos.google.container.v1.IGetServerConfigRequest, + callback: Callback< + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getServerConfig( + request?: protos.google.container.v1.IGetServerConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IServerConfig, + protos.google.container.v1.IGetServerConfigRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.getServerConfig(request, options, callback); + } +/** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The cluster (project, location, cluster name) to get keys for. Specified in + * the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.GetJSONWebKeysResponse|GetJSONWebKeysResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js + * region_tag:container_v1_generated_ClusterManager_GetJSONWebKeys_async + */ + getJSONWebKeys( + request?: protos.google.container.v1.IGetJSONWebKeysRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|undefined, {}|undefined + ]>; + getJSONWebKeys( + request: protos.google.container.v1.IGetJSONWebKeysRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): void; + getJSONWebKeys( + request: protos.google.container.v1.IGetJSONWebKeysRequest, + callback: Callback< + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): void; + getJSONWebKeys( + request?: protos.google.container.v1.IGetJSONWebKeysRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IGetJSONWebKeysResponse, + protos.google.container.v1.IGetJSONWebKeysRequest|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.getJsonWebKeys(request, options, callback); + } +/** + * Lists the node pools for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the parent field. + * @param {string} request.parent + * The parent (project, location, cluster name) where the node pools will be + * listed. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.ListNodePoolsResponse|ListNodePoolsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.list_node_pools.js + * region_tag:container_v1_generated_ClusterManager_ListNodePools_async + */ + listNodePools( + request?: protos.google.container.v1.IListNodePoolsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|undefined, {}|undefined + ]>; + listNodePools( + request: protos.google.container.v1.IListNodePoolsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): void; + listNodePools( + request: protos.google.container.v1.IListNodePoolsRequest, + callback: Callback< + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): void; + listNodePools( + request?: protos.google.container.v1.IListNodePoolsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IListNodePoolsResponse, + protos.google.container.v1.IListNodePoolsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.listNodePools(request, options, callback); + } +/** + * Retrieves the requested node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * get. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.NodePool|NodePool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.get_node_pool.js + * region_tag:container_v1_generated_ClusterManager_GetNodePool_async + */ + getNodePool( + request?: protos.google.container.v1.IGetNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|undefined, {}|undefined + ]>; + getNodePool( + request: protos.google.container.v1.IGetNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getNodePool( + request: protos.google.container.v1.IGetNodePoolRequest, + callback: Callback< + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getNodePool( + request?: protos.google.container.v1.IGetNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.INodePool, + protos.google.container.v1.IGetNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getNodePool(request, options, callback); + } +/** + * Creates a node pool for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the parent field. + * @param {google.container.v1.NodePool} request.nodePool + * Required. The node pool to create. + * @param {string} request.parent + * The parent (project, location, cluster name) where the node pool will be + * created. Specified in the format + * `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.create_node_pool.js + * region_tag:container_v1_generated_ClusterManager_CreateNodePool_async + */ + createNodePool( + request?: protos.google.container.v1.ICreateNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|undefined, {}|undefined + ]>; + createNodePool( + request: protos.google.container.v1.ICreateNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + createNodePool( + request: protos.google.container.v1.ICreateNodePoolRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + createNodePool( + request?: protos.google.container.v1.ICreateNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICreateNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.createNodePool(request, options, callback); + } +/** + * Deletes a node pool from a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to delete. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * delete. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.delete_node_pool.js + * region_tag:container_v1_generated_ClusterManager_DeleteNodePool_async + */ + deleteNodePool( + request?: protos.google.container.v1.IDeleteNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|undefined, {}|undefined + ]>; + deleteNodePool( + request: protos.google.container.v1.IDeleteNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): void; + deleteNodePool( + request: protos.google.container.v1.IDeleteNodePoolRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): void; + deleteNodePool( + request?: protos.google.container.v1.IDeleteNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IDeleteNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteNodePool(request, options, callback); + } +/** + * CompleteNodePoolUpgrade will signal an on-going node pool upgrade to + * complete. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * complete upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js + * region_tag:container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async + */ + completeNodePoolUpgrade( + request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|undefined, {}|undefined + ]>; + completeNodePoolUpgrade( + request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + completeNodePoolUpgrade( + request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + completeNodePoolUpgrade( + request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1.ICompleteNodePoolUpgradeRequest|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.completeNodePoolUpgrade(request, options, callback); + } +/** + * Rolls back a previously Aborted or Failed NodePool upgrade. + * This makes no changes if the last upgrade successfully completed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to rollback. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to rollback. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node poll to + * rollback upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {boolean} request.respectPdb + * Option for rollback to ignore the PodDisruptionBudget. + * Default value is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js + * region_tag:container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async + */ + rollbackNodePoolUpgrade( + request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|undefined, {}|undefined + ]>; + rollbackNodePoolUpgrade( + request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + rollbackNodePoolUpgrade( + request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + rollbackNodePoolUpgrade( + request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IRollbackNodePoolUpgradeRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.rollbackNodePoolUpgrade(request, options, callback); + } +/** + * Sets the NodeManagement options for a node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to update. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.NodeManagement} request.management + * Required. NodeManagement configuration for the node pool. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to set + * management properties. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_node_pool_management.js + * region_tag:container_v1_generated_ClusterManager_SetNodePoolManagement_async + */ + setNodePoolManagement( + request?: protos.google.container.v1.ISetNodePoolManagementRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|undefined, {}|undefined + ]>; + setNodePoolManagement( + request: protos.google.container.v1.ISetNodePoolManagementRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolManagement( + request: protos.google.container.v1.ISetNodePoolManagementRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolManagement( + request?: protos.google.container.v1.ISetNodePoolManagementRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolManagementRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolManagement(request, options, callback); + } +/** + * Sets labels on a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {number[]} request.resourceLabels + * Required. The labels to set for that cluster. + * @param {string} request.labelFingerprint + * Required. The fingerprint of the previous set of labels for this resource, + * used to detect conflicts. The fingerprint is initially generated by + * Kubernetes Engine and changes after every request to modify or update + * labels. You must always provide an up-to-date fingerprint hash when + * updating or changing labels. Make a `get()` request to the + * resource to get the latest fingerprint. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set labels. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_labels.js + * region_tag:container_v1_generated_ClusterManager_SetLabels_async + */ + setLabels( + request?: protos.google.container.v1.ISetLabelsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|undefined, {}|undefined + ]>; + setLabels( + request: protos.google.container.v1.ISetLabelsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): void; + setLabels( + request: protos.google.container.v1.ISetLabelsRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): void; + setLabels( + request?: protos.google.container.v1.ISetLabelsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLabelsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLabels(request, options, callback); + } +/** + * Enables or disables the ABAC authorization mechanism on a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {boolean} request.enabled + * Required. Whether ABAC authorization will be enabled in the cluster. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set legacy + * abac. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_legacy_abac.js + * region_tag:container_v1_generated_ClusterManager_SetLegacyAbac_async + */ + setLegacyAbac( + request?: protos.google.container.v1.ISetLegacyAbacRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|undefined, {}|undefined + ]>; + setLegacyAbac( + request: protos.google.container.v1.ISetLegacyAbacRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): void; + setLegacyAbac( + request: protos.google.container.v1.ISetLegacyAbacRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): void; + setLegacyAbac( + request?: protos.google.container.v1.ISetLegacyAbacRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetLegacyAbacRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLegacyAbac(request, options, callback); + } +/** + * Starts master IP rotation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to start IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {boolean} request.rotateCredentials + * Whether to rotate credentials during IP rotation. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.start_i_p_rotation.js + * region_tag:container_v1_generated_ClusterManager_StartIPRotation_async + */ + startIPRotation( + request?: protos.google.container.v1.IStartIPRotationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|undefined, {}|undefined + ]>; + startIPRotation( + request: protos.google.container.v1.IStartIPRotationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): void; + startIPRotation( + request: protos.google.container.v1.IStartIPRotationRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): void; + startIPRotation( + request?: protos.google.container.v1.IStartIPRotationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.IStartIPRotationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.startIpRotation(request, options, callback); + } +/** + * Completes master IP rotation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to complete IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.complete_i_p_rotation.js + * region_tag:container_v1_generated_ClusterManager_CompleteIPRotation_async + */ + completeIPRotation( + request?: protos.google.container.v1.ICompleteIPRotationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|undefined, {}|undefined + ]>; + completeIPRotation( + request: protos.google.container.v1.ICompleteIPRotationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): void; + completeIPRotation( + request: protos.google.container.v1.ICompleteIPRotationRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): void; + completeIPRotation( + request?: protos.google.container.v1.ICompleteIPRotationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ICompleteIPRotationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.completeIpRotation(request, options, callback); + } +/** + * Sets the size for a specific node pool. The new size will be used for all + * replicas, including future replicas created by modifying + * {@link protos.google.container.v1.NodePool.locations|NodePool.locations}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Deprecated. The name of the node pool to update. + * This field has been deprecated and replaced by the name field. + * @param {number} request.nodeCount + * Required. The desired node count for the pool. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to set + * size. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_node_pool_size.js + * region_tag:container_v1_generated_ClusterManager_SetNodePoolSize_async + */ + setNodePoolSize( + request?: protos.google.container.v1.ISetNodePoolSizeRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|undefined, {}|undefined + ]>; + setNodePoolSize( + request: protos.google.container.v1.ISetNodePoolSizeRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolSize( + request: protos.google.container.v1.ISetNodePoolSizeRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolSize( + request?: protos.google.container.v1.ISetNodePoolSizeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNodePoolSizeRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolSize(request, options, callback); + } +/** + * Enables or disables Network Policy for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1.NetworkPolicy} request.networkPolicy + * Required. Configuration options for the NetworkPolicy feature. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set networking + * policy. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_network_policy.js + * region_tag:container_v1_generated_ClusterManager_SetNetworkPolicy_async + */ + setNetworkPolicy( + request?: protos.google.container.v1.ISetNetworkPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|undefined, {}|undefined + ]>; + setNetworkPolicy( + request: protos.google.container.v1.ISetNetworkPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): void; + setNetworkPolicy( + request: protos.google.container.v1.ISetNetworkPolicyRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): void; + setNetworkPolicy( + request?: protos.google.container.v1.ISetNetworkPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetNetworkPolicyRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNetworkPolicy(request, options, callback); + } +/** + * Sets the maintenance policy for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * @param {string} request.zone + * Required. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. + * @param {string} request.clusterId + * Required. The name of the cluster to update. + * @param {google.container.v1.MaintenancePolicy} request.maintenancePolicy + * Required. The maintenance policy to be set for the cluster. An empty field + * clears the existing maintenance policy. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set + * maintenance policy. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.set_maintenance_policy.js + * region_tag:container_v1_generated_ClusterManager_SetMaintenancePolicy_async + */ + setMaintenancePolicy( + request?: protos.google.container.v1.ISetMaintenancePolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|undefined, {}|undefined + ]>; + setMaintenancePolicy( + request: protos.google.container.v1.ISetMaintenancePolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): void; + setMaintenancePolicy( + request: protos.google.container.v1.ISetMaintenancePolicyRequest, + callback: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): void; + setMaintenancePolicy( + request?: protos.google.container.v1.ISetMaintenancePolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.IOperation, + protos.google.container.v1.ISetMaintenancePolicyRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMaintenancePolicy(request, options, callback); + } +/** + * Checks the cluster compatibility with Autopilot mode, and returns a list of + * compatibility issues. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1.CheckAutopilotCompatibilityResponse|CheckAutopilotCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.check_autopilot_compatibility.js + * region_tag:container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async + */ + checkAutopilotCompatibility( + request?: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|undefined, {}|undefined + ]>; + checkAutopilotCompatibility( + request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkAutopilotCompatibility( + request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, + callback: Callback< + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkAutopilotCompatibility( + request?: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1.ICheckAutopilotCompatibilityRequest|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.checkAutopilotCompatibility(request, options, callback); + } + + /** + * Lists subnetworks that are usable for creating clusters in a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork}. + * 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 `listUsableSubnetworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listUsableSubnetworks( + request?: protos.google.container.v1.IListUsableSubnetworksRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1.IUsableSubnetwork[], + protos.google.container.v1.IListUsableSubnetworksRequest|null, + protos.google.container.v1.IListUsableSubnetworksResponse + ]>; + listUsableSubnetworks( + request: protos.google.container.v1.IListUsableSubnetworksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.container.v1.IListUsableSubnetworksRequest, + protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1.IUsableSubnetwork>): void; + listUsableSubnetworks( + request: protos.google.container.v1.IListUsableSubnetworksRequest, + callback: PaginationCallback< + protos.google.container.v1.IListUsableSubnetworksRequest, + protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1.IUsableSubnetwork>): void; + listUsableSubnetworks( + request?: protos.google.container.v1.IListUsableSubnetworksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.container.v1.IListUsableSubnetworksRequest, + protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1.IUsableSubnetwork>, + callback?: PaginationCallback< + protos.google.container.v1.IListUsableSubnetworksRequest, + protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1.IUsableSubnetwork>): + Promise<[ + protos.google.container.v1.IUsableSubnetwork[], + protos.google.container.v1.IListUsableSubnetworksRequest|null, + protos.google.container.v1.IListUsableSubnetworksResponse + ]>|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.listUsableSubnetworks(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 + * The parent project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork} 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 `listUsableSubnetworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listUsableSubnetworksStream( + request?: protos.google.container.v1.IListUsableSubnetworksRequest, + 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['listUsableSubnetworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUsableSubnetworks.createStream( + this.innerApiCalls.listUsableSubnetworks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUsableSubnetworks`, 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 + * The parent project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cluster_manager.list_usable_subnetworks.js + * region_tag:container_v1_generated_ClusterManager_ListUsableSubnetworks_async + */ + listUsableSubnetworksAsync( + request?: protos.google.container.v1.IListUsableSubnetworksRequest, + 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['listUsableSubnetworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUsableSubnetworks.asyncIterate( + this.innerApiCalls['listUsableSubnetworks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified caPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @returns {string} Resource name string. + */ + caPoolPath(project:string,location:string,caPool:string) { + return this.pathTemplates.caPoolPathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + }); + } + + /** + * Parse the project from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).project; + } + + /** + * Parse the location from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).location; + } + + /** + * Parse the ca_pool from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).ca_pool; + } + + /** + * Return a fully-qualified cryptoKeyVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + cryptoKeyVersionPath(project:string,location:string,keyRing:string,cryptoKey:string,cryptoKeyVersion:string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).project; + } + + /** + * Parse the location from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).location; + } + + /** + * Parse the key_ring from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).key_ring; + } + + /** + * Parse the crypto_key from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).crypto_key; + } + + /** + * Parse the crypto_key_version from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).crypto_key_version; + } + + /** + * 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.clusterManagerStub && !this._terminated) { + return this.clusterManagerStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json new file mode 100644 index 00000000000..33fb266b6bd --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json @@ -0,0 +1,192 @@ +{ + "interfaces": { + "google.container.v1.ClusterManager": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListClusters": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetCluster": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateCluster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCluster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateNodePool": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolAutoscaling": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLoggingService": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMonitoringService": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetAddonsConfig": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLocations": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateMaster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMasterAuth": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCluster": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListOperations": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetOperation": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CancelOperation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetServerConfig": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetJSONWebKeys": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListNodePools": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetNodePool": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateNodePool": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteNodePool": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CompleteNodePoolUpgrade": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RollbackNodePoolUpgrade": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolManagement": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLabels": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLegacyAbac": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StartIPRotation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CompleteIPRotation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolSize": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNetworkPolicy": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMaintenancePolicy": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUsableSubnetworks": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckAutopilotCompatibility": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json new file mode 100644 index 00000000000..aa69748e51b --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/container/v1/cluster_service.proto" +] diff --git a/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..c08b06ded09 --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json @@ -0,0 +1,367 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.container.v1", + "libraryPackage": "@google-cloud/container", + "services": { + "ClusterManager": { + "clients": { + "grpc": { + "libraryClient": "ClusterManagerClient", + "rpcs": { + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateNodePool": { + "methods": [ + "updateNodePool" + ] + }, + "SetNodePoolAutoscaling": { + "methods": [ + "setNodePoolAutoscaling" + ] + }, + "SetLoggingService": { + "methods": [ + "setLoggingService" + ] + }, + "SetMonitoringService": { + "methods": [ + "setMonitoringService" + ] + }, + "SetAddonsConfig": { + "methods": [ + "setAddonsConfig" + ] + }, + "SetLocations": { + "methods": [ + "setLocations" + ] + }, + "UpdateMaster": { + "methods": [ + "updateMaster" + ] + }, + "SetMasterAuth": { + "methods": [ + "setMasterAuth" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "ListOperations": { + "methods": [ + "listOperations" + ] + }, + "GetOperation": { + "methods": [ + "getOperation" + ] + }, + "CancelOperation": { + "methods": [ + "cancelOperation" + ] + }, + "GetServerConfig": { + "methods": [ + "getServerConfig" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetNodePool": { + "methods": [ + "getNodePool" + ] + }, + "CreateNodePool": { + "methods": [ + "createNodePool" + ] + }, + "DeleteNodePool": { + "methods": [ + "deleteNodePool" + ] + }, + "CompleteNodePoolUpgrade": { + "methods": [ + "completeNodePoolUpgrade" + ] + }, + "RollbackNodePoolUpgrade": { + "methods": [ + "rollbackNodePoolUpgrade" + ] + }, + "SetNodePoolManagement": { + "methods": [ + "setNodePoolManagement" + ] + }, + "SetLabels": { + "methods": [ + "setLabels" + ] + }, + "SetLegacyAbac": { + "methods": [ + "setLegacyAbac" + ] + }, + "StartIPRotation": { + "methods": [ + "startIPRotation" + ] + }, + "CompleteIPRotation": { + "methods": [ + "completeIPRotation" + ] + }, + "SetNodePoolSize": { + "methods": [ + "setNodePoolSize" + ] + }, + "SetNetworkPolicy": { + "methods": [ + "setNetworkPolicy" + ] + }, + "SetMaintenancePolicy": { + "methods": [ + "setMaintenancePolicy" + ] + }, + "CheckAutopilotCompatibility": { + "methods": [ + "checkAutopilotCompatibility" + ] + }, + "ListUsableSubnetworks": { + "methods": [ + "listUsableSubnetworks", + "listUsableSubnetworksStream", + "listUsableSubnetworksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ClusterManagerClient", + "rpcs": { + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateNodePool": { + "methods": [ + "updateNodePool" + ] + }, + "SetNodePoolAutoscaling": { + "methods": [ + "setNodePoolAutoscaling" + ] + }, + "SetLoggingService": { + "methods": [ + "setLoggingService" + ] + }, + "SetMonitoringService": { + "methods": [ + "setMonitoringService" + ] + }, + "SetAddonsConfig": { + "methods": [ + "setAddonsConfig" + ] + }, + "SetLocations": { + "methods": [ + "setLocations" + ] + }, + "UpdateMaster": { + "methods": [ + "updateMaster" + ] + }, + "SetMasterAuth": { + "methods": [ + "setMasterAuth" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "ListOperations": { + "methods": [ + "listOperations" + ] + }, + "GetOperation": { + "methods": [ + "getOperation" + ] + }, + "CancelOperation": { + "methods": [ + "cancelOperation" + ] + }, + "GetServerConfig": { + "methods": [ + "getServerConfig" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetNodePool": { + "methods": [ + "getNodePool" + ] + }, + "CreateNodePool": { + "methods": [ + "createNodePool" + ] + }, + "DeleteNodePool": { + "methods": [ + "deleteNodePool" + ] + }, + "CompleteNodePoolUpgrade": { + "methods": [ + "completeNodePoolUpgrade" + ] + }, + "RollbackNodePoolUpgrade": { + "methods": [ + "rollbackNodePoolUpgrade" + ] + }, + "SetNodePoolManagement": { + "methods": [ + "setNodePoolManagement" + ] + }, + "SetLabels": { + "methods": [ + "setLabels" + ] + }, + "SetLegacyAbac": { + "methods": [ + "setLegacyAbac" + ] + }, + "StartIPRotation": { + "methods": [ + "startIPRotation" + ] + }, + "CompleteIPRotation": { + "methods": [ + "completeIPRotation" + ] + }, + "SetNodePoolSize": { + "methods": [ + "setNodePoolSize" + ] + }, + "SetNetworkPolicy": { + "methods": [ + "setNetworkPolicy" + ] + }, + "SetMaintenancePolicy": { + "methods": [ + "setMaintenancePolicy" + ] + }, + "CheckAutopilotCompatibility": { + "methods": [ + "checkAutopilotCompatibility" + ] + }, + "ListUsableSubnetworks": { + "methods": [ + "listUsableSubnetworks", + "listUsableSubnetworksStream", + "listUsableSubnetworksAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-container/v1/src/v1/index.ts b/owl-bot-staging/google-container/v1/src/v1/index.ts new file mode 100644 index 00000000000..aa5679ebbc4 --- /dev/null +++ b/owl-bot-staging/google-container/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {ClusterManagerClient} from './cluster_manager_client'; diff --git a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..b200c9d2b4f --- /dev/null +++ b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 container = require('@google-cloud/container'); + +function main() { + const clusterManagerClient = new container.ClusterManagerClient(); +} + +main(); diff --git a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..e4bc67faf05 --- /dev/null +++ b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {ClusterManagerClient} from '@google-cloud/container'; + +// check that the client class type name can be used +function doStuffWithClusterManagerClient(client: ClusterManagerClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const clusterManagerClient = new ClusterManagerClient(); + doStuffWithClusterManagerClient(clusterManagerClient); +} + +main(); diff --git a/owl-bot-staging/google-container/v1/system-test/install.ts b/owl-bot-staging/google-container/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-container/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1/test/gapic_cluster_manager_v1.ts b/owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts new file mode 100644 index 00000000000..bc51fc375f7 --- /dev/null +++ b/owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts @@ -0,0 +1,5305 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 clustermanagerModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ClusterManagerClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'container.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = clustermanagerModule.v1.ClusterManagerClient.servicePath; + assert.strictEqual(servicePath, 'container.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = clustermanagerModule.v1.ClusterManagerClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'container.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new clustermanagerModule.v1.ClusterManagerClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new clustermanagerModule.v1.ClusterManagerClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new clustermanagerModule.v1.ClusterManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = clustermanagerModule.v1.ClusterManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.clusterManagerStub, undefined); + await client.initialize(); + assert(client.clusterManagerStub); + }); + + it('has close method for the initialized client', done => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.clusterManagerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.clusterManagerStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clustermanagerModule.v1.ClusterManagerClient({ + 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 clustermanagerModule.v1.ClusterManagerClient({ + 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('listClusters', () => { + it('invokes listClusters without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListClustersResponse() + ); + client.innerApiCalls.listClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListClustersResponse() + ); + client.innerApiCalls.listClusters = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listClusters( + request, + (err?: Error|null, result?: protos.google.container.v1.IListClustersResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listClusters = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listClusters(request), expectedError); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listClusters(request), expectedError); + }); + }); + + describe('getCluster', () => { + it('invokes getCluster without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Cluster() + ); + client.innerApiCalls.getCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Cluster() + ); + client.innerApiCalls.getCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCluster( + request, + (err?: Error|null, result?: protos.google.container.v1.ICluster|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCluster(request), expectedError); + }); + }); + + describe('createCluster', () => { + it('invokes createCluster without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.createCluster = stubSimpleCall(expectedResponse); + const [response] = await client.createCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.createCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCluster( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCluster(request), expectedError); + }); + }); + + describe('updateCluster', () => { + it('invokes updateCluster without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateCluster = stubSimpleCall(expectedResponse); + const [response] = await client.updateCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCluster( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCluster(request), expectedError); + }); + }); + + describe('updateNodePool', () => { + it('invokes updateNodePool without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.updateNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateNodePool(request), expectedError); + }); + }); + + describe('setNodePoolAutoscaling', () => { + it('invokes setNodePoolAutoscaling without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolAutoscaling(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolAutoscaling( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); + }); + }); + + describe('setLoggingService', () => { + it('invokes setLoggingService without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLoggingService = stubSimpleCall(expectedResponse); + const [response] = await client.setLoggingService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLoggingService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLoggingService( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLoggingService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLoggingService(request), expectedError); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLoggingService(request), expectedError); + }); + }); + + describe('setMonitoringService', () => { + it('invokes setMonitoringService without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMonitoringService = stubSimpleCall(expectedResponse); + const [response] = await client.setMonitoringService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMonitoringService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMonitoringService( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMonitoringService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMonitoringService(request), expectedError); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMonitoringService(request), expectedError); + }); + }); + + describe('setAddonsConfig', () => { + it('invokes setAddonsConfig without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setAddonsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.setAddonsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setAddonsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setAddonsConfig( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setAddonsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setAddonsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setAddonsConfig(request), expectedError); + }); + }); + + describe('setLocations', () => { + it('invokes setLocations without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLocations = stubSimpleCall(expectedResponse); + const [response] = await client.setLocations(request); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLocations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLocations( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLocations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLocations(request), expectedError); + assert(stub.calledOnce); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLocations(request), expectedError); + assert(stub.calledOnce); + }); + }); + + describe('updateMaster', () => { + it('invokes updateMaster without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateMaster = stubSimpleCall(expectedResponse); + const [response] = await client.updateMaster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.updateMaster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMaster( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMaster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateMaster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateMaster(request), expectedError); + }); + }); + + describe('setMasterAuth', () => { + it('invokes setMasterAuth without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMasterAuth = stubSimpleCall(expectedResponse); + const [response] = await client.setMasterAuth(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMasterAuth = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMasterAuth( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMasterAuth = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMasterAuth(request), expectedError); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMasterAuth(request), expectedError); + }); + }); + + describe('deleteCluster', () => { + it('invokes deleteCluster without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.deleteCluster = stubSimpleCall(expectedResponse); + const [response] = await client.deleteCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.deleteCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteCluster( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteCluster(request), expectedError); + }); + }); + + describe('listOperations', () => { + it('invokes listOperations without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListOperationsResponse() + ); + client.innerApiCalls.listOperations = stubSimpleCall(expectedResponse); + const [response] = await client.listOperations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListOperationsResponse() + ); + client.innerApiCalls.listOperations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOperations( + request, + (err?: Error|null, result?: protos.google.container.v1.IListOperationsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listOperations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listOperations(request), expectedError); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listOperations(request), expectedError); + }); + }); + + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.getOperation = stubSimpleCall(expectedResponse); + const [response] = await client.getOperation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.getOperation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOperation( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getOperation(request), expectedError); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getOperation(request), expectedError); + }); + }); + + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelOperation = stubSimpleCall(expectedResponse); + const [response] = await client.cancelOperation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelOperation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelOperation( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelOperation(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelOperation(request), expectedError); + }); + }); + + describe('getServerConfig', () => { + it('invokes getServerConfig without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ServerConfig() + ); + client.innerApiCalls.getServerConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ServerConfig() + ); + client.innerApiCalls.getServerConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getServerConfig( + request, + (err?: Error|null, result?: protos.google.container.v1.IServerConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getServerConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getServerConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getServerConfig(request), expectedError); + }); + }); + + describe('getJSONWebKeys', () => { + it('invokes getJSONWebKeys without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysResponse() + ); + client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); + const [response] = await client.getJSONWebKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysResponse() + ); + client.innerApiCalls.getJsonWebKeys = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJSONWebKeys( + request, + (err?: Error|null, result?: protos.google.container.v1.IGetJSONWebKeysResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getJsonWebKeys = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJSONWebKeys(request), expectedError); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJSONWebKeys(request), expectedError); + }); + }); + + describe('listNodePools', () => { + it('invokes listNodePools without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsResponse() + ); + client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); + const [response] = await client.listNodePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsResponse() + ); + client.innerApiCalls.listNodePools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listNodePools( + request, + (err?: Error|null, result?: protos.google.container.v1.IListNodePoolsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listNodePools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listNodePools(request), expectedError); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listNodePools(request), expectedError); + }); + }); + + describe('getNodePool', () => { + it('invokes getNodePool without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.NodePool() + ); + client.innerApiCalls.getNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.getNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.NodePool() + ); + client.innerApiCalls.getNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1.INodePool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getNodePool(request), expectedError); + }); + }); + + describe('createNodePool', () => { + it('invokes createNodePool without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.createNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.createNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.createNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createNodePool(request), expectedError); + }); + }); + + describe('deleteNodePool', () => { + it('invokes deleteNodePool without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.deleteNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.deleteNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.deleteNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteNodePool(request), expectedError); + }); + }); + + describe('completeNodePoolUpgrade', () => { + it('invokes completeNodePoolUpgrade without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(expectedResponse); + const [response] = await client.completeNodePoolUpgrade(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.completeNodePoolUpgrade( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); + }); + }); + + describe('rollbackNodePoolUpgrade', () => { + it('invokes rollbackNodePoolUpgrade without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(expectedResponse); + const [response] = await client.rollbackNodePoolUpgrade(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackNodePoolUpgrade( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); + }); + }); + + describe('setNodePoolManagement', () => { + it('invokes setNodePoolManagement without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolManagement = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolManagement(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolManagement = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolManagement( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolManagement = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolManagement(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolManagement(request), expectedError); + }); + }); + + describe('setLabels', () => { + it('invokes setLabels without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLabels = stubSimpleCall(expectedResponse); + const [response] = await client.setLabels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLabels = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLabels( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLabels = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLabels(request), expectedError); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLabels(request), expectedError); + }); + }); + + describe('setLegacyAbac', () => { + it('invokes setLegacyAbac without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLegacyAbac = stubSimpleCall(expectedResponse); + const [response] = await client.setLegacyAbac(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setLegacyAbac = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLegacyAbac( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLegacyAbac = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLegacyAbac(request), expectedError); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLegacyAbac(request), expectedError); + }); + }); + + describe('startIPRotation', () => { + it('invokes startIPRotation without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.startIpRotation = stubSimpleCall(expectedResponse); + const [response] = await client.startIPRotation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.startIpRotation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startIPRotation( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.startIpRotation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.startIPRotation(request), expectedError); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.startIPRotation(request), expectedError); + }); + }); + + describe('completeIPRotation', () => { + it('invokes completeIPRotation without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.completeIpRotation = stubSimpleCall(expectedResponse); + const [response] = await client.completeIPRotation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.completeIpRotation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.completeIPRotation( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.completeIpRotation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.completeIPRotation(request), expectedError); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.completeIPRotation(request), expectedError); + }); + }); + + describe('setNodePoolSize', () => { + it('invokes setNodePoolSize without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolSize = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolSize(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNodePoolSize = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolSize( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolSize = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolSize(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolSize(request), expectedError); + }); + }); + + describe('setNetworkPolicy', () => { + it('invokes setNetworkPolicy without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNetworkPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setNetworkPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setNetworkPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNetworkPolicy( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNetworkPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNetworkPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNetworkPolicy(request), expectedError); + }); + }); + + describe('setMaintenancePolicy', () => { + it('invokes setMaintenancePolicy without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setMaintenancePolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.Operation() + ); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMaintenancePolicy( + request, + (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMaintenancePolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMaintenancePolicy(request), expectedError); + }); + }); + + describe('checkAutopilotCompatibility', () => { + it('invokes checkAutopilotCompatibility without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityResponse() + ); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkAutopilotCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityResponse() + ); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkAutopilotCompatibility( + request, + (err?: Error|null, result?: protos.google.container.v1.ICheckAutopilotCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility with closed client', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); + }); + }); + + describe('listUsableSubnetworks', () => { + it('invokes listUsableSubnetworks without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + ]; + client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(expectedResponse); + const [response] = await client.listUsableSubnetworks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworks without error using callback', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + ]; + client.innerApiCalls.listUsableSubnetworks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUsableSubnetworks( + request, + (err?: Error|null, result?: protos.google.container.v1.IUsableSubnetwork[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworks with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUsableSubnetworks(request), expectedError); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworksStream without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + ]; + client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUsableSubnetworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.container.v1.UsableSubnetwork[] = []; + stream.on('data', (response: protos.google.container.v1.UsableSubnetwork) => { + 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.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); + assert( + (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUsableSubnetworksStream with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUsableSubnetworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.container.v1.UsableSubnetwork[] = []; + stream.on('data', (response: protos.google.container.v1.UsableSubnetwork) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); + assert( + (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUsableSubnetworks without error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), + ]; + client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.container.v1.IUsableSubnetwork[] = []; + const iterable = client.listUsableSubnetworksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUsableSubnetworks with error', async () => { + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUsableSubnetworksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.container.v1.IUsableSubnetwork[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('caPool', () => { + const fakePath = "/rendered/path/caPool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + ca_pool: "caPoolValue", + }; + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.caPoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.caPoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('caPoolPath', () => { + const result = client.caPoolPath("projectValue", "locationValue", "caPoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.caPoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromCaPoolName', () => { + const result = client.matchProjectFromCaPoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromCaPoolName', () => { + const result = client.matchLocationFromCaPoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCaPoolFromCaPoolName', () => { + const result = client.matchCaPoolFromCaPoolName(fakePath); + assert.strictEqual(result, "caPoolValue"); + assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cryptoKeyVersion', () => { + const fakePath = "/rendered/path/cryptoKeyVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + key_ring: "keyRingValue", + crypto_key: "cryptoKeyValue", + crypto_key_version: "cryptoKeyVersionValue", + }; + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.cryptoKeyVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('cryptoKeyVersionPath', () => { + const result = client.cryptoKeyVersionPath("projectValue", "locationValue", "keyRingValue", "cryptoKeyValue", "cryptoKeyVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromCryptoKeyVersionName', () => { + const result = client.matchProjectFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromCryptoKeyVersionName', () => { + const result = client.matchLocationFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchKeyRingFromCryptoKeyVersionName', () => { + const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, "keyRingValue"); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCryptoKeyFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, "cryptoKeyValue"); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, "cryptoKeyVersionValue"); + assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-container/v1/tsconfig.json b/owl-bot-staging/google-container/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-container/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-container/v1/webpack.config.js b/owl-bot-staging/google-container/v1/webpack.config.js new file mode 100644 index 00000000000..9032271af9d --- /dev/null +++ b/owl-bot-staging/google-container/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: 'ClusterManager', + filename: './cluster-manager.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/owl-bot-staging/google-container/v1beta1/.eslintignore b/owl-bot-staging/google-container/v1beta1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-container/v1beta1/.eslintrc.json b/owl-bot-staging/google-container/v1beta1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-container/v1beta1/.gitignore b/owl-bot-staging/google-container/v1beta1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.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-container/v1beta1/.jsdoc.js b/owl-bot-staging/google-container/v1beta1/.jsdoc.js new file mode 100644 index 00000000000..afb61595735 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/container', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-container/v1beta1/.mocharc.js b/owl-bot-staging/google-container/v1beta1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1beta1/.prettierrc.js b/owl-bot-staging/google-container/v1beta1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1beta1/README.md b/owl-bot-staging/google-container/v1beta1/README.md new file mode 100644 index 00000000000..f32441d7e6b --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/README.md @@ -0,0 +1 @@ +Container: Nodejs Client diff --git a/owl-bot-staging/google-container/v1beta1/package.json b/owl-bot-staging/google-container/v1beta1/package.json new file mode 100644 index 00000000000..6b69752dd23 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/container", + "version": "0.1.0", + "description": "Container client for Node.js", + "repository": "googleapis/nodejs-container", + "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 container", + "container", + "cluster manager" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto b/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto new file mode 100644 index 00000000000..5db56b0c13c --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto @@ -0,0 +1,6275 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.container.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/code.proto"; +import "google/rpc/status.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.Cloud.Container.V1Beta1"; +option go_package = "cloud.google.com/go/container/apiv1beta1/containerpb;containerpb"; +option java_multiple_files = true; +option java_outer_classname = "ClusterServiceProto"; +option java_package = "com.google.container.v1beta1"; +option php_namespace = "Google\\Cloud\\Container\\V1beta1"; +option ruby_package = "Google::Cloud::Container::V1beta1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; + +// Google Kubernetes Engine Cluster Manager v1beta1 +service ClusterManager { + option (google.api.default_host) = "container.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all clusters owned by a project in either the specified zone or all + // zones. + rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/clusters" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" + } + }; + option (google.api.method_signature) = "project_id,zone"; + } + + // Gets the details for a specific cluster. + rpc GetCluster(GetClusterRequest) returns (Cluster) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + } + + // Creates a cluster, consisting of the specified number and type of Google + // Compute Engine instances. + // + // By default, the cluster is created in the project's + // [default + // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + // + // One firewall is added for the cluster. After cluster creation, + // the Kubelet creates routes for each node to allow the containers + // on that node to communicate with all other instances in the + // cluster. + // + // Finally, an entry is added to the project's global metadata indicating + // which CIDR range the cluster is using. + rpc CreateCluster(CreateClusterRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/clusters" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster"; + } + + // Updates the settings for a specific cluster. + rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + body: "*" + additional_bindings { + put: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id,update"; + } + + // Updates the version and/or image type of a specific node pool. + rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { + option (google.api.http) = { + put: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" + body: "*" + } + }; + } + + // Sets the autoscaling settings of a specific node pool. + rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) + returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" + body: "*" + } + }; + } + + // Sets the logging service for a specific cluster. + rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,logging_service"; + } + + // Sets the monitoring service for a specific cluster. + rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,monitoring_service"; + } + + // Sets the addons for a specific cluster. + rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,addons_config"; + } + + // Sets the locations for a specific cluster. + // Deprecated. Use + // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) + // instead. + rpc SetLocations(SetLocationsRequest) returns (Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,locations"; + } + + // Updates the master for a specific cluster. + rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,master_version"; + } + + // Sets master auth materials. Currently supports changing the admin password + // or a specific cluster, either via password generation or explicitly setting + // the password. + rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" + body: "*" + } + }; + } + + // Deletes the cluster, including the Kubernetes endpoint and all worker + // nodes. + // + // Firewalls and routes that were configured during cluster creation + // are also deleted. + // + // Other Google Compute Engine resources that might be in use by the cluster, + // such as load balancer resources, are not deleted if they weren't present + // when the cluster was initially created. + rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + additional_bindings { + delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + } + + // Lists all operations in a project in the specified zone or all zones. + rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/operations" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/operations" + } + }; + option (google.api.method_signature) = "project_id,zone"; + } + + // Gets the specified operation. + rpc GetOperation(GetOperationRequest) returns (Operation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/operations/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + }; + option (google.api.method_signature) = "project_id,zone,operation_id"; + } + + // Cancels the specified operation. + rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,operation_id"; + } + + // Returns configuration info about the Google Kubernetes Engine service. + rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*}/serverConfig" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" + } + }; + option (google.api.method_signature) = "project_id,zone"; + } + + // Gets the public component of the cluster signing keys in + // JSON Web Key format. + rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + }; + } + + // Lists the node pools for a cluster. + rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + } + + // Retrieves the requested node pool. + rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + } + + // Creates a node pool for a cluster. + rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool"; + } + + // Deletes a node pool from a cluster. + rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" + additional_bindings { + delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + } + + // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to + // complete. + rpc CompleteNodePoolUpgrade(CompleteNodePoolUpgradeRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade" + body: "*" + }; + } + + // Rolls back a previously Aborted or Failed NodePool upgrade. + // This makes no changes if the last upgrade successfully completed. + rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) + returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id"; + } + + // Sets the NodeManagement options for a node pool. + rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,node_pool_id,management"; + } + + // Sets labels on a cluster. + rpc SetLabels(SetLabelsRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,resource_labels,label_fingerprint"; + } + + // Enables or disables the ABAC authorization mechanism on a cluster. + rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; + } + + // Starts master IP rotation. + rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + } + + // Completes master IP rotation. + rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" + body: "*" + } + }; + option (google.api.method_signature) = "project_id,zone,cluster_id"; + } + + // SetNodePoolSizeRequest sets the size of a node pool. The new size will be + // used for all replicas, including future replicas created by modifying + // [NodePool.locations][google.container.v1beta1.NodePool.locations]. + rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" + body: "*" + } + }; + } + + // Enables or disables Network Policy for a cluster. + rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,network_policy"; + } + + // Sets the maintenance policy for a cluster. + rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" + body: "*" + additional_bindings { + post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" + body: "*" + } + }; + option (google.api.method_signature) = + "project_id,zone,cluster_id,maintenance_policy"; + } + + // Lists subnetworks that can be used for creating clusters in a project. + rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) + returns (ListUsableSubnetworksResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" + }; + option (google.api.method_signature) = "parent"; + } + + // Checks the cluster compatibility with Autopilot mode, and returns a list of + // compatibility issues. + rpc CheckAutopilotCompatibility(CheckAutopilotCompatibilityRequest) + returns (CheckAutopilotCompatibilityResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + }; + } + + // Fetches locations that offer Google Kubernetes Engine. + rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/locations" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Parameters that can be configured on Linux nodes. +message LinuxNodeConfig { + // Possible cgroup modes that can be used. + enum CgroupMode { + // CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. + // The default for the GKE node OS image will be used. + CGROUP_MODE_UNSPECIFIED = 0; + + // CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on + // the node image. + CGROUP_MODE_V1 = 1; + + // CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on + // the node image. + CGROUP_MODE_V2 = 2; + } + + // Hugepages amount in both 2m and 1g size + message HugepagesConfig { + // Optional. Amount of 2M hugepages + optional int32 hugepage_size2m = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of 1G hugepages + optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The Linux kernel parameters to be applied to the nodes and all pods running + // on the nodes. + // + // The following parameters are supported. + // + // net.core.busy_poll + // net.core.busy_read + // net.core.netdev_max_backlog + // net.core.rmem_max + // net.core.wmem_default + // net.core.wmem_max + // net.core.optmem_max + // net.core.somaxconn + // net.ipv4.tcp_rmem + // net.ipv4.tcp_wmem + // net.ipv4.tcp_tw_reuse + map sysctls = 1; + + // cgroup_mode specifies the cgroup mode to be used on the node. + CgroupMode cgroup_mode = 2; + + // Optional. Amounts for 2M and 1G hugepages + optional HugepagesConfig hugepages = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Parameters that can be configured on Windows nodes. +// Windows Node Config that define the parameters that will be used to +// configure the Windows node pool settings +message WindowsNodeConfig { + // Possible OS version that can be used. + enum OSVersion { + // When OSVersion is not specified + OS_VERSION_UNSPECIFIED = 0; + + // LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image + OS_VERSION_LTSC2019 = 1; + + // LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image + OS_VERSION_LTSC2022 = 2; + } + + // OSVersion specifies the Windows node config to be used on the node + OSVersion os_version = 1; +} + +// Node kubelet configs. +message NodeKubeletConfig { + // Control the CPU management policy on the node. + // See + // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ + // + // The following values are allowed. + // * "none": the default, which represents the existing scheduling behavior. + // * "static": allows pods with certain resource characteristics to be granted + // increased CPU affinity and exclusivity on the node. + // The default value is 'none' if unspecified. + string cpu_manager_policy = 1; + + // Enable CPU CFS quota enforcement for containers that specify CPU limits. + // + // This option is enabled by default which makes kubelet use CFS quota + // (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to + // enforce container CPU limits. Otherwise, CPU limits will not be enforced at + // all. + // + // Disable this option to mitigate CPU throttling problems while still having + // your pods to be in Guaranteed QoS class by specifying the CPU limits. + // + // The default value is 'true' if unspecified. + google.protobuf.BoolValue cpu_cfs_quota = 2; + + // Set the CPU CFS quota period value 'cpu.cfs_period_us'. + // + // The string must be a sequence of decimal numbers, each with optional + // fraction and a unit suffix, such as "300ms". + // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + // The value must be a positive duration. + string cpu_cfs_quota_period = 3; + + // Set the Pod PID limits. See + // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits + // + // Controls the maximum number of processes allowed to run in a pod. The value + // must be greater than or equal to 1024 and less than 4194304. + int64 pod_pids_limit = 4; + + // Enable or disable Kubelet read only port. + optional bool insecure_kubelet_readonly_port_enabled = 7; +} + +// Parameters that describe the nodes in a cluster. +// +// GKE Autopilot clusters do not +// recognize parameters in `NodeConfig`. Use +// [AutoprovisioningNodePoolDefaults][google.container.v1beta1.AutoprovisioningNodePoolDefaults] +// instead. +message NodeConfig { + // The name of a Google Compute Engine [machine + // type](https://cloud.google.com/compute/docs/machine-types). + // + // If unspecified, the default machine type is + // `e2-medium`. + string machine_type = 1; + + // Size of the disk attached to each node, specified in GB. + // The smallest allowed disk size is 10GB. + // + // If unspecified, the default disk size is 100GB. + int32 disk_size_gb = 2; + + // The set of Google API scopes to be made available on all of the + // node VMs under the "default" service account. + // + // The following scopes are recommended, but not required, and by default are + // not included: + // + // * `https://www.googleapis.com/auth/compute` is required for mounting + // persistent storage on your nodes. + // * `https://www.googleapis.com/auth/devstorage.read_only` is required for + // communicating with **gcr.io** + // (the [Google Container + // Registry](https://cloud.google.com/container-registry/)). + // + // If unspecified, no scopes are added, unless Cloud Logging or Cloud + // Monitoring are enabled, in which case their required scopes will be added. + repeated string oauth_scopes = 3; + + // The Google Cloud Platform Service Account to be used by the node VMs. + // Specify the email address of the Service Account; otherwise, if no Service + // Account is specified, the "default" service account is used. + string service_account = 9; + + // The metadata key/value pairs assigned to instances in the cluster. + // + // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes + // in length. These are reflected as part of a URL in the metadata server. + // Additionally, to avoid ambiguity, keys must not conflict with any other + // metadata keys for the project or be one of the reserved keys: + // + // - "cluster-location" + // - "cluster-name" + // - "cluster-uid" + // - "configure-sh" + // - "containerd-configure-sh" + // - "enable-oslogin" + // - "gci-ensure-gke-docker" + // - "gci-metrics-enabled" + // - "gci-update-strategy" + // - "instance-template" + // - "kube-env" + // - "startup-script" + // - "user-data" + // - "disable-address-manager" + // - "windows-startup-script-ps1" + // - "common-psm1" + // - "k8s-node-setup-psm1" + // - "install-ssh-psm1" + // - "user-profile-psm1" + // + // Values are free-form strings, and only have meaning as interpreted by + // the image running in the instance. The only restriction placed on them is + // that each value's size must be less than or equal to 32 KB. + // + // The total size of all keys and values must be less than 512 KB. + map metadata = 4; + + // The image type to use for this node. Note that for a given image type, + // the latest version of it will be used. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 5; + + // The map of Kubernetes labels (key/value pairs) to be applied to each node. + // These will added in addition to any default label(s) that + // Kubernetes may apply to the node. + // In case of conflict in label keys, the applied set may differ depending on + // the Kubernetes version -- it's best to assume the behavior is undefined + // and conflicts should be avoided. + // For more information, including usage and the valid values, see: + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + map labels = 6; + + // The number of local SSD disks to be attached to the node. + // + // The limit for this value is dependent upon the maximum number of + // disks available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + int32 local_ssd_count = 7; + + // The list of instance tags applied to all nodes. Tags are used to identify + // valid sources or targets for network firewalls and are specified by + // the client during cluster or node pool creation. Each tag within the list + // must comply with RFC1035. + repeated string tags = 8; + + // Whether the nodes are created as preemptible VM instances. See: + // https://cloud.google.com/compute/docs/instances/preemptible for more + // information about preemptible VM instances. + bool preemptible = 10; + + // A list of hardware accelerators to be attached to each node. + // See https://cloud.google.com/compute/docs/gpus for more information about + // support for GPUs. + repeated AcceleratorConfig accelerators = 11; + + // Sandbox configuration for this node. + SandboxConfig sandbox_config = 17; + + // Setting this field will assign instances of this + // pool to run on the specified node group. This is useful for running + // workloads on [sole tenant + // nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). + string node_group = 18; + + // The optional reservation affinity. Setting this field will apply + // the specified [Zonal Compute + // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + // to this node pool. + ReservationAffinity reservation_affinity = 19; + + // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or + // 'pd-balanced') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 12; + + // Minimum CPU platform to be used by this instance. The instance may be + // scheduled on the specified or newer CPU platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: "Intel Haswell"` or + // `minCpuPlatform: "Intel Sandy Bridge"`. For more + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). + string min_cpu_platform = 13; + + // The workload metadata configuration for this node. + WorkloadMetadataConfig workload_metadata_config = 14; + + // List of kubernetes taints to be applied to each node. + // + // For more information, including usage and the valid values, see: + // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + repeated NodeTaint taints = 15; + + // + // The Customer Managed Encryption Key used to encrypt the boot disk attached + // to each node in the node pool. This should be of the form + // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. + // For more information about protecting resources with Cloud KMS Keys please + // see: + // https://cloud.google.com/compute/docs/disks/customer-managed-encryption + string boot_disk_kms_key = 23; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 20; + + // Parameters that can be configured on Linux nodes. + LinuxNodeConfig linux_node_config = 21; + + // Node kubelet configs. + NodeKubeletConfig kubelet_config = 22; + + // Parameters for the ephemeral storage filesystem. + // If unspecified, ephemeral storage is backed by the boot disk. + EphemeralStorageConfig ephemeral_storage_config = 24; + + // GCFS (Google Container File System) configs. + GcfsConfig gcfs_config = 25; + + // Advanced features for the Compute Engine VM. + AdvancedMachineFeatures advanced_machine_features = 26; + + // Enable or disable gvnic on the node pool. + VirtualNIC gvnic = 29; + + // Spot flag for enabling Spot VM, which is a rebrand of + // the existing preemptible flag. + bool spot = 32; + + // Confidential nodes config. + // All the nodes in the node pool will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 35; + + // Enable or disable NCCL fast socket for the node pool. + optional FastSocket fast_socket = 36; + + // The resource labels for the node pool to use to annotate any related + // Google Compute Engine resources. + map resource_labels = 37; + + // Logging configuration. + NodePoolLoggingConfig logging_config = 38; + + // Parameters that can be configured on Windows nodes. + WindowsNodeConfig windows_node_config = 39; + + // Parameters for using raw-block Local NVMe SSDs. + LocalNvmeSsdBlockConfig local_nvme_ssd_block_config = 40; + + // Parameters for the node ephemeral storage using Local SSDs. + // If unspecified, ephemeral storage is backed by the boot disk. + // This field is functionally equivalent to the ephemeral_storage_config + EphemeralStorageLocalSsdConfig ephemeral_storage_local_ssd_config = 41; + + // Parameters for node pools to be backed by shared sole tenant node groups. + SoleTenantConfig sole_tenant_config = 42; + + // Parameters for containerd customization. + ContainerdConfig containerd_config = 43; + + // HostMaintenancePolicy contains the desired maintenance policy for the + // Google Compute Engine hosts. + HostMaintenancePolicy host_maintenance_policy = 44; + + // A map of resource manager tag keys and values to be attached to the nodes. + ResourceManagerTags resource_manager_tags = 45; + + // Optional. Reserved for future use. + bool enable_confidential_storage = 46 + [(google.api.field_behavior) = OPTIONAL]; + + // List of secondary boot disks attached to the nodes. + repeated SecondaryBootDisk secondary_boot_disks = 48; + + // Secondary boot disk update strategy. + optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = + 50; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number of threads + // supported per core by the underlying processor is assumed. + optional int64 threads_per_core = 1; + + // Whether or not to enable nested virtualization (defaults to false). + optional bool enable_nested_virtualization = 2; +} + +// Parameters for node pool-level network config. +message NodeNetworkConfig { + // Configuration of all network bandwidth tiers + message NetworkPerformanceConfig { + // Node network tier + enum Tier { + // Default value + TIER_UNSPECIFIED = 0; + + // Higher bandwidth, actual values based on VM size. + TIER_1 = 1; + } + + // Specifies the total network bandwidth tier for the NodePool. + optional Tier total_egress_bandwidth_tier = 1; + + // Specifies the network bandwidth tier for the NodePool for traffic to + // external/public IP addresses. + optional Tier external_ip_egress_bandwidth_tier = 2; + } + + // Input only. Whether to create a new range for pod IPs in this node pool. + // Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they + // are not specified. + // + // If neither `create_pod_range` or `pod_range` are specified, the + // cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is + // used. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + bool create_pod_range = 4 [(google.api.field_behavior) = INPUT_ONLY]; + + // The ID of the secondary range for pod IPs. + // If `create_pod_range` is true, this ID is used for the new range. + // If `create_pod_range` is false, uses an existing secondary range with this + // ID. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + string pod_range = 5; + + // The IP address range for pod IPs in this node pool. + // + // Only applicable if `create_pod_range` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) to pick a specific range to use. + // + // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. + // + // This field cannot be changed after the node pool has been created. + string pod_ipv4_cidr_block = 6; + + // Whether nodes have internal IP addresses only. + // If enable_private_nodes is not specified, then the value is derived from + // [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] + optional bool enable_private_nodes = 9; + + // Network bandwidth tier configuration. + optional NetworkPerformanceConfig network_performance_config = 11; + + // [PRIVATE FIELD] + // Pod CIDR size overprovisioning config for the nodepool. + // + // Pod CIDR size per node depends on max_pods_per_node. By default, the value + // of max_pods_per_node is rounded off to next power of 2 and we then double + // that to get the size of pod CIDR block per node. + // Example: max_pods_per_node of 30 would result in 64 IPs (/26). + // + // This config can disable the doubling of IPs (we still round off to next + // power of 2) + // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when + // overprovisioning is disabled. + PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13; + + // We specify the additional node networks for this node pool using this list. + // Each node network corresponds to an additional interface + repeated AdditionalNodeNetworkConfig additional_node_network_configs = 14; + + // We specify the additional pod networks for this node pool using this list. + // Each pod network corresponds to an additional alias IP range for the node + repeated AdditionalPodNetworkConfig additional_pod_network_configs = 15; + + // Output only. The utilization of the IPv4 range for the pod. + // The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. + double pod_ipv4_range_utilization = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AdditionalNodeNetworkConfig is the configuration for additional node networks +// within the NodeNetworkConfig message +message AdditionalNodeNetworkConfig { + // Name of the VPC where the additional interface belongs + string network = 1; + + // Name of the subnetwork where the additional interface belongs + string subnetwork = 2; +} + +// AdditionalPodNetworkConfig is the configuration for additional pod networks +// within the NodeNetworkConfig message +message AdditionalPodNetworkConfig { + // Name of the subnetwork where the additional pod network belongs. + string subnetwork = 1; + + // The name of the secondary range on the subnet which provides IP address for + // this pod range. + string secondary_pod_range = 2; + + // The maximum number of pods per node which use this pod network. + optional MaxPodsConstraint max_pods_per_node = 3; +} + +// A set of Shielded Instance options. +message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. + bool enable_integrity_monitoring = 2; +} + +// SandboxConfig contains configurations of the sandbox to use for the node. +message SandboxConfig { + // Possible types of sandboxes. + enum Type { + // Default value. This should not be used. + UNSPECIFIED = 0; + + // Run sandbox using gvisor. + GVISOR = 1; + } + + // Type of the sandbox to use for the node (e.g. 'gvisor') + string sandbox_type = 1 [deprecated = true]; + + // Type of the sandbox to use for the node. + Type type = 2; +} + +// EphemeralStorageConfig contains configuration for the ephemeral storage +// filesystem. +message EphemeralStorageConfig { + // Number of local SSDs to use to back ephemeral storage. Uses NVMe + // interfaces. The limit for this value is dependent upon the maximum number + // of disk available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + // + // A zero (or unset) value has different meanings depending on machine type + // being used: + // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, + // zero (or unset) means to disable using local SSDs as ephemeral storage. + // 2. For Gen3 machines which dictate a specific number of local ssds, zero + // (or unset) means to use the default number of local ssds that goes with + // that machine type. For example, for a c3-standard-8-lssd machine, 2 local + // ssds would be provisioned. For c3-standard-8 (which doesn't support local + // ssds), 0 will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. + int32 local_ssd_count = 1; +} + +// LocalNvmeSsdBlockConfig contains configuration for using raw-block local +// NVMe SSDs +message LocalNvmeSsdBlockConfig { + // Number of local NVMe SSDs to use. The limit for this value is dependent + // upon the maximum number of disk available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + // + // A zero (or unset) value has different meanings depending on machine type + // being used: + // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, + // zero (or unset) means to disable using local SSDs as ephemeral storage. + // 2. For Gen3 machines which dictate a specific number of local ssds, zero + // (or unset) means to use the default number of local ssds that goes with + // that machine type. For example, for a c3-standard-8-lssd machine, 2 local + // ssds would be provisioned. For c3-standard-8 (which doesn't support local + // ssds), 0 will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. + int32 local_ssd_count = 1; +} + +// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral +// storage using Local SSDs. +message EphemeralStorageLocalSsdConfig { + // Number of local SSDs to use to back ephemeral storage. Uses NVMe + // interfaces. + // + // A zero (or unset) value has different meanings depending on machine type + // being used: + // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, + // zero (or unset) means to disable using local SSDs as ephemeral storage. The + // limit for this value is dependent upon the maximum number of disk + // available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd + // for more information. + // 2. For Gen3 machines which dictate a specific number of local ssds, zero + // (or unset) means to use the default number of local ssds that goes with + // that machine type. For example, for a c3-standard-8-lssd machine, 2 local + // ssds would be provisioned. For c3-standard-8 (which doesn't support local + // ssds), 0 will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. + int32 local_ssd_count = 1; +} + +// GcfsConfig contains configurations of Google Container File System. +message GcfsConfig { + // Whether to use GCFS. + bool enabled = 1; +} + +// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) +// is the configuration of desired reservation which instances could take +// capacity from. +message ReservationAffinity { + // Indicates whether to consume capacity from a reservation or not. + enum Type { + // Default value. This should not be used. + UNSPECIFIED = 0; + + // Do not consume from any reserved capacity. + NO_RESERVATION = 1; + + // Consume any reservation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Corresponds to the type of reservation consumption. + Type consume_reservation_type = 1; + + // Corresponds to the label key of a reservation resource. To target a + // SPECIFIC_RESERVATION by name, specify + // "compute.googleapis.com/reservation-name" as the key and specify the name + // of your reservation as its value. + string key = 2; + + // Corresponds to the label value(s) of reservation resource(s). + repeated string values = 3; +} + +// SoleTenantConfig contains the NodeAffinities to specify what shared sole +// tenant node groups should back the node pool. +message SoleTenantConfig { + // Specifies the NodeAffinity key, values, and affinity operator according to + // [shared sole tenant node group + // affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). + message NodeAffinity { + // Operator allows user to specify affinity or anti-affinity for the + // given key values. + enum Operator { + // Invalid or unspecified affinity operator. + OPERATOR_UNSPECIFIED = 0; + + // Affinity operator. + IN = 1; + + // Anti-affinity operator. + NOT_IN = 2; + } + + // Key for NodeAffinity. + string key = 1; + + // Operator for NodeAffinity. + Operator operator = 2; + + // Values for NodeAffinity. + repeated string values = 3; + } + + // NodeAffinities used to match to a shared sole tenant node group. + repeated NodeAffinity node_affinities = 1; +} + +// ContainerdConfig contains configuration to customize containerd. +message ContainerdConfig { + // PrivateRegistryAccessConfig contains access configuration for + // private container registries. + message PrivateRegistryAccessConfig { + // CertificateAuthorityDomainConfig configures one or more fully qualified + // domain names (FQDN) to a specific certificate. + message CertificateAuthorityDomainConfig { + // GCPSecretManagerCertificateConfig configures a secret from + // [Google Secret Manager](https://cloud.google.com/secret-manager). + message GCPSecretManagerCertificateConfig { + // Secret URI, in the form + // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". + // Version can be fixed (e.g. "2") or "latest" + string secret_uri = 1; + } + + // List of fully qualified domain names (FQDN). + // Specifying port is supported. + // Wilcards are NOT supported. + // Examples: + // - my.customdomain.com + // - 10.0.1.2:5000 + repeated string fqdns = 1; + + // Certificate access config. The following are supported: + // - GCPSecretManagerCertificateConfig + oneof certificate_config { + // Google Secret Manager (GCP) certificate configuration. + GCPSecretManagerCertificateConfig + gcp_secret_manager_certificate_config = 2; + } + } + + // Private registry access is enabled. + bool enabled = 1; + + // Private registry access configuration. + repeated CertificateAuthorityDomainConfig + certificate_authority_domain_config = 2; + } + + // PrivateRegistryAccessConfig is used to configure access configuration + // for private container registries. + PrivateRegistryAccessConfig private_registry_access_config = 1; +} + +// HostMaintenancePolicy contains the maintenance policy for the hosts on which +// the GKE VMs run on. +message HostMaintenancePolicy { + // Allows selecting how infrastructure upgrades should be applied to the + // cluster or node pool. + enum MaintenanceInterval { + // The maintenance interval is not explicitly specified. + MAINTENANCE_INTERVAL_UNSPECIFIED = 0; + + // Nodes are eligible to receive infrastructure and hypervisor updates as + // they become available. This may result in more maintenance operations + // (live migrations or terminations) for the node than the PERIODIC option. + AS_NEEDED = 1; + + // Nodes receive infrastructure and hypervisor updates on a periodic basis, + // minimizing the number of maintenance operations (live migrations or + // terminations) on an individual VM. This may mean underlying VMs will + // take longer to receive an update than if it was configured for + // AS_NEEDED. Security updates will still be applied as soon + // as they are available. + PERIODIC = 2; + } + + // Strategy that will trigger maintenance on behalf of the customer. + message OpportunisticMaintenanceStrategy { + // The amount of time that a node can remain idle (no customer owned + // workloads running), before triggering maintenance. + optional google.protobuf.Duration node_idle_time_window = 1; + + // The window of time that opportunistic maintenance can run. Example: A + // setting of 14 days implies that opportunistic maintenance can only be ran + // in the 2 weeks leading up to the scheduled maintenance date. Setting 28 + // days allows opportunistic maintenance to run at any time in the scheduled + // maintenance window (all `PERIODIC` maintenance is set 28 days in + // advance). + optional google.protobuf.Duration maintenance_availability_window = 2; + + // The minimum nodes required to be available in a pool. Blocks maintenance + // if it would cause the number of running nodes to dip below this value. + optional int64 min_nodes_per_pool = 3; + } + + // Specifies the frequency of planned maintenance events. + optional MaintenanceInterval maintenance_interval = 1; + + // Set of host maintenance strategies available to the customer, all require + // the maintenance_interval to be PERIODIC. If no strategy is set, and the + // interval is periodic, customer will be expected to trigger maintenance + // manually or let maintenance trigger at its initial scheduled time. + oneof maintenance_strategy { + // Strategy that will trigger maintenance on behalf of the customer. + OpportunisticMaintenanceStrategy opportunistic_maintenance_strategy = 2; + } +} + +// Kubernetes taint is composed of three fields: key, value, and effect. Effect +// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. +// +// See +// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) +// for more information, including usage and the valid values. +message NodeTaint { + // Possible values for Effect in taint. + enum Effect { + // Not set + EFFECT_UNSPECIFIED = 0; + + // NoSchedule + NO_SCHEDULE = 1; + + // PreferNoSchedule + PREFER_NO_SCHEDULE = 2; + + // NoExecute + NO_EXECUTE = 3; + } + + // Key for taint. + string key = 1; + + // Value for taint. + string value = 2; + + // Effect for taint. + Effect effect = 3; +} + +// Collection of Kubernetes [node +// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). +message NodeTaints { + // List of node taints. + repeated NodeTaint taints = 1; +} + +// Collection of node-level [Kubernetes +// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). +message NodeLabels { + // Map of node label keys and node label values. + map labels = 1; +} + +// Collection of [GCP +// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). +message ResourceLabels { + // Map of node label keys and node label values. + map labels = 1; +} + +// Collection of Compute Engine network tags that can be applied to a node's +// underlying VM instance. (See `tags` field in +// [`NodeConfig`](/kubernetes-engine/docs/reference/rest/v1/NodeConfig)). +message NetworkTags { + // List of network tags. + repeated string tags = 1; +} + +// The authentication information for accessing the master endpoint. +// Authentication can be done using HTTP basic auth or using client +// certificates. +message MasterAuth { + // The username to use for HTTP basic authentication to the master endpoint. + // For clusters v1.6.0 and later, basic authentication can be disabled by + // leaving username unspecified (or setting it to the empty string). + // + // Warning: basic authentication is deprecated, and will be removed in GKE + // control plane versions 1.19 and newer. For a list of recommended + // authentication methods, see: + // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication + string username = 1 [deprecated = true]; + + // The password to use for HTTP basic authentication to the master endpoint. + // Because the master endpoint is open to the Internet, you should create a + // strong password. If a password is provided for cluster creation, username + // must be non-empty. + // + // Warning: basic authentication is deprecated, and will be removed in GKE + // control plane versions 1.19 and newer. For a list of recommended + // authentication methods, see: + // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication + string password = 2 [deprecated = true]; + + // Configuration for client certificate authentication on the cluster. For + // clusters before v1.12, if no configuration is specified, a client + // certificate is issued. + ClientCertificateConfig client_certificate_config = 3; + + // Output only. Base64-encoded public certificate that is the root of + // trust for the cluster. + string cluster_ca_certificate = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base64-encoded public certificate used by clients to + // authenticate to the cluster endpoint. + string client_certificate = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base64-encoded private key used by clients to authenticate + // to the cluster endpoint. + string client_key = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for client certificates on the cluster. +message ClientCertificateConfig { + // Issue a client certificate. + bool issue_client_certificate = 1; +} + +// Configuration for the addons that can be automatically spun up in the +// cluster, enabling additional functionality. +message AddonsConfig { + // Configuration for the HTTP (L7) load balancing controller addon, which + // makes it easy to set up HTTP load balancers for services in a cluster. + HttpLoadBalancing http_load_balancing = 1; + + // Configuration for the horizontal pod autoscaling feature, which + // increases or decreases the number of replica pods a replication controller + // has based on the resource usage of the existing pods. + HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; + + // Configuration for the Kubernetes Dashboard. + // This addon is deprecated, and will be disabled in 1.15. It is recommended + // to use the Cloud Console to manage and monitor your Kubernetes clusters, + // workloads and applications. For more information, see: + // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards + KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; + + // Configuration for NetworkPolicy. This only tracks whether the addon + // is enabled or not on the Master, it does not track whether network policy + // is enabled for the nodes. + NetworkPolicyConfig network_policy_config = 4; + + // Configuration for Istio, an open platform to connect, manage, and secure + // microservices. + IstioConfig istio_config = 5 [deprecated = true]; + + // Configuration for the Cloud Run addon. The `IstioConfig` addon must be + // enabled in order to enable Cloud Run addon. This option can only be enabled + // at cluster creation time. + CloudRunConfig cloud_run_config = 7; + + // Configuration for NodeLocalDNS, a dns cache running on cluster nodes + DnsCacheConfig dns_cache_config = 8; + + // Configuration for the ConfigConnector add-on, a Kubernetes + // extension to manage hosted GCP services through the Kubernetes API + ConfigConnectorConfig config_connector_config = 10; + + // Configuration for the Compute Engine Persistent Disk CSI driver. + GcePersistentDiskCsiDriverConfig gce_persistent_disk_csi_driver_config = 11; + + // Configuration for the KALM addon, which manages the lifecycle of k8s + // applications. + KalmConfig kalm_config = 12 [deprecated = true]; + + // Configuration for the GCP Filestore CSI driver. + GcpFilestoreCsiDriverConfig gcp_filestore_csi_driver_config = 14; + + // Configuration for the Backup for GKE agent addon. + GkeBackupAgentConfig gke_backup_agent_config = 16; + + // Configuration for the Cloud Storage Fuse CSI driver. + GcsFuseCsiDriverConfig gcs_fuse_csi_driver_config = 17; + + // Optional. Configuration for the StatefulHA add-on. + StatefulHAConfig stateful_ha_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Ray Operator addon. + RayOperatorConfig ray_operator_config = 21 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the HTTP (L7) load balancing controller addon, +// which makes it easy to set up HTTP load balancers for services in a cluster. +message HttpLoadBalancing { + // Whether the HTTP Load Balancing controller is enabled in the cluster. + // When enabled, it runs a small pod in the cluster that manages the load + // balancers. + bool disabled = 1; +} + +// Configuration options for the horizontal pod autoscaling feature, which +// increases or decreases the number of replica pods a replication controller +// has based on the resource usage of the existing pods. +message HorizontalPodAutoscaling { + // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. + // When enabled, it ensures that metrics are collected into Stackdriver + // Monitoring. + bool disabled = 1; +} + +// Configuration for the Kubernetes Dashboard. +message KubernetesDashboard { + // Whether the Kubernetes Dashboard is enabled for this cluster. + bool disabled = 1; +} + +// Configuration for NetworkPolicy. This only tracks whether the addon +// is enabled or not on the Master, it does not track whether network policy +// is enabled for the nodes. +message NetworkPolicyConfig { + // Whether NetworkPolicy is enabled for this cluster. + bool disabled = 1; +} + +// Configuration for NodeLocal DNSCache +message DnsCacheConfig { + // Whether NodeLocal DNSCache is enabled for this cluster. + bool enabled = 1; +} + +// Configuration options for the KALM addon. +message KalmConfig { + // Whether KALM is enabled for this cluster. + bool enabled = 1 [deprecated = true]; +} + +// Configuration for the Backup for GKE Agent. +message GkeBackupAgentConfig { + // Whether the Backup for GKE agent is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Stateful HA add-on. +message StatefulHAConfig { + // Whether the Stateful HA add-on is enabled for this cluster. + bool enabled = 1; +} + +// Configuration options for the Config Connector add-on. +message ConfigConnectorConfig { + // Whether Cloud Connector is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Compute Engine PD CSI driver. +message GcePersistentDiskCsiDriverConfig { + // Whether the Compute Engine PD CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the GCP Filestore CSI driver. +message GcpFilestoreCsiDriverConfig { + // Whether the GCP Filestore CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration for the Cloud Storage Fuse CSI driver. +message GcsFuseCsiDriverConfig { + // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. + bool enabled = 1; +} + +// Configuration options for the Ray Operator add-on. +message RayOperatorConfig { + // Whether the Ray addon is enabled for this cluster. + bool enabled = 1; + + // Optional. Logging configuration for Ray clusters. + RayClusterLoggingConfig ray_cluster_logging_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Monitoring configuration for Ray clusters. + RayClusterMonitoringConfig ray_cluster_monitoring_config = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for controlling master global access settings. +message PrivateClusterMasterGlobalAccessConfig { + // Whenever master is accessible globally or not. + bool enabled = 1; +} + +// Configuration options for private clusters. +message PrivateClusterConfig { + // Whether nodes have internal IP addresses only. If enabled, all nodes are + // given only RFC 1918 private addresses and communicate with the master via + // private networking. + bool enable_private_nodes = 1; + + // Whether the master's internal IP address is used as the cluster endpoint. + bool enable_private_endpoint = 2; + + // The IP range in CIDR notation to use for the hosted master network. This + // range will be used for assigning internal IP addresses to the master or + // set of masters, as well as the ILB VIP. This range must not overlap with + // any other ranges in use within the cluster's network. + string master_ipv4_cidr_block = 3; + + // Output only. The internal IP address of this cluster's master endpoint. + string private_endpoint = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The external IP address of this cluster's master endpoint. + string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The peering name in the customer VPC used by this cluster. + string peering_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Controls master global access settings. + PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8; + + // Subnet to provision the master's private endpoint during cluster creation. + // Specified in projects/*/regions/*/subnetworks/* format. + string private_endpoint_subnetwork = 10; +} + +// Configuration options for Istio addon. +message IstioConfig { + // Istio auth mode, https://istio.io/docs/concepts/security/mutual-tls.html + enum IstioAuthMode { + // auth not enabled + AUTH_NONE = 0; + + // auth mutual TLS enabled + AUTH_MUTUAL_TLS = 1; + } + + // Whether Istio is enabled for this cluster. + bool disabled = 1 [deprecated = true]; + + // The specified Istio auth mode, either none, or mutual TLS. + IstioAuthMode auth = 2 [deprecated = true]; +} + +// Configuration options for the Cloud Run feature. +message CloudRunConfig { + // Load balancer type of ingress service of Cloud Run. + enum LoadBalancerType { + // Load balancer type for Cloud Run is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Install external load balancer for Cloud Run. + LOAD_BALANCER_TYPE_EXTERNAL = 1; + + // Install internal load balancer for Cloud Run. + LOAD_BALANCER_TYPE_INTERNAL = 2; + } + + // Whether Cloud Run addon is enabled for this cluster. + bool disabled = 1; + + // Which load balancer type is installed for Cloud Run. + LoadBalancerType load_balancer_type = 3; +} + +// Configuration options for the master authorized networks feature. Enabled +// master authorized networks will disallow all external traffic to access +// Kubernetes master through HTTPS except traffic from the given CIDR blocks, +// Google Compute Engine Public IPs and Google Prod IPs. +message MasterAuthorizedNetworksConfig { + // CidrBlock contains an optional name and one CIDR block. + message CidrBlock { + // display_name is an optional field for users to identify CIDR blocks. + string display_name = 1; + + // cidr_block must be specified in CIDR notation. + string cidr_block = 2; + } + + // Whether or not master authorized networks is enabled. + bool enabled = 1; + + // cidr_blocks define up to 10 external networks that could access + // Kubernetes master through HTTPS. + repeated CidrBlock cidr_blocks = 2; + + // Whether master is accessbile via Google Compute Engine Public IP addresses. + optional bool gcp_public_cidrs_access_enabled = 3; +} + +// Configuration for the legacy Attribute Based Access Control authorization +// mode. +message LegacyAbac { + // Whether the ABAC authorizer is enabled for this cluster. When enabled, + // identities in the system, including service accounts, nodes, and + // controllers, will have statically granted permissions beyond those + // provided by the RBAC configuration or IAM. + bool enabled = 1; +} + +// Configuration options for the NetworkPolicy feature. +// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ +message NetworkPolicy { + // Allowed Network Policy providers. + enum Provider { + // Not set + PROVIDER_UNSPECIFIED = 0; + + // Tigera (Calico Felix). + CALICO = 1; + } + + // The selected network policy provider. + Provider provider = 1; + + // Whether network policy is enabled on the cluster. + bool enabled = 2; +} + +// [PRIVATE FIELD] +// Config for pod CIDR size overprovisioning. +message PodCIDROverprovisionConfig { + // Whether Pod CIDR overprovisioning is disabled. + // Note: Pod CIDR overprovisioning is enabled by default. + bool disable = 1; +} + +// Configuration for controlling how IPs are allocated in the cluster. +message IPAllocationPolicy { + // Possible values for IP stack type + enum StackType { + // By default, the clusters will be IPV4 only + STACK_TYPE_UNSPECIFIED = 0; + + // The value used if the cluster is a IPV4 only + IPV4 = 1; + + // The value used if the cluster is a dual stack cluster + IPV4_IPV6 = 2; + } + + // IPv6 access type + enum IPv6AccessType { + // Default value, will be defaulted as type external. + IPV6_ACCESS_TYPE_UNSPECIFIED = 0; + + // Access type internal (all v6 addresses are internal IPs) + INTERNAL = 1; + + // Access type external (all v6 addresses are external IPs) + EXTERNAL = 2; + } + + // Whether alias IPs will be used for pod IPs in the cluster. + // This is used in conjunction with use_routes. It cannot + // be true if use_routes is true. If both use_ip_aliases and use_routes are + // false, then the server picks the default IP allocation mode + bool use_ip_aliases = 1; + + // Whether a new subnetwork will be created automatically for the cluster. + // + // This field is only applicable when `use_ip_aliases` is true. + bool create_subnetwork = 2; + + // A custom subnetwork name to be used if `create_subnetwork` is true. If + // this field is empty, then an automatic name will be chosen for the new + // subnetwork. + string subnetwork_name = 3; + + // This field is deprecated, use cluster_ipv4_cidr_block. + string cluster_ipv4_cidr = 4 [deprecated = true]; + + // This field is deprecated, use node_ipv4_cidr_block. + string node_ipv4_cidr = 5 [deprecated = true]; + + // This field is deprecated, use services_ipv4_cidr_block. + string services_ipv4_cidr = 6 [deprecated = true]; + + // The name of the secondary range to be used for the cluster CIDR + // block. The secondary range will be used for pod IP + // addresses. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases and + // create_subnetwork is false. + string cluster_secondary_range_name = 7; + + // The name of the secondary range to be used as for the services + // CIDR block. The secondary range will be used for service + // ClusterIPs. This must be an existing secondary range associated + // with the cluster subnetwork. + // + // This field is only applicable with use_ip_aliases and + // create_subnetwork is false. + string services_secondary_range_name = 8; + + // The IP address range for the cluster pod IPs. If this field is set, then + // `cluster.cluster_ipv4_cidr` must be left blank. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string cluster_ipv4_cidr_block = 9; + + // The IP address range of the instance IPs in this cluster. + // + // This is applicable only if `create_subnetwork` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string node_ipv4_cidr_block = 10; + + // The IP address range of the services IPs in this cluster. If blank, a range + // will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // Set to blank to have a range chosen with the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string services_ipv4_cidr_block = 11; + + // If true, allow allocation of cluster CIDR ranges that overlap with certain + // kinds of network routes. By default we do not allow cluster CIDR ranges to + // intersect with any user declared routes. With allow_route_overlap == true, + // we allow overlapping with CIDR ranges that are larger than the cluster CIDR + // range. + // + // If this field is set to true, then cluster and services CIDRs must be + // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means: + // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and + // `services_ipv4_cidr_block` must be fully-specified. + // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse be + // fully-specified. + bool allow_route_overlap = 12; + + // The IP address range of the Cloud TPUs in this cluster. If unspecified, a + // range will be automatically chosen with the default size. + // + // This field is only applicable when `use_ip_aliases` is true. + // + // If unspecified, the range will use the default size. + // + // Set to /netmask (e.g. `/14`) to have a range chosen with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // This field is deprecated, use cluster.tpu_config.ipv4_cidr_block instead. + string tpu_ipv4_cidr_block = 13; + + // Whether routes will be used for pod IPs in the cluster. + // This is used in conjunction with use_ip_aliases. It cannot be true if + // use_ip_aliases is true. If both use_ip_aliases and use_routes are false, + // then the server picks the default IP allocation mode + bool use_routes = 15; + + // IP stack type + StackType stack_type = 16; + + // The ipv6 access type (internal or external) when create_subnetwork is true + IPv6AccessType ipv6_access_type = 17; + + // [PRIVATE FIELD] + // Pod CIDR size overprovisioning config for the cluster. + // + // Pod CIDR size per node depends on max_pods_per_node. By default, the value + // of max_pods_per_node is doubled and then rounded off to next power of 2 to + // get the size of pod CIDR block per node. + // Example: max_pods_per_node of 30 would result in 64 IPs (/26). + // + // This config can disable the doubling of IPs (we still round off to next + // power of 2) + // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when + // overprovisioning is disabled. + PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21; + + // Output only. The subnet's IPv6 CIDR block used by nodes and pods. + string subnet_ipv6_cidr_block = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The services IPv6 CIDR block for the cluster. + string services_ipv6_cidr_block = 23 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The additional pod ranges that are added to the cluster. + // These pod ranges can be used by new node pools to allocate pod IPs + // automatically. Once the range is removed it will not show up in + // IPAllocationPolicy. + AdditionalPodRangesConfig additional_pod_ranges_config = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The utilization of the cluster default IPv4 range for the + // pod. The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. + double default_pod_ipv4_range_utilization = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for Binary Authorization. +message BinaryAuthorization { + // Binary Authorization mode of operation. + enum EvaluationMode { + // Default value + EVALUATION_MODE_UNSPECIFIED = 0; + + // Disable BinaryAuthorization + DISABLED = 1; + + // Enforce Kubernetes admission requests with BinaryAuthorization using the + // project's singleton policy. This is equivalent to setting the + // enabled boolean to true. + PROJECT_SINGLETON_POLICY_ENFORCE = 2; + + // Use Binary Authorization Continuous Validation with the policies + // specified in policy_bindings. + POLICY_BINDINGS = 5; + + // Use Binary Authorization Continuous Validation with the policies + // specified in policy_bindings and enforce Kubernetes admission requests + // with Binary Authorization using the project's singleton policy. + POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE = 6; + } + + // Binauthz policy that applies to this cluster. + message PolicyBinding { + // The relative resource name of the binauthz platform policy to evaluate. + // GKE platform policies have the following format: + // `projects/{project_number}/platforms/gke/policies/{policy_id}`. + optional string name = 1; + } + + // This field is deprecated. Leave this unset and instead configure + // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to + // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. + bool enabled = 1 [deprecated = true]; + + // Mode of operation for binauthz policy evaluation. If unspecified, defaults + // to DISABLED. + EvaluationMode evaluation_mode = 2; + + // Optional. Binauthz policies that apply to this cluster. + repeated PolicyBinding policy_bindings = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the PodSecurityPolicy feature. +message PodSecurityPolicyConfig { + // Enable the PodSecurityPolicy controller for this cluster. If enabled, pods + // must be valid under a PodSecurityPolicy to be created. + bool enabled = 1; +} + +// Configuration for returning group information from authenticators. +message AuthenticatorGroupsConfig { + // Whether this cluster should return group membership lookups + // during authentication using a group of security groups. + bool enabled = 1; + + // The name of the security group-of-groups to be used. Only relevant + // if enabled = true. + string security_group = 2; +} + +// Telemetry integration for the cluster. +message ClusterTelemetry { + // Type of the integration. + enum Type { + // Not set. + UNSPECIFIED = 0; + + // Monitoring integration is disabled. + DISABLED = 1; + + // Monitoring integration is enabled. + ENABLED = 2; + + // Only system components are monitored and logged. + SYSTEM_ONLY = 3; + } + + // Type of the integration. + Type type = 1; +} + +// A Google Kubernetes Engine cluster. +message Cluster { + // The current status of the cluster. + enum Status { + // Not set. + STATUS_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 master or node software. Details can + // be found in the `statusMessage` field. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster may be unusable. Details + // can be found in the `statusMessage` field. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to restore + // full functionality. Details can be found in the `statusMessage` field. + DEGRADED = 6; + } + + // The name of this cluster. The name must be unique within this project + // and location (e.g. zone or region), and can be up to 40 characters with + // the following restrictions: + // + // * Lowercase letters, numbers, and hyphens only. + // * Must start with a letter. + // * Must end with a number or a letter. + string name = 1; + + // An optional description of this cluster. + string description = 2; + + // The number of nodes to create in this cluster. You must ensure that your + // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // is sufficient for this number of instances. You must also have available + // firewall and routes quota. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with the + // "node_config") will be used to create a "NodePool" object with an + // auto-generated name. Do not use this and a node_pool at the same time. + // + // This field is deprecated, use node_pool.initial_node_count instead. + int32 initial_node_count = 3 [deprecated = true]; + + // Parameters used in creating the cluster's nodes. + // For requests, this field should only be used in lieu of a + // "node_pool" object, since this configuration (along with the + // "initial_node_count") will be used to create a "NodePool" object with an + // auto-generated name. Do not use this and a node_pool at the same time. + // For responses, this field will be populated with the node configuration of + // the first node pool. (For configuration of each node pool, see + // `node_pool.config`) + // + // If unspecified, the defaults are used. + // This field is deprecated, use node_pool.config instead. + NodeConfig node_config = 4 [deprecated = true]; + + // The authentication information for accessing the master endpoint. + // If unspecified, the defaults are used: + // For clusters before v1.12, if master_auth is unspecified, `username` will + // be set to "admin", a random password will be generated, and a client + // certificate will be issued. + MasterAuth master_auth = 5; + + // The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string logging_service = 6; + + // The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string monitoring_service = 7; + + // The name of the Google Compute Engine + // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + // to which the cluster is connected. If left unspecified, the `default` + // network will be used. On output this shows the network ID instead of the + // name. + string network = 8; + + // The IP address range of the container pods in this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`). Leave blank to have + // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. + string cluster_ipv4_cidr = 9; + + // Configurations for the various addons available to run in the cluster. + AddonsConfig addons_config = 10; + + // The name of the Google Compute Engine + // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which + // the cluster is connected. On output this shows the subnetwork ID instead of + // the name. + string subnetwork = 11; + + // The node pools associated with this cluster. + // This field should not be set if "node_config" or "initial_node_count" are + // specified. + repeated NodePool node_pools = 12; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. + // + // This field provides a default value if + // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) + // are not specified during node pool creation. + // + // Warning: changing cluster locations will update the + // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) + // of all node pools and will result in nodes being added and/or removed. + repeated string locations = 13; + + // Kubernetes alpha features are enabled on this cluster. This includes alpha + // API groups (e.g. v1beta1) and features that may not be production ready in + // the kubernetes version of the master and nodes. + // The cluster has no SLA for uptime and master/node upgrades are disabled. + // Alpha enabled clusters are automatically deleted thirty days after + // creation. + bool enable_kubernetes_alpha = 14; + + // Kubernetes open source beta apis enabled on the cluster. Only beta apis. + K8sBetaAPIConfig enable_k8s_beta_apis = 143; + + // The resource labels for the cluster to use to annotate any related + // Google Compute Engine resources. + map resource_labels = 15; + + // The fingerprint of the set of labels for this cluster. + string label_fingerprint = 16; + + // Configuration for the legacy ABAC authorization mode. + LegacyAbac legacy_abac = 18; + + // Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 19; + + // Configuration for cluster IP allocation. + IPAllocationPolicy ip_allocation_policy = 20; + + // The configuration options for master authorized networks feature. + MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; + + // Configure the maintenance policy for this cluster. + MaintenancePolicy maintenance_policy = 23; + + // Configuration for Binary Authorization. + BinaryAuthorization binary_authorization = 24; + + // Configuration for the PodSecurityPolicy feature. + PodSecurityPolicyConfig pod_security_policy_config = 25; + + // Cluster-level autoscaling configuration. + ClusterAutoscaling autoscaling = 26; + + // Configuration for cluster networking. + NetworkConfig network_config = 27; + + // If this is a private cluster setup. Private clusters are clusters that, by + // default have no external IP addresses on the nodes and where nodes and the + // master communicate over private IP addresses. + // This field is deprecated, use private_cluster_config.enable_private_nodes + // instead. + bool private_cluster = 28 [deprecated = true]; + + // The IP prefix in CIDR notation to use for the hosted master network. + // This prefix will be used for assigning private IP addresses to the + // master or set of masters, as well as the ILB VIP. + // This field is deprecated, use + // private_cluster_config.master_ipv4_cidr_block instead. + string master_ipv4_cidr_block = 29 [deprecated = true]; + + // The default constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool of this cluster. Only honored + // if cluster created with IP Alias support. + MaxPodsConstraint default_max_pods_constraint = 30; + + // Configuration for exporting resource usages. Resource usage export is + // disabled when this config unspecified. + ResourceUsageExportConfig resource_usage_export_config = 33; + + // Configuration controlling RBAC group membership information. + AuthenticatorGroupsConfig authenticator_groups_config = 34; + + // Configuration for private cluster. + PrivateClusterConfig private_cluster_config = 37; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling vertical_pod_autoscaling = 39; + + // Shielded Nodes configuration. + ShieldedNodes shielded_nodes = 40; + + // Release channel configuration. If left unspecified on cluster creation and + // a version is specified, the cluster is enrolled in the most mature release + // channel where the version is available (first checking STABLE, then + // REGULAR, and finally RAPID). Otherwise, if no release channel + // configuration and no version is specified, the cluster is enrolled in the + // REGULAR channel with its default version. + ReleaseChannel release_channel = 41; + + // Configuration for the use of Kubernetes Service Accounts in GCP IAM + // policies. + WorkloadIdentityConfig workload_identity_config = 43; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + WorkloadCertificates workload_certificates = 52; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + MeshCertificates mesh_certificates = 67; + + // Configuration for direct-path (via ALTS) with workload identity. + WorkloadALTSConfig workload_alts_config = 53; + + // Configuration for the fine-grained cost management feature. + CostManagementConfig cost_management_config = 45; + + // Telemetry integration for the cluster. + ClusterTelemetry cluster_telemetry = 46; + + // Configuration for Cloud TPU support; + TpuConfig tpu_config = 47; + + // Notification configuration of the cluster. + NotificationConfig notification_config = 49; + + // Configuration of Confidential Nodes. + // All the nodes in the cluster will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 50; + + // Configuration for Identity Service component. + IdentityServiceConfig identity_service_config = 54; + + // Output only. Server-defined URL for the resource. + string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field is deprecated, use location instead. + string zone = 101 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP address of this cluster's master endpoint. + // The endpoint can be accessed from the internet at + // `https://username:password@endpoint/`. + // + // See the `masterAuth` property of this resource for username and + // password information. + string endpoint = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The initial Kubernetes version for this cluster. Valid versions are those + // found in validMasterVersions returned by getServerConfig. The version can + // be upgraded over time; such upgrades are reflected in + // currentMasterVersion and currentNodeVersion. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "","-": picks the default Kubernetes version + string initial_cluster_version = 103; + + // Output only. The current software version of the master endpoint. + string current_master_version = 104 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated, use + // [NodePool.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) + // instead. The current version of the node software components. + // If they are currently at multiple versions because they're in the process + // of being upgraded, this reflects the minimum version of all nodes. + string current_node_version = 105 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the cluster was created, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string create_time = 106 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current status of this cluster. + Status status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use conditions instead. + // Additional information about the current status of this + // cluster, if available. + string status_message = 108 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the address space on each node for hosting + // containers. This is provisioned from within the `container_ipv4_cidr` + // range. This field will only be set when cluster is in route-based network + // mode. + int32 node_ipv4_cidr_size = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP address range of the Kubernetes services in + // this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `1.2.3.4/29`). Service addresses are + // typically put in the last `/16` from the container CIDR. + string services_ipv4_cidr = 110 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use node_pools.instance_group_urls. + repeated string instance_group_urls = 111 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of nodes currently in the cluster. Deprecated. + // Call Kubernetes API directly to retrieve node information. + int32 current_node_count = 112 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the cluster will be automatically + // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string expire_time = 113 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // in which the cluster resides. + string location = 114 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable the ability to use Cloud TPUs in this cluster. + // This field is deprecated, use tpu_config.enabled instead. + bool enable_tpu = 115; + + // Output only. The IP address range of the Cloud TPUs in this cluster, in + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `1.2.3.4/29`). + string tpu_ipv4_cidr_block = 116 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration of etcd encryption. + DatabaseEncryption database_encryption = 38; + + // Which conditions caused the current cluster state. + repeated StatusCondition conditions = 118; + + // Configuration for master components. + Master master = 124; + + // Autopilot configuration for the cluster. + Autopilot autopilot = 128; + + // Output only. Unique id for the cluster. + string id = 129 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Default NodePool settings for the entire cluster. These settings are + // overridden if specified on the specific NodePool object. + optional NodePoolDefaults node_pool_defaults = 131; + + // Logging configuration for the cluster. + LoggingConfig logging_config = 132; + + // Monitoring configuration for the cluster. + MonitoringConfig monitoring_config = 133; + + // Node pool configs that apply to all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NodePoolAutoConfig node_pool_auto_config = 136; + + // Deprecated: Use SecurityPostureConfig instead. + // Enable/Disable Protect API features for the cluster. + optional ProtectConfig protect_config = 137 [deprecated = true]; + + // This checksum is computed by the server based on the value of cluster + // fields, and may be sent on update requests to ensure the client has an + // up-to-date value before proceeding. + string etag = 139; + + // Fleet information for the cluster. + Fleet fleet = 140; + + // Enable/Disable Security Posture API features for the cluster. + SecurityPostureConfig security_posture_config = 145; + + // GKE Enterprise Configuration. + EnterpriseConfig enterprise_config = 149; + + // Secret CSI driver configuration. + SecretManagerConfig secret_manager_config = 150; + + // Enable/Disable Compliance Posture features for the cluster. + CompliancePostureConfig compliance_posture_config = 151; + + // Output only. Reserved for future use. + optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CompliancePostureConfig defines the settings needed to enable/disable +// features for the Compliance Posture. +message CompliancePostureConfig { + // Mode defines enablement mode for Compliance Posture. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Compliance Posture features on the cluster. + DISABLED = 1; + + // Enables Compliance Posture features on the cluster. + ENABLED = 2; + } + + // Defines the details of a compliance standard. + message ComplianceStandard { + // Name of the compliance standard. + optional string standard = 1; + } + + // Defines the enablement mode for Compliance Posture. + optional Mode mode = 1; + + // List of enabled compliance standards. + repeated ComplianceStandard compliance_standards = 2; +} + +// Kubernetes open source beta apis enabled on the cluster. +message K8sBetaAPIConfig { + // api name, e.g. storage.k8s.io/v1beta1/csistoragecapacities. + repeated string enabled_apis = 1; +} + +// WorkloadConfig defines the flags to enable or disable the +// workload configurations for the cluster. +message WorkloadConfig { + // Mode defines how to audit the workload configs. + enum Mode { + // Default value meaning that no mode has been specified. + MODE_UNSPECIFIED = 0; + + // This disables Workload Configuration auditing on the cluster, + // meaning that nothing is surfaced. + DISABLED = 1; + + // Applies the default set of policy auditing to a cluster's workloads. + BASIC = 4; + + // Surfaces configurations that are not in line with the + // Pod Security Standard Baseline policy. + BASELINE = 2 [deprecated = true]; + + // Surfaces configurations that are not in line with the + // Pod Security Standard Restricted policy. + RESTRICTED = 3 [deprecated = true]; + } + + // Sets which mode of auditing should be used for the cluster's workloads. + optional Mode audit_mode = 1; +} + +// ProtectConfig defines the flags needed to enable/disable features for the +// Protect API. +message ProtectConfig { + // WorkloadVulnerabilityMode defines mode to perform vulnerability scanning. + enum WorkloadVulnerabilityMode { + // Default value not specified. + WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED = 0; + + // Disables Workload Vulnerability Scanning feature on the cluster. + DISABLED = 1; + + // Applies basic vulnerability scanning settings for cluster workloads. + BASIC = 2; + } + + // WorkloadConfig defines which actions are enabled for a cluster's workload + // configurations. + optional WorkloadConfig workload_config = 1; + + // Sets which mode to use for Protect workload vulnerability scanning feature. + optional WorkloadVulnerabilityMode workload_vulnerability_mode = 2; +} + +// SecurityPostureConfig defines the flags needed to enable/disable features for +// the Security Posture API. +message SecurityPostureConfig { + // Mode defines enablement mode for GKE Security posture features. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Security Posture features on the cluster. + DISABLED = 1; + + // Applies Security Posture features on the cluster. + BASIC = 2; + + // Applies the Security Posture off cluster Enterprise level features. + ENTERPRISE = 3; + } + + // VulnerabilityMode defines enablement mode for vulnerability scanning. + enum VulnerabilityMode { + // Default value not specified. + VULNERABILITY_MODE_UNSPECIFIED = 0; + + // Disables vulnerability scanning on the cluster. + VULNERABILITY_DISABLED = 1; + + // Applies basic vulnerability scanning on the cluster. + VULNERABILITY_BASIC = 2; + + // Applies the Security Posture's vulnerability on cluster Enterprise level + // features. + VULNERABILITY_ENTERPRISE = 3; + } + + // Sets which mode to use for Security Posture features. + optional Mode mode = 1; + + // Sets which mode to use for vulnerability scanning. + optional VulnerabilityMode vulnerability_mode = 2; +} + +// Subset of Nodepool message that has defaults. +message NodePoolDefaults { + // Subset of NodeConfig message that has defaults. + NodeConfigDefaults node_config_defaults = 1; +} + +// Subset of NodeConfig message that has defaults. +message NodeConfigDefaults { + // GCFS (Google Container File System, also known as Riptide) options. + GcfsConfig gcfs_config = 1; + + // Logging configuration for node pools. + NodePoolLoggingConfig logging_config = 3; + + // Parameters for containerd customization. + ContainerdConfig containerd_config = 4; + + // HostMaintenancePolicy contains the desired maintenance policy for the + // Google Compute Engine hosts. + HostMaintenancePolicy host_maintenance_policy = 5; + + // NodeKubeletConfig controls the defaults for new node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 6; +} + +// node pool configs that apply to all auto-provisioned node pools +// in autopilot clusters and node auto-provisioning enabled clusters +message NodePoolAutoConfig { + // The list of instance tags applied to all nodes. Tags are used to identify + // valid sources or targets for network firewalls and are specified by + // the client during cluster creation. Each tag within the list + // must comply with RFC1035. + NetworkTags network_tags = 1; + + // Resource manager tag keys and values to be attached to the nodes + // for managing Compute Engine firewalls using Network Firewall Policies. + ResourceManagerTags resource_manager_tags = 2; + + // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. + // + // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. + NodeKubeletConfig node_kubelet_config = 3; +} + +// ClusterUpdate describes an update to the cluster. Exactly one update can +// be applied to a cluster with each request, so at most one field can be +// provided. +message ClusterUpdate { + // The Kubernetes version to change the nodes to (typically an + // upgrade). + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the Kubernetes master version + string desired_node_version = 4; + + // The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string desired_monitoring_service = 5; + + // Configurations for the various addons available to run in the cluster. + AddonsConfig desired_addons_config = 6; + + // The node pool to be upgraded. This field is mandatory if + // "desired_node_version", "desired_image_family", + // "desired_node_pool_autoscaling", or "desired_workload_metadata_config" + // is specified and there is more than one node pool on the cluster. + string desired_node_pool_id = 7; + + // The desired image type for the node pool. + // NOTE: Set the "desired_node_pool" field as well. + string desired_image_type = 8; + + // Autoscaler configuration for the node pool specified in + // desired_node_pool_id. If there is only one pool in the + // cluster and desired_node_pool_id is not provided then + // the change applies to that single node pool. + NodePoolAutoscaling desired_node_pool_autoscaling = 9; + + // The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. + // + // This list must always include the cluster's primary zone. + // + // Warning: changing cluster locations will update the locations of all node + // pools and will result in nodes being added and/or removed. + repeated string desired_locations = 10; + + // The desired configuration options for master authorized networks feature. + MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; + + // The desired configuration options for the PodSecurityPolicy feature. + PodSecurityPolicyConfig desired_pod_security_policy_config = 14; + + // Cluster-level autoscaling configuration. + ClusterAutoscaling desired_cluster_autoscaling = 15; + + // The desired configuration options for the Binary Authorization feature. + BinaryAuthorization desired_binary_authorization = 16; + + // The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string desired_logging_service = 19; + + // The desired configuration for exporting resource usage. + ResourceUsageExportConfig desired_resource_usage_export_config = 21; + + // Cluster-level Vertical Pod Autoscaling configuration. + VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; + + // The desired private cluster configuration. master_global_access_config is + // the only field that can be changed via this field. + // See also + // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1beta1.ClusterUpdate.desired_enable_private_endpoint] + // for modifying other fields within + // [PrivateClusterConfig][google.container.v1beta1.PrivateClusterConfig]. + PrivateClusterConfig desired_private_cluster_config = 25; + + // The desired config of Intra-node visibility. + IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; + + // The desired status of whether to disable default sNAT for this cluster. + DefaultSnatStatus desired_default_snat_status = 28; + + // The desired telemetry integration for the cluster. + ClusterTelemetry desired_cluster_telemetry = 30; + + // The desired release channel configuration. + ReleaseChannel desired_release_channel = 31; + + // The desired private cluster configuration. Has no effect. Use + // [desired_private_cluster_config][google.container.v1beta1.ClusterUpdate.desired_private_cluster_config] + // instead. + PrivateClusterConfig private_cluster_config = 37 [deprecated = true]; + + // The desired Cloud TPU configuration. + TpuConfig desired_tpu_config = 38; + + // The desired L4 Internal Load Balancer Subsetting configuration. + ILBSubsettingConfig desired_l4ilb_subsetting_config = 39; + + // The desired datapath provider for the cluster. + DatapathProvider desired_datapath_provider = 50; + + // The desired state of IPv6 connectivity to Google Services. + PrivateIPv6GoogleAccess desired_private_ipv6_google_access = 51; + + // The desired notification configuration. + NotificationConfig desired_notification_config = 55; + + // The Kubernetes version to change the master to. The only valid value is the + // latest supported version. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the default Kubernetes version + string desired_master_version = 100; + + // The desired GCFS config for the cluster. + GcfsConfig desired_gcfs_config = 109; + + // Configuration of etcd encryption. + DatabaseEncryption desired_database_encryption = 46; + + // Configuration for Workload Identity. + WorkloadIdentityConfig desired_workload_identity_config = 47; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + WorkloadCertificates desired_workload_certificates = 61; + + // Configuration for issuance of mTLS keys and certificates to Kubernetes + // pods. + MeshCertificates desired_mesh_certificates = 67; + + // Configuration for direct-path (via ALTS) with workload identity. + WorkloadALTSConfig desired_workload_alts_config = 62; + + // Configuration for Shielded Nodes. + ShieldedNodes desired_shielded_nodes = 48; + + // The desired configuration for the fine-grained cost management feature. + CostManagementConfig desired_cost_management_config = 49; + + // Configuration for master components. + Master desired_master = 52; + + // DNSConfig contains clusterDNS config for this cluster. + DNSConfig desired_dns_config = 53; + + // ServiceExternalIPsConfig specifies the config for the use of Services with + // ExternalIPs field. + ServiceExternalIPsConfig desired_service_external_ips_config = 60; + + // AuthenticatorGroupsConfig specifies the config for the cluster security + // groups settings. + AuthenticatorGroupsConfig desired_authenticator_groups_config = 63; + + // The desired logging configuration. + LoggingConfig desired_logging_config = 64; + + // The desired monitoring configuration. + MonitoringConfig desired_monitoring_config = 65; + + // The desired Identity Service component configuration. + IdentityServiceConfig desired_identity_service_config = 66; + + // Enable/Disable private endpoint for the cluster's master. + optional bool desired_enable_private_endpoint = 71; + + // The desired network tags that apply to all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NetworkTags desired_node_pool_auto_config_network_tags = 110; + + // Deprecated: Use DesiredSecurityPostureConfig instead. + // Enable/Disable Protect API features for the cluster. + optional ProtectConfig desired_protect_config = 112 [deprecated = true]; + + // The desired config of Gateway API on this cluster. + GatewayAPIConfig desired_gateway_api_config = 114; + + // The current etag of the cluster. + // If an etag is provided and does not match the current etag of the cluster, + // update will be blocked and an ABORTED error will be returned. + string etag = 115; + + // The desired node pool logging configuration defaults for the cluster. + NodePoolLoggingConfig desired_node_pool_logging_config = 116; + + // The desired fleet configuration for the cluster. + Fleet desired_fleet = 117; + + // The desired stack type of the cluster. + // If a stack type is provided and does not match the current stack type of + // the cluster, update will attempt to change the stack type to the new type. + StackType desired_stack_type = 119; + + // The additional pod ranges to be added to the cluster. These pod ranges + // can be used by node pools to allocate pod IPs. + AdditionalPodRangesConfig additional_pod_ranges_config = 120; + + // The additional pod ranges that are to be removed from the cluster. + // The pod ranges specified here must have been specified earlier in the + // 'additional_pod_ranges_config' argument. + AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121; + + // Kubernetes open source beta apis enabled on the cluster. Only beta apis + K8sBetaAPIConfig enable_k8s_beta_apis = 122; + + // Enable/Disable Security Posture API features for the cluster. + SecurityPostureConfig desired_security_posture_config = 124; + + // The desired network performance config. + NetworkConfig.ClusterNetworkPerformanceConfig + desired_network_performance_config = 125; + + // Enable/Disable FQDN Network Policy for the cluster. + optional bool desired_enable_fqdn_network_policy = 126; + + // The desired workload policy configuration for the autopilot cluster. + WorkloadPolicyConfig desired_autopilot_workload_policy_config = 128; + + // Beta APIs enabled for cluster. + K8sBetaAPIConfig desired_k8s_beta_apis = 131; + + // HostMaintenancePolicy contains the desired maintenance policy for the + // Google Compute Engine hosts. + HostMaintenancePolicy desired_host_maintenance_policy = 132; + + // The desired containerd config for the cluster. + ContainerdConfig desired_containerd_config = 134; + + // Enable/Disable Multi-Networking for the cluster + optional bool desired_enable_multi_networking = 135; + + // The desired resource manager tags that apply to all auto-provisioned node + // pools in autopilot clusters and node auto-provisioning enabled clusters. + ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; + + // Specify the details of in-transit encryption. + // Now named inter-node transparent encryption. + optional InTransitEncryptionConfig desired_in_transit_encryption_config = 137; + + // Enable/Disable Cilium Clusterwide Network Policy for the cluster. + optional bool desired_enable_cilium_clusterwide_network_policy = 138; + + // Enable/Disable Secret Manager Config. + optional SecretManagerConfig desired_secret_manager_config = 139; + + // The desired node kubelet config for the cluster. + NodeKubeletConfig desired_node_kubelet_config = 141; + + // The desired node kubelet config for all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; +} + +// AdditionalPodRangesConfig is the configuration for additional pod secondary +// ranges supporting the ClusterUpdate message. +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; + + // Output only. Information for additional pod range. + repeated RangeInfo pod_range_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RangeInfo contains the range name and the range utilization by this cluster. +message RangeInfo { + // Output only. Name of a range. + string range_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The utilization of the range. + double utilization = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This operation resource represents operations that may have happened or are +// happening on the cluster. All fields are output only. +message Operation { + // Current status of the operation. + enum Status { + // Not set. + STATUS_UNSPECIFIED = 0; + + // The operation has been created. + PENDING = 1; + + // The operation is currently running. + RUNNING = 2; + + // The operation is done, either cancelled or completed. + DONE = 3; + + // The operation is aborting. + ABORTING = 4; + } + + // Operation type categorizes the operation. + enum Type { + // Not set. + TYPE_UNSPECIFIED = 0; + + // The cluster is being created. The cluster should be assumed to be + // unusable until the operation finishes. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and eventually be deleted. + CREATE_CLUSTER = 1; + + // The cluster is being deleted. The cluster should be assumed to be + // unusable as soon as this operation starts. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and the deletion will be automatically + // retried until completed. + DELETE_CLUSTER = 2; + + // The [cluster + // version][google.container.v1beta1.ClusterUpdate.desired_master_version] + // is being updated. Note that this includes "upgrades" to the same version, + // which are simply a recreation. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). + // For more details, see [documentation on cluster + // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). + UPGRADE_MASTER = 3; + + // A node pool is being updated. Despite calling this an "upgrade", this + // includes most forms of updates to node pools. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). + // + // This operation sets the + // [progress][google.container.v1beta1.Operation.progress] field and may be + // [canceled][google.container.v1beta1.ClusterManager.CancelOperation]. + // + // The upgrade strategy depends on [node pool + // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). + // The nodes are generally still usable during this operation. + UPGRADE_NODES = 4; + + // A problem has been detected with the control plane and is being repaired. + // This operation type is initiated by GKE. For more details, see + // [documentation on + // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + REPAIR_CLUSTER = 5; + + // The cluster is being updated. This is a broad category of operations and + // includes operations that only change metadata as well as those that must + // recreate the entire cluster. If the control plane must be recreated, this + // will cause temporary downtime for zonal clusters. + // + // Some features require recreating the nodes as well. Those will be + // recreated as separate operations and the update may not be completely + // functional until the node pools recreations finish. Node recreations will + // generally follow [maintenance + // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). + // + // Some GKE-initiated operations use this type. This includes certain types + // of auto-upgrades and incident mitigations. + UPDATE_CLUSTER = 6; + + // A node pool is being created. The node pool should be assumed to be + // unusable until this operation finishes. In the event of an error, the + // node pool may be partially created. + // + // If enabled, [node + // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) + // may have automatically initiated such operations. + CREATE_NODE_POOL = 7; + + // The node pool is being deleted. The node pool should be assumed to be + // unusable as soon as this operation starts. + DELETE_NODE_POOL = 8; + + // The node pool's + // [manamagent][google.container.v1beta1.NodePool.management] field is being + // updated. These operations only update metadata and may be concurrent with + // most other operations. + SET_NODE_POOL_MANAGEMENT = 9; + + // A problem has been detected with nodes and [they are being + // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). + // This operation type is initiated by GKE, typically automatically. This + // operation may be concurrent with other operations and there may be + // multiple repairs occurring on the same node pool. + AUTO_REPAIR_NODES = 10; + + // Unused. Automatic node upgrade uses + // [UPGRADE_NODES][google.container.v1beta1.Operation.Type.UPGRADE_NODES]. + AUTO_UPGRADE_NODES = 11 [deprecated = true]; + + // Unused. Updating labels uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_LABELS = 12 [deprecated = true]; + + // Unused. Updating master auth uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_MASTER_AUTH = 13 [deprecated = true]; + + // The node pool is being resized. With the exception of resizing to or from + // size zero, the node pool is generally usable during this operation. + SET_NODE_POOL_SIZE = 14; + + // Unused. Updating network policy uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_NETWORK_POLICY = 15 [deprecated = true]; + + // Unused. Updating maintenance policy uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_MAINTENANCE_POLICY = 16 [deprecated = true]; + + // The control plane is being resized. This operation type is initiated by + // GKE. These operations are often performed preemptively to ensure that the + // control plane has sufficient resources and is not typically an indication + // of issues. For more details, see + // [documentation on + // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + RESIZE_CLUSTER = 18; + + // Fleet features of GKE Enterprise are being upgraded. The cluster should + // be assumed to be blocked for other upgrades until the operation finishes. + FLEET_FEATURE_UPGRADE = 19; + } + + // Output only. The server-assigned ID for the operation. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // operation is taking place. This field is deprecated, use location instead. + string zone = 2 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The operation type. + Type operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current status of the operation. + Status status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed operation progress, if available. + string detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If an error has occurred, a textual description of the error. + // Deprecated. Use field error instead. + string status_message = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined URI for the operation. Example: + // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. + string self_link = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined URI for the target of the operation. The format + // of this is a URI to the resource being modified (such as a cluster, node + // pool, or node). For node pool repairs, there may be multiple nodes being + // repaired, but only one will be the target. + // + // Examples: + // + // - + // ## + // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` + // + // ## + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` + // + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` + string target_link = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // or + // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) + // in which the cluster resides. + string location = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation started, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string start_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation completed, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string end_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Progress information for an operation. + OperationProgress progress = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which conditions caused the current cluster state. + // Deprecated. Use field error instead. + repeated StatusCondition cluster_conditions = 13 [deprecated = true]; + + // Which conditions caused the current node pool state. + // Deprecated. Use field error instead. + repeated StatusCondition nodepool_conditions = 14 [deprecated = true]; + + // The error result of the operation in case of failure. + google.rpc.Status error = 15; +} + +// Information about operation (or operation stage) progress. +message OperationProgress { + // Progress metric is (string, int|float|string) pair. + message Metric { + // Required. Metric name, e.g., "nodes total", "percent done". + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Strictly one of the values is required. + oneof value { + // For metrics with integer value. + int64 int_value = 2; + + // For metrics with floating point value. + double double_value = 3; + + // For metrics with custom values (ratios, visual progress, etc.). + string string_value = 4; + } + } + + // A non-parameterized string describing an operation stage. + // Unset for single-stage operations. + string name = 1; + + // Status of an operation stage. + // Unset for single-stage operations. + Operation.Status status = 2; + + // Progress metric bundle, for example: + // metrics: [{name: "nodes done", int_value: 15}, + // {name: "nodes total", int_value: 32}] + // or + // metrics: [{name: "progress", double_value: 0.56}, + // {name: "progress scale", double_value: 1.0}] + repeated Metric metrics = 3; + + // Substages of an operation or a stage. + repeated OperationProgress stages = 4; +} + +// CreateClusterRequest creates a cluster. +message CreateClusterRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. A [cluster + // resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; + + // The parent (project and location) where the cluster will be created. + // Specified in the format `projects/*/locations/*`. + string parent = 5; +} + +// GetClusterRequest gets the settings of a cluster. +message GetClusterRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to retrieve. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to retrieve. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// UpdateClusterRequest updates the settings of a cluster. +message UpdateClusterRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. A description of the update. + ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// SetNodePoolVersionRequest updates the version of a node pool. +message UpdateNodePoolRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to upgrade. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The Kubernetes version to change the nodes to (typically an + // upgrade). + // + // Users may specify either explicit versions offered by Kubernetes Engine or + // version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the Kubernetes master version + string node_version = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired image type for the node pool. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 6 [(google.api.field_behavior) = REQUIRED]; + + // The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // node pool's nodes should be located. Changing the locations for a node pool + // will result in nodes being either created or removed from the node pool, + // depending on whether locations are being added or removed. + repeated string locations = 13; + + // The desired workload metadata config for the node pool. + WorkloadMetadataConfig workload_metadata_config = 14; + + // The name (project, location, cluster, node pool) of the node pool to + // update. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 8; + + // Upgrade settings control disruption and speed of the upgrade. + NodePool.UpgradeSettings upgrade_settings = 15; + + // The desired network tags to be applied to all nodes in the node pool. + // If this field is not present, the tags will not be changed. Otherwise, + // the existing network tags will be *replaced* with the provided tags. + NetworkTags tags = 16; + + // The desired node taints to be applied to all nodes in the node pool. + // If this field is not present, the taints will not be changed. Otherwise, + // the existing node taints will be *replaced* with the provided taints. + NodeTaints taints = 17; + + // The desired node labels to be applied to all nodes in the node pool. + // If this field is not present, the labels will not be changed. Otherwise, + // the existing node labels will be *replaced* with the provided labels. + NodeLabels labels = 18; + + // Parameters that can be configured on Linux nodes. + LinuxNodeConfig linux_node_config = 19; + + // Node kubelet configs. + NodeKubeletConfig kubelet_config = 20; + + // Node network config. + NodeNetworkConfig node_network_config = 21; + + // GCFS config. + GcfsConfig gcfs_config = 22; + + // Confidential nodes config. + // All the nodes in the node pool will be Confidential VM once enabled. + ConfidentialNodes confidential_nodes = 23; + + // Enable or disable gvnic on the node pool. + VirtualNIC gvnic = 29; + + // The current etag of the node pool. + // If an etag is provided and does not match the current etag of the node + // pool, update will be blocked and an ABORTED error will be returned. + string etag = 30; + + // Enable or disable NCCL fast socket for the node pool. + FastSocket fast_socket = 31; + + // Logging configuration. + NodePoolLoggingConfig logging_config = 32; + + // The resource labels for the node pool to use to annotate any related + // Google Compute Engine resources. + ResourceLabels resource_labels = 33; + + // Parameters that can be configured on Windows nodes. + WindowsNodeConfig windows_node_config = 34; + + // A list of hardware accelerators to be attached to each node. + // See https://cloud.google.com/compute/docs/gpus for more information about + // support for GPUs. + repeated AcceleratorConfig accelerators = 35; + + // Optional. The desired machine type for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified machine type. + string machine_type = 36 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The desired disk type for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified disk type. + string disk_type = 37 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The desired disk size for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified disk size. + int64 disk_size_gb = 38 [(google.api.field_behavior) = OPTIONAL]; + + // Desired resource manager tag keys and values to be attached to the nodes + // for managing Compute Engine firewalls using Network Firewall Policies. + // Existing tags will be replaced with new values. + ResourceManagerTags resource_manager_tags = 39; + + // The desired containerd config for nodes in the node pool. + // Initiates an upgrade operation that recreates the nodes with the new + // config. + ContainerdConfig containerd_config = 40; + + // Specifies the configuration of queued provisioning. + NodePool.QueuedProvisioning queued_provisioning = 42; +} + +// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. +message SetNodePoolAutoscalingRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to upgrade. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaling configuration for the node pool. + NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool) of the node pool to set + // autoscaler settings. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// SetLoggingServiceRequest sets the logging service of a cluster. +message SetLoggingServiceRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The logging service the cluster should use to write logs. + // Currently available options: + // + // * `logging.googleapis.com/kubernetes` - The Cloud Logging + // service with a Kubernetes-native resource model + // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + // available as of GKE 1.15). + // * `none` - no logs will be exported from the cluster. + // + // If left as an empty string,`logging.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set logging. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// SetMonitoringServiceRequest sets the monitoring service of a cluster. +message SetMonitoringServiceRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The monitoring service the cluster should use to write metrics. + // Currently available options: + // + // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + // service with a Kubernetes-native resource model + // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + // longer available as of GKE 1.15). + // * `none` - No metrics will be exported from the cluster. + // + // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set monitoring. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetAddonsRequest sets the addons associated with the cluster. +message SetAddonsConfigRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The desired configurations for the various addons available to + // run in the cluster. + AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set addons. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetLocationsRequest sets the locations of the cluster. +message SetLocationsRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The desired list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster's nodes should be located. Changing the locations a cluster is in + // will result in nodes being either created or removed from the cluster, + // depending on whether locations are being added or removed. + // + // This list must always include the cluster's primary zone. + repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set locations. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// UpdateMasterRequest updates the master of the cluster. +message UpdateMasterRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The Kubernetes version to change the master to. + // + // Users may specify either explicit versions offered by + // Kubernetes Engine or version aliases, which have the following behavior: + // + // - "latest": picks the highest valid Kubernetes version + // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + // - "1.X.Y-gke.N": picks an explicit Kubernetes version + // - "-": picks the default Kubernetes version + string master_version = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to update. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// SetMasterAuthRequest updates the admin password of a cluster. +message SetMasterAuthRequest { + // Operation type: what type update to perform. + enum Action { + // Operation is unknown and will error out. + UNKNOWN = 0; + + // Set the password to a user generated value. + SET_PASSWORD = 1; + + // Generate a new password and set it to that. + GENERATE_PASSWORD = 2; + + // Set the username. If an empty username is provided, basic authentication + // is disabled for the cluster. If a non-empty username is provided, basic + // authentication is enabled, with either a provided password or a generated + // one. + SET_USERNAME = 3; + } + + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to upgrade. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The exact form of action to be taken on the master auth. + Action action = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. A description of the update. + MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to set auth. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// DeleteClusterRequest deletes a cluster. +message DeleteClusterRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to delete. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster) of the cluster to delete. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 4; +} + +// ListClustersRequest lists clusters. +message ListClustersRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides, or "-" for all zones. This field has been deprecated and + // replaced by the parent field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The parent (project and location) where the clusters will be listed. + // Specified in the format `projects/*/locations/*`. + // Location "-" matches all zones and all regions. + string parent = 4; +} + +// ListClustersResponse is the result of ListClustersRequest. +message ListClustersResponse { + // A list of clusters in the project in the specified zone, or + // across all ones. + repeated Cluster clusters = 1; + + // If any zones are listed here, the list of clusters returned + // may be missing those zones. + repeated string missing_zones = 2; +} + +// GetOperationRequest gets a single operation. +message GetOperationRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The server-assigned `name` of the operation. + // This field has been deprecated and replaced by the name field. + string operation_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, operation id) of the operation to get. + // Specified in the format `projects/*/locations/*/operations/*`. + string name = 5; +} + +// ListOperationsRequest lists operations. +message ListOperationsRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return + // operations for, or `-` for all zones. This field has been deprecated and + // replaced by the parent field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The parent (project and location) where the operations will be listed. + // Specified in the format `projects/*/locations/*`. + // Location "-" matches all zones and all regions. + string parent = 4; +} + +// CancelOperationRequest cancels a single operation. +message CancelOperationRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // operation resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The server-assigned `name` of the operation. + // This field has been deprecated and replaced by the name field. + string operation_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, operation id) of the operation to cancel. + // Specified in the format `projects/*/locations/*/operations/*`. + string name = 4; +} + +// ListOperationsResponse is the result of ListOperationsRequest. +message ListOperationsResponse { + // A list of operations in the project in the specified zone. + repeated Operation operations = 1; + + // If any zones are listed here, the list of operations returned + // may be missing the operations from those zones. + repeated string missing_zones = 2; +} + +// Gets the current Kubernetes Engine service configuration. +message GetServerConfigRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) to return + // operations for. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project and location) of the server config to get, + // specified in the format `projects/*/locations/*`. + string name = 4; +} + +// Kubernetes Engine service configuration. +message ServerConfig { + // ReleaseChannelConfig exposes configuration for a release channel. + message ReleaseChannelConfig { + // Deprecated. + message AvailableVersion { + option deprecated = true; + + // Kubernetes version. + string version = 1; + + // Reason for availability. + string reason = 2; + } + + // The release channel this configuration applies to. + ReleaseChannel.Channel channel = 1; + + // The default version for newly created clusters on the channel. + string default_version = 2; + + // Deprecated. + // This field has been deprecated and replaced with the valid_versions + // field. + repeated AvailableVersion available_versions = 3 [deprecated = true]; + + // List of valid versions for the channel. + repeated string valid_versions = 4; + } + + // Version of Kubernetes the service deploys by default. + string default_cluster_version = 1; + + // List of valid node upgrade target versions, in descending order. + repeated string valid_node_versions = 3; + + // Default image type. + string default_image_type = 4; + + // List of valid image types. + repeated string valid_image_types = 5; + + // List of valid master versions, in descending order. + repeated string valid_master_versions = 6; + + // List of release channel configurations. + repeated ReleaseChannelConfig channels = 9; + + // Maps of Kubernetes version and supported Windows server versions. + map windows_version_maps = 10; +} + +// Best effort provisioning. +message BestEffortProvisioning { + // When this is enabled, cluster/node pool creations will ignore non-fatal + // errors like stockout to best provision as many nodes as possible right now + // and eventually bring up all target number of nodes + bool enabled = 1; + + // Minimum number of nodes to be provisioned to be considered as succeeded, + // and the rest of nodes will be provisioned gradually and eventually when + // stockout issue has been resolved. + int32 min_provision_nodes = 2; +} + +// Windows server versions. +message WindowsVersions { + // Windows server version. + message WindowsVersion { + // Windows server image type + string image_type = 1; + + // Windows server build number + string os_version = 2; + + // Mainstream support end date + google.type.Date support_end_date = 3; + } + + // List of Windows server versions. + repeated WindowsVersion windows_versions = 1; +} + +// CreateNodePoolRequest creates a node pool for a cluster. +message CreateNodePoolRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The node pool to create. + NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; + + // The parent (project, location, cluster name) where the node pool will be + // created. Specified in the format + // `projects/*/locations/*/clusters/*`. + string parent = 6; +} + +// DeleteNodePoolRequest deletes a node pool for a cluster. +message DeleteNodePoolRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to delete. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to + // delete. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// ListNodePoolsRequest lists the node pool(s) for a cluster. +message ListNodePoolsRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the parent field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the parent + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the parent field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The parent (project, location, cluster name) where the node pools will be + // listed. Specified in the format `projects/*/locations/*/clusters/*`. + string parent = 5; +} + +// GetNodePoolRequest retrieves a node pool for a cluster. +message GetNodePoolRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to + // get. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; +} + +// Settings for blue-green upgrade. +message BlueGreenSettings { + // Standard rollout policy is the default policy for blue-green. + message StandardRolloutPolicy { + // Blue pool size to drain in a batch. + oneof update_batch_size { + // Percentage of the blue pool nodes to drain in a batch. + // The range of this field should be (0.0, 1.0]. + float batch_percentage = 1; + + // Number of blue nodes to drain in a batch. + int32 batch_node_count = 2; + } + + // Soak time after each batch gets drained. Default to zero. + optional google.protobuf.Duration batch_soak_duration = 3; + } + + // Autoscaled rollout policy uses cluster autoscaler during + // blue-green upgrades to scale both the green and blue pools. + message AutoscaledRolloutPolicy {} + + // The rollout policy controls the general rollout progress of blue-green. + oneof rollout_policy { + // Standard policy for the blue-green upgrade. + StandardRolloutPolicy standard_rollout_policy = 1; + + // Autoscaled policy for cluster autoscaler enabled blue-green upgrade. + AutoscaledRolloutPolicy autoscaled_rollout_policy = 3; + } + + // Time needed after draining entire blue pool. After this period, blue pool + // will be cleaned up. + optional google.protobuf.Duration node_pool_soak_duration = 2; +} + +// NodePool contains the name and configuration for a cluster's node pool. +// Node pools are a set of nodes (i.e. VM's), with a common configuration and +// specification, under the control of the cluster master. They may have a set +// of Kubernetes labels applied to them, which may be used to reference them +// during pod scheduling. They may also be resized up or down, to accommodate +// the workload. +message NodePool { + // These upgrade settings control the level of parallelism and the level of + // disruption caused by an upgrade. + // + // maxUnavailable controls the number of nodes that can be simultaneously + // unavailable. + // + // maxSurge controls the number of additional nodes that can be added to the + // node pool temporarily for the time of the upgrade to increase the number of + // available nodes. + // + // (maxUnavailable + maxSurge) determines the level of parallelism (how many + // nodes are being upgraded at the same time). + // + // Note: upgrades inevitably introduce some disruption since workloads need to + // be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, + // this holds true. (Disruption stays within the limits of + // PodDisruptionBudget, if it is configured.) + // + // Consider a hypothetical node pool with 5 nodes having maxSurge=2, + // maxUnavailable=1. This means the upgrade process upgrades 3 nodes + // simultaneously. It creates 2 additional (upgraded) nodes, then it brings + // down 3 old (not yet upgraded) nodes at the same time. This ensures that + // there are always at least 4 nodes available. + // + // These upgrade settings configure the upgrade strategy for the node pool. + // Use strategy to switch between the strategies applied to the node pool. + // + // If the strategy is SURGE, use max_surge and max_unavailable to control + // the level of parallelism and the level of disruption caused by upgrade. + // 1. maxSurge controls the number of additional nodes that can be added to + // the node pool temporarily for the time of the upgrade to increase the + // number of available nodes. + // 2. maxUnavailable controls the number of nodes that can be simultaneously + // unavailable. + // 3. (maxUnavailable + maxSurge) determines the level of parallelism (how + // many nodes are being upgraded at the same time). + // + // If the strategy is BLUE_GREEN, use blue_green_settings to configure the + // blue-green upgrade related settings. + // 1. standard_rollout_policy is the default policy. The policy is used to + // control the way blue pool gets drained. The draining is executed in the + // batch mode. The batch size could be specified as either percentage of the + // node pool size or the number of nodes. batch_soak_duration is the soak + // time after each batch gets drained. + // 2. node_pool_soak_duration is the soak time after all blue nodes are + // drained. After this period, the blue pool nodes will be deleted. + message UpgradeSettings { + // The maximum number of nodes that can be created beyond the current size + // of the node pool during the upgrade process. + int32 max_surge = 1; + + // The maximum number of nodes that can be simultaneously unavailable during + // the upgrade process. A node is considered available if its status is + // Ready. + int32 max_unavailable = 2; + + // Update strategy of the node pool. + optional NodePoolUpdateStrategy strategy = 3; + + // Settings for blue-green upgrade strategy. + optional BlueGreenSettings blue_green_settings = 4; + } + + // UpdateInfo contains resource (instance groups, etc), status and other + // intermediate information relevant to a node pool upgrade. + message UpdateInfo { + // Information relevant to blue-green upgrade. + message BlueGreenInfo { + // Phase represents the different stages blue-green upgrade is running in. + enum Phase { + // Unspecified phase. + PHASE_UNSPECIFIED = 0; + + // blue-green upgrade has been initiated. + UPDATE_STARTED = 1; + + // Start creating green pool nodes. + CREATING_GREEN_POOL = 2; + + // Start cordoning blue pool nodes. + CORDONING_BLUE_POOL = 3; + + // Start waiting after cordoning the blue pool and before draining it. + WAITING_TO_DRAIN_BLUE_POOL = 8; + + // Start draining blue pool nodes. + DRAINING_BLUE_POOL = 4; + + // Start soaking time after draining entire blue pool. + NODE_POOL_SOAKING = 5; + + // Start deleting blue nodes. + DELETING_BLUE_POOL = 6; + + // Rollback has been initiated. + ROLLBACK_STARTED = 7; + } + + // Current blue-green upgrade phase. + Phase phase = 1; + + // The resource URLs of the [managed instance groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with blue pool. + repeated string blue_instance_group_urls = 2; + + // The resource URLs of the [managed instance groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with green pool. + repeated string green_instance_group_urls = 3; + + // Time to start deleting blue pool to complete blue-green upgrade, + // in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string blue_pool_deletion_start_time = 4; + + // Version of green pool. + string green_pool_version = 5; + } + + // Information of a blue-green upgrade. + BlueGreenInfo blue_green_info = 1; + } + + // The current status of the node pool instance. + enum Status { + // Not set. + STATUS_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 RUNNING_WITH_ERROR state indicates the node pool has been created + // and is partially usable. Some error state has occurred and some + // functionality may be impaired. Customer may need to reissue a request + // or trigger a new update. + RUNNING_WITH_ERROR = 3; + + // The RECONCILING state indicates that some work is actively being done on + // the node pool, such as upgrading node software. Details can + // be found in the `statusMessage` field. + RECONCILING = 4; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 5; + + // The ERROR state indicates the node pool may be unusable. Details + // can be found in the `statusMessage` field. + ERROR = 6; + } + + // PlacementPolicy defines the placement policy used by the node pool. + message PlacementPolicy { + // Type defines the type of placement policy. + enum Type { + // TYPE_UNSPECIFIED specifies no requirements on nodes + // placement. + TYPE_UNSPECIFIED = 0; + + // COMPACT specifies node placement in the same availability domain to + // ensure low communication latency. + COMPACT = 1; + } + + // The type of placement. + Type type = 1; + + // TPU placement topology for pod slice node pool. + // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies + string tpu_topology = 2; + + // If set, refers to the name of a custom resource policy supplied by the + // user. The resource policy must be in the same project and region as the + // node pool. If not found, InvalidArgument error is returned. + string policy_name = 3; + } + + // QueuedProvisioning defines the queued provisioning used by the node pool. + message QueuedProvisioning { + // Denotes that this nodepool is QRM specific, meaning nodes can be only + // obtained through queuing via the Cluster Autoscaler ProvisioningRequest + // API. + bool enabled = 1; + } + + // The name of the node pool. + string name = 1; + + // The node configuration of the pool. + NodeConfig config = 2; + + // The initial node count for the pool. You must ensure that your + // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // is sufficient for this number of instances. You must also have available + // firewall and routes quota. + int32 initial_node_count = 3; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // NodePool's nodes should be located. + // + // If this value is unspecified during node pool creation, the + // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) + // value will be used, instead. + // + // Warning: changing node pool locations will result in nodes being added + // and/or removed. + repeated string locations = 13; + + // Networking configuration for this NodePool. If specified, it overrides the + // cluster-level defaults. + NodeNetworkConfig network_config = 14; + + // Output only. Server-defined URL for the resource. + string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The version of Kubernetes running on this NodePool's nodes. If unspecified, + // it defaults as described + // [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). + string version = 101; + + // Output only. The resource URLs of the [managed instance + // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with this node pool. + // During the node pool blue-green upgrade operation, the URLs contain both + // blue and green resources. + repeated string instance_group_urls = 102 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the nodes in this pool instance. + Status status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Deprecated. Use conditions instead. + // Additional information about the current status of this + // node pool instance, if available. + string status_message = 104 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Autoscaler configuration for this NodePool. Autoscaler is enabled + // only if a valid configuration is present. + NodePoolAutoscaling autoscaling = 4; + + // NodeManagement configuration for this NodePool. + NodeManagement management = 5; + + // The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 6; + + // Which conditions caused the current node pool state. + repeated StatusCondition conditions = 105; + + // Output only. The pod CIDR block size per node in this node pool. + int32 pod_ipv4_cidr_size = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Upgrade settings control disruption and speed of the upgrade. + UpgradeSettings upgrade_settings = 107; + + // Specifies the node placement policy. + PlacementPolicy placement_policy = 108; + + // Output only. Update info contains relevant information during a node + // pool update. + UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of node pool + // fields, and may be sent on update requests to ensure the client has an + // up-to-date value before proceeding. + string etag = 110; + + // Specifies the configuration of queued provisioning. + QueuedProvisioning queued_provisioning = 112; + + // Enable best effort provisioning for nodes + BestEffortProvisioning best_effort_provisioning = 113; +} + +// NodeManagement defines the set of node management services turned on for the +// node pool. +message NodeManagement { + // Whether the nodes will be automatically upgraded. + bool auto_upgrade = 1; + + // Whether the nodes will be automatically repaired. + bool auto_repair = 2; + + // Specifies the Auto Upgrade knobs for the node pool. + AutoUpgradeOptions upgrade_options = 10; +} + +// AutoUpgradeOptions defines the set of options for the user to control how +// the Auto Upgrades will proceed. +message AutoUpgradeOptions { + // Output only. This field is set when upgrades are about to commence + // with the approximate start time for the upgrades, in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + string auto_upgrade_start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field is set when upgrades are about to commence + // with the description of the upgrade. + string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// MaintenancePolicy defines the maintenance policy to be used for the cluster. +message MaintenancePolicy { + // Specifies the maintenance window in which maintenance may be performed. + MaintenanceWindow window = 1; + + // A hash identifying the version of this policy, so that updates to fields of + // the policy won't accidentally undo intermediate changes (and so that users + // of the API unaware of some fields won't accidentally remove other fields). + // Make a `get()` request to the cluster to get the current + // resource version and include it with requests to set the policy. + string resource_version = 3; +} + +// MaintenanceWindow defines the maintenance window to be used for the cluster. +message MaintenanceWindow { + // Unimplemented, reserved for future use. + // HourlyMaintenanceWindow hourly_maintenance_window = 1; + oneof policy { + // DailyMaintenanceWindow specifies a daily maintenance operation window. + DailyMaintenanceWindow daily_maintenance_window = 2; + + // RecurringWindow specifies some number of recurring time periods for + // maintenance to occur. The time windows may be overlapping. If no + // maintenance windows are set, maintenance can occur at any time. + RecurringTimeWindow recurring_window = 3; + } + + // Exceptions to maintenance window. Non-emergency maintenance should not + // occur in these windows. + map maintenance_exclusions = 4; +} + +// Represents an arbitrary window of time. +message TimeWindow { + oneof options { + // MaintenanceExclusionOptions provides maintenance exclusion related + // options. + MaintenanceExclusionOptions maintenance_exclusion_options = 3; + } + + // The time that the window first starts. + google.protobuf.Timestamp start_time = 1; + + // The time that the window ends. The end time should take place after the + // start time. + google.protobuf.Timestamp end_time = 2; +} + +// Represents the Maintenance exclusion option. +message MaintenanceExclusionOptions { + // Scope of exclusion. + enum Scope { + // NO_UPGRADES excludes all upgrades, including patch upgrades and minor + // upgrades across control planes and nodes. This is the default exclusion + // behavior. + NO_UPGRADES = 0; + + // NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only + // patches are allowed. + NO_MINOR_UPGRADES = 1; + + // NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, + // and also exclude all node pool upgrades. Only control + // plane patches are allowed. + NO_MINOR_OR_NODE_UPGRADES = 2; + } + + // Scope specifies the upgrade scope which upgrades are blocked by the + // exclusion. + Scope scope = 1; +} + +// Represents an arbitrary window of time that recurs. +message RecurringTimeWindow { + // The window of the first recurrence. + TimeWindow window = 1; + + // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window reccurs. They go on for the span of time between the start and + // end time. + // + // For example, to have something repeat every weekday, you'd use: + // `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` + // + // To repeat some window daily (equivalent to the DailyMaintenanceWindow): + // `FREQ=DAILY` + // + // For the first weekend of every month: + // `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` + // + // This specifies how frequently the window starts. Eg, if you wanted to have + // a 9-5 UTC-4 window every weekday, you'd use something like: + // ``` + // start time = 2019-01-01T09:00:00-0400 + // end time = 2019-01-01T17:00:00-0400 + // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // ``` + // + // Windows can span multiple days. Eg, to make the window encompass every + // weekend from midnight Saturday till the last minute of Sunday UTC: + // ``` + // start time = 2019-01-05T00:00:00Z + // end time = 2019-01-07T23:59:00Z + // recurrence = FREQ=WEEKLY;BYDAY=SA + // ``` + // + // Note the start and end time's specific dates are largely arbitrary except + // to specify duration of the window and when it first starts. + // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. + string recurrence = 2; +} + +// Time window specified for daily maintenance operations. +message DailyMaintenanceWindow { + // Time within the maintenance window to start the maintenance operations. + // It must be in format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. + string start_time = 2; + + // Output only. Duration of the time window, automatically chosen to be + // smallest possible in the given scenario. + string duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// SetNodePoolManagementRequest sets the node management properties of a node +// pool. +message SetNodePoolManagementRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to update. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. NodeManagement configuration for the node pool. + NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to set + // management properties. Specified in the format + // `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 7; +} + +// SetNodePoolSizeRequest sets the size of a node pool. +message SetNodePoolSizeRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to update. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The desired node count for the pool. + int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node pool to set + // size. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 7; +} + +// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete +// upgrade. +message CompleteNodePoolUpgradeRequest { + // The name (project, location, cluster, node pool id) of the node pool to + // complete upgrade. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 1; +} + +// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed +// NodePool upgrade. This will be an no-op if the last upgrade successfully +// completed. +message RollbackNodePoolUpgradeRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to rollback. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the node pool to rollback. + // This field has been deprecated and replaced by the name field. + string node_pool_id = 4 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster, node pool id) of the node poll to + // rollback upgrade. + // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. + string name = 6; + + // Option for rollback to ignore the PodDisruptionBudget. + // Default value is false. + bool respect_pdb = 7; +} + +// ListNodePoolsResponse is the result of ListNodePoolsRequest. +message ListNodePoolsResponse { + // A list of node pools for a cluster. + repeated NodePool node_pools = 1; +} + +// ClusterAutoscaling contains global, per-cluster information +// required by Cluster Autoscaler to automatically adjust +// the size of the cluster and create/delete +// node pools based on the current needs. +message ClusterAutoscaling { + // Defines possible options for autoscaling_profile field. + enum AutoscalingProfile { + // No change to autoscaling configuration. + PROFILE_UNSPECIFIED = 0; + + // Prioritize optimizing utilization of resources. + OPTIMIZE_UTILIZATION = 1; + + // Use default (balanced) autoscaling configuration. + BALANCED = 2; + } + + // Enables automatic node pool creation and deletion. + bool enable_node_autoprovisioning = 1; + + // Contains global constraints regarding minimum and maximum + // amount of resources in the cluster. + repeated ResourceLimit resource_limits = 2; + + // Defines autoscaling behaviour. + AutoscalingProfile autoscaling_profile = 3; + + // AutoprovisioningNodePoolDefaults contains defaults for a node pool + // created by NAP. + AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; + + // The list of Google Compute Engine + // [zones](https://cloud.google.com/compute/docs/zones#available) in which the + // NodePool's nodes can be created by NAP. + repeated string autoprovisioning_locations = 5; +} + +// AutoprovisioningNodePoolDefaults contains defaults for a node pool created +// by NAP. +message AutoprovisioningNodePoolDefaults { + // The set of Google API scopes to be made available on all of the + // node VMs under the "default" service account. + // + // The following scopes are recommended, but not required, and by default are + // not included: + // + // * `https://www.googleapis.com/auth/compute` is required for mounting + // persistent storage on your nodes. + // * `https://www.googleapis.com/auth/devstorage.read_only` is required for + // communicating with **gcr.io** + // (the [Google Container + // Registry](https://cloud.google.com/container-registry/)). + // + // If unspecified, no scopes are added, unless Cloud Logging or Cloud + // Monitoring are enabled, in which case their required scopes will be added. + repeated string oauth_scopes = 1; + + // The Google Cloud Platform Service Account to be used by the node VMs. + // Specify the email address of the Service Account; otherwise, if no Service + // Account is specified, the "default" service account is used. + string service_account = 2; + + // Upgrade settings control disruption and speed of the upgrade. + NodePool.UpgradeSettings upgrade_settings = 3; + + // NodeManagement configuration for this NodePool. + NodeManagement management = 4; + + // Deprecated. Minimum CPU platform to be used for NAP created node pools. + // The instance may be scheduled on the specified or newer CPU platform. + // Applicable values are the friendly names of CPU platforms, such as + // minCpuPlatform: Intel Haswell or + // minCpuPlatform: Intel Sandy Bridge. For more + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). + // This field is deprecated, min_cpu_platform should be specified using + // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. + // To unset the min cpu platform field pass "automatic" + // as field value. + string min_cpu_platform = 5 [deprecated = true]; + + // Size of the disk attached to each node, specified in GB. + // The smallest allowed disk size is 10GB. + // + // If unspecified, the default disk size is 100GB. + int32 disk_size_gb = 6; + + // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or + // 'pd-balanced') + // + // If unspecified, the default disk type is 'pd-standard' + string disk_type = 7; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 8; + + // + // The Customer Managed Encryption Key used to encrypt the boot disk attached + // to each node in the node pool. This should be of the form + // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. + // For more information about protecting resources with Cloud KMS Keys please + // see: + // https://cloud.google.com/compute/docs/disks/customer-managed-encryption + string boot_disk_kms_key = 9; + + // The image type to use for NAP created node. Please see + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + // available image types. + string image_type = 10; + + // Enable or disable Kubelet read only port. + optional bool insecure_kubelet_readonly_port_enabled = 13; +} + +// Contains information about amount of some resource in the cluster. +// For memory, value should be in GB. +message ResourceLimit { + // Resource name "cpu", "memory" or gpu-specific string. + string resource_type = 1; + + // Minimum amount of the resource in the cluster. + int64 minimum = 2; + + // Maximum amount of the resource in the cluster. + int64 maximum = 3; +} + +// NodePoolAutoscaling contains information required by cluster autoscaler to +// adjust the size of the node pool to the current cluster usage. +message NodePoolAutoscaling { + // Location policy specifies how zones are picked when scaling up the + // nodepool. + enum LocationPolicy { + // Not set. + LOCATION_POLICY_UNSPECIFIED = 0; + + // BALANCED is a best effort policy that aims to balance the sizes of + // different zones. + BALANCED = 1; + + // ANY policy picks zones that have the highest capacity available. + ANY = 2; + } + + // Is autoscaling enabled for this node pool. + bool enabled = 1; + + // Minimum number of nodes for one location in the NodePool. Must be >= 1 and + // <= max_node_count. + int32 min_node_count = 2; + + // Maximum number of nodes for one location in the NodePool. Must be >= + // min_node_count. There has to be enough quota to scale up the cluster. + int32 max_node_count = 3; + + // Can this node pool be deleted automatically. + bool autoprovisioned = 4; + + // Location policy used when scaling up a nodepool. + LocationPolicy location_policy = 5; + + // Minimum number of nodes in the node pool. Must be greater than 1 less than + // total_max_node_count. + // The total_*_node_count fields are mutually exclusive with the *_node_count + // fields. + int32 total_min_node_count = 6; + + // Maximum number of nodes in the node pool. Must be greater than + // total_min_node_count. There has to be enough quota to scale up the cluster. + // The total_*_node_count fields are mutually exclusive with the *_node_count + // fields. + int32 total_max_node_count = 7; +} + +// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container +// Engine cluster, which will in turn set them for Google Compute Engine +// resources used by that cluster +message SetLabelsRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. The labels to set for that cluster. + map resource_labels = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The fingerprint of the previous set of labels for this resource, + // used to detect conflicts. The fingerprint is initially generated by + // Kubernetes Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash when + // updating or changing labels. Make a `get()` request to the + // resource to get the latest fingerprint. + string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set labels. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for +// a cluster. +message SetLegacyAbacRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster to update. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Whether ABAC authorization will be enabled in the cluster. + bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set legacy + // abac. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// StartIPRotationRequest creates a new IP for the cluster and then performs +// a node upgrade on each node pool to point to the new IP. +message StartIPRotationRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to start IP + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; + + // Whether to rotate credentials during IP rotation. + bool rotate_credentials = 7; +} + +// CompleteIPRotationRequest moves the cluster master back into single-IP mode. +message CompleteIPRotationRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to complete IP + // rotation. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 7; +} + +// AcceleratorConfig represents a Hardware Accelerator request. +message AcceleratorConfig { + // The number of the accelerator cards exposed to an instance. + int64 accelerator_count = 1; + + // The accelerator type resource name. List of supported accelerators + // [here](https://cloud.google.com/compute/docs/gpus) + string accelerator_type = 2; + + // Size of partitions to create on the GPU. Valid values are described in the + // NVIDIA [mig user + // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). + string gpu_partition_size = 3; + + // The number of time-shared GPU resources to expose for each physical GPU. + int64 max_time_shared_clients_per_gpu = 4 [deprecated = true]; + + // The configuration for GPU sharing options. + optional GPUSharingConfig gpu_sharing_config = 5; + + // The configuration for auto installation of GPU driver. + optional GPUDriverInstallationConfig gpu_driver_installation_config = 6; +} + +// GPUSharingConfig represents the GPU sharing configuration for Hardware +// Accelerators. +message GPUSharingConfig { + // The type of GPU sharing strategy currently provided. + enum GPUSharingStrategy { + // Default value. + GPU_SHARING_STRATEGY_UNSPECIFIED = 0; + + // GPUs are time-shared between containers. + TIME_SHARING = 1; + + // GPUs are shared between containers with NVIDIA MPS. + MPS = 2; + } + + // The max number of containers that can share a physical GPU. + int64 max_shared_clients_per_gpu = 1; + + // The type of GPU sharing strategy to enable on the GPU node. + optional GPUSharingStrategy gpu_sharing_strategy = 2; +} + +// GPUDriverInstallationConfig specifies the version of GPU driver to be auto +// installed. +message GPUDriverInstallationConfig { + // The GPU driver version to install. + enum GPUDriverVersion { + // Default value is to not install any GPU driver. + GPU_DRIVER_VERSION_UNSPECIFIED = 0; + + // Disable GPU driver auto installation and needs manual installation + INSTALLATION_DISABLED = 1; + + // "Default" GPU driver in COS and Ubuntu. + DEFAULT = 2; + + // "Latest" GPU driver in COS. + LATEST = 3; + } + + // Mode for how the GPU driver is installed. + optional GPUDriverVersion gpu_driver_version = 1; +} + +// ManagedPrometheusConfig defines the configuration for +// Google Cloud Managed Service for Prometheus. +message ManagedPrometheusConfig { + // Enable Managed Collection. + bool enabled = 1; +} + +// WorkloadMetadataConfig defines the metadata configuration to expose to +// workloads on the node pool. +message WorkloadMetadataConfig { + // NodeMetadata is the configuration for if and how to expose the node + // metadata to the workload running on the node. + enum NodeMetadata { + // Not set. + UNSPECIFIED = 0; + + // Prevent workloads not in hostNetwork from accessing certain VM metadata, + // specifically kube-env, which contains Kubelet credentials, and the + // instance identity token. + // + // Metadata concealment is a temporary security solution available while the + // bootstrapping process for cluster nodes is being redesigned with + // significant security improvements. This feature is scheduled to be + // deprecated in the future and later removed. + SECURE = 1; + + // Expose all VM metadata to pods. + EXPOSE = 2; + + // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes + // a metadata API to workloads that is compatible with the V1 Compute + // Metadata APIs exposed by the Compute Engine and App Engine Metadata + // Servers. This feature can only be enabled if Workload Identity is enabled + // at the cluster level. + GKE_METADATA_SERVER = 3; + } + + // Mode is the configuration for how to expose metadata to workloads running + // on the node. + enum Mode { + // Not set. + MODE_UNSPECIFIED = 0; + + // Expose all Compute Engine metadata to pods. + GCE_METADATA = 1; + + // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes + // a metadata API to workloads that is compatible with the V1 Compute + // Metadata APIs exposed by the Compute Engine and App Engine Metadata + // Servers. This feature can only be enabled if Workload Identity is enabled + // at the cluster level. + GKE_METADATA = 2; + } + + // NodeMetadata is the configuration for how to expose metadata to the + // workloads running on the node. + NodeMetadata node_metadata = 1 [deprecated = true]; + + // Mode is the configuration for how to expose metadata to workloads running + // on the node pool. + Mode mode = 2; +} + +// SetNetworkPolicyRequest enables/disables network policy for a cluster. +message SetNetworkPolicyRequest { + // Required. Deprecated. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + // This field has been deprecated and replaced by the name field. + string project_id = 1 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. This field has been deprecated and replaced by the name + // field. + string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Deprecated. The name of the cluster. + // This field has been deprecated and replaced by the name field. + string cluster_id = 3 + [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // Required. Configuration options for the NetworkPolicy feature. + NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set networking + // policy. Specified in the format `projects/*/locations/*/clusters/*`. + string name = 6; +} + +// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. +message SetMaintenancePolicyRequest { + // Required. The Google Developers Console [project ID or project + // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Google Compute Engine + // [zone](https://cloud.google.com/compute/docs/zones#available) in which the + // cluster resides. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the cluster to update. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maintenance policy to be set for the cluster. An empty field + // clears the existing maintenance policy. + MaintenancePolicy maintenance_policy = 4 + [(google.api.field_behavior) = REQUIRED]; + + // The name (project, location, cluster name) of the cluster to set + // maintenance policy. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 5; +} + +// ListLocationsRequest is used to request the locations that offer GKE. +message ListLocationsRequest { + // Required. Contains the name of the resource requested. + // Specified in the format `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// ListLocationsResponse returns the list of all GKE locations and their +// recommendation state. +message ListLocationsResponse { + // A full list of GKE locations. + repeated Location locations = 1; + + // Only return ListLocationsResponse that occur after the page_token. This + // value should be populated from the ListLocationsResponse.next_page_token if + // that response token was set (which happens when listing more Locations than + // fit in a single ListLocationsResponse). + string next_page_token = 2; +} + +// Location returns the location name, and if the location is recommended +// for GKE cluster scheduling. +message Location { + // LocationType is the type of GKE location, regional or zonal. + enum LocationType { + // LOCATION_TYPE_UNSPECIFIED means the location type was not determined. + LOCATION_TYPE_UNSPECIFIED = 0; + + // A GKE Location where Zonal clusters can be created. + ZONE = 1; + + // A GKE Location where Regional clusters can be created. + REGION = 2; + } + + // Contains the type of location this Location is for. + // Regional or Zonal. + LocationType type = 1; + + // Contains the name of the resource requested. + // Specified in the format `projects/*/locations/*`. + string name = 2; + + // Whether the location is recommended for GKE cluster scheduling. + bool recommended = 3; +} + +// StatusCondition describes why a cluster or a node pool has a certain status +// (e.g., ERROR or DEGRADED). +message StatusCondition { + // Code for each condition + enum Code { + option deprecated = true; + + // UNKNOWN indicates a generic condition. + UNKNOWN = 0; + + // GCE_STOCKOUT indicates that Google Compute Engine resources are + // temporarily unavailable. + GCE_STOCKOUT = 1; + + // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot + // service account. + GKE_SERVICE_ACCOUNT_DELETED = 2; + + // Google Compute Engine quota was exceeded. + GCE_QUOTA_EXCEEDED = 3; + + // Cluster state was manually changed by an SRE due to a system logic error. + SET_BY_OPERATOR = 4; + + // Unable to perform an encrypt operation against the CloudKMS key used for + // etcd level encryption. + CLOUD_KMS_KEY_ERROR = 7; + + // Cluster CA is expiring soon. + // More codes TBA + CA_EXPIRING = 9; + } + + // Machine-friendly representation of the condition + // Deprecated. Use canonical_code instead. + Code code = 1 [deprecated = true]; + + // Human-friendly representation of the condition + string message = 2; + + // Canonical code of the condition. + google.rpc.Code canonical_code = 3; +} + +// NetworkConfig reports the relative names of network & subnetwork. +message NetworkConfig { + // Configuration of all network bandwidth tiers + message ClusterNetworkPerformanceConfig { + // Node network tier + enum Tier { + // Default value + TIER_UNSPECIFIED = 0; + + // Higher bandwidth, actual values based on VM size. + TIER_1 = 1; + } + + // Specifies the total network bandwidth tier for the NodePool. + optional Tier total_egress_bandwidth_tier = 1; + } + + // Output only. The relative name of the Google Compute Engine + // [network][google.container.v1beta1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + // to which the cluster is connected. Example: + // projects/my-project/global/networks/my-network + string network = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The relative name of the Google Compute Engine + // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the + // cluster is connected. Example: + // projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether Intra-node visibility is enabled for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + bool enable_intra_node_visibility = 5; + + // Whether the cluster disables default in-node sNAT rules. In-node sNAT rules + // will be disabled when default_snat_status is disabled. When disabled is set + // to false, default IP masquerade rules will be applied to the nodes to + // prevent sNAT on cluster internal traffic. + DefaultSnatStatus default_snat_status = 7; + + // Whether L4ILB Subsetting is enabled for this cluster. + bool enable_l4ilb_subsetting = 10; + + // The desired datapath provider for this cluster. By default, uses the + // IPTables-based kube-proxy implementation. + DatapathProvider datapath_provider = 11; + + // The desired state of IPv6 connectivity to Google Services. + // By default, no private IPv6 access to or from Google Services (all access + // will be via IPv4) + PrivateIPv6GoogleAccess private_ipv6_google_access = 12; + + // DNSConfig contains clusterDNS config for this cluster. + DNSConfig dns_config = 13; + + // ServiceExternalIPsConfig specifies if services with externalIPs field are + // blocked or not. + ServiceExternalIPsConfig service_external_ips_config = 15; + + // GatewayAPIConfig contains the desired config of Gateway API on this + // cluster. + GatewayAPIConfig gateway_api_config = 16; + + // Whether multi-networking is enabled for this cluster. + bool enable_multi_networking = 17; + + // Network bandwidth tier configuration. + ClusterNetworkPerformanceConfig network_performance_config = 18; + + // Whether FQDN Network Policy is enabled on this cluster. + optional bool enable_fqdn_network_policy = 19; + + // Specify the details of in-transit encryption. + optional InTransitEncryptionConfig in_transit_encryption_config = 20; + + // Whether CiliumClusterWideNetworkPolicy is enabled on this cluster. + optional bool enable_cilium_clusterwide_network_policy = 21; +} + +// GatewayAPIConfig contains the desired config of Gateway API on this cluster. +message GatewayAPIConfig { + // Channel describes if/how Gateway API should be installed and implemented in + // a cluster. + enum Channel { + // Default value. + CHANNEL_UNSPECIFIED = 0; + + // Gateway API support is disabled + CHANNEL_DISABLED = 1; + + // Deprecated: use CHANNEL_STANDARD instead. + // Gateway API support is enabled, experimental CRDs are installed + CHANNEL_EXPERIMENTAL = 3 [deprecated = true]; + + // Gateway API support is enabled, standard CRDs are installed + CHANNEL_STANDARD = 4; + } + + // The Gateway API release channel to use for Gateway API. + Channel channel = 1; +} + +// Config to block services with externalIPs field. +message ServiceExternalIPsConfig { + // Whether Services with ExternalIPs field are allowed or not. + bool enabled = 1; +} + +// ListUsableSubnetworksRequest requests the list of usable subnetworks. +// available to a user for creating clusters. +message ListUsableSubnetworksRequest { + // Required. The parent project where subnetworks are usable. + // Specified in the format `projects/*`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Filtering currently only supports equality on the networkProjectId and must + // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + // is the project which owns the listed subnetworks. This defaults to the + // parent project ID. + string filter = 2; + + // The max number of results per page that should be returned. If the number + // of available results is larger than `page_size`, a `next_page_token` is + // returned which can be used to get the next page of results in subsequent + // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + int32 page_size = 3; + + // Specifies a page token to use. Set this to the nextPageToken returned by + // previous list requests to get the next page of results. + string page_token = 4; +} + +// ListUsableSubnetworksResponse is the response of +// ListUsableSubnetworksRequest. +message ListUsableSubnetworksResponse { + // A list of usable subnetworks in the specified network project. + repeated UsableSubnetwork subnetworks = 1; + + // This token allows you to get the next page of results for list requests. + // If the number of results is larger than `page_size`, use the + // `next_page_token` as a value for the query parameter `page_token` in the + // next request. The value will become empty when there are no more pages. + string next_page_token = 2; +} + +// Secondary IP range of a usable subnetwork. +message UsableSubnetworkSecondaryRange { + // Status shows the current usage of a secondary IP range. + enum Status { + // UNKNOWN is the zero value of the Status enum. It's not a valid status. + UNKNOWN = 0; + + // UNUSED denotes that this range is unclaimed by any cluster. + UNUSED = 1; + + // IN_USE_SERVICE denotes that this range is claimed by a cluster for + // services. It cannot be used for other clusters. + IN_USE_SERVICE = 2; + + // IN_USE_SHAREABLE_POD denotes this range was created by the network admin + // and is currently claimed by a cluster for pods. It can only be used by + // other clusters as a pod range. + IN_USE_SHAREABLE_POD = 3; + + // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed + // for pods. It cannot be used for other clusters. + IN_USE_MANAGED_POD = 4; + } + + // The name associated with this subnetwork secondary range, used when adding + // an alias IP range to a VM instance. + string range_name = 1; + + // The range of IP addresses belonging to this subnetwork secondary range. + string ip_cidr_range = 2; + + // This field is to determine the status of the secondary range programmably. + Status status = 3; +} + +// UsableSubnetwork resource returns the subnetwork name, its associated network +// and the primary CIDR range. +message UsableSubnetwork { + // Subnetwork Name. + // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 1; + + // Network Name. + // Example: projects/my-project/global/networks/my-network + string network = 2; + + // The range of internal addresses that are owned by this subnetwork. + string ip_cidr_range = 3; + + // Secondary IP ranges. + repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4; + + // A human readable status message representing the reasons for cases where + // the caller cannot use the secondary ranges under the subnet. For example if + // the secondary_ip_ranges is empty due to a permission issue, an insufficient + // permission message will be given by status_message. + string status_message = 5; +} + +// VerticalPodAutoscaling contains global, per-cluster information +// required by Vertical Pod Autoscaler to automatically adjust +// the resources of pods controlled by it. +message VerticalPodAutoscaling { + // Enables vertical pod autoscaling. + bool enabled = 1; +} + +// DefaultSnatStatus contains the desired state of whether default sNAT should +// be disabled on the cluster. +message DefaultSnatStatus { + // Disables cluster default sNAT rules. + bool disabled = 1; +} + +// IntraNodeVisibilityConfig contains the desired config of the intra-node +// visibility on this cluster. +message IntraNodeVisibilityConfig { + // Enables intra node visibility for this cluster. + bool enabled = 1; +} + +// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer +// subsetting on this cluster. +message ILBSubsettingConfig { + // Enables l4 ILB subsetting for this cluster + bool enabled = 1; +} + +// DNSConfig contains the desired set of options for configuring clusterDNS. +message DNSConfig { + // Provider lists the various in-cluster DNS providers. + enum Provider { + // Default value + PROVIDER_UNSPECIFIED = 0; + + // Use GKE default DNS provider(kube-dns) for DNS resolution. + PLATFORM_DEFAULT = 1; + + // Use CloudDNS for DNS resolution. + CLOUD_DNS = 2; + + // Use KubeDNS for DNS resolution. + KUBE_DNS = 3; + } + + // DNSScope lists the various scopes of access to cluster DNS records. + enum DNSScope { + // Default value, will be inferred as cluster scope. + DNS_SCOPE_UNSPECIFIED = 0; + + // DNS records are accessible from within the cluster. + CLUSTER_SCOPE = 1; + + // DNS records are accessible from within the VPC. + VPC_SCOPE = 2; + } + + // cluster_dns indicates which in-cluster DNS provider should be used. + Provider cluster_dns = 1; + + // cluster_dns_scope indicates the scope of access to cluster DNS records. + DNSScope cluster_dns_scope = 2; + + // cluster_dns_domain is the suffix used for all cluster service records. + string cluster_dns_domain = 3; + + // Optional. The domain used in Additive VPC scope. + string additive_vpc_scope_dns_domain = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Constraint enforced on the max num of pods per node. + int64 max_pods_per_node = 1; +} + +// Configuration for the use of Kubernetes Service Accounts in GCP IAM +// policies. +message WorkloadIdentityConfig { + // IAM Identity Namespace to attach all Kubernetes Service Accounts to. + string identity_namespace = 1 [deprecated = true]; + + // The workload pool to attach all Kubernetes service accounts to. + string workload_pool = 2; + + // identity provider is the third party identity provider. + string identity_provider = 3; +} + +// Configuration for direct-path (via ALTS) with workload identity. +message WorkloadALTSConfig { + // enable_alts controls whether the alts handshaker should be enabled or not + // for direct-path. + // + // Requires Workload Identity + // ([workload_pool][google.container.v1beta1.WorkloadIdentityConfig.workload_pool] + // must be non-empty). + google.protobuf.BoolValue enable_alts = 1; +} + +// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. +message WorkloadCertificates { + // enable_certificates controls issuance of workload mTLS certificates. + // + // If set, the GKE Workload Identity Certificates controller and node agent + // will be deployed in the cluster, which can then be configured by creating a + // WorkloadCertificateConfig Custom Resource. + // + // Requires Workload Identity + // ([workload_pool][google.container.v1beta1.WorkloadIdentityConfig.workload_pool] + // must be non-empty). + google.protobuf.BoolValue enable_certificates = 1; +} + +// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. +message MeshCertificates { + // enable_certificates controls issuance of workload mTLS certificates. + // + // If set, the GKE Workload Identity Certificates controller and node agent + // will be deployed in the cluster, which can then be configured by creating a + // WorkloadCertificateConfig Custom Resource. + // + // Requires Workload Identity + // ([workload_pool][google.container.v1alpha1.WorkloadIdentityConfig.workload_pool] + // must be non-empty). + google.protobuf.BoolValue enable_certificates = 1; +} + +// Configuration of etcd encryption. +message DatabaseEncryption { + // State of etcd encryption. + enum State { + // Should never be set + UNKNOWN = 0; + + // Secrets in etcd are encrypted. + ENCRYPTED = 1; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to Compute Engine level full disk encryption. + DECRYPTED = 2; + } + + // Current State of etcd encryption. + enum CurrentState { + // Should never be set + CURRENT_STATE_UNSPECIFIED = 0; + + // Secrets in etcd are encrypted. + CURRENT_STATE_ENCRYPTED = 7; + + // Secrets in etcd are stored in plain text (at etcd level) - this is + // unrelated to Compute Engine level full disk encryption. + CURRENT_STATE_DECRYPTED = 2; + + // Encryption (or re-encryption with a different CloudKMS key) + // of Secrets is in progress. + CURRENT_STATE_ENCRYPTION_PENDING = 3; + + // Encryption (or re-encryption with a different CloudKMS key) of Secrets in + // etcd encountered an error. + CURRENT_STATE_ENCRYPTION_ERROR = 4; + + // De-crypting Secrets to plain text in etcd is in progress. + CURRENT_STATE_DECRYPTION_PENDING = 5; + + // De-crypting Secrets to plain text in etcd encountered an error. + CURRENT_STATE_DECRYPTION_ERROR = 6; + } + + // OperationError records errors seen from CloudKMS keys + // encountered during updates to DatabaseEncryption configuration. + message OperationError { + // CloudKMS key resource that had the error. + string key_name = 1; + + // Description of the error seen during the operation. + string error_message = 2; + + // Time when the CloudKMS error was seen. + google.protobuf.Timestamp timestamp = 3; + } + + // Name of CloudKMS key to use for the encryption of secrets in etcd. + // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key + string key_name = 1; + + // The desired state of etcd encryption. + State state = 2; + + // Output only. The current state of etcd encryption. + optional CurrentState current_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Keys in use by the cluster for decrypting + // existing objects, in addition to the key in `key_name`. + // + // Each item is a CloudKMS key resource. + repeated string decryption_keys = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records errors seen during DatabaseEncryption update + // operations. + repeated OperationError last_operation_errors = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for exporting cluster resource usages. +message ResourceUsageExportConfig { + // Parameters for using BigQuery as the destination of resource usage export. + message BigQueryDestination { + // The ID of a BigQuery Dataset. + string dataset_id = 1; + } + + // Parameters for controlling consumption metering. + message ConsumptionMeteringConfig { + // Whether to enable consumption metering for this cluster. If enabled, a + // second BigQuery table will be created to hold resource consumption + // records. + bool enabled = 1; + } + + // Configuration to use BigQuery as usage export destination. + BigQueryDestination bigquery_destination = 1; + + // Whether to enable network egress metering for this cluster. If enabled, a + // daemonset will be created in the cluster to meter network egress traffic. + bool enable_network_egress_metering = 2; + + // Configuration to enable resource consumption metering. + ConsumptionMeteringConfig consumption_metering_config = 3; +} + +// Configuration of Shielded Nodes feature. +message ShieldedNodes { + // Whether Shielded Nodes features are enabled on all nodes in this cluster. + bool enabled = 1; +} + +// Configuration of gVNIC feature. +message VirtualNIC { + // Whether gVNIC features are enabled in the node pool. + bool enabled = 1; +} + +// Configuration of Fast Socket feature. +message FastSocket { + // Whether Fast Socket features are enabled in the node pool. + bool enabled = 1; +} + +// GetOpenIDConfigRequest gets the OIDC discovery document for the +// cluster. See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigRequest { + // The cluster (project, location, cluster name) to get the discovery document + // for. Specified in the format `projects/*/locations/*/clusters/*`. + string parent = 1; +} + +// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. +// See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigResponse { + // OIDC Issuer. + string issuer = 1; + + // JSON Web Key uri. + string jwks_uri = 2; + + // Supported response types. + repeated string response_types_supported = 3; + + // Supported subject types. + repeated string subject_types_supported = 4; + + // supported ID Token signing Algorithms. + repeated string id_token_signing_alg_values_supported = 5; + + // Supported claims. + repeated string claims_supported = 6; + + // Supported grant types. + repeated string grant_types = 7; +} + +// GetJSONWebKeysRequest gets the public component of the keys used by the +// cluster to sign token requests. This will be the jwks_uri for the discover +// document returned by getOpenIDConfig. See the OpenID Connect +// Discovery 1.0 specification for details. +message GetJSONWebKeysRequest { + // The cluster (project, location, cluster name) to get keys for. Specified in + // the format `projects/*/locations/*/clusters/*`. + string parent = 1; +} + +// Jwk is a JSON Web Key as specified in RFC 7517 +message Jwk { + // Key Type. + string kty = 1; + + // Algorithm. + string alg = 2; + + // Permitted uses for the public keys. + string use = 3; + + // Key ID. + string kid = 4; + + // Used for RSA keys. + string n = 5; + + // Used for RSA keys. + string e = 6; + + // Used for ECDSA keys. + string x = 7; + + // Used for ECDSA keys. + string y = 8; + + // Used for ECDSA keys. + string crv = 9; +} + +// GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 +message GetJSONWebKeysResponse { + // The public component of the keys used by the cluster to sign token + // requests. + repeated Jwk keys = 1; +} + +// CheckAutopilotCompatibilityRequest requests getting the blockers for the +// given operation in the cluster. +message CheckAutopilotCompatibilityRequest { + // The name (project, location, cluster) of the cluster to retrieve. + // Specified in the format `projects/*/locations/*/clusters/*`. + string name = 1; +} + +// AutopilotCompatibilityIssue contains information about a specific +// compatibility issue with Autopilot mode. +message AutopilotCompatibilityIssue { + // The type of the reported issue. + enum IssueType { + // Default value, should not be used. + UNSPECIFIED = 0; + + // Indicates that the issue is a known incompatibility between the + // cluster and Autopilot mode. + INCOMPATIBILITY = 1; + + // Indicates the issue is an incompatibility if customers take no further + // action to resolve. + ADDITIONAL_CONFIG_REQUIRED = 2; + + // Indicates the issue is not an incompatibility, but depending on the + // workloads business logic, there is a potential that they won't work on + // Autopilot. + PASSED_WITH_OPTIONAL_CONFIG = 3; + } + + // The last time when this issue was observed. + google.protobuf.Timestamp last_observation = 1; + + // The constraint type of the issue. + string constraint_type = 2; + + // The incompatibility type of this issue. + IssueType incompatibility_type = 3; + + // The name of the resources which are subject to this issue. + repeated string subjects = 4; + + // A URL to a public documnetation, which addresses resolving this issue. + string documentation_url = 5; + + // The description of the issue. + string description = 6; +} + +// CheckAutopilotCompatibilityResponse has a list of compatibility issues. +message CheckAutopilotCompatibilityResponse { + // The list of issues for the given operation. + repeated AutopilotCompatibilityIssue issues = 1; + + // The summary of the autopilot compatibility response. + string summary = 2; +} + +// ReleaseChannel indicates which release channel a cluster is +// subscribed to. Release channels are arranged in order of risk. +// +// When a cluster is subscribed to a release channel, Google maintains +// both the master version and the node version. Node auto-upgrade +// defaults to true and cannot be disabled. +message ReleaseChannel { + // Possible values for 'channel'. + enum Channel { + // No channel specified. + UNSPECIFIED = 0; + + // RAPID channel is offered on an early access basis for customers who want + // to test new releases. + // + // WARNING: Versions available in the RAPID Channel may be subject to + // unresolved issues with no known workaround and are not subject to any + // SLAs. + RAPID = 1; + + // Clusters subscribed to REGULAR receive versions that are considered GA + // quality. REGULAR is intended for production users who want to take + // advantage of new features. + REGULAR = 2; + + // Clusters subscribed to STABLE receive versions that are known to be + // stable and reliable in production. + STABLE = 3; + + // Clusters subscribed to EXTENDED receive extended support and availability + // for versions which are known to be stable and reliable in production. + EXTENDED = 4; + } + + // channel specifies which release channel the cluster is subscribed to. + Channel channel = 1; +} + +// Configuration for fine-grained cost management feature. +message CostManagementConfig { + // Whether the feature is enabled or not. + bool enabled = 1; +} + +// Configuration for Cloud TPU. +message TpuConfig { + // Whether Cloud TPU integration is enabled or not. + bool enabled = 1; + + // Whether to use service networking for Cloud TPU or not. + bool use_service_networking = 2; + + // IPv4 CIDR block reserved for Cloud TPU in the VPC. + string ipv4_cidr_block = 3; +} + +// PrivateIPv6GoogleAccess controls whether and how the pods can communicate +// with Google Services through gRPC over IPv6. +enum PrivateIPv6GoogleAccess { + // Default value. Same as DISABLED + PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // No private access to or from Google Services + PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1; + + // Enables private IPv6 access to Google Services from GKE + PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; + + // Enables private IPv6 access to and from Google Services + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; +} + +// Master is the configuration for components on master. +message Master {} + +// AutopilotConversionStatus represents conversion status. +message AutopilotConversionStatus { + // The current state of the conversion. + enum State { + // STATE_UNSPECIFIED indicates the state is unspecified. + STATE_UNSPECIFIED = 0; + + // DONE indicates the conversion has been completed. Old node pools will + // continue being deleted in the background. + DONE = 5; + } + + // Output only. The current state of the conversion. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Autopilot is the configuration for Autopilot settings on the cluster. +message Autopilot { + // Enable Autopilot + bool enabled = 1; + + // Workload policy configuration for Autopilot. + WorkloadPolicyConfig workload_policy_config = 2; + + // Output only. ConversionStatus shows conversion status. + AutopilotConversionStatus conversion_status = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// WorkloadPolicyConfig is the configuration of workload policy for autopilot +// clusters. +message WorkloadPolicyConfig { + // If true, workloads can use NET_ADMIN capability. + optional bool allow_net_admin = 1; +} + +// NotificationConfig is the configuration of notifications. +message NotificationConfig { + // Types of notifications currently supported. Can be used to filter what + // notifications are sent. + enum EventType { + // Not set, will be ignored. + EVENT_TYPE_UNSPECIFIED = 0; + + // Corresponds with UpgradeAvailableEvent. + UPGRADE_AVAILABLE_EVENT = 1; + + // Corresponds with UpgradeEvent. + UPGRADE_EVENT = 2; + + // Corresponds with SecurityBulletinEvent. + SECURITY_BULLETIN_EVENT = 3; + } + + // Pub/Sub specific notification config. + message PubSub { + // Enable notifications for Pub/Sub. + bool enabled = 1; + + // The desired Pub/Sub topic to which notifications will be + // sent by GKE. Format is `projects/{project}/topics/{topic}`. + string topic = 2 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Allows filtering to one or more specific event types. If no filter is + // specified, or if a filter is specified with no event types, all event + // types will be sent + Filter filter = 3; + } + + // Allows filtering to one or more specific event types. If event types are + // present, those and only those event types will be transmitted to the + // cluster. Other types will be skipped. If no filter is specified, or no + // event types are present, all event types will be sent + message Filter { + // Event types to allowlist. + repeated EventType event_type = 1; + } + + // Notification config for Pub/Sub. + PubSub pubsub = 1; +} + +// ConfidentialNodes is configuration for the confidential nodes feature, which +// makes nodes run on confidential VMs. +message ConfidentialNodes { + // Whether Confidential Nodes feature is enabled. + bool enabled = 1; +} + +// UpgradeResourceType is the resource type that is upgrading. It is used +// in upgrade notifications. +enum UpgradeResourceType { + // Default value. This shouldn't be used. + UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Master / control plane + MASTER = 1; + + // Node pool + NODE_POOL = 2; +} + +// UpgradeEvent is a notification sent to customers by the cluster server when +// a resource is upgrading. +message UpgradeEvent { + // The resource type that is upgrading. + UpgradeResourceType resource_type = 1; + + // The operation associated with this upgrade. + string operation = 2; + + // The time when the operation was started. + google.protobuf.Timestamp operation_start_time = 3; + + // The current version before the upgrade. + string current_version = 4; + + // The target version for the upgrade. + string target_version = 5; + + // Optional relative path to the resource. For example in node pool upgrades, + // the relative path of the node pool. + string resource = 6; +} + +// UpgradeAvailableEvent is a notification sent to customers when a new +// available version is released. +message UpgradeAvailableEvent { + // The release version available for upgrade. + string version = 1; + + // The resource type of the release version. + UpgradeResourceType resource_type = 2; + + // The release channel of the version. If empty, it means a non-channel + // release. + ReleaseChannel release_channel = 3; + + // Optional relative path to the resource. For example, the relative path of + // the node pool. + string resource = 4; + + // Windows node versions info. + WindowsVersions windows_versions = 5; +} + +// SecurityBulletinEvent is a notification sent to customers when a security +// bulletin has been posted that they are vulnerable to. +message SecurityBulletinEvent { + // The resource type (node/control plane) that has the vulnerability. Multiple + // notifications (1 notification per resource type) will be sent for a + // vulnerability that affects > 1 resource type. + string resource_type_affected = 1; + + // The ID of the bulletin corresponding to the vulnerability. + string bulletin_id = 2; + + // The CVEs associated with this bulletin. + repeated string cve_ids = 3; + + // The severity of this bulletin as it relates to GKE. + string severity = 4; + + // The URI link to the bulletin on the website for more information. + string bulletin_uri = 5; + + // A brief description of the bulletin. See the bulletin pointed to by the + // bulletin_uri field for an expanded description. + string brief_description = 6; + + // The GKE minor versions affected by this vulnerability. + repeated string affected_supported_minors = 7; + + // The GKE versions where this vulnerability is patched. + repeated string patched_versions = 8; + + // This represents a version selected from the patched_versions field that + // the cluster receiving this notification should most likely want to upgrade + // to based on its current version. Note that if this notification is being + // received by a given cluster, it means that this version is currently + // available as an upgrade target in that cluster's location. + string suggested_upgrade_target = 9; + + // If this field is specified, it means there are manual steps that the user + // must take to make their clusters safe. + bool manual_steps_required = 10; +} + +// IdentityServiceConfig is configuration for Identity Service which allows +// customers to use external identity providers with the K8S API +message IdentityServiceConfig { + // Whether to enable the Identity Service component + bool enabled = 1; +} + +// Strategy used for node pool update. +enum NodePoolUpdateStrategy { + // Default value if unset. GKE internally defaults the update strategy to + // SURGE for unspecified strategies. + NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0; + + // blue-green upgrade. + BLUE_GREEN = 2; + + // SURGE is the traditional way of upgrading a node pool. + // max_surge and max_unavailable determines the level of upgrade parallelism. + SURGE = 3; +} + +// LoggingConfig is cluster logging configuration. +message LoggingConfig { + // Logging components configuration + LoggingComponentConfig component_config = 1; +} + +// LoggingComponentConfig is cluster logging component configuration. +message LoggingComponentConfig { + // GKE components exposing logs + enum Component { + // Default value. This shouldn't be used. + COMPONENT_UNSPECIFIED = 0; + + // system components + SYSTEM_COMPONENTS = 1; + + // workloads + WORKLOADS = 2; + + // kube-apiserver + APISERVER = 3; + + // kube-scheduler + SCHEDULER = 4; + + // kube-controller-manager + CONTROLLER_MANAGER = 5; + } + + // Select components to collect logs. An empty set would disable all logging. + repeated Component enable_components = 1; +} + +// RayClusterLoggingConfig specifies logging configuration for Ray clusters. +message RayClusterLoggingConfig { + // Enable log collection for Ray clusters. + bool enabled = 1; +} + +// MonitoringConfig is cluster monitoring configuration. +message MonitoringConfig { + // Monitoring components configuration + MonitoringComponentConfig component_config = 1; + + // Enable Google Cloud Managed Service for Prometheus + // in the cluster. + ManagedPrometheusConfig managed_prometheus_config = 2; + + // Configuration of Advanced Datapath Observability features. + AdvancedDatapathObservabilityConfig advanced_datapath_observability_config = + 3; +} + +// AdvancedDatapathObservabilityConfig specifies configuration of observability +// features of advanced datapath. +message AdvancedDatapathObservabilityConfig { + // Supported Relay modes + enum RelayMode { + // Default value. This shouldn't be used. + RELAY_MODE_UNSPECIFIED = 0; + + // disabled + DISABLED = 1; + + // exposed via internal load balancer + INTERNAL_VPC_LB = 3; + + // exposed via external load balancer + EXTERNAL_LB = 4; + } + + // Expose flow metrics on nodes + bool enable_metrics = 1; + + // Method used to make Relay available + RelayMode relay_mode = 2; + + // Enable Relay component + optional bool enable_relay = 3; +} + +// RayClusterMonitoringConfig specifies monitoring configuration for Ray +// clusters. +message RayClusterMonitoringConfig { + // Enable metrics collection for Ray clusters. + bool enabled = 1; +} + +// NodePoolLoggingConfig specifies logging configuration for nodepools. +message NodePoolLoggingConfig { + // Logging variant configuration. + LoggingVariantConfig variant_config = 1; +} + +// LoggingVariantConfig specifies the behaviour of the logging component. +message LoggingVariantConfig { + // Logging component variants. + enum Variant { + // Default value. This shouldn't be used. + VARIANT_UNSPECIFIED = 0; + + // default logging variant. + DEFAULT = 1; + + // maximum logging throughput variant. + MAX_THROUGHPUT = 2; + } + + // Logging variant deployed on nodes. + Variant variant = 1; +} + +// MonitoringComponentConfig is cluster monitoring component configuration. +message MonitoringComponentConfig { + // GKE components exposing metrics + enum Component { + // Default value. This shouldn't be used. + COMPONENT_UNSPECIFIED = 0; + + // system components + SYSTEM_COMPONENTS = 1; + + // Deprecated: Use Google Cloud Managed Service for Prometheus. + WORKLOADS = 2 [deprecated = true]; + + // kube-apiserver + APISERVER = 3; + + // kube-scheduler + SCHEDULER = 4; + + // kube-controller-manager + CONTROLLER_MANAGER = 5; + + // Storage + STORAGE = 7; + + // Horizontal Pod Autoscaling + HPA = 8; + + // Pod + POD = 9; + + // DaemonSet + DAEMONSET = 10; + + // Deployment + DEPLOYMENT = 11; + + // Statefulset + STATEFULSET = 12; + + // CADVISOR + CADVISOR = 13; + + // KUBELET + KUBELET = 14; + + // NVIDIA Data Center GPU Manager (DCGM) + DCGM = 15; + } + + // Select components to collect metrics. An empty set would disable all + // monitoring. + repeated Component enable_components = 1; +} + +// The datapath provider selects the implementation of the Kubernetes networking +// model for service resolution and network policy enforcement. +enum DatapathProvider { + // Default value. + DATAPATH_PROVIDER_UNSPECIFIED = 0; + + // Use the IPTables implementation based on kube-proxy. + LEGACY_DATAPATH = 1; + + // Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE + // Dataplane V2 + // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) + // for more. + ADVANCED_DATAPATH = 2; +} + +// Fleet is the fleet configuration for the cluster. +message Fleet { + // The Fleet host project(project ID or project number) where this cluster + // will be registered to. This field cannot be changed after the cluster has + // been registered. + string project = 1; + + // Output only. The full resource name of the registered fleet membership of + // the cluster, in the format + // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. + string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the cluster has been registered through the fleet + // API. + bool pre_registered = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Possible values for IP stack type +enum StackType { + // By default, the clusters will be IPV4 only + STACK_TYPE_UNSPECIFIED = 0; + + // The value used if the cluster is a IPV4 only + IPV4 = 1; + + // The value used if the cluster is a dual stack cluster + IPV4_IPV6 = 2; +} + +// A map of resource manager tag keys and values to be attached to the nodes +// for managing Compute Engine firewalls using Network Firewall Policies. +// Tags must be according to specifications in +// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. +// A maximum of 5 tag key-value pairs can be specified. +// Existing tags will be replaced with new values. +message ResourceManagerTags { + // Tags must be in one of the following formats ([KEY]=[VALUE]) + // 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` + // 2. `{org_id}/{tag_key_name}={tag_value_name}` + // 3. `{project_id}/{tag_key_name}={tag_value_name}` + map tags = 1; +} + +// EnterpriseConfig is the cluster enterprise configuration. +message EnterpriseConfig { + // Premium tiers for GKE Cluster. + enum ClusterTier { + // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. + CLUSTER_TIER_UNSPECIFIED = 0; + + // STANDARD indicates a standard GKE cluster. + STANDARD = 1; + + // ENTERPRISE indicates a GKE Enterprise cluster. + ENTERPRISE = 2; + } + + // Output only. cluster_tier specifies the premium tier of the cluster. + ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// SecretManagerConfig is config for secret manager enablement. +message SecretManagerConfig { + // Whether the cluster is configured to use secret manager CSI component. + optional bool enabled = 1; +} + +// SecondaryBootDisk represents a persistent disk attached to a node +// with special configurations based on its mode. +message SecondaryBootDisk { + // Mode specifies how the secondary boot disk will be used. + // This triggers mode-specified logic in the control plane. + enum Mode { + // MODE_UNSPECIFIED is when mode is not set. + MODE_UNSPECIFIED = 0; + + // CONTAINER_IMAGE_CACHE is for using the secondary boot disk as + // a container image cache. + CONTAINER_IMAGE_CACHE = 1; + } + + // Disk mode (container image cache, etc.) + Mode mode = 1; + + // Fully-qualified resource ID for an existing disk image. + string disk_image = 2; +} + +// Options for in-transit encryption. +enum InTransitEncryptionConfig { + // Unspecified, will be inferred as default - + // IN_TRANSIT_ENCRYPTION_UNSPECIFIED. + IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0; + + // In-transit encryption is disabled. + IN_TRANSIT_ENCRYPTION_DISABLED = 1; + + // Data in-transit is encrypted using inter-node transparent encryption. + IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2; +} + +// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended +// in the future to define different options for updating secondary boot disks. +message SecondaryBootDiskUpdateStrategy {} diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts new file mode 100644 index 00000000000..8e69f823acf --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts @@ -0,0 +1,33578 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace container. */ + namespace container { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents a ClusterManager */ + class ClusterManager extends $protobuf.rpc.Service { + + /** + * Constructs a new ClusterManager 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 ClusterManager 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): ClusterManager; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListClustersResponse + */ + public listClusters(request: google.container.v1beta1.IListClustersRequest, callback: google.container.v1beta1.ClusterManager.ListClustersCallback): void; + + /** + * Calls ListClusters. + * @param request ListClustersRequest message or plain object + * @returns Promise + */ + public listClusters(request: google.container.v1beta1.IListClustersRequest): Promise; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Cluster + */ + public getCluster(request: google.container.v1beta1.IGetClusterRequest, callback: google.container.v1beta1.ClusterManager.GetClusterCallback): void; + + /** + * Calls GetCluster. + * @param request GetClusterRequest message or plain object + * @returns Promise + */ + public getCluster(request: google.container.v1beta1.IGetClusterRequest): Promise; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCluster(request: google.container.v1beta1.ICreateClusterRequest, callback: google.container.v1beta1.ClusterManager.CreateClusterCallback): void; + + /** + * Calls CreateCluster. + * @param request CreateClusterRequest message or plain object + * @returns Promise + */ + public createCluster(request: google.container.v1beta1.ICreateClusterRequest): Promise; + + /** + * Calls UpdateCluster. + * @param request UpdateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCluster(request: google.container.v1beta1.IUpdateClusterRequest, callback: google.container.v1beta1.ClusterManager.UpdateClusterCallback): void; + + /** + * Calls UpdateCluster. + * @param request UpdateClusterRequest message or plain object + * @returns Promise + */ + public updateCluster(request: google.container.v1beta1.IUpdateClusterRequest): Promise; + + /** + * Calls UpdateNodePool. + * @param request UpdateNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateNodePool(request: google.container.v1beta1.IUpdateNodePoolRequest, callback: google.container.v1beta1.ClusterManager.UpdateNodePoolCallback): void; + + /** + * Calls UpdateNodePool. + * @param request UpdateNodePoolRequest message or plain object + * @returns Promise + */ + public updateNodePool(request: google.container.v1beta1.IUpdateNodePoolRequest): Promise; + + /** + * Calls SetNodePoolAutoscaling. + * @param request SetNodePoolAutoscalingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolAutoscaling(request: google.container.v1beta1.ISetNodePoolAutoscalingRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolAutoscalingCallback): void; + + /** + * Calls SetNodePoolAutoscaling. + * @param request SetNodePoolAutoscalingRequest message or plain object + * @returns Promise + */ + public setNodePoolAutoscaling(request: google.container.v1beta1.ISetNodePoolAutoscalingRequest): Promise; + + /** + * Calls SetLoggingService. + * @param request SetLoggingServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLoggingService(request: google.container.v1beta1.ISetLoggingServiceRequest, callback: google.container.v1beta1.ClusterManager.SetLoggingServiceCallback): void; + + /** + * Calls SetLoggingService. + * @param request SetLoggingServiceRequest message or plain object + * @returns Promise + */ + public setLoggingService(request: google.container.v1beta1.ISetLoggingServiceRequest): Promise; + + /** + * Calls SetMonitoringService. + * @param request SetMonitoringServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMonitoringService(request: google.container.v1beta1.ISetMonitoringServiceRequest, callback: google.container.v1beta1.ClusterManager.SetMonitoringServiceCallback): void; + + /** + * Calls SetMonitoringService. + * @param request SetMonitoringServiceRequest message or plain object + * @returns Promise + */ + public setMonitoringService(request: google.container.v1beta1.ISetMonitoringServiceRequest): Promise; + + /** + * Calls SetAddonsConfig. + * @param request SetAddonsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setAddonsConfig(request: google.container.v1beta1.ISetAddonsConfigRequest, callback: google.container.v1beta1.ClusterManager.SetAddonsConfigCallback): void; + + /** + * Calls SetAddonsConfig. + * @param request SetAddonsConfigRequest message or plain object + * @returns Promise + */ + public setAddonsConfig(request: google.container.v1beta1.ISetAddonsConfigRequest): Promise; + + /** + * Calls SetLocations. + * @param request SetLocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLocations(request: google.container.v1beta1.ISetLocationsRequest, callback: google.container.v1beta1.ClusterManager.SetLocationsCallback): void; + + /** + * Calls SetLocations. + * @param request SetLocationsRequest message or plain object + * @returns Promise + */ + public setLocations(request: google.container.v1beta1.ISetLocationsRequest): Promise; + + /** + * Calls UpdateMaster. + * @param request UpdateMasterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMaster(request: google.container.v1beta1.IUpdateMasterRequest, callback: google.container.v1beta1.ClusterManager.UpdateMasterCallback): void; + + /** + * Calls UpdateMaster. + * @param request UpdateMasterRequest message or plain object + * @returns Promise + */ + public updateMaster(request: google.container.v1beta1.IUpdateMasterRequest): Promise; + + /** + * Calls SetMasterAuth. + * @param request SetMasterAuthRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMasterAuth(request: google.container.v1beta1.ISetMasterAuthRequest, callback: google.container.v1beta1.ClusterManager.SetMasterAuthCallback): void; + + /** + * Calls SetMasterAuth. + * @param request SetMasterAuthRequest message or plain object + * @returns Promise + */ + public setMasterAuth(request: google.container.v1beta1.ISetMasterAuthRequest): Promise; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteCluster(request: google.container.v1beta1.IDeleteClusterRequest, callback: google.container.v1beta1.ClusterManager.DeleteClusterCallback): void; + + /** + * Calls DeleteCluster. + * @param request DeleteClusterRequest message or plain object + * @returns Promise + */ + public deleteCluster(request: google.container.v1beta1.IDeleteClusterRequest): Promise; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.container.v1beta1.IListOperationsRequest, callback: google.container.v1beta1.ClusterManager.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.container.v1beta1.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.container.v1beta1.IGetOperationRequest, callback: google.container.v1beta1.ClusterManager.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.container.v1beta1.IGetOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.container.v1beta1.ICancelOperationRequest, callback: google.container.v1beta1.ClusterManager.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.container.v1beta1.ICancelOperationRequest): Promise; + + /** + * Calls GetServerConfig. + * @param request GetServerConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServerConfig + */ + public getServerConfig(request: google.container.v1beta1.IGetServerConfigRequest, callback: google.container.v1beta1.ClusterManager.GetServerConfigCallback): void; + + /** + * Calls GetServerConfig. + * @param request GetServerConfigRequest message or plain object + * @returns Promise + */ + public getServerConfig(request: google.container.v1beta1.IGetServerConfigRequest): Promise; + + /** + * Calls GetJSONWebKeys. + * @param request GetJSONWebKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse + */ + public getJSONWebKeys(request: google.container.v1beta1.IGetJSONWebKeysRequest, callback: google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback): void; + + /** + * Calls GetJSONWebKeys. + * @param request GetJSONWebKeysRequest message or plain object + * @returns Promise + */ + public getJSONWebKeys(request: google.container.v1beta1.IGetJSONWebKeysRequest): Promise; + + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse + */ + public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest, callback: google.container.v1beta1.ClusterManager.ListNodePoolsCallback): void; + + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @returns Promise + */ + public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest): Promise; + + /** + * Calls GetNodePool. + * @param request GetNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NodePool + */ + public getNodePool(request: google.container.v1beta1.IGetNodePoolRequest, callback: google.container.v1beta1.ClusterManager.GetNodePoolCallback): void; + + /** + * Calls GetNodePool. + * @param request GetNodePoolRequest message or plain object + * @returns Promise + */ + public getNodePool(request: google.container.v1beta1.IGetNodePoolRequest): Promise; + + /** + * Calls CreateNodePool. + * @param request CreateNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createNodePool(request: google.container.v1beta1.ICreateNodePoolRequest, callback: google.container.v1beta1.ClusterManager.CreateNodePoolCallback): void; + + /** + * Calls CreateNodePool. + * @param request CreateNodePoolRequest message or plain object + * @returns Promise + */ + public createNodePool(request: google.container.v1beta1.ICreateNodePoolRequest): Promise; + + /** + * Calls DeleteNodePool. + * @param request DeleteNodePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteNodePool(request: google.container.v1beta1.IDeleteNodePoolRequest, callback: google.container.v1beta1.ClusterManager.DeleteNodePoolCallback): void; + + /** + * Calls DeleteNodePool. + * @param request DeleteNodePoolRequest message or plain object + * @returns Promise + */ + public deleteNodePool(request: google.container.v1beta1.IDeleteNodePoolRequest): Promise; + + /** + * Calls CompleteNodePoolUpgrade. + * @param request CompleteNodePoolUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public completeNodePoolUpgrade(request: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, callback: google.container.v1beta1.ClusterManager.CompleteNodePoolUpgradeCallback): void; + + /** + * Calls CompleteNodePoolUpgrade. + * @param request CompleteNodePoolUpgradeRequest message or plain object + * @returns Promise + */ + public completeNodePoolUpgrade(request: google.container.v1beta1.ICompleteNodePoolUpgradeRequest): Promise; + + /** + * Calls RollbackNodePoolUpgrade. + * @param request RollbackNodePoolUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rollbackNodePoolUpgrade(request: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, callback: google.container.v1beta1.ClusterManager.RollbackNodePoolUpgradeCallback): void; + + /** + * Calls RollbackNodePoolUpgrade. + * @param request RollbackNodePoolUpgradeRequest message or plain object + * @returns Promise + */ + public rollbackNodePoolUpgrade(request: google.container.v1beta1.IRollbackNodePoolUpgradeRequest): Promise; + + /** + * Calls SetNodePoolManagement. + * @param request SetNodePoolManagementRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolManagement(request: google.container.v1beta1.ISetNodePoolManagementRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolManagementCallback): void; + + /** + * Calls SetNodePoolManagement. + * @param request SetNodePoolManagementRequest message or plain object + * @returns Promise + */ + public setNodePoolManagement(request: google.container.v1beta1.ISetNodePoolManagementRequest): Promise; + + /** + * Calls SetLabels. + * @param request SetLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLabels(request: google.container.v1beta1.ISetLabelsRequest, callback: google.container.v1beta1.ClusterManager.SetLabelsCallback): void; + + /** + * Calls SetLabels. + * @param request SetLabelsRequest message or plain object + * @returns Promise + */ + public setLabels(request: google.container.v1beta1.ISetLabelsRequest): Promise; + + /** + * Calls SetLegacyAbac. + * @param request SetLegacyAbacRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setLegacyAbac(request: google.container.v1beta1.ISetLegacyAbacRequest, callback: google.container.v1beta1.ClusterManager.SetLegacyAbacCallback): void; + + /** + * Calls SetLegacyAbac. + * @param request SetLegacyAbacRequest message or plain object + * @returns Promise + */ + public setLegacyAbac(request: google.container.v1beta1.ISetLegacyAbacRequest): Promise; + + /** + * Calls StartIPRotation. + * @param request StartIPRotationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public startIPRotation(request: google.container.v1beta1.IStartIPRotationRequest, callback: google.container.v1beta1.ClusterManager.StartIPRotationCallback): void; + + /** + * Calls StartIPRotation. + * @param request StartIPRotationRequest message or plain object + * @returns Promise + */ + public startIPRotation(request: google.container.v1beta1.IStartIPRotationRequest): Promise; + + /** + * Calls CompleteIPRotation. + * @param request CompleteIPRotationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public completeIPRotation(request: google.container.v1beta1.ICompleteIPRotationRequest, callback: google.container.v1beta1.ClusterManager.CompleteIPRotationCallback): void; + + /** + * Calls CompleteIPRotation. + * @param request CompleteIPRotationRequest message or plain object + * @returns Promise + */ + public completeIPRotation(request: google.container.v1beta1.ICompleteIPRotationRequest): Promise; + + /** + * Calls SetNodePoolSize. + * @param request SetNodePoolSizeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNodePoolSize(request: google.container.v1beta1.ISetNodePoolSizeRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolSizeCallback): void; + + /** + * Calls SetNodePoolSize. + * @param request SetNodePoolSizeRequest message or plain object + * @returns Promise + */ + public setNodePoolSize(request: google.container.v1beta1.ISetNodePoolSizeRequest): Promise; + + /** + * Calls SetNetworkPolicy. + * @param request SetNetworkPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setNetworkPolicy(request: google.container.v1beta1.ISetNetworkPolicyRequest, callback: google.container.v1beta1.ClusterManager.SetNetworkPolicyCallback): void; + + /** + * Calls SetNetworkPolicy. + * @param request SetNetworkPolicyRequest message or plain object + * @returns Promise + */ + public setNetworkPolicy(request: google.container.v1beta1.ISetNetworkPolicyRequest): Promise; + + /** + * Calls SetMaintenancePolicy. + * @param request SetMaintenancePolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setMaintenancePolicy(request: google.container.v1beta1.ISetMaintenancePolicyRequest, callback: google.container.v1beta1.ClusterManager.SetMaintenancePolicyCallback): void; + + /** + * Calls SetMaintenancePolicy. + * @param request SetMaintenancePolicyRequest message or plain object + * @returns Promise + */ + public setMaintenancePolicy(request: google.container.v1beta1.ISetMaintenancePolicyRequest): Promise; + + /** + * Calls ListUsableSubnetworks. + * @param request ListUsableSubnetworksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse + */ + public listUsableSubnetworks(request: google.container.v1beta1.IListUsableSubnetworksRequest, callback: google.container.v1beta1.ClusterManager.ListUsableSubnetworksCallback): void; + + /** + * Calls ListUsableSubnetworks. + * @param request ListUsableSubnetworksRequest message or plain object + * @returns Promise + */ + public listUsableSubnetworks(request: google.container.v1beta1.IListUsableSubnetworksRequest): Promise; + + /** + * Calls CheckAutopilotCompatibility. + * @param request CheckAutopilotCompatibilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse + */ + public checkAutopilotCompatibility(request: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, callback: google.container.v1beta1.ClusterManager.CheckAutopilotCompatibilityCallback): void; + + /** + * Calls CheckAutopilotCompatibility. + * @param request CheckAutopilotCompatibilityRequest message or plain object + * @returns Promise + */ + public checkAutopilotCompatibility(request: google.container.v1beta1.ICheckAutopilotCompatibilityRequest): Promise; + + /** + * Calls ListLocations. + * @param request ListLocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLocationsResponse + */ + public listLocations(request: google.container.v1beta1.IListLocationsRequest, callback: google.container.v1beta1.ClusterManager.ListLocationsCallback): void; + + /** + * Calls ListLocations. + * @param request ListLocationsRequest message or plain object + * @returns Promise + */ + public listLocations(request: google.container.v1beta1.IListLocationsRequest): Promise; + } + + namespace ClusterManager { + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listClusters}. + * @param error Error, if any + * @param [response] ListClustersResponse + */ + type ListClustersCallback = (error: (Error|null), response?: google.container.v1beta1.ListClustersResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getCluster}. + * @param error Error, if any + * @param [response] Cluster + */ + type GetClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Cluster) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|createCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolAutoscaling}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolAutoscalingCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLoggingService}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLoggingServiceCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMonitoringService}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMonitoringServiceCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setAddonsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type SetAddonsConfigCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLocations}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLocationsCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateMaster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMasterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMasterAuth}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMasterAuthCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.container.v1beta1.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getServerConfig}. + * @param error Error, if any + * @param [response] ServerConfig + */ + type GetServerConfigCallback = (error: (Error|null), response?: google.container.v1beta1.ServerConfig) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. + * @param error Error, if any + * @param [response] GetJSONWebKeysResponse + */ + type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1beta1.GetJSONWebKeysResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. + * @param error Error, if any + * @param [response] ListNodePoolsResponse + */ + type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1beta1.ListNodePoolsResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getNodePool}. + * @param error Error, if any + * @param [response] NodePool + */ + type GetNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.NodePool) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|createNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteNodePool}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|completeNodePoolUpgrade}. + * @param error Error, if any + * @param [response] Empty + */ + type CompleteNodePoolUpgradeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|rollbackNodePoolUpgrade}. + * @param error Error, if any + * @param [response] Operation + */ + type RollbackNodePoolUpgradeCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolManagement}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolManagementCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLabels}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLabelsCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLegacyAbac}. + * @param error Error, if any + * @param [response] Operation + */ + type SetLegacyAbacCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|startIPRotation}. + * @param error Error, if any + * @param [response] Operation + */ + type StartIPRotationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|completeIPRotation}. + * @param error Error, if any + * @param [response] Operation + */ + type CompleteIPRotationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolSize}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNodePoolSizeCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNetworkPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type SetNetworkPolicyCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMaintenancePolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type SetMaintenancePolicyCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listUsableSubnetworks}. + * @param error Error, if any + * @param [response] ListUsableSubnetworksResponse + */ + type ListUsableSubnetworksCallback = (error: (Error|null), response?: google.container.v1beta1.ListUsableSubnetworksResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|checkAutopilotCompatibility}. + * @param error Error, if any + * @param [response] CheckAutopilotCompatibilityResponse + */ + type CheckAutopilotCompatibilityCallback = (error: (Error|null), response?: google.container.v1beta1.CheckAutopilotCompatibilityResponse) => void; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listLocations}. + * @param error Error, if any + * @param [response] ListLocationsResponse + */ + type ListLocationsCallback = (error: (Error|null), response?: google.container.v1beta1.ListLocationsResponse) => void; + } + + /** Properties of a LinuxNodeConfig. */ + interface ILinuxNodeConfig { + + /** LinuxNodeConfig sysctls */ + sysctls?: ({ [k: string]: string }|null); + + /** LinuxNodeConfig cgroupMode */ + cgroupMode?: (google.container.v1beta1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1beta1.LinuxNodeConfig.CgroupMode|null); + + /** LinuxNodeConfig hugepages */ + hugepages?: (google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null); + } + + /** Represents a LinuxNodeConfig. */ + class LinuxNodeConfig implements ILinuxNodeConfig { + + /** + * Constructs a new LinuxNodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILinuxNodeConfig); + + /** LinuxNodeConfig sysctls. */ + public sysctls: { [k: string]: string }; + + /** LinuxNodeConfig cgroupMode. */ + public cgroupMode: (google.container.v1beta1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1beta1.LinuxNodeConfig.CgroupMode); + + /** LinuxNodeConfig hugepages. */ + public hugepages?: (google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null); + + /** LinuxNodeConfig _hugepages. */ + public _hugepages?: "hugepages"; + + /** + * Creates a new LinuxNodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LinuxNodeConfig instance + */ + public static create(properties?: google.container.v1beta1.ILinuxNodeConfig): google.container.v1beta1.LinuxNodeConfig; + + /** + * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. + * @param message LinuxNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. + * @param message LinuxNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LinuxNodeConfig; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LinuxNodeConfig; + + /** + * Verifies a LinuxNodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LinuxNodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LinuxNodeConfig; + + /** + * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. + * @param message LinuxNodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.LinuxNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LinuxNodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinuxNodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LinuxNodeConfig { + + /** CgroupMode enum. */ + enum CgroupMode { + CGROUP_MODE_UNSPECIFIED = 0, + CGROUP_MODE_V1 = 1, + CGROUP_MODE_V2 = 2 + } + + /** Properties of a HugepagesConfig. */ + interface IHugepagesConfig { + + /** HugepagesConfig hugepageSize2m */ + hugepageSize2m?: (number|null); + + /** HugepagesConfig hugepageSize1g */ + hugepageSize1g?: (number|null); + } + + /** Represents a HugepagesConfig. */ + class HugepagesConfig implements IHugepagesConfig { + + /** + * Constructs a new HugepagesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig); + + /** HugepagesConfig hugepageSize2m. */ + public hugepageSize2m?: (number|null); + + /** HugepagesConfig hugepageSize1g. */ + public hugepageSize1g?: (number|null); + + /** HugepagesConfig _hugepageSize2m. */ + public _hugepageSize2m?: "hugepageSize2m"; + + /** HugepagesConfig _hugepageSize1g. */ + public _hugepageSize1g?: "hugepageSize1g"; + + /** + * Creates a new HugepagesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns HugepagesConfig instance + */ + public static create(properties?: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; + + /** + * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @param message HugepagesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @param message HugepagesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; + + /** + * Verifies a HugepagesConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HugepagesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; + + /** + * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. + * @param message HugepagesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.LinuxNodeConfig.HugepagesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HugepagesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HugepagesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a WindowsNodeConfig. */ + interface IWindowsNodeConfig { + + /** WindowsNodeConfig osVersion */ + osVersion?: (google.container.v1beta1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1beta1.WindowsNodeConfig.OSVersion|null); + } + + /** Represents a WindowsNodeConfig. */ + class WindowsNodeConfig implements IWindowsNodeConfig { + + /** + * Constructs a new WindowsNodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWindowsNodeConfig); + + /** WindowsNodeConfig osVersion. */ + public osVersion: (google.container.v1beta1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1beta1.WindowsNodeConfig.OSVersion); + + /** + * Creates a new WindowsNodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsNodeConfig instance + */ + public static create(properties?: google.container.v1beta1.IWindowsNodeConfig): google.container.v1beta1.WindowsNodeConfig; + + /** + * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. + * @param message WindowsNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. + * @param message WindowsNodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsNodeConfig; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsNodeConfig; + + /** + * Verifies a WindowsNodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsNodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsNodeConfig; + + /** + * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. + * @param message WindowsNodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WindowsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsNodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsNodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WindowsNodeConfig { + + /** OSVersion enum. */ + enum OSVersion { + OS_VERSION_UNSPECIFIED = 0, + OS_VERSION_LTSC2019 = 1, + OS_VERSION_LTSC2022 = 2 + } + } + + /** Properties of a NodeKubeletConfig. */ + interface INodeKubeletConfig { + + /** NodeKubeletConfig cpuManagerPolicy */ + cpuManagerPolicy?: (string|null); + + /** NodeKubeletConfig cpuCfsQuota */ + cpuCfsQuota?: (google.protobuf.IBoolValue|null); + + /** NodeKubeletConfig cpuCfsQuotaPeriod */ + cpuCfsQuotaPeriod?: (string|null); + + /** NodeKubeletConfig podPidsLimit */ + podPidsLimit?: (number|Long|string|null); + + /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled */ + insecureKubeletReadonlyPortEnabled?: (boolean|null); + } + + /** Represents a NodeKubeletConfig. */ + class NodeKubeletConfig implements INodeKubeletConfig { + + /** + * Constructs a new NodeKubeletConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeKubeletConfig); + + /** NodeKubeletConfig cpuManagerPolicy. */ + public cpuManagerPolicy: string; + + /** NodeKubeletConfig cpuCfsQuota. */ + public cpuCfsQuota?: (google.protobuf.IBoolValue|null); + + /** NodeKubeletConfig cpuCfsQuotaPeriod. */ + public cpuCfsQuotaPeriod: string; + + /** NodeKubeletConfig podPidsLimit. */ + public podPidsLimit: (number|Long|string); + + /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled. */ + public insecureKubeletReadonlyPortEnabled?: (boolean|null); + + /** NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. */ + public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; + + /** + * Creates a new NodeKubeletConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeKubeletConfig instance + */ + public static create(properties?: google.container.v1beta1.INodeKubeletConfig): google.container.v1beta1.NodeKubeletConfig; + + /** + * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. + * @param message NodeKubeletConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. + * @param message NodeKubeletConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeKubeletConfig; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeKubeletConfig; + + /** + * Verifies a NodeKubeletConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeKubeletConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeKubeletConfig; + + /** + * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. + * @param message NodeKubeletConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeKubeletConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeKubeletConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeKubeletConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig metadata */ + metadata?: ({ [k: string]: string }|null); + + /** NodeConfig imageType */ + imageType?: (string|null); + + /** NodeConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** NodeConfig localSsdCount */ + localSsdCount?: (number|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig preemptible */ + preemptible?: (boolean|null); + + /** NodeConfig accelerators */ + accelerators?: (google.container.v1beta1.IAcceleratorConfig[]|null); + + /** NodeConfig sandboxConfig */ + sandboxConfig?: (google.container.v1beta1.ISandboxConfig|null); + + /** NodeConfig nodeGroup */ + nodeGroup?: (string|null); + + /** NodeConfig reservationAffinity */ + reservationAffinity?: (google.container.v1beta1.IReservationAffinity|null); + + /** NodeConfig diskType */ + diskType?: (string|null); + + /** NodeConfig minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** NodeConfig workloadMetadataConfig */ + workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); + + /** NodeConfig taints */ + taints?: (google.container.v1beta1.INodeTaint[]|null); + + /** NodeConfig bootDiskKmsKey */ + bootDiskKmsKey?: (string|null); + + /** NodeConfig shieldedInstanceConfig */ + shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); + + /** NodeConfig linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); + + /** NodeConfig kubeletConfig */ + kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** NodeConfig ephemeralStorageConfig */ + ephemeralStorageConfig?: (google.container.v1beta1.IEphemeralStorageConfig|null); + + /** NodeConfig gcfsConfig */ + gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** NodeConfig advancedMachineFeatures */ + advancedMachineFeatures?: (google.container.v1beta1.IAdvancedMachineFeatures|null); + + /** NodeConfig gvnic */ + gvnic?: (google.container.v1beta1.IVirtualNIC|null); + + /** NodeConfig spot */ + spot?: (boolean|null); + + /** NodeConfig confidentialNodes */ + confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** NodeConfig fastSocket */ + fastSocket?: (google.container.v1beta1.IFastSocket|null); + + /** NodeConfig resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** NodeConfig loggingConfig */ + loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** NodeConfig windowsNodeConfig */ + windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); + + /** NodeConfig localNvmeSsdBlockConfig */ + localNvmeSsdBlockConfig?: (google.container.v1beta1.ILocalNvmeSsdBlockConfig|null); + + /** NodeConfig ephemeralStorageLocalSsdConfig */ + ephemeralStorageLocalSsdConfig?: (google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null); + + /** NodeConfig soleTenantConfig */ + soleTenantConfig?: (google.container.v1beta1.ISoleTenantConfig|null); + + /** NodeConfig containerdConfig */ + containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** NodeConfig hostMaintenancePolicy */ + hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** NodeConfig resourceManagerTags */ + resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** NodeConfig enableConfidentialStorage */ + enableConfidentialStorage?: (boolean|null); + + /** NodeConfig secondaryBootDisks */ + secondaryBootDisks?: (google.container.v1beta1.ISecondaryBootDisk[]|null); + + /** NodeConfig secondaryBootDiskUpdateStrategy */ + secondaryBootDiskUpdateStrategy?: (google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeConfig); + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig metadata. */ + public metadata: { [k: string]: string }; + + /** NodeConfig imageType. */ + public imageType: string; + + /** NodeConfig labels. */ + public labels: { [k: string]: string }; + + /** NodeConfig localSsdCount. */ + public localSsdCount: number; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig preemptible. */ + public preemptible: boolean; + + /** NodeConfig accelerators. */ + public accelerators: google.container.v1beta1.IAcceleratorConfig[]; + + /** NodeConfig sandboxConfig. */ + public sandboxConfig?: (google.container.v1beta1.ISandboxConfig|null); + + /** NodeConfig nodeGroup. */ + public nodeGroup: string; + + /** NodeConfig reservationAffinity. */ + public reservationAffinity?: (google.container.v1beta1.IReservationAffinity|null); + + /** NodeConfig diskType. */ + public diskType: string; + + /** NodeConfig minCpuPlatform. */ + public minCpuPlatform: string; + + /** NodeConfig workloadMetadataConfig. */ + public workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); + + /** NodeConfig taints. */ + public taints: google.container.v1beta1.INodeTaint[]; + + /** NodeConfig bootDiskKmsKey. */ + public bootDiskKmsKey: string; + + /** NodeConfig shieldedInstanceConfig. */ + public shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); + + /** NodeConfig linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); + + /** NodeConfig kubeletConfig. */ + public kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** NodeConfig ephemeralStorageConfig. */ + public ephemeralStorageConfig?: (google.container.v1beta1.IEphemeralStorageConfig|null); + + /** NodeConfig gcfsConfig. */ + public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** NodeConfig advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.container.v1beta1.IAdvancedMachineFeatures|null); + + /** NodeConfig gvnic. */ + public gvnic?: (google.container.v1beta1.IVirtualNIC|null); + + /** NodeConfig spot. */ + public spot: boolean; + + /** NodeConfig confidentialNodes. */ + public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** NodeConfig fastSocket. */ + public fastSocket?: (google.container.v1beta1.IFastSocket|null); + + /** NodeConfig resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** NodeConfig loggingConfig. */ + public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** NodeConfig windowsNodeConfig. */ + public windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); + + /** NodeConfig localNvmeSsdBlockConfig. */ + public localNvmeSsdBlockConfig?: (google.container.v1beta1.ILocalNvmeSsdBlockConfig|null); + + /** NodeConfig ephemeralStorageLocalSsdConfig. */ + public ephemeralStorageLocalSsdConfig?: (google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null); + + /** NodeConfig soleTenantConfig. */ + public soleTenantConfig?: (google.container.v1beta1.ISoleTenantConfig|null); + + /** NodeConfig containerdConfig. */ + public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** NodeConfig hostMaintenancePolicy. */ + public hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** NodeConfig resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** NodeConfig enableConfidentialStorage. */ + public enableConfidentialStorage: boolean; + + /** NodeConfig secondaryBootDisks. */ + public secondaryBootDisks: google.container.v1beta1.ISecondaryBootDisk[]; + + /** NodeConfig secondaryBootDiskUpdateStrategy. */ + public secondaryBootDiskUpdateStrategy?: (google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null); + + /** NodeConfig _fastSocket. */ + public _fastSocket?: "fastSocket"; + + /** NodeConfig _secondaryBootDiskUpdateStrategy. */ + public _secondaryBootDiskUpdateStrategy?: "secondaryBootDiskUpdateStrategy"; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.container.v1beta1.INodeConfig): google.container.v1beta1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|Long|string|null); + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|Long|string|null); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.container.v1beta1.IAdvancedMachineFeatures): google.container.v1beta1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeNetworkConfig. */ + interface INodeNetworkConfig { + + /** NodeNetworkConfig createPodRange */ + createPodRange?: (boolean|null); + + /** NodeNetworkConfig podRange */ + podRange?: (string|null); + + /** NodeNetworkConfig podIpv4CidrBlock */ + podIpv4CidrBlock?: (string|null); + + /** NodeNetworkConfig enablePrivateNodes */ + enablePrivateNodes?: (boolean|null); + + /** NodeNetworkConfig networkPerformanceConfig */ + networkPerformanceConfig?: (google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null); + + /** NodeNetworkConfig podCidrOverprovisionConfig */ + podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); + + /** NodeNetworkConfig additionalNodeNetworkConfigs */ + additionalNodeNetworkConfigs?: (google.container.v1beta1.IAdditionalNodeNetworkConfig[]|null); + + /** NodeNetworkConfig additionalPodNetworkConfigs */ + additionalPodNetworkConfigs?: (google.container.v1beta1.IAdditionalPodNetworkConfig[]|null); + + /** NodeNetworkConfig podIpv4RangeUtilization */ + podIpv4RangeUtilization?: (number|null); + } + + /** Represents a NodeNetworkConfig. */ + class NodeNetworkConfig implements INodeNetworkConfig { + + /** + * Constructs a new NodeNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeNetworkConfig); + + /** NodeNetworkConfig createPodRange. */ + public createPodRange: boolean; + + /** NodeNetworkConfig podRange. */ + public podRange: string; + + /** NodeNetworkConfig podIpv4CidrBlock. */ + public podIpv4CidrBlock: string; + + /** NodeNetworkConfig enablePrivateNodes. */ + public enablePrivateNodes?: (boolean|null); + + /** NodeNetworkConfig networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null); + + /** NodeNetworkConfig podCidrOverprovisionConfig. */ + public podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); + + /** NodeNetworkConfig additionalNodeNetworkConfigs. */ + public additionalNodeNetworkConfigs: google.container.v1beta1.IAdditionalNodeNetworkConfig[]; + + /** NodeNetworkConfig additionalPodNetworkConfigs. */ + public additionalPodNetworkConfigs: google.container.v1beta1.IAdditionalPodNetworkConfig[]; + + /** NodeNetworkConfig podIpv4RangeUtilization. */ + public podIpv4RangeUtilization: number; + + /** NodeNetworkConfig _enablePrivateNodes. */ + public _enablePrivateNodes?: "enablePrivateNodes"; + + /** NodeNetworkConfig _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** + * Creates a new NodeNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeNetworkConfig instance + */ + public static create(properties?: google.container.v1beta1.INodeNetworkConfig): google.container.v1beta1.NodeNetworkConfig; + + /** + * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. + * @param message NodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. + * @param message NodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeNetworkConfig; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeNetworkConfig; + + /** + * Verifies a NodeNetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeNetworkConfig; + + /** + * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. + * @param message NodeNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeNetworkConfig { + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig externalIpEgressBandwidthTier */ + externalIpEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig externalIpEgressBandwidthTier. */ + public externalIpEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** NetworkPerformanceConfig _externalIpEgressBandwidthTier. */ + public _externalIpEgressBandwidthTier?: "externalIpEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + TIER_1 = 1 + } + } + } + + /** Properties of an AdditionalNodeNetworkConfig. */ + interface IAdditionalNodeNetworkConfig { + + /** AdditionalNodeNetworkConfig network */ + network?: (string|null); + + /** AdditionalNodeNetworkConfig subnetwork */ + subnetwork?: (string|null); + } + + /** Represents an AdditionalNodeNetworkConfig. */ + class AdditionalNodeNetworkConfig implements IAdditionalNodeNetworkConfig { + + /** + * Constructs a new AdditionalNodeNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAdditionalNodeNetworkConfig); + + /** AdditionalNodeNetworkConfig network. */ + public network: string; + + /** AdditionalNodeNetworkConfig subnetwork. */ + public subnetwork: string; + + /** + * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalNodeNetworkConfig instance + */ + public static create(properties?: google.container.v1beta1.IAdditionalNodeNetworkConfig): google.container.v1beta1.AdditionalNodeNetworkConfig; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @param message AdditionalNodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @param message AdditionalNodeNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalNodeNetworkConfig; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalNodeNetworkConfig; + + /** + * Verifies an AdditionalNodeNetworkConfig message. + * @param message Plain 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 AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalNodeNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalNodeNetworkConfig; + + /** + * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. + * @param message AdditionalNodeNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AdditionalNodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalNodeNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalNodeNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdditionalPodNetworkConfig. */ + interface IAdditionalPodNetworkConfig { + + /** AdditionalPodNetworkConfig subnetwork */ + subnetwork?: (string|null); + + /** AdditionalPodNetworkConfig secondaryPodRange */ + secondaryPodRange?: (string|null); + + /** AdditionalPodNetworkConfig maxPodsPerNode */ + maxPodsPerNode?: (google.container.v1beta1.IMaxPodsConstraint|null); + } + + /** Represents an AdditionalPodNetworkConfig. */ + class AdditionalPodNetworkConfig implements IAdditionalPodNetworkConfig { + + /** + * Constructs a new AdditionalPodNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAdditionalPodNetworkConfig); + + /** AdditionalPodNetworkConfig subnetwork. */ + public subnetwork: string; + + /** AdditionalPodNetworkConfig secondaryPodRange. */ + public secondaryPodRange: string; + + /** AdditionalPodNetworkConfig maxPodsPerNode. */ + public maxPodsPerNode?: (google.container.v1beta1.IMaxPodsConstraint|null); + + /** AdditionalPodNetworkConfig _maxPodsPerNode. */ + public _maxPodsPerNode?: "maxPodsPerNode"; + + /** + * Creates a new AdditionalPodNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalPodNetworkConfig instance + */ + public static create(properties?: google.container.v1beta1.IAdditionalPodNetworkConfig): google.container.v1beta1.AdditionalPodNetworkConfig; + + /** + * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. + * @param message AdditionalPodNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. + * @param message AdditionalPodNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalPodNetworkConfig; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalPodNetworkConfig; + + /** + * Verifies an AdditionalPodNetworkConfig message. + * @param message Plain 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 AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalPodNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalPodNetworkConfig; + + /** + * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. + * @param message AdditionalPodNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AdditionalPodNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalPodNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalPodNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShieldedInstanceConfig. */ + interface IShieldedInstanceConfig { + + /** ShieldedInstanceConfig enableSecureBoot */ + enableSecureBoot?: (boolean|null); + + /** ShieldedInstanceConfig enableIntegrityMonitoring */ + enableIntegrityMonitoring?: (boolean|null); + } + + /** Represents a ShieldedInstanceConfig. */ + class ShieldedInstanceConfig implements IShieldedInstanceConfig { + + /** + * Constructs a new ShieldedInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IShieldedInstanceConfig); + + /** ShieldedInstanceConfig enableSecureBoot. */ + public enableSecureBoot: boolean; + + /** ShieldedInstanceConfig enableIntegrityMonitoring. */ + public enableIntegrityMonitoring: boolean; + + /** + * Creates a new ShieldedInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ShieldedInstanceConfig instance + */ + public static create(properties?: google.container.v1beta1.IShieldedInstanceConfig): google.container.v1beta1.ShieldedInstanceConfig; + + /** + * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. + * @param message ShieldedInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. + * @param message ShieldedInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ShieldedInstanceConfig; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ShieldedInstanceConfig; + + /** + * Verifies a ShieldedInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShieldedInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ShieldedInstanceConfig; + + /** + * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. + * @param message ShieldedInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ShieldedInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShieldedInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShieldedInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SandboxConfig. */ + interface ISandboxConfig { + + /** SandboxConfig sandboxType */ + sandboxType?: (string|null); + + /** SandboxConfig type */ + type?: (google.container.v1beta1.SandboxConfig.Type|keyof typeof google.container.v1beta1.SandboxConfig.Type|null); + } + + /** Represents a SandboxConfig. */ + class SandboxConfig implements ISandboxConfig { + + /** + * Constructs a new SandboxConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISandboxConfig); + + /** SandboxConfig sandboxType. */ + public sandboxType: string; + + /** SandboxConfig type. */ + public type: (google.container.v1beta1.SandboxConfig.Type|keyof typeof google.container.v1beta1.SandboxConfig.Type); + + /** + * Creates a new SandboxConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SandboxConfig instance + */ + public static create(properties?: google.container.v1beta1.ISandboxConfig): google.container.v1beta1.SandboxConfig; + + /** + * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. + * @param message SandboxConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. + * @param message SandboxConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SandboxConfig; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SandboxConfig; + + /** + * Verifies a SandboxConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SandboxConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SandboxConfig; + + /** + * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. + * @param message SandboxConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SandboxConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SandboxConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SandboxConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SandboxConfig { + + /** Type enum. */ + enum Type { + UNSPECIFIED = 0, + GVISOR = 1 + } + } + + /** Properties of an EphemeralStorageConfig. */ + interface IEphemeralStorageConfig { + + /** EphemeralStorageConfig localSsdCount */ + localSsdCount?: (number|null); + } + + /** Represents an EphemeralStorageConfig. */ + class EphemeralStorageConfig implements IEphemeralStorageConfig { + + /** + * Constructs a new EphemeralStorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IEphemeralStorageConfig); + + /** EphemeralStorageConfig localSsdCount. */ + public localSsdCount: number; + + /** + * Creates a new EphemeralStorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EphemeralStorageConfig instance + */ + public static create(properties?: google.container.v1beta1.IEphemeralStorageConfig): google.container.v1beta1.EphemeralStorageConfig; + + /** + * Encodes the specified EphemeralStorageConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. + * @param message EphemeralStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IEphemeralStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EphemeralStorageConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. + * @param message EphemeralStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IEphemeralStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EphemeralStorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EphemeralStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EphemeralStorageConfig; + + /** + * Decodes an EphemeralStorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EphemeralStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EphemeralStorageConfig; + + /** + * Verifies an EphemeralStorageConfig message. + * @param message Plain 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 EphemeralStorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EphemeralStorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EphemeralStorageConfig; + + /** + * Creates a plain object from an EphemeralStorageConfig message. Also converts values to other types if specified. + * @param message EphemeralStorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.EphemeralStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EphemeralStorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EphemeralStorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocalNvmeSsdBlockConfig. */ + interface ILocalNvmeSsdBlockConfig { + + /** LocalNvmeSsdBlockConfig localSsdCount */ + localSsdCount?: (number|null); + } + + /** Represents a LocalNvmeSsdBlockConfig. */ + class LocalNvmeSsdBlockConfig implements ILocalNvmeSsdBlockConfig { + + /** + * Constructs a new LocalNvmeSsdBlockConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILocalNvmeSsdBlockConfig); + + /** LocalNvmeSsdBlockConfig localSsdCount. */ + public localSsdCount: number; + + /** + * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalNvmeSsdBlockConfig instance + */ + public static create(properties?: google.container.v1beta1.ILocalNvmeSsdBlockConfig): google.container.v1beta1.LocalNvmeSsdBlockConfig; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @param message LocalNvmeSsdBlockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @param message LocalNvmeSsdBlockConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LocalNvmeSsdBlockConfig; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LocalNvmeSsdBlockConfig; + + /** + * Verifies a LocalNvmeSsdBlockConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalNvmeSsdBlockConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LocalNvmeSsdBlockConfig; + + /** + * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. + * @param message LocalNvmeSsdBlockConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.LocalNvmeSsdBlockConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalNvmeSsdBlockConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalNvmeSsdBlockConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EphemeralStorageLocalSsdConfig. */ + interface IEphemeralStorageLocalSsdConfig { + + /** EphemeralStorageLocalSsdConfig localSsdCount */ + localSsdCount?: (number|null); + } + + /** Represents an EphemeralStorageLocalSsdConfig. */ + class EphemeralStorageLocalSsdConfig implements IEphemeralStorageLocalSsdConfig { + + /** + * Constructs a new EphemeralStorageLocalSsdConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IEphemeralStorageLocalSsdConfig); + + /** EphemeralStorageLocalSsdConfig localSsdCount. */ + public localSsdCount: number; + + /** + * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EphemeralStorageLocalSsdConfig instance + */ + public static create(properties?: google.container.v1beta1.IEphemeralStorageLocalSsdConfig): google.container.v1beta1.EphemeralStorageLocalSsdConfig; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @param message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @param message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EphemeralStorageLocalSsdConfig; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EphemeralStorageLocalSsdConfig; + + /** + * Verifies an EphemeralStorageLocalSsdConfig message. + * @param message Plain 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 EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EphemeralStorageLocalSsdConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EphemeralStorageLocalSsdConfig; + + /** + * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. + * @param message EphemeralStorageLocalSsdConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.EphemeralStorageLocalSsdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EphemeralStorageLocalSsdConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EphemeralStorageLocalSsdConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcfsConfig. */ + interface IGcfsConfig { + + /** GcfsConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcfsConfig. */ + class GcfsConfig implements IGcfsConfig { + + /** + * Constructs a new GcfsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGcfsConfig); + + /** GcfsConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcfsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcfsConfig instance + */ + public static create(properties?: google.container.v1beta1.IGcfsConfig): google.container.v1beta1.GcfsConfig; + + /** + * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. + * @param message GcfsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. + * @param message GcfsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcfsConfig; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcfsConfig; + + /** + * Verifies a GcfsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcfsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcfsConfig; + + /** + * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. + * @param message GcfsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GcfsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcfsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcfsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservationAffinity. */ + interface IReservationAffinity { + + /** ReservationAffinity consumeReservationType */ + consumeReservationType?: (google.container.v1beta1.ReservationAffinity.Type|keyof typeof google.container.v1beta1.ReservationAffinity.Type|null); + + /** ReservationAffinity key */ + key?: (string|null); + + /** ReservationAffinity values */ + values?: (string[]|null); + } + + /** Represents a ReservationAffinity. */ + class ReservationAffinity implements IReservationAffinity { + + /** + * Constructs a new ReservationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IReservationAffinity); + + /** ReservationAffinity consumeReservationType. */ + public consumeReservationType: (google.container.v1beta1.ReservationAffinity.Type|keyof typeof google.container.v1beta1.ReservationAffinity.Type); + + /** ReservationAffinity key. */ + public key: string; + + /** ReservationAffinity values. */ + public values: string[]; + + /** + * Creates a new ReservationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservationAffinity instance + */ + public static create(properties?: google.container.v1beta1.IReservationAffinity): google.container.v1beta1.ReservationAffinity; + + /** + * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. + * @param message ReservationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. + * @param message ReservationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ReservationAffinity; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ReservationAffinity; + + /** + * Verifies a ReservationAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ReservationAffinity; + + /** + * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. + * @param message ReservationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ReservationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReservationAffinity { + + /** Type enum. */ + enum Type { + UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a SoleTenantConfig. */ + interface ISoleTenantConfig { + + /** SoleTenantConfig nodeAffinities */ + nodeAffinities?: (google.container.v1beta1.SoleTenantConfig.INodeAffinity[]|null); + } + + /** Represents a SoleTenantConfig. */ + class SoleTenantConfig implements ISoleTenantConfig { + + /** + * Constructs a new SoleTenantConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISoleTenantConfig); + + /** SoleTenantConfig nodeAffinities. */ + public nodeAffinities: google.container.v1beta1.SoleTenantConfig.INodeAffinity[]; + + /** + * Creates a new SoleTenantConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoleTenantConfig instance + */ + public static create(properties?: google.container.v1beta1.ISoleTenantConfig): google.container.v1beta1.SoleTenantConfig; + + /** + * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. + * @param message SoleTenantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. + * @param message SoleTenantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SoleTenantConfig; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SoleTenantConfig; + + /** + * Verifies a SoleTenantConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoleTenantConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SoleTenantConfig; + + /** + * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. + * @param message SoleTenantConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SoleTenantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoleTenantConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoleTenantConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SoleTenantConfig { + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.SoleTenantConfig.INodeAffinity); + + /** NodeAffinity key. */ + public key: string; + + /** NodeAffinity operator. */ + public operator: (google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator); + + /** NodeAffinity values. */ + public values: string[]; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.container.v1beta1.SoleTenantConfig.INodeAffinity): google.container.v1beta1.SoleTenantConfig.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SoleTenantConfig.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SoleTenantConfig.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SoleTenantConfig.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SoleTenantConfig.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + } + + /** Properties of a ContainerdConfig. */ + interface IContainerdConfig { + + /** ContainerdConfig privateRegistryAccessConfig */ + privateRegistryAccessConfig?: (google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null); + } + + /** Represents a ContainerdConfig. */ + class ContainerdConfig implements IContainerdConfig { + + /** + * Constructs a new ContainerdConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IContainerdConfig); + + /** ContainerdConfig privateRegistryAccessConfig. */ + public privateRegistryAccessConfig?: (google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null); + + /** + * Creates a new ContainerdConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerdConfig instance + */ + public static create(properties?: google.container.v1beta1.IContainerdConfig): google.container.v1beta1.ContainerdConfig; + + /** + * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. + * @param message ContainerdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. + * @param message ContainerdConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig; + + /** + * Verifies a ContainerdConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerdConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig; + + /** + * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. + * @param message ContainerdConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ContainerdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContainerdConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContainerdConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContainerdConfig { + + /** Properties of a PrivateRegistryAccessConfig. */ + interface IPrivateRegistryAccessConfig { + + /** PrivateRegistryAccessConfig enabled */ + enabled?: (boolean|null); + + /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig */ + certificateAuthorityDomainConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]|null); + } + + /** Represents a PrivateRegistryAccessConfig. */ + class PrivateRegistryAccessConfig implements IPrivateRegistryAccessConfig { + + /** + * Constructs a new PrivateRegistryAccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig); + + /** PrivateRegistryAccessConfig enabled. */ + public enabled: boolean; + + /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig. */ + public certificateAuthorityDomainConfig: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]; + + /** + * Creates a new PrivateRegistryAccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateRegistryAccessConfig instance + */ + public static create(properties?: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @param message PrivateRegistryAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @param message PrivateRegistryAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Verifies a PrivateRegistryAccessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateRegistryAccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; + + /** + * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. + * @param message PrivateRegistryAccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateRegistryAccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateRegistryAccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivateRegistryAccessConfig { + + /** Properties of a CertificateAuthorityDomainConfig. */ + interface ICertificateAuthorityDomainConfig { + + /** CertificateAuthorityDomainConfig fqdns */ + fqdns?: (string[]|null); + + /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig */ + gcpSecretManagerCertificateConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); + } + + /** Represents a CertificateAuthorityDomainConfig. */ + class CertificateAuthorityDomainConfig implements ICertificateAuthorityDomainConfig { + + /** + * Constructs a new CertificateAuthorityDomainConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig); + + /** CertificateAuthorityDomainConfig fqdns. */ + public fqdns: string[]; + + /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. */ + public gcpSecretManagerCertificateConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); + + /** CertificateAuthorityDomainConfig certificateConfig. */ + public certificateConfig?: "gcpSecretManagerCertificateConfig"; + + /** + * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthorityDomainConfig instance + */ + public static create(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @param message CertificateAuthorityDomainConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @param message CertificateAuthorityDomainConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Verifies a CertificateAuthorityDomainConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthorityDomainConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; + + /** + * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. + * @param message CertificateAuthorityDomainConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthorityDomainConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateAuthorityDomainConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CertificateAuthorityDomainConfig { + + /** Properties of a GCPSecretManagerCertificateConfig. */ + interface IGCPSecretManagerCertificateConfig { + + /** GCPSecretManagerCertificateConfig secretUri */ + secretUri?: (string|null); + } + + /** Represents a GCPSecretManagerCertificateConfig. */ + class GCPSecretManagerCertificateConfig implements IGCPSecretManagerCertificateConfig { + + /** + * Constructs a new GCPSecretManagerCertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig); + + /** GCPSecretManagerCertificateConfig secretUri. */ + public secretUri: string; + + /** + * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPSecretManagerCertificateConfig instance + */ + public static create(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @param message GCPSecretManagerCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @param message GCPSecretManagerCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Verifies a GCPSecretManagerCertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPSecretManagerCertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; + + /** + * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. + * @param message GCPSecretManagerCertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPSecretManagerCertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPSecretManagerCertificateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Properties of a HostMaintenancePolicy. */ + interface IHostMaintenancePolicy { + + /** HostMaintenancePolicy maintenanceInterval */ + maintenanceInterval?: (google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|keyof typeof google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null); + + /** HostMaintenancePolicy opportunisticMaintenanceStrategy */ + opportunisticMaintenanceStrategy?: (google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null); + } + + /** Represents a HostMaintenancePolicy. */ + class HostMaintenancePolicy implements IHostMaintenancePolicy { + + /** + * Constructs a new HostMaintenancePolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IHostMaintenancePolicy); + + /** HostMaintenancePolicy maintenanceInterval. */ + public maintenanceInterval?: (google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|keyof typeof google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null); + + /** HostMaintenancePolicy opportunisticMaintenanceStrategy. */ + public opportunisticMaintenanceStrategy?: (google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null); + + /** HostMaintenancePolicy _maintenanceInterval. */ + public _maintenanceInterval?: "maintenanceInterval"; + + /** HostMaintenancePolicy maintenanceStrategy. */ + public maintenanceStrategy?: "opportunisticMaintenanceStrategy"; + + /** + * Creates a new HostMaintenancePolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns HostMaintenancePolicy instance + */ + public static create(properties?: google.container.v1beta1.IHostMaintenancePolicy): google.container.v1beta1.HostMaintenancePolicy; + + /** + * Encodes the specified HostMaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. + * @param message HostMaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IHostMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HostMaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. + * @param message HostMaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IHostMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HostMaintenancePolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HostMaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HostMaintenancePolicy; + + /** + * Decodes a HostMaintenancePolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HostMaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HostMaintenancePolicy; + + /** + * Verifies a HostMaintenancePolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HostMaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HostMaintenancePolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HostMaintenancePolicy; + + /** + * Creates a plain object from a HostMaintenancePolicy message. Also converts values to other types if specified. + * @param message HostMaintenancePolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.HostMaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HostMaintenancePolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HostMaintenancePolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace HostMaintenancePolicy { + + /** MaintenanceInterval enum. */ + enum MaintenanceInterval { + MAINTENANCE_INTERVAL_UNSPECIFIED = 0, + AS_NEEDED = 1, + PERIODIC = 2 + } + + /** Properties of an OpportunisticMaintenanceStrategy. */ + interface IOpportunisticMaintenanceStrategy { + + /** OpportunisticMaintenanceStrategy nodeIdleTimeWindow */ + nodeIdleTimeWindow?: (google.protobuf.IDuration|null); + + /** OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow */ + maintenanceAvailabilityWindow?: (google.protobuf.IDuration|null); + + /** OpportunisticMaintenanceStrategy minNodesPerPool */ + minNodesPerPool?: (number|Long|string|null); + } + + /** Represents an OpportunisticMaintenanceStrategy. */ + class OpportunisticMaintenanceStrategy implements IOpportunisticMaintenanceStrategy { + + /** + * Constructs a new OpportunisticMaintenanceStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy); + + /** OpportunisticMaintenanceStrategy nodeIdleTimeWindow. */ + public nodeIdleTimeWindow?: (google.protobuf.IDuration|null); + + /** OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow. */ + public maintenanceAvailabilityWindow?: (google.protobuf.IDuration|null); + + /** OpportunisticMaintenanceStrategy minNodesPerPool. */ + public minNodesPerPool?: (number|Long|string|null); + + /** OpportunisticMaintenanceStrategy _nodeIdleTimeWindow. */ + public _nodeIdleTimeWindow?: "nodeIdleTimeWindow"; + + /** OpportunisticMaintenanceStrategy _maintenanceAvailabilityWindow. */ + public _maintenanceAvailabilityWindow?: "maintenanceAvailabilityWindow"; + + /** OpportunisticMaintenanceStrategy _minNodesPerPool. */ + public _minNodesPerPool?: "minNodesPerPool"; + + /** + * Creates a new OpportunisticMaintenanceStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns OpportunisticMaintenanceStrategy instance + */ + public static create(properties?: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; + + /** + * Encodes the specified OpportunisticMaintenanceStrategy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. + * @param message OpportunisticMaintenanceStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpportunisticMaintenanceStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. + * @param message OpportunisticMaintenanceStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpportunisticMaintenanceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; + + /** + * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpportunisticMaintenanceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; + + /** + * Verifies an OpportunisticMaintenanceStrategy message. + * @param message Plain 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 OpportunisticMaintenanceStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpportunisticMaintenanceStrategy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; + + /** + * Creates a plain object from an OpportunisticMaintenanceStrategy message. Also converts values to other types if specified. + * @param message OpportunisticMaintenanceStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpportunisticMaintenanceStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpportunisticMaintenanceStrategy + * @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.container.v1beta1.NodeTaint.Effect|keyof typeof google.container.v1beta1.NodeTaint.Effect|null); + } + + /** Represents a NodeTaint. */ + class NodeTaint implements INodeTaint { + + /** + * Constructs a new NodeTaint. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeTaint); + + /** NodeTaint key. */ + public key: string; + + /** NodeTaint value. */ + public value: string; + + /** NodeTaint effect. */ + public effect: (google.container.v1beta1.NodeTaint.Effect|keyof typeof google.container.v1beta1.NodeTaint.Effect); + + /** + * Creates a new NodeTaint instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeTaint instance + */ + public static create(properties?: google.container.v1beta1.INodeTaint): google.container.v1beta1.NodeTaint; + + /** + * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 NodeTaints. */ + interface INodeTaints { + + /** NodeTaints taints */ + taints?: (google.container.v1beta1.INodeTaint[]|null); + } + + /** Represents a NodeTaints. */ + class NodeTaints implements INodeTaints { + + /** + * Constructs a new NodeTaints. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeTaints); + + /** NodeTaints taints. */ + public taints: google.container.v1beta1.INodeTaint[]; + + /** + * Creates a new NodeTaints instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeTaints instance + */ + public static create(properties?: google.container.v1beta1.INodeTaints): google.container.v1beta1.NodeTaints; + + /** + * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. + * @param message NodeTaints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. + * @param message NodeTaints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeTaints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeTaints; + + /** + * Decodes a NodeTaints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeTaints; + + /** + * Verifies a NodeTaints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeTaints + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeTaints; + + /** + * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. + * @param message NodeTaints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeTaints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeTaints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeTaints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeLabels. */ + interface INodeLabels { + + /** NodeLabels labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a NodeLabels. */ + class NodeLabels implements INodeLabels { + + /** + * Constructs a new NodeLabels. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeLabels); + + /** NodeLabels labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new NodeLabels instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeLabels instance + */ + public static create(properties?: google.container.v1beta1.INodeLabels): google.container.v1beta1.NodeLabels; + + /** + * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. + * @param message NodeLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. + * @param message NodeLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeLabels message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeLabels; + + /** + * Decodes a NodeLabels message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeLabels; + + /** + * Verifies a NodeLabels message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeLabels + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeLabels; + + /** + * Creates a plain object from a NodeLabels message. Also converts values to other types if specified. + * @param message NodeLabels + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeLabels to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeLabels + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceLabels. */ + interface IResourceLabels { + + /** ResourceLabels labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ResourceLabels. */ + class ResourceLabels implements IResourceLabels { + + /** + * Constructs a new ResourceLabels. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IResourceLabels); + + /** ResourceLabels labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new ResourceLabels instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceLabels instance + */ + public static create(properties?: google.container.v1beta1.IResourceLabels): google.container.v1beta1.ResourceLabels; + + /** + * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. + * @param message ResourceLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. + * @param message ResourceLabels message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceLabels; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceLabels; + + /** + * Verifies a ResourceLabels message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceLabels + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceLabels; + + /** + * Creates a plain object from a ResourceLabels message. Also converts values to other types if specified. + * @param message ResourceLabels + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceLabels to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceLabels + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkTags. */ + interface INetworkTags { + + /** NetworkTags tags */ + tags?: (string[]|null); + } + + /** Represents a NetworkTags. */ + class NetworkTags implements INetworkTags { + + /** + * Constructs a new NetworkTags. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INetworkTags); + + /** NetworkTags tags. */ + public tags: string[]; + + /** + * Creates a new NetworkTags instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkTags instance + */ + public static create(properties?: google.container.v1beta1.INetworkTags): google.container.v1beta1.NetworkTags; + + /** + * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. + * @param message NetworkTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. + * @param message NetworkTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkTags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkTags; + + /** + * Decodes a NetworkTags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkTags; + + /** + * Verifies a NetworkTags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkTags + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkTags; + + /** + * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. + * @param message NetworkTags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NetworkTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkTags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkTags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MasterAuth. */ + interface IMasterAuth { + + /** MasterAuth username */ + username?: (string|null); + + /** MasterAuth password */ + password?: (string|null); + + /** MasterAuth clientCertificateConfig */ + clientCertificateConfig?: (google.container.v1beta1.IClientCertificateConfig|null); + + /** MasterAuth clusterCaCertificate */ + clusterCaCertificate?: (string|null); + + /** MasterAuth clientCertificate */ + clientCertificate?: (string|null); + + /** MasterAuth clientKey */ + clientKey?: (string|null); + } + + /** Represents a MasterAuth. */ + class MasterAuth implements IMasterAuth { + + /** + * Constructs a new MasterAuth. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMasterAuth); + + /** MasterAuth username. */ + public username: string; + + /** MasterAuth password. */ + public password: string; + + /** MasterAuth clientCertificateConfig. */ + public clientCertificateConfig?: (google.container.v1beta1.IClientCertificateConfig|null); + + /** MasterAuth clusterCaCertificate. */ + public clusterCaCertificate: string; + + /** MasterAuth clientCertificate. */ + public clientCertificate: string; + + /** MasterAuth clientKey. */ + public clientKey: string; + + /** + * Creates a new MasterAuth instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuth instance + */ + public static create(properties?: google.container.v1beta1.IMasterAuth): google.container.v1beta1.MasterAuth; + + /** + * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. + * @param message MasterAuth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. + * @param message MasterAuth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuth; + + /** + * Decodes a MasterAuth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuth; + + /** + * Verifies a MasterAuth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuth + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuth; + + /** + * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. + * @param message MasterAuth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MasterAuth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientCertificateConfig. */ + interface IClientCertificateConfig { + + /** ClientCertificateConfig issueClientCertificate */ + issueClientCertificate?: (boolean|null); + } + + /** Represents a ClientCertificateConfig. */ + class ClientCertificateConfig implements IClientCertificateConfig { + + /** + * Constructs a new ClientCertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IClientCertificateConfig); + + /** ClientCertificateConfig issueClientCertificate. */ + public issueClientCertificate: boolean; + + /** + * Creates a new ClientCertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientCertificateConfig instance + */ + public static create(properties?: google.container.v1beta1.IClientCertificateConfig): google.container.v1beta1.ClientCertificateConfig; + + /** + * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. + * @param message ClientCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. + * @param message ClientCertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClientCertificateConfig; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClientCertificateConfig; + + /** + * Verifies a ClientCertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientCertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClientCertificateConfig; + + /** + * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. + * @param message ClientCertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ClientCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientCertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientCertificateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddonsConfig. */ + interface IAddonsConfig { + + /** AddonsConfig httpLoadBalancing */ + httpLoadBalancing?: (google.container.v1beta1.IHttpLoadBalancing|null); + + /** AddonsConfig horizontalPodAutoscaling */ + horizontalPodAutoscaling?: (google.container.v1beta1.IHorizontalPodAutoscaling|null); + + /** AddonsConfig kubernetesDashboard */ + kubernetesDashboard?: (google.container.v1beta1.IKubernetesDashboard|null); + + /** AddonsConfig networkPolicyConfig */ + networkPolicyConfig?: (google.container.v1beta1.INetworkPolicyConfig|null); + + /** AddonsConfig istioConfig */ + istioConfig?: (google.container.v1beta1.IIstioConfig|null); + + /** AddonsConfig cloudRunConfig */ + cloudRunConfig?: (google.container.v1beta1.ICloudRunConfig|null); + + /** AddonsConfig dnsCacheConfig */ + dnsCacheConfig?: (google.container.v1beta1.IDnsCacheConfig|null); + + /** AddonsConfig configConnectorConfig */ + configConnectorConfig?: (google.container.v1beta1.IConfigConnectorConfig|null); + + /** AddonsConfig gcePersistentDiskCsiDriverConfig */ + gcePersistentDiskCsiDriverConfig?: (google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null); + + /** AddonsConfig kalmConfig */ + kalmConfig?: (google.container.v1beta1.IKalmConfig|null); + + /** AddonsConfig gcpFilestoreCsiDriverConfig */ + gcpFilestoreCsiDriverConfig?: (google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null); + + /** AddonsConfig gkeBackupAgentConfig */ + gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); + + /** AddonsConfig gcsFuseCsiDriverConfig */ + gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); + + /** AddonsConfig statefulHaConfig */ + statefulHaConfig?: (google.container.v1beta1.IStatefulHAConfig|null); + + /** AddonsConfig rayOperatorConfig */ + rayOperatorConfig?: (google.container.v1beta1.IRayOperatorConfig|null); + } + + /** Represents an AddonsConfig. */ + class AddonsConfig implements IAddonsConfig { + + /** + * Constructs a new AddonsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAddonsConfig); + + /** AddonsConfig httpLoadBalancing. */ + public httpLoadBalancing?: (google.container.v1beta1.IHttpLoadBalancing|null); + + /** AddonsConfig horizontalPodAutoscaling. */ + public horizontalPodAutoscaling?: (google.container.v1beta1.IHorizontalPodAutoscaling|null); + + /** AddonsConfig kubernetesDashboard. */ + public kubernetesDashboard?: (google.container.v1beta1.IKubernetesDashboard|null); + + /** AddonsConfig networkPolicyConfig. */ + public networkPolicyConfig?: (google.container.v1beta1.INetworkPolicyConfig|null); + + /** AddonsConfig istioConfig. */ + public istioConfig?: (google.container.v1beta1.IIstioConfig|null); + + /** AddonsConfig cloudRunConfig. */ + public cloudRunConfig?: (google.container.v1beta1.ICloudRunConfig|null); + + /** AddonsConfig dnsCacheConfig. */ + public dnsCacheConfig?: (google.container.v1beta1.IDnsCacheConfig|null); + + /** AddonsConfig configConnectorConfig. */ + public configConnectorConfig?: (google.container.v1beta1.IConfigConnectorConfig|null); + + /** AddonsConfig gcePersistentDiskCsiDriverConfig. */ + public gcePersistentDiskCsiDriverConfig?: (google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null); + + /** AddonsConfig kalmConfig. */ + public kalmConfig?: (google.container.v1beta1.IKalmConfig|null); + + /** AddonsConfig gcpFilestoreCsiDriverConfig. */ + public gcpFilestoreCsiDriverConfig?: (google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null); + + /** AddonsConfig gkeBackupAgentConfig. */ + public gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); + + /** AddonsConfig gcsFuseCsiDriverConfig. */ + public gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); + + /** AddonsConfig statefulHaConfig. */ + public statefulHaConfig?: (google.container.v1beta1.IStatefulHAConfig|null); + + /** AddonsConfig rayOperatorConfig. */ + public rayOperatorConfig?: (google.container.v1beta1.IRayOperatorConfig|null); + + /** + * Creates a new AddonsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AddonsConfig instance + */ + public static create(properties?: google.container.v1beta1.IAddonsConfig): google.container.v1beta1.AddonsConfig; + + /** + * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. + * @param message AddonsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. + * @param message AddonsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AddonsConfig; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AddonsConfig; + + /** + * Verifies an AddonsConfig message. + * @param message Plain 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 AddonsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddonsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AddonsConfig; + + /** + * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. + * @param message AddonsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AddonsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddonsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddonsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpLoadBalancing. */ + interface IHttpLoadBalancing { + + /** HttpLoadBalancing disabled */ + disabled?: (boolean|null); + } + + /** Represents a HttpLoadBalancing. */ + class HttpLoadBalancing implements IHttpLoadBalancing { + + /** + * Constructs a new HttpLoadBalancing. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IHttpLoadBalancing); + + /** HttpLoadBalancing disabled. */ + public disabled: boolean; + + /** + * Creates a new HttpLoadBalancing instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpLoadBalancing instance + */ + public static create(properties?: google.container.v1beta1.IHttpLoadBalancing): google.container.v1beta1.HttpLoadBalancing; + + /** + * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. + * @param message HttpLoadBalancing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. + * @param message HttpLoadBalancing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HttpLoadBalancing; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HttpLoadBalancing; + + /** + * Verifies a HttpLoadBalancing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpLoadBalancing + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HttpLoadBalancing; + + /** + * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. + * @param message HttpLoadBalancing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.HttpLoadBalancing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpLoadBalancing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpLoadBalancing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HorizontalPodAutoscaling. */ + interface IHorizontalPodAutoscaling { + + /** HorizontalPodAutoscaling disabled */ + disabled?: (boolean|null); + } + + /** Represents a HorizontalPodAutoscaling. */ + class HorizontalPodAutoscaling implements IHorizontalPodAutoscaling { + + /** + * Constructs a new HorizontalPodAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IHorizontalPodAutoscaling); + + /** HorizontalPodAutoscaling disabled. */ + public disabled: boolean; + + /** + * Creates a new HorizontalPodAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns HorizontalPodAutoscaling instance + */ + public static create(properties?: google.container.v1beta1.IHorizontalPodAutoscaling): google.container.v1beta1.HorizontalPodAutoscaling; + + /** + * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. + * @param message HorizontalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. + * @param message HorizontalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HorizontalPodAutoscaling; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HorizontalPodAutoscaling; + + /** + * Verifies a HorizontalPodAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HorizontalPodAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HorizontalPodAutoscaling; + + /** + * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. + * @param message HorizontalPodAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.HorizontalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HorizontalPodAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HorizontalPodAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KubernetesDashboard. */ + interface IKubernetesDashboard { + + /** KubernetesDashboard disabled */ + disabled?: (boolean|null); + } + + /** Represents a KubernetesDashboard. */ + class KubernetesDashboard implements IKubernetesDashboard { + + /** + * Constructs a new KubernetesDashboard. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IKubernetesDashboard); + + /** KubernetesDashboard disabled. */ + public disabled: boolean; + + /** + * Creates a new KubernetesDashboard instance using the specified properties. + * @param [properties] Properties to set + * @returns KubernetesDashboard instance + */ + public static create(properties?: google.container.v1beta1.IKubernetesDashboard): google.container.v1beta1.KubernetesDashboard; + + /** + * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. + * @param message KubernetesDashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. + * @param message KubernetesDashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.KubernetesDashboard; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.KubernetesDashboard; + + /** + * Verifies a KubernetesDashboard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KubernetesDashboard + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.KubernetesDashboard; + + /** + * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. + * @param message KubernetesDashboard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.KubernetesDashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KubernetesDashboard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KubernetesDashboard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkPolicyConfig. */ + interface INetworkPolicyConfig { + + /** NetworkPolicyConfig disabled */ + disabled?: (boolean|null); + } + + /** Represents a NetworkPolicyConfig. */ + class NetworkPolicyConfig implements INetworkPolicyConfig { + + /** + * Constructs a new NetworkPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INetworkPolicyConfig); + + /** NetworkPolicyConfig disabled. */ + public disabled: boolean; + + /** + * Creates a new NetworkPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPolicyConfig instance + */ + public static create(properties?: google.container.v1beta1.INetworkPolicyConfig): google.container.v1beta1.NetworkPolicyConfig; + + /** + * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. + * @param message NetworkPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. + * @param message NetworkPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkPolicyConfig; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkPolicyConfig; + + /** + * Verifies a NetworkPolicyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkPolicyConfig; + + /** + * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. + * @param message NetworkPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NetworkPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DnsCacheConfig. */ + interface IDnsCacheConfig { + + /** DnsCacheConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a DnsCacheConfig. */ + class DnsCacheConfig implements IDnsCacheConfig { + + /** + * Constructs a new DnsCacheConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDnsCacheConfig); + + /** DnsCacheConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new DnsCacheConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DnsCacheConfig instance + */ + public static create(properties?: google.container.v1beta1.IDnsCacheConfig): google.container.v1beta1.DnsCacheConfig; + + /** + * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. + * @param message DnsCacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. + * @param message DnsCacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DnsCacheConfig; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DnsCacheConfig; + + /** + * Verifies a DnsCacheConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DnsCacheConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DnsCacheConfig; + + /** + * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. + * @param message DnsCacheConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DnsCacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DnsCacheConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DnsCacheConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KalmConfig. */ + interface IKalmConfig { + + /** KalmConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a KalmConfig. */ + class KalmConfig implements IKalmConfig { + + /** + * Constructs a new KalmConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IKalmConfig); + + /** KalmConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new KalmConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KalmConfig instance + */ + public static create(properties?: google.container.v1beta1.IKalmConfig): google.container.v1beta1.KalmConfig; + + /** + * Encodes the specified KalmConfig message. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. + * @param message KalmConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IKalmConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KalmConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. + * @param message KalmConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IKalmConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KalmConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KalmConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.KalmConfig; + + /** + * Decodes a KalmConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KalmConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.KalmConfig; + + /** + * Verifies a KalmConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KalmConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KalmConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.KalmConfig; + + /** + * Creates a plain object from a KalmConfig message. Also converts values to other types if specified. + * @param message KalmConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.KalmConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KalmConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KalmConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GkeBackupAgentConfig. */ + interface IGkeBackupAgentConfig { + + /** GkeBackupAgentConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GkeBackupAgentConfig. */ + class GkeBackupAgentConfig implements IGkeBackupAgentConfig { + + /** + * Constructs a new GkeBackupAgentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGkeBackupAgentConfig); + + /** GkeBackupAgentConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GkeBackupAgentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GkeBackupAgentConfig instance + */ + public static create(properties?: google.container.v1beta1.IGkeBackupAgentConfig): google.container.v1beta1.GkeBackupAgentConfig; + + /** + * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. + * @param message GkeBackupAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. + * @param message GkeBackupAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GkeBackupAgentConfig; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GkeBackupAgentConfig; + + /** + * Verifies a GkeBackupAgentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GkeBackupAgentConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GkeBackupAgentConfig; + + /** + * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. + * @param message GkeBackupAgentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GkeBackupAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GkeBackupAgentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GkeBackupAgentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatefulHAConfig. */ + interface IStatefulHAConfig { + + /** StatefulHAConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a StatefulHAConfig. */ + class StatefulHAConfig implements IStatefulHAConfig { + + /** + * Constructs a new StatefulHAConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IStatefulHAConfig); + + /** StatefulHAConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new StatefulHAConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StatefulHAConfig instance + */ + public static create(properties?: google.container.v1beta1.IStatefulHAConfig): google.container.v1beta1.StatefulHAConfig; + + /** + * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. + * @param message StatefulHAConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. + * @param message StatefulHAConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StatefulHAConfig; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StatefulHAConfig; + + /** + * Verifies a StatefulHAConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatefulHAConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StatefulHAConfig; + + /** + * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. + * @param message StatefulHAConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.StatefulHAConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatefulHAConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatefulHAConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfigConnectorConfig. */ + interface IConfigConnectorConfig { + + /** ConfigConnectorConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConfigConnectorConfig. */ + class ConfigConnectorConfig implements IConfigConnectorConfig { + + /** + * Constructs a new ConfigConnectorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IConfigConnectorConfig); + + /** ConfigConnectorConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ConfigConnectorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigConnectorConfig instance + */ + public static create(properties?: google.container.v1beta1.IConfigConnectorConfig): google.container.v1beta1.ConfigConnectorConfig; + + /** + * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. + * @param message ConfigConnectorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. + * @param message ConfigConnectorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ConfigConnectorConfig; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ConfigConnectorConfig; + + /** + * Verifies a ConfigConnectorConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigConnectorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ConfigConnectorConfig; + + /** + * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. + * @param message ConfigConnectorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ConfigConnectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigConnectorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigConnectorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcePersistentDiskCsiDriverConfig. */ + interface IGcePersistentDiskCsiDriverConfig { + + /** GcePersistentDiskCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcePersistentDiskCsiDriverConfig. */ + class GcePersistentDiskCsiDriverConfig implements IGcePersistentDiskCsiDriverConfig { + + /** + * Constructs a new GcePersistentDiskCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig); + + /** GcePersistentDiskCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcePersistentDiskCsiDriverConfig instance + */ + public static create(properties?: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; + + /** + * Verifies a GcePersistentDiskCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcePersistentDiskCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; + + /** + * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcePersistentDiskCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GcePersistentDiskCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcePersistentDiskCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcePersistentDiskCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpFilestoreCsiDriverConfig. */ + interface IGcpFilestoreCsiDriverConfig { + + /** GcpFilestoreCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcpFilestoreCsiDriverConfig. */ + class GcpFilestoreCsiDriverConfig implements IGcpFilestoreCsiDriverConfig { + + /** + * Constructs a new GcpFilestoreCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGcpFilestoreCsiDriverConfig); + + /** GcpFilestoreCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpFilestoreCsiDriverConfig instance + */ + public static create(properties?: google.container.v1beta1.IGcpFilestoreCsiDriverConfig): google.container.v1beta1.GcpFilestoreCsiDriverConfig; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @param message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @param message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcpFilestoreCsiDriverConfig; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcpFilestoreCsiDriverConfig; + + /** + * Verifies a GcpFilestoreCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpFilestoreCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcpFilestoreCsiDriverConfig; + + /** + * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcpFilestoreCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GcpFilestoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpFilestoreCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpFilestoreCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcsFuseCsiDriverConfig. */ + interface IGcsFuseCsiDriverConfig { + + /** GcsFuseCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcsFuseCsiDriverConfig. */ + class GcsFuseCsiDriverConfig implements IGcsFuseCsiDriverConfig { + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig); + + /** GcsFuseCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsFuseCsiDriverConfig instance + */ + public static create(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Verifies a GcsFuseCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsFuseCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcsFuseCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GcsFuseCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RayOperatorConfig. */ + interface IRayOperatorConfig { + + /** RayOperatorConfig enabled */ + enabled?: (boolean|null); + + /** RayOperatorConfig rayClusterLoggingConfig */ + rayClusterLoggingConfig?: (google.container.v1beta1.IRayClusterLoggingConfig|null); + + /** RayOperatorConfig rayClusterMonitoringConfig */ + rayClusterMonitoringConfig?: (google.container.v1beta1.IRayClusterMonitoringConfig|null); + } + + /** Represents a RayOperatorConfig. */ + class RayOperatorConfig implements IRayOperatorConfig { + + /** + * Constructs a new RayOperatorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRayOperatorConfig); + + /** RayOperatorConfig enabled. */ + public enabled: boolean; + + /** RayOperatorConfig rayClusterLoggingConfig. */ + public rayClusterLoggingConfig?: (google.container.v1beta1.IRayClusterLoggingConfig|null); + + /** RayOperatorConfig rayClusterMonitoringConfig. */ + public rayClusterMonitoringConfig?: (google.container.v1beta1.IRayClusterMonitoringConfig|null); + + /** + * Creates a new RayOperatorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayOperatorConfig instance + */ + public static create(properties?: google.container.v1beta1.IRayOperatorConfig): google.container.v1beta1.RayOperatorConfig; + + /** + * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. + * @param message RayOperatorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. + * @param message RayOperatorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayOperatorConfig; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayOperatorConfig; + + /** + * Verifies a RayOperatorConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayOperatorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayOperatorConfig; + + /** + * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. + * @param message RayOperatorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RayOperatorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayOperatorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayOperatorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterMasterGlobalAccessConfig. */ + interface IPrivateClusterMasterGlobalAccessConfig { + + /** PrivateClusterMasterGlobalAccessConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a PrivateClusterMasterGlobalAccessConfig. */ + class PrivateClusterMasterGlobalAccessConfig implements IPrivateClusterMasterGlobalAccessConfig { + + /** + * Constructs a new PrivateClusterMasterGlobalAccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig); + + /** PrivateClusterMasterGlobalAccessConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterMasterGlobalAccessConfig instance + */ + public static create(properties?: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Verifies a PrivateClusterMasterGlobalAccessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterMasterGlobalAccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; + + /** + * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. + * @param message PrivateClusterMasterGlobalAccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterMasterGlobalAccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateNodes */ + enablePrivateNodes?: (boolean|null); + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig privateEndpoint */ + privateEndpoint?: (string|null); + + /** PrivateClusterConfig publicEndpoint */ + publicEndpoint?: (string|null); + + /** PrivateClusterConfig peeringName */ + peeringName?: (string|null); + + /** PrivateClusterConfig masterGlobalAccessConfig */ + masterGlobalAccessConfig?: (google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null); + + /** PrivateClusterConfig privateEndpointSubnetwork */ + privateEndpointSubnetwork?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateNodes. */ + public enablePrivateNodes: boolean; + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig privateEndpoint. */ + public privateEndpoint: string; + + /** PrivateClusterConfig publicEndpoint. */ + public publicEndpoint: string; + + /** PrivateClusterConfig peeringName. */ + public peeringName: string; + + /** PrivateClusterConfig masterGlobalAccessConfig. */ + public masterGlobalAccessConfig?: (google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null); + + /** PrivateClusterConfig privateEndpointSubnetwork. */ + public privateEndpointSubnetwork: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.container.v1beta1.IPrivateClusterConfig): google.container.v1beta1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IstioConfig. */ + interface IIstioConfig { + + /** IstioConfig disabled */ + disabled?: (boolean|null); + + /** IstioConfig auth */ + auth?: (google.container.v1beta1.IstioConfig.IstioAuthMode|keyof typeof google.container.v1beta1.IstioConfig.IstioAuthMode|null); + } + + /** Represents an IstioConfig. */ + class IstioConfig implements IIstioConfig { + + /** + * Constructs a new IstioConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IIstioConfig); + + /** IstioConfig disabled. */ + public disabled: boolean; + + /** IstioConfig auth. */ + public auth: (google.container.v1beta1.IstioConfig.IstioAuthMode|keyof typeof google.container.v1beta1.IstioConfig.IstioAuthMode); + + /** + * Creates a new IstioConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IstioConfig instance + */ + public static create(properties?: google.container.v1beta1.IIstioConfig): google.container.v1beta1.IstioConfig; + + /** + * Encodes the specified IstioConfig message. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. + * @param message IstioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IIstioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IstioConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. + * @param message IstioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IIstioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IstioConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IstioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IstioConfig; + + /** + * Decodes an IstioConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IstioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IstioConfig; + + /** + * Verifies an IstioConfig message. + * @param message Plain 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 IstioConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IstioConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IstioConfig; + + /** + * Creates a plain object from an IstioConfig message. Also converts values to other types if specified. + * @param message IstioConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.IstioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IstioConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IstioConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IstioConfig { + + /** IstioAuthMode enum. */ + enum IstioAuthMode { + AUTH_NONE = 0, + AUTH_MUTUAL_TLS = 1 + } + } + + /** Properties of a CloudRunConfig. */ + interface ICloudRunConfig { + + /** CloudRunConfig disabled */ + disabled?: (boolean|null); + + /** CloudRunConfig loadBalancerType */ + loadBalancerType?: (google.container.v1beta1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1beta1.CloudRunConfig.LoadBalancerType|null); + } + + /** Represents a CloudRunConfig. */ + class CloudRunConfig implements ICloudRunConfig { + + /** + * Constructs a new CloudRunConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICloudRunConfig); + + /** CloudRunConfig disabled. */ + public disabled: boolean; + + /** CloudRunConfig loadBalancerType. */ + public loadBalancerType: (google.container.v1beta1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1beta1.CloudRunConfig.LoadBalancerType); + + /** + * Creates a new CloudRunConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunConfig instance + */ + public static create(properties?: google.container.v1beta1.ICloudRunConfig): google.container.v1beta1.CloudRunConfig; + + /** + * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. + * @param message CloudRunConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. + * @param message CloudRunConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CloudRunConfig; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CloudRunConfig; + + /** + * Verifies a CloudRunConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CloudRunConfig; + + /** + * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. + * @param message CloudRunConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CloudRunConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudRunConfig { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + LOAD_BALANCER_TYPE_EXTERNAL = 1, + LOAD_BALANCER_TYPE_INTERNAL = 2 + } + } + + /** Properties of a MasterAuthorizedNetworksConfig. */ + interface IMasterAuthorizedNetworksConfig { + + /** MasterAuthorizedNetworksConfig enabled */ + enabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig cidrBlocks */ + cidrBlocks?: (google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); + + /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled */ + gcpPublicCidrsAccessEnabled?: (boolean|null); + } + + /** Represents a MasterAuthorizedNetworksConfig. */ + class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMasterAuthorizedNetworksConfig); + + /** MasterAuthorizedNetworksConfig enabled. */ + public enabled: boolean; + + /** MasterAuthorizedNetworksConfig cidrBlocks. */ + public cidrBlocks: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]; + + /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. */ + public gcpPublicCidrsAccessEnabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. */ + public _gcpPublicCidrsAccessEnabled?: "gcpPublicCidrsAccessEnabled"; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuthorizedNetworksConfig instance + */ + public static create(properties?: google.container.v1beta1.IMasterAuthorizedNetworksConfig): google.container.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuthorizedNetworksConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @param message MasterAuthorizedNetworksConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MasterAuthorizedNetworksConfig { + + /** Properties of a CidrBlock. */ + interface ICidrBlock { + + /** CidrBlock displayName */ + displayName?: (string|null); + + /** CidrBlock cidrBlock */ + cidrBlock?: (string|null); + } + + /** Represents a CidrBlock. */ + class CidrBlock implements ICidrBlock { + + /** + * Constructs a new CidrBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock); + + /** CidrBlock displayName. */ + public displayName: string; + + /** CidrBlock cidrBlock. */ + public cidrBlock: string; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns CidrBlock instance + */ + public static create(properties?: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Verifies a CidrBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CidrBlock + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @param message CidrBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CidrBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CidrBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LegacyAbac. */ + interface ILegacyAbac { + + /** LegacyAbac enabled */ + enabled?: (boolean|null); + } + + /** Represents a LegacyAbac. */ + class LegacyAbac implements ILegacyAbac { + + /** + * Constructs a new LegacyAbac. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILegacyAbac); + + /** LegacyAbac enabled. */ + public enabled: boolean; + + /** + * Creates a new LegacyAbac instance using the specified properties. + * @param [properties] Properties to set + * @returns LegacyAbac instance + */ + public static create(properties?: google.container.v1beta1.ILegacyAbac): google.container.v1beta1.LegacyAbac; + + /** + * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. + * @param message LegacyAbac message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. + * @param message LegacyAbac message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LegacyAbac; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LegacyAbac; + + /** + * Verifies a LegacyAbac message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LegacyAbac + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LegacyAbac; + + /** + * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. + * @param message LegacyAbac + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.LegacyAbac, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LegacyAbac to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LegacyAbac + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkPolicy. */ + interface INetworkPolicy { + + /** NetworkPolicy provider */ + provider?: (google.container.v1beta1.NetworkPolicy.Provider|keyof typeof google.container.v1beta1.NetworkPolicy.Provider|null); + + /** NetworkPolicy enabled */ + enabled?: (boolean|null); + } + + /** Represents a NetworkPolicy. */ + class NetworkPolicy implements INetworkPolicy { + + /** + * Constructs a new NetworkPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INetworkPolicy); + + /** NetworkPolicy provider. */ + public provider: (google.container.v1beta1.NetworkPolicy.Provider|keyof typeof google.container.v1beta1.NetworkPolicy.Provider); + + /** NetworkPolicy enabled. */ + public enabled: boolean; + + /** + * Creates a new NetworkPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPolicy instance + */ + public static create(properties?: google.container.v1beta1.INetworkPolicy): google.container.v1beta1.NetworkPolicy; + + /** + * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. + * @param message NetworkPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. + * @param message NetworkPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkPolicy; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkPolicy; + + /** + * Verifies a NetworkPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkPolicy; + + /** + * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. + * @param message NetworkPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NetworkPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPolicy { + + /** Provider enum. */ + enum Provider { + PROVIDER_UNSPECIFIED = 0, + CALICO = 1 + } + } + + /** Properties of a PodCIDROverprovisionConfig. */ + interface IPodCIDROverprovisionConfig { + + /** PodCIDROverprovisionConfig disable */ + disable?: (boolean|null); + } + + /** Represents a PodCIDROverprovisionConfig. */ + class PodCIDROverprovisionConfig implements IPodCIDROverprovisionConfig { + + /** + * Constructs a new PodCIDROverprovisionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IPodCIDROverprovisionConfig); + + /** PodCIDROverprovisionConfig disable. */ + public disable: boolean; + + /** + * Creates a new PodCIDROverprovisionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PodCIDROverprovisionConfig instance + */ + public static create(properties?: google.container.v1beta1.IPodCIDROverprovisionConfig): google.container.v1beta1.PodCIDROverprovisionConfig; + + /** + * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. + * @param message PodCIDROverprovisionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. + * @param message PodCIDROverprovisionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PodCIDROverprovisionConfig; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PodCIDROverprovisionConfig; + + /** + * Verifies a PodCIDROverprovisionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PodCIDROverprovisionConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PodCIDROverprovisionConfig; + + /** + * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. + * @param message PodCIDROverprovisionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.PodCIDROverprovisionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PodCIDROverprovisionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PodCIDROverprovisionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy createSubnetwork */ + createSubnetwork?: (boolean|null); + + /** IPAllocationPolicy subnetworkName */ + subnetworkName?: (string|null); + + /** IPAllocationPolicy clusterIpv4Cidr */ + clusterIpv4Cidr?: (string|null); + + /** IPAllocationPolicy nodeIpv4Cidr */ + nodeIpv4Cidr?: (string|null); + + /** IPAllocationPolicy servicesIpv4Cidr */ + servicesIpv4Cidr?: (string|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy nodeIpv4CidrBlock */ + nodeIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy allowRouteOverlap */ + allowRouteOverlap?: (boolean|null); + + /** IPAllocationPolicy tpuIpv4CidrBlock */ + tpuIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy useRoutes */ + useRoutes?: (boolean|null); + + /** IPAllocationPolicy stackType */ + stackType?: (google.container.v1beta1.IPAllocationPolicy.StackType|keyof typeof google.container.v1beta1.IPAllocationPolicy.StackType|null); + + /** IPAllocationPolicy ipv6AccessType */ + ipv6AccessType?: (google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|keyof typeof google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|null); + + /** IPAllocationPolicy podCidrOverprovisionConfig */ + podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); + + /** IPAllocationPolicy subnetIpv6CidrBlock */ + subnetIpv6CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv6CidrBlock */ + servicesIpv6CidrBlock?: (string|null); + + /** IPAllocationPolicy additionalPodRangesConfig */ + additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** IPAllocationPolicy defaultPodIpv4RangeUtilization */ + defaultPodIpv4RangeUtilization?: (number|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy createSubnetwork. */ + public createSubnetwork: boolean; + + /** IPAllocationPolicy subnetworkName. */ + public subnetworkName: string; + + /** IPAllocationPolicy clusterIpv4Cidr. */ + public clusterIpv4Cidr: string; + + /** IPAllocationPolicy nodeIpv4Cidr. */ + public nodeIpv4Cidr: string; + + /** IPAllocationPolicy servicesIpv4Cidr. */ + public servicesIpv4Cidr: string; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName: string; + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName: string; + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock: string; + + /** IPAllocationPolicy nodeIpv4CidrBlock. */ + public nodeIpv4CidrBlock: string; + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock: string; + + /** IPAllocationPolicy allowRouteOverlap. */ + public allowRouteOverlap: boolean; + + /** IPAllocationPolicy tpuIpv4CidrBlock. */ + public tpuIpv4CidrBlock: string; + + /** IPAllocationPolicy useRoutes. */ + public useRoutes: boolean; + + /** IPAllocationPolicy stackType. */ + public stackType: (google.container.v1beta1.IPAllocationPolicy.StackType|keyof typeof google.container.v1beta1.IPAllocationPolicy.StackType); + + /** IPAllocationPolicy ipv6AccessType. */ + public ipv6AccessType: (google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|keyof typeof google.container.v1beta1.IPAllocationPolicy.IPv6AccessType); + + /** IPAllocationPolicy podCidrOverprovisionConfig. */ + public podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); + + /** IPAllocationPolicy subnetIpv6CidrBlock. */ + public subnetIpv6CidrBlock: string; + + /** IPAllocationPolicy servicesIpv6CidrBlock. */ + public servicesIpv6CidrBlock: string; + + /** IPAllocationPolicy additionalPodRangesConfig. */ + public additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** IPAllocationPolicy defaultPodIpv4RangeUtilization. */ + public defaultPodIpv4RangeUtilization: number; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.container.v1beta1.IIPAllocationPolicy): google.container.v1beta1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IPAllocationPolicy { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4 = 1, + IPV4_IPV6 = 2 + } + + /** IPv6AccessType enum. */ + enum IPv6AccessType { + IPV6_ACCESS_TYPE_UNSPECIFIED = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + } + + /** Properties of a BinaryAuthorization. */ + interface IBinaryAuthorization { + + /** BinaryAuthorization enabled */ + enabled?: (boolean|null); + + /** BinaryAuthorization evaluationMode */ + evaluationMode?: (google.container.v1beta1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1beta1.BinaryAuthorization.EvaluationMode|null); + + /** BinaryAuthorization policyBindings */ + policyBindings?: (google.container.v1beta1.BinaryAuthorization.IPolicyBinding[]|null); + } + + /** Represents a BinaryAuthorization. */ + class BinaryAuthorization implements IBinaryAuthorization { + + /** + * Constructs a new BinaryAuthorization. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IBinaryAuthorization); + + /** BinaryAuthorization enabled. */ + public enabled: boolean; + + /** BinaryAuthorization evaluationMode. */ + public evaluationMode: (google.container.v1beta1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1beta1.BinaryAuthorization.EvaluationMode); + + /** BinaryAuthorization policyBindings. */ + public policyBindings: google.container.v1beta1.BinaryAuthorization.IPolicyBinding[]; + + /** + * Creates a new BinaryAuthorization instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryAuthorization instance + */ + public static create(properties?: google.container.v1beta1.IBinaryAuthorization): google.container.v1beta1.BinaryAuthorization; + + /** + * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. + * @param message BinaryAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. + * @param message BinaryAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BinaryAuthorization; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BinaryAuthorization; + + /** + * Verifies a BinaryAuthorization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryAuthorization + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BinaryAuthorization; + + /** + * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. + * @param message BinaryAuthorization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BinaryAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryAuthorization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryAuthorization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BinaryAuthorization { + + /** EvaluationMode enum. */ + enum EvaluationMode { + EVALUATION_MODE_UNSPECIFIED = 0, + DISABLED = 1, + PROJECT_SINGLETON_POLICY_ENFORCE = 2, + POLICY_BINDINGS = 5, + POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE = 6 + } + + /** Properties of a PolicyBinding. */ + interface IPolicyBinding { + + /** PolicyBinding name */ + name?: (string|null); + } + + /** Represents a PolicyBinding. */ + class PolicyBinding implements IPolicyBinding { + + /** + * Constructs a new PolicyBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.BinaryAuthorization.IPolicyBinding); + + /** PolicyBinding name. */ + public name?: (string|null); + + /** PolicyBinding _name. */ + public _name?: "name"; + + /** + * Creates a new PolicyBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyBinding instance + */ + public static create(properties?: google.container.v1beta1.BinaryAuthorization.IPolicyBinding): google.container.v1beta1.BinaryAuthorization.PolicyBinding; + + /** + * Encodes the specified PolicyBinding message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. + * @param message PolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.BinaryAuthorization.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyBinding message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. + * @param message PolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.BinaryAuthorization.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BinaryAuthorization.PolicyBinding; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BinaryAuthorization.PolicyBinding; + + /** + * Verifies a PolicyBinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyBinding + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BinaryAuthorization.PolicyBinding; + + /** + * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. + * @param message PolicyBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BinaryAuthorization.PolicyBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PodSecurityPolicyConfig. */ + interface IPodSecurityPolicyConfig { + + /** PodSecurityPolicyConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a PodSecurityPolicyConfig. */ + class PodSecurityPolicyConfig implements IPodSecurityPolicyConfig { + + /** + * Constructs a new PodSecurityPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IPodSecurityPolicyConfig); + + /** PodSecurityPolicyConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new PodSecurityPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PodSecurityPolicyConfig instance + */ + public static create(properties?: google.container.v1beta1.IPodSecurityPolicyConfig): google.container.v1beta1.PodSecurityPolicyConfig; + + /** + * Encodes the specified PodSecurityPolicyConfig message. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. + * @param message PodSecurityPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IPodSecurityPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PodSecurityPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. + * @param message PodSecurityPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IPodSecurityPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PodSecurityPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PodSecurityPolicyConfig; + + /** + * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PodSecurityPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PodSecurityPolicyConfig; + + /** + * Verifies a PodSecurityPolicyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PodSecurityPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PodSecurityPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PodSecurityPolicyConfig; + + /** + * Creates a plain object from a PodSecurityPolicyConfig message. Also converts values to other types if specified. + * @param message PodSecurityPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.PodSecurityPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PodSecurityPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PodSecurityPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuthenticatorGroupsConfig. */ + interface IAuthenticatorGroupsConfig { + + /** AuthenticatorGroupsConfig enabled */ + enabled?: (boolean|null); + + /** AuthenticatorGroupsConfig securityGroup */ + securityGroup?: (string|null); + } + + /** Represents an AuthenticatorGroupsConfig. */ + class AuthenticatorGroupsConfig implements IAuthenticatorGroupsConfig { + + /** + * Constructs a new AuthenticatorGroupsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAuthenticatorGroupsConfig); + + /** AuthenticatorGroupsConfig enabled. */ + public enabled: boolean; + + /** AuthenticatorGroupsConfig securityGroup. */ + public securityGroup: string; + + /** + * Creates a new AuthenticatorGroupsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthenticatorGroupsConfig instance + */ + public static create(properties?: google.container.v1beta1.IAuthenticatorGroupsConfig): google.container.v1beta1.AuthenticatorGroupsConfig; + + /** + * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. + * @param message AuthenticatorGroupsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. + * @param message AuthenticatorGroupsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AuthenticatorGroupsConfig; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AuthenticatorGroupsConfig; + + /** + * Verifies an AuthenticatorGroupsConfig message. + * @param message Plain 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 AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthenticatorGroupsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AuthenticatorGroupsConfig; + + /** + * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. + * @param message AuthenticatorGroupsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AuthenticatorGroupsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthenticatorGroupsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthenticatorGroupsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterTelemetry. */ + interface IClusterTelemetry { + + /** ClusterTelemetry type */ + type?: (google.container.v1beta1.ClusterTelemetry.Type|keyof typeof google.container.v1beta1.ClusterTelemetry.Type|null); + } + + /** Represents a ClusterTelemetry. */ + class ClusterTelemetry implements IClusterTelemetry { + + /** + * Constructs a new ClusterTelemetry. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IClusterTelemetry); + + /** ClusterTelemetry type. */ + public type: (google.container.v1beta1.ClusterTelemetry.Type|keyof typeof google.container.v1beta1.ClusterTelemetry.Type); + + /** + * Creates a new ClusterTelemetry instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterTelemetry instance + */ + public static create(properties?: google.container.v1beta1.IClusterTelemetry): google.container.v1beta1.ClusterTelemetry; + + /** + * Encodes the specified ClusterTelemetry message. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. + * @param message ClusterTelemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IClusterTelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterTelemetry message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. + * @param message ClusterTelemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IClusterTelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterTelemetry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterTelemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterTelemetry; + + /** + * Decodes a ClusterTelemetry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterTelemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterTelemetry; + + /** + * Verifies a ClusterTelemetry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterTelemetry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterTelemetry + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterTelemetry; + + /** + * Creates a plain object from a ClusterTelemetry message. Also converts values to other types if specified. + * @param message ClusterTelemetry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ClusterTelemetry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterTelemetry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterTelemetry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterTelemetry { + + /** Type enum. */ + enum Type { + UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2, + SYSTEM_ONLY = 3 + } + } + + /** Properties of a Cluster. */ + interface ICluster { + + /** Cluster name */ + name?: (string|null); + + /** Cluster description */ + description?: (string|null); + + /** Cluster initialNodeCount */ + initialNodeCount?: (number|null); + + /** Cluster nodeConfig */ + nodeConfig?: (google.container.v1beta1.INodeConfig|null); + + /** Cluster masterAuth */ + masterAuth?: (google.container.v1beta1.IMasterAuth|null); + + /** Cluster loggingService */ + loggingService?: (string|null); + + /** Cluster monitoringService */ + monitoringService?: (string|null); + + /** Cluster network */ + network?: (string|null); + + /** Cluster clusterIpv4Cidr */ + clusterIpv4Cidr?: (string|null); + + /** Cluster addonsConfig */ + addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** Cluster subnetwork */ + subnetwork?: (string|null); + + /** Cluster nodePools */ + nodePools?: (google.container.v1beta1.INodePool[]|null); + + /** Cluster locations */ + locations?: (string[]|null); + + /** Cluster enableKubernetesAlpha */ + enableKubernetesAlpha?: (boolean|null); + + /** Cluster enableK8sBetaApis */ + enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** Cluster resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** Cluster labelFingerprint */ + labelFingerprint?: (string|null); + + /** Cluster legacyAbac */ + legacyAbac?: (google.container.v1beta1.ILegacyAbac|null); + + /** Cluster networkPolicy */ + networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); + + /** Cluster ipAllocationPolicy */ + ipAllocationPolicy?: (google.container.v1beta1.IIPAllocationPolicy|null); + + /** Cluster masterAuthorizedNetworksConfig */ + masterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** Cluster maintenancePolicy */ + maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); + + /** Cluster binaryAuthorization */ + binaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); + + /** Cluster podSecurityPolicyConfig */ + podSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); + + /** Cluster autoscaling */ + autoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); + + /** Cluster networkConfig */ + networkConfig?: (google.container.v1beta1.INetworkConfig|null); + + /** Cluster privateCluster */ + privateCluster?: (boolean|null); + + /** Cluster masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** Cluster defaultMaxPodsConstraint */ + defaultMaxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); + + /** Cluster resourceUsageExportConfig */ + resourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); + + /** Cluster authenticatorGroupsConfig */ + authenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); + + /** Cluster privateClusterConfig */ + privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** Cluster verticalPodAutoscaling */ + verticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); + + /** Cluster shieldedNodes */ + shieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); + + /** Cluster releaseChannel */ + releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** Cluster workloadIdentityConfig */ + workloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); + + /** Cluster workloadCertificates */ + workloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); + + /** Cluster meshCertificates */ + meshCertificates?: (google.container.v1beta1.IMeshCertificates|null); + + /** Cluster workloadAltsConfig */ + workloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); + + /** Cluster costManagementConfig */ + costManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); + + /** Cluster clusterTelemetry */ + clusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); + + /** Cluster tpuConfig */ + tpuConfig?: (google.container.v1beta1.ITpuConfig|null); + + /** Cluster notificationConfig */ + notificationConfig?: (google.container.v1beta1.INotificationConfig|null); + + /** Cluster confidentialNodes */ + confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** Cluster identityServiceConfig */ + identityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); + + /** Cluster selfLink */ + selfLink?: (string|null); + + /** Cluster zone */ + zone?: (string|null); + + /** Cluster endpoint */ + endpoint?: (string|null); + + /** Cluster initialClusterVersion */ + initialClusterVersion?: (string|null); + + /** Cluster currentMasterVersion */ + currentMasterVersion?: (string|null); + + /** Cluster currentNodeVersion */ + currentNodeVersion?: (string|null); + + /** Cluster createTime */ + createTime?: (string|null); + + /** Cluster status */ + status?: (google.container.v1beta1.Cluster.Status|keyof typeof google.container.v1beta1.Cluster.Status|null); + + /** Cluster statusMessage */ + statusMessage?: (string|null); + + /** Cluster nodeIpv4CidrSize */ + nodeIpv4CidrSize?: (number|null); + + /** Cluster servicesIpv4Cidr */ + servicesIpv4Cidr?: (string|null); + + /** Cluster instanceGroupUrls */ + instanceGroupUrls?: (string[]|null); + + /** Cluster currentNodeCount */ + currentNodeCount?: (number|null); + + /** Cluster expireTime */ + expireTime?: (string|null); + + /** Cluster location */ + location?: (string|null); + + /** Cluster enableTpu */ + enableTpu?: (boolean|null); + + /** Cluster tpuIpv4CidrBlock */ + tpuIpv4CidrBlock?: (string|null); + + /** Cluster databaseEncryption */ + databaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); + + /** Cluster conditions */ + conditions?: (google.container.v1beta1.IStatusCondition[]|null); + + /** Cluster master */ + master?: (google.container.v1beta1.IMaster|null); + + /** Cluster autopilot */ + autopilot?: (google.container.v1beta1.IAutopilot|null); + + /** Cluster id */ + id?: (string|null); + + /** Cluster nodePoolDefaults */ + nodePoolDefaults?: (google.container.v1beta1.INodePoolDefaults|null); + + /** Cluster loggingConfig */ + loggingConfig?: (google.container.v1beta1.ILoggingConfig|null); + + /** Cluster monitoringConfig */ + monitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); + + /** Cluster nodePoolAutoConfig */ + nodePoolAutoConfig?: (google.container.v1beta1.INodePoolAutoConfig|null); + + /** Cluster protectConfig */ + protectConfig?: (google.container.v1beta1.IProtectConfig|null); + + /** Cluster etag */ + etag?: (string|null); + + /** Cluster fleet */ + fleet?: (google.container.v1beta1.IFleet|null); + + /** Cluster securityPostureConfig */ + securityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); + + /** Cluster enterpriseConfig */ + enterpriseConfig?: (google.container.v1beta1.IEnterpriseConfig|null); + + /** Cluster secretManagerConfig */ + secretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig */ + compliancePostureConfig?: (google.container.v1beta1.ICompliancePostureConfig|null); + + /** Cluster satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Cluster satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a Cluster. */ + class Cluster implements ICluster { + + /** + * Constructs a new Cluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICluster); + + /** Cluster name. */ + public name: string; + + /** Cluster description. */ + public description: string; + + /** Cluster initialNodeCount. */ + public initialNodeCount: number; + + /** Cluster nodeConfig. */ + public nodeConfig?: (google.container.v1beta1.INodeConfig|null); + + /** Cluster masterAuth. */ + public masterAuth?: (google.container.v1beta1.IMasterAuth|null); + + /** Cluster loggingService. */ + public loggingService: string; + + /** Cluster monitoringService. */ + public monitoringService: string; + + /** Cluster network. */ + public network: string; + + /** Cluster clusterIpv4Cidr. */ + public clusterIpv4Cidr: string; + + /** Cluster addonsConfig. */ + public addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** Cluster subnetwork. */ + public subnetwork: string; + + /** Cluster nodePools. */ + public nodePools: google.container.v1beta1.INodePool[]; + + /** Cluster locations. */ + public locations: string[]; + + /** Cluster enableKubernetesAlpha. */ + public enableKubernetesAlpha: boolean; + + /** Cluster enableK8sBetaApis. */ + public enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** Cluster resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** Cluster labelFingerprint. */ + public labelFingerprint: string; + + /** Cluster legacyAbac. */ + public legacyAbac?: (google.container.v1beta1.ILegacyAbac|null); + + /** Cluster networkPolicy. */ + public networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); + + /** Cluster ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.container.v1beta1.IIPAllocationPolicy|null); + + /** Cluster masterAuthorizedNetworksConfig. */ + public masterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** Cluster maintenancePolicy. */ + public maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); + + /** Cluster binaryAuthorization. */ + public binaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); + + /** Cluster podSecurityPolicyConfig. */ + public podSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); + + /** Cluster autoscaling. */ + public autoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); + + /** Cluster networkConfig. */ + public networkConfig?: (google.container.v1beta1.INetworkConfig|null); + + /** Cluster privateCluster. */ + public privateCluster: boolean; + + /** Cluster masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** Cluster defaultMaxPodsConstraint. */ + public defaultMaxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); + + /** Cluster resourceUsageExportConfig. */ + public resourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); + + /** Cluster authenticatorGroupsConfig. */ + public authenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); + + /** Cluster privateClusterConfig. */ + public privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** Cluster verticalPodAutoscaling. */ + public verticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); + + /** Cluster shieldedNodes. */ + public shieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); + + /** Cluster releaseChannel. */ + public releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** Cluster workloadIdentityConfig. */ + public workloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); + + /** Cluster workloadCertificates. */ + public workloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); + + /** Cluster meshCertificates. */ + public meshCertificates?: (google.container.v1beta1.IMeshCertificates|null); + + /** Cluster workloadAltsConfig. */ + public workloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); + + /** Cluster costManagementConfig. */ + public costManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); + + /** Cluster clusterTelemetry. */ + public clusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); + + /** Cluster tpuConfig. */ + public tpuConfig?: (google.container.v1beta1.ITpuConfig|null); + + /** Cluster notificationConfig. */ + public notificationConfig?: (google.container.v1beta1.INotificationConfig|null); + + /** Cluster confidentialNodes. */ + public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** Cluster identityServiceConfig. */ + public identityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); + + /** Cluster selfLink. */ + public selfLink: string; + + /** Cluster zone. */ + public zone: string; + + /** Cluster endpoint. */ + public endpoint: string; + + /** Cluster initialClusterVersion. */ + public initialClusterVersion: string; + + /** Cluster currentMasterVersion. */ + public currentMasterVersion: string; + + /** Cluster currentNodeVersion. */ + public currentNodeVersion: string; + + /** Cluster createTime. */ + public createTime: string; + + /** Cluster status. */ + public status: (google.container.v1beta1.Cluster.Status|keyof typeof google.container.v1beta1.Cluster.Status); + + /** Cluster statusMessage. */ + public statusMessage: string; + + /** Cluster nodeIpv4CidrSize. */ + public nodeIpv4CidrSize: number; + + /** Cluster servicesIpv4Cidr. */ + public servicesIpv4Cidr: string; + + /** Cluster instanceGroupUrls. */ + public instanceGroupUrls: string[]; + + /** Cluster currentNodeCount. */ + public currentNodeCount: number; + + /** Cluster expireTime. */ + public expireTime: string; + + /** Cluster location. */ + public location: string; + + /** Cluster enableTpu. */ + public enableTpu: boolean; + + /** Cluster tpuIpv4CidrBlock. */ + public tpuIpv4CidrBlock: string; + + /** Cluster databaseEncryption. */ + public databaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); + + /** Cluster conditions. */ + public conditions: google.container.v1beta1.IStatusCondition[]; + + /** Cluster master. */ + public master?: (google.container.v1beta1.IMaster|null); + + /** Cluster autopilot. */ + public autopilot?: (google.container.v1beta1.IAutopilot|null); + + /** Cluster id. */ + public id: string; + + /** Cluster nodePoolDefaults. */ + public nodePoolDefaults?: (google.container.v1beta1.INodePoolDefaults|null); + + /** Cluster loggingConfig. */ + public loggingConfig?: (google.container.v1beta1.ILoggingConfig|null); + + /** Cluster monitoringConfig. */ + public monitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); + + /** Cluster nodePoolAutoConfig. */ + public nodePoolAutoConfig?: (google.container.v1beta1.INodePoolAutoConfig|null); + + /** Cluster protectConfig. */ + public protectConfig?: (google.container.v1beta1.IProtectConfig|null); + + /** Cluster etag. */ + public etag: string; + + /** Cluster fleet. */ + public fleet?: (google.container.v1beta1.IFleet|null); + + /** Cluster securityPostureConfig. */ + public securityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); + + /** Cluster enterpriseConfig. */ + public enterpriseConfig?: (google.container.v1beta1.IEnterpriseConfig|null); + + /** Cluster secretManagerConfig. */ + public secretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig. */ + public compliancePostureConfig?: (google.container.v1beta1.ICompliancePostureConfig|null); + + /** Cluster satisfiesPzs. */ + public satisfiesPzs?: (boolean|null); + + /** Cluster satisfiesPzi. */ + public satisfiesPzi?: (boolean|null); + + /** Cluster _nodePoolDefaults. */ + public _nodePoolDefaults?: "nodePoolDefaults"; + + /** Cluster _protectConfig. */ + public _protectConfig?: "protectConfig"; + + /** Cluster _satisfiesPzs. */ + public _satisfiesPzs?: "satisfiesPzs"; + + /** Cluster _satisfiesPzi. */ + public _satisfiesPzi?: "satisfiesPzi"; + + /** + * Creates a new Cluster instance using the specified properties. + * @param [properties] Properties to set + * @returns Cluster instance + */ + public static create(properties?: google.container.v1beta1.ICluster): google.container.v1beta1.Cluster; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. + * @param message Cluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Cluster; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Cluster; + + /** + * Verifies a Cluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cluster + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Cluster; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @param message Cluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Cluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Cluster { + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RECONCILING = 3, + STOPPING = 4, + ERROR = 5, + DEGRADED = 6 + } + } + + /** Properties of a CompliancePostureConfig. */ + interface ICompliancePostureConfig { + + /** CompliancePostureConfig mode */ + mode?: (google.container.v1beta1.CompliancePostureConfig.Mode|keyof typeof google.container.v1beta1.CompliancePostureConfig.Mode|null); + + /** CompliancePostureConfig complianceStandards */ + complianceStandards?: (google.container.v1beta1.CompliancePostureConfig.IComplianceStandard[]|null); + } + + /** Represents a CompliancePostureConfig. */ + class CompliancePostureConfig implements ICompliancePostureConfig { + + /** + * Constructs a new CompliancePostureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICompliancePostureConfig); + + /** CompliancePostureConfig mode. */ + public mode?: (google.container.v1beta1.CompliancePostureConfig.Mode|keyof typeof google.container.v1beta1.CompliancePostureConfig.Mode|null); + + /** CompliancePostureConfig complianceStandards. */ + public complianceStandards: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard[]; + + /** CompliancePostureConfig _mode. */ + public _mode?: "mode"; + + /** + * Creates a new CompliancePostureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CompliancePostureConfig instance + */ + public static create(properties?: google.container.v1beta1.ICompliancePostureConfig): google.container.v1beta1.CompliancePostureConfig; + + /** + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompliancePostureConfig; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompliancePostureConfig; + + /** + * Verifies a CompliancePostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompliancePostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompliancePostureConfig; + + /** + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @param message CompliancePostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompliancePostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompliancePostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompliancePostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + + /** Properties of a ComplianceStandard. */ + interface IComplianceStandard { + + /** ComplianceStandard standard */ + standard?: (string|null); + } + + /** Represents a ComplianceStandard. */ + class ComplianceStandard implements IComplianceStandard { + + /** + * Constructs a new ComplianceStandard. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard); + + /** ComplianceStandard standard. */ + public standard?: (string|null); + + /** ComplianceStandard _standard. */ + public _standard?: "standard"; + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceStandard instance + */ + public static create(properties?: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; + + /** + * Verifies a ComplianceStandard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceStandard + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @param message ComplianceStandard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComplianceStandard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComplianceStandard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a K8sBetaAPIConfig. */ + interface IK8sBetaAPIConfig { + + /** K8sBetaAPIConfig enabledApis */ + enabledApis?: (string[]|null); + } + + /** Represents a K8sBetaAPIConfig. */ + class K8sBetaAPIConfig implements IK8sBetaAPIConfig { + + /** + * Constructs a new K8sBetaAPIConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IK8sBetaAPIConfig); + + /** K8sBetaAPIConfig enabledApis. */ + public enabledApis: string[]; + + /** + * Creates a new K8sBetaAPIConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns K8sBetaAPIConfig instance + */ + public static create(properties?: google.container.v1beta1.IK8sBetaAPIConfig): google.container.v1beta1.K8sBetaAPIConfig; + + /** + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.K8sBetaAPIConfig; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.K8sBetaAPIConfig; + + /** + * Verifies a K8sBetaAPIConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns K8sBetaAPIConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.K8sBetaAPIConfig; + + /** + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * @param message K8sBetaAPIConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this K8sBetaAPIConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for K8sBetaAPIConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadConfig. */ + interface IWorkloadConfig { + + /** WorkloadConfig auditMode */ + auditMode?: (google.container.v1beta1.WorkloadConfig.Mode|keyof typeof google.container.v1beta1.WorkloadConfig.Mode|null); + } + + /** Represents a WorkloadConfig. */ + class WorkloadConfig implements IWorkloadConfig { + + /** + * Constructs a new WorkloadConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadConfig); + + /** WorkloadConfig auditMode. */ + public auditMode?: (google.container.v1beta1.WorkloadConfig.Mode|keyof typeof google.container.v1beta1.WorkloadConfig.Mode|null); + + /** WorkloadConfig _auditMode. */ + public _auditMode?: "auditMode"; + + /** + * Creates a new WorkloadConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadConfig instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadConfig): google.container.v1beta1.WorkloadConfig; + + /** + * Encodes the specified WorkloadConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. + * @param message WorkloadConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWorkloadConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. + * @param message WorkloadConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWorkloadConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadConfig; + + /** + * Decodes a WorkloadConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadConfig; + + /** + * Verifies a WorkloadConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadConfig; + + /** + * Creates a plain object from a WorkloadConfig message. Also converts values to other types if specified. + * @param message WorkloadConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WorkloadConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkloadConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 4, + BASELINE = 2, + RESTRICTED = 3 + } + } + + /** Properties of a ProtectConfig. */ + interface IProtectConfig { + + /** ProtectConfig workloadConfig */ + workloadConfig?: (google.container.v1beta1.IWorkloadConfig|null); + + /** ProtectConfig workloadVulnerabilityMode */ + workloadVulnerabilityMode?: (google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|keyof typeof google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null); + } + + /** Represents a ProtectConfig. */ + class ProtectConfig implements IProtectConfig { + + /** + * Constructs a new ProtectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IProtectConfig); + + /** ProtectConfig workloadConfig. */ + public workloadConfig?: (google.container.v1beta1.IWorkloadConfig|null); + + /** ProtectConfig workloadVulnerabilityMode. */ + public workloadVulnerabilityMode?: (google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|keyof typeof google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null); + + /** ProtectConfig _workloadConfig. */ + public _workloadConfig?: "workloadConfig"; + + /** ProtectConfig _workloadVulnerabilityMode. */ + public _workloadVulnerabilityMode?: "workloadVulnerabilityMode"; + + /** + * Creates a new ProtectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtectConfig instance + */ + public static create(properties?: google.container.v1beta1.IProtectConfig): google.container.v1beta1.ProtectConfig; + + /** + * Encodes the specified ProtectConfig message. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. + * @param message ProtectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IProtectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtectConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. + * @param message ProtectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IProtectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ProtectConfig; + + /** + * Decodes a ProtectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ProtectConfig; + + /** + * Verifies a ProtectConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtectConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ProtectConfig; + + /** + * Creates a plain object from a ProtectConfig message. Also converts values to other types if specified. + * @param message ProtectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ProtectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProtectConfig { + + /** WorkloadVulnerabilityMode enum. */ + enum WorkloadVulnerabilityMode { + WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 2 + } + } + + /** Properties of a SecurityPostureConfig. */ + interface ISecurityPostureConfig { + + /** SecurityPostureConfig mode */ + mode?: (google.container.v1beta1.SecurityPostureConfig.Mode|keyof typeof google.container.v1beta1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode */ + vulnerabilityMode?: (google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null); + } + + /** Represents a SecurityPostureConfig. */ + class SecurityPostureConfig implements ISecurityPostureConfig { + + /** + * Constructs a new SecurityPostureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISecurityPostureConfig); + + /** SecurityPostureConfig mode. */ + public mode?: (google.container.v1beta1.SecurityPostureConfig.Mode|keyof typeof google.container.v1beta1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode. */ + public vulnerabilityMode?: (google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null); + + /** SecurityPostureConfig _mode. */ + public _mode?: "mode"; + + /** SecurityPostureConfig _vulnerabilityMode. */ + public _vulnerabilityMode?: "vulnerabilityMode"; + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityPostureConfig instance + */ + public static create(properties?: google.container.v1beta1.ISecurityPostureConfig): google.container.v1beta1.SecurityPostureConfig; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecurityPostureConfig; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecurityPostureConfig; + + /** + * Verifies a SecurityPostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityPostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecurityPostureConfig; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @param message SecurityPostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityPostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityPostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 2, + ENTERPRISE = 3 + } + + /** VulnerabilityMode enum. */ + enum VulnerabilityMode { + VULNERABILITY_MODE_UNSPECIFIED = 0, + VULNERABILITY_DISABLED = 1, + VULNERABILITY_BASIC = 2, + VULNERABILITY_ENTERPRISE = 3 + } + } + + /** Properties of a NodePoolDefaults. */ + interface INodePoolDefaults { + + /** NodePoolDefaults nodeConfigDefaults */ + nodeConfigDefaults?: (google.container.v1beta1.INodeConfigDefaults|null); + } + + /** Represents a NodePoolDefaults. */ + class NodePoolDefaults implements INodePoolDefaults { + + /** + * Constructs a new NodePoolDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodePoolDefaults); + + /** NodePoolDefaults nodeConfigDefaults. */ + public nodeConfigDefaults?: (google.container.v1beta1.INodeConfigDefaults|null); + + /** + * Creates a new NodePoolDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolDefaults instance + */ + public static create(properties?: google.container.v1beta1.INodePoolDefaults): google.container.v1beta1.NodePoolDefaults; + + /** + * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. + * @param message NodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. + * @param message NodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolDefaults; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolDefaults; + + /** + * Verifies a NodePoolDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolDefaults; + + /** + * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * @param message NodePoolDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfigDefaults. */ + interface INodeConfigDefaults { + + /** NodeConfigDefaults gcfsConfig */ + gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** NodeConfigDefaults loggingConfig */ + loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** NodeConfigDefaults containerdConfig */ + containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** NodeConfigDefaults hostMaintenancePolicy */ + hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** NodeConfigDefaults nodeKubeletConfig */ + nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + } + + /** Represents a NodeConfigDefaults. */ + class NodeConfigDefaults implements INodeConfigDefaults { + + /** + * Constructs a new NodeConfigDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeConfigDefaults); + + /** NodeConfigDefaults gcfsConfig. */ + public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** NodeConfigDefaults loggingConfig. */ + public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** NodeConfigDefaults containerdConfig. */ + public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** NodeConfigDefaults hostMaintenancePolicy. */ + public hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** NodeConfigDefaults nodeKubeletConfig. */ + public nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** + * Creates a new NodeConfigDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfigDefaults instance + */ + public static create(properties?: google.container.v1beta1.INodeConfigDefaults): google.container.v1beta1.NodeConfigDefaults; + + /** + * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. + * @param message NodeConfigDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. + * @param message NodeConfigDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeConfigDefaults; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeConfigDefaults; + + /** + * Verifies a NodeConfigDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfigDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeConfigDefaults; + + /** + * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. + * @param message NodeConfigDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeConfigDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfigDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfigDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolAutoConfig. */ + interface INodePoolAutoConfig { + + /** NodePoolAutoConfig networkTags */ + networkTags?: (google.container.v1beta1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags */ + resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig */ + nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + } + + /** Represents a NodePoolAutoConfig. */ + class NodePoolAutoConfig implements INodePoolAutoConfig { + + /** + * Constructs a new NodePoolAutoConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodePoolAutoConfig); + + /** NodePoolAutoConfig networkTags. */ + public networkTags?: (google.container.v1beta1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig. */ + public nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolAutoConfig instance + */ + public static create(properties?: google.container.v1beta1.INodePoolAutoConfig): google.container.v1beta1.NodePoolAutoConfig; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolAutoConfig; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolAutoConfig; + + /** + * Verifies a NodePoolAutoConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolAutoConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolAutoConfig; + + /** + * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * @param message NodePoolAutoConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePoolAutoConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolAutoConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolAutoConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterUpdate. */ + interface IClusterUpdate { + + /** ClusterUpdate desiredNodeVersion */ + desiredNodeVersion?: (string|null); + + /** ClusterUpdate desiredMonitoringService */ + desiredMonitoringService?: (string|null); + + /** ClusterUpdate desiredAddonsConfig */ + desiredAddonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** ClusterUpdate desiredNodePoolId */ + desiredNodePoolId?: (string|null); + + /** ClusterUpdate desiredImageType */ + desiredImageType?: (string|null); + + /** ClusterUpdate desiredNodePoolAutoscaling */ + desiredNodePoolAutoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** ClusterUpdate desiredLocations */ + desiredLocations?: (string[]|null); + + /** ClusterUpdate desiredMasterAuthorizedNetworksConfig */ + desiredMasterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** ClusterUpdate desiredPodSecurityPolicyConfig */ + desiredPodSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); + + /** ClusterUpdate desiredClusterAutoscaling */ + desiredClusterAutoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); + + /** ClusterUpdate desiredBinaryAuthorization */ + desiredBinaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); + + /** ClusterUpdate desiredLoggingService */ + desiredLoggingService?: (string|null); + + /** ClusterUpdate desiredResourceUsageExportConfig */ + desiredResourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); + + /** ClusterUpdate desiredVerticalPodAutoscaling */ + desiredVerticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); + + /** ClusterUpdate desiredPrivateClusterConfig */ + desiredPrivateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredIntraNodeVisibilityConfig */ + desiredIntraNodeVisibilityConfig?: (google.container.v1beta1.IIntraNodeVisibilityConfig|null); + + /** ClusterUpdate desiredDefaultSnatStatus */ + desiredDefaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); + + /** ClusterUpdate desiredClusterTelemetry */ + desiredClusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); + + /** ClusterUpdate desiredReleaseChannel */ + desiredReleaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** ClusterUpdate privateClusterConfig */ + privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredTpuConfig */ + desiredTpuConfig?: (google.container.v1beta1.ITpuConfig|null); + + /** ClusterUpdate desiredL4ilbSubsettingConfig */ + desiredL4ilbSubsettingConfig?: (google.container.v1beta1.IILBSubsettingConfig|null); + + /** ClusterUpdate desiredDatapathProvider */ + desiredDatapathProvider?: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider|null); + + /** ClusterUpdate desiredPrivateIpv6GoogleAccess */ + desiredPrivateIpv6GoogleAccess?: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess|null); + + /** ClusterUpdate desiredNotificationConfig */ + desiredNotificationConfig?: (google.container.v1beta1.INotificationConfig|null); + + /** ClusterUpdate desiredMasterVersion */ + desiredMasterVersion?: (string|null); + + /** ClusterUpdate desiredGcfsConfig */ + desiredGcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** ClusterUpdate desiredDatabaseEncryption */ + desiredDatabaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); + + /** ClusterUpdate desiredWorkloadIdentityConfig */ + desiredWorkloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); + + /** ClusterUpdate desiredWorkloadCertificates */ + desiredWorkloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); + + /** ClusterUpdate desiredMeshCertificates */ + desiredMeshCertificates?: (google.container.v1beta1.IMeshCertificates|null); + + /** ClusterUpdate desiredWorkloadAltsConfig */ + desiredWorkloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); + + /** ClusterUpdate desiredShieldedNodes */ + desiredShieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); + + /** ClusterUpdate desiredCostManagementConfig */ + desiredCostManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); + + /** ClusterUpdate desiredMaster */ + desiredMaster?: (google.container.v1beta1.IMaster|null); + + /** ClusterUpdate desiredDnsConfig */ + desiredDnsConfig?: (google.container.v1beta1.IDNSConfig|null); + + /** ClusterUpdate desiredServiceExternalIpsConfig */ + desiredServiceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); + + /** ClusterUpdate desiredAuthenticatorGroupsConfig */ + desiredAuthenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); + + /** ClusterUpdate desiredLoggingConfig */ + desiredLoggingConfig?: (google.container.v1beta1.ILoggingConfig|null); + + /** ClusterUpdate desiredMonitoringConfig */ + desiredMonitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); + + /** ClusterUpdate desiredIdentityServiceConfig */ + desiredIdentityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); + + /** ClusterUpdate desiredEnablePrivateEndpoint */ + desiredEnablePrivateEndpoint?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags */ + desiredNodePoolAutoConfigNetworkTags?: (google.container.v1beta1.INetworkTags|null); + + /** ClusterUpdate desiredProtectConfig */ + desiredProtectConfig?: (google.container.v1beta1.IProtectConfig|null); + + /** ClusterUpdate desiredGatewayApiConfig */ + desiredGatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); + + /** ClusterUpdate etag */ + etag?: (string|null); + + /** ClusterUpdate desiredNodePoolLoggingConfig */ + desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** ClusterUpdate desiredFleet */ + desiredFleet?: (google.container.v1beta1.IFleet|null); + + /** ClusterUpdate desiredStackType */ + desiredStackType?: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType|null); + + /** ClusterUpdate additionalPodRangesConfig */ + additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate removedAdditionalPodRangesConfig */ + removedAdditionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate enableK8sBetaApis */ + enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredSecurityPostureConfig */ + desiredSecurityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); + + /** ClusterUpdate desiredNetworkPerformanceConfig */ + desiredNetworkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** ClusterUpdate desiredEnableFqdnNetworkPolicy */ + desiredEnableFqdnNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig */ + desiredAutopilotWorkloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); + + /** ClusterUpdate desiredK8sBetaApis */ + desiredK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredHostMaintenancePolicy */ + desiredHostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** ClusterUpdate desiredContainerdConfig */ + desiredContainerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** ClusterUpdate desiredEnableMultiNetworking */ + desiredEnableMultiNetworking?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags */ + desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** ClusterUpdate desiredInTransitEncryptionConfig */ + desiredInTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); + + /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy */ + desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredSecretManagerConfig */ + desiredSecretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredNodeKubeletConfig */ + desiredNodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig */ + desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + } + + /** Represents a ClusterUpdate. */ + class ClusterUpdate implements IClusterUpdate { + + /** + * Constructs a new ClusterUpdate. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IClusterUpdate); + + /** ClusterUpdate desiredNodeVersion. */ + public desiredNodeVersion: string; + + /** ClusterUpdate desiredMonitoringService. */ + public desiredMonitoringService: string; + + /** ClusterUpdate desiredAddonsConfig. */ + public desiredAddonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** ClusterUpdate desiredNodePoolId. */ + public desiredNodePoolId: string; + + /** ClusterUpdate desiredImageType. */ + public desiredImageType: string; + + /** ClusterUpdate desiredNodePoolAutoscaling. */ + public desiredNodePoolAutoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** ClusterUpdate desiredLocations. */ + public desiredLocations: string[]; + + /** ClusterUpdate desiredMasterAuthorizedNetworksConfig. */ + public desiredMasterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** ClusterUpdate desiredPodSecurityPolicyConfig. */ + public desiredPodSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); + + /** ClusterUpdate desiredClusterAutoscaling. */ + public desiredClusterAutoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); + + /** ClusterUpdate desiredBinaryAuthorization. */ + public desiredBinaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); + + /** ClusterUpdate desiredLoggingService. */ + public desiredLoggingService: string; + + /** ClusterUpdate desiredResourceUsageExportConfig. */ + public desiredResourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); + + /** ClusterUpdate desiredVerticalPodAutoscaling. */ + public desiredVerticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); + + /** ClusterUpdate desiredPrivateClusterConfig. */ + public desiredPrivateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredIntraNodeVisibilityConfig. */ + public desiredIntraNodeVisibilityConfig?: (google.container.v1beta1.IIntraNodeVisibilityConfig|null); + + /** ClusterUpdate desiredDefaultSnatStatus. */ + public desiredDefaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); + + /** ClusterUpdate desiredClusterTelemetry. */ + public desiredClusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); + + /** ClusterUpdate desiredReleaseChannel. */ + public desiredReleaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** ClusterUpdate privateClusterConfig. */ + public privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); + + /** ClusterUpdate desiredTpuConfig. */ + public desiredTpuConfig?: (google.container.v1beta1.ITpuConfig|null); + + /** ClusterUpdate desiredL4ilbSubsettingConfig. */ + public desiredL4ilbSubsettingConfig?: (google.container.v1beta1.IILBSubsettingConfig|null); + + /** ClusterUpdate desiredDatapathProvider. */ + public desiredDatapathProvider: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider); + + /** ClusterUpdate desiredPrivateIpv6GoogleAccess. */ + public desiredPrivateIpv6GoogleAccess: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess); + + /** ClusterUpdate desiredNotificationConfig. */ + public desiredNotificationConfig?: (google.container.v1beta1.INotificationConfig|null); + + /** ClusterUpdate desiredMasterVersion. */ + public desiredMasterVersion: string; + + /** ClusterUpdate desiredGcfsConfig. */ + public desiredGcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** ClusterUpdate desiredDatabaseEncryption. */ + public desiredDatabaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); + + /** ClusterUpdate desiredWorkloadIdentityConfig. */ + public desiredWorkloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); + + /** ClusterUpdate desiredWorkloadCertificates. */ + public desiredWorkloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); + + /** ClusterUpdate desiredMeshCertificates. */ + public desiredMeshCertificates?: (google.container.v1beta1.IMeshCertificates|null); + + /** ClusterUpdate desiredWorkloadAltsConfig. */ + public desiredWorkloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); + + /** ClusterUpdate desiredShieldedNodes. */ + public desiredShieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); + + /** ClusterUpdate desiredCostManagementConfig. */ + public desiredCostManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); + + /** ClusterUpdate desiredMaster. */ + public desiredMaster?: (google.container.v1beta1.IMaster|null); + + /** ClusterUpdate desiredDnsConfig. */ + public desiredDnsConfig?: (google.container.v1beta1.IDNSConfig|null); + + /** ClusterUpdate desiredServiceExternalIpsConfig. */ + public desiredServiceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); + + /** ClusterUpdate desiredAuthenticatorGroupsConfig. */ + public desiredAuthenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); + + /** ClusterUpdate desiredLoggingConfig. */ + public desiredLoggingConfig?: (google.container.v1beta1.ILoggingConfig|null); + + /** ClusterUpdate desiredMonitoringConfig. */ + public desiredMonitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); + + /** ClusterUpdate desiredIdentityServiceConfig. */ + public desiredIdentityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); + + /** ClusterUpdate desiredEnablePrivateEndpoint. */ + public desiredEnablePrivateEndpoint?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags. */ + public desiredNodePoolAutoConfigNetworkTags?: (google.container.v1beta1.INetworkTags|null); + + /** ClusterUpdate desiredProtectConfig. */ + public desiredProtectConfig?: (google.container.v1beta1.IProtectConfig|null); + + /** ClusterUpdate desiredGatewayApiConfig. */ + public desiredGatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); + + /** ClusterUpdate etag. */ + public etag: string; + + /** ClusterUpdate desiredNodePoolLoggingConfig. */ + public desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** ClusterUpdate desiredFleet. */ + public desiredFleet?: (google.container.v1beta1.IFleet|null); + + /** ClusterUpdate desiredStackType. */ + public desiredStackType: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType); + + /** ClusterUpdate additionalPodRangesConfig. */ + public additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate removedAdditionalPodRangesConfig. */ + public removedAdditionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); + + /** ClusterUpdate enableK8sBetaApis. */ + public enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredSecurityPostureConfig. */ + public desiredSecurityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); + + /** ClusterUpdate desiredNetworkPerformanceConfig. */ + public desiredNetworkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** ClusterUpdate desiredEnableFqdnNetworkPolicy. */ + public desiredEnableFqdnNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig. */ + public desiredAutopilotWorkloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); + + /** ClusterUpdate desiredK8sBetaApis. */ + public desiredK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); + + /** ClusterUpdate desiredHostMaintenancePolicy. */ + public desiredHostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); + + /** ClusterUpdate desiredContainerdConfig. */ + public desiredContainerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** ClusterUpdate desiredEnableMultiNetworking. */ + public desiredEnableMultiNetworking?: (boolean|null); + + /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. */ + public desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** ClusterUpdate desiredInTransitEncryptionConfig. */ + public desiredInTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); + + /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. */ + public desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** ClusterUpdate desiredSecretManagerConfig. */ + public desiredSecretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredNodeKubeletConfig. */ + public desiredNodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. */ + public desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** ClusterUpdate _desiredEnablePrivateEndpoint. */ + public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; + + /** ClusterUpdate _desiredProtectConfig. */ + public _desiredProtectConfig?: "desiredProtectConfig"; + + /** ClusterUpdate _desiredEnableFqdnNetworkPolicy. */ + public _desiredEnableFqdnNetworkPolicy?: "desiredEnableFqdnNetworkPolicy"; + + /** ClusterUpdate _desiredEnableMultiNetworking. */ + public _desiredEnableMultiNetworking?: "desiredEnableMultiNetworking"; + + /** ClusterUpdate _desiredInTransitEncryptionConfig. */ + public _desiredInTransitEncryptionConfig?: "desiredInTransitEncryptionConfig"; + + /** ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. */ + public _desiredEnableCiliumClusterwideNetworkPolicy?: "desiredEnableCiliumClusterwideNetworkPolicy"; + + /** ClusterUpdate _desiredSecretManagerConfig. */ + public _desiredSecretManagerConfig?: "desiredSecretManagerConfig"; + + /** + * Creates a new ClusterUpdate instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterUpdate instance + */ + public static create(properties?: google.container.v1beta1.IClusterUpdate): google.container.v1beta1.ClusterUpdate; + + /** + * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. + * @param message ClusterUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. + * @param message ClusterUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterUpdate; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterUpdate; + + /** + * Verifies a ClusterUpdate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterUpdate + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterUpdate; + + /** + * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. + * @param message ClusterUpdate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ClusterUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterUpdate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterUpdate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdditionalPodRangesConfig. */ + interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); + + /** AdditionalPodRangesConfig podRangeInfo */ + podRangeInfo?: (google.container.v1beta1.IRangeInfo[]|null); + } + + /** Represents an AdditionalPodRangesConfig. */ + class AdditionalPodRangesConfig implements IAdditionalPodRangesConfig { + + /** + * Constructs a new AdditionalPodRangesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAdditionalPodRangesConfig); + + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + + /** AdditionalPodRangesConfig podRangeInfo. */ + public podRangeInfo: google.container.v1beta1.IRangeInfo[]; + + /** + * Creates a new AdditionalPodRangesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalPodRangesConfig instance + */ + public static create(properties?: google.container.v1beta1.IAdditionalPodRangesConfig): google.container.v1beta1.AdditionalPodRangesConfig; + + /** + * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. + * @param message AdditionalPodRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. + * @param message AdditionalPodRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalPodRangesConfig; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalPodRangesConfig; + + /** + * Verifies an AdditionalPodRangesConfig message. + * @param message Plain 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 AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalPodRangesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalPodRangesConfig; + + /** + * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. + * @param message AdditionalPodRangesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AdditionalPodRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalPodRangesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalPodRangesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RangeInfo. */ + interface IRangeInfo { + + /** RangeInfo rangeName */ + rangeName?: (string|null); + + /** RangeInfo utilization */ + utilization?: (number|null); + } + + /** Represents a RangeInfo. */ + class RangeInfo implements IRangeInfo { + + /** + * Constructs a new RangeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRangeInfo); + + /** RangeInfo rangeName. */ + public rangeName: string; + + /** RangeInfo utilization. */ + public utilization: number; + + /** + * Creates a new RangeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RangeInfo instance + */ + public static create(properties?: google.container.v1beta1.IRangeInfo): google.container.v1beta1.RangeInfo; + + /** + * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. + * @param message RangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. + * @param message RangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RangeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RangeInfo; + + /** + * Decodes a RangeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RangeInfo; + + /** + * Verifies a RangeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RangeInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RangeInfo; + + /** + * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. + * @param message RangeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RangeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RangeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RangeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation zone */ + zone?: (string|null); + + /** Operation operationType */ + operationType?: (google.container.v1beta1.Operation.Type|keyof typeof google.container.v1beta1.Operation.Type|null); + + /** Operation status */ + status?: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status|null); + + /** Operation detail */ + detail?: (string|null); + + /** Operation statusMessage */ + statusMessage?: (string|null); + + /** Operation selfLink */ + selfLink?: (string|null); + + /** Operation targetLink */ + targetLink?: (string|null); + + /** Operation location */ + location?: (string|null); + + /** Operation startTime */ + startTime?: (string|null); + + /** Operation endTime */ + endTime?: (string|null); + + /** Operation progress */ + progress?: (google.container.v1beta1.IOperationProgress|null); + + /** Operation clusterConditions */ + clusterConditions?: (google.container.v1beta1.IStatusCondition[]|null); + + /** Operation nodepoolConditions */ + nodepoolConditions?: (google.container.v1beta1.IStatusCondition[]|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation zone. */ + public zone: string; + + /** Operation operationType. */ + public operationType: (google.container.v1beta1.Operation.Type|keyof typeof google.container.v1beta1.Operation.Type); + + /** Operation status. */ + public status: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status); + + /** Operation detail. */ + public detail: string; + + /** Operation statusMessage. */ + public statusMessage: string; + + /** Operation selfLink. */ + public selfLink: string; + + /** Operation targetLink. */ + public targetLink: string; + + /** Operation location. */ + public location: string; + + /** Operation startTime. */ + public startTime: string; + + /** Operation endTime. */ + public endTime: string; + + /** Operation progress. */ + public progress?: (google.container.v1beta1.IOperationProgress|null); + + /** Operation clusterConditions. */ + public clusterConditions: google.container.v1beta1.IStatusCondition[]; + + /** Operation nodepoolConditions. */ + public nodepoolConditions: google.container.v1beta1.IStatusCondition[]; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.container.v1beta1.IOperation): google.container.v1beta1.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Operation { + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + DONE = 3, + ABORTING = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE_CLUSTER = 1, + DELETE_CLUSTER = 2, + UPGRADE_MASTER = 3, + UPGRADE_NODES = 4, + REPAIR_CLUSTER = 5, + UPDATE_CLUSTER = 6, + CREATE_NODE_POOL = 7, + DELETE_NODE_POOL = 8, + SET_NODE_POOL_MANAGEMENT = 9, + AUTO_REPAIR_NODES = 10, + AUTO_UPGRADE_NODES = 11, + SET_LABELS = 12, + SET_MASTER_AUTH = 13, + SET_NODE_POOL_SIZE = 14, + SET_NETWORK_POLICY = 15, + SET_MAINTENANCE_POLICY = 16, + RESIZE_CLUSTER = 18, + FLEET_FEATURE_UPGRADE = 19 + } + } + + /** Properties of an OperationProgress. */ + interface IOperationProgress { + + /** OperationProgress name */ + name?: (string|null); + + /** OperationProgress status */ + status?: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status|null); + + /** OperationProgress metrics */ + metrics?: (google.container.v1beta1.OperationProgress.IMetric[]|null); + + /** OperationProgress stages */ + stages?: (google.container.v1beta1.IOperationProgress[]|null); + } + + /** Represents an OperationProgress. */ + class OperationProgress implements IOperationProgress { + + /** + * Constructs a new OperationProgress. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IOperationProgress); + + /** OperationProgress name. */ + public name: string; + + /** OperationProgress status. */ + public status: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status); + + /** OperationProgress metrics. */ + public metrics: google.container.v1beta1.OperationProgress.IMetric[]; + + /** OperationProgress stages. */ + public stages: google.container.v1beta1.IOperationProgress[]; + + /** + * Creates a new OperationProgress instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationProgress instance + */ + public static create(properties?: google.container.v1beta1.IOperationProgress): google.container.v1beta1.OperationProgress; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. + * @param message OperationProgress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.OperationProgress; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.OperationProgress; + + /** + * Verifies an OperationProgress message. + * @param message Plain 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 OperationProgress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationProgress + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.OperationProgress; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @param message OperationProgress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.OperationProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationProgress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationProgress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OperationProgress { + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric intValue */ + intValue?: (number|Long|string|null); + + /** Metric doubleValue */ + doubleValue?: (number|null); + + /** Metric stringValue */ + stringValue?: (string|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.OperationProgress.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric intValue. */ + public intValue?: (number|Long|string|null); + + /** Metric doubleValue. */ + public doubleValue?: (number|null); + + /** Metric stringValue. */ + public stringValue?: (string|null); + + /** Metric value. */ + public value?: ("intValue"|"doubleValue"|"stringValue"); + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.container.v1beta1.OperationProgress.IMetric): google.container.v1beta1.OperationProgress.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.OperationProgress.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.OperationProgress.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.OperationProgress.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.OperationProgress.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateClusterRequest. */ + interface ICreateClusterRequest { + + /** CreateClusterRequest projectId */ + projectId?: (string|null); + + /** CreateClusterRequest zone */ + zone?: (string|null); + + /** CreateClusterRequest cluster */ + cluster?: (google.container.v1beta1.ICluster|null); + + /** CreateClusterRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateClusterRequest. */ + class CreateClusterRequest implements ICreateClusterRequest { + + /** + * Constructs a new CreateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICreateClusterRequest); + + /** CreateClusterRequest projectId. */ + public projectId: string; + + /** CreateClusterRequest zone. */ + public zone: string; + + /** CreateClusterRequest cluster. */ + public cluster?: (google.container.v1beta1.ICluster|null); + + /** CreateClusterRequest parent. */ + public parent: string; + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateClusterRequest instance + */ + public static create(properties?: google.container.v1beta1.ICreateClusterRequest): google.container.v1beta1.CreateClusterRequest; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. + * @param message CreateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CreateClusterRequest; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CreateClusterRequest; + + /** + * Verifies a CreateClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CreateClusterRequest; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @param message CreateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CreateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetClusterRequest. */ + interface IGetClusterRequest { + + /** GetClusterRequest projectId */ + projectId?: (string|null); + + /** GetClusterRequest zone */ + zone?: (string|null); + + /** GetClusterRequest clusterId */ + clusterId?: (string|null); + + /** GetClusterRequest name */ + name?: (string|null); + } + + /** Represents a GetClusterRequest. */ + class GetClusterRequest implements IGetClusterRequest { + + /** + * Constructs a new GetClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetClusterRequest); + + /** GetClusterRequest projectId. */ + public projectId: string; + + /** GetClusterRequest zone. */ + public zone: string; + + /** GetClusterRequest clusterId. */ + public clusterId: string; + + /** GetClusterRequest name. */ + public name: string; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClusterRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetClusterRequest): google.container.v1beta1.GetClusterRequest; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. + * @param message GetClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetClusterRequest; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetClusterRequest; + + /** + * Verifies a GetClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetClusterRequest; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @param message GetClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateClusterRequest. */ + interface IUpdateClusterRequest { + + /** UpdateClusterRequest projectId */ + projectId?: (string|null); + + /** UpdateClusterRequest zone */ + zone?: (string|null); + + /** UpdateClusterRequest clusterId */ + clusterId?: (string|null); + + /** UpdateClusterRequest update */ + update?: (google.container.v1beta1.IClusterUpdate|null); + + /** UpdateClusterRequest name */ + name?: (string|null); + } + + /** Represents an UpdateClusterRequest. */ + class UpdateClusterRequest implements IUpdateClusterRequest { + + /** + * Constructs a new UpdateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUpdateClusterRequest); + + /** UpdateClusterRequest projectId. */ + public projectId: string; + + /** UpdateClusterRequest zone. */ + public zone: string; + + /** UpdateClusterRequest clusterId. */ + public clusterId: string; + + /** UpdateClusterRequest update. */ + public update?: (google.container.v1beta1.IClusterUpdate|null); + + /** UpdateClusterRequest name. */ + public name: string; + + /** + * Creates a new UpdateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateClusterRequest instance + */ + public static create(properties?: google.container.v1beta1.IUpdateClusterRequest): google.container.v1beta1.UpdateClusterRequest; + + /** + * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. + * @param message UpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. + * @param message UpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateClusterRequest; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateClusterRequest; + + /** + * Verifies an UpdateClusterRequest message. + * @param message Plain 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 UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateClusterRequest; + + /** + * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. + * @param message UpdateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateNodePoolRequest. */ + interface IUpdateNodePoolRequest { + + /** UpdateNodePoolRequest projectId */ + projectId?: (string|null); + + /** UpdateNodePoolRequest zone */ + zone?: (string|null); + + /** UpdateNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** UpdateNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** UpdateNodePoolRequest nodeVersion */ + nodeVersion?: (string|null); + + /** UpdateNodePoolRequest imageType */ + imageType?: (string|null); + + /** UpdateNodePoolRequest locations */ + locations?: (string[]|null); + + /** UpdateNodePoolRequest workloadMetadataConfig */ + workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); + + /** UpdateNodePoolRequest name */ + name?: (string|null); + + /** UpdateNodePoolRequest upgradeSettings */ + upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** UpdateNodePoolRequest tags */ + tags?: (google.container.v1beta1.INetworkTags|null); + + /** UpdateNodePoolRequest taints */ + taints?: (google.container.v1beta1.INodeTaints|null); + + /** UpdateNodePoolRequest labels */ + labels?: (google.container.v1beta1.INodeLabels|null); + + /** UpdateNodePoolRequest linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); + + /** UpdateNodePoolRequest kubeletConfig */ + kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** UpdateNodePoolRequest nodeNetworkConfig */ + nodeNetworkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); + + /** UpdateNodePoolRequest gcfsConfig */ + gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** UpdateNodePoolRequest confidentialNodes */ + confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** UpdateNodePoolRequest gvnic */ + gvnic?: (google.container.v1beta1.IVirtualNIC|null); + + /** UpdateNodePoolRequest etag */ + etag?: (string|null); + + /** UpdateNodePoolRequest fastSocket */ + fastSocket?: (google.container.v1beta1.IFastSocket|null); + + /** UpdateNodePoolRequest loggingConfig */ + loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** UpdateNodePoolRequest resourceLabels */ + resourceLabels?: (google.container.v1beta1.IResourceLabels|null); + + /** UpdateNodePoolRequest windowsNodeConfig */ + windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); + + /** UpdateNodePoolRequest accelerators */ + accelerators?: (google.container.v1beta1.IAcceleratorConfig[]|null); + + /** UpdateNodePoolRequest machineType */ + machineType?: (string|null); + + /** UpdateNodePoolRequest diskType */ + diskType?: (string|null); + + /** UpdateNodePoolRequest diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** UpdateNodePoolRequest resourceManagerTags */ + resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** UpdateNodePoolRequest containerdConfig */ + containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** UpdateNodePoolRequest queuedProvisioning */ + queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); + } + + /** Represents an UpdateNodePoolRequest. */ + class UpdateNodePoolRequest implements IUpdateNodePoolRequest { + + /** + * Constructs a new UpdateNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUpdateNodePoolRequest); + + /** UpdateNodePoolRequest projectId. */ + public projectId: string; + + /** UpdateNodePoolRequest zone. */ + public zone: string; + + /** UpdateNodePoolRequest clusterId. */ + public clusterId: string; + + /** UpdateNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** UpdateNodePoolRequest nodeVersion. */ + public nodeVersion: string; + + /** UpdateNodePoolRequest imageType. */ + public imageType: string; + + /** UpdateNodePoolRequest locations. */ + public locations: string[]; + + /** UpdateNodePoolRequest workloadMetadataConfig. */ + public workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); + + /** UpdateNodePoolRequest name. */ + public name: string; + + /** UpdateNodePoolRequest upgradeSettings. */ + public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** UpdateNodePoolRequest tags. */ + public tags?: (google.container.v1beta1.INetworkTags|null); + + /** UpdateNodePoolRequest taints. */ + public taints?: (google.container.v1beta1.INodeTaints|null); + + /** UpdateNodePoolRequest labels. */ + public labels?: (google.container.v1beta1.INodeLabels|null); + + /** UpdateNodePoolRequest linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); + + /** UpdateNodePoolRequest kubeletConfig. */ + public kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); + + /** UpdateNodePoolRequest nodeNetworkConfig. */ + public nodeNetworkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); + + /** UpdateNodePoolRequest gcfsConfig. */ + public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); + + /** UpdateNodePoolRequest confidentialNodes. */ + public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); + + /** UpdateNodePoolRequest gvnic. */ + public gvnic?: (google.container.v1beta1.IVirtualNIC|null); + + /** UpdateNodePoolRequest etag. */ + public etag: string; + + /** UpdateNodePoolRequest fastSocket. */ + public fastSocket?: (google.container.v1beta1.IFastSocket|null); + + /** UpdateNodePoolRequest loggingConfig. */ + public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + + /** UpdateNodePoolRequest resourceLabels. */ + public resourceLabels?: (google.container.v1beta1.IResourceLabels|null); + + /** UpdateNodePoolRequest windowsNodeConfig. */ + public windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); + + /** UpdateNodePoolRequest accelerators. */ + public accelerators: google.container.v1beta1.IAcceleratorConfig[]; + + /** UpdateNodePoolRequest machineType. */ + public machineType: string; + + /** UpdateNodePoolRequest diskType. */ + public diskType: string; + + /** UpdateNodePoolRequest diskSizeGb. */ + public diskSizeGb: (number|Long|string); + + /** UpdateNodePoolRequest resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); + + /** UpdateNodePoolRequest containerdConfig. */ + public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); + + /** UpdateNodePoolRequest queuedProvisioning. */ + public queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); + + /** + * Creates a new UpdateNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateNodePoolRequest instance + */ + public static create(properties?: google.container.v1beta1.IUpdateNodePoolRequest): google.container.v1beta1.UpdateNodePoolRequest; + + /** + * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. + * @param message UpdateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. + * @param message UpdateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateNodePoolRequest; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateNodePoolRequest; + + /** + * Verifies an UpdateNodePoolRequest message. + * @param message Plain 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 UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateNodePoolRequest; + + /** + * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. + * @param message UpdateNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UpdateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolAutoscalingRequest. */ + interface ISetNodePoolAutoscalingRequest { + + /** SetNodePoolAutoscalingRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolAutoscalingRequest zone */ + zone?: (string|null); + + /** SetNodePoolAutoscalingRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolAutoscalingRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolAutoscalingRequest autoscaling */ + autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** SetNodePoolAutoscalingRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolAutoscalingRequest. */ + class SetNodePoolAutoscalingRequest implements ISetNodePoolAutoscalingRequest { + + /** + * Constructs a new SetNodePoolAutoscalingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetNodePoolAutoscalingRequest); + + /** SetNodePoolAutoscalingRequest projectId. */ + public projectId: string; + + /** SetNodePoolAutoscalingRequest zone. */ + public zone: string; + + /** SetNodePoolAutoscalingRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolAutoscalingRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolAutoscalingRequest autoscaling. */ + public autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** SetNodePoolAutoscalingRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolAutoscalingRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetNodePoolAutoscalingRequest): google.container.v1beta1.SetNodePoolAutoscalingRequest; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @param message SetNodePoolAutoscalingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @param message SetNodePoolAutoscalingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolAutoscalingRequest; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolAutoscalingRequest; + + /** + * Verifies a SetNodePoolAutoscalingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolAutoscalingRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolAutoscalingRequest; + + /** + * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. + * @param message SetNodePoolAutoscalingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetNodePoolAutoscalingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolAutoscalingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolAutoscalingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLoggingServiceRequest. */ + interface ISetLoggingServiceRequest { + + /** SetLoggingServiceRequest projectId */ + projectId?: (string|null); + + /** SetLoggingServiceRequest zone */ + zone?: (string|null); + + /** SetLoggingServiceRequest clusterId */ + clusterId?: (string|null); + + /** SetLoggingServiceRequest loggingService */ + loggingService?: (string|null); + + /** SetLoggingServiceRequest name */ + name?: (string|null); + } + + /** Represents a SetLoggingServiceRequest. */ + class SetLoggingServiceRequest implements ISetLoggingServiceRequest { + + /** + * Constructs a new SetLoggingServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetLoggingServiceRequest); + + /** SetLoggingServiceRequest projectId. */ + public projectId: string; + + /** SetLoggingServiceRequest zone. */ + public zone: string; + + /** SetLoggingServiceRequest clusterId. */ + public clusterId: string; + + /** SetLoggingServiceRequest loggingService. */ + public loggingService: string; + + /** SetLoggingServiceRequest name. */ + public name: string; + + /** + * Creates a new SetLoggingServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLoggingServiceRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetLoggingServiceRequest): google.container.v1beta1.SetLoggingServiceRequest; + + /** + * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. + * @param message SetLoggingServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. + * @param message SetLoggingServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLoggingServiceRequest; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLoggingServiceRequest; + + /** + * Verifies a SetLoggingServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLoggingServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLoggingServiceRequest; + + /** + * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. + * @param message SetLoggingServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetLoggingServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLoggingServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLoggingServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMonitoringServiceRequest. */ + interface ISetMonitoringServiceRequest { + + /** SetMonitoringServiceRequest projectId */ + projectId?: (string|null); + + /** SetMonitoringServiceRequest zone */ + zone?: (string|null); + + /** SetMonitoringServiceRequest clusterId */ + clusterId?: (string|null); + + /** SetMonitoringServiceRequest monitoringService */ + monitoringService?: (string|null); + + /** SetMonitoringServiceRequest name */ + name?: (string|null); + } + + /** Represents a SetMonitoringServiceRequest. */ + class SetMonitoringServiceRequest implements ISetMonitoringServiceRequest { + + /** + * Constructs a new SetMonitoringServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetMonitoringServiceRequest); + + /** SetMonitoringServiceRequest projectId. */ + public projectId: string; + + /** SetMonitoringServiceRequest zone. */ + public zone: string; + + /** SetMonitoringServiceRequest clusterId. */ + public clusterId: string; + + /** SetMonitoringServiceRequest monitoringService. */ + public monitoringService: string; + + /** SetMonitoringServiceRequest name. */ + public name: string; + + /** + * Creates a new SetMonitoringServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMonitoringServiceRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetMonitoringServiceRequest): google.container.v1beta1.SetMonitoringServiceRequest; + + /** + * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. + * @param message SetMonitoringServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. + * @param message SetMonitoringServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMonitoringServiceRequest; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMonitoringServiceRequest; + + /** + * Verifies a SetMonitoringServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMonitoringServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMonitoringServiceRequest; + + /** + * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. + * @param message SetMonitoringServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetMonitoringServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMonitoringServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMonitoringServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetAddonsConfigRequest. */ + interface ISetAddonsConfigRequest { + + /** SetAddonsConfigRequest projectId */ + projectId?: (string|null); + + /** SetAddonsConfigRequest zone */ + zone?: (string|null); + + /** SetAddonsConfigRequest clusterId */ + clusterId?: (string|null); + + /** SetAddonsConfigRequest addonsConfig */ + addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** SetAddonsConfigRequest name */ + name?: (string|null); + } + + /** Represents a SetAddonsConfigRequest. */ + class SetAddonsConfigRequest implements ISetAddonsConfigRequest { + + /** + * Constructs a new SetAddonsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetAddonsConfigRequest); + + /** SetAddonsConfigRequest projectId. */ + public projectId: string; + + /** SetAddonsConfigRequest zone. */ + public zone: string; + + /** SetAddonsConfigRequest clusterId. */ + public clusterId: string; + + /** SetAddonsConfigRequest addonsConfig. */ + public addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); + + /** SetAddonsConfigRequest name. */ + public name: string; + + /** + * Creates a new SetAddonsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetAddonsConfigRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetAddonsConfigRequest): google.container.v1beta1.SetAddonsConfigRequest; + + /** + * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. + * @param message SetAddonsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. + * @param message SetAddonsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetAddonsConfigRequest; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetAddonsConfigRequest; + + /** + * Verifies a SetAddonsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetAddonsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetAddonsConfigRequest; + + /** + * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. + * @param message SetAddonsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetAddonsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetAddonsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetAddonsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLocationsRequest. */ + interface ISetLocationsRequest { + + /** SetLocationsRequest projectId */ + projectId?: (string|null); + + /** SetLocationsRequest zone */ + zone?: (string|null); + + /** SetLocationsRequest clusterId */ + clusterId?: (string|null); + + /** SetLocationsRequest locations */ + locations?: (string[]|null); + + /** SetLocationsRequest name */ + name?: (string|null); + } + + /** Represents a SetLocationsRequest. */ + class SetLocationsRequest implements ISetLocationsRequest { + + /** + * Constructs a new SetLocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetLocationsRequest); + + /** SetLocationsRequest projectId. */ + public projectId: string; + + /** SetLocationsRequest zone. */ + public zone: string; + + /** SetLocationsRequest clusterId. */ + public clusterId: string; + + /** SetLocationsRequest locations. */ + public locations: string[]; + + /** SetLocationsRequest name. */ + public name: string; + + /** + * Creates a new SetLocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLocationsRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetLocationsRequest): google.container.v1beta1.SetLocationsRequest; + + /** + * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. + * @param message SetLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. + * @param message SetLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLocationsRequest; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLocationsRequest; + + /** + * Verifies a SetLocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLocationsRequest; + + /** + * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. + * @param message SetLocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMasterRequest. */ + interface IUpdateMasterRequest { + + /** UpdateMasterRequest projectId */ + projectId?: (string|null); + + /** UpdateMasterRequest zone */ + zone?: (string|null); + + /** UpdateMasterRequest clusterId */ + clusterId?: (string|null); + + /** UpdateMasterRequest masterVersion */ + masterVersion?: (string|null); + + /** UpdateMasterRequest name */ + name?: (string|null); + } + + /** Represents an UpdateMasterRequest. */ + class UpdateMasterRequest implements IUpdateMasterRequest { + + /** + * Constructs a new UpdateMasterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUpdateMasterRequest); + + /** UpdateMasterRequest projectId. */ + public projectId: string; + + /** UpdateMasterRequest zone. */ + public zone: string; + + /** UpdateMasterRequest clusterId. */ + public clusterId: string; + + /** UpdateMasterRequest masterVersion. */ + public masterVersion: string; + + /** UpdateMasterRequest name. */ + public name: string; + + /** + * Creates a new UpdateMasterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMasterRequest instance + */ + public static create(properties?: google.container.v1beta1.IUpdateMasterRequest): google.container.v1beta1.UpdateMasterRequest; + + /** + * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. + * @param message UpdateMasterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. + * @param message UpdateMasterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateMasterRequest; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateMasterRequest; + + /** + * Verifies an UpdateMasterRequest message. + * @param message Plain 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 UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMasterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateMasterRequest; + + /** + * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. + * @param message UpdateMasterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UpdateMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMasterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMasterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMasterAuthRequest. */ + interface ISetMasterAuthRequest { + + /** SetMasterAuthRequest projectId */ + projectId?: (string|null); + + /** SetMasterAuthRequest zone */ + zone?: (string|null); + + /** SetMasterAuthRequest clusterId */ + clusterId?: (string|null); + + /** SetMasterAuthRequest action */ + action?: (google.container.v1beta1.SetMasterAuthRequest.Action|keyof typeof google.container.v1beta1.SetMasterAuthRequest.Action|null); + + /** SetMasterAuthRequest update */ + update?: (google.container.v1beta1.IMasterAuth|null); + + /** SetMasterAuthRequest name */ + name?: (string|null); + } + + /** Represents a SetMasterAuthRequest. */ + class SetMasterAuthRequest implements ISetMasterAuthRequest { + + /** + * Constructs a new SetMasterAuthRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetMasterAuthRequest); + + /** SetMasterAuthRequest projectId. */ + public projectId: string; + + /** SetMasterAuthRequest zone. */ + public zone: string; + + /** SetMasterAuthRequest clusterId. */ + public clusterId: string; + + /** SetMasterAuthRequest action. */ + public action: (google.container.v1beta1.SetMasterAuthRequest.Action|keyof typeof google.container.v1beta1.SetMasterAuthRequest.Action); + + /** SetMasterAuthRequest update. */ + public update?: (google.container.v1beta1.IMasterAuth|null); + + /** SetMasterAuthRequest name. */ + public name: string; + + /** + * Creates a new SetMasterAuthRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMasterAuthRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetMasterAuthRequest): google.container.v1beta1.SetMasterAuthRequest; + + /** + * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. + * @param message SetMasterAuthRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. + * @param message SetMasterAuthRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMasterAuthRequest; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMasterAuthRequest; + + /** + * Verifies a SetMasterAuthRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMasterAuthRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMasterAuthRequest; + + /** + * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. + * @param message SetMasterAuthRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetMasterAuthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMasterAuthRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMasterAuthRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SetMasterAuthRequest { + + /** Action enum. */ + enum Action { + UNKNOWN = 0, + SET_PASSWORD = 1, + GENERATE_PASSWORD = 2, + SET_USERNAME = 3 + } + } + + /** Properties of a DeleteClusterRequest. */ + interface IDeleteClusterRequest { + + /** DeleteClusterRequest projectId */ + projectId?: (string|null); + + /** DeleteClusterRequest zone */ + zone?: (string|null); + + /** DeleteClusterRequest clusterId */ + clusterId?: (string|null); + + /** DeleteClusterRequest name */ + name?: (string|null); + } + + /** Represents a DeleteClusterRequest. */ + class DeleteClusterRequest implements IDeleteClusterRequest { + + /** + * Constructs a new DeleteClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDeleteClusterRequest); + + /** DeleteClusterRequest projectId. */ + public projectId: string; + + /** DeleteClusterRequest zone. */ + public zone: string; + + /** DeleteClusterRequest clusterId. */ + public clusterId: string; + + /** DeleteClusterRequest name. */ + public name: string; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteClusterRequest instance + */ + public static create(properties?: google.container.v1beta1.IDeleteClusterRequest): google.container.v1beta1.DeleteClusterRequest; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. + * @param message DeleteClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DeleteClusterRequest; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DeleteClusterRequest; + + /** + * Verifies a DeleteClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DeleteClusterRequest; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @param message DeleteClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DeleteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersRequest. */ + interface IListClustersRequest { + + /** ListClustersRequest projectId */ + projectId?: (string|null); + + /** ListClustersRequest zone */ + zone?: (string|null); + + /** ListClustersRequest parent */ + parent?: (string|null); + } + + /** Represents a ListClustersRequest. */ + class ListClustersRequest implements IListClustersRequest { + + /** + * Constructs a new ListClustersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListClustersRequest); + + /** ListClustersRequest projectId. */ + public projectId: string; + + /** ListClustersRequest zone. */ + public zone: string; + + /** ListClustersRequest parent. */ + public parent: string; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersRequest instance + */ + public static create(properties?: google.container.v1beta1.IListClustersRequest): google.container.v1beta1.ListClustersRequest; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. + * @param message ListClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListClustersRequest; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListClustersRequest; + + /** + * Verifies a ListClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListClustersRequest; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @param message ListClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClustersResponse. */ + interface IListClustersResponse { + + /** ListClustersResponse clusters */ + clusters?: (google.container.v1beta1.ICluster[]|null); + + /** ListClustersResponse missingZones */ + missingZones?: (string[]|null); + } + + /** Represents a ListClustersResponse. */ + class ListClustersResponse implements IListClustersResponse { + + /** + * Constructs a new ListClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListClustersResponse); + + /** ListClustersResponse clusters. */ + public clusters: google.container.v1beta1.ICluster[]; + + /** ListClustersResponse missingZones. */ + public missingZones: string[]; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClustersResponse instance + */ + public static create(properties?: google.container.v1beta1.IListClustersResponse): google.container.v1beta1.ListClustersResponse; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. + * @param message ListClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListClustersResponse; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListClustersResponse; + + /** + * Verifies a ListClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClustersResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListClustersResponse; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @param message ListClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClustersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest projectId */ + projectId?: (string|null); + + /** GetOperationRequest zone */ + zone?: (string|null); + + /** GetOperationRequest operationId */ + operationId?: (string|null); + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetOperationRequest); + + /** GetOperationRequest projectId. */ + public projectId: string; + + /** GetOperationRequest zone. */ + public zone: string; + + /** GetOperationRequest operationId. */ + public operationId: string; + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetOperationRequest): google.container.v1beta1.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest projectId */ + projectId?: (string|null); + + /** ListOperationsRequest zone */ + zone?: (string|null); + + /** ListOperationsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListOperationsRequest); + + /** ListOperationsRequest projectId. */ + public projectId: string; + + /** ListOperationsRequest zone. */ + public zone: string; + + /** ListOperationsRequest parent. */ + public parent: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.container.v1beta1.IListOperationsRequest): google.container.v1beta1.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest projectId */ + projectId?: (string|null); + + /** CancelOperationRequest zone */ + zone?: (string|null); + + /** CancelOperationRequest operationId */ + operationId?: (string|null); + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICancelOperationRequest); + + /** CancelOperationRequest projectId. */ + public projectId: string; + + /** CancelOperationRequest zone. */ + public zone: string; + + /** CancelOperationRequest operationId. */ + public operationId: string; + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.container.v1beta1.ICancelOperationRequest): google.container.v1beta1.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.container.v1beta1.IOperation[]|null); + + /** ListOperationsResponse missingZones */ + missingZones?: (string[]|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.container.v1beta1.IOperation[]; + + /** ListOperationsResponse missingZones. */ + public missingZones: string[]; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.container.v1beta1.IListOperationsResponse): google.container.v1beta1.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetServerConfigRequest. */ + interface IGetServerConfigRequest { + + /** GetServerConfigRequest projectId */ + projectId?: (string|null); + + /** GetServerConfigRequest zone */ + zone?: (string|null); + + /** GetServerConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetServerConfigRequest. */ + class GetServerConfigRequest implements IGetServerConfigRequest { + + /** + * Constructs a new GetServerConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetServerConfigRequest); + + /** GetServerConfigRequest projectId. */ + public projectId: string; + + /** GetServerConfigRequest zone. */ + public zone: string; + + /** GetServerConfigRequest name. */ + public name: string; + + /** + * Creates a new GetServerConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServerConfigRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetServerConfigRequest): google.container.v1beta1.GetServerConfigRequest; + + /** + * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. + * @param message GetServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. + * @param message GetServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetServerConfigRequest; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetServerConfigRequest; + + /** + * Verifies a GetServerConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServerConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetServerConfigRequest; + + /** + * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. + * @param message GetServerConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetServerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServerConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServerConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerConfig. */ + interface IServerConfig { + + /** ServerConfig defaultClusterVersion */ + defaultClusterVersion?: (string|null); + + /** ServerConfig validNodeVersions */ + validNodeVersions?: (string[]|null); + + /** ServerConfig defaultImageType */ + defaultImageType?: (string|null); + + /** ServerConfig validImageTypes */ + validImageTypes?: (string[]|null); + + /** ServerConfig validMasterVersions */ + validMasterVersions?: (string[]|null); + + /** ServerConfig channels */ + channels?: (google.container.v1beta1.ServerConfig.IReleaseChannelConfig[]|null); + + /** ServerConfig windowsVersionMaps */ + windowsVersionMaps?: ({ [k: string]: google.container.v1beta1.IWindowsVersions }|null); + } + + /** Represents a ServerConfig. */ + class ServerConfig implements IServerConfig { + + /** + * Constructs a new ServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IServerConfig); + + /** ServerConfig defaultClusterVersion. */ + public defaultClusterVersion: string; + + /** ServerConfig validNodeVersions. */ + public validNodeVersions: string[]; + + /** ServerConfig defaultImageType. */ + public defaultImageType: string; + + /** ServerConfig validImageTypes. */ + public validImageTypes: string[]; + + /** ServerConfig validMasterVersions. */ + public validMasterVersions: string[]; + + /** ServerConfig channels. */ + public channels: google.container.v1beta1.ServerConfig.IReleaseChannelConfig[]; + + /** ServerConfig windowsVersionMaps. */ + public windowsVersionMaps: { [k: string]: google.container.v1beta1.IWindowsVersions }; + + /** + * Creates a new ServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerConfig instance + */ + public static create(properties?: google.container.v1beta1.IServerConfig): google.container.v1beta1.ServerConfig; + + /** + * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. + * @param message ServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. + * @param message ServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig; + + /** + * Decodes a ServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig; + + /** + * Verifies a ServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig; + + /** + * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. + * @param message ServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ServerConfig { + + /** Properties of a ReleaseChannelConfig. */ + interface IReleaseChannelConfig { + + /** ReleaseChannelConfig channel */ + channel?: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel|null); + + /** ReleaseChannelConfig defaultVersion */ + defaultVersion?: (string|null); + + /** ReleaseChannelConfig availableVersions */ + availableVersions?: (google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion[]|null); + + /** ReleaseChannelConfig validVersions */ + validVersions?: (string[]|null); + } + + /** Represents a ReleaseChannelConfig. */ + class ReleaseChannelConfig implements IReleaseChannelConfig { + + /** + * Constructs a new ReleaseChannelConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ServerConfig.IReleaseChannelConfig); + + /** ReleaseChannelConfig channel. */ + public channel: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel); + + /** ReleaseChannelConfig defaultVersion. */ + public defaultVersion: string; + + /** ReleaseChannelConfig availableVersions. */ + public availableVersions: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion[]; + + /** ReleaseChannelConfig validVersions. */ + public validVersions: string[]; + + /** + * Creates a new ReleaseChannelConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseChannelConfig instance + */ + public static create(properties?: google.container.v1beta1.ServerConfig.IReleaseChannelConfig): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; + + /** + * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @param message ReleaseChannelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @param message ReleaseChannelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; + + /** + * Verifies a ReleaseChannelConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseChannelConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; + + /** + * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. + * @param message ReleaseChannelConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseChannelConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseChannelConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReleaseChannelConfig { + + /** Properties of an AvailableVersion. */ + interface IAvailableVersion { + + /** AvailableVersion version */ + version?: (string|null); + + /** AvailableVersion reason */ + reason?: (string|null); + } + + /** Represents an AvailableVersion. */ + class AvailableVersion implements IAvailableVersion { + + /** + * Constructs a new AvailableVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion); + + /** AvailableVersion version. */ + public version: string; + + /** AvailableVersion reason. */ + public reason: string; + + /** + * Creates a new AvailableVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns AvailableVersion instance + */ + public static create(properties?: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; + + /** + * Encodes the specified AvailableVersion message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. + * @param message AvailableVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AvailableVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. + * @param message AvailableVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AvailableVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AvailableVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; + + /** + * Decodes an AvailableVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AvailableVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; + + /** + * Verifies an AvailableVersion message. + * @param message Plain 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 AvailableVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AvailableVersion + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; + + /** + * Creates a plain object from an AvailableVersion message. Also converts values to other types if specified. + * @param message AvailableVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AvailableVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AvailableVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a BestEffortProvisioning. */ + interface IBestEffortProvisioning { + + /** BestEffortProvisioning enabled */ + enabled?: (boolean|null); + + /** BestEffortProvisioning minProvisionNodes */ + minProvisionNodes?: (number|null); + } + + /** Represents a BestEffortProvisioning. */ + class BestEffortProvisioning implements IBestEffortProvisioning { + + /** + * Constructs a new BestEffortProvisioning. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IBestEffortProvisioning); + + /** BestEffortProvisioning enabled. */ + public enabled: boolean; + + /** BestEffortProvisioning minProvisionNodes. */ + public minProvisionNodes: number; + + /** + * Creates a new BestEffortProvisioning instance using the specified properties. + * @param [properties] Properties to set + * @returns BestEffortProvisioning instance + */ + public static create(properties?: google.container.v1beta1.IBestEffortProvisioning): google.container.v1beta1.BestEffortProvisioning; + + /** + * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. + * @param message BestEffortProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. + * @param message BestEffortProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BestEffortProvisioning; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BestEffortProvisioning; + + /** + * Verifies a BestEffortProvisioning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BestEffortProvisioning + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BestEffortProvisioning; + + /** + * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. + * @param message BestEffortProvisioning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BestEffortProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BestEffortProvisioning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BestEffortProvisioning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WindowsVersions. */ + interface IWindowsVersions { + + /** WindowsVersions windowsVersions */ + windowsVersions?: (google.container.v1beta1.WindowsVersions.IWindowsVersion[]|null); + } + + /** Represents a WindowsVersions. */ + class WindowsVersions implements IWindowsVersions { + + /** + * Constructs a new WindowsVersions. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWindowsVersions); + + /** WindowsVersions windowsVersions. */ + public windowsVersions: google.container.v1beta1.WindowsVersions.IWindowsVersion[]; + + /** + * Creates a new WindowsVersions instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsVersions instance + */ + public static create(properties?: google.container.v1beta1.IWindowsVersions): google.container.v1beta1.WindowsVersions; + + /** + * Encodes the specified WindowsVersions message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. + * @param message WindowsVersions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWindowsVersions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsVersions message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. + * @param message WindowsVersions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWindowsVersions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsVersions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsVersions; + + /** + * Decodes a WindowsVersions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsVersions; + + /** + * Verifies a WindowsVersions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsVersions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsVersions + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsVersions; + + /** + * Creates a plain object from a WindowsVersions message. Also converts values to other types if specified. + * @param message WindowsVersions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WindowsVersions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsVersions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsVersions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WindowsVersions { + + /** Properties of a WindowsVersion. */ + interface IWindowsVersion { + + /** WindowsVersion imageType */ + imageType?: (string|null); + + /** WindowsVersion osVersion */ + osVersion?: (string|null); + + /** WindowsVersion supportEndDate */ + supportEndDate?: (google.type.IDate|null); + } + + /** Represents a WindowsVersion. */ + class WindowsVersion implements IWindowsVersion { + + /** + * Constructs a new WindowsVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.WindowsVersions.IWindowsVersion); + + /** WindowsVersion imageType. */ + public imageType: string; + + /** WindowsVersion osVersion. */ + public osVersion: string; + + /** WindowsVersion supportEndDate. */ + public supportEndDate?: (google.type.IDate|null); + + /** + * Creates a new WindowsVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsVersion instance + */ + public static create(properties?: google.container.v1beta1.WindowsVersions.IWindowsVersion): google.container.v1beta1.WindowsVersions.WindowsVersion; + + /** + * Encodes the specified WindowsVersion message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. + * @param message WindowsVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.WindowsVersions.IWindowsVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. + * @param message WindowsVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.WindowsVersions.IWindowsVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsVersions.WindowsVersion; + + /** + * Decodes a WindowsVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsVersions.WindowsVersion; + + /** + * Verifies a WindowsVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsVersion + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsVersions.WindowsVersion; + + /** + * Creates a plain object from a WindowsVersion message. Also converts values to other types if specified. + * @param message WindowsVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WindowsVersions.WindowsVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateNodePoolRequest. */ + interface ICreateNodePoolRequest { + + /** CreateNodePoolRequest projectId */ + projectId?: (string|null); + + /** CreateNodePoolRequest zone */ + zone?: (string|null); + + /** CreateNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** CreateNodePoolRequest nodePool */ + nodePool?: (google.container.v1beta1.INodePool|null); + + /** CreateNodePoolRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateNodePoolRequest. */ + class CreateNodePoolRequest implements ICreateNodePoolRequest { + + /** + * Constructs a new CreateNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICreateNodePoolRequest); + + /** CreateNodePoolRequest projectId. */ + public projectId: string; + + /** CreateNodePoolRequest zone. */ + public zone: string; + + /** CreateNodePoolRequest clusterId. */ + public clusterId: string; + + /** CreateNodePoolRequest nodePool. */ + public nodePool?: (google.container.v1beta1.INodePool|null); + + /** CreateNodePoolRequest parent. */ + public parent: string; + + /** + * Creates a new CreateNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateNodePoolRequest instance + */ + public static create(properties?: google.container.v1beta1.ICreateNodePoolRequest): google.container.v1beta1.CreateNodePoolRequest; + + /** + * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. + * @param message CreateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. + * @param message CreateNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CreateNodePoolRequest; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CreateNodePoolRequest; + + /** + * Verifies a CreateNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CreateNodePoolRequest; + + /** + * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. + * @param message CreateNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CreateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteNodePoolRequest. */ + interface IDeleteNodePoolRequest { + + /** DeleteNodePoolRequest projectId */ + projectId?: (string|null); + + /** DeleteNodePoolRequest zone */ + zone?: (string|null); + + /** DeleteNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** DeleteNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** DeleteNodePoolRequest name */ + name?: (string|null); + } + + /** Represents a DeleteNodePoolRequest. */ + class DeleteNodePoolRequest implements IDeleteNodePoolRequest { + + /** + * Constructs a new DeleteNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDeleteNodePoolRequest); + + /** DeleteNodePoolRequest projectId. */ + public projectId: string; + + /** DeleteNodePoolRequest zone. */ + public zone: string; + + /** DeleteNodePoolRequest clusterId. */ + public clusterId: string; + + /** DeleteNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** DeleteNodePoolRequest name. */ + public name: string; + + /** + * Creates a new DeleteNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteNodePoolRequest instance + */ + public static create(properties?: google.container.v1beta1.IDeleteNodePoolRequest): google.container.v1beta1.DeleteNodePoolRequest; + + /** + * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. + * @param message DeleteNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. + * @param message DeleteNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DeleteNodePoolRequest; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DeleteNodePoolRequest; + + /** + * Verifies a DeleteNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DeleteNodePoolRequest; + + /** + * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. + * @param message DeleteNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DeleteNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNodePoolsRequest. */ + interface IListNodePoolsRequest { + + /** ListNodePoolsRequest projectId */ + projectId?: (string|null); + + /** ListNodePoolsRequest zone */ + zone?: (string|null); + + /** ListNodePoolsRequest clusterId */ + clusterId?: (string|null); + + /** ListNodePoolsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListNodePoolsRequest. */ + class ListNodePoolsRequest implements IListNodePoolsRequest { + + /** + * Constructs a new ListNodePoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListNodePoolsRequest); + + /** ListNodePoolsRequest projectId. */ + public projectId: string; + + /** ListNodePoolsRequest zone. */ + public zone: string; + + /** ListNodePoolsRequest clusterId. */ + public clusterId: string; + + /** ListNodePoolsRequest parent. */ + public parent: string; + + /** + * Creates a new ListNodePoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNodePoolsRequest instance + */ + public static create(properties?: google.container.v1beta1.IListNodePoolsRequest): google.container.v1beta1.ListNodePoolsRequest; + + /** + * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. + * @param message ListNodePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. + * @param message ListNodePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListNodePoolsRequest; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListNodePoolsRequest; + + /** + * Verifies a ListNodePoolsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNodePoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListNodePoolsRequest; + + /** + * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. + * @param message ListNodePoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListNodePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNodePoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNodePoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNodePoolRequest. */ + interface IGetNodePoolRequest { + + /** GetNodePoolRequest projectId */ + projectId?: (string|null); + + /** GetNodePoolRequest zone */ + zone?: (string|null); + + /** GetNodePoolRequest clusterId */ + clusterId?: (string|null); + + /** GetNodePoolRequest nodePoolId */ + nodePoolId?: (string|null); + + /** GetNodePoolRequest name */ + name?: (string|null); + } + + /** Represents a GetNodePoolRequest. */ + class GetNodePoolRequest implements IGetNodePoolRequest { + + /** + * Constructs a new GetNodePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetNodePoolRequest); + + /** GetNodePoolRequest projectId. */ + public projectId: string; + + /** GetNodePoolRequest zone. */ + public zone: string; + + /** GetNodePoolRequest clusterId. */ + public clusterId: string; + + /** GetNodePoolRequest nodePoolId. */ + public nodePoolId: string; + + /** GetNodePoolRequest name. */ + public name: string; + + /** + * Creates a new GetNodePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNodePoolRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetNodePoolRequest): google.container.v1beta1.GetNodePoolRequest; + + /** + * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. + * @param message GetNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. + * @param message GetNodePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetNodePoolRequest; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetNodePoolRequest; + + /** + * Verifies a GetNodePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNodePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetNodePoolRequest; + + /** + * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. + * @param message GetNodePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNodePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNodePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BlueGreenSettings. */ + interface IBlueGreenSettings { + + /** BlueGreenSettings standardRolloutPolicy */ + standardRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null); + + /** BlueGreenSettings autoscaledRolloutPolicy */ + autoscaledRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null); + + /** BlueGreenSettings nodePoolSoakDuration */ + nodePoolSoakDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a BlueGreenSettings. */ + class BlueGreenSettings implements IBlueGreenSettings { + + /** + * Constructs a new BlueGreenSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IBlueGreenSettings); + + /** BlueGreenSettings standardRolloutPolicy. */ + public standardRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null); + + /** BlueGreenSettings autoscaledRolloutPolicy. */ + public autoscaledRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null); + + /** BlueGreenSettings nodePoolSoakDuration. */ + public nodePoolSoakDuration?: (google.protobuf.IDuration|null); + + /** BlueGreenSettings rolloutPolicy. */ + public rolloutPolicy?: ("standardRolloutPolicy"|"autoscaledRolloutPolicy"); + + /** BlueGreenSettings _nodePoolSoakDuration. */ + public _nodePoolSoakDuration?: "nodePoolSoakDuration"; + + /** + * Creates a new BlueGreenSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns BlueGreenSettings instance + */ + public static create(properties?: google.container.v1beta1.IBlueGreenSettings): google.container.v1beta1.BlueGreenSettings; + + /** + * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. + * @param message BlueGreenSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. + * @param message BlueGreenSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings; + + /** + * Verifies a BlueGreenSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlueGreenSettings + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings; + + /** + * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. + * @param message BlueGreenSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BlueGreenSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlueGreenSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlueGreenSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BlueGreenSettings { + + /** Properties of a StandardRolloutPolicy. */ + interface IStandardRolloutPolicy { + + /** StandardRolloutPolicy batchPercentage */ + batchPercentage?: (number|null); + + /** StandardRolloutPolicy batchNodeCount */ + batchNodeCount?: (number|null); + + /** StandardRolloutPolicy batchSoakDuration */ + batchSoakDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a StandardRolloutPolicy. */ + class StandardRolloutPolicy implements IStandardRolloutPolicy { + + /** + * Constructs a new StandardRolloutPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy); + + /** StandardRolloutPolicy batchPercentage. */ + public batchPercentage?: (number|null); + + /** StandardRolloutPolicy batchNodeCount. */ + public batchNodeCount?: (number|null); + + /** StandardRolloutPolicy batchSoakDuration. */ + public batchSoakDuration?: (google.protobuf.IDuration|null); + + /** StandardRolloutPolicy updateBatchSize. */ + public updateBatchSize?: ("batchPercentage"|"batchNodeCount"); + + /** StandardRolloutPolicy _batchSoakDuration. */ + public _batchSoakDuration?: "batchSoakDuration"; + + /** + * Creates a new StandardRolloutPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardRolloutPolicy instance + */ + public static create(properties?: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @param message StandardRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @param message StandardRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Verifies a StandardRolloutPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardRolloutPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; + + /** + * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. + * @param message StandardRolloutPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardRolloutPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardRolloutPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoscaledRolloutPolicy. */ + interface IAutoscaledRolloutPolicy { + } + + /** Represents an AutoscaledRolloutPolicy. */ + class AutoscaledRolloutPolicy implements IAutoscaledRolloutPolicy { + + /** + * Constructs a new AutoscaledRolloutPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy); + + /** + * Creates a new AutoscaledRolloutPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscaledRolloutPolicy instance + */ + public static create(properties?: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; + + /** + * Encodes the specified AutoscaledRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. + * @param message AutoscaledRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscaledRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. + * @param message AutoscaledRolloutPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscaledRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; + + /** + * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscaledRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; + + /** + * Verifies an AutoscaledRolloutPolicy message. + * @param message Plain 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 AutoscaledRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscaledRolloutPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; + + /** + * Creates a plain object from an AutoscaledRolloutPolicy message. Also converts values to other types if specified. + * @param message AutoscaledRolloutPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscaledRolloutPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoscaledRolloutPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodePool. */ + interface INodePool { + + /** NodePool name */ + name?: (string|null); + + /** NodePool config */ + config?: (google.container.v1beta1.INodeConfig|null); + + /** NodePool initialNodeCount */ + initialNodeCount?: (number|null); + + /** NodePool locations */ + locations?: (string[]|null); + + /** NodePool networkConfig */ + networkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); + + /** NodePool selfLink */ + selfLink?: (string|null); + + /** NodePool version */ + version?: (string|null); + + /** NodePool instanceGroupUrls */ + instanceGroupUrls?: (string[]|null); + + /** NodePool status */ + status?: (google.container.v1beta1.NodePool.Status|keyof typeof google.container.v1beta1.NodePool.Status|null); + + /** NodePool statusMessage */ + statusMessage?: (string|null); + + /** NodePool autoscaling */ + autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** NodePool management */ + management?: (google.container.v1beta1.INodeManagement|null); + + /** NodePool maxPodsConstraint */ + maxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); + + /** NodePool conditions */ + conditions?: (google.container.v1beta1.IStatusCondition[]|null); + + /** NodePool podIpv4CidrSize */ + podIpv4CidrSize?: (number|null); + + /** NodePool upgradeSettings */ + upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** NodePool placementPolicy */ + placementPolicy?: (google.container.v1beta1.NodePool.IPlacementPolicy|null); + + /** NodePool updateInfo */ + updateInfo?: (google.container.v1beta1.NodePool.IUpdateInfo|null); + + /** NodePool etag */ + etag?: (string|null); + + /** NodePool queuedProvisioning */ + queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); + + /** NodePool bestEffortProvisioning */ + bestEffortProvisioning?: (google.container.v1beta1.IBestEffortProvisioning|null); + } + + /** Represents a NodePool. */ + class NodePool implements INodePool { + + /** + * Constructs a new NodePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodePool); + + /** NodePool name. */ + public name: string; + + /** NodePool config. */ + public config?: (google.container.v1beta1.INodeConfig|null); + + /** NodePool initialNodeCount. */ + public initialNodeCount: number; + + /** NodePool locations. */ + public locations: string[]; + + /** NodePool networkConfig. */ + public networkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); + + /** NodePool selfLink. */ + public selfLink: string; + + /** NodePool version. */ + public version: string; + + /** NodePool instanceGroupUrls. */ + public instanceGroupUrls: string[]; + + /** NodePool status. */ + public status: (google.container.v1beta1.NodePool.Status|keyof typeof google.container.v1beta1.NodePool.Status); + + /** NodePool statusMessage. */ + public statusMessage: string; + + /** NodePool autoscaling. */ + public autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); + + /** NodePool management. */ + public management?: (google.container.v1beta1.INodeManagement|null); + + /** NodePool maxPodsConstraint. */ + public maxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); + + /** NodePool conditions. */ + public conditions: google.container.v1beta1.IStatusCondition[]; + + /** NodePool podIpv4CidrSize. */ + public podIpv4CidrSize: number; + + /** NodePool upgradeSettings. */ + public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** NodePool placementPolicy. */ + public placementPolicy?: (google.container.v1beta1.NodePool.IPlacementPolicy|null); + + /** NodePool updateInfo. */ + public updateInfo?: (google.container.v1beta1.NodePool.IUpdateInfo|null); + + /** NodePool etag. */ + public etag: string; + + /** NodePool queuedProvisioning. */ + public queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); + + /** NodePool bestEffortProvisioning. */ + public bestEffortProvisioning?: (google.container.v1beta1.IBestEffortProvisioning|null); + + /** + * Creates a new NodePool instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePool instance + */ + public static create(properties?: google.container.v1beta1.INodePool): google.container.v1beta1.NodePool; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool; + + /** + * Verifies a NodePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePool + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @param message NodePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodePool { + + /** Properties of an UpgradeSettings. */ + interface IUpgradeSettings { + + /** UpgradeSettings maxSurge */ + maxSurge?: (number|null); + + /** UpgradeSettings maxUnavailable */ + maxUnavailable?: (number|null); + + /** UpgradeSettings strategy */ + strategy?: (google.container.v1beta1.NodePoolUpdateStrategy|keyof typeof google.container.v1beta1.NodePoolUpdateStrategy|null); + + /** UpgradeSettings blueGreenSettings */ + blueGreenSettings?: (google.container.v1beta1.IBlueGreenSettings|null); + } + + /** Represents an UpgradeSettings. */ + class UpgradeSettings implements IUpgradeSettings { + + /** + * Constructs a new UpgradeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodePool.IUpgradeSettings); + + /** UpgradeSettings maxSurge. */ + public maxSurge: number; + + /** UpgradeSettings maxUnavailable. */ + public maxUnavailable: number; + + /** UpgradeSettings strategy. */ + public strategy?: (google.container.v1beta1.NodePoolUpdateStrategy|keyof typeof google.container.v1beta1.NodePoolUpdateStrategy|null); + + /** UpgradeSettings blueGreenSettings. */ + public blueGreenSettings?: (google.container.v1beta1.IBlueGreenSettings|null); + + /** UpgradeSettings _strategy. */ + public _strategy?: "strategy"; + + /** UpgradeSettings _blueGreenSettings. */ + public _blueGreenSettings?: "blueGreenSettings"; + + /** + * Creates a new UpgradeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeSettings instance + */ + public static create(properties?: google.container.v1beta1.NodePool.IUpgradeSettings): google.container.v1beta1.NodePool.UpgradeSettings; + + /** + * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. + * @param message UpgradeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. + * @param message UpgradeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpgradeSettings; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpgradeSettings; + + /** + * Verifies an UpgradeSettings message. + * @param message Plain 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 UpgradeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeSettings + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpgradeSettings; + + /** + * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. + * @param message UpgradeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool.UpgradeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateInfo. */ + interface IUpdateInfo { + + /** UpdateInfo blueGreenInfo */ + blueGreenInfo?: (google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null); + } + + /** Represents an UpdateInfo. */ + class UpdateInfo implements IUpdateInfo { + + /** + * Constructs a new UpdateInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodePool.IUpdateInfo); + + /** UpdateInfo blueGreenInfo. */ + public blueGreenInfo?: (google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null); + + /** + * Creates a new UpdateInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateInfo instance + */ + public static create(properties?: google.container.v1beta1.NodePool.IUpdateInfo): google.container.v1beta1.NodePool.UpdateInfo; + + /** + * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. + * @param message UpdateInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. + * @param message UpdateInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpdateInfo; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpdateInfo; + + /** + * Verifies an UpdateInfo message. + * @param message Plain 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 UpdateInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpdateInfo; + + /** + * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. + * @param message UpdateInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool.UpdateInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UpdateInfo { + + /** Properties of a BlueGreenInfo. */ + interface IBlueGreenInfo { + + /** BlueGreenInfo phase */ + phase?: (google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null); + + /** BlueGreenInfo blueInstanceGroupUrls */ + blueInstanceGroupUrls?: (string[]|null); + + /** BlueGreenInfo greenInstanceGroupUrls */ + greenInstanceGroupUrls?: (string[]|null); + + /** BlueGreenInfo bluePoolDeletionStartTime */ + bluePoolDeletionStartTime?: (string|null); + + /** BlueGreenInfo greenPoolVersion */ + greenPoolVersion?: (string|null); + } + + /** Represents a BlueGreenInfo. */ + class BlueGreenInfo implements IBlueGreenInfo { + + /** + * Constructs a new BlueGreenInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo); + + /** BlueGreenInfo phase. */ + public phase: (google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase); + + /** BlueGreenInfo blueInstanceGroupUrls. */ + public blueInstanceGroupUrls: string[]; + + /** BlueGreenInfo greenInstanceGroupUrls. */ + public greenInstanceGroupUrls: string[]; + + /** BlueGreenInfo bluePoolDeletionStartTime. */ + public bluePoolDeletionStartTime: string; + + /** BlueGreenInfo greenPoolVersion. */ + public greenPoolVersion: string; + + /** + * Creates a new BlueGreenInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BlueGreenInfo instance + */ + public static create(properties?: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @param message BlueGreenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @param message BlueGreenInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Verifies a BlueGreenInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlueGreenInfo + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; + + /** + * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. + * @param message BlueGreenInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlueGreenInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlueGreenInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BlueGreenInfo { + + /** Phase enum. */ + enum Phase { + PHASE_UNSPECIFIED = 0, + UPDATE_STARTED = 1, + CREATING_GREEN_POOL = 2, + CORDONING_BLUE_POOL = 3, + WAITING_TO_DRAIN_BLUE_POOL = 8, + DRAINING_BLUE_POOL = 4, + NODE_POOL_SOAKING = 5, + DELETING_BLUE_POOL = 6, + ROLLBACK_STARTED = 7 + } + } + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RUNNING_WITH_ERROR = 3, + RECONCILING = 4, + STOPPING = 5, + ERROR = 6 + } + + /** Properties of a PlacementPolicy. */ + interface IPlacementPolicy { + + /** PlacementPolicy type */ + type?: (google.container.v1beta1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1beta1.NodePool.PlacementPolicy.Type|null); + + /** PlacementPolicy tpuTopology */ + tpuTopology?: (string|null); + + /** PlacementPolicy policyName */ + policyName?: (string|null); + } + + /** Represents a PlacementPolicy. */ + class PlacementPolicy implements IPlacementPolicy { + + /** + * Constructs a new PlacementPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodePool.IPlacementPolicy); + + /** PlacementPolicy type. */ + public type: (google.container.v1beta1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1beta1.NodePool.PlacementPolicy.Type); + + /** PlacementPolicy tpuTopology. */ + public tpuTopology: string; + + /** PlacementPolicy policyName. */ + public policyName: string; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacementPolicy instance + */ + public static create(properties?: google.container.v1beta1.NodePool.IPlacementPolicy): google.container.v1beta1.NodePool.PlacementPolicy; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.PlacementPolicy; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.PlacementPolicy; + + /** + * Verifies a PlacementPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacementPolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.PlacementPolicy; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @param message PlacementPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacementPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacementPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PlacementPolicy { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + COMPACT = 1 + } + } + + /** Properties of a QueuedProvisioning. */ + interface IQueuedProvisioning { + + /** QueuedProvisioning enabled */ + enabled?: (boolean|null); + } + + /** Represents a QueuedProvisioning. */ + class QueuedProvisioning implements IQueuedProvisioning { + + /** + * Constructs a new QueuedProvisioning. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NodePool.IQueuedProvisioning); + + /** QueuedProvisioning enabled. */ + public enabled: boolean; + + /** + * Creates a new QueuedProvisioning instance using the specified properties. + * @param [properties] Properties to set + * @returns QueuedProvisioning instance + */ + public static create(properties?: google.container.v1beta1.NodePool.IQueuedProvisioning): google.container.v1beta1.NodePool.QueuedProvisioning; + + /** + * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. + * @param message QueuedProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. + * @param message QueuedProvisioning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.QueuedProvisioning; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.QueuedProvisioning; + + /** + * Verifies a QueuedProvisioning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueuedProvisioning + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.QueuedProvisioning; + + /** + * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. + * @param message QueuedProvisioning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePool.QueuedProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueuedProvisioning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueuedProvisioning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodeManagement. */ + interface INodeManagement { + + /** NodeManagement autoUpgrade */ + autoUpgrade?: (boolean|null); + + /** NodeManagement autoRepair */ + autoRepair?: (boolean|null); + + /** NodeManagement upgradeOptions */ + upgradeOptions?: (google.container.v1beta1.IAutoUpgradeOptions|null); + } + + /** Represents a NodeManagement. */ + class NodeManagement implements INodeManagement { + + /** + * Constructs a new NodeManagement. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodeManagement); + + /** NodeManagement autoUpgrade. */ + public autoUpgrade: boolean; + + /** NodeManagement autoRepair. */ + public autoRepair: boolean; + + /** NodeManagement upgradeOptions. */ + public upgradeOptions?: (google.container.v1beta1.IAutoUpgradeOptions|null); + + /** + * Creates a new NodeManagement instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeManagement instance + */ + public static create(properties?: google.container.v1beta1.INodeManagement): google.container.v1beta1.NodeManagement; + + /** + * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. + * @param message NodeManagement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. + * @param message NodeManagement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeManagement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeManagement; + + /** + * Decodes a NodeManagement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeManagement; + + /** + * Verifies a NodeManagement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeManagement + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeManagement; + + /** + * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. + * @param message NodeManagement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodeManagement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeManagement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeManagement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoUpgradeOptions. */ + interface IAutoUpgradeOptions { + + /** AutoUpgradeOptions autoUpgradeStartTime */ + autoUpgradeStartTime?: (string|null); + + /** AutoUpgradeOptions description */ + description?: (string|null); + } + + /** Represents an AutoUpgradeOptions. */ + class AutoUpgradeOptions implements IAutoUpgradeOptions { + + /** + * Constructs a new AutoUpgradeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAutoUpgradeOptions); + + /** AutoUpgradeOptions autoUpgradeStartTime. */ + public autoUpgradeStartTime: string; + + /** AutoUpgradeOptions description. */ + public description: string; + + /** + * Creates a new AutoUpgradeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoUpgradeOptions instance + */ + public static create(properties?: google.container.v1beta1.IAutoUpgradeOptions): google.container.v1beta1.AutoUpgradeOptions; + + /** + * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. + * @param message AutoUpgradeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. + * @param message AutoUpgradeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutoUpgradeOptions; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutoUpgradeOptions; + + /** + * Verifies an AutoUpgradeOptions message. + * @param message Plain 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 AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoUpgradeOptions + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutoUpgradeOptions; + + /** + * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. + * @param message AutoUpgradeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AutoUpgradeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoUpgradeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoUpgradeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenancePolicy. */ + interface IMaintenancePolicy { + + /** MaintenancePolicy window */ + window?: (google.container.v1beta1.IMaintenanceWindow|null); + + /** MaintenancePolicy resourceVersion */ + resourceVersion?: (string|null); + } + + /** Represents a MaintenancePolicy. */ + class MaintenancePolicy implements IMaintenancePolicy { + + /** + * Constructs a new MaintenancePolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMaintenancePolicy); + + /** MaintenancePolicy window. */ + public window?: (google.container.v1beta1.IMaintenanceWindow|null); + + /** MaintenancePolicy resourceVersion. */ + public resourceVersion: string; + + /** + * Creates a new MaintenancePolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenancePolicy instance + */ + public static create(properties?: google.container.v1beta1.IMaintenancePolicy): google.container.v1beta1.MaintenancePolicy; + + /** + * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. + * @param message MaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. + * @param message MaintenancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenancePolicy; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenancePolicy; + + /** + * Verifies a MaintenancePolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenancePolicy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenancePolicy; + + /** + * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. + * @param message MaintenancePolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenancePolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenancePolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow dailyMaintenanceWindow */ + dailyMaintenanceWindow?: (google.container.v1beta1.IDailyMaintenanceWindow|null); + + /** MaintenanceWindow recurringWindow */ + recurringWindow?: (google.container.v1beta1.IRecurringTimeWindow|null); + + /** MaintenanceWindow maintenanceExclusions */ + maintenanceExclusions?: ({ [k: string]: google.container.v1beta1.ITimeWindow }|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMaintenanceWindow); + + /** MaintenanceWindow dailyMaintenanceWindow. */ + public dailyMaintenanceWindow?: (google.container.v1beta1.IDailyMaintenanceWindow|null); + + /** MaintenanceWindow recurringWindow. */ + public recurringWindow?: (google.container.v1beta1.IRecurringTimeWindow|null); + + /** MaintenanceWindow maintenanceExclusions. */ + public maintenanceExclusions: { [k: string]: google.container.v1beta1.ITimeWindow }; + + /** MaintenanceWindow policy. */ + public policy?: ("dailyMaintenanceWindow"|"recurringWindow"); + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.container.v1beta1.IMaintenanceWindow): google.container.v1beta1.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeWindow. */ + interface ITimeWindow { + + /** TimeWindow maintenanceExclusionOptions */ + maintenanceExclusionOptions?: (google.container.v1beta1.IMaintenanceExclusionOptions|null); + + /** TimeWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeWindow. */ + class TimeWindow implements ITimeWindow { + + /** + * Constructs a new TimeWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ITimeWindow); + + /** TimeWindow maintenanceExclusionOptions. */ + public maintenanceExclusionOptions?: (google.container.v1beta1.IMaintenanceExclusionOptions|null); + + /** TimeWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow options. */ + public options?: "maintenanceExclusionOptions"; + + /** + * Creates a new TimeWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeWindow instance + */ + public static create(properties?: google.container.v1beta1.ITimeWindow): google.container.v1beta1.TimeWindow; + + /** + * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.TimeWindow; + + /** + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.TimeWindow; + + /** + * Verifies a TimeWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.TimeWindow; + + /** + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @param message TimeWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceExclusionOptions. */ + interface IMaintenanceExclusionOptions { + + /** MaintenanceExclusionOptions scope */ + scope?: (google.container.v1beta1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1beta1.MaintenanceExclusionOptions.Scope|null); + } + + /** Represents a MaintenanceExclusionOptions. */ + class MaintenanceExclusionOptions implements IMaintenanceExclusionOptions { + + /** + * Constructs a new MaintenanceExclusionOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMaintenanceExclusionOptions); + + /** MaintenanceExclusionOptions scope. */ + public scope: (google.container.v1beta1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1beta1.MaintenanceExclusionOptions.Scope); + + /** + * Creates a new MaintenanceExclusionOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceExclusionOptions instance + */ + public static create(properties?: google.container.v1beta1.IMaintenanceExclusionOptions): google.container.v1beta1.MaintenanceExclusionOptions; + + /** + * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. + * @param message MaintenanceExclusionOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. + * @param message MaintenanceExclusionOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenanceExclusionOptions; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenanceExclusionOptions; + + /** + * Verifies a MaintenanceExclusionOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceExclusionOptions + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenanceExclusionOptions; + + /** + * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. + * @param message MaintenanceExclusionOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MaintenanceExclusionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceExclusionOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceExclusionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MaintenanceExclusionOptions { + + /** Scope enum. */ + enum Scope { + NO_UPGRADES = 0, + NO_MINOR_UPGRADES = 1, + NO_MINOR_OR_NODE_UPGRADES = 2 + } + } + + /** Properties of a RecurringTimeWindow. */ + interface IRecurringTimeWindow { + + /** RecurringTimeWindow window */ + window?: (google.container.v1beta1.ITimeWindow|null); + + /** RecurringTimeWindow recurrence */ + recurrence?: (string|null); + } + + /** Represents a RecurringTimeWindow. */ + class RecurringTimeWindow implements IRecurringTimeWindow { + + /** + * Constructs a new RecurringTimeWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRecurringTimeWindow); + + /** RecurringTimeWindow window. */ + public window?: (google.container.v1beta1.ITimeWindow|null); + + /** RecurringTimeWindow recurrence. */ + public recurrence: string; + + /** + * Creates a new RecurringTimeWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringTimeWindow instance + */ + public static create(properties?: google.container.v1beta1.IRecurringTimeWindow): google.container.v1beta1.RecurringTimeWindow; + + /** + * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. + * @param message RecurringTimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. + * @param message RecurringTimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RecurringTimeWindow; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RecurringTimeWindow; + + /** + * Verifies a RecurringTimeWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringTimeWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RecurringTimeWindow; + + /** + * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. + * @param message RecurringTimeWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RecurringTimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringTimeWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringTimeWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DailyMaintenanceWindow. */ + interface IDailyMaintenanceWindow { + + /** DailyMaintenanceWindow startTime */ + startTime?: (string|null); + + /** DailyMaintenanceWindow duration */ + duration?: (string|null); + } + + /** Represents a DailyMaintenanceWindow. */ + class DailyMaintenanceWindow implements IDailyMaintenanceWindow { + + /** + * Constructs a new DailyMaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDailyMaintenanceWindow); + + /** DailyMaintenanceWindow startTime. */ + public startTime: string; + + /** DailyMaintenanceWindow duration. */ + public duration: string; + + /** + * Creates a new DailyMaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns DailyMaintenanceWindow instance + */ + public static create(properties?: google.container.v1beta1.IDailyMaintenanceWindow): google.container.v1beta1.DailyMaintenanceWindow; + + /** + * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. + * @param message DailyMaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. + * @param message DailyMaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DailyMaintenanceWindow; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DailyMaintenanceWindow; + + /** + * Verifies a DailyMaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DailyMaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DailyMaintenanceWindow; + + /** + * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. + * @param message DailyMaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DailyMaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DailyMaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DailyMaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolManagementRequest. */ + interface ISetNodePoolManagementRequest { + + /** SetNodePoolManagementRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolManagementRequest zone */ + zone?: (string|null); + + /** SetNodePoolManagementRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolManagementRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolManagementRequest management */ + management?: (google.container.v1beta1.INodeManagement|null); + + /** SetNodePoolManagementRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolManagementRequest. */ + class SetNodePoolManagementRequest implements ISetNodePoolManagementRequest { + + /** + * Constructs a new SetNodePoolManagementRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetNodePoolManagementRequest); + + /** SetNodePoolManagementRequest projectId. */ + public projectId: string; + + /** SetNodePoolManagementRequest zone. */ + public zone: string; + + /** SetNodePoolManagementRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolManagementRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolManagementRequest management. */ + public management?: (google.container.v1beta1.INodeManagement|null); + + /** SetNodePoolManagementRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolManagementRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolManagementRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetNodePoolManagementRequest): google.container.v1beta1.SetNodePoolManagementRequest; + + /** + * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. + * @param message SetNodePoolManagementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. + * @param message SetNodePoolManagementRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolManagementRequest; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolManagementRequest; + + /** + * Verifies a SetNodePoolManagementRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolManagementRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolManagementRequest; + + /** + * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. + * @param message SetNodePoolManagementRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetNodePoolManagementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolManagementRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolManagementRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNodePoolSizeRequest. */ + interface ISetNodePoolSizeRequest { + + /** SetNodePoolSizeRequest projectId */ + projectId?: (string|null); + + /** SetNodePoolSizeRequest zone */ + zone?: (string|null); + + /** SetNodePoolSizeRequest clusterId */ + clusterId?: (string|null); + + /** SetNodePoolSizeRequest nodePoolId */ + nodePoolId?: (string|null); + + /** SetNodePoolSizeRequest nodeCount */ + nodeCount?: (number|null); + + /** SetNodePoolSizeRequest name */ + name?: (string|null); + } + + /** Represents a SetNodePoolSizeRequest. */ + class SetNodePoolSizeRequest implements ISetNodePoolSizeRequest { + + /** + * Constructs a new SetNodePoolSizeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetNodePoolSizeRequest); + + /** SetNodePoolSizeRequest projectId. */ + public projectId: string; + + /** SetNodePoolSizeRequest zone. */ + public zone: string; + + /** SetNodePoolSizeRequest clusterId. */ + public clusterId: string; + + /** SetNodePoolSizeRequest nodePoolId. */ + public nodePoolId: string; + + /** SetNodePoolSizeRequest nodeCount. */ + public nodeCount: number; + + /** SetNodePoolSizeRequest name. */ + public name: string; + + /** + * Creates a new SetNodePoolSizeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNodePoolSizeRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetNodePoolSizeRequest): google.container.v1beta1.SetNodePoolSizeRequest; + + /** + * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. + * @param message SetNodePoolSizeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. + * @param message SetNodePoolSizeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolSizeRequest; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolSizeRequest; + + /** + * Verifies a SetNodePoolSizeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNodePoolSizeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolSizeRequest; + + /** + * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. + * @param message SetNodePoolSizeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetNodePoolSizeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNodePoolSizeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNodePoolSizeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompleteNodePoolUpgradeRequest. */ + interface ICompleteNodePoolUpgradeRequest { + + /** CompleteNodePoolUpgradeRequest name */ + name?: (string|null); + } + + /** Represents a CompleteNodePoolUpgradeRequest. */ + class CompleteNodePoolUpgradeRequest implements ICompleteNodePoolUpgradeRequest { + + /** + * Constructs a new CompleteNodePoolUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICompleteNodePoolUpgradeRequest); + + /** CompleteNodePoolUpgradeRequest name. */ + public name: string; + + /** + * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteNodePoolUpgradeRequest instance + */ + public static create(properties?: google.container.v1beta1.ICompleteNodePoolUpgradeRequest): google.container.v1beta1.CompleteNodePoolUpgradeRequest; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @param message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @param message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompleteNodePoolUpgradeRequest; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompleteNodePoolUpgradeRequest; + + /** + * Verifies a CompleteNodePoolUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteNodePoolUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompleteNodePoolUpgradeRequest; + + /** + * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @param message CompleteNodePoolUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CompleteNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompleteNodePoolUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompleteNodePoolUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RollbackNodePoolUpgradeRequest. */ + interface IRollbackNodePoolUpgradeRequest { + + /** RollbackNodePoolUpgradeRequest projectId */ + projectId?: (string|null); + + /** RollbackNodePoolUpgradeRequest zone */ + zone?: (string|null); + + /** RollbackNodePoolUpgradeRequest clusterId */ + clusterId?: (string|null); + + /** RollbackNodePoolUpgradeRequest nodePoolId */ + nodePoolId?: (string|null); + + /** RollbackNodePoolUpgradeRequest name */ + name?: (string|null); + + /** RollbackNodePoolUpgradeRequest respectPdb */ + respectPdb?: (boolean|null); + } + + /** Represents a RollbackNodePoolUpgradeRequest. */ + class RollbackNodePoolUpgradeRequest implements IRollbackNodePoolUpgradeRequest { + + /** + * Constructs a new RollbackNodePoolUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRollbackNodePoolUpgradeRequest); + + /** RollbackNodePoolUpgradeRequest projectId. */ + public projectId: string; + + /** RollbackNodePoolUpgradeRequest zone. */ + public zone: string; + + /** RollbackNodePoolUpgradeRequest clusterId. */ + public clusterId: string; + + /** RollbackNodePoolUpgradeRequest nodePoolId. */ + public nodePoolId: string; + + /** RollbackNodePoolUpgradeRequest name. */ + public name: string; + + /** RollbackNodePoolUpgradeRequest respectPdb. */ + public respectPdb: boolean; + + /** + * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackNodePoolUpgradeRequest instance + */ + public static create(properties?: google.container.v1beta1.IRollbackNodePoolUpgradeRequest): google.container.v1beta1.RollbackNodePoolUpgradeRequest; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @param message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @param message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RollbackNodePoolUpgradeRequest; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RollbackNodePoolUpgradeRequest; + + /** + * Verifies a RollbackNodePoolUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackNodePoolUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RollbackNodePoolUpgradeRequest; + + /** + * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @param message RollbackNodePoolUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RollbackNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackNodePoolUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackNodePoolUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNodePoolsResponse. */ + interface IListNodePoolsResponse { + + /** ListNodePoolsResponse nodePools */ + nodePools?: (google.container.v1beta1.INodePool[]|null); + } + + /** Represents a ListNodePoolsResponse. */ + class ListNodePoolsResponse implements IListNodePoolsResponse { + + /** + * Constructs a new ListNodePoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListNodePoolsResponse); + + /** ListNodePoolsResponse nodePools. */ + public nodePools: google.container.v1beta1.INodePool[]; + + /** + * Creates a new ListNodePoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNodePoolsResponse instance + */ + public static create(properties?: google.container.v1beta1.IListNodePoolsResponse): google.container.v1beta1.ListNodePoolsResponse; + + /** + * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. + * @param message ListNodePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. + * @param message ListNodePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListNodePoolsResponse; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListNodePoolsResponse; + + /** + * Verifies a ListNodePoolsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNodePoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListNodePoolsResponse; + + /** + * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. + * @param message ListNodePoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListNodePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNodePoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNodePoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClusterAutoscaling. */ + interface IClusterAutoscaling { + + /** ClusterAutoscaling enableNodeAutoprovisioning */ + enableNodeAutoprovisioning?: (boolean|null); + + /** ClusterAutoscaling resourceLimits */ + resourceLimits?: (google.container.v1beta1.IResourceLimit[]|null); + + /** ClusterAutoscaling autoscalingProfile */ + autoscalingProfile?: (google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|null); + + /** ClusterAutoscaling autoprovisioningNodePoolDefaults */ + autoprovisioningNodePoolDefaults?: (google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null); + + /** ClusterAutoscaling autoprovisioningLocations */ + autoprovisioningLocations?: (string[]|null); + } + + /** Represents a ClusterAutoscaling. */ + class ClusterAutoscaling implements IClusterAutoscaling { + + /** + * Constructs a new ClusterAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IClusterAutoscaling); + + /** ClusterAutoscaling enableNodeAutoprovisioning. */ + public enableNodeAutoprovisioning: boolean; + + /** ClusterAutoscaling resourceLimits. */ + public resourceLimits: google.container.v1beta1.IResourceLimit[]; + + /** ClusterAutoscaling autoscalingProfile. */ + public autoscalingProfile: (google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile); + + /** ClusterAutoscaling autoprovisioningNodePoolDefaults. */ + public autoprovisioningNodePoolDefaults?: (google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null); + + /** ClusterAutoscaling autoprovisioningLocations. */ + public autoprovisioningLocations: string[]; + + /** + * Creates a new ClusterAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterAutoscaling instance + */ + public static create(properties?: google.container.v1beta1.IClusterAutoscaling): google.container.v1beta1.ClusterAutoscaling; + + /** + * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. + * @param message ClusterAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. + * @param message ClusterAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterAutoscaling; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterAutoscaling; + + /** + * Verifies a ClusterAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterAutoscaling; + + /** + * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. + * @param message ClusterAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ClusterAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterAutoscaling { + + /** AutoscalingProfile enum. */ + enum AutoscalingProfile { + PROFILE_UNSPECIFIED = 0, + OPTIMIZE_UTILIZATION = 1, + BALANCED = 2 + } + } + + /** Properties of an AutoprovisioningNodePoolDefaults. */ + interface IAutoprovisioningNodePoolDefaults { + + /** AutoprovisioningNodePoolDefaults oauthScopes */ + oauthScopes?: (string[]|null); + + /** AutoprovisioningNodePoolDefaults serviceAccount */ + serviceAccount?: (string|null); + + /** AutoprovisioningNodePoolDefaults upgradeSettings */ + upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** AutoprovisioningNodePoolDefaults management */ + management?: (google.container.v1beta1.INodeManagement|null); + + /** AutoprovisioningNodePoolDefaults minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** AutoprovisioningNodePoolDefaults diskSizeGb */ + diskSizeGb?: (number|null); + + /** AutoprovisioningNodePoolDefaults diskType */ + diskType?: (string|null); + + /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig */ + shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); + + /** AutoprovisioningNodePoolDefaults bootDiskKmsKey */ + bootDiskKmsKey?: (string|null); + + /** AutoprovisioningNodePoolDefaults imageType */ + imageType?: (string|null); + + /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled */ + insecureKubeletReadonlyPortEnabled?: (boolean|null); + } + + /** Represents an AutoprovisioningNodePoolDefaults. */ + class AutoprovisioningNodePoolDefaults implements IAutoprovisioningNodePoolDefaults { + + /** + * Constructs a new AutoprovisioningNodePoolDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAutoprovisioningNodePoolDefaults); + + /** AutoprovisioningNodePoolDefaults oauthScopes. */ + public oauthScopes: string[]; + + /** AutoprovisioningNodePoolDefaults serviceAccount. */ + public serviceAccount: string; + + /** AutoprovisioningNodePoolDefaults upgradeSettings. */ + public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); + + /** AutoprovisioningNodePoolDefaults management. */ + public management?: (google.container.v1beta1.INodeManagement|null); + + /** AutoprovisioningNodePoolDefaults minCpuPlatform. */ + public minCpuPlatform: string; + + /** AutoprovisioningNodePoolDefaults diskSizeGb. */ + public diskSizeGb: number; + + /** AutoprovisioningNodePoolDefaults diskType. */ + public diskType: string; + + /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig. */ + public shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); + + /** AutoprovisioningNodePoolDefaults bootDiskKmsKey. */ + public bootDiskKmsKey: string; + + /** AutoprovisioningNodePoolDefaults imageType. */ + public imageType: string; + + /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. */ + public insecureKubeletReadonlyPortEnabled?: (boolean|null); + + /** AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. */ + public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; + + /** + * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoprovisioningNodePoolDefaults instance + */ + public static create(properties?: google.container.v1beta1.IAutoprovisioningNodePoolDefaults): google.container.v1beta1.AutoprovisioningNodePoolDefaults; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @param message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @param message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutoprovisioningNodePoolDefaults; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutoprovisioningNodePoolDefaults; + + /** + * Verifies an AutoprovisioningNodePoolDefaults message. + * @param message Plain 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 AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoprovisioningNodePoolDefaults + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutoprovisioningNodePoolDefaults; + + /** + * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. + * @param message AutoprovisioningNodePoolDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AutoprovisioningNodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoprovisioningNodePoolDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoprovisioningNodePoolDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceLimit. */ + interface IResourceLimit { + + /** ResourceLimit resourceType */ + resourceType?: (string|null); + + /** ResourceLimit minimum */ + minimum?: (number|Long|string|null); + + /** ResourceLimit maximum */ + maximum?: (number|Long|string|null); + } + + /** Represents a ResourceLimit. */ + class ResourceLimit implements IResourceLimit { + + /** + * Constructs a new ResourceLimit. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IResourceLimit); + + /** ResourceLimit resourceType. */ + public resourceType: string; + + /** ResourceLimit minimum. */ + public minimum: (number|Long|string); + + /** ResourceLimit maximum. */ + public maximum: (number|Long|string); + + /** + * Creates a new ResourceLimit instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceLimit instance + */ + public static create(properties?: google.container.v1beta1.IResourceLimit): google.container.v1beta1.ResourceLimit; + + /** + * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. + * @param message ResourceLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. + * @param message ResourceLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceLimit; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceLimit; + + /** + * Verifies a ResourceLimit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceLimit + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceLimit; + + /** + * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. + * @param message ResourceLimit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceLimit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceLimit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolAutoscaling. */ + interface INodePoolAutoscaling { + + /** NodePoolAutoscaling enabled */ + enabled?: (boolean|null); + + /** NodePoolAutoscaling minNodeCount */ + minNodeCount?: (number|null); + + /** NodePoolAutoscaling maxNodeCount */ + maxNodeCount?: (number|null); + + /** NodePoolAutoscaling autoprovisioned */ + autoprovisioned?: (boolean|null); + + /** NodePoolAutoscaling locationPolicy */ + locationPolicy?: (google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|null); + + /** NodePoolAutoscaling totalMinNodeCount */ + totalMinNodeCount?: (number|null); + + /** NodePoolAutoscaling totalMaxNodeCount */ + totalMaxNodeCount?: (number|null); + } + + /** Represents a NodePoolAutoscaling. */ + class NodePoolAutoscaling implements INodePoolAutoscaling { + + /** + * Constructs a new NodePoolAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodePoolAutoscaling); + + /** NodePoolAutoscaling enabled. */ + public enabled: boolean; + + /** NodePoolAutoscaling minNodeCount. */ + public minNodeCount: number; + + /** NodePoolAutoscaling maxNodeCount. */ + public maxNodeCount: number; + + /** NodePoolAutoscaling autoprovisioned. */ + public autoprovisioned: boolean; + + /** NodePoolAutoscaling locationPolicy. */ + public locationPolicy: (google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1beta1.NodePoolAutoscaling.LocationPolicy); + + /** NodePoolAutoscaling totalMinNodeCount. */ + public totalMinNodeCount: number; + + /** NodePoolAutoscaling totalMaxNodeCount. */ + public totalMaxNodeCount: number; + + /** + * Creates a new NodePoolAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolAutoscaling instance + */ + public static create(properties?: google.container.v1beta1.INodePoolAutoscaling): google.container.v1beta1.NodePoolAutoscaling; + + /** + * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. + * @param message NodePoolAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. + * @param message NodePoolAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolAutoscaling; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolAutoscaling; + + /** + * Verifies a NodePoolAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolAutoscaling; + + /** + * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. + * @param message NodePoolAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodePoolAutoscaling { + + /** LocationPolicy enum. */ + enum LocationPolicy { + LOCATION_POLICY_UNSPECIFIED = 0, + BALANCED = 1, + ANY = 2 + } + } + + /** Properties of a SetLabelsRequest. */ + interface ISetLabelsRequest { + + /** SetLabelsRequest projectId */ + projectId?: (string|null); + + /** SetLabelsRequest zone */ + zone?: (string|null); + + /** SetLabelsRequest clusterId */ + clusterId?: (string|null); + + /** SetLabelsRequest resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** SetLabelsRequest labelFingerprint */ + labelFingerprint?: (string|null); + + /** SetLabelsRequest name */ + name?: (string|null); + } + + /** Represents a SetLabelsRequest. */ + class SetLabelsRequest implements ISetLabelsRequest { + + /** + * Constructs a new SetLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetLabelsRequest); + + /** SetLabelsRequest projectId. */ + public projectId: string; + + /** SetLabelsRequest zone. */ + public zone: string; + + /** SetLabelsRequest clusterId. */ + public clusterId: string; + + /** SetLabelsRequest resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** SetLabelsRequest labelFingerprint. */ + public labelFingerprint: string; + + /** SetLabelsRequest name. */ + public name: string; + + /** + * Creates a new SetLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLabelsRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetLabelsRequest): google.container.v1beta1.SetLabelsRequest; + + /** + * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. + * @param message SetLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. + * @param message SetLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLabelsRequest; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLabelsRequest; + + /** + * Verifies a SetLabelsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLabelsRequest; + + /** + * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. + * @param message SetLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetLegacyAbacRequest. */ + interface ISetLegacyAbacRequest { + + /** SetLegacyAbacRequest projectId */ + projectId?: (string|null); + + /** SetLegacyAbacRequest zone */ + zone?: (string|null); + + /** SetLegacyAbacRequest clusterId */ + clusterId?: (string|null); + + /** SetLegacyAbacRequest enabled */ + enabled?: (boolean|null); + + /** SetLegacyAbacRequest name */ + name?: (string|null); + } + + /** Represents a SetLegacyAbacRequest. */ + class SetLegacyAbacRequest implements ISetLegacyAbacRequest { + + /** + * Constructs a new SetLegacyAbacRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetLegacyAbacRequest); + + /** SetLegacyAbacRequest projectId. */ + public projectId: string; + + /** SetLegacyAbacRequest zone. */ + public zone: string; + + /** SetLegacyAbacRequest clusterId. */ + public clusterId: string; + + /** SetLegacyAbacRequest enabled. */ + public enabled: boolean; + + /** SetLegacyAbacRequest name. */ + public name: string; + + /** + * Creates a new SetLegacyAbacRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetLegacyAbacRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetLegacyAbacRequest): google.container.v1beta1.SetLegacyAbacRequest; + + /** + * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. + * @param message SetLegacyAbacRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. + * @param message SetLegacyAbacRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLegacyAbacRequest; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLegacyAbacRequest; + + /** + * Verifies a SetLegacyAbacRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetLegacyAbacRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLegacyAbacRequest; + + /** + * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. + * @param message SetLegacyAbacRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetLegacyAbacRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetLegacyAbacRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetLegacyAbacRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartIPRotationRequest. */ + interface IStartIPRotationRequest { + + /** StartIPRotationRequest projectId */ + projectId?: (string|null); + + /** StartIPRotationRequest zone */ + zone?: (string|null); + + /** StartIPRotationRequest clusterId */ + clusterId?: (string|null); + + /** StartIPRotationRequest name */ + name?: (string|null); + + /** StartIPRotationRequest rotateCredentials */ + rotateCredentials?: (boolean|null); + } + + /** Represents a StartIPRotationRequest. */ + class StartIPRotationRequest implements IStartIPRotationRequest { + + /** + * Constructs a new StartIPRotationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IStartIPRotationRequest); + + /** StartIPRotationRequest projectId. */ + public projectId: string; + + /** StartIPRotationRequest zone. */ + public zone: string; + + /** StartIPRotationRequest clusterId. */ + public clusterId: string; + + /** StartIPRotationRequest name. */ + public name: string; + + /** StartIPRotationRequest rotateCredentials. */ + public rotateCredentials: boolean; + + /** + * Creates a new StartIPRotationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartIPRotationRequest instance + */ + public static create(properties?: google.container.v1beta1.IStartIPRotationRequest): google.container.v1beta1.StartIPRotationRequest; + + /** + * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. + * @param message StartIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. + * @param message StartIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StartIPRotationRequest; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StartIPRotationRequest; + + /** + * Verifies a StartIPRotationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartIPRotationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StartIPRotationRequest; + + /** + * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. + * @param message StartIPRotationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.StartIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartIPRotationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartIPRotationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompleteIPRotationRequest. */ + interface ICompleteIPRotationRequest { + + /** CompleteIPRotationRequest projectId */ + projectId?: (string|null); + + /** CompleteIPRotationRequest zone */ + zone?: (string|null); + + /** CompleteIPRotationRequest clusterId */ + clusterId?: (string|null); + + /** CompleteIPRotationRequest name */ + name?: (string|null); + } + + /** Represents a CompleteIPRotationRequest. */ + class CompleteIPRotationRequest implements ICompleteIPRotationRequest { + + /** + * Constructs a new CompleteIPRotationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICompleteIPRotationRequest); + + /** CompleteIPRotationRequest projectId. */ + public projectId: string; + + /** CompleteIPRotationRequest zone. */ + public zone: string; + + /** CompleteIPRotationRequest clusterId. */ + public clusterId: string; + + /** CompleteIPRotationRequest name. */ + public name: string; + + /** + * Creates a new CompleteIPRotationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteIPRotationRequest instance + */ + public static create(properties?: google.container.v1beta1.ICompleteIPRotationRequest): google.container.v1beta1.CompleteIPRotationRequest; + + /** + * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. + * @param message CompleteIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. + * @param message CompleteIPRotationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompleteIPRotationRequest; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompleteIPRotationRequest; + + /** + * Verifies a CompleteIPRotationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteIPRotationRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompleteIPRotationRequest; + + /** + * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. + * @param message CompleteIPRotationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CompleteIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompleteIPRotationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompleteIPRotationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|Long|string|null); + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig gpuPartitionSize */ + gpuPartitionSize?: (string|null); + + /** AcceleratorConfig maxTimeSharedClientsPerGpu */ + maxTimeSharedClientsPerGpu?: (number|Long|string|null); + + /** AcceleratorConfig gpuSharingConfig */ + gpuSharingConfig?: (google.container.v1beta1.IGPUSharingConfig|null); + + /** AcceleratorConfig gpuDriverInstallationConfig */ + gpuDriverInstallationConfig?: (google.container.v1beta1.IGPUDriverInstallationConfig|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount: (number|Long|string); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType: string; + + /** AcceleratorConfig gpuPartitionSize. */ + public gpuPartitionSize: string; + + /** AcceleratorConfig maxTimeSharedClientsPerGpu. */ + public maxTimeSharedClientsPerGpu: (number|Long|string); + + /** AcceleratorConfig gpuSharingConfig. */ + public gpuSharingConfig?: (google.container.v1beta1.IGPUSharingConfig|null); + + /** AcceleratorConfig gpuDriverInstallationConfig. */ + public gpuDriverInstallationConfig?: (google.container.v1beta1.IGPUDriverInstallationConfig|null); + + /** AcceleratorConfig _gpuSharingConfig. */ + public _gpuSharingConfig?: "gpuSharingConfig"; + + /** AcceleratorConfig _gpuDriverInstallationConfig. */ + public _gpuDriverInstallationConfig?: "gpuDriverInstallationConfig"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.container.v1beta1.IAcceleratorConfig): google.container.v1beta1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GPUSharingConfig. */ + interface IGPUSharingConfig { + + /** GPUSharingConfig maxSharedClientsPerGpu */ + maxSharedClientsPerGpu?: (number|Long|string|null); + + /** GPUSharingConfig gpuSharingStrategy */ + gpuSharingStrategy?: (google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null); + } + + /** Represents a GPUSharingConfig. */ + class GPUSharingConfig implements IGPUSharingConfig { + + /** + * Constructs a new GPUSharingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGPUSharingConfig); + + /** GPUSharingConfig maxSharedClientsPerGpu. */ + public maxSharedClientsPerGpu: (number|Long|string); + + /** GPUSharingConfig gpuSharingStrategy. */ + public gpuSharingStrategy?: (google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null); + + /** GPUSharingConfig _gpuSharingStrategy. */ + public _gpuSharingStrategy?: "gpuSharingStrategy"; + + /** + * Creates a new GPUSharingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GPUSharingConfig instance + */ + public static create(properties?: google.container.v1beta1.IGPUSharingConfig): google.container.v1beta1.GPUSharingConfig; + + /** + * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. + * @param message GPUSharingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. + * @param message GPUSharingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GPUSharingConfig; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GPUSharingConfig; + + /** + * Verifies a GPUSharingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GPUSharingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GPUSharingConfig; + + /** + * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. + * @param message GPUSharingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GPUSharingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GPUSharingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GPUSharingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GPUSharingConfig { + + /** GPUSharingStrategy enum. */ + enum GPUSharingStrategy { + GPU_SHARING_STRATEGY_UNSPECIFIED = 0, + TIME_SHARING = 1, + MPS = 2 + } + } + + /** Properties of a GPUDriverInstallationConfig. */ + interface IGPUDriverInstallationConfig { + + /** GPUDriverInstallationConfig gpuDriverVersion */ + gpuDriverVersion?: (google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null); + } + + /** Represents a GPUDriverInstallationConfig. */ + class GPUDriverInstallationConfig implements IGPUDriverInstallationConfig { + + /** + * Constructs a new GPUDriverInstallationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGPUDriverInstallationConfig); + + /** GPUDriverInstallationConfig gpuDriverVersion. */ + public gpuDriverVersion?: (google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null); + + /** GPUDriverInstallationConfig _gpuDriverVersion. */ + public _gpuDriverVersion?: "gpuDriverVersion"; + + /** + * Creates a new GPUDriverInstallationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GPUDriverInstallationConfig instance + */ + public static create(properties?: google.container.v1beta1.IGPUDriverInstallationConfig): google.container.v1beta1.GPUDriverInstallationConfig; + + /** + * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. + * @param message GPUDriverInstallationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. + * @param message GPUDriverInstallationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GPUDriverInstallationConfig; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GPUDriverInstallationConfig; + + /** + * Verifies a GPUDriverInstallationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GPUDriverInstallationConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GPUDriverInstallationConfig; + + /** + * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. + * @param message GPUDriverInstallationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GPUDriverInstallationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GPUDriverInstallationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GPUDriverInstallationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GPUDriverInstallationConfig { + + /** GPUDriverVersion enum. */ + enum GPUDriverVersion { + GPU_DRIVER_VERSION_UNSPECIFIED = 0, + INSTALLATION_DISABLED = 1, + DEFAULT = 2, + LATEST = 3 + } + } + + /** 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.container.v1beta1.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.container.v1beta1.IManagedPrometheusConfig): google.container.v1beta1.ManagedPrometheusConfig; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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; + } + + /** Properties of a WorkloadMetadataConfig. */ + interface IWorkloadMetadataConfig { + + /** WorkloadMetadataConfig nodeMetadata */ + nodeMetadata?: (google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|null); + + /** WorkloadMetadataConfig mode */ + mode?: (google.container.v1beta1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.Mode|null); + } + + /** Represents a WorkloadMetadataConfig. */ + class WorkloadMetadataConfig implements IWorkloadMetadataConfig { + + /** + * Constructs a new WorkloadMetadataConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadMetadataConfig); + + /** WorkloadMetadataConfig nodeMetadata. */ + public nodeMetadata: (google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata); + + /** WorkloadMetadataConfig mode. */ + public mode: (google.container.v1beta1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.Mode); + + /** + * Creates a new WorkloadMetadataConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadMetadataConfig instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadMetadataConfig): google.container.v1beta1.WorkloadMetadataConfig; + + /** + * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. + * @param message WorkloadMetadataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. + * @param message WorkloadMetadataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadMetadataConfig; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadMetadataConfig; + + /** + * Verifies a WorkloadMetadataConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadMetadataConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadMetadataConfig; + + /** + * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. + * @param message WorkloadMetadataConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WorkloadMetadataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadMetadataConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadMetadataConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkloadMetadataConfig { + + /** NodeMetadata enum. */ + enum NodeMetadata { + UNSPECIFIED = 0, + SECURE = 1, + EXPOSE = 2, + GKE_METADATA_SERVER = 3 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + GCE_METADATA = 1, + GKE_METADATA = 2 + } + } + + /** Properties of a SetNetworkPolicyRequest. */ + interface ISetNetworkPolicyRequest { + + /** SetNetworkPolicyRequest projectId */ + projectId?: (string|null); + + /** SetNetworkPolicyRequest zone */ + zone?: (string|null); + + /** SetNetworkPolicyRequest clusterId */ + clusterId?: (string|null); + + /** SetNetworkPolicyRequest networkPolicy */ + networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); + + /** SetNetworkPolicyRequest name */ + name?: (string|null); + } + + /** Represents a SetNetworkPolicyRequest. */ + class SetNetworkPolicyRequest implements ISetNetworkPolicyRequest { + + /** + * Constructs a new SetNetworkPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetNetworkPolicyRequest); + + /** SetNetworkPolicyRequest projectId. */ + public projectId: string; + + /** SetNetworkPolicyRequest zone. */ + public zone: string; + + /** SetNetworkPolicyRequest clusterId. */ + public clusterId: string; + + /** SetNetworkPolicyRequest networkPolicy. */ + public networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); + + /** SetNetworkPolicyRequest name. */ + public name: string; + + /** + * Creates a new SetNetworkPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNetworkPolicyRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetNetworkPolicyRequest): google.container.v1beta1.SetNetworkPolicyRequest; + + /** + * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. + * @param message SetNetworkPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. + * @param message SetNetworkPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNetworkPolicyRequest; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNetworkPolicyRequest; + + /** + * Verifies a SetNetworkPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNetworkPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNetworkPolicyRequest; + + /** + * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. + * @param message SetNetworkPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetNetworkPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNetworkPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNetworkPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetMaintenancePolicyRequest. */ + interface ISetMaintenancePolicyRequest { + + /** SetMaintenancePolicyRequest projectId */ + projectId?: (string|null); + + /** SetMaintenancePolicyRequest zone */ + zone?: (string|null); + + /** SetMaintenancePolicyRequest clusterId */ + clusterId?: (string|null); + + /** SetMaintenancePolicyRequest maintenancePolicy */ + maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); + + /** SetMaintenancePolicyRequest name */ + name?: (string|null); + } + + /** Represents a SetMaintenancePolicyRequest. */ + class SetMaintenancePolicyRequest implements ISetMaintenancePolicyRequest { + + /** + * Constructs a new SetMaintenancePolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISetMaintenancePolicyRequest); + + /** SetMaintenancePolicyRequest projectId. */ + public projectId: string; + + /** SetMaintenancePolicyRequest zone. */ + public zone: string; + + /** SetMaintenancePolicyRequest clusterId. */ + public clusterId: string; + + /** SetMaintenancePolicyRequest maintenancePolicy. */ + public maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); + + /** SetMaintenancePolicyRequest name. */ + public name: string; + + /** + * Creates a new SetMaintenancePolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetMaintenancePolicyRequest instance + */ + public static create(properties?: google.container.v1beta1.ISetMaintenancePolicyRequest): google.container.v1beta1.SetMaintenancePolicyRequest; + + /** + * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. + * @param message SetMaintenancePolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. + * @param message SetMaintenancePolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMaintenancePolicyRequest; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMaintenancePolicyRequest; + + /** + * Verifies a SetMaintenancePolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetMaintenancePolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMaintenancePolicyRequest; + + /** + * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. + * @param message SetMaintenancePolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SetMaintenancePolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetMaintenancePolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetMaintenancePolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLocationsRequest. */ + interface IListLocationsRequest { + + /** ListLocationsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListLocationsRequest. */ + class ListLocationsRequest implements IListLocationsRequest { + + /** + * Constructs a new ListLocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListLocationsRequest); + + /** ListLocationsRequest parent. */ + public parent: string; + + /** + * Creates a new ListLocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLocationsRequest instance + */ + public static create(properties?: google.container.v1beta1.IListLocationsRequest): google.container.v1beta1.ListLocationsRequest; + + /** + * Encodes the specified ListLocationsRequest message. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. + * @param message ListLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. + * @param message ListLocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListLocationsRequest; + + /** + * Decodes a ListLocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListLocationsRequest; + + /** + * Verifies a ListLocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListLocationsRequest; + + /** + * Creates a plain object from a ListLocationsRequest message. Also converts values to other types if specified. + * @param message ListLocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLocationsResponse. */ + interface IListLocationsResponse { + + /** ListLocationsResponse locations */ + locations?: (google.container.v1beta1.ILocation[]|null); + + /** ListLocationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLocationsResponse. */ + class ListLocationsResponse implements IListLocationsResponse { + + /** + * Constructs a new ListLocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListLocationsResponse); + + /** ListLocationsResponse locations. */ + public locations: google.container.v1beta1.ILocation[]; + + /** ListLocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLocationsResponse instance + */ + public static create(properties?: google.container.v1beta1.IListLocationsResponse): google.container.v1beta1.ListLocationsResponse; + + /** + * Encodes the specified ListLocationsResponse message. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. + * @param message ListLocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListLocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLocationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. + * @param message ListLocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListLocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListLocationsResponse; + + /** + * Decodes a ListLocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListLocationsResponse; + + /** + * Verifies a ListLocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListLocationsResponse; + + /** + * Creates a plain object from a ListLocationsResponse message. Also converts values to other types if specified. + * @param message ListLocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListLocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLocationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Location. */ + interface ILocation { + + /** Location type */ + type?: (google.container.v1beta1.Location.LocationType|keyof typeof google.container.v1beta1.Location.LocationType|null); + + /** Location name */ + name?: (string|null); + + /** Location recommended */ + recommended?: (boolean|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILocation); + + /** Location type. */ + public type: (google.container.v1beta1.Location.LocationType|keyof typeof google.container.v1beta1.Location.LocationType); + + /** Location name. */ + public name: string; + + /** Location recommended. */ + public recommended: boolean; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.container.v1beta1.ILocation): google.container.v1beta1.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Location { + + /** LocationType enum. */ + enum LocationType { + LOCATION_TYPE_UNSPECIFIED = 0, + ZONE = 1, + REGION = 2 + } + } + + /** Properties of a StatusCondition. */ + interface IStatusCondition { + + /** StatusCondition code */ + code?: (google.container.v1beta1.StatusCondition.Code|keyof typeof google.container.v1beta1.StatusCondition.Code|null); + + /** StatusCondition message */ + message?: (string|null); + + /** StatusCondition canonicalCode */ + canonicalCode?: (google.rpc.Code|keyof typeof google.rpc.Code|null); + } + + /** Represents a StatusCondition. */ + class StatusCondition implements IStatusCondition { + + /** + * Constructs a new StatusCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IStatusCondition); + + /** StatusCondition code. */ + public code: (google.container.v1beta1.StatusCondition.Code|keyof typeof google.container.v1beta1.StatusCondition.Code); + + /** StatusCondition message. */ + public message: string; + + /** StatusCondition canonicalCode. */ + public canonicalCode: (google.rpc.Code|keyof typeof google.rpc.Code); + + /** + * Creates a new StatusCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusCondition instance + */ + public static create(properties?: google.container.v1beta1.IStatusCondition): google.container.v1beta1.StatusCondition; + + /** + * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. + * @param message StatusCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. + * @param message StatusCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StatusCondition; + + /** + * Decodes a StatusCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StatusCondition; + + /** + * Verifies a StatusCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusCondition + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StatusCondition; + + /** + * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. + * @param message StatusCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.StatusCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatusCondition { + + /** Code enum. */ + enum Code { + UNKNOWN = 0, + GCE_STOCKOUT = 1, + GKE_SERVICE_ACCOUNT_DELETED = 2, + GCE_QUOTA_EXCEEDED = 3, + SET_BY_OPERATOR = 4, + CLOUD_KMS_KEY_ERROR = 7, + CA_EXPIRING = 9 + } + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig network */ + network?: (string|null); + + /** NetworkConfig subnetwork */ + subnetwork?: (string|null); + + /** NetworkConfig enableIntraNodeVisibility */ + enableIntraNodeVisibility?: (boolean|null); + + /** NetworkConfig defaultSnatStatus */ + defaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); + + /** NetworkConfig enableL4ilbSubsetting */ + enableL4ilbSubsetting?: (boolean|null); + + /** NetworkConfig datapathProvider */ + datapathProvider?: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider|null); + + /** NetworkConfig privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess|null); + + /** NetworkConfig dnsConfig */ + dnsConfig?: (google.container.v1beta1.IDNSConfig|null); + + /** NetworkConfig serviceExternalIpsConfig */ + serviceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); + + /** NetworkConfig gatewayApiConfig */ + gatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); + + /** NetworkConfig enableMultiNetworking */ + enableMultiNetworking?: (boolean|null); + + /** NetworkConfig networkPerformanceConfig */ + networkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** NetworkConfig enableFqdnNetworkPolicy */ + enableFqdnNetworkPolicy?: (boolean|null); + + /** NetworkConfig inTransitEncryptionConfig */ + inTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); + + /** NetworkConfig enableCiliumClusterwideNetworkPolicy */ + enableCiliumClusterwideNetworkPolicy?: (boolean|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INetworkConfig); + + /** NetworkConfig network. */ + public network: string; + + /** NetworkConfig subnetwork. */ + public subnetwork: string; + + /** NetworkConfig enableIntraNodeVisibility. */ + public enableIntraNodeVisibility: boolean; + + /** NetworkConfig defaultSnatStatus. */ + public defaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); + + /** NetworkConfig enableL4ilbSubsetting. */ + public enableL4ilbSubsetting: boolean; + + /** NetworkConfig datapathProvider. */ + public datapathProvider: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider); + + /** NetworkConfig privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess); + + /** NetworkConfig dnsConfig. */ + public dnsConfig?: (google.container.v1beta1.IDNSConfig|null); + + /** NetworkConfig serviceExternalIpsConfig. */ + public serviceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); + + /** NetworkConfig gatewayApiConfig. */ + public gatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); + + /** NetworkConfig enableMultiNetworking. */ + public enableMultiNetworking: boolean; + + /** NetworkConfig networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); + + /** NetworkConfig enableFqdnNetworkPolicy. */ + public enableFqdnNetworkPolicy?: (boolean|null); + + /** NetworkConfig inTransitEncryptionConfig. */ + public inTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); + + /** NetworkConfig enableCiliumClusterwideNetworkPolicy. */ + public enableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** NetworkConfig _enableFqdnNetworkPolicy. */ + public _enableFqdnNetworkPolicy?: "enableFqdnNetworkPolicy"; + + /** NetworkConfig _inTransitEncryptionConfig. */ + public _inTransitEncryptionConfig?: "inTransitEncryptionConfig"; + + /** NetworkConfig _enableCiliumClusterwideNetworkPolicy. */ + public _enableCiliumClusterwideNetworkPolicy?: "enableCiliumClusterwideNetworkPolicy"; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.container.v1beta1.INetworkConfig): google.container.v1beta1.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** Properties of a ClusterNetworkPerformanceConfig. */ + interface IClusterNetworkPerformanceConfig { + + /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); + } + + /** Represents a ClusterNetworkPerformanceConfig. */ + class ClusterNetworkPerformanceConfig implements IClusterNetworkPerformanceConfig { + + /** + * Constructs a new ClusterNetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig); + + /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); + + /** ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterNetworkPerformanceConfig instance + */ + public static create(properties?: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @param message ClusterNetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @param message ClusterNetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Verifies a ClusterNetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterNetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; + + /** + * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message ClusterNetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterNetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterNetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterNetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + TIER_1 = 1 + } + } + } + + /** Properties of a GatewayAPIConfig. */ + interface IGatewayAPIConfig { + + /** GatewayAPIConfig channel */ + channel?: (google.container.v1beta1.GatewayAPIConfig.Channel|keyof typeof google.container.v1beta1.GatewayAPIConfig.Channel|null); + } + + /** Represents a GatewayAPIConfig. */ + class GatewayAPIConfig implements IGatewayAPIConfig { + + /** + * Constructs a new GatewayAPIConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGatewayAPIConfig); + + /** GatewayAPIConfig channel. */ + public channel: (google.container.v1beta1.GatewayAPIConfig.Channel|keyof typeof google.container.v1beta1.GatewayAPIConfig.Channel); + + /** + * Creates a new GatewayAPIConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GatewayAPIConfig instance + */ + public static create(properties?: google.container.v1beta1.IGatewayAPIConfig): google.container.v1beta1.GatewayAPIConfig; + + /** + * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. + * @param message GatewayAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. + * @param message GatewayAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GatewayAPIConfig; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GatewayAPIConfig; + + /** + * Verifies a GatewayAPIConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatewayAPIConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GatewayAPIConfig; + + /** + * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. + * @param message GatewayAPIConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GatewayAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GatewayAPIConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GatewayAPIConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GatewayAPIConfig { + + /** Channel enum. */ + enum Channel { + CHANNEL_UNSPECIFIED = 0, + CHANNEL_DISABLED = 1, + CHANNEL_EXPERIMENTAL = 3, + CHANNEL_STANDARD = 4 + } + } + + /** Properties of a ServiceExternalIPsConfig. */ + interface IServiceExternalIPsConfig { + + /** ServiceExternalIPsConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ServiceExternalIPsConfig. */ + class ServiceExternalIPsConfig implements IServiceExternalIPsConfig { + + /** + * Constructs a new ServiceExternalIPsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IServiceExternalIPsConfig); + + /** ServiceExternalIPsConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ServiceExternalIPsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceExternalIPsConfig instance + */ + public static create(properties?: google.container.v1beta1.IServiceExternalIPsConfig): google.container.v1beta1.ServiceExternalIPsConfig; + + /** + * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. + * @param message ServiceExternalIPsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. + * @param message ServiceExternalIPsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServiceExternalIPsConfig; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServiceExternalIPsConfig; + + /** + * Verifies a ServiceExternalIPsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceExternalIPsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServiceExternalIPsConfig; + + /** + * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. + * @param message ServiceExternalIPsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ServiceExternalIPsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceExternalIPsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceExternalIPsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUsableSubnetworksRequest. */ + interface IListUsableSubnetworksRequest { + + /** ListUsableSubnetworksRequest parent */ + parent?: (string|null); + + /** ListUsableSubnetworksRequest filter */ + filter?: (string|null); + + /** ListUsableSubnetworksRequest pageSize */ + pageSize?: (number|null); + + /** ListUsableSubnetworksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUsableSubnetworksRequest. */ + class ListUsableSubnetworksRequest implements IListUsableSubnetworksRequest { + + /** + * Constructs a new ListUsableSubnetworksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListUsableSubnetworksRequest); + + /** ListUsableSubnetworksRequest parent. */ + public parent: string; + + /** ListUsableSubnetworksRequest filter. */ + public filter: string; + + /** ListUsableSubnetworksRequest pageSize. */ + public pageSize: number; + + /** ListUsableSubnetworksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUsableSubnetworksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUsableSubnetworksRequest instance + */ + public static create(properties?: google.container.v1beta1.IListUsableSubnetworksRequest): google.container.v1beta1.ListUsableSubnetworksRequest; + + /** + * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. + * @param message ListUsableSubnetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. + * @param message ListUsableSubnetworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListUsableSubnetworksRequest; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListUsableSubnetworksRequest; + + /** + * Verifies a ListUsableSubnetworksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUsableSubnetworksRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListUsableSubnetworksRequest; + + /** + * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. + * @param message ListUsableSubnetworksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListUsableSubnetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUsableSubnetworksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUsableSubnetworksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUsableSubnetworksResponse. */ + interface IListUsableSubnetworksResponse { + + /** ListUsableSubnetworksResponse subnetworks */ + subnetworks?: (google.container.v1beta1.IUsableSubnetwork[]|null); + + /** ListUsableSubnetworksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUsableSubnetworksResponse. */ + class ListUsableSubnetworksResponse implements IListUsableSubnetworksResponse { + + /** + * Constructs a new ListUsableSubnetworksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IListUsableSubnetworksResponse); + + /** ListUsableSubnetworksResponse subnetworks. */ + public subnetworks: google.container.v1beta1.IUsableSubnetwork[]; + + /** ListUsableSubnetworksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUsableSubnetworksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUsableSubnetworksResponse instance + */ + public static create(properties?: google.container.v1beta1.IListUsableSubnetworksResponse): google.container.v1beta1.ListUsableSubnetworksResponse; + + /** + * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. + * @param message ListUsableSubnetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. + * @param message ListUsableSubnetworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListUsableSubnetworksResponse; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListUsableSubnetworksResponse; + + /** + * Verifies a ListUsableSubnetworksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUsableSubnetworksResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListUsableSubnetworksResponse; + + /** + * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. + * @param message ListUsableSubnetworksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ListUsableSubnetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUsableSubnetworksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUsableSubnetworksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UsableSubnetworkSecondaryRange. */ + interface IUsableSubnetworkSecondaryRange { + + /** UsableSubnetworkSecondaryRange rangeName */ + rangeName?: (string|null); + + /** UsableSubnetworkSecondaryRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** UsableSubnetworkSecondaryRange status */ + status?: (google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|null); + } + + /** Represents a UsableSubnetworkSecondaryRange. */ + class UsableSubnetworkSecondaryRange implements IUsableSubnetworkSecondaryRange { + + /** + * Constructs a new UsableSubnetworkSecondaryRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUsableSubnetworkSecondaryRange); + + /** UsableSubnetworkSecondaryRange rangeName. */ + public rangeName: string; + + /** UsableSubnetworkSecondaryRange ipCidrRange. */ + public ipCidrRange: string; + + /** UsableSubnetworkSecondaryRange status. */ + public status: (google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1beta1.UsableSubnetworkSecondaryRange.Status); + + /** + * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. + * @param [properties] Properties to set + * @returns UsableSubnetworkSecondaryRange instance + */ + public static create(properties?: google.container.v1beta1.IUsableSubnetworkSecondaryRange): google.container.v1beta1.UsableSubnetworkSecondaryRange; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @param message UsableSubnetworkSecondaryRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @param message UsableSubnetworkSecondaryRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UsableSubnetworkSecondaryRange; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UsableSubnetworkSecondaryRange; + + /** + * Verifies a UsableSubnetworkSecondaryRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsableSubnetworkSecondaryRange + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UsableSubnetworkSecondaryRange; + + /** + * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. + * @param message UsableSubnetworkSecondaryRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UsableSubnetworkSecondaryRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsableSubnetworkSecondaryRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsableSubnetworkSecondaryRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UsableSubnetworkSecondaryRange { + + /** Status enum. */ + enum Status { + UNKNOWN = 0, + UNUSED = 1, + IN_USE_SERVICE = 2, + IN_USE_SHAREABLE_POD = 3, + IN_USE_MANAGED_POD = 4 + } + } + + /** Properties of a UsableSubnetwork. */ + interface IUsableSubnetwork { + + /** UsableSubnetwork subnetwork */ + subnetwork?: (string|null); + + /** UsableSubnetwork network */ + network?: (string|null); + + /** UsableSubnetwork ipCidrRange */ + ipCidrRange?: (string|null); + + /** UsableSubnetwork secondaryIpRanges */ + secondaryIpRanges?: (google.container.v1beta1.IUsableSubnetworkSecondaryRange[]|null); + + /** UsableSubnetwork statusMessage */ + statusMessage?: (string|null); + } + + /** Represents a UsableSubnetwork. */ + class UsableSubnetwork implements IUsableSubnetwork { + + /** + * Constructs a new UsableSubnetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUsableSubnetwork); + + /** UsableSubnetwork subnetwork. */ + public subnetwork: string; + + /** UsableSubnetwork network. */ + public network: string; + + /** UsableSubnetwork ipCidrRange. */ + public ipCidrRange: string; + + /** UsableSubnetwork secondaryIpRanges. */ + public secondaryIpRanges: google.container.v1beta1.IUsableSubnetworkSecondaryRange[]; + + /** UsableSubnetwork statusMessage. */ + public statusMessage: string; + + /** + * Creates a new UsableSubnetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns UsableSubnetwork instance + */ + public static create(properties?: google.container.v1beta1.IUsableSubnetwork): google.container.v1beta1.UsableSubnetwork; + + /** + * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. + * @param message UsableSubnetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. + * @param message UsableSubnetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UsableSubnetwork; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UsableSubnetwork; + + /** + * Verifies a UsableSubnetwork message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsableSubnetwork + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UsableSubnetwork; + + /** + * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. + * @param message UsableSubnetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UsableSubnetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsableSubnetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsableSubnetwork + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerticalPodAutoscaling. */ + interface IVerticalPodAutoscaling { + + /** VerticalPodAutoscaling enabled */ + enabled?: (boolean|null); + } + + /** Represents a VerticalPodAutoscaling. */ + class VerticalPodAutoscaling implements IVerticalPodAutoscaling { + + /** + * Constructs a new VerticalPodAutoscaling. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IVerticalPodAutoscaling); + + /** VerticalPodAutoscaling enabled. */ + public enabled: boolean; + + /** + * Creates a new VerticalPodAutoscaling instance using the specified properties. + * @param [properties] Properties to set + * @returns VerticalPodAutoscaling instance + */ + public static create(properties?: google.container.v1beta1.IVerticalPodAutoscaling): google.container.v1beta1.VerticalPodAutoscaling; + + /** + * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. + * @param message VerticalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. + * @param message VerticalPodAutoscaling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.VerticalPodAutoscaling; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.VerticalPodAutoscaling; + + /** + * Verifies a VerticalPodAutoscaling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerticalPodAutoscaling + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.VerticalPodAutoscaling; + + /** + * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. + * @param message VerticalPodAutoscaling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.VerticalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerticalPodAutoscaling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerticalPodAutoscaling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DefaultSnatStatus. */ + interface IDefaultSnatStatus { + + /** DefaultSnatStatus disabled */ + disabled?: (boolean|null); + } + + /** Represents a DefaultSnatStatus. */ + class DefaultSnatStatus implements IDefaultSnatStatus { + + /** + * Constructs a new DefaultSnatStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDefaultSnatStatus); + + /** DefaultSnatStatus disabled. */ + public disabled: boolean; + + /** + * Creates a new DefaultSnatStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DefaultSnatStatus instance + */ + public static create(properties?: google.container.v1beta1.IDefaultSnatStatus): google.container.v1beta1.DefaultSnatStatus; + + /** + * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. + * @param message DefaultSnatStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. + * @param message DefaultSnatStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DefaultSnatStatus; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DefaultSnatStatus; + + /** + * Verifies a DefaultSnatStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DefaultSnatStatus + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DefaultSnatStatus; + + /** + * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. + * @param message DefaultSnatStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DefaultSnatStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DefaultSnatStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DefaultSnatStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntraNodeVisibilityConfig. */ + interface IIntraNodeVisibilityConfig { + + /** IntraNodeVisibilityConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents an IntraNodeVisibilityConfig. */ + class IntraNodeVisibilityConfig implements IIntraNodeVisibilityConfig { + + /** + * Constructs a new IntraNodeVisibilityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IIntraNodeVisibilityConfig); + + /** IntraNodeVisibilityConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new IntraNodeVisibilityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IntraNodeVisibilityConfig instance + */ + public static create(properties?: google.container.v1beta1.IIntraNodeVisibilityConfig): google.container.v1beta1.IntraNodeVisibilityConfig; + + /** + * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. + * @param message IntraNodeVisibilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. + * @param message IntraNodeVisibilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IntraNodeVisibilityConfig; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IntraNodeVisibilityConfig; + + /** + * Verifies an IntraNodeVisibilityConfig message. + * @param message Plain 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 IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntraNodeVisibilityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IntraNodeVisibilityConfig; + + /** + * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. + * @param message IntraNodeVisibilityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.IntraNodeVisibilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntraNodeVisibilityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntraNodeVisibilityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ILBSubsettingConfig. */ + interface IILBSubsettingConfig { + + /** ILBSubsettingConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ILBSubsettingConfig. */ + class ILBSubsettingConfig implements IILBSubsettingConfig { + + /** + * Constructs a new ILBSubsettingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IILBSubsettingConfig); + + /** ILBSubsettingConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ILBSubsettingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ILBSubsettingConfig instance + */ + public static create(properties?: google.container.v1beta1.IILBSubsettingConfig): google.container.v1beta1.ILBSubsettingConfig; + + /** + * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. + * @param message ILBSubsettingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. + * @param message ILBSubsettingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ILBSubsettingConfig; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ILBSubsettingConfig; + + /** + * Verifies a ILBSubsettingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ILBSubsettingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ILBSubsettingConfig; + + /** + * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. + * @param message ILBSubsettingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ILBSubsettingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ILBSubsettingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ILBSubsettingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DNSConfig. */ + interface IDNSConfig { + + /** DNSConfig clusterDns */ + clusterDns?: (google.container.v1beta1.DNSConfig.Provider|keyof typeof google.container.v1beta1.DNSConfig.Provider|null); + + /** DNSConfig clusterDnsScope */ + clusterDnsScope?: (google.container.v1beta1.DNSConfig.DNSScope|keyof typeof google.container.v1beta1.DNSConfig.DNSScope|null); + + /** DNSConfig clusterDnsDomain */ + clusterDnsDomain?: (string|null); + + /** DNSConfig additiveVpcScopeDnsDomain */ + additiveVpcScopeDnsDomain?: (string|null); + } + + /** Represents a DNSConfig. */ + class DNSConfig implements IDNSConfig { + + /** + * Constructs a new DNSConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDNSConfig); + + /** DNSConfig clusterDns. */ + public clusterDns: (google.container.v1beta1.DNSConfig.Provider|keyof typeof google.container.v1beta1.DNSConfig.Provider); + + /** DNSConfig clusterDnsScope. */ + public clusterDnsScope: (google.container.v1beta1.DNSConfig.DNSScope|keyof typeof google.container.v1beta1.DNSConfig.DNSScope); + + /** DNSConfig clusterDnsDomain. */ + public clusterDnsDomain: string; + + /** DNSConfig additiveVpcScopeDnsDomain. */ + public additiveVpcScopeDnsDomain: string; + + /** + * Creates a new DNSConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSConfig instance + */ + public static create(properties?: google.container.v1beta1.IDNSConfig): google.container.v1beta1.DNSConfig; + + /** + * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. + * @param message DNSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. + * @param message DNSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DNSConfig; + + /** + * Decodes a DNSConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DNSConfig; + + /** + * Verifies a DNSConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DNSConfig; + + /** + * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. + * @param message DNSConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DNSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DNSConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DNSConfig { + + /** Provider enum. */ + enum Provider { + PROVIDER_UNSPECIFIED = 0, + PLATFORM_DEFAULT = 1, + CLOUD_DNS = 2, + KUBE_DNS = 3 + } + + /** DNSScope enum. */ + enum DNSScope { + DNS_SCOPE_UNSPECIFIED = 0, + CLUSTER_SCOPE = 1, + VPC_SCOPE = 2 + } + } + + /** Properties of a MaxPodsConstraint. */ + interface IMaxPodsConstraint { + + /** MaxPodsConstraint maxPodsPerNode */ + maxPodsPerNode?: (number|Long|string|null); + } + + /** Represents a MaxPodsConstraint. */ + class MaxPodsConstraint implements IMaxPodsConstraint { + + /** + * Constructs a new MaxPodsConstraint. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMaxPodsConstraint); + + /** MaxPodsConstraint maxPodsPerNode. */ + public maxPodsPerNode: (number|Long|string); + + /** + * Creates a new MaxPodsConstraint instance using the specified properties. + * @param [properties] Properties to set + * @returns MaxPodsConstraint instance + */ + public static create(properties?: google.container.v1beta1.IMaxPodsConstraint): google.container.v1beta1.MaxPodsConstraint; + + /** + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.container.v1beta1.MaxPodsConstraint; + + /** + * 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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 a WorkloadIdentityConfig. */ + interface IWorkloadIdentityConfig { + + /** WorkloadIdentityConfig identityNamespace */ + identityNamespace?: (string|null); + + /** WorkloadIdentityConfig workloadPool */ + workloadPool?: (string|null); + + /** WorkloadIdentityConfig identityProvider */ + identityProvider?: (string|null); + } + + /** Represents a WorkloadIdentityConfig. */ + class WorkloadIdentityConfig implements IWorkloadIdentityConfig { + + /** + * Constructs a new WorkloadIdentityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadIdentityConfig); + + /** WorkloadIdentityConfig identityNamespace. */ + public identityNamespace: string; + + /** WorkloadIdentityConfig workloadPool. */ + public workloadPool: string; + + /** WorkloadIdentityConfig identityProvider. */ + public identityProvider: string; + + /** + * Creates a new WorkloadIdentityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadIdentityConfig instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadIdentityConfig): google.container.v1beta1.WorkloadIdentityConfig; + + /** + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.container.v1beta1.WorkloadIdentityConfig; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.container.v1beta1.WorkloadIdentityConfig; + + /** + * 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadIdentityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadIdentityConfig; + + /** + * 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.container.v1beta1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadIdentityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 a WorkloadALTSConfig. */ + interface IWorkloadALTSConfig { + + /** WorkloadALTSConfig enableAlts */ + enableAlts?: (google.protobuf.IBoolValue|null); + } + + /** Represents a WorkloadALTSConfig. */ + class WorkloadALTSConfig implements IWorkloadALTSConfig { + + /** + * Constructs a new WorkloadALTSConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadALTSConfig); + + /** WorkloadALTSConfig enableAlts. */ + public enableAlts?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new WorkloadALTSConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadALTSConfig instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadALTSConfig): google.container.v1beta1.WorkloadALTSConfig; + + /** + * Encodes the specified WorkloadALTSConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. + * @param message WorkloadALTSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWorkloadALTSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadALTSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. + * @param message WorkloadALTSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWorkloadALTSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadALTSConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadALTSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadALTSConfig; + + /** + * Decodes a WorkloadALTSConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadALTSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadALTSConfig; + + /** + * Verifies a WorkloadALTSConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadALTSConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadALTSConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadALTSConfig; + + /** + * Creates a plain object from a WorkloadALTSConfig message. Also converts values to other types if specified. + * @param message WorkloadALTSConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WorkloadALTSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadALTSConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadALTSConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadCertificates. */ + interface IWorkloadCertificates { + + /** WorkloadCertificates enableCertificates */ + enableCertificates?: (google.protobuf.IBoolValue|null); + } + + /** Represents a WorkloadCertificates. */ + class WorkloadCertificates implements IWorkloadCertificates { + + /** + * Constructs a new WorkloadCertificates. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadCertificates); + + /** WorkloadCertificates enableCertificates. */ + public enableCertificates?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new WorkloadCertificates instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadCertificates instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadCertificates): google.container.v1beta1.WorkloadCertificates; + + /** + * Encodes the specified WorkloadCertificates message. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. + * @param message WorkloadCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWorkloadCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. + * @param message WorkloadCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWorkloadCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadCertificates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadCertificates; + + /** + * Decodes a WorkloadCertificates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadCertificates; + + /** + * Verifies a WorkloadCertificates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadCertificates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadCertificates + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadCertificates; + + /** + * Creates a plain object from a WorkloadCertificates message. Also converts values to other types if specified. + * @param message WorkloadCertificates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WorkloadCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadCertificates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadCertificates + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MeshCertificates. */ + interface IMeshCertificates { + + /** MeshCertificates enableCertificates */ + enableCertificates?: (google.protobuf.IBoolValue|null); + } + + /** Represents a MeshCertificates. */ + class MeshCertificates implements IMeshCertificates { + + /** + * Constructs a new MeshCertificates. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMeshCertificates); + + /** MeshCertificates enableCertificates. */ + public enableCertificates?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new MeshCertificates instance using the specified properties. + * @param [properties] Properties to set + * @returns MeshCertificates instance + */ + public static create(properties?: google.container.v1beta1.IMeshCertificates): google.container.v1beta1.MeshCertificates; + + /** + * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. + * @param message MeshCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. + * @param message MeshCertificates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MeshCertificates; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MeshCertificates; + + /** + * Verifies a MeshCertificates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MeshCertificates + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MeshCertificates; + + /** + * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. + * @param message MeshCertificates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MeshCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MeshCertificates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MeshCertificates + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseEncryption. */ + interface IDatabaseEncryption { + + /** DatabaseEncryption keyName */ + keyName?: (string|null); + + /** DatabaseEncryption state */ + state?: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State|null); + + /** DatabaseEncryption currentState */ + currentState?: (google.container.v1beta1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1beta1.DatabaseEncryption.CurrentState|null); + + /** DatabaseEncryption decryptionKeys */ + decryptionKeys?: (string[]|null); + + /** DatabaseEncryption lastOperationErrors */ + lastOperationErrors?: (google.container.v1beta1.DatabaseEncryption.IOperationError[]|null); + } + + /** Represents a DatabaseEncryption. */ + class DatabaseEncryption implements IDatabaseEncryption { + + /** + * Constructs a new DatabaseEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IDatabaseEncryption); + + /** DatabaseEncryption keyName. */ + public keyName: string; + + /** DatabaseEncryption state. */ + public state: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State); + + /** DatabaseEncryption currentState. */ + public currentState?: (google.container.v1beta1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1beta1.DatabaseEncryption.CurrentState|null); + + /** DatabaseEncryption decryptionKeys. */ + public decryptionKeys: string[]; + + /** DatabaseEncryption lastOperationErrors. */ + public lastOperationErrors: google.container.v1beta1.DatabaseEncryption.IOperationError[]; + + /** DatabaseEncryption _currentState. */ + public _currentState?: "currentState"; + + /** + * Creates a new DatabaseEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseEncryption instance + */ + public static create(properties?: google.container.v1beta1.IDatabaseEncryption): google.container.v1beta1.DatabaseEncryption; + + /** + * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. + * @param message DatabaseEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. + * @param message DatabaseEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DatabaseEncryption; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DatabaseEncryption; + + /** + * Verifies a DatabaseEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseEncryption + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DatabaseEncryption; + + /** + * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. + * @param message DatabaseEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseEncryption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseEncryption { + + /** State enum. */ + enum State { + UNKNOWN = 0, + ENCRYPTED = 1, + DECRYPTED = 2 + } + + /** CurrentState enum. */ + enum CurrentState { + CURRENT_STATE_UNSPECIFIED = 0, + CURRENT_STATE_ENCRYPTED = 7, + CURRENT_STATE_DECRYPTED = 2, + CURRENT_STATE_ENCRYPTION_PENDING = 3, + CURRENT_STATE_ENCRYPTION_ERROR = 4, + CURRENT_STATE_DECRYPTION_PENDING = 5, + CURRENT_STATE_DECRYPTION_ERROR = 6 + } + + /** Properties of an OperationError. */ + interface IOperationError { + + /** OperationError keyName */ + keyName?: (string|null); + + /** OperationError errorMessage */ + errorMessage?: (string|null); + + /** OperationError timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationError. */ + class OperationError implements IOperationError { + + /** + * Constructs a new OperationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.DatabaseEncryption.IOperationError); + + /** OperationError keyName. */ + public keyName: string; + + /** OperationError errorMessage. */ + public errorMessage: string; + + /** OperationError timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationError instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationError instance + */ + public static create(properties?: google.container.v1beta1.DatabaseEncryption.IOperationError): google.container.v1beta1.DatabaseEncryption.OperationError; + + /** + * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. + * @param message OperationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. + * @param message OperationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DatabaseEncryption.OperationError; + + /** + * Decodes an OperationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DatabaseEncryption.OperationError; + + /** + * Verifies an OperationError message. + * @param message Plain 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 OperationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationError + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DatabaseEncryption.OperationError; + + /** + * Creates a plain object from an OperationError message. Also converts values to other types if specified. + * @param message OperationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.DatabaseEncryption.OperationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResourceUsageExportConfig. */ + interface IResourceUsageExportConfig { + + /** ResourceUsageExportConfig bigqueryDestination */ + bigqueryDestination?: (google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null); + + /** ResourceUsageExportConfig enableNetworkEgressMetering */ + enableNetworkEgressMetering?: (boolean|null); + + /** ResourceUsageExportConfig consumptionMeteringConfig */ + consumptionMeteringConfig?: (google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); + } + + /** Represents a ResourceUsageExportConfig. */ + class ResourceUsageExportConfig implements IResourceUsageExportConfig { + + /** + * Constructs a new ResourceUsageExportConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IResourceUsageExportConfig); + + /** ResourceUsageExportConfig bigqueryDestination. */ + public bigqueryDestination?: (google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null); + + /** ResourceUsageExportConfig enableNetworkEgressMetering. */ + public enableNetworkEgressMetering: boolean; + + /** ResourceUsageExportConfig consumptionMeteringConfig. */ + public consumptionMeteringConfig?: (google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); + + /** + * Creates a new ResourceUsageExportConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceUsageExportConfig instance + */ + public static create(properties?: google.container.v1beta1.IResourceUsageExportConfig): google.container.v1beta1.ResourceUsageExportConfig; + + /** + * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. + * @param message ResourceUsageExportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. + * @param message ResourceUsageExportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig; + + /** + * Verifies a ResourceUsageExportConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceUsageExportConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig; + + /** + * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. + * @param message ResourceUsageExportConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceUsageExportConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceUsageExportConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceUsageExportConfig { + + /** Properties of a BigQueryDestination. */ + interface IBigQueryDestination { + + /** BigQueryDestination datasetId */ + datasetId?: (string|null); + } + + /** Represents a BigQueryDestination. */ + class BigQueryDestination implements IBigQueryDestination { + + /** + * Constructs a new BigQueryDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination); + + /** BigQueryDestination datasetId. */ + public datasetId: string; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDestination instance + */ + public static create(properties?: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Verifies a BigQueryDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDestination + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @param message BigQueryDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConsumptionMeteringConfig. */ + interface IConsumptionMeteringConfig { + + /** ConsumptionMeteringConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConsumptionMeteringConfig. */ + class ConsumptionMeteringConfig implements IConsumptionMeteringConfig { + + /** + * Constructs a new ConsumptionMeteringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig); + + /** ConsumptionMeteringConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ConsumptionMeteringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsumptionMeteringConfig instance + */ + public static create(properties?: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @param message ConsumptionMeteringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @param message ConsumptionMeteringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Verifies a ConsumptionMeteringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsumptionMeteringConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; + + /** + * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. + * @param message ConsumptionMeteringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsumptionMeteringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConsumptionMeteringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ShieldedNodes. */ + interface IShieldedNodes { + + /** ShieldedNodes enabled */ + enabled?: (boolean|null); + } + + /** Represents a ShieldedNodes. */ + class ShieldedNodes implements IShieldedNodes { + + /** + * Constructs a new ShieldedNodes. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IShieldedNodes); + + /** ShieldedNodes enabled. */ + public enabled: boolean; + + /** + * Creates a new ShieldedNodes instance using the specified properties. + * @param [properties] Properties to set + * @returns ShieldedNodes instance + */ + public static create(properties?: google.container.v1beta1.IShieldedNodes): google.container.v1beta1.ShieldedNodes; + + /** + * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. + * @param message ShieldedNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. + * @param message ShieldedNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ShieldedNodes; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ShieldedNodes; + + /** + * Verifies a ShieldedNodes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShieldedNodes + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ShieldedNodes; + + /** + * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. + * @param message ShieldedNodes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ShieldedNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShieldedNodes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShieldedNodes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VirtualNIC. */ + interface IVirtualNIC { + + /** VirtualNIC enabled */ + enabled?: (boolean|null); + } + + /** Represents a VirtualNIC. */ + class VirtualNIC implements IVirtualNIC { + + /** + * Constructs a new VirtualNIC. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IVirtualNIC); + + /** VirtualNIC enabled. */ + public enabled: boolean; + + /** + * Creates a new VirtualNIC instance using the specified properties. + * @param [properties] Properties to set + * @returns VirtualNIC instance + */ + public static create(properties?: google.container.v1beta1.IVirtualNIC): google.container.v1beta1.VirtualNIC; + + /** + * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. + * @param message VirtualNIC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. + * @param message VirtualNIC message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.VirtualNIC; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.VirtualNIC; + + /** + * Verifies a VirtualNIC message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VirtualNIC + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.VirtualNIC; + + /** + * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. + * @param message VirtualNIC + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.VirtualNIC, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VirtualNIC to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VirtualNIC + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FastSocket. */ + interface IFastSocket { + + /** FastSocket enabled */ + enabled?: (boolean|null); + } + + /** Represents a FastSocket. */ + class FastSocket implements IFastSocket { + + /** + * Constructs a new FastSocket. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IFastSocket); + + /** FastSocket enabled. */ + public enabled: boolean; + + /** + * Creates a new FastSocket instance using the specified properties. + * @param [properties] Properties to set + * @returns FastSocket instance + */ + public static create(properties?: google.container.v1beta1.IFastSocket): google.container.v1beta1.FastSocket; + + /** + * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. + * @param message FastSocket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. + * @param message FastSocket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FastSocket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.FastSocket; + + /** + * Decodes a FastSocket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.FastSocket; + + /** + * Verifies a FastSocket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FastSocket + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.FastSocket; + + /** + * Creates a plain object from a FastSocket message. Also converts values to other types if specified. + * @param message FastSocket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.FastSocket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FastSocket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FastSocket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOpenIDConfigRequest. */ + interface IGetOpenIDConfigRequest { + + /** GetOpenIDConfigRequest parent */ + parent?: (string|null); + } + + /** Represents a GetOpenIDConfigRequest. */ + class GetOpenIDConfigRequest implements IGetOpenIDConfigRequest { + + /** + * Constructs a new GetOpenIDConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetOpenIDConfigRequest); + + /** GetOpenIDConfigRequest parent. */ + public parent: string; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetOpenIDConfigRequest): google.container.v1beta1.GetOpenIDConfigRequest; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOpenIDConfigRequest; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOpenIDConfigRequest; + + /** + * Verifies a GetOpenIDConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOpenIDConfigRequest; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @param message GetOpenIDConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetOpenIDConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOpenIDConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOpenIDConfigResponse. */ + interface IGetOpenIDConfigResponse { + + /** GetOpenIDConfigResponse issuer */ + issuer?: (string|null); + + /** GetOpenIDConfigResponse jwksUri */ + jwksUri?: (string|null); + + /** GetOpenIDConfigResponse responseTypesSupported */ + responseTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse subjectTypesSupported */ + subjectTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported */ + idTokenSigningAlgValuesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse claimsSupported */ + claimsSupported?: (string[]|null); + + /** GetOpenIDConfigResponse grantTypes */ + grantTypes?: (string[]|null); + } + + /** Represents a GetOpenIDConfigResponse. */ + class GetOpenIDConfigResponse implements IGetOpenIDConfigResponse { + + /** + * Constructs a new GetOpenIDConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetOpenIDConfigResponse); + + /** GetOpenIDConfigResponse issuer. */ + public issuer: string; + + /** GetOpenIDConfigResponse jwksUri. */ + public jwksUri: string; + + /** GetOpenIDConfigResponse responseTypesSupported. */ + public responseTypesSupported: string[]; + + /** GetOpenIDConfigResponse subjectTypesSupported. */ + public subjectTypesSupported: string[]; + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. */ + public idTokenSigningAlgValuesSupported: string[]; + + /** GetOpenIDConfigResponse claimsSupported. */ + public claimsSupported: string[]; + + /** GetOpenIDConfigResponse grantTypes. */ + public grantTypes: string[]; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigResponse instance + */ + public static create(properties?: google.container.v1beta1.IGetOpenIDConfigResponse): google.container.v1beta1.GetOpenIDConfigResponse; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOpenIDConfigResponse; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOpenIDConfigResponse; + + /** + * Verifies a GetOpenIDConfigResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOpenIDConfigResponse; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @param message GetOpenIDConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetOpenIDConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOpenIDConfigResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJSONWebKeysRequest. */ + interface IGetJSONWebKeysRequest { + + /** GetJSONWebKeysRequest parent */ + parent?: (string|null); + } + + /** Represents a GetJSONWebKeysRequest. */ + class GetJSONWebKeysRequest implements IGetJSONWebKeysRequest { + + /** + * Constructs a new GetJSONWebKeysRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetJSONWebKeysRequest); + + /** GetJSONWebKeysRequest parent. */ + public parent: string; + + /** + * Creates a new GetJSONWebKeysRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJSONWebKeysRequest instance + */ + public static create(properties?: google.container.v1beta1.IGetJSONWebKeysRequest): google.container.v1beta1.GetJSONWebKeysRequest; + + /** + * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. + * @param message GetJSONWebKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. + * @param message GetJSONWebKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetJSONWebKeysRequest; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetJSONWebKeysRequest; + + /** + * Verifies a GetJSONWebKeysRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJSONWebKeysRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetJSONWebKeysRequest; + + /** + * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. + * @param message GetJSONWebKeysRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetJSONWebKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJSONWebKeysRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJSONWebKeysRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Jwk. */ + interface IJwk { + + /** Jwk kty */ + kty?: (string|null); + + /** Jwk alg */ + alg?: (string|null); + + /** Jwk use */ + use?: (string|null); + + /** Jwk kid */ + kid?: (string|null); + + /** Jwk n */ + n?: (string|null); + + /** Jwk e */ + e?: (string|null); + + /** Jwk x */ + x?: (string|null); + + /** Jwk y */ + y?: (string|null); + + /** Jwk crv */ + crv?: (string|null); + } + + /** Represents a Jwk. */ + class Jwk implements IJwk { + + /** + * Constructs a new Jwk. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IJwk); + + /** Jwk kty. */ + public kty: string; + + /** Jwk alg. */ + public alg: string; + + /** Jwk use. */ + public use: string; + + /** Jwk kid. */ + public kid: string; + + /** Jwk n. */ + public n: string; + + /** Jwk e. */ + public e: string; + + /** Jwk x. */ + public x: string; + + /** Jwk y. */ + public y: string; + + /** Jwk crv. */ + public crv: string; + + /** + * Creates a new Jwk instance using the specified properties. + * @param [properties] Properties to set + * @returns Jwk instance + */ + public static create(properties?: google.container.v1beta1.IJwk): google.container.v1beta1.Jwk; + + /** + * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. + * @param message Jwk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. + * @param message Jwk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Jwk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Jwk; + + /** + * Decodes a Jwk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Jwk; + + /** + * Verifies a Jwk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Jwk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Jwk + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Jwk; + + /** + * Creates a plain object from a Jwk message. Also converts values to other types if specified. + * @param message Jwk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Jwk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Jwk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Jwk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJSONWebKeysResponse. */ + interface IGetJSONWebKeysResponse { + + /** GetJSONWebKeysResponse keys */ + keys?: (google.container.v1beta1.IJwk[]|null); + } + + /** Represents a GetJSONWebKeysResponse. */ + class GetJSONWebKeysResponse implements IGetJSONWebKeysResponse { + + /** + * Constructs a new GetJSONWebKeysResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGetJSONWebKeysResponse); + + /** GetJSONWebKeysResponse keys. */ + public keys: google.container.v1beta1.IJwk[]; + + /** + * Creates a new GetJSONWebKeysResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJSONWebKeysResponse instance + */ + public static create(properties?: google.container.v1beta1.IGetJSONWebKeysResponse): google.container.v1beta1.GetJSONWebKeysResponse; + + /** + * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. + * @param message GetJSONWebKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. + * @param message GetJSONWebKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetJSONWebKeysResponse; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetJSONWebKeysResponse; + + /** + * Verifies a GetJSONWebKeysResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJSONWebKeysResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetJSONWebKeysResponse; + + /** + * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. + * @param message GetJSONWebKeysResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GetJSONWebKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJSONWebKeysResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJSONWebKeysResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckAutopilotCompatibilityRequest. */ + interface ICheckAutopilotCompatibilityRequest { + + /** CheckAutopilotCompatibilityRequest name */ + name?: (string|null); + } + + /** Represents a CheckAutopilotCompatibilityRequest. */ + class CheckAutopilotCompatibilityRequest implements ICheckAutopilotCompatibilityRequest { + + /** + * Constructs a new CheckAutopilotCompatibilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityRequest); + + /** CheckAutopilotCompatibilityRequest name. */ + public name: string; + + /** + * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAutopilotCompatibilityRequest instance + */ + public static create(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityRequest): google.container.v1beta1.CheckAutopilotCompatibilityRequest; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @param message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @param message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CheckAutopilotCompatibilityRequest; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CheckAutopilotCompatibilityRequest; + + /** + * Verifies a CheckAutopilotCompatibilityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAutopilotCompatibilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CheckAutopilotCompatibilityRequest; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. + * @param message CheckAutopilotCompatibilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CheckAutopilotCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAutopilotCompatibilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutopilotCompatibilityIssue. */ + interface IAutopilotCompatibilityIssue { + + /** AutopilotCompatibilityIssue lastObservation */ + lastObservation?: (google.protobuf.ITimestamp|null); + + /** AutopilotCompatibilityIssue constraintType */ + constraintType?: (string|null); + + /** AutopilotCompatibilityIssue incompatibilityType */ + incompatibilityType?: (google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|null); + + /** AutopilotCompatibilityIssue subjects */ + subjects?: (string[]|null); + + /** AutopilotCompatibilityIssue documentationUrl */ + documentationUrl?: (string|null); + + /** AutopilotCompatibilityIssue description */ + description?: (string|null); + } + + /** Represents an AutopilotCompatibilityIssue. */ + class AutopilotCompatibilityIssue implements IAutopilotCompatibilityIssue { + + /** + * Constructs a new AutopilotCompatibilityIssue. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAutopilotCompatibilityIssue); + + /** AutopilotCompatibilityIssue lastObservation. */ + public lastObservation?: (google.protobuf.ITimestamp|null); + + /** AutopilotCompatibilityIssue constraintType. */ + public constraintType: string; + + /** AutopilotCompatibilityIssue incompatibilityType. */ + public incompatibilityType: (google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1beta1.AutopilotCompatibilityIssue.IssueType); + + /** AutopilotCompatibilityIssue subjects. */ + public subjects: string[]; + + /** AutopilotCompatibilityIssue documentationUrl. */ + public documentationUrl: string; + + /** AutopilotCompatibilityIssue description. */ + public description: string; + + /** + * Creates a new AutopilotCompatibilityIssue instance using the specified properties. + * @param [properties] Properties to set + * @returns AutopilotCompatibilityIssue instance + */ + public static create(properties?: google.container.v1beta1.IAutopilotCompatibilityIssue): google.container.v1beta1.AutopilotCompatibilityIssue; + + /** + * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. + * @param message AutopilotCompatibilityIssue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. + * @param message AutopilotCompatibilityIssue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutopilotCompatibilityIssue; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutopilotCompatibilityIssue; + + /** + * Verifies an AutopilotCompatibilityIssue message. + * @param message Plain 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 AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutopilotCompatibilityIssue + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutopilotCompatibilityIssue; + + /** + * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. + * @param message AutopilotCompatibilityIssue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AutopilotCompatibilityIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutopilotCompatibilityIssue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutopilotCompatibilityIssue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutopilotCompatibilityIssue { + + /** IssueType enum. */ + enum IssueType { + UNSPECIFIED = 0, + INCOMPATIBILITY = 1, + ADDITIONAL_CONFIG_REQUIRED = 2, + PASSED_WITH_OPTIONAL_CONFIG = 3 + } + } + + /** Properties of a CheckAutopilotCompatibilityResponse. */ + interface ICheckAutopilotCompatibilityResponse { + + /** CheckAutopilotCompatibilityResponse issues */ + issues?: (google.container.v1beta1.IAutopilotCompatibilityIssue[]|null); + + /** CheckAutopilotCompatibilityResponse summary */ + summary?: (string|null); + } + + /** Represents a CheckAutopilotCompatibilityResponse. */ + class CheckAutopilotCompatibilityResponse implements ICheckAutopilotCompatibilityResponse { + + /** + * Constructs a new CheckAutopilotCompatibilityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityResponse); + + /** CheckAutopilotCompatibilityResponse issues. */ + public issues: google.container.v1beta1.IAutopilotCompatibilityIssue[]; + + /** CheckAutopilotCompatibilityResponse summary. */ + public summary: string; + + /** + * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckAutopilotCompatibilityResponse instance + */ + public static create(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityResponse): google.container.v1beta1.CheckAutopilotCompatibilityResponse; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @param message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @param message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CheckAutopilotCompatibilityResponse; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CheckAutopilotCompatibilityResponse; + + /** + * Verifies a CheckAutopilotCompatibilityResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckAutopilotCompatibilityResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CheckAutopilotCompatibilityResponse; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. + * @param message CheckAutopilotCompatibilityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CheckAutopilotCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckAutopilotCompatibilityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReleaseChannel. */ + interface IReleaseChannel { + + /** ReleaseChannel channel */ + channel?: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel|null); + } + + /** Represents a ReleaseChannel. */ + class ReleaseChannel implements IReleaseChannel { + + /** + * Constructs a new ReleaseChannel. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IReleaseChannel); + + /** ReleaseChannel channel. */ + public channel: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel); + + /** + * Creates a new ReleaseChannel instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseChannel instance + */ + public static create(properties?: google.container.v1beta1.IReleaseChannel): google.container.v1beta1.ReleaseChannel; + + /** + * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. + * @param message ReleaseChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. + * @param message ReleaseChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ReleaseChannel; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ReleaseChannel; + + /** + * Verifies a ReleaseChannel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseChannel + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ReleaseChannel; + + /** + * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. + * @param message ReleaseChannel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ReleaseChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseChannel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseChannel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReleaseChannel { + + /** Channel enum. */ + enum Channel { + UNSPECIFIED = 0, + RAPID = 1, + REGULAR = 2, + STABLE = 3, + EXTENDED = 4 + } + } + + /** Properties of a CostManagementConfig. */ + interface ICostManagementConfig { + + /** CostManagementConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a CostManagementConfig. */ + class CostManagementConfig implements ICostManagementConfig { + + /** + * Constructs a new CostManagementConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ICostManagementConfig); + + /** CostManagementConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new CostManagementConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CostManagementConfig instance + */ + public static create(properties?: google.container.v1beta1.ICostManagementConfig): google.container.v1beta1.CostManagementConfig; + + /** + * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. + * @param message CostManagementConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. + * @param message CostManagementConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CostManagementConfig; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CostManagementConfig; + + /** + * Verifies a CostManagementConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CostManagementConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CostManagementConfig; + + /** + * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. + * @param message CostManagementConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.CostManagementConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CostManagementConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CostManagementConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TpuConfig. */ + interface ITpuConfig { + + /** TpuConfig enabled */ + enabled?: (boolean|null); + + /** TpuConfig useServiceNetworking */ + useServiceNetworking?: (boolean|null); + + /** TpuConfig ipv4CidrBlock */ + ipv4CidrBlock?: (string|null); + } + + /** Represents a TpuConfig. */ + class TpuConfig implements ITpuConfig { + + /** + * Constructs a new TpuConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ITpuConfig); + + /** TpuConfig enabled. */ + public enabled: boolean; + + /** TpuConfig useServiceNetworking. */ + public useServiceNetworking: boolean; + + /** TpuConfig ipv4CidrBlock. */ + public ipv4CidrBlock: string; + + /** + * Creates a new TpuConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TpuConfig instance + */ + public static create(properties?: google.container.v1beta1.ITpuConfig): google.container.v1beta1.TpuConfig; + + /** + * Encodes the specified TpuConfig message. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. + * @param message TpuConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ITpuConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TpuConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. + * @param message TpuConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ITpuConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TpuConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TpuConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.TpuConfig; + + /** + * Decodes a TpuConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TpuConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.TpuConfig; + + /** + * Verifies a TpuConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TpuConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TpuConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.TpuConfig; + + /** + * Creates a plain object from a TpuConfig message. Also converts values to other types if specified. + * @param message TpuConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.TpuConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TpuConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TpuConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PrivateIPv6GoogleAccess enum. */ + enum PrivateIPv6GoogleAccess { + PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1, + PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2, + PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3 + } + + /** Properties of a Master. */ + interface IMaster { + } + + /** Represents a Master. */ + class Master implements IMaster { + + /** + * Constructs a new Master. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMaster); + + /** + * Creates a new Master instance using the specified properties. + * @param [properties] Properties to set + * @returns Master instance + */ + public static create(properties?: google.container.v1beta1.IMaster): google.container.v1beta1.Master; + + /** + * Encodes the specified Master message. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. + * @param message Master message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMaster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Master message, length delimited. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. + * @param message Master message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMaster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Master message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Master + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Master; + + /** + * Decodes a Master message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Master + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Master; + + /** + * Verifies a Master message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Master message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Master + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Master; + + /** + * Creates a plain object from a Master message. Also converts values to other types if specified. + * @param message Master + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Master, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Master to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Master + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutopilotConversionStatus. */ + interface IAutopilotConversionStatus { + + /** AutopilotConversionStatus state */ + state?: (google.container.v1beta1.AutopilotConversionStatus.State|keyof typeof google.container.v1beta1.AutopilotConversionStatus.State|null); + } + + /** Represents an AutopilotConversionStatus. */ + class AutopilotConversionStatus implements IAutopilotConversionStatus { + + /** + * Constructs a new AutopilotConversionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAutopilotConversionStatus); + + /** AutopilotConversionStatus state. */ + public state: (google.container.v1beta1.AutopilotConversionStatus.State|keyof typeof google.container.v1beta1.AutopilotConversionStatus.State); + + /** + * Creates a new AutopilotConversionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AutopilotConversionStatus instance + */ + public static create(properties?: google.container.v1beta1.IAutopilotConversionStatus): google.container.v1beta1.AutopilotConversionStatus; + + /** + * Encodes the specified AutopilotConversionStatus message. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. + * @param message AutopilotConversionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAutopilotConversionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutopilotConversionStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. + * @param message AutopilotConversionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAutopilotConversionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutopilotConversionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutopilotConversionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutopilotConversionStatus; + + /** + * Decodes an AutopilotConversionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutopilotConversionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutopilotConversionStatus; + + /** + * Verifies an AutopilotConversionStatus message. + * @param message Plain 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 AutopilotConversionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutopilotConversionStatus + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutopilotConversionStatus; + + /** + * Creates a plain object from an AutopilotConversionStatus message. Also converts values to other types if specified. + * @param message AutopilotConversionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AutopilotConversionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutopilotConversionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutopilotConversionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutopilotConversionStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DONE = 5 + } + } + + /** Properties of an Autopilot. */ + interface IAutopilot { + + /** Autopilot enabled */ + enabled?: (boolean|null); + + /** Autopilot workloadPolicyConfig */ + workloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); + + /** Autopilot conversionStatus */ + conversionStatus?: (google.container.v1beta1.IAutopilotConversionStatus|null); + } + + /** Represents an Autopilot. */ + class Autopilot implements IAutopilot { + + /** + * Constructs a new Autopilot. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAutopilot); + + /** Autopilot enabled. */ + public enabled: boolean; + + /** Autopilot workloadPolicyConfig. */ + public workloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); + + /** Autopilot conversionStatus. */ + public conversionStatus?: (google.container.v1beta1.IAutopilotConversionStatus|null); + + /** + * Creates a new Autopilot instance using the specified properties. + * @param [properties] Properties to set + * @returns Autopilot instance + */ + public static create(properties?: google.container.v1beta1.IAutopilot): google.container.v1beta1.Autopilot; + + /** + * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. + * @param message Autopilot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. + * @param message Autopilot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Autopilot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Autopilot; + + /** + * Decodes an Autopilot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Autopilot; + + /** + * Verifies an Autopilot message. + * @param message Plain 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 Autopilot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Autopilot + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Autopilot; + + /** + * Creates a plain object from an Autopilot message. Also converts values to other types if specified. + * @param message Autopilot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.Autopilot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Autopilot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Autopilot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadPolicyConfig. */ + interface IWorkloadPolicyConfig { + + /** WorkloadPolicyConfig allowNetAdmin */ + allowNetAdmin?: (boolean|null); + } + + /** Represents a WorkloadPolicyConfig. */ + class WorkloadPolicyConfig implements IWorkloadPolicyConfig { + + /** + * Constructs a new WorkloadPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IWorkloadPolicyConfig); + + /** WorkloadPolicyConfig allowNetAdmin. */ + public allowNetAdmin?: (boolean|null); + + /** WorkloadPolicyConfig _allowNetAdmin. */ + public _allowNetAdmin?: "allowNetAdmin"; + + /** + * Creates a new WorkloadPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadPolicyConfig instance + */ + public static create(properties?: google.container.v1beta1.IWorkloadPolicyConfig): google.container.v1beta1.WorkloadPolicyConfig; + + /** + * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. + * @param message WorkloadPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. + * @param message WorkloadPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadPolicyConfig; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadPolicyConfig; + + /** + * Verifies a WorkloadPolicyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadPolicyConfig; + + /** + * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. + * @param message WorkloadPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.WorkloadPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NotificationConfig. */ + interface INotificationConfig { + + /** NotificationConfig pubsub */ + pubsub?: (google.container.v1beta1.NotificationConfig.IPubSub|null); + } + + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { + + /** + * Constructs a new NotificationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INotificationConfig); + + /** NotificationConfig pubsub. */ + public pubsub?: (google.container.v1beta1.NotificationConfig.IPubSub|null); + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationConfig instance + */ + public static create(properties?: google.container.v1beta1.INotificationConfig): google.container.v1beta1.NotificationConfig; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig; + + /** + * Verifies a NotificationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NotificationConfig { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + UPGRADE_AVAILABLE_EVENT = 1, + UPGRADE_EVENT = 2, + SECURITY_BULLETIN_EVENT = 3 + } + + /** Properties of a PubSub. */ + interface IPubSub { + + /** PubSub enabled */ + enabled?: (boolean|null); + + /** PubSub topic */ + topic?: (string|null); + + /** PubSub filter */ + filter?: (google.container.v1beta1.NotificationConfig.IFilter|null); + } + + /** Represents a PubSub. */ + class PubSub implements IPubSub { + + /** + * Constructs a new PubSub. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NotificationConfig.IPubSub); + + /** PubSub enabled. */ + public enabled: boolean; + + /** PubSub topic. */ + public topic: string; + + /** PubSub filter. */ + public filter?: (google.container.v1beta1.NotificationConfig.IFilter|null); + + /** + * Creates a new PubSub instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSub instance + */ + public static create(properties?: google.container.v1beta1.NotificationConfig.IPubSub): google.container.v1beta1.NotificationConfig.PubSub; + + /** + * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. + * @param message PubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. + * @param message PubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSub message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig.PubSub; + + /** + * Decodes a PubSub message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig.PubSub; + + /** + * Verifies a PubSub message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubSub message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSub + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig.PubSub; + + /** + * Creates a plain object from a PubSub message. Also converts values to other types if specified. + * @param message PubSub + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NotificationConfig.PubSub, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSub to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSub + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter eventType */ + eventType?: (google.container.v1beta1.NotificationConfig.EventType[]|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.NotificationConfig.IFilter); + + /** Filter eventType. */ + public eventType: google.container.v1beta1.NotificationConfig.EventType[]; + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.container.v1beta1.NotificationConfig.IFilter): google.container.v1beta1.NotificationConfig.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NotificationConfig.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ConfidentialNodes. */ + interface IConfidentialNodes { + + /** ConfidentialNodes enabled */ + enabled?: (boolean|null); + } + + /** Represents a ConfidentialNodes. */ + class ConfidentialNodes implements IConfidentialNodes { + + /** + * Constructs a new ConfidentialNodes. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IConfidentialNodes); + + /** ConfidentialNodes enabled. */ + public enabled: boolean; + + /** + * Creates a new ConfidentialNodes instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialNodes instance + */ + public static create(properties?: google.container.v1beta1.IConfidentialNodes): google.container.v1beta1.ConfidentialNodes; + + /** + * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. + * @param message ConfidentialNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. + * @param message ConfidentialNodes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ConfidentialNodes; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ConfidentialNodes; + + /** + * Verifies a ConfidentialNodes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialNodes + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ConfidentialNodes; + + /** + * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. + * @param message ConfidentialNodes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ConfidentialNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialNodes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialNodes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UpgradeResourceType enum. */ + enum UpgradeResourceType { + UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0, + MASTER = 1, + NODE_POOL = 2 + } + + /** Properties of an UpgradeEvent. */ + interface IUpgradeEvent { + + /** UpgradeEvent resourceType */ + resourceType?: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType|null); + + /** UpgradeEvent operation */ + operation?: (string|null); + + /** UpgradeEvent operationStartTime */ + operationStartTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeEvent currentVersion */ + currentVersion?: (string|null); + + /** UpgradeEvent targetVersion */ + targetVersion?: (string|null); + + /** UpgradeEvent resource */ + resource?: (string|null); + } + + /** Represents an UpgradeEvent. */ + class UpgradeEvent implements IUpgradeEvent { + + /** + * Constructs a new UpgradeEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUpgradeEvent); + + /** UpgradeEvent resourceType. */ + public resourceType: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType); + + /** UpgradeEvent operation. */ + public operation: string; + + /** UpgradeEvent operationStartTime. */ + public operationStartTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeEvent currentVersion. */ + public currentVersion: string; + + /** UpgradeEvent targetVersion. */ + public targetVersion: string; + + /** UpgradeEvent resource. */ + public resource: string; + + /** + * Creates a new UpgradeEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeEvent instance + */ + public static create(properties?: google.container.v1beta1.IUpgradeEvent): google.container.v1beta1.UpgradeEvent; + + /** + * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. + * @param message UpgradeEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. + * @param message UpgradeEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpgradeEvent; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpgradeEvent; + + /** + * Verifies an UpgradeEvent message. + * @param message Plain 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 UpgradeEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpgradeEvent; + + /** + * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. + * @param message UpgradeEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UpgradeEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpgradeAvailableEvent. */ + interface IUpgradeAvailableEvent { + + /** UpgradeAvailableEvent version */ + version?: (string|null); + + /** UpgradeAvailableEvent resourceType */ + resourceType?: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType|null); + + /** UpgradeAvailableEvent releaseChannel */ + releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** UpgradeAvailableEvent resource */ + resource?: (string|null); + + /** UpgradeAvailableEvent windowsVersions */ + windowsVersions?: (google.container.v1beta1.IWindowsVersions|null); + } + + /** Represents an UpgradeAvailableEvent. */ + class UpgradeAvailableEvent implements IUpgradeAvailableEvent { + + /** + * Constructs a new UpgradeAvailableEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IUpgradeAvailableEvent); + + /** UpgradeAvailableEvent version. */ + public version: string; + + /** UpgradeAvailableEvent resourceType. */ + public resourceType: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType); + + /** UpgradeAvailableEvent releaseChannel. */ + public releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); + + /** UpgradeAvailableEvent resource. */ + public resource: string; + + /** UpgradeAvailableEvent windowsVersions. */ + public windowsVersions?: (google.container.v1beta1.IWindowsVersions|null); + + /** + * Creates a new UpgradeAvailableEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeAvailableEvent instance + */ + public static create(properties?: google.container.v1beta1.IUpgradeAvailableEvent): google.container.v1beta1.UpgradeAvailableEvent; + + /** + * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. + * @param message UpgradeAvailableEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. + * @param message UpgradeAvailableEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpgradeAvailableEvent; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpgradeAvailableEvent; + + /** + * Verifies an UpgradeAvailableEvent message. + * @param message Plain 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 UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeAvailableEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpgradeAvailableEvent; + + /** + * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. + * @param message UpgradeAvailableEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.UpgradeAvailableEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeAvailableEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeAvailableEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityBulletinEvent. */ + interface ISecurityBulletinEvent { + + /** SecurityBulletinEvent resourceTypeAffected */ + resourceTypeAffected?: (string|null); + + /** SecurityBulletinEvent bulletinId */ + bulletinId?: (string|null); + + /** SecurityBulletinEvent cveIds */ + cveIds?: (string[]|null); + + /** SecurityBulletinEvent severity */ + severity?: (string|null); + + /** SecurityBulletinEvent bulletinUri */ + bulletinUri?: (string|null); + + /** SecurityBulletinEvent briefDescription */ + briefDescription?: (string|null); + + /** SecurityBulletinEvent affectedSupportedMinors */ + affectedSupportedMinors?: (string[]|null); + + /** SecurityBulletinEvent patchedVersions */ + patchedVersions?: (string[]|null); + + /** SecurityBulletinEvent suggestedUpgradeTarget */ + suggestedUpgradeTarget?: (string|null); + + /** SecurityBulletinEvent manualStepsRequired */ + manualStepsRequired?: (boolean|null); + } + + /** Represents a SecurityBulletinEvent. */ + class SecurityBulletinEvent implements ISecurityBulletinEvent { + + /** + * Constructs a new SecurityBulletinEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISecurityBulletinEvent); + + /** SecurityBulletinEvent resourceTypeAffected. */ + public resourceTypeAffected: string; + + /** SecurityBulletinEvent bulletinId. */ + public bulletinId: string; + + /** SecurityBulletinEvent cveIds. */ + public cveIds: string[]; + + /** SecurityBulletinEvent severity. */ + public severity: string; + + /** SecurityBulletinEvent bulletinUri. */ + public bulletinUri: string; + + /** SecurityBulletinEvent briefDescription. */ + public briefDescription: string; + + /** SecurityBulletinEvent affectedSupportedMinors. */ + public affectedSupportedMinors: string[]; + + /** SecurityBulletinEvent patchedVersions. */ + public patchedVersions: string[]; + + /** SecurityBulletinEvent suggestedUpgradeTarget. */ + public suggestedUpgradeTarget: string; + + /** SecurityBulletinEvent manualStepsRequired. */ + public manualStepsRequired: boolean; + + /** + * Creates a new SecurityBulletinEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityBulletinEvent instance + */ + public static create(properties?: google.container.v1beta1.ISecurityBulletinEvent): google.container.v1beta1.SecurityBulletinEvent; + + /** + * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. + * @param message SecurityBulletinEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. + * @param message SecurityBulletinEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecurityBulletinEvent; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecurityBulletinEvent; + + /** + * Verifies a SecurityBulletinEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityBulletinEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecurityBulletinEvent; + + /** + * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. + * @param message SecurityBulletinEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SecurityBulletinEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityBulletinEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityBulletinEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IdentityServiceConfig. */ + interface IIdentityServiceConfig { + + /** IdentityServiceConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents an IdentityServiceConfig. */ + class IdentityServiceConfig implements IIdentityServiceConfig { + + /** + * Constructs a new IdentityServiceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IIdentityServiceConfig); + + /** IdentityServiceConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new IdentityServiceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IdentityServiceConfig instance + */ + public static create(properties?: google.container.v1beta1.IIdentityServiceConfig): google.container.v1beta1.IdentityServiceConfig; + + /** + * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. + * @param message IdentityServiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. + * @param message IdentityServiceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IdentityServiceConfig; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IdentityServiceConfig; + + /** + * Verifies an IdentityServiceConfig message. + * @param message Plain 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 IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IdentityServiceConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IdentityServiceConfig; + + /** + * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. + * @param message IdentityServiceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.IdentityServiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IdentityServiceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IdentityServiceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NodePoolUpdateStrategy enum. */ + enum NodePoolUpdateStrategy { + NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0, + BLUE_GREEN = 2, + SURGE = 3 + } + + /** Properties of a LoggingConfig. */ + interface ILoggingConfig { + + /** LoggingConfig componentConfig */ + componentConfig?: (google.container.v1beta1.ILoggingComponentConfig|null); + } + + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { + + /** + * Constructs a new LoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILoggingConfig); + + /** LoggingConfig componentConfig. */ + public componentConfig?: (google.container.v1beta1.ILoggingComponentConfig|null); + + /** + * Creates a new LoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingConfig instance + */ + public static create(properties?: google.container.v1beta1.ILoggingConfig): google.container.v1beta1.LoggingConfig; + + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.LoggingComponentConfig.Component[]|null); + } + + /** Represents a LoggingComponentConfig. */ + class LoggingComponentConfig implements ILoggingComponentConfig { + + /** + * Constructs a new LoggingComponentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILoggingComponentConfig); + + /** LoggingComponentConfig enableComponents. */ + public enableComponents: google.container.v1beta1.LoggingComponentConfig.Component[]; + + /** + * Creates a new LoggingComponentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingComponentConfig instance + */ + public static create(properties?: google.container.v1beta1.ILoggingComponentConfig): google.container.v1beta1.LoggingComponentConfig; + + /** + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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, + APISERVER = 3, + SCHEDULER = 4, + CONTROLLER_MANAGER = 5 + } + } + + /** Properties of a RayClusterLoggingConfig. */ + interface IRayClusterLoggingConfig { + + /** RayClusterLoggingConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a RayClusterLoggingConfig. */ + class RayClusterLoggingConfig implements IRayClusterLoggingConfig { + + /** + * Constructs a new RayClusterLoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRayClusterLoggingConfig); + + /** RayClusterLoggingConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new RayClusterLoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayClusterLoggingConfig instance + */ + public static create(properties?: google.container.v1beta1.IRayClusterLoggingConfig): google.container.v1beta1.RayClusterLoggingConfig; + + /** + * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. + * @param message RayClusterLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. + * @param message RayClusterLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayClusterLoggingConfig; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayClusterLoggingConfig; + + /** + * Verifies a RayClusterLoggingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayClusterLoggingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayClusterLoggingConfig; + + /** + * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. + * @param message RayClusterLoggingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RayClusterLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayClusterLoggingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayClusterLoggingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig componentConfig */ + componentConfig?: (google.container.v1beta1.IMonitoringComponentConfig|null); + + /** MonitoringConfig managedPrometheusConfig */ + managedPrometheusConfig?: (google.container.v1beta1.IManagedPrometheusConfig|null); + + /** MonitoringConfig advancedDatapathObservabilityConfig */ + advancedDatapathObservabilityConfig?: (google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMonitoringConfig); + + /** MonitoringConfig componentConfig. */ + public componentConfig?: (google.container.v1beta1.IMonitoringComponentConfig|null); + + /** MonitoringConfig managedPrometheusConfig. */ + public managedPrometheusConfig?: (google.container.v1beta1.IManagedPrometheusConfig|null); + + /** MonitoringConfig advancedDatapathObservabilityConfig. */ + public advancedDatapathObservabilityConfig?: (google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null); + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.container.v1beta1.IMonitoringConfig): google.container.v1beta1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 an AdvancedDatapathObservabilityConfig. */ + interface IAdvancedDatapathObservabilityConfig { + + /** AdvancedDatapathObservabilityConfig enableMetrics */ + enableMetrics?: (boolean|null); + + /** AdvancedDatapathObservabilityConfig relayMode */ + relayMode?: (google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|null); + + /** AdvancedDatapathObservabilityConfig enableRelay */ + enableRelay?: (boolean|null); + } + + /** Represents an AdvancedDatapathObservabilityConfig. */ + class AdvancedDatapathObservabilityConfig implements IAdvancedDatapathObservabilityConfig { + + /** + * Constructs a new AdvancedDatapathObservabilityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IAdvancedDatapathObservabilityConfig); + + /** AdvancedDatapathObservabilityConfig enableMetrics. */ + public enableMetrics: boolean; + + /** AdvancedDatapathObservabilityConfig relayMode. */ + public relayMode: (google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode); + + /** AdvancedDatapathObservabilityConfig enableRelay. */ + public enableRelay?: (boolean|null); + + /** AdvancedDatapathObservabilityConfig _enableRelay. */ + public _enableRelay?: "enableRelay"; + + /** + * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedDatapathObservabilityConfig instance + */ + public static create(properties?: google.container.v1beta1.IAdvancedDatapathObservabilityConfig): google.container.v1beta1.AdvancedDatapathObservabilityConfig; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @param message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @param message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdvancedDatapathObservabilityConfig; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdvancedDatapathObservabilityConfig; + + /** + * Verifies an AdvancedDatapathObservabilityConfig message. + * @param message Plain 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 AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedDatapathObservabilityConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdvancedDatapathObservabilityConfig; + + /** + * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. + * @param message AdvancedDatapathObservabilityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.AdvancedDatapathObservabilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedDatapathObservabilityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedDatapathObservabilityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AdvancedDatapathObservabilityConfig { + + /** RelayMode enum. */ + enum RelayMode { + RELAY_MODE_UNSPECIFIED = 0, + DISABLED = 1, + INTERNAL_VPC_LB = 3, + EXTERNAL_LB = 4 + } + } + + /** Properties of a RayClusterMonitoringConfig. */ + interface IRayClusterMonitoringConfig { + + /** RayClusterMonitoringConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a RayClusterMonitoringConfig. */ + class RayClusterMonitoringConfig implements IRayClusterMonitoringConfig { + + /** + * Constructs a new RayClusterMonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IRayClusterMonitoringConfig); + + /** RayClusterMonitoringConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new RayClusterMonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RayClusterMonitoringConfig instance + */ + public static create(properties?: google.container.v1beta1.IRayClusterMonitoringConfig): google.container.v1beta1.RayClusterMonitoringConfig; + + /** + * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. + * @param message RayClusterMonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. + * @param message RayClusterMonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayClusterMonitoringConfig; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayClusterMonitoringConfig; + + /** + * Verifies a RayClusterMonitoringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RayClusterMonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayClusterMonitoringConfig; + + /** + * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. + * @param message RayClusterMonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.RayClusterMonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RayClusterMonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RayClusterMonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePoolLoggingConfig. */ + interface INodePoolLoggingConfig { + + /** NodePoolLoggingConfig variantConfig */ + variantConfig?: (google.container.v1beta1.ILoggingVariantConfig|null); + } + + /** Represents a NodePoolLoggingConfig. */ + class NodePoolLoggingConfig implements INodePoolLoggingConfig { + + /** + * Constructs a new NodePoolLoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.INodePoolLoggingConfig); + + /** NodePoolLoggingConfig variantConfig. */ + public variantConfig?: (google.container.v1beta1.ILoggingVariantConfig|null); + + /** + * Creates a new NodePoolLoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolLoggingConfig instance + */ + public static create(properties?: google.container.v1beta1.INodePoolLoggingConfig): google.container.v1beta1.NodePoolLoggingConfig; + + /** + * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. + * @param message NodePoolLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. + * @param message NodePoolLoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolLoggingConfig; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolLoggingConfig; + + /** + * Verifies a NodePoolLoggingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePoolLoggingConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolLoggingConfig; + + /** + * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. + * @param message NodePoolLoggingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.NodePoolLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePoolLoggingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePoolLoggingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoggingVariantConfig. */ + interface ILoggingVariantConfig { + + /** LoggingVariantConfig variant */ + variant?: (google.container.v1beta1.LoggingVariantConfig.Variant|keyof typeof google.container.v1beta1.LoggingVariantConfig.Variant|null); + } + + /** Represents a LoggingVariantConfig. */ + class LoggingVariantConfig implements ILoggingVariantConfig { + + /** + * Constructs a new LoggingVariantConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ILoggingVariantConfig); + + /** LoggingVariantConfig variant. */ + public variant: (google.container.v1beta1.LoggingVariantConfig.Variant|keyof typeof google.container.v1beta1.LoggingVariantConfig.Variant); + + /** + * Creates a new LoggingVariantConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingVariantConfig instance + */ + public static create(properties?: google.container.v1beta1.ILoggingVariantConfig): google.container.v1beta1.LoggingVariantConfig; + + /** + * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. + * @param message LoggingVariantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. + * @param message LoggingVariantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LoggingVariantConfig; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LoggingVariantConfig; + + /** + * Verifies a LoggingVariantConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingVariantConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LoggingVariantConfig; + + /** + * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. + * @param message LoggingVariantConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.LoggingVariantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingVariantConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoggingVariantConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoggingVariantConfig { + + /** Variant enum. */ + enum Variant { + VARIANT_UNSPECIFIED = 0, + DEFAULT = 1, + MAX_THROUGHPUT = 2 + } + } + + /** Properties of a MonitoringComponentConfig. */ + interface IMonitoringComponentConfig { + + /** MonitoringComponentConfig enableComponents */ + enableComponents?: (google.container.v1beta1.MonitoringComponentConfig.Component[]|null); + } + + /** Represents a MonitoringComponentConfig. */ + class MonitoringComponentConfig implements IMonitoringComponentConfig { + + /** + * Constructs a new MonitoringComponentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IMonitoringComponentConfig); + + /** MonitoringComponentConfig enableComponents. */ + public enableComponents: google.container.v1beta1.MonitoringComponentConfig.Component[]; + + /** + * Creates a new MonitoringComponentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringComponentConfig instance + */ + public static create(properties?: google.container.v1beta1.IMonitoringComponentConfig): google.container.v1beta1.MonitoringComponentConfig; + + /** + * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. + * @param message MonitoringComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. + * @param message MonitoringComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MonitoringComponentConfig; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MonitoringComponentConfig; + + /** + * Verifies a MonitoringComponentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringComponentConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MonitoringComponentConfig; + + /** + * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * @param message MonitoringComponentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.MonitoringComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringComponentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringComponentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MonitoringComponentConfig { + + /** Component enum. */ + enum Component { + COMPONENT_UNSPECIFIED = 0, + SYSTEM_COMPONENTS = 1, + WORKLOADS = 2, + APISERVER = 3, + SCHEDULER = 4, + CONTROLLER_MANAGER = 5, + STORAGE = 7, + HPA = 8, + POD = 9, + DAEMONSET = 10, + DEPLOYMENT = 11, + STATEFULSET = 12, + CADVISOR = 13, + KUBELET = 14, + DCGM = 15 + } + } + + /** DatapathProvider enum. */ + enum DatapathProvider { + DATAPATH_PROVIDER_UNSPECIFIED = 0, + LEGACY_DATAPATH = 1, + ADVANCED_DATAPATH = 2 + } + + /** Properties of a Fleet. */ + interface IFleet { + + /** Fleet project */ + project?: (string|null); + + /** Fleet membership */ + membership?: (string|null); + + /** Fleet preRegistered */ + preRegistered?: (boolean|null); + } + + /** Represents a Fleet. */ + class Fleet implements IFleet { + + /** + * Constructs a new Fleet. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IFleet); + + /** Fleet project. */ + public project: string; + + /** Fleet membership. */ + public membership: string; + + /** Fleet preRegistered. */ + public preRegistered: boolean; + + /** + * Creates a new Fleet instance using the specified properties. + * @param [properties] Properties to set + * @returns Fleet instance + */ + public static create(properties?: google.container.v1beta1.IFleet): google.container.v1beta1.Fleet; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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; + } + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4 = 1, + IPV4_IPV6 = 2 + } + + /** Properties of a ResourceManagerTags. */ + interface IResourceManagerTags { + + /** ResourceManagerTags tags */ + tags?: ({ [k: string]: string }|null); + } + + /** Represents a ResourceManagerTags. */ + class ResourceManagerTags implements IResourceManagerTags { + + /** + * Constructs a new ResourceManagerTags. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IResourceManagerTags); + + /** ResourceManagerTags tags. */ + public tags: { [k: string]: string }; + + /** + * Creates a new ResourceManagerTags instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceManagerTags instance + */ + public static create(properties?: google.container.v1beta1.IResourceManagerTags): google.container.v1beta1.ResourceManagerTags; + + /** + * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. + * @param message ResourceManagerTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. + * @param message ResourceManagerTags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceManagerTags; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceManagerTags; + + /** + * Verifies a ResourceManagerTags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceManagerTags + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceManagerTags; + + /** + * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. + * @param message ResourceManagerTags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.ResourceManagerTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceManagerTags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceManagerTags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnterpriseConfig. */ + interface IEnterpriseConfig { + + /** EnterpriseConfig clusterTier */ + clusterTier?: (google.container.v1beta1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1beta1.EnterpriseConfig.ClusterTier|null); + } + + /** Represents an EnterpriseConfig. */ + class EnterpriseConfig implements IEnterpriseConfig { + + /** + * Constructs a new EnterpriseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IEnterpriseConfig); + + /** EnterpriseConfig clusterTier. */ + public clusterTier: (google.container.v1beta1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1beta1.EnterpriseConfig.ClusterTier); + + /** + * Creates a new EnterpriseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnterpriseConfig instance + */ + public static create(properties?: google.container.v1beta1.IEnterpriseConfig): google.container.v1beta1.EnterpriseConfig; + + /** + * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. + * @param message EnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. + * @param message EnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EnterpriseConfig; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EnterpriseConfig; + + /** + * Verifies an EnterpriseConfig message. + * @param message Plain 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 EnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnterpriseConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EnterpriseConfig; + + /** + * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. + * @param message EnterpriseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.EnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnterpriseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnterpriseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnterpriseConfig { + + /** ClusterTier enum. */ + enum ClusterTier { + CLUSTER_TIER_UNSPECIFIED = 0, + STANDARD = 1, + ENTERPRISE = 2 + } + } + + /** Properties of a SecretManagerConfig. */ + interface ISecretManagerConfig { + + /** SecretManagerConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a SecretManagerConfig. */ + class SecretManagerConfig implements ISecretManagerConfig { + + /** + * Constructs a new SecretManagerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISecretManagerConfig); + + /** SecretManagerConfig enabled. */ + public enabled?: (boolean|null); + + /** SecretManagerConfig _enabled. */ + public _enabled?: "enabled"; + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerConfig instance + */ + public static create(properties?: google.container.v1beta1.ISecretManagerConfig): google.container.v1beta1.SecretManagerConfig; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecretManagerConfig; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecretManagerConfig; + + /** + * Verifies a SecretManagerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretManagerConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecretManagerConfig; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @param message SecretManagerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SecretManagerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretManagerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretManagerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecondaryBootDisk. */ + interface ISecondaryBootDisk { + + /** SecondaryBootDisk mode */ + mode?: (google.container.v1beta1.SecondaryBootDisk.Mode|keyof typeof google.container.v1beta1.SecondaryBootDisk.Mode|null); + + /** SecondaryBootDisk diskImage */ + diskImage?: (string|null); + } + + /** Represents a SecondaryBootDisk. */ + class SecondaryBootDisk implements ISecondaryBootDisk { + + /** + * Constructs a new SecondaryBootDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISecondaryBootDisk); + + /** SecondaryBootDisk mode. */ + public mode: (google.container.v1beta1.SecondaryBootDisk.Mode|keyof typeof google.container.v1beta1.SecondaryBootDisk.Mode); + + /** SecondaryBootDisk diskImage. */ + public diskImage: string; + + /** + * Creates a new SecondaryBootDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns SecondaryBootDisk instance + */ + public static create(properties?: google.container.v1beta1.ISecondaryBootDisk): google.container.v1beta1.SecondaryBootDisk; + + /** + * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. + * @param message SecondaryBootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. + * @param message SecondaryBootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecondaryBootDisk; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecondaryBootDisk; + + /** + * Verifies a SecondaryBootDisk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecondaryBootDisk + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecondaryBootDisk; + + /** + * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. + * @param message SecondaryBootDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SecondaryBootDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecondaryBootDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecondaryBootDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecondaryBootDisk { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + CONTAINER_IMAGE_CACHE = 1 + } + } + + /** InTransitEncryptionConfig enum. */ + enum InTransitEncryptionConfig { + IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0, + IN_TRANSIT_ENCRYPTION_DISABLED = 1, + IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2 + } + + /** Properties of a SecondaryBootDiskUpdateStrategy. */ + interface ISecondaryBootDiskUpdateStrategy { + } + + /** Represents a SecondaryBootDiskUpdateStrategy. */ + class SecondaryBootDiskUpdateStrategy implements ISecondaryBootDiskUpdateStrategy { + + /** + * Constructs a new SecondaryBootDiskUpdateStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy); + + /** + * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns SecondaryBootDiskUpdateStrategy instance + */ + public static create(properties?: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; + + /** + * Verifies a SecondaryBootDiskUpdateStrategy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecondaryBootDiskUpdateStrategy + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; + + /** + * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. + * @param message SecondaryBootDiskUpdateStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.SecondaryBootDiskUpdateStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecondaryBootDiskUpdateStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecondaryBootDiskUpdateStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Code enum. */ + enum Code { + OK = 0, + CANCELLED = 1, + UNKNOWN = 2, + INVALID_ARGUMENT = 3, + DEADLINE_EXCEEDED = 4, + NOT_FOUND = 5, + ALREADY_EXISTS = 6, + PERMISSION_DENIED = 7, + UNAUTHENTICATED = 16, + RESOURCE_EXHAUSTED = 8, + FAILED_PRECONDITION = 9, + ABORTED = 10, + OUT_OF_RANGE = 11, + UNIMPLEMENTED = 12, + INTERNAL = 13, + UNAVAILABLE = 14, + DATA_LOSS = 15 + } + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.js b/owl-bot-staging/google-container/v1beta1/protos/protos.js new file mode 100644 index 00000000000..c8e98ad1c12 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/protos/protos.js @@ -0,0 +1,86801 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_container_protos || ($protobuf.roots._google_cloud_container_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.container = (function() { + + /** + * Namespace container. + * @memberof google + * @namespace + */ + var container = {}; + + container.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.container + * @namespace + */ + var v1beta1 = {}; + + v1beta1.ClusterManager = (function() { + + /** + * Constructs a new ClusterManager service. + * @memberof google.container.v1beta1 + * @classdesc Represents a ClusterManager + * @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 ClusterManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ClusterManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ClusterManager; + + /** + * Creates new ClusterManager service using the specified rpc implementation. + * @function create + * @memberof google.container.v1beta1.ClusterManager + * @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 {ClusterManager} RPC service. Useful where requests and/or responses are streamed. + */ + ClusterManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listClusters}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef ListClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ListClustersResponse} [response] ListClustersResponse + */ + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListClustersRequest} request ListClustersRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListClustersCallback} callback Node-style callback called with the error, if any, and ListClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listClusters = function listClusters(request, callback) { + return this.rpcCall(listClusters, $root.google.container.v1beta1.ListClustersRequest, $root.google.container.v1beta1.ListClustersResponse, request, callback); + }, "name", { value: "ListClusters" }); + + /** + * Calls ListClusters. + * @function listClusters + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListClustersRequest} request ListClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getCluster}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef GetClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Cluster} [response] Cluster + */ + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetClusterRequest} request GetClusterRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetClusterCallback} callback Node-style callback called with the error, if any, and Cluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getCluster = function getCluster(request, callback) { + return this.rpcCall(getCluster, $root.google.container.v1beta1.GetClusterRequest, $root.google.container.v1beta1.Cluster, request, callback); + }, "name", { value: "GetCluster" }); + + /** + * Calls GetCluster. + * @function getCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetClusterRequest} request GetClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|createCluster}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CreateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CreateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.createCluster = function createCluster(request, callback) { + return this.rpcCall(createCluster, $root.google.container.v1beta1.CreateClusterRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "CreateCluster" }); + + /** + * Calls CreateCluster. + * @function createCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICreateClusterRequest} request CreateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateCluster}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef UpdateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.UpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateCluster = function updateCluster(request, callback) { + return this.rpcCall(updateCluster, $root.google.container.v1beta1.UpdateClusterRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "UpdateCluster" }); + + /** + * Calls UpdateCluster. + * @function updateCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateNodePool}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef UpdateNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls UpdateNodePool. + * @function updateNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.UpdateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateNodePool = function updateNodePool(request, callback) { + return this.rpcCall(updateNodePool, $root.google.container.v1beta1.UpdateNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "UpdateNodePool" }); + + /** + * Calls UpdateNodePool. + * @function updateNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolAutoscaling}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetNodePoolAutoscalingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolAutoscaling. + * @function setNodePoolAutoscaling + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetNodePoolAutoscalingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolAutoscaling = function setNodePoolAutoscaling(request, callback) { + return this.rpcCall(setNodePoolAutoscaling, $root.google.container.v1beta1.SetNodePoolAutoscalingRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetNodePoolAutoscaling" }); + + /** + * Calls SetNodePoolAutoscaling. + * @function setNodePoolAutoscaling + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLoggingService}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetLoggingServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetLoggingService. + * @function setLoggingService + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetLoggingServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLoggingService = function setLoggingService(request, callback) { + return this.rpcCall(setLoggingService, $root.google.container.v1beta1.SetLoggingServiceRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetLoggingService" }); + + /** + * Calls SetLoggingService. + * @function setLoggingService + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMonitoringService}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetMonitoringServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetMonitoringService. + * @function setMonitoringService + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetMonitoringServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMonitoringService = function setMonitoringService(request, callback) { + return this.rpcCall(setMonitoringService, $root.google.container.v1beta1.SetMonitoringServiceRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetMonitoringService" }); + + /** + * Calls SetMonitoringService. + * @function setMonitoringService + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setAddonsConfig}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetAddonsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetAddonsConfig. + * @function setAddonsConfig + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetAddonsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setAddonsConfig = function setAddonsConfig(request, callback) { + return this.rpcCall(setAddonsConfig, $root.google.container.v1beta1.SetAddonsConfigRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetAddonsConfig" }); + + /** + * Calls SetAddonsConfig. + * @function setAddonsConfig + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLocations}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetLocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetLocations. + * @function setLocations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLocationsRequest} request SetLocationsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetLocationsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLocations = function setLocations(request, callback) { + return this.rpcCall(setLocations, $root.google.container.v1beta1.SetLocationsRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetLocations" }); + + /** + * Calls SetLocations. + * @function setLocations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLocationsRequest} request SetLocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|updateMaster}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef UpdateMasterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls UpdateMaster. + * @function updateMaster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.UpdateMasterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.updateMaster = function updateMaster(request, callback) { + return this.rpcCall(updateMaster, $root.google.container.v1beta1.UpdateMasterRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "UpdateMaster" }); + + /** + * Calls UpdateMaster. + * @function updateMaster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMasterAuth}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetMasterAuthCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetMasterAuth. + * @function setMasterAuth + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetMasterAuthCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMasterAuth = function setMasterAuth(request, callback) { + return this.rpcCall(setMasterAuth, $root.google.container.v1beta1.SetMasterAuthRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetMasterAuth" }); + + /** + * Calls SetMasterAuth. + * @function setMasterAuth + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteCluster}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef DeleteClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.DeleteClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.deleteCluster = function deleteCluster(request, callback) { + return this.rpcCall(deleteCluster, $root.google.container.v1beta1.DeleteClusterRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "DeleteCluster" }); + + /** + * Calls DeleteCluster. + * @function deleteCluster + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listOperations}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.container.v1beta1.ListOperationsRequest, $root.google.container.v1beta1.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getOperation}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.container.v1beta1.GetOperationRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|cancelOperation}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.container.v1beta1.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getServerConfig}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef GetServerConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ServerConfig} [response] ServerConfig + */ + + /** + * Calls GetServerConfig. + * @function getServerConfig + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetServerConfigCallback} callback Node-style callback called with the error, if any, and ServerConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getServerConfig = function getServerConfig(request, callback) { + return this.rpcCall(getServerConfig, $root.google.container.v1beta1.GetServerConfigRequest, $root.google.container.v1beta1.ServerConfig, request, callback); + }, "name", { value: "GetServerConfig" }); + + /** + * Calls GetServerConfig. + * @function getServerConfig + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef GetJSONWebKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse + */ + + /** + * Calls GetJSONWebKeys. + * @function getJSONWebKeys + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { + return this.rpcCall(getJSONWebKeys, $root.google.container.v1beta1.GetJSONWebKeysRequest, $root.google.container.v1beta1.GetJSONWebKeysResponse, request, callback); + }, "name", { value: "GetJSONWebKeys" }); + + /** + * Calls GetJSONWebKeys. + * @function getJSONWebKeys + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef ListNodePoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ListNodePoolsResponse} [response] ListNodePoolsResponse + */ + + /** + * Calls ListNodePools. + * @function listNodePools + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { + return this.rpcCall(listNodePools, $root.google.container.v1beta1.ListNodePoolsRequest, $root.google.container.v1beta1.ListNodePoolsResponse, request, callback); + }, "name", { value: "ListNodePools" }); + + /** + * Calls ListNodePools. + * @function listNodePools + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|getNodePool}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef GetNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.NodePool} [response] NodePool + */ + + /** + * Calls GetNodePool. + * @function getNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetNodePoolCallback} callback Node-style callback called with the error, if any, and NodePool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.getNodePool = function getNodePool(request, callback) { + return this.rpcCall(getNodePool, $root.google.container.v1beta1.GetNodePoolRequest, $root.google.container.v1beta1.NodePool, request, callback); + }, "name", { value: "GetNodePool" }); + + /** + * Calls GetNodePool. + * @function getNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|createNodePool}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CreateNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls CreateNodePool. + * @function createNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CreateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.createNodePool = function createNodePool(request, callback) { + return this.rpcCall(createNodePool, $root.google.container.v1beta1.CreateNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "CreateNodePool" }); + + /** + * Calls CreateNodePool. + * @function createNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteNodePool}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef DeleteNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls DeleteNodePool. + * @function deleteNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.DeleteNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.deleteNodePool = function deleteNodePool(request, callback) { + return this.rpcCall(deleteNodePool, $root.google.container.v1beta1.DeleteNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "DeleteNodePool" }); + + /** + * Calls DeleteNodePool. + * @function deleteNodePool + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|completeNodePoolUpgrade}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CompleteNodePoolUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CompleteNodePoolUpgrade. + * @function completeNodePoolUpgrade + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CompleteNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.completeNodePoolUpgrade = function completeNodePoolUpgrade(request, callback) { + return this.rpcCall(completeNodePoolUpgrade, $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CompleteNodePoolUpgrade" }); + + /** + * Calls CompleteNodePoolUpgrade. + * @function completeNodePoolUpgrade + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|rollbackNodePoolUpgrade}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef RollbackNodePoolUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls RollbackNodePoolUpgrade. + * @function rollbackNodePoolUpgrade + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.RollbackNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.rollbackNodePoolUpgrade = function rollbackNodePoolUpgrade(request, callback) { + return this.rpcCall(rollbackNodePoolUpgrade, $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "RollbackNodePoolUpgrade" }); + + /** + * Calls RollbackNodePoolUpgrade. + * @function rollbackNodePoolUpgrade + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolManagement}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetNodePoolManagementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolManagement. + * @function setNodePoolManagement + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetNodePoolManagementCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolManagement = function setNodePoolManagement(request, callback) { + return this.rpcCall(setNodePoolManagement, $root.google.container.v1beta1.SetNodePoolManagementRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetNodePoolManagement" }); + + /** + * Calls SetNodePoolManagement. + * @function setNodePoolManagement + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLabels}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetLabels. + * @function setLabels + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLabelsRequest} request SetLabelsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetLabelsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLabels = function setLabels(request, callback) { + return this.rpcCall(setLabels, $root.google.container.v1beta1.SetLabelsRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetLabels" }); + + /** + * Calls SetLabels. + * @function setLabels + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLabelsRequest} request SetLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setLegacyAbac}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetLegacyAbacCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetLegacyAbac. + * @function setLegacyAbac + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetLegacyAbacCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setLegacyAbac = function setLegacyAbac(request, callback) { + return this.rpcCall(setLegacyAbac, $root.google.container.v1beta1.SetLegacyAbacRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetLegacyAbac" }); + + /** + * Calls SetLegacyAbac. + * @function setLegacyAbac + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|startIPRotation}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef StartIPRotationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls StartIPRotation. + * @function startIPRotation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.StartIPRotationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.startIPRotation = function startIPRotation(request, callback) { + return this.rpcCall(startIPRotation, $root.google.container.v1beta1.StartIPRotationRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "StartIPRotation" }); + + /** + * Calls StartIPRotation. + * @function startIPRotation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|completeIPRotation}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CompleteIPRotationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls CompleteIPRotation. + * @function completeIPRotation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CompleteIPRotationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.completeIPRotation = function completeIPRotation(request, callback) { + return this.rpcCall(completeIPRotation, $root.google.container.v1beta1.CompleteIPRotationRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "CompleteIPRotation" }); + + /** + * Calls CompleteIPRotation. + * @function completeIPRotation + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolSize}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetNodePoolSizeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetNodePoolSize. + * @function setNodePoolSize + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetNodePoolSizeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNodePoolSize = function setNodePoolSize(request, callback) { + return this.rpcCall(setNodePoolSize, $root.google.container.v1beta1.SetNodePoolSizeRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetNodePoolSize" }); + + /** + * Calls SetNodePoolSize. + * @function setNodePoolSize + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setNetworkPolicy}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetNetworkPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetNetworkPolicy. + * @function setNetworkPolicy + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetNetworkPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setNetworkPolicy = function setNetworkPolicy(request, callback) { + return this.rpcCall(setNetworkPolicy, $root.google.container.v1beta1.SetNetworkPolicyRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetNetworkPolicy" }); + + /** + * Calls SetNetworkPolicy. + * @function setNetworkPolicy + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|setMaintenancePolicy}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef SetMaintenancePolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.Operation} [response] Operation + */ + + /** + * Calls SetMaintenancePolicy. + * @function setMaintenancePolicy + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.SetMaintenancePolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.setMaintenancePolicy = function setMaintenancePolicy(request, callback) { + return this.rpcCall(setMaintenancePolicy, $root.google.container.v1beta1.SetMaintenancePolicyRequest, $root.google.container.v1beta1.Operation, request, callback); + }, "name", { value: "SetMaintenancePolicy" }); + + /** + * Calls SetMaintenancePolicy. + * @function setMaintenancePolicy + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listUsableSubnetworks}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef ListUsableSubnetworksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ListUsableSubnetworksResponse} [response] ListUsableSubnetworksResponse + */ + + /** + * Calls ListUsableSubnetworks. + * @function listUsableSubnetworks + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListUsableSubnetworksCallback} callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listUsableSubnetworks = function listUsableSubnetworks(request, callback) { + return this.rpcCall(listUsableSubnetworks, $root.google.container.v1beta1.ListUsableSubnetworksRequest, $root.google.container.v1beta1.ListUsableSubnetworksResponse, request, callback); + }, "name", { value: "ListUsableSubnetworks" }); + + /** + * Calls ListUsableSubnetworks. + * @function listUsableSubnetworks + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|checkAutopilotCompatibility}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef CheckAutopilotCompatibilityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.CheckAutopilotCompatibilityResponse} [response] CheckAutopilotCompatibilityResponse + */ + + /** + * Calls CheckAutopilotCompatibility. + * @function checkAutopilotCompatibility + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.CheckAutopilotCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.checkAutopilotCompatibility = function checkAutopilotCompatibility(request, callback) { + return this.rpcCall(checkAutopilotCompatibility, $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest, $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse, request, callback); + }, "name", { value: "CheckAutopilotCompatibility" }); + + /** + * Calls CheckAutopilotCompatibility. + * @function checkAutopilotCompatibility + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.container.v1beta1.ClusterManager|listLocations}. + * @memberof google.container.v1beta1.ClusterManager + * @typedef ListLocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.container.v1beta1.ListLocationsResponse} [response] ListLocationsResponse + */ + + /** + * Calls ListLocations. + * @function listLocations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListLocationsRequest} request ListLocationsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListLocationsCallback} callback Node-style callback called with the error, if any, and ListLocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ClusterManager.prototype.listLocations = function listLocations(request, callback) { + return this.rpcCall(listLocations, $root.google.container.v1beta1.ListLocationsRequest, $root.google.container.v1beta1.ListLocationsResponse, request, callback); + }, "name", { value: "ListLocations" }); + + /** + * Calls ListLocations. + * @function listLocations + * @memberof google.container.v1beta1.ClusterManager + * @instance + * @param {google.container.v1beta1.IListLocationsRequest} request ListLocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ClusterManager; + })(); + + v1beta1.LinuxNodeConfig = (function() { + + /** + * Properties of a LinuxNodeConfig. + * @memberof google.container.v1beta1 + * @interface ILinuxNodeConfig + * @property {Object.|null} [sysctls] LinuxNodeConfig sysctls + * @property {google.container.v1beta1.LinuxNodeConfig.CgroupMode|null} [cgroupMode] LinuxNodeConfig cgroupMode + * @property {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null} [hugepages] LinuxNodeConfig hugepages + */ + + /** + * Constructs a new LinuxNodeConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a LinuxNodeConfig. + * @implements ILinuxNodeConfig + * @constructor + * @param {google.container.v1beta1.ILinuxNodeConfig=} [properties] Properties to set + */ + function LinuxNodeConfig(properties) { + this.sysctls = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LinuxNodeConfig sysctls. + * @member {Object.} sysctls + * @memberof google.container.v1beta1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.sysctls = $util.emptyObject; + + /** + * LinuxNodeConfig cgroupMode. + * @member {google.container.v1beta1.LinuxNodeConfig.CgroupMode} cgroupMode + * @memberof google.container.v1beta1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.cgroupMode = 0; + + /** + * LinuxNodeConfig hugepages. + * @member {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null|undefined} hugepages + * @memberof google.container.v1beta1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.hugepages = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LinuxNodeConfig _hugepages. + * @member {"hugepages"|undefined} _hugepages + * @memberof google.container.v1beta1.LinuxNodeConfig + * @instance + */ + Object.defineProperty(LinuxNodeConfig.prototype, "_hugepages", { + get: $util.oneOfGetter($oneOfFields = ["hugepages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LinuxNodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {google.container.v1beta1.ILinuxNodeConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig instance + */ + LinuxNodeConfig.create = function create(properties) { + return new LinuxNodeConfig(properties); + }; + + /** + * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {google.container.v1beta1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinuxNodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sysctls != null && Object.hasOwnProperty.call(message, "sysctls")) + for (var keys = Object.keys(message.sysctls), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.sysctls[keys[i]]).ldelim(); + if (message.cgroupMode != null && Object.hasOwnProperty.call(message, "cgroupMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cgroupMode); + if (message.hugepages != null && Object.hasOwnProperty.call(message, "hugepages")) + $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.encode(message.hugepages, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {google.container.v1beta1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinuxNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinuxNodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LinuxNodeConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.sysctls === $util.emptyObject) + message.sysctls = {}; + 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.sysctls[key] = value; + break; + } + case 2: { + message.cgroupMode = reader.int32(); + break; + } + case 3: { + message.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinuxNodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LinuxNodeConfig message. + * @function verify + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LinuxNodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sysctls != null && message.hasOwnProperty("sysctls")) { + if (!$util.isObject(message.sysctls)) + return "sysctls: object expected"; + var key = Object.keys(message.sysctls); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.sysctls[key[i]])) + return "sysctls: string{k:string} expected"; + } + if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) + switch (message.cgroupMode) { + default: + return "cgroupMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hugepages != null && message.hasOwnProperty("hugepages")) { + properties._hugepages = 1; + { + var error = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify(message.hugepages); + if (error) + return "hugepages." + error; + } + } + return null; + }; + + /** + * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig + */ + LinuxNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LinuxNodeConfig) + return object; + var message = new $root.google.container.v1beta1.LinuxNodeConfig(); + if (object.sysctls) { + if (typeof object.sysctls !== "object") + throw TypeError(".google.container.v1beta1.LinuxNodeConfig.sysctls: object expected"); + message.sysctls = {}; + for (var keys = Object.keys(object.sysctls), i = 0; i < keys.length; ++i) + message.sysctls[keys[i]] = String(object.sysctls[keys[i]]); + } + switch (object.cgroupMode) { + default: + if (typeof object.cgroupMode === "number") { + message.cgroupMode = object.cgroupMode; + break; + } + break; + case "CGROUP_MODE_UNSPECIFIED": + case 0: + message.cgroupMode = 0; + break; + case "CGROUP_MODE_V1": + case 1: + message.cgroupMode = 1; + break; + case "CGROUP_MODE_V2": + case 2: + message.cgroupMode = 2; + break; + } + if (object.hugepages != null) { + if (typeof object.hugepages !== "object") + throw TypeError(".google.container.v1beta1.LinuxNodeConfig.hugepages: object expected"); + message.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.fromObject(object.hugepages); + } + return message; + }; + + /** + * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {google.container.v1beta1.LinuxNodeConfig} message LinuxNodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LinuxNodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.sysctls = {}; + if (options.defaults) + object.cgroupMode = options.enums === String ? "CGROUP_MODE_UNSPECIFIED" : 0; + var keys2; + if (message.sysctls && (keys2 = Object.keys(message.sysctls)).length) { + object.sysctls = {}; + for (var j = 0; j < keys2.length; ++j) + object.sysctls[keys2[j]] = message.sysctls[keys2[j]]; + } + if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) + object.cgroupMode = options.enums === String ? $root.google.container.v1beta1.LinuxNodeConfig.CgroupMode[message.cgroupMode] === undefined ? message.cgroupMode : $root.google.container.v1beta1.LinuxNodeConfig.CgroupMode[message.cgroupMode] : message.cgroupMode; + if (message.hugepages != null && message.hasOwnProperty("hugepages")) { + object.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.toObject(message.hugepages, options); + if (options.oneofs) + object._hugepages = "hugepages"; + } + return object; + }; + + /** + * Converts this LinuxNodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LinuxNodeConfig + * @instance + * @returns {Object.} JSON object + */ + LinuxNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LinuxNodeConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LinuxNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LinuxNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LinuxNodeConfig"; + }; + + /** + * CgroupMode enum. + * @name google.container.v1beta1.LinuxNodeConfig.CgroupMode + * @enum {number} + * @property {number} CGROUP_MODE_UNSPECIFIED=0 CGROUP_MODE_UNSPECIFIED value + * @property {number} CGROUP_MODE_V1=1 CGROUP_MODE_V1 value + * @property {number} CGROUP_MODE_V2=2 CGROUP_MODE_V2 value + */ + LinuxNodeConfig.CgroupMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CGROUP_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CGROUP_MODE_V1"] = 1; + values[valuesById[2] = "CGROUP_MODE_V2"] = 2; + return values; + })(); + + LinuxNodeConfig.HugepagesConfig = (function() { + + /** + * Properties of a HugepagesConfig. + * @memberof google.container.v1beta1.LinuxNodeConfig + * @interface IHugepagesConfig + * @property {number|null} [hugepageSize2m] HugepagesConfig hugepageSize2m + * @property {number|null} [hugepageSize1g] HugepagesConfig hugepageSize1g + */ + + /** + * Constructs a new HugepagesConfig. + * @memberof google.container.v1beta1.LinuxNodeConfig + * @classdesc Represents a HugepagesConfig. + * @implements IHugepagesConfig + * @constructor + * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set + */ + function HugepagesConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HugepagesConfig hugepageSize2m. + * @member {number|null|undefined} hugepageSize2m + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + HugepagesConfig.prototype.hugepageSize2m = null; + + /** + * HugepagesConfig hugepageSize1g. + * @member {number|null|undefined} hugepageSize1g + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + HugepagesConfig.prototype.hugepageSize1g = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HugepagesConfig _hugepageSize2m. + * @member {"hugepageSize2m"|undefined} _hugepageSize2m + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize2m", { + get: $util.oneOfGetter($oneOfFields = ["hugepageSize2m"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * HugepagesConfig _hugepageSize1g. + * @member {"hugepageSize1g"|undefined} _hugepageSize1g + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @instance + */ + Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize1g", { + get: $util.oneOfGetter($oneOfFields = ["hugepageSize1g"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HugepagesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig instance + */ + HugepagesConfig.create = function create(properties) { + return new HugepagesConfig(properties); + }; + + /** + * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HugepagesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hugepageSize2m != null && Object.hasOwnProperty.call(message, "hugepageSize2m")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hugepageSize2m); + if (message.hugepageSize1g != null && Object.hasOwnProperty.call(message, "hugepageSize1g")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hugepageSize1g); + return writer; + }; + + /** + * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HugepagesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HugepagesConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hugepageSize2m = reader.int32(); + break; + } + case 2: { + message.hugepageSize1g = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HugepagesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HugepagesConfig message. + * @function verify + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HugepagesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { + properties._hugepageSize2m = 1; + if (!$util.isInteger(message.hugepageSize2m)) + return "hugepageSize2m: integer expected"; + } + if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { + properties._hugepageSize1g = 1; + if (!$util.isInteger(message.hugepageSize1g)) + return "hugepageSize1g: integer expected"; + } + return null; + }; + + /** + * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig + */ + HugepagesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig) + return object; + var message = new $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig(); + if (object.hugepageSize2m != null) + message.hugepageSize2m = object.hugepageSize2m | 0; + if (object.hugepageSize1g != null) + message.hugepageSize1g = object.hugepageSize1g | 0; + return message; + }; + + /** + * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} message HugepagesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HugepagesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { + object.hugepageSize2m = message.hugepageSize2m; + if (options.oneofs) + object._hugepageSize2m = "hugepageSize2m"; + } + if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { + object.hugepageSize1g = message.hugepageSize1g; + if (options.oneofs) + object._hugepageSize1g = "hugepageSize1g"; + } + return object; + }; + + /** + * Converts this HugepagesConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @instance + * @returns {Object.} JSON object + */ + HugepagesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HugepagesConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HugepagesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LinuxNodeConfig.HugepagesConfig"; + }; + + return HugepagesConfig; + })(); + + return LinuxNodeConfig; + })(); + + v1beta1.WindowsNodeConfig = (function() { + + /** + * Properties of a WindowsNodeConfig. + * @memberof google.container.v1beta1 + * @interface IWindowsNodeConfig + * @property {google.container.v1beta1.WindowsNodeConfig.OSVersion|null} [osVersion] WindowsNodeConfig osVersion + */ + + /** + * Constructs a new WindowsNodeConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WindowsNodeConfig. + * @implements IWindowsNodeConfig + * @constructor + * @param {google.container.v1beta1.IWindowsNodeConfig=} [properties] Properties to set + */ + function WindowsNodeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsNodeConfig osVersion. + * @member {google.container.v1beta1.WindowsNodeConfig.OSVersion} osVersion + * @memberof google.container.v1beta1.WindowsNodeConfig + * @instance + */ + WindowsNodeConfig.prototype.osVersion = 0; + + /** + * Creates a new WindowsNodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {google.container.v1beta1.IWindowsNodeConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig instance + */ + WindowsNodeConfig.create = function create(properties) { + return new WindowsNodeConfig(properties); + }; + + /** + * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {google.container.v1beta1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsNodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.osVersion); + return writer; + }; + + /** + * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {google.container.v1beta1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsNodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsNodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.osVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsNodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsNodeConfig message. + * @function verify + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsNodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + switch (message.osVersion) { + default: + return "osVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig + */ + WindowsNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WindowsNodeConfig) + return object; + var message = new $root.google.container.v1beta1.WindowsNodeConfig(); + switch (object.osVersion) { + default: + if (typeof object.osVersion === "number") { + message.osVersion = object.osVersion; + break; + } + break; + case "OS_VERSION_UNSPECIFIED": + case 0: + message.osVersion = 0; + break; + case "OS_VERSION_LTSC2019": + case 1: + message.osVersion = 1; + break; + case "OS_VERSION_LTSC2022": + case 2: + message.osVersion = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {google.container.v1beta1.WindowsNodeConfig} message WindowsNodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsNodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.osVersion = options.enums === String ? "OS_VERSION_UNSPECIFIED" : 0; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = options.enums === String ? $root.google.container.v1beta1.WindowsNodeConfig.OSVersion[message.osVersion] === undefined ? message.osVersion : $root.google.container.v1beta1.WindowsNodeConfig.OSVersion[message.osVersion] : message.osVersion; + return object; + }; + + /** + * Converts this WindowsNodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WindowsNodeConfig + * @instance + * @returns {Object.} JSON object + */ + WindowsNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WindowsNodeConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WindowsNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WindowsNodeConfig"; + }; + + /** + * OSVersion enum. + * @name google.container.v1beta1.WindowsNodeConfig.OSVersion + * @enum {number} + * @property {number} OS_VERSION_UNSPECIFIED=0 OS_VERSION_UNSPECIFIED value + * @property {number} OS_VERSION_LTSC2019=1 OS_VERSION_LTSC2019 value + * @property {number} OS_VERSION_LTSC2022=2 OS_VERSION_LTSC2022 value + */ + WindowsNodeConfig.OSVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OS_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "OS_VERSION_LTSC2019"] = 1; + values[valuesById[2] = "OS_VERSION_LTSC2022"] = 2; + return values; + })(); + + return WindowsNodeConfig; + })(); + + v1beta1.NodeKubeletConfig = (function() { + + /** + * Properties of a NodeKubeletConfig. + * @memberof google.container.v1beta1 + * @interface INodeKubeletConfig + * @property {string|null} [cpuManagerPolicy] NodeKubeletConfig cpuManagerPolicy + * @property {google.protobuf.IBoolValue|null} [cpuCfsQuota] NodeKubeletConfig cpuCfsQuota + * @property {string|null} [cpuCfsQuotaPeriod] NodeKubeletConfig cpuCfsQuotaPeriod + * @property {number|Long|null} [podPidsLimit] NodeKubeletConfig podPidsLimit + * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] NodeKubeletConfig insecureKubeletReadonlyPortEnabled + */ + + /** + * Constructs a new NodeKubeletConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeKubeletConfig. + * @implements INodeKubeletConfig + * @constructor + * @param {google.container.v1beta1.INodeKubeletConfig=} [properties] Properties to set + */ + function NodeKubeletConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeKubeletConfig cpuManagerPolicy. + * @member {string} cpuManagerPolicy + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuManagerPolicy = ""; + + /** + * NodeKubeletConfig cpuCfsQuota. + * @member {google.protobuf.IBoolValue|null|undefined} cpuCfsQuota + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuCfsQuota = null; + + /** + * NodeKubeletConfig cpuCfsQuotaPeriod. + * @member {string} cpuCfsQuotaPeriod + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.cpuCfsQuotaPeriod = ""; + + /** + * NodeKubeletConfig podPidsLimit. + * @member {number|Long} podPidsLimit + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.podPidsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * NodeKubeletConfig insecureKubeletReadonlyPortEnabled. + * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.insecureKubeletReadonlyPortEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. + * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + */ + Object.defineProperty(NodeKubeletConfig.prototype, "_insecureKubeletReadonlyPortEnabled", { + get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeKubeletConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {google.container.v1beta1.INodeKubeletConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig instance + */ + NodeKubeletConfig.create = function create(properties) { + return new NodeKubeletConfig(properties); + }; + + /** + * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {google.container.v1beta1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeKubeletConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuManagerPolicy != null && Object.hasOwnProperty.call(message, "cpuManagerPolicy")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpuManagerPolicy); + if (message.cpuCfsQuota != null && Object.hasOwnProperty.call(message, "cpuCfsQuota")) + $root.google.protobuf.BoolValue.encode(message.cpuCfsQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cpuCfsQuotaPeriod != null && Object.hasOwnProperty.call(message, "cpuCfsQuotaPeriod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cpuCfsQuotaPeriod); + if (message.podPidsLimit != null && Object.hasOwnProperty.call(message, "podPidsLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.podPidsLimit); + if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.insecureKubeletReadonlyPortEnabled); + return writer; + }; + + /** + * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {google.container.v1beta1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeKubeletConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeKubeletConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeKubeletConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpuManagerPolicy = reader.string(); + break; + } + case 2: { + message.cpuCfsQuota = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cpuCfsQuotaPeriod = reader.string(); + break; + } + case 4: { + message.podPidsLimit = reader.int64(); + break; + } + case 7: { + message.insecureKubeletReadonlyPortEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeKubeletConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeKubeletConfig message. + * @function verify + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeKubeletConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) + if (!$util.isString(message.cpuManagerPolicy)) + return "cpuManagerPolicy: string expected"; + if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) { + var error = $root.google.protobuf.BoolValue.verify(message.cpuCfsQuota); + if (error) + return "cpuCfsQuota." + error; + } + if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) + if (!$util.isString(message.cpuCfsQuotaPeriod)) + return "cpuCfsQuotaPeriod: string expected"; + if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) + if (!$util.isInteger(message.podPidsLimit) && !(message.podPidsLimit && $util.isInteger(message.podPidsLimit.low) && $util.isInteger(message.podPidsLimit.high))) + return "podPidsLimit: integer|Long expected"; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + properties._insecureKubeletReadonlyPortEnabled = 1; + if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") + return "insecureKubeletReadonlyPortEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig + */ + NodeKubeletConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeKubeletConfig) + return object; + var message = new $root.google.container.v1beta1.NodeKubeletConfig(); + if (object.cpuManagerPolicy != null) + message.cpuManagerPolicy = String(object.cpuManagerPolicy); + if (object.cpuCfsQuota != null) { + if (typeof object.cpuCfsQuota !== "object") + throw TypeError(".google.container.v1beta1.NodeKubeletConfig.cpuCfsQuota: object expected"); + message.cpuCfsQuota = $root.google.protobuf.BoolValue.fromObject(object.cpuCfsQuota); + } + if (object.cpuCfsQuotaPeriod != null) + message.cpuCfsQuotaPeriod = String(object.cpuCfsQuotaPeriod); + if (object.podPidsLimit != null) + if ($util.Long) + (message.podPidsLimit = $util.Long.fromValue(object.podPidsLimit)).unsigned = false; + else if (typeof object.podPidsLimit === "string") + message.podPidsLimit = parseInt(object.podPidsLimit, 10); + else if (typeof object.podPidsLimit === "number") + message.podPidsLimit = object.podPidsLimit; + else if (typeof object.podPidsLimit === "object") + message.podPidsLimit = new $util.LongBits(object.podPidsLimit.low >>> 0, object.podPidsLimit.high >>> 0).toNumber(); + if (object.insecureKubeletReadonlyPortEnabled != null) + message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); + return message; + }; + + /** + * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {google.container.v1beta1.NodeKubeletConfig} message NodeKubeletConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeKubeletConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpuManagerPolicy = ""; + object.cpuCfsQuota = null; + object.cpuCfsQuotaPeriod = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.podPidsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.podPidsLimit = options.longs === String ? "0" : 0; + } + if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) + object.cpuManagerPolicy = message.cpuManagerPolicy; + if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) + object.cpuCfsQuota = $root.google.protobuf.BoolValue.toObject(message.cpuCfsQuota, options); + if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) + object.cpuCfsQuotaPeriod = message.cpuCfsQuotaPeriod; + if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) + if (typeof message.podPidsLimit === "number") + object.podPidsLimit = options.longs === String ? String(message.podPidsLimit) : message.podPidsLimit; + else + object.podPidsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.podPidsLimit) : options.longs === Number ? new $util.LongBits(message.podPidsLimit.low >>> 0, message.podPidsLimit.high >>> 0).toNumber() : message.podPidsLimit; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; + if (options.oneofs) + object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; + } + return object; + }; + + /** + * Converts this NodeKubeletConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeKubeletConfig + * @instance + * @returns {Object.} JSON object + */ + NodeKubeletConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeKubeletConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeKubeletConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeKubeletConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeKubeletConfig"; + }; + + return NodeKubeletConfig; + })(); + + v1beta1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.container.v1beta1 + * @interface INodeConfig + * @property {string|null} [machineType] NodeConfig machineType + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Object.|null} [metadata] NodeConfig metadata + * @property {string|null} [imageType] NodeConfig imageType + * @property {Object.|null} [labels] NodeConfig labels + * @property {number|null} [localSsdCount] NodeConfig localSsdCount + * @property {Array.|null} [tags] NodeConfig tags + * @property {boolean|null} [preemptible] NodeConfig preemptible + * @property {Array.|null} [accelerators] NodeConfig accelerators + * @property {google.container.v1beta1.ISandboxConfig|null} [sandboxConfig] NodeConfig sandboxConfig + * @property {string|null} [nodeGroup] NodeConfig nodeGroup + * @property {google.container.v1beta1.IReservationAffinity|null} [reservationAffinity] NodeConfig reservationAffinity + * @property {string|null} [diskType] NodeConfig diskType + * @property {string|null} [minCpuPlatform] NodeConfig minCpuPlatform + * @property {google.container.v1beta1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] NodeConfig workloadMetadataConfig + * @property {Array.|null} [taints] NodeConfig taints + * @property {string|null} [bootDiskKmsKey] NodeConfig bootDiskKmsKey + * @property {google.container.v1beta1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] NodeConfig shieldedInstanceConfig + * @property {google.container.v1beta1.ILinuxNodeConfig|null} [linuxNodeConfig] NodeConfig linuxNodeConfig + * @property {google.container.v1beta1.INodeKubeletConfig|null} [kubeletConfig] NodeConfig kubeletConfig + * @property {google.container.v1beta1.IEphemeralStorageConfig|null} [ephemeralStorageConfig] NodeConfig ephemeralStorageConfig + * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] NodeConfig gcfsConfig + * @property {google.container.v1beta1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] NodeConfig advancedMachineFeatures + * @property {google.container.v1beta1.IVirtualNIC|null} [gvnic] NodeConfig gvnic + * @property {boolean|null} [spot] NodeConfig spot + * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] NodeConfig confidentialNodes + * @property {google.container.v1beta1.IFastSocket|null} [fastSocket] NodeConfig fastSocket + * @property {Object.|null} [resourceLabels] NodeConfig resourceLabels + * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfig loggingConfig + * @property {google.container.v1beta1.IWindowsNodeConfig|null} [windowsNodeConfig] NodeConfig windowsNodeConfig + * @property {google.container.v1beta1.ILocalNvmeSsdBlockConfig|null} [localNvmeSsdBlockConfig] NodeConfig localNvmeSsdBlockConfig + * @property {google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null} [ephemeralStorageLocalSsdConfig] NodeConfig ephemeralStorageLocalSsdConfig + * @property {google.container.v1beta1.ISoleTenantConfig|null} [soleTenantConfig] NodeConfig soleTenantConfig + * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] NodeConfig containerdConfig + * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [hostMaintenancePolicy] NodeConfig hostMaintenancePolicy + * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] NodeConfig resourceManagerTags + * @property {boolean|null} [enableConfidentialStorage] NodeConfig enableConfidentialStorage + * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks + * @property {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.container.v1beta1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + this.metadata = {}; + this.labels = {}; + this.tags = []; + this.accelerators = []; + this.taints = []; + this.resourceLabels = {}; + this.secondaryBootDisks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig metadata. + * @member {Object.} metadata + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.metadata = $util.emptyObject; + + /** + * NodeConfig imageType. + * @member {string} imageType + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.imageType = ""; + + /** + * NodeConfig labels. + * @member {Object.} labels + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.labels = $util.emptyObject; + + /** + * NodeConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.localSsdCount = 0; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig preemptible. + * @member {boolean} preemptible + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.preemptible = false; + + /** + * NodeConfig accelerators. + * @member {Array.} accelerators + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.accelerators = $util.emptyArray; + + /** + * NodeConfig sandboxConfig. + * @member {google.container.v1beta1.ISandboxConfig|null|undefined} sandboxConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.sandboxConfig = null; + + /** + * NodeConfig nodeGroup. + * @member {string} nodeGroup + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.nodeGroup = ""; + + /** + * NodeConfig reservationAffinity. + * @member {google.container.v1beta1.IReservationAffinity|null|undefined} reservationAffinity + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.reservationAffinity = null; + + /** + * NodeConfig diskType. + * @member {string} diskType + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskType = ""; + + /** + * NodeConfig minCpuPlatform. + * @member {string} minCpuPlatform + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.minCpuPlatform = ""; + + /** + * NodeConfig workloadMetadataConfig. + * @member {google.container.v1beta1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.workloadMetadataConfig = null; + + /** + * NodeConfig taints. + * @member {Array.} taints + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.taints = $util.emptyArray; + + /** + * NodeConfig bootDiskKmsKey. + * @member {string} bootDiskKmsKey + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.bootDiskKmsKey = ""; + + /** + * NodeConfig shieldedInstanceConfig. + * @member {google.container.v1beta1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.shieldedInstanceConfig = null; + + /** + * NodeConfig linuxNodeConfig. + * @member {google.container.v1beta1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.linuxNodeConfig = null; + + /** + * NodeConfig kubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} kubeletConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.kubeletConfig = null; + + /** + * NodeConfig ephemeralStorageConfig. + * @member {google.container.v1beta1.IEphemeralStorageConfig|null|undefined} ephemeralStorageConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.ephemeralStorageConfig = null; + + /** + * NodeConfig gcfsConfig. + * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.gcfsConfig = null; + + /** + * NodeConfig advancedMachineFeatures. + * @member {google.container.v1beta1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.advancedMachineFeatures = null; + + /** + * NodeConfig gvnic. + * @member {google.container.v1beta1.IVirtualNIC|null|undefined} gvnic + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.gvnic = null; + + /** + * NodeConfig spot. + * @member {boolean} spot + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.spot = false; + + /** + * NodeConfig confidentialNodes. + * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.confidentialNodes = null; + + /** + * NodeConfig fastSocket. + * @member {google.container.v1beta1.IFastSocket|null|undefined} fastSocket + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.fastSocket = null; + + /** + * NodeConfig resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.resourceLabels = $util.emptyObject; + + /** + * NodeConfig loggingConfig. + * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.loggingConfig = null; + + /** + * NodeConfig windowsNodeConfig. + * @member {google.container.v1beta1.IWindowsNodeConfig|null|undefined} windowsNodeConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.windowsNodeConfig = null; + + /** + * NodeConfig localNvmeSsdBlockConfig. + * @member {google.container.v1beta1.ILocalNvmeSsdBlockConfig|null|undefined} localNvmeSsdBlockConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.localNvmeSsdBlockConfig = null; + + /** + * NodeConfig ephemeralStorageLocalSsdConfig. + * @member {google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null|undefined} ephemeralStorageLocalSsdConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.ephemeralStorageLocalSsdConfig = null; + + /** + * NodeConfig soleTenantConfig. + * @member {google.container.v1beta1.ISoleTenantConfig|null|undefined} soleTenantConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.soleTenantConfig = null; + + /** + * NodeConfig containerdConfig. + * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.containerdConfig = null; + + /** + * NodeConfig hostMaintenancePolicy. + * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} hostMaintenancePolicy + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.hostMaintenancePolicy = null; + + /** + * NodeConfig resourceManagerTags. + * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.resourceManagerTags = null; + + /** + * NodeConfig enableConfidentialStorage. + * @member {boolean} enableConfidentialStorage + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.enableConfidentialStorage = false; + + /** + * NodeConfig secondaryBootDisks. + * @member {Array.} secondaryBootDisks + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.secondaryBootDisks = $util.emptyArray; + + /** + * NodeConfig secondaryBootDiskUpdateStrategy. + * @member {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null|undefined} secondaryBootDiskUpdateStrategy + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeConfig _fastSocket. + * @member {"fastSocket"|undefined} _fastSocket + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_fastSocket", { + get: $util.oneOfGetter($oneOfFields = ["fastSocket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeConfig _secondaryBootDiskUpdateStrategy. + * @member {"secondaryBootDiskUpdateStrategy"|undefined} _secondaryBootDiskUpdateStrategy + * @memberof google.container.v1beta1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_secondaryBootDiskUpdateStrategy", { + get: $util.oneOfGetter($oneOfFields = ["secondaryBootDiskUpdateStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {google.container.v1beta1.INodeConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {google.container.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.oauthScopes[i]); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageType); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.localSsdCount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.preemptible); + if (message.accelerators != null && message.accelerators.length) + for (var i = 0; i < message.accelerators.length; ++i) + $root.google.container.v1beta1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.diskType); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.minCpuPlatform); + if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) + $root.google.container.v1beta1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.container.v1beta1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sandboxConfig != null && Object.hasOwnProperty.call(message, "sandboxConfig")) + $root.google.container.v1beta1.SandboxConfig.encode(message.sandboxConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.nodeGroup != null && Object.hasOwnProperty.call(message, "nodeGroup")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.nodeGroup); + if (message.reservationAffinity != null && Object.hasOwnProperty.call(message, "reservationAffinity")) + $root.google.container.v1beta1.ReservationAffinity.encode(message.reservationAffinity, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) + $root.google.container.v1beta1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1beta1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.bootDiskKmsKey); + if (message.ephemeralStorageConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageConfig")) + $root.google.container.v1beta1.EphemeralStorageConfig.encode(message.ephemeralStorageConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.container.v1beta1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) + $root.google.container.v1beta1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.spot != null && Object.hasOwnProperty.call(message, "spot")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.spot); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) + $root.google.container.v1beta1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 37, wireType 2 =*/298).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) + $root.google.container.v1beta1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.localNvmeSsdBlockConfig != null && Object.hasOwnProperty.call(message, "localNvmeSsdBlockConfig")) + $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.encode(message.localNvmeSsdBlockConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.ephemeralStorageLocalSsdConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageLocalSsdConfig")) + $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.encode(message.ephemeralStorageLocalSsdConfig, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.soleTenantConfig != null && Object.hasOwnProperty.call(message, "soleTenantConfig")) + $root.google.container.v1beta1.SoleTenantConfig.encode(message.soleTenantConfig, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.hostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "hostMaintenancePolicy")) + $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.hostMaintenancePolicy, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.enableConfidentialStorage != null && Object.hasOwnProperty.call(message, "enableConfidentialStorage")) + writer.uint32(/* id 46, wireType 0 =*/368).bool(message.enableConfidentialStorage); + if (message.secondaryBootDisks != null && message.secondaryBootDisks.length) + for (var i = 0; i < message.secondaryBootDisks.length; ++i) + $root.google.container.v1beta1.SecondaryBootDisk.encode(message.secondaryBootDisks[i], writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) + $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {google.container.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + case 2: { + message.diskSizeGb = reader.int32(); + break; + } + case 3: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + case 4: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + } + case 5: { + message.imageType = reader.string(); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 7: { + message.localSsdCount = reader.int32(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 10: { + message.preemptible = reader.bool(); + break; + } + case 11: { + if (!(message.accelerators && message.accelerators.length)) + message.accelerators = []; + message.accelerators.push($root.google.container.v1beta1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 17: { + message.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.nodeGroup = reader.string(); + break; + } + case 19: { + message.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.decode(reader, reader.uint32()); + break; + } + case 12: { + message.diskType = reader.string(); + break; + } + case 13: { + message.minCpuPlatform = reader.string(); + break; + } + case 14: { + message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.container.v1beta1.NodeTaint.decode(reader, reader.uint32())); + break; + } + case 23: { + message.bootDiskKmsKey = reader.string(); + break; + } + case 20: { + message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 24: { + message.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.decode(reader, reader.uint32()); + break; + } + case 25: { + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 26: { + message.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 29: { + message.gvnic = $root.google.container.v1beta1.VirtualNIC.decode(reader, reader.uint32()); + break; + } + case 32: { + message.spot = reader.bool(); + break; + } + case 35: { + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 36: { + message.fastSocket = $root.google.container.v1beta1.FastSocket.decode(reader, reader.uint32()); + break; + } + case 37: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 38: { + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 39: { + message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.decode(reader, reader.uint32()); + break; + } + case 40: { + message.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.decode(reader, reader.uint32()); + break; + } + case 41: { + message.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.decode(reader, reader.uint32()); + break; + } + case 42: { + message.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.decode(reader, reader.uint32()); + break; + } + case 43: { + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 44: { + message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 45: { + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 46: { + message.enableConfidentialStorage = reader.bool(); + break; + } + case 48: { + if (!(message.secondaryBootDisks && message.secondaryBootDisks.length)) + message.secondaryBootDisks = []; + message.secondaryBootDisks.push($root.google.container.v1beta1.SecondaryBootDisk.decode(reader, reader.uint32())); + break; + } + case 50: { + message.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + if (message.accelerators != null && message.hasOwnProperty("accelerators")) { + if (!Array.isArray(message.accelerators)) + return "accelerators: array expected"; + for (var i = 0; i < message.accelerators.length; ++i) { + var error = $root.google.container.v1beta1.AcceleratorConfig.verify(message.accelerators[i]); + if (error) + return "accelerators." + error; + } + } + if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) { + var error = $root.google.container.v1beta1.SandboxConfig.verify(message.sandboxConfig); + if (error) + return "sandboxConfig." + error; + } + if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) + if (!$util.isString(message.nodeGroup)) + return "nodeGroup: string expected"; + if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) { + var error = $root.google.container.v1beta1.ReservationAffinity.verify(message.reservationAffinity); + if (error) + return "reservationAffinity." + error; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { + var error = $root.google.container.v1beta1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); + if (error) + return "workloadMetadataConfig." + 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.container.v1beta1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + if (!$util.isString(message.bootDiskKmsKey)) + return "bootDiskKmsKey: string expected"; + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { + var error = $root.google.container.v1beta1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); + if (error) + return "shieldedInstanceConfig." + error; + } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1beta1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.kubeletConfig); + if (error) + return "kubeletConfig." + error; + } + if (message.ephemeralStorageConfig != null && message.hasOwnProperty("ephemeralStorageConfig")) { + var error = $root.google.container.v1beta1.EphemeralStorageConfig.verify(message.ephemeralStorageConfig); + if (error) + return "ephemeralStorageConfig." + error; + } + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + var error = $root.google.container.v1beta1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + if (message.gvnic != null && message.hasOwnProperty("gvnic")) { + var error = $root.google.container.v1beta1.VirtualNIC.verify(message.gvnic); + if (error) + return "gvnic." + error; + } + if (message.spot != null && message.hasOwnProperty("spot")) + if (typeof message.spot !== "boolean") + return "spot: boolean expected"; + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + properties._fastSocket = 1; + { + var error = $root.google.container.v1beta1.FastSocket.verify(message.fastSocket); + if (error) + return "fastSocket." + error; + } + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { + var error = $root.google.container.v1beta1.WindowsNodeConfig.verify(message.windowsNodeConfig); + if (error) + return "windowsNodeConfig." + error; + } + if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) { + var error = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.verify(message.localNvmeSsdBlockConfig); + if (error) + return "localNvmeSsdBlockConfig." + error; + } + if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) { + var error = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify(message.ephemeralStorageLocalSsdConfig); + if (error) + return "ephemeralStorageLocalSsdConfig." + error; + } + if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) { + var error = $root.google.container.v1beta1.SoleTenantConfig.verify(message.soleTenantConfig); + if (error) + return "soleTenantConfig." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) { + var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.hostMaintenancePolicy); + if (error) + return "hostMaintenancePolicy." + error; + } + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) + if (typeof message.enableConfidentialStorage !== "boolean") + return "enableConfidentialStorage: boolean expected"; + if (message.secondaryBootDisks != null && message.hasOwnProperty("secondaryBootDisks")) { + if (!Array.isArray(message.secondaryBootDisks)) + return "secondaryBootDisks: array expected"; + for (var i = 0; i < message.secondaryBootDisks.length; ++i) { + var error = $root.google.container.v1beta1.SecondaryBootDisk.verify(message.secondaryBootDisks[i]); + if (error) + return "secondaryBootDisks." + error; + } + } + if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { + properties._secondaryBootDiskUpdateStrategy = 1; + { + var error = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify(message.secondaryBootDiskUpdateStrategy); + if (error) + return "secondaryBootDiskUpdateStrategy." + error; + } + } + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeConfig) + return object; + var message = new $root.google.container.v1beta1.NodeConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.container.v1beta1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.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.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.container.v1beta1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.accelerators) { + if (!Array.isArray(object.accelerators)) + throw TypeError(".google.container.v1beta1.NodeConfig.accelerators: array expected"); + message.accelerators = []; + for (var i = 0; i < object.accelerators.length; ++i) { + if (typeof object.accelerators[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.accelerators: object expected"); + message.accelerators[i] = $root.google.container.v1beta1.AcceleratorConfig.fromObject(object.accelerators[i]); + } + } + if (object.sandboxConfig != null) { + if (typeof object.sandboxConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.sandboxConfig: object expected"); + message.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.fromObject(object.sandboxConfig); + } + if (object.nodeGroup != null) + message.nodeGroup = String(object.nodeGroup); + if (object.reservationAffinity != null) { + if (typeof object.reservationAffinity !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.reservationAffinity: object expected"); + message.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.fromObject(object.reservationAffinity); + } + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.workloadMetadataConfig != null) { + if (typeof object.workloadMetadataConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.workloadMetadataConfig: object expected"); + message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); + } + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.container.v1beta1.NodeConfig.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.taints: object expected"); + message.taints[i] = $root.google.container.v1beta1.NodeTaint.fromObject(object.taints[i]); + } + } + if (object.bootDiskKmsKey != null) + message.bootDiskKmsKey = String(object.bootDiskKmsKey); + if (object.shieldedInstanceConfig != null) { + if (typeof object.shieldedInstanceConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.shieldedInstanceConfig: object expected"); + message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); + } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } + if (object.kubeletConfig != null) { + if (typeof object.kubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.kubeletConfig: object expected"); + message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.kubeletConfig); + } + if (object.ephemeralStorageConfig != null) { + if (typeof object.ephemeralStorageConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.ephemeralStorageConfig: object expected"); + message.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.fromObject(object.ephemeralStorageConfig); + } + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.gvnic != null) { + if (typeof object.gvnic !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.gvnic: object expected"); + message.gvnic = $root.google.container.v1beta1.VirtualNIC.fromObject(object.gvnic); + } + if (object.spot != null) + message.spot = Boolean(object.spot); + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.fastSocket != null) { + if (typeof object.fastSocket !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.fastSocket: object expected"); + message.fastSocket = $root.google.container.v1beta1.FastSocket.fromObject(object.fastSocket); + } + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.windowsNodeConfig != null) { + if (typeof object.windowsNodeConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.windowsNodeConfig: object expected"); + message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); + } + if (object.localNvmeSsdBlockConfig != null) { + if (typeof object.localNvmeSsdBlockConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.localNvmeSsdBlockConfig: object expected"); + message.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.fromObject(object.localNvmeSsdBlockConfig); + } + if (object.ephemeralStorageLocalSsdConfig != null) { + if (typeof object.ephemeralStorageLocalSsdConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.ephemeralStorageLocalSsdConfig: object expected"); + message.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.fromObject(object.ephemeralStorageLocalSsdConfig); + } + if (object.soleTenantConfig != null) { + if (typeof object.soleTenantConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.soleTenantConfig: object expected"); + message.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.fromObject(object.soleTenantConfig); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.hostMaintenancePolicy != null) { + if (typeof object.hostMaintenancePolicy !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.hostMaintenancePolicy: object expected"); + message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.hostMaintenancePolicy); + } + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.enableConfidentialStorage != null) + message.enableConfidentialStorage = Boolean(object.enableConfidentialStorage); + if (object.secondaryBootDisks) { + if (!Array.isArray(object.secondaryBootDisks)) + throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDisks: array expected"); + message.secondaryBootDisks = []; + for (var i = 0; i < object.secondaryBootDisks.length; ++i) { + if (typeof object.secondaryBootDisks[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDisks: object expected"); + message.secondaryBootDisks[i] = $root.google.container.v1beta1.SecondaryBootDisk.fromObject(object.secondaryBootDisks[i]); + } + } + if (object.secondaryBootDiskUpdateStrategy != null) { + if (typeof object.secondaryBootDiskUpdateStrategy !== "object") + throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); + message.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); + } + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {google.container.v1beta1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + object.accelerators = []; + object.taints = []; + object.secondaryBootDisks = []; + } + if (options.objects || options.defaults) { + object.metadata = {}; + object.labels = {}; + object.resourceLabels = {}; + } + if (options.defaults) { + object.machineType = ""; + object.diskSizeGb = 0; + object.imageType = ""; + object.localSsdCount = 0; + object.serviceAccount = ""; + object.preemptible = false; + object.diskType = ""; + object.minCpuPlatform = ""; + object.workloadMetadataConfig = null; + object.sandboxConfig = null; + object.nodeGroup = ""; + object.reservationAffinity = null; + object.shieldedInstanceConfig = null; + object.linuxNodeConfig = null; + object.kubeletConfig = null; + object.bootDiskKmsKey = ""; + object.ephemeralStorageConfig = null; + object.gcfsConfig = null; + object.advancedMachineFeatures = null; + object.gvnic = null; + object.spot = false; + object.confidentialNodes = null; + object.loggingConfig = null; + object.windowsNodeConfig = null; + object.localNvmeSsdBlockConfig = null; + object.ephemeralStorageLocalSsdConfig = null; + object.soleTenantConfig = null; + object.containerdConfig = null; + object.hostMaintenancePolicy = null; + object.resourceManagerTags = null; + object.enableConfidentialStorage = false; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + 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.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.preemptible != null && message.hasOwnProperty("preemptible")) + object.preemptible = message.preemptible; + if (message.accelerators && message.accelerators.length) { + object.accelerators = []; + for (var j = 0; j < message.accelerators.length; ++j) + object.accelerators[j] = $root.google.container.v1beta1.AcceleratorConfig.toObject(message.accelerators[j], options); + } + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + object.minCpuPlatform = message.minCpuPlatform; + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) + object.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.container.v1beta1.NodeTaint.toObject(message.taints[j], options); + } + if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) + object.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.toObject(message.sandboxConfig, options); + if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) + object.nodeGroup = message.nodeGroup; + if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) + object.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.toObject(message.reservationAffinity, options); + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) + object.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) + object.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.kubeletConfig, options); + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + object.bootDiskKmsKey = message.bootDiskKmsKey; + if (message.ephemeralStorageConfig != null && message.hasOwnProperty("ephemeralStorageConfig")) + object.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.toObject(message.ephemeralStorageConfig, options); + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) + object.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (message.gvnic != null && message.hasOwnProperty("gvnic")) + object.gvnic = $root.google.container.v1beta1.VirtualNIC.toObject(message.gvnic, options); + if (message.spot != null && message.hasOwnProperty("spot")) + object.spot = message.spot; + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + object.fastSocket = $root.google.container.v1beta1.FastSocket.toObject(message.fastSocket, options); + if (options.oneofs) + object._fastSocket = "fastSocket"; + } + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) + object.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); + if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) + object.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.toObject(message.localNvmeSsdBlockConfig, options); + if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) + object.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.toObject(message.ephemeralStorageLocalSsdConfig, options); + if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) + object.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.toObject(message.soleTenantConfig, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) + object.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.hostMaintenancePolicy, options); + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) + object.enableConfidentialStorage = message.enableConfidentialStorage; + if (message.secondaryBootDisks && message.secondaryBootDisks.length) { + object.secondaryBootDisks = []; + for (var j = 0; j < message.secondaryBootDisks.length; ++j) + object.secondaryBootDisks[j] = $root.google.container.v1beta1.SecondaryBootDisk.toObject(message.secondaryBootDisks[j], options); + } + if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { + object.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.toObject(message.secondaryBootDiskUpdateStrategy, options); + if (options.oneofs) + object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; + } + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeConfig"; + }; + + return NodeConfig; + })(); + + v1beta1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.container.v1beta1 + * @interface IAdvancedMachineFeatures + * @property {number|Long|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.container.v1beta1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.container.v1beta1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|Long|null|undefined} threadsPerCore + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {google.container.v1beta1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {google.container.v1beta1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.threadsPerCore); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNestedVirtualization); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {google.container.v1beta1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.threadsPerCore = reader.int64(); + break; + } + case 2: { + message.enableNestedVirtualization = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore) && !(message.threadsPerCore && $util.isInteger(message.threadsPerCore.low) && $util.isInteger(message.threadsPerCore.high))) + return "threadsPerCore: integer|Long expected"; + } + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AdvancedMachineFeatures) + return object; + var message = new $root.google.container.v1beta1.AdvancedMachineFeatures(); + if (object.threadsPerCore != null) + if ($util.Long) + (message.threadsPerCore = $util.Long.fromValue(object.threadsPerCore)).unsigned = false; + else if (typeof object.threadsPerCore === "string") + message.threadsPerCore = parseInt(object.threadsPerCore, 10); + else if (typeof object.threadsPerCore === "number") + message.threadsPerCore = object.threadsPerCore; + else if (typeof object.threadsPerCore === "object") + message.threadsPerCore = new $util.LongBits(object.threadsPerCore.low >>> 0, object.threadsPerCore.high >>> 0).toNumber(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {google.container.v1beta1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + if (typeof message.threadsPerCore === "number") + object.threadsPerCore = options.longs === String ? String(message.threadsPerCore) : message.threadsPerCore; + else + object.threadsPerCore = options.longs === String ? $util.Long.prototype.toString.call(message.threadsPerCore) : options.longs === Number ? new $util.LongBits(message.threadsPerCore.low >>> 0, message.threadsPerCore.high >>> 0).toNumber() : message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.container.v1beta1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1beta1.NodeNetworkConfig = (function() { + + /** + * Properties of a NodeNetworkConfig. + * @memberof google.container.v1beta1 + * @interface INodeNetworkConfig + * @property {boolean|null} [createPodRange] NodeNetworkConfig createPodRange + * @property {string|null} [podRange] NodeNetworkConfig podRange + * @property {string|null} [podIpv4CidrBlock] NodeNetworkConfig podIpv4CidrBlock + * @property {boolean|null} [enablePrivateNodes] NodeNetworkConfig enablePrivateNodes + * @property {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null} [networkPerformanceConfig] NodeNetworkConfig networkPerformanceConfig + * @property {google.container.v1beta1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] NodeNetworkConfig podCidrOverprovisionConfig + * @property {Array.|null} [additionalNodeNetworkConfigs] NodeNetworkConfig additionalNodeNetworkConfigs + * @property {Array.|null} [additionalPodNetworkConfigs] NodeNetworkConfig additionalPodNetworkConfigs + * @property {number|null} [podIpv4RangeUtilization] NodeNetworkConfig podIpv4RangeUtilization + */ + + /** + * Constructs a new NodeNetworkConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeNetworkConfig. + * @implements INodeNetworkConfig + * @constructor + * @param {google.container.v1beta1.INodeNetworkConfig=} [properties] Properties to set + */ + function NodeNetworkConfig(properties) { + this.additionalNodeNetworkConfigs = []; + this.additionalPodNetworkConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeNetworkConfig createPodRange. + * @member {boolean} createPodRange + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.createPodRange = false; + + /** + * NodeNetworkConfig podRange. + * @member {string} podRange + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podRange = ""; + + /** + * NodeNetworkConfig podIpv4CidrBlock. + * @member {string} podIpv4CidrBlock + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podIpv4CidrBlock = ""; + + /** + * NodeNetworkConfig enablePrivateNodes. + * @member {boolean|null|undefined} enablePrivateNodes + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.enablePrivateNodes = null; + + /** + * NodeNetworkConfig networkPerformanceConfig. + * @member {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.networkPerformanceConfig = null; + + /** + * NodeNetworkConfig podCidrOverprovisionConfig. + * @member {google.container.v1beta1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podCidrOverprovisionConfig = null; + + /** + * NodeNetworkConfig additionalNodeNetworkConfigs. + * @member {Array.} additionalNodeNetworkConfigs + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.additionalNodeNetworkConfigs = $util.emptyArray; + + /** + * NodeNetworkConfig additionalPodNetworkConfigs. + * @member {Array.} additionalPodNetworkConfigs + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.additionalPodNetworkConfigs = $util.emptyArray; + + /** + * NodeNetworkConfig podIpv4RangeUtilization. + * @member {number} podIpv4RangeUtilization + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.podIpv4RangeUtilization = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeNetworkConfig _enablePrivateNodes. + * @member {"enablePrivateNodes"|undefined} _enablePrivateNodes + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + Object.defineProperty(NodeNetworkConfig.prototype, "_enablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["enablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeNetworkConfig _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + */ + Object.defineProperty(NodeNetworkConfig.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {google.container.v1beta1.INodeNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig instance + */ + NodeNetworkConfig.create = function create(properties) { + return new NodeNetworkConfig(properties); + }; + + /** + * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {google.container.v1beta1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createPodRange != null && Object.hasOwnProperty.call(message, "createPodRange")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.createPodRange); + if (message.podRange != null && Object.hasOwnProperty.call(message, "podRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.podRange); + if (message.podIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "podIpv4CidrBlock")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.podIpv4CidrBlock); + if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enablePrivateNodes); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) + $root.google.container.v1beta1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.additionalNodeNetworkConfigs != null && message.additionalNodeNetworkConfigs.length) + for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) + $root.google.container.v1beta1.AdditionalNodeNetworkConfig.encode(message.additionalNodeNetworkConfigs[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.additionalPodNetworkConfigs != null && message.additionalPodNetworkConfigs.length) + for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) + $root.google.container.v1beta1.AdditionalPodNetworkConfig.encode(message.additionalPodNetworkConfigs[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.podIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "podIpv4RangeUtilization")) + writer.uint32(/* id 16, wireType 1 =*/129).double(message.podIpv4RangeUtilization); + return writer; + }; + + /** + * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {google.container.v1beta1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.createPodRange = reader.bool(); + break; + } + case 5: { + message.podRange = reader.string(); + break; + } + case 6: { + message.podIpv4CidrBlock = reader.string(); + break; + } + case 9: { + message.enablePrivateNodes = reader.bool(); + break; + } + case 11: { + message.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + if (!(message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length)) + message.additionalNodeNetworkConfigs = []; + message.additionalNodeNetworkConfigs.push($root.google.container.v1beta1.AdditionalNodeNetworkConfig.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length)) + message.additionalPodNetworkConfigs = []; + message.additionalPodNetworkConfigs.push($root.google.container.v1beta1.AdditionalPodNetworkConfig.decode(reader, reader.uint32())); + break; + } + case 16: { + message.podIpv4RangeUtilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeNetworkConfig message. + * @function verify + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) + if (typeof message.createPodRange !== "boolean") + return "createPodRange: boolean expected"; + if (message.podRange != null && message.hasOwnProperty("podRange")) + if (!$util.isString(message.podRange)) + return "podRange: string expected"; + if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) + if (!$util.isString(message.podIpv4CidrBlock)) + return "podIpv4CidrBlock: string expected"; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { + properties._enablePrivateNodes = 1; + if (typeof message.enablePrivateNodes !== "boolean") + return "enablePrivateNodes: boolean expected"; + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { + var error = $root.google.container.v1beta1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); + if (error) + return "podCidrOverprovisionConfig." + error; + } + if (message.additionalNodeNetworkConfigs != null && message.hasOwnProperty("additionalNodeNetworkConfigs")) { + if (!Array.isArray(message.additionalNodeNetworkConfigs)) + return "additionalNodeNetworkConfigs: array expected"; + for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) { + var error = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.verify(message.additionalNodeNetworkConfigs[i]); + if (error) + return "additionalNodeNetworkConfigs." + error; + } + } + if (message.additionalPodNetworkConfigs != null && message.hasOwnProperty("additionalPodNetworkConfigs")) { + if (!Array.isArray(message.additionalPodNetworkConfigs)) + return "additionalPodNetworkConfigs: array expected"; + for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) { + var error = $root.google.container.v1beta1.AdditionalPodNetworkConfig.verify(message.additionalPodNetworkConfigs[i]); + if (error) + return "additionalPodNetworkConfigs." + error; + } + } + if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) + if (typeof message.podIpv4RangeUtilization !== "number") + return "podIpv4RangeUtilization: number expected"; + return null; + }; + + /** + * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig + */ + NodeNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeNetworkConfig) + return object; + var message = new $root.google.container.v1beta1.NodeNetworkConfig(); + if (object.createPodRange != null) + message.createPodRange = Boolean(object.createPodRange); + if (object.podRange != null) + message.podRange = String(object.podRange); + if (object.podIpv4CidrBlock != null) + message.podIpv4CidrBlock = String(object.podIpv4CidrBlock); + if (object.enablePrivateNodes != null) + message.enablePrivateNodes = Boolean(object.enablePrivateNodes); + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.podCidrOverprovisionConfig != null) { + if (typeof object.podCidrOverprovisionConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.podCidrOverprovisionConfig: object expected"); + message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); + } + if (object.additionalNodeNetworkConfigs) { + if (!Array.isArray(object.additionalNodeNetworkConfigs)) + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalNodeNetworkConfigs: array expected"); + message.additionalNodeNetworkConfigs = []; + for (var i = 0; i < object.additionalNodeNetworkConfigs.length; ++i) { + if (typeof object.additionalNodeNetworkConfigs[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalNodeNetworkConfigs: object expected"); + message.additionalNodeNetworkConfigs[i] = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.fromObject(object.additionalNodeNetworkConfigs[i]); + } + } + if (object.additionalPodNetworkConfigs) { + if (!Array.isArray(object.additionalPodNetworkConfigs)) + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalPodNetworkConfigs: array expected"); + message.additionalPodNetworkConfigs = []; + for (var i = 0; i < object.additionalPodNetworkConfigs.length; ++i) { + if (typeof object.additionalPodNetworkConfigs[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalPodNetworkConfigs: object expected"); + message.additionalPodNetworkConfigs[i] = $root.google.container.v1beta1.AdditionalPodNetworkConfig.fromObject(object.additionalPodNetworkConfigs[i]); + } + } + if (object.podIpv4RangeUtilization != null) + message.podIpv4RangeUtilization = Number(object.podIpv4RangeUtilization); + return message; + }; + + /** + * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {google.container.v1beta1.NodeNetworkConfig} message NodeNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.additionalNodeNetworkConfigs = []; + object.additionalPodNetworkConfigs = []; + } + if (options.defaults) { + object.createPodRange = false; + object.podRange = ""; + object.podIpv4CidrBlock = ""; + object.podCidrOverprovisionConfig = null; + object.podIpv4RangeUtilization = 0; + } + if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) + object.createPodRange = message.createPodRange; + if (message.podRange != null && message.hasOwnProperty("podRange")) + object.podRange = message.podRange; + if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) + object.podIpv4CidrBlock = message.podIpv4CidrBlock; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { + object.enablePrivateNodes = message.enablePrivateNodes; + if (options.oneofs) + object._enablePrivateNodes = "enablePrivateNodes"; + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) + object.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); + if (message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length) { + object.additionalNodeNetworkConfigs = []; + for (var j = 0; j < message.additionalNodeNetworkConfigs.length; ++j) + object.additionalNodeNetworkConfigs[j] = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.toObject(message.additionalNodeNetworkConfigs[j], options); + } + if (message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length) { + object.additionalPodNetworkConfigs = []; + for (var j = 0; j < message.additionalPodNetworkConfigs.length; ++j) + object.additionalPodNetworkConfigs[j] = $root.google.container.v1beta1.AdditionalPodNetworkConfig.toObject(message.additionalPodNetworkConfigs[j], options); + } + if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) + object.podIpv4RangeUtilization = options.json && !isFinite(message.podIpv4RangeUtilization) ? String(message.podIpv4RangeUtilization) : message.podIpv4RangeUtilization; + return object; + }; + + /** + * Converts this NodeNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NodeNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeNetworkConfig"; + }; + + NodeNetworkConfig.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.container.v1beta1.NodeNetworkConfig + * @interface INetworkPerformanceConfig + * @property {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + * @property {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [externalIpEgressBandwidthTier] NetworkPerformanceConfig externalIpEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.container.v1beta1.NodeNetworkConfig + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + /** + * NetworkPerformanceConfig externalIpEgressBandwidthTier. + * @member {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} externalIpEgressBandwidthTier + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.externalIpEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkPerformanceConfig _externalIpEgressBandwidthTier. + * @member {"externalIpEgressBandwidthTier"|undefined} _externalIpEgressBandwidthTier + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_externalIpEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["externalIpEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + if (message.externalIpEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "externalIpEgressBandwidthTier")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.externalIpEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + case 2: { + message.externalIpEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.externalIpEgressBandwidthTier != null && message.hasOwnProperty("externalIpEgressBandwidthTier")) { + properties._externalIpEgressBandwidthTier = 1; + switch (message.externalIpEgressBandwidthTier) { + default: + return "externalIpEgressBandwidthTier: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig) + return object; + var message = new $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "TIER_1": + case 1: + message.totalEgressBandwidthTier = 1; + break; + } + switch (object.externalIpEgressBandwidthTier) { + default: + if (typeof object.externalIpEgressBandwidthTier === "number") { + message.externalIpEgressBandwidthTier = object.externalIpEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.externalIpEgressBandwidthTier = 0; + break; + case "TIER_1": + case 1: + message.externalIpEgressBandwidthTier = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + if (message.externalIpEgressBandwidthTier != null && message.hasOwnProperty("externalIpEgressBandwidthTier")) { + object.externalIpEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.externalIpEgressBandwidthTier] === undefined ? message.externalIpEgressBandwidthTier : $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.externalIpEgressBandwidthTier] : message.externalIpEgressBandwidthTier; + if (options.oneofs) + object._externalIpEgressBandwidthTier = "externalIpEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} TIER_1=1 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIER_1"] = 1; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + return NodeNetworkConfig; + })(); + + v1beta1.AdditionalNodeNetworkConfig = (function() { + + /** + * Properties of an AdditionalNodeNetworkConfig. + * @memberof google.container.v1beta1 + * @interface IAdditionalNodeNetworkConfig + * @property {string|null} [network] AdditionalNodeNetworkConfig network + * @property {string|null} [subnetwork] AdditionalNodeNetworkConfig subnetwork + */ + + /** + * Constructs a new AdditionalNodeNetworkConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AdditionalNodeNetworkConfig. + * @implements IAdditionalNodeNetworkConfig + * @constructor + * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig=} [properties] Properties to set + */ + function AdditionalNodeNetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalNodeNetworkConfig network. + * @member {string} network + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @instance + */ + AdditionalNodeNetworkConfig.prototype.network = ""; + + /** + * AdditionalNodeNetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @instance + */ + AdditionalNodeNetworkConfig.prototype.subnetwork = ""; + + /** + * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig instance + */ + AdditionalNodeNetworkConfig.create = function create(properties) { + return new AdditionalNodeNetworkConfig(properties); + }; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalNodeNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + return writer; + }; + + /** + * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalNodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalNodeNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalNodeNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalNodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalNodeNetworkConfig message. + * @function verify + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalNodeNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + return null; + }; + + /** + * Creates an AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig + */ + AdditionalNodeNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AdditionalNodeNetworkConfig) + return object; + var message = new $root.google.container.v1beta1.AdditionalNodeNetworkConfig(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + return message; + }; + + /** + * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {google.container.v1beta1.AdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalNodeNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.subnetwork = ""; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + return object; + }; + + /** + * Converts this AdditionalNodeNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalNodeNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalNodeNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalNodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AdditionalNodeNetworkConfig"; + }; + + return AdditionalNodeNetworkConfig; + })(); + + v1beta1.AdditionalPodNetworkConfig = (function() { + + /** + * Properties of an AdditionalPodNetworkConfig. + * @memberof google.container.v1beta1 + * @interface IAdditionalPodNetworkConfig + * @property {string|null} [subnetwork] AdditionalPodNetworkConfig subnetwork + * @property {string|null} [secondaryPodRange] AdditionalPodNetworkConfig secondaryPodRange + * @property {google.container.v1beta1.IMaxPodsConstraint|null} [maxPodsPerNode] AdditionalPodNetworkConfig maxPodsPerNode + */ + + /** + * Constructs a new AdditionalPodNetworkConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AdditionalPodNetworkConfig. + * @implements IAdditionalPodNetworkConfig + * @constructor + * @param {google.container.v1beta1.IAdditionalPodNetworkConfig=} [properties] Properties to set + */ + function AdditionalPodNetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalPodNetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.subnetwork = ""; + + /** + * AdditionalPodNetworkConfig secondaryPodRange. + * @member {string} secondaryPodRange + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.secondaryPodRange = ""; + + /** + * AdditionalPodNetworkConfig maxPodsPerNode. + * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} maxPodsPerNode + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @instance + */ + AdditionalPodNetworkConfig.prototype.maxPodsPerNode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdditionalPodNetworkConfig _maxPodsPerNode. + * @member {"maxPodsPerNode"|undefined} _maxPodsPerNode + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @instance + */ + Object.defineProperty(AdditionalPodNetworkConfig.prototype, "_maxPodsPerNode", { + get: $util.oneOfGetter($oneOfFields = ["maxPodsPerNode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdditionalPodNetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodNetworkConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig instance + */ + AdditionalPodNetworkConfig.create = function create(properties) { + return new AdditionalPodNetworkConfig(properties); + }; + + /** + * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.secondaryPodRange != null && Object.hasOwnProperty.call(message, "secondaryPodRange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryPodRange); + if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) + $root.google.container.v1beta1.MaxPodsConstraint.encode(message.maxPodsPerNode, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalPodNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 2: { + message.secondaryPodRange = reader.string(); + break; + } + case 3: { + message.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalPodNetworkConfig message. + * @function verify + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalPodNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) + if (!$util.isString(message.secondaryPodRange)) + return "secondaryPodRange: string expected"; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { + properties._maxPodsPerNode = 1; + { + var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.maxPodsPerNode); + if (error) + return "maxPodsPerNode." + error; + } + } + return null; + }; + + /** + * Creates an AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig + */ + AdditionalPodNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AdditionalPodNetworkConfig) + return object; + var message = new $root.google.container.v1beta1.AdditionalPodNetworkConfig(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.secondaryPodRange != null) + message.secondaryPodRange = String(object.secondaryPodRange); + if (object.maxPodsPerNode != null) { + if (typeof object.maxPodsPerNode !== "object") + throw TypeError(".google.container.v1beta1.AdditionalPodNetworkConfig.maxPodsPerNode: object expected"); + message.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.maxPodsPerNode); + } + return message; + }; + + /** + * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {google.container.v1beta1.AdditionalPodNetworkConfig} message AdditionalPodNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalPodNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subnetwork = ""; + object.secondaryPodRange = ""; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) + object.secondaryPodRange = message.secondaryPodRange; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { + object.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.maxPodsPerNode, options); + if (options.oneofs) + object._maxPodsPerNode = "maxPodsPerNode"; + } + return object; + }; + + /** + * Converts this AdditionalPodNetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalPodNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalPodNetworkConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AdditionalPodNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalPodNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AdditionalPodNetworkConfig"; + }; + + return AdditionalPodNetworkConfig; + })(); + + v1beta1.ShieldedInstanceConfig = (function() { + + /** + * Properties of a ShieldedInstanceConfig. + * @memberof google.container.v1beta1 + * @interface IShieldedInstanceConfig + * @property {boolean|null} [enableSecureBoot] ShieldedInstanceConfig enableSecureBoot + * @property {boolean|null} [enableIntegrityMonitoring] ShieldedInstanceConfig enableIntegrityMonitoring + */ + + /** + * Constructs a new ShieldedInstanceConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ShieldedInstanceConfig. + * @implements IShieldedInstanceConfig + * @constructor + * @param {google.container.v1beta1.IShieldedInstanceConfig=} [properties] Properties to set + */ + function ShieldedInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShieldedInstanceConfig enableSecureBoot. + * @member {boolean} enableSecureBoot + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @instance + */ + ShieldedInstanceConfig.prototype.enableSecureBoot = false; + + /** + * ShieldedInstanceConfig enableIntegrityMonitoring. + * @member {boolean} enableIntegrityMonitoring + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @instance + */ + ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = false; + + /** + * Creates a new ShieldedInstanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {google.container.v1beta1.IShieldedInstanceConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig instance + */ + ShieldedInstanceConfig.create = function create(properties) { + return new ShieldedInstanceConfig(properties); + }; + + /** + * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {google.container.v1beta1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableSecureBoot != null && Object.hasOwnProperty.call(message, "enableSecureBoot")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSecureBoot); + if (message.enableIntegrityMonitoring != null && Object.hasOwnProperty.call(message, "enableIntegrityMonitoring")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableIntegrityMonitoring); + return writer; + }; + + /** + * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {google.container.v1beta1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedInstanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ShieldedInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableSecureBoot = reader.bool(); + break; + } + case 2: { + message.enableIntegrityMonitoring = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShieldedInstanceConfig message. + * @function verify + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShieldedInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + if (typeof message.enableSecureBoot !== "boolean") + return "enableSecureBoot: boolean expected"; + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + if (typeof message.enableIntegrityMonitoring !== "boolean") + return "enableIntegrityMonitoring: boolean expected"; + return null; + }; + + /** + * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig + */ + ShieldedInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ShieldedInstanceConfig) + return object; + var message = new $root.google.container.v1beta1.ShieldedInstanceConfig(); + if (object.enableSecureBoot != null) + message.enableSecureBoot = Boolean(object.enableSecureBoot); + if (object.enableIntegrityMonitoring != null) + message.enableIntegrityMonitoring = Boolean(object.enableIntegrityMonitoring); + return message; + }; + + /** + * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {google.container.v1beta1.ShieldedInstanceConfig} message ShieldedInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShieldedInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableSecureBoot = false; + object.enableIntegrityMonitoring = false; + } + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + object.enableSecureBoot = message.enableSecureBoot; + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + object.enableIntegrityMonitoring = message.enableIntegrityMonitoring; + return object; + }; + + /** + * Converts this ShieldedInstanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ShieldedInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShieldedInstanceConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ShieldedInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShieldedInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ShieldedInstanceConfig"; + }; + + return ShieldedInstanceConfig; + })(); + + v1beta1.SandboxConfig = (function() { + + /** + * Properties of a SandboxConfig. + * @memberof google.container.v1beta1 + * @interface ISandboxConfig + * @property {string|null} [sandboxType] SandboxConfig sandboxType + * @property {google.container.v1beta1.SandboxConfig.Type|null} [type] SandboxConfig type + */ + + /** + * Constructs a new SandboxConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a SandboxConfig. + * @implements ISandboxConfig + * @constructor + * @param {google.container.v1beta1.ISandboxConfig=} [properties] Properties to set + */ + function SandboxConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SandboxConfig sandboxType. + * @member {string} sandboxType + * @memberof google.container.v1beta1.SandboxConfig + * @instance + */ + SandboxConfig.prototype.sandboxType = ""; + + /** + * SandboxConfig type. + * @member {google.container.v1beta1.SandboxConfig.Type} type + * @memberof google.container.v1beta1.SandboxConfig + * @instance + */ + SandboxConfig.prototype.type = 0; + + /** + * Creates a new SandboxConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {google.container.v1beta1.ISandboxConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig instance + */ + SandboxConfig.create = function create(properties) { + return new SandboxConfig(properties); + }; + + /** + * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {google.container.v1beta1.ISandboxConfig} message SandboxConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SandboxConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sandboxType != null && Object.hasOwnProperty.call(message, "sandboxType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sandboxType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {google.container.v1beta1.ISandboxConfig} message SandboxConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SandboxConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SandboxConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SandboxConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sandboxType = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SandboxConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SandboxConfig message. + * @function verify + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SandboxConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sandboxType != null && message.hasOwnProperty("sandboxType")) + if (!$util.isString(message.sandboxType)) + return "sandboxType: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig + */ + SandboxConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SandboxConfig) + return object; + var message = new $root.google.container.v1beta1.SandboxConfig(); + if (object.sandboxType != null) + message.sandboxType = String(object.sandboxType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.type = 0; + break; + case "GVISOR": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {google.container.v1beta1.SandboxConfig} message SandboxConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SandboxConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sandboxType = ""; + object.type = options.enums === String ? "UNSPECIFIED" : 0; + } + if (message.sandboxType != null && message.hasOwnProperty("sandboxType")) + object.sandboxType = message.sandboxType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1beta1.SandboxConfig.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.SandboxConfig.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this SandboxConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SandboxConfig + * @instance + * @returns {Object.} JSON object + */ + SandboxConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SandboxConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.SandboxConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SandboxConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SandboxConfig"; + }; + + /** + * Type enum. + * @name google.container.v1beta1.SandboxConfig.Type + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} GVISOR=1 GVISOR value + */ + SandboxConfig.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "GVISOR"] = 1; + return values; + })(); + + return SandboxConfig; + })(); + + v1beta1.EphemeralStorageConfig = (function() { + + /** + * Properties of an EphemeralStorageConfig. + * @memberof google.container.v1beta1 + * @interface IEphemeralStorageConfig + * @property {number|null} [localSsdCount] EphemeralStorageConfig localSsdCount + */ + + /** + * Constructs a new EphemeralStorageConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an EphemeralStorageConfig. + * @implements IEphemeralStorageConfig + * @constructor + * @param {google.container.v1beta1.IEphemeralStorageConfig=} [properties] Properties to set + */ + function EphemeralStorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EphemeralStorageConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @instance + */ + EphemeralStorageConfig.prototype.localSsdCount = 0; + + /** + * Creates a new EphemeralStorageConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig instance + */ + EphemeralStorageConfig.create = function create(properties) { + return new EphemeralStorageConfig(properties); + }; + + /** + * Encodes the specified EphemeralStorageConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageConfig} message EphemeralStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); + return writer; + }; + + /** + * Encodes the specified EphemeralStorageConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageConfig} message EphemeralStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EphemeralStorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EphemeralStorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.localSsdCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EphemeralStorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EphemeralStorageConfig message. + * @function verify + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EphemeralStorageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + return null; + }; + + /** + * Creates an EphemeralStorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig + */ + EphemeralStorageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.EphemeralStorageConfig) + return object; + var message = new $root.google.container.v1beta1.EphemeralStorageConfig(); + if (object.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + return message; + }; + + /** + * Creates a plain object from an EphemeralStorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {google.container.v1beta1.EphemeralStorageConfig} message EphemeralStorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EphemeralStorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localSsdCount = 0; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + return object; + }; + + /** + * Converts this EphemeralStorageConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @instance + * @returns {Object.} JSON object + */ + EphemeralStorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EphemeralStorageConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.EphemeralStorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EphemeralStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.EphemeralStorageConfig"; + }; + + return EphemeralStorageConfig; + })(); + + v1beta1.LocalNvmeSsdBlockConfig = (function() { + + /** + * Properties of a LocalNvmeSsdBlockConfig. + * @memberof google.container.v1beta1 + * @interface ILocalNvmeSsdBlockConfig + * @property {number|null} [localSsdCount] LocalNvmeSsdBlockConfig localSsdCount + */ + + /** + * Constructs a new LocalNvmeSsdBlockConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a LocalNvmeSsdBlockConfig. + * @implements ILocalNvmeSsdBlockConfig + * @constructor + * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set + */ + function LocalNvmeSsdBlockConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocalNvmeSsdBlockConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @instance + */ + LocalNvmeSsdBlockConfig.prototype.localSsdCount = 0; + + /** + * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig instance + */ + LocalNvmeSsdBlockConfig.create = function create(properties) { + return new LocalNvmeSsdBlockConfig(properties); + }; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalNvmeSsdBlockConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); + return writer; + }; + + /** + * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalNvmeSsdBlockConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalNvmeSsdBlockConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LocalNvmeSsdBlockConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.localSsdCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalNvmeSsdBlockConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalNvmeSsdBlockConfig message. + * @function verify + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalNvmeSsdBlockConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + return null; + }; + + /** + * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig + */ + LocalNvmeSsdBlockConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LocalNvmeSsdBlockConfig) + return object; + var message = new $root.google.container.v1beta1.LocalNvmeSsdBlockConfig(); + if (object.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + return message; + }; + + /** + * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {google.container.v1beta1.LocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalNvmeSsdBlockConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localSsdCount = 0; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + return object; + }; + + /** + * Converts this LocalNvmeSsdBlockConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @instance + * @returns {Object.} JSON object + */ + LocalNvmeSsdBlockConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalNvmeSsdBlockConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalNvmeSsdBlockConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LocalNvmeSsdBlockConfig"; + }; + + return LocalNvmeSsdBlockConfig; + })(); + + v1beta1.EphemeralStorageLocalSsdConfig = (function() { + + /** + * Properties of an EphemeralStorageLocalSsdConfig. + * @memberof google.container.v1beta1 + * @interface IEphemeralStorageLocalSsdConfig + * @property {number|null} [localSsdCount] EphemeralStorageLocalSsdConfig localSsdCount + */ + + /** + * Constructs a new EphemeralStorageLocalSsdConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an EphemeralStorageLocalSsdConfig. + * @implements IEphemeralStorageLocalSsdConfig + * @constructor + * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set + */ + function EphemeralStorageLocalSsdConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EphemeralStorageLocalSsdConfig localSsdCount. + * @member {number} localSsdCount + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @instance + */ + EphemeralStorageLocalSsdConfig.prototype.localSsdCount = 0; + + /** + * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig instance + */ + EphemeralStorageLocalSsdConfig.create = function create(properties) { + return new EphemeralStorageLocalSsdConfig(properties); + }; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageLocalSsdConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); + return writer; + }; + + /** + * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralStorageLocalSsdConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageLocalSsdConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.localSsdCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralStorageLocalSsdConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EphemeralStorageLocalSsdConfig message. + * @function verify + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EphemeralStorageLocalSsdConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + if (!$util.isInteger(message.localSsdCount)) + return "localSsdCount: integer expected"; + return null; + }; + + /** + * Creates an EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig + */ + EphemeralStorageLocalSsdConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig) + return object; + var message = new $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig(); + if (object.localSsdCount != null) + message.localSsdCount = object.localSsdCount | 0; + return message; + }; + + /** + * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {google.container.v1beta1.EphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EphemeralStorageLocalSsdConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localSsdCount = 0; + if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) + object.localSsdCount = message.localSsdCount; + return object; + }; + + /** + * Converts this EphemeralStorageLocalSsdConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @instance + * @returns {Object.} JSON object + */ + EphemeralStorageLocalSsdConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EphemeralStorageLocalSsdConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EphemeralStorageLocalSsdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.EphemeralStorageLocalSsdConfig"; + }; + + return EphemeralStorageLocalSsdConfig; + })(); + + v1beta1.GcfsConfig = (function() { + + /** + * Properties of a GcfsConfig. + * @memberof google.container.v1beta1 + * @interface IGcfsConfig + * @property {boolean|null} [enabled] GcfsConfig enabled + */ + + /** + * Constructs a new GcfsConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GcfsConfig. + * @implements IGcfsConfig + * @constructor + * @param {google.container.v1beta1.IGcfsConfig=} [properties] Properties to set + */ + function GcfsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcfsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GcfsConfig + * @instance + */ + GcfsConfig.prototype.enabled = false; + + /** + * Creates a new GcfsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {google.container.v1beta1.IGcfsConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig instance + */ + GcfsConfig.create = function create(properties) { + return new GcfsConfig(properties); + }; + + /** + * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {google.container.v1beta1.IGcfsConfig} message GcfsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcfsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {google.container.v1beta1.IGcfsConfig} message GcfsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcfsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcfsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcfsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcfsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcfsConfig message. + * @function verify + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcfsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig + */ + GcfsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GcfsConfig) + return object; + var message = new $root.google.container.v1beta1.GcfsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {google.container.v1beta1.GcfsConfig} message GcfsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcfsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcfsConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GcfsConfig + * @instance + * @returns {Object.} JSON object + */ + GcfsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcfsConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GcfsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcfsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GcfsConfig"; + }; + + return GcfsConfig; + })(); + + v1beta1.ReservationAffinity = (function() { + + /** + * Properties of a ReservationAffinity. + * @memberof google.container.v1beta1 + * @interface IReservationAffinity + * @property {google.container.v1beta1.ReservationAffinity.Type|null} [consumeReservationType] ReservationAffinity consumeReservationType + * @property {string|null} [key] ReservationAffinity key + * @property {Array.|null} [values] ReservationAffinity values + */ + + /** + * Constructs a new ReservationAffinity. + * @memberof google.container.v1beta1 + * @classdesc Represents a ReservationAffinity. + * @implements IReservationAffinity + * @constructor + * @param {google.container.v1beta1.IReservationAffinity=} [properties] Properties to set + */ + function ReservationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservationAffinity consumeReservationType. + * @member {google.container.v1beta1.ReservationAffinity.Type} consumeReservationType + * @memberof google.container.v1beta1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.consumeReservationType = 0; + + /** + * ReservationAffinity key. + * @member {string} key + * @memberof google.container.v1beta1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.key = ""; + + /** + * ReservationAffinity values. + * @member {Array.} values + * @memberof google.container.v1beta1.ReservationAffinity + * @instance + */ + ReservationAffinity.prototype.values = $util.emptyArray; + + /** + * Creates a new ReservationAffinity instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {google.container.v1beta1.IReservationAffinity=} [properties] Properties to set + * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity instance + */ + ReservationAffinity.create = function create(properties) { + return new ReservationAffinity(properties); + }; + + /** + * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {google.container.v1beta1.IReservationAffinity} message ReservationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeReservationType != null && Object.hasOwnProperty.call(message, "consumeReservationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeReservationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {google.container.v1beta1.IReservationAffinity} message ReservationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservationAffinity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ReservationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeReservationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservationAffinity message. + * @function verify + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) + switch (message.consumeReservationType) { + default: + return "consumeReservationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity + */ + ReservationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ReservationAffinity) + return object; + var message = new $root.google.container.v1beta1.ReservationAffinity(); + switch (object.consumeReservationType) { + default: + if (typeof object.consumeReservationType === "number") { + message.consumeReservationType = object.consumeReservationType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.consumeReservationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeReservationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeReservationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeReservationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.container.v1beta1.ReservationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {google.container.v1beta1.ReservationAffinity} message ReservationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.consumeReservationType = options.enums === String ? "UNSPECIFIED" : 0; + object.key = ""; + } + if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) + object.consumeReservationType = options.enums === String ? $root.google.container.v1beta1.ReservationAffinity.Type[message.consumeReservationType] === undefined ? message.consumeReservationType : $root.google.container.v1beta1.ReservationAffinity.Type[message.consumeReservationType] : message.consumeReservationType; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this ReservationAffinity to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ReservationAffinity + * @instance + * @returns {Object.} JSON object + */ + ReservationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservationAffinity + * @function getTypeUrl + * @memberof google.container.v1beta1.ReservationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ReservationAffinity"; + }; + + /** + * Type enum. + * @name google.container.v1beta1.ReservationAffinity.Type + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + ReservationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return ReservationAffinity; + })(); + + v1beta1.SoleTenantConfig = (function() { + + /** + * Properties of a SoleTenantConfig. + * @memberof google.container.v1beta1 + * @interface ISoleTenantConfig + * @property {Array.|null} [nodeAffinities] SoleTenantConfig nodeAffinities + */ + + /** + * Constructs a new SoleTenantConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a SoleTenantConfig. + * @implements ISoleTenantConfig + * @constructor + * @param {google.container.v1beta1.ISoleTenantConfig=} [properties] Properties to set + */ + function SoleTenantConfig(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoleTenantConfig nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.container.v1beta1.SoleTenantConfig + * @instance + */ + SoleTenantConfig.prototype.nodeAffinities = $util.emptyArray; + + /** + * Creates a new SoleTenantConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {google.container.v1beta1.ISoleTenantConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig instance + */ + SoleTenantConfig.create = function create(properties) { + return new SoleTenantConfig(properties); + }; + + /** + * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {google.container.v1beta1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {google.container.v1beta1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoleTenantConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SoleTenantConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoleTenantConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoleTenantConfig message. + * @function verify + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoleTenantConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + return null; + }; + + /** + * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig + */ + SoleTenantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SoleTenantConfig) + return object; + var message = new $root.google.container.v1beta1.SoleTenantConfig(); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.container.v1beta1.SoleTenantConfig.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.container.v1beta1.SoleTenantConfig.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {google.container.v1beta1.SoleTenantConfig} message SoleTenantConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoleTenantConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + return object; + }; + + /** + * Converts this SoleTenantConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SoleTenantConfig + * @instance + * @returns {Object.} JSON object + */ + SoleTenantConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoleTenantConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.SoleTenantConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoleTenantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SoleTenantConfig"; + }; + + SoleTenantConfig.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.container.v1beta1.SoleTenantConfig + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.container.v1beta1.SoleTenantConfig + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string} key + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = ""; + + /** + * NodeAffinity operator. + * @member {google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator} operator + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = 0; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set + * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.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.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.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.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity) + return object; + var message = new $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.container.v1beta1.SoleTenantConfig.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {google.container.v1beta1.SoleTenantConfig.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.key = ""; + object.operator = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator[message.operator] : message.operator; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SoleTenantConfig.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + return SoleTenantConfig; + })(); + + v1beta1.ContainerdConfig = (function() { + + /** + * Properties of a ContainerdConfig. + * @memberof google.container.v1beta1 + * @interface IContainerdConfig + * @property {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null} [privateRegistryAccessConfig] ContainerdConfig privateRegistryAccessConfig + */ + + /** + * Constructs a new ContainerdConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ContainerdConfig. + * @implements IContainerdConfig + * @constructor + * @param {google.container.v1beta1.IContainerdConfig=} [properties] Properties to set + */ + function ContainerdConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerdConfig privateRegistryAccessConfig. + * @member {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null|undefined} privateRegistryAccessConfig + * @memberof google.container.v1beta1.ContainerdConfig + * @instance + */ + ContainerdConfig.prototype.privateRegistryAccessConfig = null; + + /** + * Creates a new ContainerdConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {google.container.v1beta1.IContainerdConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig instance + */ + ContainerdConfig.create = function create(properties) { + return new ContainerdConfig(properties); + }; + + /** + * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {google.container.v1beta1.IContainerdConfig} message ContainerdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerdConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateRegistryAccessConfig != null && Object.hasOwnProperty.call(message, "privateRegistryAccessConfig")) + $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.encode(message.privateRegistryAccessConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {google.container.v1beta1.IContainerdConfig} message ContainerdConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerdConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerdConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerdConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerdConfig message. + * @function verify + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerdConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) { + var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify(message.privateRegistryAccessConfig); + if (error) + return "privateRegistryAccessConfig." + error; + } + return null; + }; + + /** + * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig + */ + ContainerdConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ContainerdConfig) + return object; + var message = new $root.google.container.v1beta1.ContainerdConfig(); + if (object.privateRegistryAccessConfig != null) { + if (typeof object.privateRegistryAccessConfig !== "object") + throw TypeError(".google.container.v1beta1.ContainerdConfig.privateRegistryAccessConfig: object expected"); + message.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.fromObject(object.privateRegistryAccessConfig); + } + return message; + }; + + /** + * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig} message ContainerdConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerdConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.privateRegistryAccessConfig = null; + if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) + object.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.toObject(message.privateRegistryAccessConfig, options); + return object; + }; + + /** + * Converts this ContainerdConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ContainerdConfig + * @instance + * @returns {Object.} JSON object + */ + ContainerdConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContainerdConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ContainerdConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig"; + }; + + ContainerdConfig.PrivateRegistryAccessConfig = (function() { + + /** + * Properties of a PrivateRegistryAccessConfig. + * @memberof google.container.v1beta1.ContainerdConfig + * @interface IPrivateRegistryAccessConfig + * @property {boolean|null} [enabled] PrivateRegistryAccessConfig enabled + * @property {Array.|null} [certificateAuthorityDomainConfig] PrivateRegistryAccessConfig certificateAuthorityDomainConfig + */ + + /** + * Constructs a new PrivateRegistryAccessConfig. + * @memberof google.container.v1beta1.ContainerdConfig + * @classdesc Represents a PrivateRegistryAccessConfig. + * @implements IPrivateRegistryAccessConfig + * @constructor + * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set + */ + function PrivateRegistryAccessConfig(properties) { + this.certificateAuthorityDomainConfig = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateRegistryAccessConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + */ + PrivateRegistryAccessConfig.prototype.enabled = false; + + /** + * PrivateRegistryAccessConfig certificateAuthorityDomainConfig. + * @member {Array.} certificateAuthorityDomainConfig + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + */ + PrivateRegistryAccessConfig.prototype.certificateAuthorityDomainConfig = $util.emptyArray; + + /** + * Creates a new PrivateRegistryAccessConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig instance + */ + PrivateRegistryAccessConfig.create = function create(properties) { + return new PrivateRegistryAccessConfig(properties); + }; + + /** + * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateRegistryAccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.certificateAuthorityDomainConfig != null && message.certificateAuthorityDomainConfig.length) + for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) + $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.encode(message.certificateAuthorityDomainConfig[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateRegistryAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateRegistryAccessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length)) + message.certificateAuthorityDomainConfig = []; + message.certificateAuthorityDomainConfig.push($root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateRegistryAccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateRegistryAccessConfig message. + * @function verify + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateRegistryAccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.certificateAuthorityDomainConfig != null && message.hasOwnProperty("certificateAuthorityDomainConfig")) { + if (!Array.isArray(message.certificateAuthorityDomainConfig)) + return "certificateAuthorityDomainConfig: array expected"; + for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) { + var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify(message.certificateAuthorityDomainConfig[i]); + if (error) + return "certificateAuthorityDomainConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig + */ + PrivateRegistryAccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig) + return object; + var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.certificateAuthorityDomainConfig) { + if (!Array.isArray(object.certificateAuthorityDomainConfig)) + throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: array expected"); + message.certificateAuthorityDomainConfig = []; + for (var i = 0; i < object.certificateAuthorityDomainConfig.length; ++i) { + if (typeof object.certificateAuthorityDomainConfig[i] !== "object") + throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: object expected"); + message.certificateAuthorityDomainConfig[i] = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fromObject(object.certificateAuthorityDomainConfig[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} message PrivateRegistryAccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateRegistryAccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.certificateAuthorityDomainConfig = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length) { + object.certificateAuthorityDomainConfig = []; + for (var j = 0; j < message.certificateAuthorityDomainConfig.length; ++j) + object.certificateAuthorityDomainConfig[j] = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.toObject(message.certificateAuthorityDomainConfig[j], options); + } + return object; + }; + + /** + * Converts this PrivateRegistryAccessConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateRegistryAccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateRegistryAccessConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateRegistryAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig"; + }; + + PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig = (function() { + + /** + * Properties of a CertificateAuthorityDomainConfig. + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @interface ICertificateAuthorityDomainConfig + * @property {Array.|null} [fqdns] CertificateAuthorityDomainConfig fqdns + * @property {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null} [gcpSecretManagerCertificateConfig] CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig + */ + + /** + * Constructs a new CertificateAuthorityDomainConfig. + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig + * @classdesc Represents a CertificateAuthorityDomainConfig. + * @implements ICertificateAuthorityDomainConfig + * @constructor + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set + */ + function CertificateAuthorityDomainConfig(properties) { + this.fqdns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthorityDomainConfig fqdns. + * @member {Array.} fqdns + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + CertificateAuthorityDomainConfig.prototype.fqdns = $util.emptyArray; + + /** + * CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. + * @member {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null|undefined} gcpSecretManagerCertificateConfig + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + CertificateAuthorityDomainConfig.prototype.gcpSecretManagerCertificateConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateAuthorityDomainConfig certificateConfig. + * @member {"gcpSecretManagerCertificateConfig"|undefined} certificateConfig + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + */ + Object.defineProperty(CertificateAuthorityDomainConfig.prototype, "certificateConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpSecretManagerCertificateConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig instance + */ + CertificateAuthorityDomainConfig.create = function create(properties) { + return new CertificateAuthorityDomainConfig(properties); + }; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityDomainConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fqdns != null && message.fqdns.length) + for (var i = 0; i < message.fqdns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fqdns[i]); + if (message.gcpSecretManagerCertificateConfig != null && Object.hasOwnProperty.call(message, "gcpSecretManagerCertificateConfig")) + $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.encode(message.gcpSecretManagerCertificateConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityDomainConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityDomainConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.fqdns && message.fqdns.length)) + message.fqdns = []; + message.fqdns.push(reader.string()); + break; + } + case 2: { + message.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityDomainConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateAuthorityDomainConfig message. + * @function verify + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateAuthorityDomainConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fqdns != null && message.hasOwnProperty("fqdns")) { + if (!Array.isArray(message.fqdns)) + return "fqdns: array expected"; + for (var i = 0; i < message.fqdns.length; ++i) + if (!$util.isString(message.fqdns[i])) + return "fqdns: string[] expected"; + } + if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { + properties.certificateConfig = 1; + { + var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify(message.gcpSecretManagerCertificateConfig); + if (error) + return "gcpSecretManagerCertificateConfig." + error; + } + } + return null; + }; + + /** + * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig + */ + CertificateAuthorityDomainConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) + return object; + var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); + if (object.fqdns) { + if (!Array.isArray(object.fqdns)) + throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fqdns: array expected"); + message.fqdns = []; + for (var i = 0; i < object.fqdns.length; ++i) + message.fqdns[i] = String(object.fqdns[i]); + } + if (object.gcpSecretManagerCertificateConfig != null) { + if (typeof object.gcpSecretManagerCertificateConfig !== "object") + throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig: object expected"); + message.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.fromObject(object.gcpSecretManagerCertificateConfig); + } + return message; + }; + + /** + * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateAuthorityDomainConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fqdns = []; + if (message.fqdns && message.fqdns.length) { + object.fqdns = []; + for (var j = 0; j < message.fqdns.length; ++j) + object.fqdns[j] = message.fqdns[j]; + } + if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { + object.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.toObject(message.gcpSecretManagerCertificateConfig, options); + if (options.oneofs) + object.certificateConfig = "gcpSecretManagerCertificateConfig"; + } + return object; + }; + + /** + * Converts this CertificateAuthorityDomainConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @instance + * @returns {Object.} JSON object + */ + CertificateAuthorityDomainConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CertificateAuthorityDomainConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateAuthorityDomainConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"; + }; + + CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig = (function() { + + /** + * Properties of a GCPSecretManagerCertificateConfig. + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @interface IGCPSecretManagerCertificateConfig + * @property {string|null} [secretUri] GCPSecretManagerCertificateConfig secretUri + */ + + /** + * Constructs a new GCPSecretManagerCertificateConfig. + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig + * @classdesc Represents a GCPSecretManagerCertificateConfig. + * @implements IGCPSecretManagerCertificateConfig + * @constructor + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set + */ + function GCPSecretManagerCertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPSecretManagerCertificateConfig secretUri. + * @member {string} secretUri + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @instance + */ + GCPSecretManagerCertificateConfig.prototype.secretUri = ""; + + /** + * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig instance + */ + GCPSecretManagerCertificateConfig.create = function create(properties) { + return new GCPSecretManagerCertificateConfig(properties); + }; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPSecretManagerCertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secretUri != null && Object.hasOwnProperty.call(message, "secretUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretUri); + return writer; + }; + + /** + * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPSecretManagerCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPSecretManagerCertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.secretUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPSecretManagerCertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPSecretManagerCertificateConfig message. + * @function verify + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPSecretManagerCertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.secretUri != null && message.hasOwnProperty("secretUri")) + if (!$util.isString(message.secretUri)) + return "secretUri: string expected"; + return null; + }; + + /** + * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig + */ + GCPSecretManagerCertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) + return object; + var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); + if (object.secretUri != null) + message.secretUri = String(object.secretUri); + return message; + }; + + /** + * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPSecretManagerCertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.secretUri = ""; + if (message.secretUri != null && message.hasOwnProperty("secretUri")) + object.secretUri = message.secretUri; + return object; + }; + + /** + * Converts this GCPSecretManagerCertificateConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @instance + * @returns {Object.} JSON object + */ + GCPSecretManagerCertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPSecretManagerCertificateConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPSecretManagerCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"; + }; + + return GCPSecretManagerCertificateConfig; + })(); + + return CertificateAuthorityDomainConfig; + })(); + + return PrivateRegistryAccessConfig; + })(); + + return ContainerdConfig; + })(); + + v1beta1.HostMaintenancePolicy = (function() { + + /** + * Properties of a HostMaintenancePolicy. + * @memberof google.container.v1beta1 + * @interface IHostMaintenancePolicy + * @property {google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null} [maintenanceInterval] HostMaintenancePolicy maintenanceInterval + * @property {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null} [opportunisticMaintenanceStrategy] HostMaintenancePolicy opportunisticMaintenanceStrategy + */ + + /** + * Constructs a new HostMaintenancePolicy. + * @memberof google.container.v1beta1 + * @classdesc Represents a HostMaintenancePolicy. + * @implements IHostMaintenancePolicy + * @constructor + * @param {google.container.v1beta1.IHostMaintenancePolicy=} [properties] Properties to set + */ + function HostMaintenancePolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HostMaintenancePolicy maintenanceInterval. + * @member {google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null|undefined} maintenanceInterval + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @instance + */ + HostMaintenancePolicy.prototype.maintenanceInterval = null; + + /** + * HostMaintenancePolicy opportunisticMaintenanceStrategy. + * @member {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null|undefined} opportunisticMaintenanceStrategy + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @instance + */ + HostMaintenancePolicy.prototype.opportunisticMaintenanceStrategy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HostMaintenancePolicy _maintenanceInterval. + * @member {"maintenanceInterval"|undefined} _maintenanceInterval + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @instance + */ + Object.defineProperty(HostMaintenancePolicy.prototype, "_maintenanceInterval", { + get: $util.oneOfGetter($oneOfFields = ["maintenanceInterval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * HostMaintenancePolicy maintenanceStrategy. + * @member {"opportunisticMaintenanceStrategy"|undefined} maintenanceStrategy + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @instance + */ + Object.defineProperty(HostMaintenancePolicy.prototype, "maintenanceStrategy", { + get: $util.oneOfGetter($oneOfFields = ["opportunisticMaintenanceStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HostMaintenancePolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {google.container.v1beta1.IHostMaintenancePolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy instance + */ + HostMaintenancePolicy.create = function create(properties) { + return new HostMaintenancePolicy(properties); + }; + + /** + * Encodes the specified HostMaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {google.container.v1beta1.IHostMaintenancePolicy} message HostMaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HostMaintenancePolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maintenanceInterval != null && Object.hasOwnProperty.call(message, "maintenanceInterval")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maintenanceInterval); + if (message.opportunisticMaintenanceStrategy != null && Object.hasOwnProperty.call(message, "opportunisticMaintenanceStrategy")) + $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.encode(message.opportunisticMaintenanceStrategy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HostMaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {google.container.v1beta1.IHostMaintenancePolicy} message HostMaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HostMaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HostMaintenancePolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HostMaintenancePolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HostMaintenancePolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maintenanceInterval = reader.int32(); + break; + } + case 2: { + message.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HostMaintenancePolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HostMaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HostMaintenancePolicy message. + * @function verify + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HostMaintenancePolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maintenanceInterval != null && message.hasOwnProperty("maintenanceInterval")) { + properties._maintenanceInterval = 1; + switch (message.maintenanceInterval) { + default: + return "maintenanceInterval: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.opportunisticMaintenanceStrategy != null && message.hasOwnProperty("opportunisticMaintenanceStrategy")) { + properties.maintenanceStrategy = 1; + { + var error = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify(message.opportunisticMaintenanceStrategy); + if (error) + return "opportunisticMaintenanceStrategy." + error; + } + } + return null; + }; + + /** + * Creates a HostMaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy + */ + HostMaintenancePolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.HostMaintenancePolicy) + return object; + var message = new $root.google.container.v1beta1.HostMaintenancePolicy(); + switch (object.maintenanceInterval) { + default: + if (typeof object.maintenanceInterval === "number") { + message.maintenanceInterval = object.maintenanceInterval; + break; + } + break; + case "MAINTENANCE_INTERVAL_UNSPECIFIED": + case 0: + message.maintenanceInterval = 0; + break; + case "AS_NEEDED": + case 1: + message.maintenanceInterval = 1; + break; + case "PERIODIC": + case 2: + message.maintenanceInterval = 2; + break; + } + if (object.opportunisticMaintenanceStrategy != null) { + if (typeof object.opportunisticMaintenanceStrategy !== "object") + throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.opportunisticMaintenanceStrategy: object expected"); + message.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.fromObject(object.opportunisticMaintenanceStrategy); + } + return message; + }; + + /** + * Creates a plain object from a HostMaintenancePolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {google.container.v1beta1.HostMaintenancePolicy} message HostMaintenancePolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HostMaintenancePolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.maintenanceInterval != null && message.hasOwnProperty("maintenanceInterval")) { + object.maintenanceInterval = options.enums === String ? $root.google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval[message.maintenanceInterval] === undefined ? message.maintenanceInterval : $root.google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval[message.maintenanceInterval] : message.maintenanceInterval; + if (options.oneofs) + object._maintenanceInterval = "maintenanceInterval"; + } + if (message.opportunisticMaintenanceStrategy != null && message.hasOwnProperty("opportunisticMaintenanceStrategy")) { + object.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.toObject(message.opportunisticMaintenanceStrategy, options); + if (options.oneofs) + object.maintenanceStrategy = "opportunisticMaintenanceStrategy"; + } + return object; + }; + + /** + * Converts this HostMaintenancePolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @instance + * @returns {Object.} JSON object + */ + HostMaintenancePolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HostMaintenancePolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HostMaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.HostMaintenancePolicy"; + }; + + /** + * MaintenanceInterval enum. + * @name google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval + * @enum {number} + * @property {number} MAINTENANCE_INTERVAL_UNSPECIFIED=0 MAINTENANCE_INTERVAL_UNSPECIFIED value + * @property {number} AS_NEEDED=1 AS_NEEDED value + * @property {number} PERIODIC=2 PERIODIC value + */ + HostMaintenancePolicy.MaintenanceInterval = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MAINTENANCE_INTERVAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "AS_NEEDED"] = 1; + values[valuesById[2] = "PERIODIC"] = 2; + return values; + })(); + + HostMaintenancePolicy.OpportunisticMaintenanceStrategy = (function() { + + /** + * Properties of an OpportunisticMaintenanceStrategy. + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @interface IOpportunisticMaintenanceStrategy + * @property {google.protobuf.IDuration|null} [nodeIdleTimeWindow] OpportunisticMaintenanceStrategy nodeIdleTimeWindow + * @property {google.protobuf.IDuration|null} [maintenanceAvailabilityWindow] OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow + * @property {number|Long|null} [minNodesPerPool] OpportunisticMaintenanceStrategy minNodesPerPool + */ + + /** + * Constructs a new OpportunisticMaintenanceStrategy. + * @memberof google.container.v1beta1.HostMaintenancePolicy + * @classdesc Represents an OpportunisticMaintenanceStrategy. + * @implements IOpportunisticMaintenanceStrategy + * @constructor + * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy=} [properties] Properties to set + */ + function OpportunisticMaintenanceStrategy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpportunisticMaintenanceStrategy nodeIdleTimeWindow. + * @member {google.protobuf.IDuration|null|undefined} nodeIdleTimeWindow + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + OpportunisticMaintenanceStrategy.prototype.nodeIdleTimeWindow = null; + + /** + * OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow. + * @member {google.protobuf.IDuration|null|undefined} maintenanceAvailabilityWindow + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + OpportunisticMaintenanceStrategy.prototype.maintenanceAvailabilityWindow = null; + + /** + * OpportunisticMaintenanceStrategy minNodesPerPool. + * @member {number|Long|null|undefined} minNodesPerPool + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + OpportunisticMaintenanceStrategy.prototype.minNodesPerPool = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OpportunisticMaintenanceStrategy _nodeIdleTimeWindow. + * @member {"nodeIdleTimeWindow"|undefined} _nodeIdleTimeWindow + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_nodeIdleTimeWindow", { + get: $util.oneOfGetter($oneOfFields = ["nodeIdleTimeWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * OpportunisticMaintenanceStrategy _maintenanceAvailabilityWindow. + * @member {"maintenanceAvailabilityWindow"|undefined} _maintenanceAvailabilityWindow + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_maintenanceAvailabilityWindow", { + get: $util.oneOfGetter($oneOfFields = ["maintenanceAvailabilityWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * OpportunisticMaintenanceStrategy _minNodesPerPool. + * @member {"minNodesPerPool"|undefined} _minNodesPerPool + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + */ + Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_minNodesPerPool", { + get: $util.oneOfGetter($oneOfFields = ["minNodesPerPool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OpportunisticMaintenanceStrategy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy=} [properties] Properties to set + * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy instance + */ + OpportunisticMaintenanceStrategy.create = function create(properties) { + return new OpportunisticMaintenanceStrategy(properties); + }; + + /** + * Encodes the specified OpportunisticMaintenanceStrategy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpportunisticMaintenanceStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeIdleTimeWindow != null && Object.hasOwnProperty.call(message, "nodeIdleTimeWindow")) + $root.google.protobuf.Duration.encode(message.nodeIdleTimeWindow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maintenanceAvailabilityWindow != null && Object.hasOwnProperty.call(message, "maintenanceAvailabilityWindow")) + $root.google.protobuf.Duration.encode(message.maintenanceAvailabilityWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minNodesPerPool != null && Object.hasOwnProperty.call(message, "minNodesPerPool")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.minNodesPerPool); + return writer; + }; + + /** + * Encodes the specified OpportunisticMaintenanceStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpportunisticMaintenanceStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpportunisticMaintenanceStrategy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeIdleTimeWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.minNodesPerPool = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpportunisticMaintenanceStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpportunisticMaintenanceStrategy message. + * @function verify + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpportunisticMaintenanceStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nodeIdleTimeWindow != null && message.hasOwnProperty("nodeIdleTimeWindow")) { + properties._nodeIdleTimeWindow = 1; + { + var error = $root.google.protobuf.Duration.verify(message.nodeIdleTimeWindow); + if (error) + return "nodeIdleTimeWindow." + error; + } + } + if (message.maintenanceAvailabilityWindow != null && message.hasOwnProperty("maintenanceAvailabilityWindow")) { + properties._maintenanceAvailabilityWindow = 1; + { + var error = $root.google.protobuf.Duration.verify(message.maintenanceAvailabilityWindow); + if (error) + return "maintenanceAvailabilityWindow." + error; + } + } + if (message.minNodesPerPool != null && message.hasOwnProperty("minNodesPerPool")) { + properties._minNodesPerPool = 1; + if (!$util.isInteger(message.minNodesPerPool) && !(message.minNodesPerPool && $util.isInteger(message.minNodesPerPool.low) && $util.isInteger(message.minNodesPerPool.high))) + return "minNodesPerPool: integer|Long expected"; + } + return null; + }; + + /** + * Creates an OpportunisticMaintenanceStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy + */ + OpportunisticMaintenanceStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy) + return object; + var message = new $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy(); + if (object.nodeIdleTimeWindow != null) { + if (typeof object.nodeIdleTimeWindow !== "object") + throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.nodeIdleTimeWindow: object expected"); + message.nodeIdleTimeWindow = $root.google.protobuf.Duration.fromObject(object.nodeIdleTimeWindow); + } + if (object.maintenanceAvailabilityWindow != null) { + if (typeof object.maintenanceAvailabilityWindow !== "object") + throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.maintenanceAvailabilityWindow: object expected"); + message.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.fromObject(object.maintenanceAvailabilityWindow); + } + if (object.minNodesPerPool != null) + if ($util.Long) + (message.minNodesPerPool = $util.Long.fromValue(object.minNodesPerPool)).unsigned = false; + else if (typeof object.minNodesPerPool === "string") + message.minNodesPerPool = parseInt(object.minNodesPerPool, 10); + else if (typeof object.minNodesPerPool === "number") + message.minNodesPerPool = object.minNodesPerPool; + else if (typeof object.minNodesPerPool === "object") + message.minNodesPerPool = new $util.LongBits(object.minNodesPerPool.low >>> 0, object.minNodesPerPool.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an OpportunisticMaintenanceStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpportunisticMaintenanceStrategy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nodeIdleTimeWindow != null && message.hasOwnProperty("nodeIdleTimeWindow")) { + object.nodeIdleTimeWindow = $root.google.protobuf.Duration.toObject(message.nodeIdleTimeWindow, options); + if (options.oneofs) + object._nodeIdleTimeWindow = "nodeIdleTimeWindow"; + } + if (message.maintenanceAvailabilityWindow != null && message.hasOwnProperty("maintenanceAvailabilityWindow")) { + object.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.toObject(message.maintenanceAvailabilityWindow, options); + if (options.oneofs) + object._maintenanceAvailabilityWindow = "maintenanceAvailabilityWindow"; + } + if (message.minNodesPerPool != null && message.hasOwnProperty("minNodesPerPool")) { + if (typeof message.minNodesPerPool === "number") + object.minNodesPerPool = options.longs === String ? String(message.minNodesPerPool) : message.minNodesPerPool; + else + object.minNodesPerPool = options.longs === String ? $util.Long.prototype.toString.call(message.minNodesPerPool) : options.longs === Number ? new $util.LongBits(message.minNodesPerPool.low >>> 0, message.minNodesPerPool.high >>> 0).toNumber() : message.minNodesPerPool; + if (options.oneofs) + object._minNodesPerPool = "minNodesPerPool"; + } + return object; + }; + + /** + * Converts this OpportunisticMaintenanceStrategy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @instance + * @returns {Object.} JSON object + */ + OpportunisticMaintenanceStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpportunisticMaintenanceStrategy + * @function getTypeUrl + * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpportunisticMaintenanceStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy"; + }; + + return OpportunisticMaintenanceStrategy; + })(); + + return HostMaintenancePolicy; + })(); + + v1beta1.NodeTaint = (function() { + + /** + * Properties of a NodeTaint. + * @memberof google.container.v1beta1 + * @interface INodeTaint + * @property {string|null} [key] NodeTaint key + * @property {string|null} [value] NodeTaint value + * @property {google.container.v1beta1.NodeTaint.Effect|null} [effect] NodeTaint effect + */ + + /** + * Constructs a new NodeTaint. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeTaint. + * @implements INodeTaint + * @constructor + * @param {google.container.v1beta1.INodeTaint=} [properties] Properties to set + */ + function NodeTaint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeTaint key. + * @member {string} key + * @memberof google.container.v1beta1.NodeTaint + * @instance + */ + NodeTaint.prototype.key = ""; + + /** + * NodeTaint value. + * @member {string} value + * @memberof google.container.v1beta1.NodeTaint + * @instance + */ + NodeTaint.prototype.value = ""; + + /** + * NodeTaint effect. + * @member {google.container.v1beta1.NodeTaint.Effect} effect + * @memberof google.container.v1beta1.NodeTaint + * @instance + */ + NodeTaint.prototype.effect = 0; + + /** + * Creates a new NodeTaint instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {google.container.v1beta1.INodeTaint=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeTaint} NodeTaint instance + */ + NodeTaint.create = function create(properties) { + return new NodeTaint(properties); + }; + + /** + * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1beta1.NodeTaint.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {google.container.v1beta1.INodeTaint} message NodeTaint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaint.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); + return writer; + }; + + /** + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {google.container.v1beta1.INodeTaint} message NodeTaint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeTaint message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeTaint} NodeTaint + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeTaint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.effect = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeTaint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeTaint} NodeTaint + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeTaint message. + * @function verify + * @memberof google.container.v1beta1.NodeTaint + * @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) { + 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; + } + return null; + }; + + /** + * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeTaint} NodeTaint + */ + NodeTaint.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeTaint) + return object; + var message = new $root.google.container.v1beta1.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; + } + return message; + }; + + /** + * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {google.container.v1beta1.NodeTaint} message NodeTaint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeTaint.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; + } + 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.container.v1beta1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.container.v1beta1.NodeTaint.Effect[message.effect] : message.effect; + return object; + }; + + /** + * Converts this NodeTaint to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeTaint + * @instance + * @returns {Object.} JSON object + */ + NodeTaint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeTaint + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeTaint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeTaint"; + }; + + /** + * Effect enum. + * @name google.container.v1beta1.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; + })(); + + v1beta1.NodeTaints = (function() { + + /** + * Properties of a NodeTaints. + * @memberof google.container.v1beta1 + * @interface INodeTaints + * @property {Array.|null} [taints] NodeTaints taints + */ + + /** + * Constructs a new NodeTaints. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeTaints. + * @implements INodeTaints + * @constructor + * @param {google.container.v1beta1.INodeTaints=} [properties] Properties to set + */ + function NodeTaints(properties) { + this.taints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeTaints taints. + * @member {Array.} taints + * @memberof google.container.v1beta1.NodeTaints + * @instance + */ + NodeTaints.prototype.taints = $util.emptyArray; + + /** + * Creates a new NodeTaints instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {google.container.v1beta1.INodeTaints=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeTaints} NodeTaints instance + */ + NodeTaints.create = function create(properties) { + return new NodeTaints(properties); + }; + + /** + * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {google.container.v1beta1.INodeTaints} message NodeTaints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.container.v1beta1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {google.container.v1beta1.INodeTaints} message NodeTaints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeTaints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeTaints message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeTaints} NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeTaints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeTaints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.container.v1beta1.NodeTaint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeTaints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeTaints} NodeTaints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeTaints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeTaints message. + * @function verify + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeTaints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.container.v1beta1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + return null; + }; + + /** + * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeTaints} NodeTaints + */ + NodeTaints.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeTaints) + return object; + var message = new $root.google.container.v1beta1.NodeTaints(); + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.container.v1beta1.NodeTaints.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.container.v1beta1.NodeTaints.taints: object expected"); + message.taints[i] = $root.google.container.v1beta1.NodeTaint.fromObject(object.taints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {google.container.v1beta1.NodeTaints} message NodeTaints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeTaints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.taints = []; + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.container.v1beta1.NodeTaint.toObject(message.taints[j], options); + } + return object; + }; + + /** + * Converts this NodeTaints to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeTaints + * @instance + * @returns {Object.} JSON object + */ + NodeTaints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeTaints + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeTaints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeTaints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeTaints"; + }; + + return NodeTaints; + })(); + + v1beta1.NodeLabels = (function() { + + /** + * Properties of a NodeLabels. + * @memberof google.container.v1beta1 + * @interface INodeLabels + * @property {Object.|null} [labels] NodeLabels labels + */ + + /** + * Constructs a new NodeLabels. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeLabels. + * @implements INodeLabels + * @constructor + * @param {google.container.v1beta1.INodeLabels=} [properties] Properties to set + */ + function NodeLabels(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeLabels labels. + * @member {Object.} labels + * @memberof google.container.v1beta1.NodeLabels + * @instance + */ + NodeLabels.prototype.labels = $util.emptyObject; + + /** + * Creates a new NodeLabels instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {google.container.v1beta1.INodeLabels=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeLabels} NodeLabels instance + */ + NodeLabels.create = function create(properties) { + return new NodeLabels(properties); + }; + + /** + * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {google.container.v1beta1.INodeLabels} message NodeLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeLabels.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {google.container.v1beta1.INodeLabels} message NodeLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeLabels.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeLabels message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeLabels} NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeLabels.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeLabels(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeLabels message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeLabels} NodeLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeLabels.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeLabels message. + * @function verify + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeLabels.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeLabels} NodeLabels + */ + NodeLabels.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeLabels) + return object; + var message = new $root.google.container.v1beta1.NodeLabels(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1beta1.NodeLabels.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 a NodeLabels message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {google.container.v1beta1.NodeLabels} message NodeLabels + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeLabels.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this NodeLabels to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeLabels + * @instance + * @returns {Object.} JSON object + */ + NodeLabels.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeLabels + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeLabels + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeLabels"; + }; + + return NodeLabels; + })(); + + v1beta1.ResourceLabels = (function() { + + /** + * Properties of a ResourceLabels. + * @memberof google.container.v1beta1 + * @interface IResourceLabels + * @property {Object.|null} [labels] ResourceLabels labels + */ + + /** + * Constructs a new ResourceLabels. + * @memberof google.container.v1beta1 + * @classdesc Represents a ResourceLabels. + * @implements IResourceLabels + * @constructor + * @param {google.container.v1beta1.IResourceLabels=} [properties] Properties to set + */ + function ResourceLabels(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceLabels labels. + * @member {Object.} labels + * @memberof google.container.v1beta1.ResourceLabels + * @instance + */ + ResourceLabels.prototype.labels = $util.emptyObject; + + /** + * Creates a new ResourceLabels instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {google.container.v1beta1.IResourceLabels=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels instance + */ + ResourceLabels.create = function create(properties) { + return new ResourceLabels(properties); + }; + + /** + * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {google.container.v1beta1.IResourceLabels} message ResourceLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLabels.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {google.container.v1beta1.IResourceLabels} message ResourceLabels message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLabels.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLabels.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceLabels(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLabels.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceLabels message. + * @function verify + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLabels.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels + */ + ResourceLabels.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceLabels) + return object; + var message = new $root.google.container.v1beta1.ResourceLabels(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1beta1.ResourceLabels.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 a ResourceLabels message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {google.container.v1beta1.ResourceLabels} message ResourceLabels + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLabels.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this ResourceLabels to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceLabels + * @instance + * @returns {Object.} JSON object + */ + ResourceLabels.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceLabels + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceLabels + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceLabels"; + }; + + return ResourceLabels; + })(); + + v1beta1.NetworkTags = (function() { + + /** + * Properties of a NetworkTags. + * @memberof google.container.v1beta1 + * @interface INetworkTags + * @property {Array.|null} [tags] NetworkTags tags + */ + + /** + * Constructs a new NetworkTags. + * @memberof google.container.v1beta1 + * @classdesc Represents a NetworkTags. + * @implements INetworkTags + * @constructor + * @param {google.container.v1beta1.INetworkTags=} [properties] Properties to set + */ + function NetworkTags(properties) { + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkTags tags. + * @member {Array.} tags + * @memberof google.container.v1beta1.NetworkTags + * @instance + */ + NetworkTags.prototype.tags = $util.emptyArray; + + /** + * Creates a new NetworkTags instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {google.container.v1beta1.INetworkTags=} [properties] Properties to set + * @returns {google.container.v1beta1.NetworkTags} NetworkTags instance + */ + NetworkTags.create = function create(properties) { + return new NetworkTags(properties); + }; + + /** + * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {google.container.v1beta1.INetworkTags} message NetworkTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkTags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tags[i]); + return writer; + }; + + /** + * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {google.container.v1beta1.INetworkTags} message NetworkTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkTags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkTags message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NetworkTags} NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkTags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkTags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkTags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NetworkTags} NetworkTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkTags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkTags message. + * @function verify + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkTags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + return null; + }; + + /** + * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NetworkTags} NetworkTags + */ + NetworkTags.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NetworkTags) + return object; + var message = new $root.google.container.v1beta1.NetworkTags(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.container.v1beta1.NetworkTags.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + return message; + }; + + /** + * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {google.container.v1beta1.NetworkTags} message NetworkTags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkTags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + return object; + }; + + /** + * Converts this NetworkTags to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NetworkTags + * @instance + * @returns {Object.} JSON object + */ + NetworkTags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkTags + * @function getTypeUrl + * @memberof google.container.v1beta1.NetworkTags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NetworkTags"; + }; + + return NetworkTags; + })(); + + v1beta1.MasterAuth = (function() { + + /** + * Properties of a MasterAuth. + * @memberof google.container.v1beta1 + * @interface IMasterAuth + * @property {string|null} [username] MasterAuth username + * @property {string|null} [password] MasterAuth password + * @property {google.container.v1beta1.IClientCertificateConfig|null} [clientCertificateConfig] MasterAuth clientCertificateConfig + * @property {string|null} [clusterCaCertificate] MasterAuth clusterCaCertificate + * @property {string|null} [clientCertificate] MasterAuth clientCertificate + * @property {string|null} [clientKey] MasterAuth clientKey + */ + + /** + * Constructs a new MasterAuth. + * @memberof google.container.v1beta1 + * @classdesc Represents a MasterAuth. + * @implements IMasterAuth + * @constructor + * @param {google.container.v1beta1.IMasterAuth=} [properties] Properties to set + */ + function MasterAuth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuth username. + * @member {string} username + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.username = ""; + + /** + * MasterAuth password. + * @member {string} password + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.password = ""; + + /** + * MasterAuth clientCertificateConfig. + * @member {google.container.v1beta1.IClientCertificateConfig|null|undefined} clientCertificateConfig + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientCertificateConfig = null; + + /** + * MasterAuth clusterCaCertificate. + * @member {string} clusterCaCertificate + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.clusterCaCertificate = ""; + + /** + * MasterAuth clientCertificate. + * @member {string} clientCertificate + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientCertificate = ""; + + /** + * MasterAuth clientKey. + * @member {string} clientKey + * @memberof google.container.v1beta1.MasterAuth + * @instance + */ + MasterAuth.prototype.clientKey = ""; + + /** + * Creates a new MasterAuth instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {google.container.v1beta1.IMasterAuth=} [properties] Properties to set + * @returns {google.container.v1beta1.MasterAuth} MasterAuth instance + */ + MasterAuth.create = function create(properties) { + return new MasterAuth(properties); + }; + + /** + * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {google.container.v1beta1.IMasterAuth} message MasterAuth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuth.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.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); + if (message.clientCertificateConfig != null && Object.hasOwnProperty.call(message, "clientCertificateConfig")) + $root.google.container.v1beta1.ClientCertificateConfig.encode(message.clientCertificateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.clusterCaCertificate); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.clientCertificate); + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.clientKey); + return writer; + }; + + /** + * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {google.container.v1beta1.IMasterAuth} message MasterAuth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuth message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MasterAuth} MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuth.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.password = reader.string(); + break; + } + case 3: { + message.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.clusterCaCertificate = reader.string(); + break; + } + case 101: { + message.clientCertificate = reader.string(); + break; + } + case 102: { + message.clientKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MasterAuth} MasterAuth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuth message. + * @function verify + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuth.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.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) { + var error = $root.google.container.v1beta1.ClientCertificateConfig.verify(message.clientCertificateConfig); + if (error) + return "clientCertificateConfig." + error; + } + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + if (!$util.isString(message.clusterCaCertificate)) + return "clusterCaCertificate: string expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + if (!$util.isString(message.clientCertificate)) + return "clientCertificate: string expected"; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (!$util.isString(message.clientKey)) + return "clientKey: string expected"; + return null; + }; + + /** + * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MasterAuth} MasterAuth + */ + MasterAuth.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MasterAuth) + return object; + var message = new $root.google.container.v1beta1.MasterAuth(); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.clientCertificateConfig != null) { + if (typeof object.clientCertificateConfig !== "object") + throw TypeError(".google.container.v1beta1.MasterAuth.clientCertificateConfig: object expected"); + message.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.fromObject(object.clientCertificateConfig); + } + if (object.clusterCaCertificate != null) + message.clusterCaCertificate = String(object.clusterCaCertificate); + if (object.clientCertificate != null) + message.clientCertificate = String(object.clientCertificate); + if (object.clientKey != null) + message.clientKey = String(object.clientKey); + return message; + }; + + /** + * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {google.container.v1beta1.MasterAuth} message MasterAuth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.password = ""; + object.clientCertificateConfig = null; + object.clusterCaCertificate = ""; + object.clientCertificate = ""; + object.clientKey = ""; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) + object.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.toObject(message.clientCertificateConfig, options); + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + object.clusterCaCertificate = message.clusterCaCertificate; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = message.clientCertificate; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + object.clientKey = message.clientKey; + return object; + }; + + /** + * Converts this MasterAuth to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MasterAuth + * @instance + * @returns {Object.} JSON object + */ + MasterAuth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuth + * @function getTypeUrl + * @memberof google.container.v1beta1.MasterAuth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MasterAuth"; + }; + + return MasterAuth; + })(); + + v1beta1.ClientCertificateConfig = (function() { + + /** + * Properties of a ClientCertificateConfig. + * @memberof google.container.v1beta1 + * @interface IClientCertificateConfig + * @property {boolean|null} [issueClientCertificate] ClientCertificateConfig issueClientCertificate + */ + + /** + * Constructs a new ClientCertificateConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ClientCertificateConfig. + * @implements IClientCertificateConfig + * @constructor + * @param {google.container.v1beta1.IClientCertificateConfig=} [properties] Properties to set + */ + function ClientCertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientCertificateConfig issueClientCertificate. + * @member {boolean} issueClientCertificate + * @memberof google.container.v1beta1.ClientCertificateConfig + * @instance + */ + ClientCertificateConfig.prototype.issueClientCertificate = false; + + /** + * Creates a new ClientCertificateConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {google.container.v1beta1.IClientCertificateConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig instance + */ + ClientCertificateConfig.create = function create(properties) { + return new ClientCertificateConfig(properties); + }; + + /** + * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {google.container.v1beta1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientCertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueClientCertificate != null && Object.hasOwnProperty.call(message, "issueClientCertificate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.issueClientCertificate); + return writer; + }; + + /** + * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {google.container.v1beta1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientCertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClientCertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueClientCertificate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientCertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientCertificateConfig message. + * @function verify + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientCertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) + if (typeof message.issueClientCertificate !== "boolean") + return "issueClientCertificate: boolean expected"; + return null; + }; + + /** + * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig + */ + ClientCertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ClientCertificateConfig) + return object; + var message = new $root.google.container.v1beta1.ClientCertificateConfig(); + if (object.issueClientCertificate != null) + message.issueClientCertificate = Boolean(object.issueClientCertificate); + return message; + }; + + /** + * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {google.container.v1beta1.ClientCertificateConfig} message ClientCertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientCertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.issueClientCertificate = false; + if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) + object.issueClientCertificate = message.issueClientCertificate; + return object; + }; + + /** + * Converts this ClientCertificateConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ClientCertificateConfig + * @instance + * @returns {Object.} JSON object + */ + ClientCertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientCertificateConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ClientCertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ClientCertificateConfig"; + }; + + return ClientCertificateConfig; + })(); + + v1beta1.AddonsConfig = (function() { + + /** + * Properties of an AddonsConfig. + * @memberof google.container.v1beta1 + * @interface IAddonsConfig + * @property {google.container.v1beta1.IHttpLoadBalancing|null} [httpLoadBalancing] AddonsConfig httpLoadBalancing + * @property {google.container.v1beta1.IHorizontalPodAutoscaling|null} [horizontalPodAutoscaling] AddonsConfig horizontalPodAutoscaling + * @property {google.container.v1beta1.IKubernetesDashboard|null} [kubernetesDashboard] AddonsConfig kubernetesDashboard + * @property {google.container.v1beta1.INetworkPolicyConfig|null} [networkPolicyConfig] AddonsConfig networkPolicyConfig + * @property {google.container.v1beta1.IIstioConfig|null} [istioConfig] AddonsConfig istioConfig + * @property {google.container.v1beta1.ICloudRunConfig|null} [cloudRunConfig] AddonsConfig cloudRunConfig + * @property {google.container.v1beta1.IDnsCacheConfig|null} [dnsCacheConfig] AddonsConfig dnsCacheConfig + * @property {google.container.v1beta1.IConfigConnectorConfig|null} [configConnectorConfig] AddonsConfig configConnectorConfig + * @property {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null} [gcePersistentDiskCsiDriverConfig] AddonsConfig gcePersistentDiskCsiDriverConfig + * @property {google.container.v1beta1.IKalmConfig|null} [kalmConfig] AddonsConfig kalmConfig + * @property {google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null} [gcpFilestoreCsiDriverConfig] AddonsConfig gcpFilestoreCsiDriverConfig + * @property {google.container.v1beta1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig + * @property {google.container.v1beta1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig + * @property {google.container.v1beta1.IStatefulHAConfig|null} [statefulHaConfig] AddonsConfig statefulHaConfig + * @property {google.container.v1beta1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig + */ + + /** + * Constructs a new AddonsConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AddonsConfig. + * @implements IAddonsConfig + * @constructor + * @param {google.container.v1beta1.IAddonsConfig=} [properties] Properties to set + */ + function AddonsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddonsConfig httpLoadBalancing. + * @member {google.container.v1beta1.IHttpLoadBalancing|null|undefined} httpLoadBalancing + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.httpLoadBalancing = null; + + /** + * AddonsConfig horizontalPodAutoscaling. + * @member {google.container.v1beta1.IHorizontalPodAutoscaling|null|undefined} horizontalPodAutoscaling + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.horizontalPodAutoscaling = null; + + /** + * AddonsConfig kubernetesDashboard. + * @member {google.container.v1beta1.IKubernetesDashboard|null|undefined} kubernetesDashboard + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.kubernetesDashboard = null; + + /** + * AddonsConfig networkPolicyConfig. + * @member {google.container.v1beta1.INetworkPolicyConfig|null|undefined} networkPolicyConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.networkPolicyConfig = null; + + /** + * AddonsConfig istioConfig. + * @member {google.container.v1beta1.IIstioConfig|null|undefined} istioConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.istioConfig = null; + + /** + * AddonsConfig cloudRunConfig. + * @member {google.container.v1beta1.ICloudRunConfig|null|undefined} cloudRunConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.cloudRunConfig = null; + + /** + * AddonsConfig dnsCacheConfig. + * @member {google.container.v1beta1.IDnsCacheConfig|null|undefined} dnsCacheConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.dnsCacheConfig = null; + + /** + * AddonsConfig configConnectorConfig. + * @member {google.container.v1beta1.IConfigConnectorConfig|null|undefined} configConnectorConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.configConnectorConfig = null; + + /** + * AddonsConfig gcePersistentDiskCsiDriverConfig. + * @member {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null|undefined} gcePersistentDiskCsiDriverConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcePersistentDiskCsiDriverConfig = null; + + /** + * AddonsConfig kalmConfig. + * @member {google.container.v1beta1.IKalmConfig|null|undefined} kalmConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.kalmConfig = null; + + /** + * AddonsConfig gcpFilestoreCsiDriverConfig. + * @member {google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null|undefined} gcpFilestoreCsiDriverConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcpFilestoreCsiDriverConfig = null; + + /** + * AddonsConfig gkeBackupAgentConfig. + * @member {google.container.v1beta1.IGkeBackupAgentConfig|null|undefined} gkeBackupAgentConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gkeBackupAgentConfig = null; + + /** + * AddonsConfig gcsFuseCsiDriverConfig. + * @member {google.container.v1beta1.IGcsFuseCsiDriverConfig|null|undefined} gcsFuseCsiDriverConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcsFuseCsiDriverConfig = null; + + /** + * AddonsConfig statefulHaConfig. + * @member {google.container.v1beta1.IStatefulHAConfig|null|undefined} statefulHaConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.statefulHaConfig = null; + + /** + * AddonsConfig rayOperatorConfig. + * @member {google.container.v1beta1.IRayOperatorConfig|null|undefined} rayOperatorConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.rayOperatorConfig = null; + + /** + * Creates a new AddonsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {google.container.v1beta1.IAddonsConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig instance + */ + AddonsConfig.create = function create(properties) { + return new AddonsConfig(properties); + }; + + /** + * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {google.container.v1beta1.IAddonsConfig} message AddonsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddonsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.httpLoadBalancing != null && Object.hasOwnProperty.call(message, "httpLoadBalancing")) + $root.google.container.v1beta1.HttpLoadBalancing.encode(message.httpLoadBalancing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.horizontalPodAutoscaling != null && Object.hasOwnProperty.call(message, "horizontalPodAutoscaling")) + $root.google.container.v1beta1.HorizontalPodAutoscaling.encode(message.horizontalPodAutoscaling, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kubernetesDashboard != null && Object.hasOwnProperty.call(message, "kubernetesDashboard")) + $root.google.container.v1beta1.KubernetesDashboard.encode(message.kubernetesDashboard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.networkPolicyConfig != null && Object.hasOwnProperty.call(message, "networkPolicyConfig")) + $root.google.container.v1beta1.NetworkPolicyConfig.encode(message.networkPolicyConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.istioConfig != null && Object.hasOwnProperty.call(message, "istioConfig")) + $root.google.container.v1beta1.IstioConfig.encode(message.istioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.cloudRunConfig != null && Object.hasOwnProperty.call(message, "cloudRunConfig")) + $root.google.container.v1beta1.CloudRunConfig.encode(message.cloudRunConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.dnsCacheConfig != null && Object.hasOwnProperty.call(message, "dnsCacheConfig")) + $root.google.container.v1beta1.DnsCacheConfig.encode(message.dnsCacheConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.configConnectorConfig != null && Object.hasOwnProperty.call(message, "configConnectorConfig")) + $root.google.container.v1beta1.ConfigConnectorConfig.encode(message.configConnectorConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.gcePersistentDiskCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcePersistentDiskCsiDriverConfig")) + $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.encode(message.gcePersistentDiskCsiDriverConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.kalmConfig != null && Object.hasOwnProperty.call(message, "kalmConfig")) + $root.google.container.v1beta1.KalmConfig.encode(message.kalmConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.gcpFilestoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcpFilestoreCsiDriverConfig")) + $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.encode(message.gcpFilestoreCsiDriverConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.gkeBackupAgentConfig != null && Object.hasOwnProperty.call(message, "gkeBackupAgentConfig")) + $root.google.container.v1beta1.GkeBackupAgentConfig.encode(message.gkeBackupAgentConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.gcsFuseCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcsFuseCsiDriverConfig")) + $root.google.container.v1beta1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.statefulHaConfig != null && Object.hasOwnProperty.call(message, "statefulHaConfig")) + $root.google.container.v1beta1.StatefulHAConfig.encode(message.statefulHaConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.rayOperatorConfig != null && Object.hasOwnProperty.call(message, "rayOperatorConfig")) + $root.google.container.v1beta1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {google.container.v1beta1.IAddonsConfig} message AddonsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddonsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddonsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AddonsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.decode(reader, reader.uint32()); + break; + } + case 2: { + message.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 3: { + message.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.decode(reader, reader.uint32()); + break; + } + case 4: { + message.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.istioConfig = $root.google.container.v1beta1.IstioConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.kalmConfig = $root.google.container.v1beta1.KalmConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + message.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddonsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddonsConfig message. + * @function verify + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddonsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) { + var error = $root.google.container.v1beta1.HttpLoadBalancing.verify(message.httpLoadBalancing); + if (error) + return "httpLoadBalancing." + error; + } + if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) { + var error = $root.google.container.v1beta1.HorizontalPodAutoscaling.verify(message.horizontalPodAutoscaling); + if (error) + return "horizontalPodAutoscaling." + error; + } + if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) { + var error = $root.google.container.v1beta1.KubernetesDashboard.verify(message.kubernetesDashboard); + if (error) + return "kubernetesDashboard." + error; + } + if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) { + var error = $root.google.container.v1beta1.NetworkPolicyConfig.verify(message.networkPolicyConfig); + if (error) + return "networkPolicyConfig." + error; + } + if (message.istioConfig != null && message.hasOwnProperty("istioConfig")) { + var error = $root.google.container.v1beta1.IstioConfig.verify(message.istioConfig); + if (error) + return "istioConfig." + error; + } + if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) { + var error = $root.google.container.v1beta1.CloudRunConfig.verify(message.cloudRunConfig); + if (error) + return "cloudRunConfig." + error; + } + if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) { + var error = $root.google.container.v1beta1.DnsCacheConfig.verify(message.dnsCacheConfig); + if (error) + return "dnsCacheConfig." + error; + } + if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) { + var error = $root.google.container.v1beta1.ConfigConnectorConfig.verify(message.configConnectorConfig); + if (error) + return "configConnectorConfig." + error; + } + if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) { + var error = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify(message.gcePersistentDiskCsiDriverConfig); + if (error) + return "gcePersistentDiskCsiDriverConfig." + error; + } + if (message.kalmConfig != null && message.hasOwnProperty("kalmConfig")) { + var error = $root.google.container.v1beta1.KalmConfig.verify(message.kalmConfig); + if (error) + return "kalmConfig." + error; + } + if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) { + var error = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify(message.gcpFilestoreCsiDriverConfig); + if (error) + return "gcpFilestoreCsiDriverConfig." + error; + } + if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) { + var error = $root.google.container.v1beta1.GkeBackupAgentConfig.verify(message.gkeBackupAgentConfig); + if (error) + return "gkeBackupAgentConfig." + error; + } + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) { + var error = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.verify(message.gcsFuseCsiDriverConfig); + if (error) + return "gcsFuseCsiDriverConfig." + error; + } + if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) { + var error = $root.google.container.v1beta1.StatefulHAConfig.verify(message.statefulHaConfig); + if (error) + return "statefulHaConfig." + error; + } + if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) { + var error = $root.google.container.v1beta1.RayOperatorConfig.verify(message.rayOperatorConfig); + if (error) + return "rayOperatorConfig." + error; + } + return null; + }; + + /** + * Creates an AddonsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig + */ + AddonsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AddonsConfig) + return object; + var message = new $root.google.container.v1beta1.AddonsConfig(); + if (object.httpLoadBalancing != null) { + if (typeof object.httpLoadBalancing !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.httpLoadBalancing: object expected"); + message.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.fromObject(object.httpLoadBalancing); + } + if (object.horizontalPodAutoscaling != null) { + if (typeof object.horizontalPodAutoscaling !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.horizontalPodAutoscaling: object expected"); + message.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.fromObject(object.horizontalPodAutoscaling); + } + if (object.kubernetesDashboard != null) { + if (typeof object.kubernetesDashboard !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.kubernetesDashboard: object expected"); + message.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.fromObject(object.kubernetesDashboard); + } + if (object.networkPolicyConfig != null) { + if (typeof object.networkPolicyConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.networkPolicyConfig: object expected"); + message.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.fromObject(object.networkPolicyConfig); + } + if (object.istioConfig != null) { + if (typeof object.istioConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.istioConfig: object expected"); + message.istioConfig = $root.google.container.v1beta1.IstioConfig.fromObject(object.istioConfig); + } + if (object.cloudRunConfig != null) { + if (typeof object.cloudRunConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.cloudRunConfig: object expected"); + message.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.fromObject(object.cloudRunConfig); + } + if (object.dnsCacheConfig != null) { + if (typeof object.dnsCacheConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.dnsCacheConfig: object expected"); + message.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.fromObject(object.dnsCacheConfig); + } + if (object.configConnectorConfig != null) { + if (typeof object.configConnectorConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.configConnectorConfig: object expected"); + message.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.fromObject(object.configConnectorConfig); + } + if (object.gcePersistentDiskCsiDriverConfig != null) { + if (typeof object.gcePersistentDiskCsiDriverConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.gcePersistentDiskCsiDriverConfig: object expected"); + message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.fromObject(object.gcePersistentDiskCsiDriverConfig); + } + if (object.kalmConfig != null) { + if (typeof object.kalmConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.kalmConfig: object expected"); + message.kalmConfig = $root.google.container.v1beta1.KalmConfig.fromObject(object.kalmConfig); + } + if (object.gcpFilestoreCsiDriverConfig != null) { + if (typeof object.gcpFilestoreCsiDriverConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.gcpFilestoreCsiDriverConfig: object expected"); + message.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.fromObject(object.gcpFilestoreCsiDriverConfig); + } + if (object.gkeBackupAgentConfig != null) { + if (typeof object.gkeBackupAgentConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.gkeBackupAgentConfig: object expected"); + message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.fromObject(object.gkeBackupAgentConfig); + } + if (object.gcsFuseCsiDriverConfig != null) { + if (typeof object.gcsFuseCsiDriverConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.gcsFuseCsiDriverConfig: object expected"); + message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.fromObject(object.gcsFuseCsiDriverConfig); + } + if (object.statefulHaConfig != null) { + if (typeof object.statefulHaConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.statefulHaConfig: object expected"); + message.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.fromObject(object.statefulHaConfig); + } + if (object.rayOperatorConfig != null) { + if (typeof object.rayOperatorConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.rayOperatorConfig: object expected"); + message.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.fromObject(object.rayOperatorConfig); + } + return message; + }; + + /** + * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {google.container.v1beta1.AddonsConfig} message AddonsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddonsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.httpLoadBalancing = null; + object.horizontalPodAutoscaling = null; + object.kubernetesDashboard = null; + object.networkPolicyConfig = null; + object.istioConfig = null; + object.cloudRunConfig = null; + object.dnsCacheConfig = null; + object.configConnectorConfig = null; + object.gcePersistentDiskCsiDriverConfig = null; + object.kalmConfig = null; + object.gcpFilestoreCsiDriverConfig = null; + object.gkeBackupAgentConfig = null; + object.gcsFuseCsiDriverConfig = null; + object.statefulHaConfig = null; + object.rayOperatorConfig = null; + } + if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) + object.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); + if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) + object.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.toObject(message.horizontalPodAutoscaling, options); + if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) + object.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.toObject(message.kubernetesDashboard, options); + if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) + object.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.toObject(message.networkPolicyConfig, options); + if (message.istioConfig != null && message.hasOwnProperty("istioConfig")) + object.istioConfig = $root.google.container.v1beta1.IstioConfig.toObject(message.istioConfig, options); + if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) + object.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.toObject(message.cloudRunConfig, options); + if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) + object.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.toObject(message.dnsCacheConfig, options); + if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) + object.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.toObject(message.configConnectorConfig, options); + if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) + object.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.toObject(message.gcePersistentDiskCsiDriverConfig, options); + if (message.kalmConfig != null && message.hasOwnProperty("kalmConfig")) + object.kalmConfig = $root.google.container.v1beta1.KalmConfig.toObject(message.kalmConfig, options); + if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) + object.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.toObject(message.gcpFilestoreCsiDriverConfig, options); + if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) + object.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.toObject(message.gkeBackupAgentConfig, options); + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) + object.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); + if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) + object.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.toObject(message.statefulHaConfig, options); + if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) + object.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); + return object; + }; + + /** + * Converts this AddonsConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AddonsConfig + * @instance + * @returns {Object.} JSON object + */ + AddonsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddonsConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AddonsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddonsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AddonsConfig"; + }; + + return AddonsConfig; + })(); + + v1beta1.HttpLoadBalancing = (function() { + + /** + * Properties of a HttpLoadBalancing. + * @memberof google.container.v1beta1 + * @interface IHttpLoadBalancing + * @property {boolean|null} [disabled] HttpLoadBalancing disabled + */ + + /** + * Constructs a new HttpLoadBalancing. + * @memberof google.container.v1beta1 + * @classdesc Represents a HttpLoadBalancing. + * @implements IHttpLoadBalancing + * @constructor + * @param {google.container.v1beta1.IHttpLoadBalancing=} [properties] Properties to set + */ + function HttpLoadBalancing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpLoadBalancing disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.HttpLoadBalancing + * @instance + */ + HttpLoadBalancing.prototype.disabled = false; + + /** + * Creates a new HttpLoadBalancing instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {google.container.v1beta1.IHttpLoadBalancing=} [properties] Properties to set + * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing instance + */ + HttpLoadBalancing.create = function create(properties) { + return new HttpLoadBalancing(properties); + }; + + /** + * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {google.container.v1beta1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpLoadBalancing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {google.container.v1beta1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpLoadBalancing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpLoadBalancing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HttpLoadBalancing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpLoadBalancing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpLoadBalancing message. + * @function verify + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpLoadBalancing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing + */ + HttpLoadBalancing.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.HttpLoadBalancing) + return object; + var message = new $root.google.container.v1beta1.HttpLoadBalancing(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {google.container.v1beta1.HttpLoadBalancing} message HttpLoadBalancing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpLoadBalancing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this HttpLoadBalancing to JSON. + * @function toJSON + * @memberof google.container.v1beta1.HttpLoadBalancing + * @instance + * @returns {Object.} JSON object + */ + HttpLoadBalancing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpLoadBalancing + * @function getTypeUrl + * @memberof google.container.v1beta1.HttpLoadBalancing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpLoadBalancing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.HttpLoadBalancing"; + }; + + return HttpLoadBalancing; + })(); + + v1beta1.HorizontalPodAutoscaling = (function() { + + /** + * Properties of a HorizontalPodAutoscaling. + * @memberof google.container.v1beta1 + * @interface IHorizontalPodAutoscaling + * @property {boolean|null} [disabled] HorizontalPodAutoscaling disabled + */ + + /** + * Constructs a new HorizontalPodAutoscaling. + * @memberof google.container.v1beta1 + * @classdesc Represents a HorizontalPodAutoscaling. + * @implements IHorizontalPodAutoscaling + * @constructor + * @param {google.container.v1beta1.IHorizontalPodAutoscaling=} [properties] Properties to set + */ + function HorizontalPodAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HorizontalPodAutoscaling disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @instance + */ + HorizontalPodAutoscaling.prototype.disabled = false; + + /** + * Creates a new HorizontalPodAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1beta1.IHorizontalPodAutoscaling=} [properties] Properties to set + * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling instance + */ + HorizontalPodAutoscaling.create = function create(properties) { + return new HorizontalPodAutoscaling(properties); + }; + + /** + * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1beta1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HorizontalPodAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1beta1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HorizontalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HorizontalPodAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HorizontalPodAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HorizontalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HorizontalPodAutoscaling message. + * @function verify + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HorizontalPodAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling + */ + HorizontalPodAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.HorizontalPodAutoscaling) + return object; + var message = new $root.google.container.v1beta1.HorizontalPodAutoscaling(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {google.container.v1beta1.HorizontalPodAutoscaling} message HorizontalPodAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HorizontalPodAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this HorizontalPodAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @instance + * @returns {Object.} JSON object + */ + HorizontalPodAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HorizontalPodAutoscaling + * @function getTypeUrl + * @memberof google.container.v1beta1.HorizontalPodAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HorizontalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.HorizontalPodAutoscaling"; + }; + + return HorizontalPodAutoscaling; + })(); + + v1beta1.KubernetesDashboard = (function() { + + /** + * Properties of a KubernetesDashboard. + * @memberof google.container.v1beta1 + * @interface IKubernetesDashboard + * @property {boolean|null} [disabled] KubernetesDashboard disabled + */ + + /** + * Constructs a new KubernetesDashboard. + * @memberof google.container.v1beta1 + * @classdesc Represents a KubernetesDashboard. + * @implements IKubernetesDashboard + * @constructor + * @param {google.container.v1beta1.IKubernetesDashboard=} [properties] Properties to set + */ + function KubernetesDashboard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KubernetesDashboard disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.KubernetesDashboard + * @instance + */ + KubernetesDashboard.prototype.disabled = false; + + /** + * Creates a new KubernetesDashboard instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {google.container.v1beta1.IKubernetesDashboard=} [properties] Properties to set + * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard instance + */ + KubernetesDashboard.create = function create(properties) { + return new KubernetesDashboard(properties); + }; + + /** + * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {google.container.v1beta1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KubernetesDashboard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {google.container.v1beta1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KubernetesDashboard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KubernetesDashboard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.KubernetesDashboard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KubernetesDashboard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KubernetesDashboard message. + * @function verify + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KubernetesDashboard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard + */ + KubernetesDashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.KubernetesDashboard) + return object; + var message = new $root.google.container.v1beta1.KubernetesDashboard(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {google.container.v1beta1.KubernetesDashboard} message KubernetesDashboard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KubernetesDashboard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this KubernetesDashboard to JSON. + * @function toJSON + * @memberof google.container.v1beta1.KubernetesDashboard + * @instance + * @returns {Object.} JSON object + */ + KubernetesDashboard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KubernetesDashboard + * @function getTypeUrl + * @memberof google.container.v1beta1.KubernetesDashboard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KubernetesDashboard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.KubernetesDashboard"; + }; + + return KubernetesDashboard; + })(); + + v1beta1.NetworkPolicyConfig = (function() { + + /** + * Properties of a NetworkPolicyConfig. + * @memberof google.container.v1beta1 + * @interface INetworkPolicyConfig + * @property {boolean|null} [disabled] NetworkPolicyConfig disabled + */ + + /** + * Constructs a new NetworkPolicyConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NetworkPolicyConfig. + * @implements INetworkPolicyConfig + * @constructor + * @param {google.container.v1beta1.INetworkPolicyConfig=} [properties] Properties to set + */ + function NetworkPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPolicyConfig disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @instance + */ + NetworkPolicyConfig.prototype.disabled = false; + + /** + * Creates a new NetworkPolicyConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {google.container.v1beta1.INetworkPolicyConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig instance + */ + NetworkPolicyConfig.create = function create(properties) { + return new NetworkPolicyConfig(properties); + }; + + /** + * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {google.container.v1beta1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {google.container.v1beta1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPolicyConfig message. + * @function verify + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig + */ + NetworkPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NetworkPolicyConfig) + return object; + var message = new $root.google.container.v1beta1.NetworkPolicyConfig(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {google.container.v1beta1.NetworkPolicyConfig} message NetworkPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this NetworkPolicyConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPolicyConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NetworkPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NetworkPolicyConfig"; + }; + + return NetworkPolicyConfig; + })(); + + v1beta1.DnsCacheConfig = (function() { + + /** + * Properties of a DnsCacheConfig. + * @memberof google.container.v1beta1 + * @interface IDnsCacheConfig + * @property {boolean|null} [enabled] DnsCacheConfig enabled + */ + + /** + * Constructs a new DnsCacheConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a DnsCacheConfig. + * @implements IDnsCacheConfig + * @constructor + * @param {google.container.v1beta1.IDnsCacheConfig=} [properties] Properties to set + */ + function DnsCacheConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DnsCacheConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.DnsCacheConfig + * @instance + */ + DnsCacheConfig.prototype.enabled = false; + + /** + * Creates a new DnsCacheConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {google.container.v1beta1.IDnsCacheConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig instance + */ + DnsCacheConfig.create = function create(properties) { + return new DnsCacheConfig(properties); + }; + + /** + * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {google.container.v1beta1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DnsCacheConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {google.container.v1beta1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DnsCacheConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DnsCacheConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DnsCacheConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DnsCacheConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DnsCacheConfig message. + * @function verify + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DnsCacheConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig + */ + DnsCacheConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DnsCacheConfig) + return object; + var message = new $root.google.container.v1beta1.DnsCacheConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {google.container.v1beta1.DnsCacheConfig} message DnsCacheConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DnsCacheConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this DnsCacheConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DnsCacheConfig + * @instance + * @returns {Object.} JSON object + */ + DnsCacheConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DnsCacheConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.DnsCacheConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DnsCacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DnsCacheConfig"; + }; + + return DnsCacheConfig; + })(); + + v1beta1.KalmConfig = (function() { + + /** + * Properties of a KalmConfig. + * @memberof google.container.v1beta1 + * @interface IKalmConfig + * @property {boolean|null} [enabled] KalmConfig enabled + */ + + /** + * Constructs a new KalmConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a KalmConfig. + * @implements IKalmConfig + * @constructor + * @param {google.container.v1beta1.IKalmConfig=} [properties] Properties to set + */ + function KalmConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KalmConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.KalmConfig + * @instance + */ + KalmConfig.prototype.enabled = false; + + /** + * Creates a new KalmConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {google.container.v1beta1.IKalmConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.KalmConfig} KalmConfig instance + */ + KalmConfig.create = function create(properties) { + return new KalmConfig(properties); + }; + + /** + * Encodes the specified KalmConfig message. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {google.container.v1beta1.IKalmConfig} message KalmConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KalmConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified KalmConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {google.container.v1beta1.IKalmConfig} message KalmConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KalmConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KalmConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.KalmConfig} KalmConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KalmConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.KalmConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KalmConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.KalmConfig} KalmConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KalmConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KalmConfig message. + * @function verify + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KalmConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a KalmConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.KalmConfig} KalmConfig + */ + KalmConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.KalmConfig) + return object; + var message = new $root.google.container.v1beta1.KalmConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a KalmConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {google.container.v1beta1.KalmConfig} message KalmConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KalmConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this KalmConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.KalmConfig + * @instance + * @returns {Object.} JSON object + */ + KalmConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KalmConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.KalmConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KalmConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.KalmConfig"; + }; + + return KalmConfig; + })(); + + v1beta1.GkeBackupAgentConfig = (function() { + + /** + * Properties of a GkeBackupAgentConfig. + * @memberof google.container.v1beta1 + * @interface IGkeBackupAgentConfig + * @property {boolean|null} [enabled] GkeBackupAgentConfig enabled + */ + + /** + * Constructs a new GkeBackupAgentConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GkeBackupAgentConfig. + * @implements IGkeBackupAgentConfig + * @constructor + * @param {google.container.v1beta1.IGkeBackupAgentConfig=} [properties] Properties to set + */ + function GkeBackupAgentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GkeBackupAgentConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @instance + */ + GkeBackupAgentConfig.prototype.enabled = false; + + /** + * Creates a new GkeBackupAgentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {google.container.v1beta1.IGkeBackupAgentConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig instance + */ + GkeBackupAgentConfig.create = function create(properties) { + return new GkeBackupAgentConfig(properties); + }; + + /** + * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {google.container.v1beta1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeBackupAgentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {google.container.v1beta1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeBackupAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeBackupAgentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GkeBackupAgentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeBackupAgentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GkeBackupAgentConfig message. + * @function verify + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GkeBackupAgentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig + */ + GkeBackupAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GkeBackupAgentConfig) + return object; + var message = new $root.google.container.v1beta1.GkeBackupAgentConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {google.container.v1beta1.GkeBackupAgentConfig} message GkeBackupAgentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GkeBackupAgentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GkeBackupAgentConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @instance + * @returns {Object.} JSON object + */ + GkeBackupAgentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GkeBackupAgentConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GkeBackupAgentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GkeBackupAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GkeBackupAgentConfig"; + }; + + return GkeBackupAgentConfig; + })(); + + v1beta1.StatefulHAConfig = (function() { + + /** + * Properties of a StatefulHAConfig. + * @memberof google.container.v1beta1 + * @interface IStatefulHAConfig + * @property {boolean|null} [enabled] StatefulHAConfig enabled + */ + + /** + * Constructs a new StatefulHAConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a StatefulHAConfig. + * @implements IStatefulHAConfig + * @constructor + * @param {google.container.v1beta1.IStatefulHAConfig=} [properties] Properties to set + */ + function StatefulHAConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatefulHAConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.StatefulHAConfig + * @instance + */ + StatefulHAConfig.prototype.enabled = false; + + /** + * Creates a new StatefulHAConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {google.container.v1beta1.IStatefulHAConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig instance + */ + StatefulHAConfig.create = function create(properties) { + return new StatefulHAConfig(properties); + }; + + /** + * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {google.container.v1beta1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatefulHAConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {google.container.v1beta1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatefulHAConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatefulHAConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StatefulHAConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatefulHAConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatefulHAConfig message. + * @function verify + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatefulHAConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig + */ + StatefulHAConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.StatefulHAConfig) + return object; + var message = new $root.google.container.v1beta1.StatefulHAConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {google.container.v1beta1.StatefulHAConfig} message StatefulHAConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatefulHAConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this StatefulHAConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.StatefulHAConfig + * @instance + * @returns {Object.} JSON object + */ + StatefulHAConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatefulHAConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.StatefulHAConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatefulHAConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.StatefulHAConfig"; + }; + + return StatefulHAConfig; + })(); + + v1beta1.ConfigConnectorConfig = (function() { + + /** + * Properties of a ConfigConnectorConfig. + * @memberof google.container.v1beta1 + * @interface IConfigConnectorConfig + * @property {boolean|null} [enabled] ConfigConnectorConfig enabled + */ + + /** + * Constructs a new ConfigConnectorConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ConfigConnectorConfig. + * @implements IConfigConnectorConfig + * @constructor + * @param {google.container.v1beta1.IConfigConnectorConfig=} [properties] Properties to set + */ + function ConfigConnectorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigConnectorConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @instance + */ + ConfigConnectorConfig.prototype.enabled = false; + + /** + * Creates a new ConfigConnectorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {google.container.v1beta1.IConfigConnectorConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig instance + */ + ConfigConnectorConfig.create = function create(properties) { + return new ConfigConnectorConfig(properties); + }; + + /** + * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {google.container.v1beta1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigConnectorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {google.container.v1beta1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigConnectorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigConnectorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ConfigConnectorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigConnectorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigConnectorConfig message. + * @function verify + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigConnectorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig + */ + ConfigConnectorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ConfigConnectorConfig) + return object; + var message = new $root.google.container.v1beta1.ConfigConnectorConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {google.container.v1beta1.ConfigConnectorConfig} message ConfigConnectorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigConnectorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConfigConnectorConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @instance + * @returns {Object.} JSON object + */ + ConfigConnectorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfigConnectorConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ConfigConnectorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigConnectorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ConfigConnectorConfig"; + }; + + return ConfigConnectorConfig; + })(); + + v1beta1.GcePersistentDiskCsiDriverConfig = (function() { + + /** + * Properties of a GcePersistentDiskCsiDriverConfig. + * @memberof google.container.v1beta1 + * @interface IGcePersistentDiskCsiDriverConfig + * @property {boolean|null} [enabled] GcePersistentDiskCsiDriverConfig enabled + */ + + /** + * Constructs a new GcePersistentDiskCsiDriverConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GcePersistentDiskCsiDriverConfig. + * @implements IGcePersistentDiskCsiDriverConfig + * @constructor + * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set + */ + function GcePersistentDiskCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcePersistentDiskCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @instance + */ + GcePersistentDiskCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig instance + */ + GcePersistentDiskCsiDriverConfig.create = function create(properties) { + return new GcePersistentDiskCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcePersistentDiskCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcePersistentDiskCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcePersistentDiskCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcePersistentDiskCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcePersistentDiskCsiDriverConfig message. + * @function verify + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcePersistentDiskCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig + */ + GcePersistentDiskCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig) + return object; + var message = new $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcePersistentDiskCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcePersistentDiskCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcePersistentDiskCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcePersistentDiskCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcePersistentDiskCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GcePersistentDiskCsiDriverConfig"; + }; + + return GcePersistentDiskCsiDriverConfig; + })(); + + v1beta1.GcpFilestoreCsiDriverConfig = (function() { + + /** + * Properties of a GcpFilestoreCsiDriverConfig. + * @memberof google.container.v1beta1 + * @interface IGcpFilestoreCsiDriverConfig + * @property {boolean|null} [enabled] GcpFilestoreCsiDriverConfig enabled + */ + + /** + * Constructs a new GcpFilestoreCsiDriverConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GcpFilestoreCsiDriverConfig. + * @implements IGcpFilestoreCsiDriverConfig + * @constructor + * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set + */ + function GcpFilestoreCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpFilestoreCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @instance + */ + GcpFilestoreCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig instance + */ + GcpFilestoreCsiDriverConfig.create = function create(properties) { + return new GcpFilestoreCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpFilestoreCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpFilestoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpFilestoreCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpFilestoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpFilestoreCsiDriverConfig message. + * @function verify + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpFilestoreCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig + */ + GcpFilestoreCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig) + return object; + var message = new $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {google.container.v1beta1.GcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpFilestoreCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcpFilestoreCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcpFilestoreCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpFilestoreCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpFilestoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GcpFilestoreCsiDriverConfig"; + }; + + return GcpFilestoreCsiDriverConfig; + })(); + + v1beta1.GcsFuseCsiDriverConfig = (function() { + + /** + * Properties of a GcsFuseCsiDriverConfig. + * @memberof google.container.v1beta1 + * @interface IGcsFuseCsiDriverConfig + * @property {boolean|null} [enabled] GcsFuseCsiDriverConfig enabled + */ + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GcsFuseCsiDriverConfig. + * @implements IGcsFuseCsiDriverConfig + * @constructor + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + */ + function GcsFuseCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsFuseCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @instance + */ + GcsFuseCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig instance + */ + GcsFuseCsiDriverConfig.create = function create(properties) { + return new GcsFuseCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsFuseCsiDriverConfig message. + * @function verify + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsFuseCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + */ + GcsFuseCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GcsFuseCsiDriverConfig) + return object; + var message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.GcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsFuseCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcsFuseCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsFuseCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GcsFuseCsiDriverConfig"; + }; + + return GcsFuseCsiDriverConfig; + })(); + + v1beta1.RayOperatorConfig = (function() { + + /** + * Properties of a RayOperatorConfig. + * @memberof google.container.v1beta1 + * @interface IRayOperatorConfig + * @property {boolean|null} [enabled] RayOperatorConfig enabled + * @property {google.container.v1beta1.IRayClusterLoggingConfig|null} [rayClusterLoggingConfig] RayOperatorConfig rayClusterLoggingConfig + * @property {google.container.v1beta1.IRayClusterMonitoringConfig|null} [rayClusterMonitoringConfig] RayOperatorConfig rayClusterMonitoringConfig + */ + + /** + * Constructs a new RayOperatorConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a RayOperatorConfig. + * @implements IRayOperatorConfig + * @constructor + * @param {google.container.v1beta1.IRayOperatorConfig=} [properties] Properties to set + */ + function RayOperatorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayOperatorConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.enabled = false; + + /** + * RayOperatorConfig rayClusterLoggingConfig. + * @member {google.container.v1beta1.IRayClusterLoggingConfig|null|undefined} rayClusterLoggingConfig + * @memberof google.container.v1beta1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.rayClusterLoggingConfig = null; + + /** + * RayOperatorConfig rayClusterMonitoringConfig. + * @member {google.container.v1beta1.IRayClusterMonitoringConfig|null|undefined} rayClusterMonitoringConfig + * @memberof google.container.v1beta1.RayOperatorConfig + * @instance + */ + RayOperatorConfig.prototype.rayClusterMonitoringConfig = null; + + /** + * Creates a new RayOperatorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {google.container.v1beta1.IRayOperatorConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig instance + */ + RayOperatorConfig.create = function create(properties) { + return new RayOperatorConfig(properties); + }; + + /** + * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {google.container.v1beta1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayOperatorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.rayClusterLoggingConfig != null && Object.hasOwnProperty.call(message, "rayClusterLoggingConfig")) + $root.google.container.v1beta1.RayClusterLoggingConfig.encode(message.rayClusterLoggingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rayClusterMonitoringConfig != null && Object.hasOwnProperty.call(message, "rayClusterMonitoringConfig")) + $root.google.container.v1beta1.RayClusterMonitoringConfig.encode(message.rayClusterMonitoringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {google.container.v1beta1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayOperatorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayOperatorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayOperatorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayOperatorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayOperatorConfig message. + * @function verify + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayOperatorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) { + var error = $root.google.container.v1beta1.RayClusterLoggingConfig.verify(message.rayClusterLoggingConfig); + if (error) + return "rayClusterLoggingConfig." + error; + } + if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) { + var error = $root.google.container.v1beta1.RayClusterMonitoringConfig.verify(message.rayClusterMonitoringConfig); + if (error) + return "rayClusterMonitoringConfig." + error; + } + return null; + }; + + /** + * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig + */ + RayOperatorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RayOperatorConfig) + return object; + var message = new $root.google.container.v1beta1.RayOperatorConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.rayClusterLoggingConfig != null) { + if (typeof object.rayClusterLoggingConfig !== "object") + throw TypeError(".google.container.v1beta1.RayOperatorConfig.rayClusterLoggingConfig: object expected"); + message.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.fromObject(object.rayClusterLoggingConfig); + } + if (object.rayClusterMonitoringConfig != null) { + if (typeof object.rayClusterMonitoringConfig !== "object") + throw TypeError(".google.container.v1beta1.RayOperatorConfig.rayClusterMonitoringConfig: object expected"); + message.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.fromObject(object.rayClusterMonitoringConfig); + } + return message; + }; + + /** + * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {google.container.v1beta1.RayOperatorConfig} message RayOperatorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayOperatorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.rayClusterLoggingConfig = null; + object.rayClusterMonitoringConfig = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) + object.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.toObject(message.rayClusterLoggingConfig, options); + if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) + object.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.toObject(message.rayClusterMonitoringConfig, options); + return object; + }; + + /** + * Converts this RayOperatorConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RayOperatorConfig + * @instance + * @returns {Object.} JSON object + */ + RayOperatorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayOperatorConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.RayOperatorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayOperatorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RayOperatorConfig"; + }; + + return RayOperatorConfig; + })(); + + v1beta1.PrivateClusterMasterGlobalAccessConfig = (function() { + + /** + * Properties of a PrivateClusterMasterGlobalAccessConfig. + * @memberof google.container.v1beta1 + * @interface IPrivateClusterMasterGlobalAccessConfig + * @property {boolean|null} [enabled] PrivateClusterMasterGlobalAccessConfig enabled + */ + + /** + * Constructs a new PrivateClusterMasterGlobalAccessConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a PrivateClusterMasterGlobalAccessConfig. + * @implements IPrivateClusterMasterGlobalAccessConfig + * @constructor + * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set + */ + function PrivateClusterMasterGlobalAccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterMasterGlobalAccessConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @instance + */ + PrivateClusterMasterGlobalAccessConfig.prototype.enabled = false; + + /** + * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig instance + */ + PrivateClusterMasterGlobalAccessConfig.create = function create(properties) { + return new PrivateClusterMasterGlobalAccessConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterMasterGlobalAccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterMasterGlobalAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterMasterGlobalAccessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterMasterGlobalAccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterMasterGlobalAccessConfig message. + * @function verify + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterMasterGlobalAccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig + */ + PrivateClusterMasterGlobalAccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig) + return object; + var message = new $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterMasterGlobalAccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterMasterGlobalAccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterMasterGlobalAccessConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterMasterGlobalAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig"; + }; + + return PrivateClusterMasterGlobalAccessConfig; + })(); + + v1beta1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.container.v1beta1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateNodes] PrivateClusterConfig enablePrivateNodes + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [privateEndpoint] PrivateClusterConfig privateEndpoint + * @property {string|null} [publicEndpoint] PrivateClusterConfig publicEndpoint + * @property {string|null} [peeringName] PrivateClusterConfig peeringName + * @property {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null} [masterGlobalAccessConfig] PrivateClusterConfig masterGlobalAccessConfig + * @property {string|null} [privateEndpointSubnetwork] PrivateClusterConfig privateEndpointSubnetwork + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.container.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateNodes. + * @member {boolean} enablePrivateNodes + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateNodes = false; + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig privateEndpoint. + * @member {string} privateEndpoint + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.privateEndpoint = ""; + + /** + * PrivateClusterConfig publicEndpoint. + * @member {string} publicEndpoint + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.publicEndpoint = ""; + + /** + * PrivateClusterConfig peeringName. + * @member {string} peeringName + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.peeringName = ""; + + /** + * PrivateClusterConfig masterGlobalAccessConfig. + * @member {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null|undefined} masterGlobalAccessConfig + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterGlobalAccessConfig = null; + + /** + * PrivateClusterConfig privateEndpointSubnetwork. + * @member {string} privateEndpointSubnetwork + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.privateEndpointSubnetwork = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateNodes); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4CidrBlock); + if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.privateEndpoint); + if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); + if (message.peeringName != null && Object.hasOwnProperty.call(message, "peeringName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.peeringName); + if (message.masterGlobalAccessConfig != null && Object.hasOwnProperty.call(message, "masterGlobalAccessConfig")) + $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.encode(message.masterGlobalAccessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.privateEndpointSubnetwork); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {google.container.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateNodes = reader.bool(); + break; + } + case 2: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 3: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.privateEndpoint = reader.string(); + break; + } + case 5: { + message.publicEndpoint = reader.string(); + break; + } + case 7: { + message.peeringName = reader.string(); + break; + } + case 8: { + message.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.privateEndpointSubnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) + if (typeof message.enablePrivateNodes !== "boolean") + return "enablePrivateNodes: boolean expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + if (!$util.isString(message.privateEndpoint)) + return "privateEndpoint: string expected"; + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + if (!$util.isString(message.publicEndpoint)) + return "publicEndpoint: string expected"; + if (message.peeringName != null && message.hasOwnProperty("peeringName")) + if (!$util.isString(message.peeringName)) + return "peeringName: string expected"; + if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) { + var error = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify(message.masterGlobalAccessConfig); + if (error) + return "masterGlobalAccessConfig." + error; + } + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + if (!$util.isString(message.privateEndpointSubnetwork)) + return "privateEndpointSubnetwork: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.PrivateClusterConfig) + return object; + var message = new $root.google.container.v1beta1.PrivateClusterConfig(); + if (object.enablePrivateNodes != null) + message.enablePrivateNodes = Boolean(object.enablePrivateNodes); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.privateEndpoint != null) + message.privateEndpoint = String(object.privateEndpoint); + if (object.publicEndpoint != null) + message.publicEndpoint = String(object.publicEndpoint); + if (object.peeringName != null) + message.peeringName = String(object.peeringName); + if (object.masterGlobalAccessConfig != null) { + if (typeof object.masterGlobalAccessConfig !== "object") + throw TypeError(".google.container.v1beta1.PrivateClusterConfig.masterGlobalAccessConfig: object expected"); + message.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.fromObject(object.masterGlobalAccessConfig); + } + if (object.privateEndpointSubnetwork != null) + message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {google.container.v1beta1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateNodes = false; + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.privateEndpoint = ""; + object.publicEndpoint = ""; + object.peeringName = ""; + object.masterGlobalAccessConfig = null; + object.privateEndpointSubnetwork = ""; + } + if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) + object.enablePrivateNodes = message.enablePrivateNodes; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + object.privateEndpoint = message.privateEndpoint; + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + object.publicEndpoint = message.publicEndpoint; + if (message.peeringName != null && message.hasOwnProperty("peeringName")) + object.peeringName = message.peeringName; + if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) + object.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.toObject(message.masterGlobalAccessConfig, options); + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.PrivateClusterConfig"; + }; + + return PrivateClusterConfig; + })(); + + v1beta1.IstioConfig = (function() { + + /** + * Properties of an IstioConfig. + * @memberof google.container.v1beta1 + * @interface IIstioConfig + * @property {boolean|null} [disabled] IstioConfig disabled + * @property {google.container.v1beta1.IstioConfig.IstioAuthMode|null} [auth] IstioConfig auth + */ + + /** + * Constructs a new IstioConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an IstioConfig. + * @implements IIstioConfig + * @constructor + * @param {google.container.v1beta1.IIstioConfig=} [properties] Properties to set + */ + function IstioConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IstioConfig disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.IstioConfig + * @instance + */ + IstioConfig.prototype.disabled = false; + + /** + * IstioConfig auth. + * @member {google.container.v1beta1.IstioConfig.IstioAuthMode} auth + * @memberof google.container.v1beta1.IstioConfig + * @instance + */ + IstioConfig.prototype.auth = 0; + + /** + * Creates a new IstioConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {google.container.v1beta1.IIstioConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.IstioConfig} IstioConfig instance + */ + IstioConfig.create = function create(properties) { + return new IstioConfig(properties); + }; + + /** + * Encodes the specified IstioConfig message. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {google.container.v1beta1.IIstioConfig} message IstioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IstioConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + if (message.auth != null && Object.hasOwnProperty.call(message, "auth")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.auth); + return writer; + }; + + /** + * Encodes the specified IstioConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {google.container.v1beta1.IIstioConfig} message IstioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IstioConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IstioConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.IstioConfig} IstioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IstioConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IstioConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + case 2: { + message.auth = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IstioConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.IstioConfig} IstioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IstioConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IstioConfig message. + * @function verify + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IstioConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.auth != null && message.hasOwnProperty("auth")) + switch (message.auth) { + default: + return "auth: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an IstioConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.IstioConfig} IstioConfig + */ + IstioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.IstioConfig) + return object; + var message = new $root.google.container.v1beta1.IstioConfig(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.auth) { + default: + if (typeof object.auth === "number") { + message.auth = object.auth; + break; + } + break; + case "AUTH_NONE": + case 0: + message.auth = 0; + break; + case "AUTH_MUTUAL_TLS": + case 1: + message.auth = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an IstioConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {google.container.v1beta1.IstioConfig} message IstioConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IstioConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.auth = options.enums === String ? "AUTH_NONE" : 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.auth != null && message.hasOwnProperty("auth")) + object.auth = options.enums === String ? $root.google.container.v1beta1.IstioConfig.IstioAuthMode[message.auth] === undefined ? message.auth : $root.google.container.v1beta1.IstioConfig.IstioAuthMode[message.auth] : message.auth; + return object; + }; + + /** + * Converts this IstioConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.IstioConfig + * @instance + * @returns {Object.} JSON object + */ + IstioConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IstioConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.IstioConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IstioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.IstioConfig"; + }; + + /** + * IstioAuthMode enum. + * @name google.container.v1beta1.IstioConfig.IstioAuthMode + * @enum {number} + * @property {number} AUTH_NONE=0 AUTH_NONE value + * @property {number} AUTH_MUTUAL_TLS=1 AUTH_MUTUAL_TLS value + */ + IstioConfig.IstioAuthMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTH_NONE"] = 0; + values[valuesById[1] = "AUTH_MUTUAL_TLS"] = 1; + return values; + })(); + + return IstioConfig; + })(); + + v1beta1.CloudRunConfig = (function() { + + /** + * Properties of a CloudRunConfig. + * @memberof google.container.v1beta1 + * @interface ICloudRunConfig + * @property {boolean|null} [disabled] CloudRunConfig disabled + * @property {google.container.v1beta1.CloudRunConfig.LoadBalancerType|null} [loadBalancerType] CloudRunConfig loadBalancerType + */ + + /** + * Constructs a new CloudRunConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a CloudRunConfig. + * @implements ICloudRunConfig + * @constructor + * @param {google.container.v1beta1.ICloudRunConfig=} [properties] Properties to set + */ + function CloudRunConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunConfig disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.CloudRunConfig + * @instance + */ + CloudRunConfig.prototype.disabled = false; + + /** + * CloudRunConfig loadBalancerType. + * @member {google.container.v1beta1.CloudRunConfig.LoadBalancerType} loadBalancerType + * @memberof google.container.v1beta1.CloudRunConfig + * @instance + */ + CloudRunConfig.prototype.loadBalancerType = 0; + + /** + * Creates a new CloudRunConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {google.container.v1beta1.ICloudRunConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig instance + */ + CloudRunConfig.create = function create(properties) { + return new CloudRunConfig(properties); + }; + + /** + * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {google.container.v1beta1.ICloudRunConfig} message CloudRunConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadBalancerType); + return writer; + }; + + /** + * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {google.container.v1beta1.ICloudRunConfig} message CloudRunConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CloudRunConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + case 3: { + message.loadBalancerType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunConfig message. + * @function verify + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig + */ + CloudRunConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CloudRunConfig) + return object; + var message = new $root.google.container.v1beta1.CloudRunConfig(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "LOAD_BALANCER_TYPE_EXTERNAL": + case 1: + message.loadBalancerType = 1; + break; + case "LOAD_BALANCER_TYPE_INTERNAL": + case 2: + message.loadBalancerType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {google.container.v1beta1.CloudRunConfig} message CloudRunConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.container.v1beta1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.container.v1beta1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + return object; + }; + + /** + * Converts this CloudRunConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CloudRunConfig + * @instance + * @returns {Object.} JSON object + */ + CloudRunConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.CloudRunConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CloudRunConfig"; + }; + + /** + * LoadBalancerType enum. + * @name google.container.v1beta1.CloudRunConfig.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} LOAD_BALANCER_TYPE_EXTERNAL=1 LOAD_BALANCER_TYPE_EXTERNAL value + * @property {number} LOAD_BALANCER_TYPE_INTERNAL=2 LOAD_BALANCER_TYPE_INTERNAL value + */ + CloudRunConfig.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOAD_BALANCER_TYPE_EXTERNAL"] = 1; + values[valuesById[2] = "LOAD_BALANCER_TYPE_INTERNAL"] = 2; + return values; + })(); + + return CloudRunConfig; + })(); + + v1beta1.MasterAuthorizedNetworksConfig = (function() { + + /** + * Properties of a MasterAuthorizedNetworksConfig. + * @memberof google.container.v1beta1 + * @interface IMasterAuthorizedNetworksConfig + * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled + * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks + * @property {boolean|null} [gcpPublicCidrsAccessEnabled] MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled + */ + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a MasterAuthorizedNetworksConfig. + * @implements IMasterAuthorizedNetworksConfig + * @constructor + * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + */ + function MasterAuthorizedNetworksConfig(properties) { + this.cidrBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuthorizedNetworksConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.enabled = false; + + /** + * MasterAuthorizedNetworksConfig cidrBlocks. + * @member {Array.} cidrBlocks + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; + + /** + * MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. + * @member {boolean|null|undefined} gcpPublicCidrsAccessEnabled + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.gcpPublicCidrsAccessEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. + * @member {"gcpPublicCidrsAccessEnabled"|undefined} _gcpPublicCidrsAccessEnabled + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_gcpPublicCidrsAccessEnabled", { + get: $util.oneOfGetter($oneOfFields = ["gcpPublicCidrsAccessEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance + */ + MasterAuthorizedNetworksConfig.create = function create(properties) { + return new MasterAuthorizedNetworksConfig(properties); + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.cidrBlocks != null && message.cidrBlocks.length) + for (var i = 0; i < message.cidrBlocks.length; ++i) + $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcpPublicCidrsAccessEnabled != null && Object.hasOwnProperty.call(message, "gcpPublicCidrsAccessEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.gcpPublicCidrsAccessEnabled); + return writer; + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.cidrBlocks && message.cidrBlocks.length)) + message.cidrBlocks = []; + message.cidrBlocks.push($root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); + break; + } + case 3: { + message.gcpPublicCidrsAccessEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @function verify + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuthorizedNetworksConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { + if (!Array.isArray(message.cidrBlocks)) + return "cidrBlocks: array expected"; + for (var i = 0; i < message.cidrBlocks.length; ++i) { + var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); + if (error) + return "cidrBlocks." + error; + } + } + if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { + properties._gcpPublicCidrsAccessEnabled = 1; + if (typeof message.gcpPublicCidrsAccessEnabled !== "boolean") + return "gcpPublicCidrsAccessEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + */ + MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MasterAuthorizedNetworksConfig) + return object; + var message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.cidrBlocks) { + if (!Array.isArray(object.cidrBlocks)) + throw TypeError(".google.container.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); + message.cidrBlocks = []; + for (var i = 0; i < object.cidrBlocks.length; ++i) { + if (typeof object.cidrBlocks[i] !== "object") + throw TypeError(".google.container.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); + message.cidrBlocks[i] = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); + } + } + if (object.gcpPublicCidrsAccessEnabled != null) + message.gcpPublicCidrsAccessEnabled = Boolean(object.gcpPublicCidrsAccessEnabled); + return message; + }; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cidrBlocks = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.cidrBlocks && message.cidrBlocks.length) { + object.cidrBlocks = []; + for (var j = 0; j < message.cidrBlocks.length; ++j) + object.cidrBlocks[j] = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); + } + if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { + object.gcpPublicCidrsAccessEnabled = message.gcpPublicCidrsAccessEnabled; + if (options.oneofs) + object._gcpPublicCidrsAccessEnabled = "gcpPublicCidrsAccessEnabled"; + } + return object; + }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @instance + * @returns {Object.} JSON object + */ + MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MasterAuthorizedNetworksConfig"; + }; + + MasterAuthorizedNetworksConfig.CidrBlock = (function() { + + /** + * Properties of a CidrBlock. + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @interface ICidrBlock + * @property {string|null} [displayName] CidrBlock displayName + * @property {string|null} [cidrBlock] CidrBlock cidrBlock + */ + + /** + * Constructs a new CidrBlock. + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig + * @classdesc Represents a CidrBlock. + * @implements ICidrBlock + * @constructor + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + */ + function CidrBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CidrBlock displayName. + * @member {string} displayName + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.displayName = ""; + + /** + * CidrBlock cidrBlock. + * @member {string} cidrBlock + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.cidrBlock = ""; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance + */ + CidrBlock.create = function create(properties) { + return new CidrBlock(properties); + }; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); + return writer; + }; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.cidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CidrBlock message. + * @function verify + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CidrBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + if (!$util.isString(message.cidrBlock)) + return "cidrBlock: string expected"; + return null; + }; + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + */ + CidrBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) + return object; + var message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cidrBlock != null) + message.cidrBlock = String(object.cidrBlock); + return message; + }; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CidrBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.cidrBlock = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + object.cidrBlock = message.cidrBlock; + return object; + }; + + /** + * Converts this CidrBlock to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + * @returns {Object.} JSON object + */ + CidrBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CidrBlock + * @function getTypeUrl + * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock"; + }; + + return CidrBlock; + })(); + + return MasterAuthorizedNetworksConfig; + })(); + + v1beta1.LegacyAbac = (function() { + + /** + * Properties of a LegacyAbac. + * @memberof google.container.v1beta1 + * @interface ILegacyAbac + * @property {boolean|null} [enabled] LegacyAbac enabled + */ + + /** + * Constructs a new LegacyAbac. + * @memberof google.container.v1beta1 + * @classdesc Represents a LegacyAbac. + * @implements ILegacyAbac + * @constructor + * @param {google.container.v1beta1.ILegacyAbac=} [properties] Properties to set + */ + function LegacyAbac(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LegacyAbac enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.LegacyAbac + * @instance + */ + LegacyAbac.prototype.enabled = false; + + /** + * Creates a new LegacyAbac instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {google.container.v1beta1.ILegacyAbac=} [properties] Properties to set + * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac instance + */ + LegacyAbac.create = function create(properties) { + return new LegacyAbac(properties); + }; + + /** + * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {google.container.v1beta1.ILegacyAbac} message LegacyAbac message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAbac.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {google.container.v1beta1.ILegacyAbac} message LegacyAbac message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAbac.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAbac.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LegacyAbac(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAbac.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LegacyAbac message. + * @function verify + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LegacyAbac.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac + */ + LegacyAbac.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LegacyAbac) + return object; + var message = new $root.google.container.v1beta1.LegacyAbac(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {google.container.v1beta1.LegacyAbac} message LegacyAbac + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LegacyAbac.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this LegacyAbac to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LegacyAbac + * @instance + * @returns {Object.} JSON object + */ + LegacyAbac.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LegacyAbac + * @function getTypeUrl + * @memberof google.container.v1beta1.LegacyAbac + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LegacyAbac.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LegacyAbac"; + }; + + return LegacyAbac; + })(); + + v1beta1.NetworkPolicy = (function() { + + /** + * Properties of a NetworkPolicy. + * @memberof google.container.v1beta1 + * @interface INetworkPolicy + * @property {google.container.v1beta1.NetworkPolicy.Provider|null} [provider] NetworkPolicy provider + * @property {boolean|null} [enabled] NetworkPolicy enabled + */ + + /** + * Constructs a new NetworkPolicy. + * @memberof google.container.v1beta1 + * @classdesc Represents a NetworkPolicy. + * @implements INetworkPolicy + * @constructor + * @param {google.container.v1beta1.INetworkPolicy=} [properties] Properties to set + */ + function NetworkPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPolicy provider. + * @member {google.container.v1beta1.NetworkPolicy.Provider} provider + * @memberof google.container.v1beta1.NetworkPolicy + * @instance + */ + NetworkPolicy.prototype.provider = 0; + + /** + * NetworkPolicy enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.NetworkPolicy + * @instance + */ + NetworkPolicy.prototype.enabled = false; + + /** + * Creates a new NetworkPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {google.container.v1beta1.INetworkPolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy instance + */ + NetworkPolicy.create = function create(properties) { + return new NetworkPolicy(properties); + }; + + /** + * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {google.container.v1beta1.INetworkPolicy} message NetworkPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {google.container.v1beta1.INetworkPolicy} message NetworkPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.int32(); + break; + } + case 2: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPolicy message. + * @function verify + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + switch (message.provider) { + default: + return "provider: enum value expected"; + case 0: + case 1: + break; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy + */ + NetworkPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NetworkPolicy) + return object; + var message = new $root.google.container.v1beta1.NetworkPolicy(); + switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "PROVIDER_UNSPECIFIED": + case 0: + message.provider = 0; + break; + case "CALICO": + case 1: + message.provider = 1; + break; + } + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {google.container.v1beta1.NetworkPolicy} message NetworkPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; + object.enabled = false; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = options.enums === String ? $root.google.container.v1beta1.NetworkPolicy.Provider[message.provider] === undefined ? message.provider : $root.google.container.v1beta1.NetworkPolicy.Provider[message.provider] : message.provider; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this NetworkPolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NetworkPolicy + * @instance + * @returns {Object.} JSON object + */ + NetworkPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.NetworkPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NetworkPolicy"; + }; + + /** + * Provider enum. + * @name google.container.v1beta1.NetworkPolicy.Provider + * @enum {number} + * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value + * @property {number} CALICO=1 CALICO value + */ + NetworkPolicy.Provider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "CALICO"] = 1; + return values; + })(); + + return NetworkPolicy; + })(); + + v1beta1.PodCIDROverprovisionConfig = (function() { + + /** + * Properties of a PodCIDROverprovisionConfig. + * @memberof google.container.v1beta1 + * @interface IPodCIDROverprovisionConfig + * @property {boolean|null} [disable] PodCIDROverprovisionConfig disable + */ + + /** + * Constructs a new PodCIDROverprovisionConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a PodCIDROverprovisionConfig. + * @implements IPodCIDROverprovisionConfig + * @constructor + * @param {google.container.v1beta1.IPodCIDROverprovisionConfig=} [properties] Properties to set + */ + function PodCIDROverprovisionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PodCIDROverprovisionConfig disable. + * @member {boolean} disable + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @instance + */ + PodCIDROverprovisionConfig.prototype.disable = false; + + /** + * Creates a new PodCIDROverprovisionConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1beta1.IPodCIDROverprovisionConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig instance + */ + PodCIDROverprovisionConfig.create = function create(properties) { + return new PodCIDROverprovisionConfig(properties); + }; + + /** + * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1beta1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodCIDROverprovisionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); + return writer; + }; + + /** + * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1beta1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodCIDROverprovisionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodCIDROverprovisionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PodCIDROverprovisionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodCIDROverprovisionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PodCIDROverprovisionConfig message. + * @function verify + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PodCIDROverprovisionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disable != null && message.hasOwnProperty("disable")) + if (typeof message.disable !== "boolean") + return "disable: boolean expected"; + return null; + }; + + /** + * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig + */ + PodCIDROverprovisionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.PodCIDROverprovisionConfig) + return object; + var message = new $root.google.container.v1beta1.PodCIDROverprovisionConfig(); + if (object.disable != null) + message.disable = Boolean(object.disable); + return message; + }; + + /** + * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {google.container.v1beta1.PodCIDROverprovisionConfig} message PodCIDROverprovisionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PodCIDROverprovisionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disable = false; + if (message.disable != null && message.hasOwnProperty("disable")) + object.disable = message.disable; + return object; + }; + + /** + * Converts this PodCIDROverprovisionConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @instance + * @returns {Object.} JSON object + */ + PodCIDROverprovisionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PodCIDROverprovisionConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.PodCIDROverprovisionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PodCIDROverprovisionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.PodCIDROverprovisionConfig"; + }; + + return PodCIDROverprovisionConfig; + })(); + + v1beta1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.container.v1beta1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {boolean|null} [createSubnetwork] IPAllocationPolicy createSubnetwork + * @property {string|null} [subnetworkName] IPAllocationPolicy subnetworkName + * @property {string|null} [clusterIpv4Cidr] IPAllocationPolicy clusterIpv4Cidr + * @property {string|null} [nodeIpv4Cidr] IPAllocationPolicy nodeIpv4Cidr + * @property {string|null} [servicesIpv4Cidr] IPAllocationPolicy servicesIpv4Cidr + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [nodeIpv4CidrBlock] IPAllocationPolicy nodeIpv4CidrBlock + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + * @property {boolean|null} [allowRouteOverlap] IPAllocationPolicy allowRouteOverlap + * @property {string|null} [tpuIpv4CidrBlock] IPAllocationPolicy tpuIpv4CidrBlock + * @property {boolean|null} [useRoutes] IPAllocationPolicy useRoutes + * @property {google.container.v1beta1.IPAllocationPolicy.StackType|null} [stackType] IPAllocationPolicy stackType + * @property {google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|null} [ipv6AccessType] IPAllocationPolicy ipv6AccessType + * @property {google.container.v1beta1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] IPAllocationPolicy podCidrOverprovisionConfig + * @property {string|null} [subnetIpv6CidrBlock] IPAllocationPolicy subnetIpv6CidrBlock + * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock + * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] IPAllocationPolicy additionalPodRangesConfig + * @property {number|null} [defaultPodIpv4RangeUtilization] IPAllocationPolicy defaultPodIpv4RangeUtilization + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.container.v1beta1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.container.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy createSubnetwork. + * @member {boolean} createSubnetwork + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.createSubnetwork = false; + + /** + * IPAllocationPolicy subnetworkName. + * @member {string} subnetworkName + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.subnetworkName = ""; + + /** + * IPAllocationPolicy clusterIpv4Cidr. + * @member {string} clusterIpv4Cidr + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4Cidr = ""; + + /** + * IPAllocationPolicy nodeIpv4Cidr. + * @member {string} nodeIpv4Cidr + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.nodeIpv4Cidr = ""; + + /** + * IPAllocationPolicy servicesIpv4Cidr. + * @member {string} servicesIpv4Cidr + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4Cidr = ""; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string} clusterSecondaryRangeName + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string} servicesSecondaryRangeName + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string} clusterIpv4CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy nodeIpv4CidrBlock. + * @member {string} nodeIpv4CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.nodeIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string} servicesIpv4CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy allowRouteOverlap. + * @member {boolean} allowRouteOverlap + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.allowRouteOverlap = false; + + /** + * IPAllocationPolicy tpuIpv4CidrBlock. + * @member {string} tpuIpv4CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.tpuIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy useRoutes. + * @member {boolean} useRoutes + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useRoutes = false; + + /** + * IPAllocationPolicy stackType. + * @member {google.container.v1beta1.IPAllocationPolicy.StackType} stackType + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.stackType = 0; + + /** + * IPAllocationPolicy ipv6AccessType. + * @member {google.container.v1beta1.IPAllocationPolicy.IPv6AccessType} ipv6AccessType + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.ipv6AccessType = 0; + + /** + * IPAllocationPolicy podCidrOverprovisionConfig. + * @member {google.container.v1beta1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.podCidrOverprovisionConfig = null; + + /** + * IPAllocationPolicy subnetIpv6CidrBlock. + * @member {string} subnetIpv6CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.subnetIpv6CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv6CidrBlock. + * @member {string} servicesIpv6CidrBlock + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv6CidrBlock = ""; + + /** + * IPAllocationPolicy additionalPodRangesConfig. + * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.additionalPodRangesConfig = null; + + /** + * IPAllocationPolicy defaultPodIpv4RangeUtilization. + * @member {number} defaultPodIpv4RangeUtilization + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.defaultPodIpv4RangeUtilization = 0; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {google.container.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {google.container.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.createSubnetwork != null && Object.hasOwnProperty.call(message, "createSubnetwork")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.createSubnetwork); + if (message.subnetworkName != null && Object.hasOwnProperty.call(message, "subnetworkName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetworkName); + if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4Cidr); + if (message.nodeIpv4Cidr != null && Object.hasOwnProperty.call(message, "nodeIpv4Cidr")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeIpv4Cidr); + if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.servicesIpv4Cidr); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4CidrBlock); + if (message.nodeIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrBlock")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.nodeIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.servicesIpv4CidrBlock); + if (message.allowRouteOverlap != null && Object.hasOwnProperty.call(message, "allowRouteOverlap")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.allowRouteOverlap); + if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.tpuIpv4CidrBlock); + if (message.useRoutes != null && Object.hasOwnProperty.call(message, "useRoutes")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.useRoutes); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ipv6AccessType); + if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) + $root.google.container.v1beta1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.subnetIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "subnetIpv6CidrBlock")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.subnetIpv6CidrBlock); + if (message.servicesIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv6CidrBlock")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.servicesIpv6CidrBlock); + if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) + $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.defaultPodIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "defaultPodIpv4RangeUtilization")) + writer.uint32(/* id 25, wireType 1 =*/201).double(message.defaultPodIpv4RangeUtilization); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {google.container.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.createSubnetwork = reader.bool(); + break; + } + case 3: { + message.subnetworkName = reader.string(); + break; + } + case 4: { + message.clusterIpv4Cidr = reader.string(); + break; + } + case 5: { + message.nodeIpv4Cidr = reader.string(); + break; + } + case 6: { + message.servicesIpv4Cidr = reader.string(); + break; + } + case 7: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 8: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 9: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 10: { + message.nodeIpv4CidrBlock = reader.string(); + break; + } + case 11: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } + case 12: { + message.allowRouteOverlap = reader.bool(); + break; + } + case 13: { + message.tpuIpv4CidrBlock = reader.string(); + break; + } + case 15: { + message.useRoutes = reader.bool(); + break; + } + case 16: { + message.stackType = reader.int32(); + break; + } + case 17: { + message.ipv6AccessType = reader.int32(); + break; + } + case 21: { + message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.subnetIpv6CidrBlock = reader.string(); + break; + } + case 23: { + message.servicesIpv6CidrBlock = reader.string(); + break; + } + case 24: { + message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 25: { + message.defaultPodIpv4RangeUtilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) + if (typeof message.createSubnetwork !== "boolean") + return "createSubnetwork: boolean expected"; + if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) + if (!$util.isString(message.subnetworkName)) + return "subnetworkName: string expected"; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + if (!$util.isString(message.clusterIpv4Cidr)) + return "clusterIpv4Cidr: string expected"; + if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) + if (!$util.isString(message.nodeIpv4Cidr)) + return "nodeIpv4Cidr: string expected"; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + if (!$util.isString(message.servicesIpv4Cidr)) + return "servicesIpv4Cidr: string expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) + if (!$util.isString(message.nodeIpv4CidrBlock)) + return "nodeIpv4CidrBlock: string expected"; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + if (message.allowRouteOverlap != null && message.hasOwnProperty("allowRouteOverlap")) + if (typeof message.allowRouteOverlap !== "boolean") + return "allowRouteOverlap: boolean expected"; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + if (!$util.isString(message.tpuIpv4CidrBlock)) + return "tpuIpv4CidrBlock: string expected"; + if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) + if (typeof message.useRoutes !== "boolean") + return "useRoutes: boolean expected"; + if (message.stackType != null && message.hasOwnProperty("stackType")) + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { + var error = $root.google.container.v1beta1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); + if (error) + return "podCidrOverprovisionConfig." + error; + } + if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) + if (!$util.isString(message.subnetIpv6CidrBlock)) + return "subnetIpv6CidrBlock: string expected"; + if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) + if (!$util.isString(message.servicesIpv6CidrBlock)) + return "servicesIpv6CidrBlock: string expected"; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { + var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); + if (error) + return "additionalPodRangesConfig." + error; + } + if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) + if (typeof message.defaultPodIpv4RangeUtilization !== "number") + return "defaultPodIpv4RangeUtilization: number expected"; + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.IPAllocationPolicy) + return object; + var message = new $root.google.container.v1beta1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.createSubnetwork != null) + message.createSubnetwork = Boolean(object.createSubnetwork); + if (object.subnetworkName != null) + message.subnetworkName = String(object.subnetworkName); + if (object.clusterIpv4Cidr != null) + message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); + if (object.nodeIpv4Cidr != null) + message.nodeIpv4Cidr = String(object.nodeIpv4Cidr); + if (object.servicesIpv4Cidr != null) + message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.nodeIpv4CidrBlock != null) + message.nodeIpv4CidrBlock = String(object.nodeIpv4CidrBlock); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + if (object.allowRouteOverlap != null) + message.allowRouteOverlap = Boolean(object.allowRouteOverlap); + if (object.tpuIpv4CidrBlock != null) + message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); + if (object.useRoutes != null) + message.useRoutes = Boolean(object.useRoutes); + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "IPV6_ACCESS_TYPE_UNSPECIFIED": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.podCidrOverprovisionConfig != null) { + if (typeof object.podCidrOverprovisionConfig !== "object") + throw TypeError(".google.container.v1beta1.IPAllocationPolicy.podCidrOverprovisionConfig: object expected"); + message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); + } + if (object.subnetIpv6CidrBlock != null) + message.subnetIpv6CidrBlock = String(object.subnetIpv6CidrBlock); + if (object.servicesIpv6CidrBlock != null) + message.servicesIpv6CidrBlock = String(object.servicesIpv6CidrBlock); + if (object.additionalPodRangesConfig != null) { + if (typeof object.additionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1beta1.IPAllocationPolicy.additionalPodRangesConfig: object expected"); + message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); + } + if (object.defaultPodIpv4RangeUtilization != null) + message.defaultPodIpv4RangeUtilization = Number(object.defaultPodIpv4RangeUtilization); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {google.container.v1beta1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useIpAliases = false; + object.createSubnetwork = false; + object.subnetworkName = ""; + object.clusterIpv4Cidr = ""; + object.nodeIpv4Cidr = ""; + object.servicesIpv4Cidr = ""; + object.clusterSecondaryRangeName = ""; + object.servicesSecondaryRangeName = ""; + object.clusterIpv4CidrBlock = ""; + object.nodeIpv4CidrBlock = ""; + object.servicesIpv4CidrBlock = ""; + object.allowRouteOverlap = false; + object.tpuIpv4CidrBlock = ""; + object.useRoutes = false; + object.stackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; + object.ipv6AccessType = options.enums === String ? "IPV6_ACCESS_TYPE_UNSPECIFIED" : 0; + object.podCidrOverprovisionConfig = null; + object.subnetIpv6CidrBlock = ""; + object.servicesIpv6CidrBlock = ""; + object.additionalPodRangesConfig = null; + object.defaultPodIpv4RangeUtilization = 0; + } + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) + object.createSubnetwork = message.createSubnetwork; + if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) + object.subnetworkName = message.subnetworkName; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + object.clusterIpv4Cidr = message.clusterIpv4Cidr; + if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) + object.nodeIpv4Cidr = message.nodeIpv4Cidr; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + object.servicesIpv4Cidr = message.servicesIpv4Cidr; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) + object.nodeIpv4CidrBlock = message.nodeIpv4CidrBlock; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + if (message.allowRouteOverlap != null && message.hasOwnProperty("allowRouteOverlap")) + object.allowRouteOverlap = message.allowRouteOverlap; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; + if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) + object.useRoutes = message.useRoutes; + if (message.stackType != null && message.hasOwnProperty("stackType")) + object.stackType = options.enums === String ? $root.google.container.v1beta1.IPAllocationPolicy.StackType[message.stackType] === undefined ? message.stackType : $root.google.container.v1beta1.IPAllocationPolicy.StackType[message.stackType] : message.stackType; + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) + object.ipv6AccessType = options.enums === String ? $root.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) + object.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); + if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) + object.subnetIpv6CidrBlock = message.subnetIpv6CidrBlock; + if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) + object.servicesIpv6CidrBlock = message.servicesIpv6CidrBlock; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) + object.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); + if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) + object.defaultPodIpv4RangeUtilization = options.json && !isFinite(message.defaultPodIpv4RangeUtilization) ? String(message.defaultPodIpv4RangeUtilization) : message.defaultPodIpv4RangeUtilization; + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.IPAllocationPolicy"; + }; + + /** + * StackType enum. + * @name google.container.v1beta1.IPAllocationPolicy.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4=1 IPV4 value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + IPAllocationPolicy.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * IPv6AccessType enum. + * @name google.container.v1beta1.IPAllocationPolicy.IPv6AccessType + * @enum {number} + * @property {number} IPV6_ACCESS_TYPE_UNSPECIFIED=0 IPV6_ACCESS_TYPE_UNSPECIFIED value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + IPAllocationPolicy.IPv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IPV6_ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + return IPAllocationPolicy; + })(); + + v1beta1.BinaryAuthorization = (function() { + + /** + * Properties of a BinaryAuthorization. + * @memberof google.container.v1beta1 + * @interface IBinaryAuthorization + * @property {boolean|null} [enabled] BinaryAuthorization enabled + * @property {google.container.v1beta1.BinaryAuthorization.EvaluationMode|null} [evaluationMode] BinaryAuthorization evaluationMode + * @property {Array.|null} [policyBindings] BinaryAuthorization policyBindings + */ + + /** + * Constructs a new BinaryAuthorization. + * @memberof google.container.v1beta1 + * @classdesc Represents a BinaryAuthorization. + * @implements IBinaryAuthorization + * @constructor + * @param {google.container.v1beta1.IBinaryAuthorization=} [properties] Properties to set + */ + function BinaryAuthorization(properties) { + this.policyBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BinaryAuthorization enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.BinaryAuthorization + * @instance + */ + BinaryAuthorization.prototype.enabled = false; + + /** + * BinaryAuthorization evaluationMode. + * @member {google.container.v1beta1.BinaryAuthorization.EvaluationMode} evaluationMode + * @memberof google.container.v1beta1.BinaryAuthorization + * @instance + */ + BinaryAuthorization.prototype.evaluationMode = 0; + + /** + * BinaryAuthorization policyBindings. + * @member {Array.} policyBindings + * @memberof google.container.v1beta1.BinaryAuthorization + * @instance + */ + BinaryAuthorization.prototype.policyBindings = $util.emptyArray; + + /** + * Creates a new BinaryAuthorization instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {google.container.v1beta1.IBinaryAuthorization=} [properties] Properties to set + * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization instance + */ + BinaryAuthorization.create = function create(properties) { + return new BinaryAuthorization(properties); + }; + + /** + * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {google.container.v1beta1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryAuthorization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.evaluationMode != null && Object.hasOwnProperty.call(message, "evaluationMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationMode); + if (message.policyBindings != null && message.policyBindings.length) + for (var i = 0; i < message.policyBindings.length; ++i) + $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.encode(message.policyBindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {google.container.v1beta1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryAuthorization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryAuthorization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BinaryAuthorization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.evaluationMode = reader.int32(); + break; + } + case 5: { + if (!(message.policyBindings && message.policyBindings.length)) + message.policyBindings = []; + message.policyBindings.push($root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryAuthorization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryAuthorization message. + * @function verify + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryAuthorization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + switch (message.evaluationMode) { + default: + return "evaluationMode: enum value expected"; + case 0: + case 1: + case 2: + case 5: + case 6: + break; + } + if (message.policyBindings != null && message.hasOwnProperty("policyBindings")) { + if (!Array.isArray(message.policyBindings)) + return "policyBindings: array expected"; + for (var i = 0; i < message.policyBindings.length; ++i) { + var error = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify(message.policyBindings[i]); + if (error) + return "policyBindings." + error; + } + } + return null; + }; + + /** + * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization + */ + BinaryAuthorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BinaryAuthorization) + return object; + var message = new $root.google.container.v1beta1.BinaryAuthorization(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + switch (object.evaluationMode) { + default: + if (typeof object.evaluationMode === "number") { + message.evaluationMode = object.evaluationMode; + break; + } + break; + case "EVALUATION_MODE_UNSPECIFIED": + case 0: + message.evaluationMode = 0; + break; + case "DISABLED": + case 1: + message.evaluationMode = 1; + break; + case "PROJECT_SINGLETON_POLICY_ENFORCE": + case 2: + message.evaluationMode = 2; + break; + case "POLICY_BINDINGS": + case 5: + message.evaluationMode = 5; + break; + case "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE": + case 6: + message.evaluationMode = 6; + break; + } + if (object.policyBindings) { + if (!Array.isArray(object.policyBindings)) + throw TypeError(".google.container.v1beta1.BinaryAuthorization.policyBindings: array expected"); + message.policyBindings = []; + for (var i = 0; i < object.policyBindings.length; ++i) { + if (typeof object.policyBindings[i] !== "object") + throw TypeError(".google.container.v1beta1.BinaryAuthorization.policyBindings: object expected"); + message.policyBindings[i] = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.fromObject(object.policyBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {google.container.v1beta1.BinaryAuthorization} message BinaryAuthorization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryAuthorization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.policyBindings = []; + if (options.defaults) { + object.enabled = false; + object.evaluationMode = options.enums === String ? "EVALUATION_MODE_UNSPECIFIED" : 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + object.evaluationMode = options.enums === String ? $root.google.container.v1beta1.BinaryAuthorization.EvaluationMode[message.evaluationMode] === undefined ? message.evaluationMode : $root.google.container.v1beta1.BinaryAuthorization.EvaluationMode[message.evaluationMode] : message.evaluationMode; + if (message.policyBindings && message.policyBindings.length) { + object.policyBindings = []; + for (var j = 0; j < message.policyBindings.length; ++j) + object.policyBindings[j] = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.toObject(message.policyBindings[j], options); + } + return object; + }; + + /** + * Converts this BinaryAuthorization to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BinaryAuthorization + * @instance + * @returns {Object.} JSON object + */ + BinaryAuthorization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryAuthorization + * @function getTypeUrl + * @memberof google.container.v1beta1.BinaryAuthorization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BinaryAuthorization"; + }; + + /** + * EvaluationMode enum. + * @name google.container.v1beta1.BinaryAuthorization.EvaluationMode + * @enum {number} + * @property {number} EVALUATION_MODE_UNSPECIFIED=0 EVALUATION_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} PROJECT_SINGLETON_POLICY_ENFORCE=2 PROJECT_SINGLETON_POLICY_ENFORCE value + * @property {number} POLICY_BINDINGS=5 POLICY_BINDINGS value + * @property {number} POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE=6 POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE value + */ + BinaryAuthorization.EvaluationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "PROJECT_SINGLETON_POLICY_ENFORCE"] = 2; + values[valuesById[5] = "POLICY_BINDINGS"] = 5; + values[valuesById[6] = "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE"] = 6; + return values; + })(); + + BinaryAuthorization.PolicyBinding = (function() { + + /** + * Properties of a PolicyBinding. + * @memberof google.container.v1beta1.BinaryAuthorization + * @interface IPolicyBinding + * @property {string|null} [name] PolicyBinding name + */ + + /** + * Constructs a new PolicyBinding. + * @memberof google.container.v1beta1.BinaryAuthorization + * @classdesc Represents a PolicyBinding. + * @implements IPolicyBinding + * @constructor + * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding=} [properties] Properties to set + */ + function PolicyBinding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyBinding name. + * @member {string|null|undefined} name + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @instance + */ + PolicyBinding.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PolicyBinding _name. + * @member {"name"|undefined} _name + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @instance + */ + Object.defineProperty(PolicyBinding.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PolicyBinding instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding=} [properties] Properties to set + * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding instance + */ + PolicyBinding.create = function create(properties) { + return new PolicyBinding(properties); + }; + + /** + * Encodes the specified PolicyBinding message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding} message PolicyBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyBinding.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 PolicyBinding message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding} message PolicyBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyBinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyBinding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding(); + 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 PolicyBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyBinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyBinding message. + * @function verify + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyBinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding + */ + PolicyBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding) + return object; + var message = new $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {google.container.v1beta1.BinaryAuthorization.PolicyBinding} message PolicyBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyBinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + return object; + }; + + /** + * Converts this PolicyBinding to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @instance + * @returns {Object.} JSON object + */ + PolicyBinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyBinding + * @function getTypeUrl + * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BinaryAuthorization.PolicyBinding"; + }; + + return PolicyBinding; + })(); + + return BinaryAuthorization; + })(); + + v1beta1.PodSecurityPolicyConfig = (function() { + + /** + * Properties of a PodSecurityPolicyConfig. + * @memberof google.container.v1beta1 + * @interface IPodSecurityPolicyConfig + * @property {boolean|null} [enabled] PodSecurityPolicyConfig enabled + */ + + /** + * Constructs a new PodSecurityPolicyConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a PodSecurityPolicyConfig. + * @implements IPodSecurityPolicyConfig + * @constructor + * @param {google.container.v1beta1.IPodSecurityPolicyConfig=} [properties] Properties to set + */ + function PodSecurityPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PodSecurityPolicyConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @instance + */ + PodSecurityPolicyConfig.prototype.enabled = false; + + /** + * Creates a new PodSecurityPolicyConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {google.container.v1beta1.IPodSecurityPolicyConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig instance + */ + PodSecurityPolicyConfig.create = function create(properties) { + return new PodSecurityPolicyConfig(properties); + }; + + /** + * Encodes the specified PodSecurityPolicyConfig message. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {google.container.v1beta1.IPodSecurityPolicyConfig} message PodSecurityPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodSecurityPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified PodSecurityPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {google.container.v1beta1.IPodSecurityPolicyConfig} message PodSecurityPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PodSecurityPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodSecurityPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PodSecurityPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PodSecurityPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PodSecurityPolicyConfig message. + * @function verify + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PodSecurityPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a PodSecurityPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig + */ + PodSecurityPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.PodSecurityPolicyConfig) + return object; + var message = new $root.google.container.v1beta1.PodSecurityPolicyConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a PodSecurityPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {google.container.v1beta1.PodSecurityPolicyConfig} message PodSecurityPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PodSecurityPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this PodSecurityPolicyConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + PodSecurityPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PodSecurityPolicyConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.PodSecurityPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PodSecurityPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.PodSecurityPolicyConfig"; + }; + + return PodSecurityPolicyConfig; + })(); + + v1beta1.AuthenticatorGroupsConfig = (function() { + + /** + * Properties of an AuthenticatorGroupsConfig. + * @memberof google.container.v1beta1 + * @interface IAuthenticatorGroupsConfig + * @property {boolean|null} [enabled] AuthenticatorGroupsConfig enabled + * @property {string|null} [securityGroup] AuthenticatorGroupsConfig securityGroup + */ + + /** + * Constructs a new AuthenticatorGroupsConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AuthenticatorGroupsConfig. + * @implements IAuthenticatorGroupsConfig + * @constructor + * @param {google.container.v1beta1.IAuthenticatorGroupsConfig=} [properties] Properties to set + */ + function AuthenticatorGroupsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthenticatorGroupsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @instance + */ + AuthenticatorGroupsConfig.prototype.enabled = false; + + /** + * AuthenticatorGroupsConfig securityGroup. + * @member {string} securityGroup + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @instance + */ + AuthenticatorGroupsConfig.prototype.securityGroup = ""; + + /** + * Creates a new AuthenticatorGroupsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1beta1.IAuthenticatorGroupsConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig instance + */ + AuthenticatorGroupsConfig.create = function create(properties) { + return new AuthenticatorGroupsConfig(properties); + }; + + /** + * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1beta1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticatorGroupsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.securityGroup != null && Object.hasOwnProperty.call(message, "securityGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.securityGroup); + return writer; + }; + + /** + * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1beta1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticatorGroupsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticatorGroupsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AuthenticatorGroupsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.securityGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticatorGroupsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthenticatorGroupsConfig message. + * @function verify + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthenticatorGroupsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) + if (!$util.isString(message.securityGroup)) + return "securityGroup: string expected"; + return null; + }; + + /** + * Creates an AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig + */ + AuthenticatorGroupsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AuthenticatorGroupsConfig) + return object; + var message = new $root.google.container.v1beta1.AuthenticatorGroupsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.securityGroup != null) + message.securityGroup = String(object.securityGroup); + return message; + }; + + /** + * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {google.container.v1beta1.AuthenticatorGroupsConfig} message AuthenticatorGroupsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthenticatorGroupsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.securityGroup = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) + object.securityGroup = message.securityGroup; + return object; + }; + + /** + * Converts this AuthenticatorGroupsConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @instance + * @returns {Object.} JSON object + */ + AuthenticatorGroupsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthenticatorGroupsConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AuthenticatorGroupsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthenticatorGroupsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AuthenticatorGroupsConfig"; + }; + + return AuthenticatorGroupsConfig; + })(); + + v1beta1.ClusterTelemetry = (function() { + + /** + * Properties of a ClusterTelemetry. + * @memberof google.container.v1beta1 + * @interface IClusterTelemetry + * @property {google.container.v1beta1.ClusterTelemetry.Type|null} [type] ClusterTelemetry type + */ + + /** + * Constructs a new ClusterTelemetry. + * @memberof google.container.v1beta1 + * @classdesc Represents a ClusterTelemetry. + * @implements IClusterTelemetry + * @constructor + * @param {google.container.v1beta1.IClusterTelemetry=} [properties] Properties to set + */ + function ClusterTelemetry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterTelemetry type. + * @member {google.container.v1beta1.ClusterTelemetry.Type} type + * @memberof google.container.v1beta1.ClusterTelemetry + * @instance + */ + ClusterTelemetry.prototype.type = 0; + + /** + * Creates a new ClusterTelemetry instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {google.container.v1beta1.IClusterTelemetry=} [properties] Properties to set + * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry instance + */ + ClusterTelemetry.create = function create(properties) { + return new ClusterTelemetry(properties); + }; + + /** + * Encodes the specified ClusterTelemetry message. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {google.container.v1beta1.IClusterTelemetry} message ClusterTelemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterTelemetry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ClusterTelemetry message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {google.container.v1beta1.IClusterTelemetry} message ClusterTelemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterTelemetry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterTelemetry message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterTelemetry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterTelemetry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterTelemetry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterTelemetry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterTelemetry message. + * @function verify + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterTelemetry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ClusterTelemetry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry + */ + ClusterTelemetry.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ClusterTelemetry) + return object; + var message = new $root.google.container.v1beta1.ClusterTelemetry(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DISABLED": + case 1: + message.type = 1; + break; + case "ENABLED": + case 2: + message.type = 2; + break; + case "SYSTEM_ONLY": + case 3: + message.type = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ClusterTelemetry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {google.container.v1beta1.ClusterTelemetry} message ClusterTelemetry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterTelemetry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1beta1.ClusterTelemetry.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.ClusterTelemetry.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this ClusterTelemetry to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ClusterTelemetry + * @instance + * @returns {Object.} JSON object + */ + ClusterTelemetry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterTelemetry + * @function getTypeUrl + * @memberof google.container.v1beta1.ClusterTelemetry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterTelemetry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ClusterTelemetry"; + }; + + /** + * Type enum. + * @name google.container.v1beta1.ClusterTelemetry.Type + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + * @property {number} SYSTEM_ONLY=3 SYSTEM_ONLY value + */ + ClusterTelemetry.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + values[valuesById[3] = "SYSTEM_ONLY"] = 3; + return values; + })(); + + return ClusterTelemetry; + })(); + + v1beta1.Cluster = (function() { + + /** + * Properties of a Cluster. + * @memberof google.container.v1beta1 + * @interface ICluster + * @property {string|null} [name] Cluster name + * @property {string|null} [description] Cluster description + * @property {number|null} [initialNodeCount] Cluster initialNodeCount + * @property {google.container.v1beta1.INodeConfig|null} [nodeConfig] Cluster nodeConfig + * @property {google.container.v1beta1.IMasterAuth|null} [masterAuth] Cluster masterAuth + * @property {string|null} [loggingService] Cluster loggingService + * @property {string|null} [monitoringService] Cluster monitoringService + * @property {string|null} [network] Cluster network + * @property {string|null} [clusterIpv4Cidr] Cluster clusterIpv4Cidr + * @property {google.container.v1beta1.IAddonsConfig|null} [addonsConfig] Cluster addonsConfig + * @property {string|null} [subnetwork] Cluster subnetwork + * @property {Array.|null} [nodePools] Cluster nodePools + * @property {Array.|null} [locations] Cluster locations + * @property {boolean|null} [enableKubernetesAlpha] Cluster enableKubernetesAlpha + * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] Cluster enableK8sBetaApis + * @property {Object.|null} [resourceLabels] Cluster resourceLabels + * @property {string|null} [labelFingerprint] Cluster labelFingerprint + * @property {google.container.v1beta1.ILegacyAbac|null} [legacyAbac] Cluster legacyAbac + * @property {google.container.v1beta1.INetworkPolicy|null} [networkPolicy] Cluster networkPolicy + * @property {google.container.v1beta1.IIPAllocationPolicy|null} [ipAllocationPolicy] Cluster ipAllocationPolicy + * @property {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] Cluster masterAuthorizedNetworksConfig + * @property {google.container.v1beta1.IMaintenancePolicy|null} [maintenancePolicy] Cluster maintenancePolicy + * @property {google.container.v1beta1.IBinaryAuthorization|null} [binaryAuthorization] Cluster binaryAuthorization + * @property {google.container.v1beta1.IPodSecurityPolicyConfig|null} [podSecurityPolicyConfig] Cluster podSecurityPolicyConfig + * @property {google.container.v1beta1.IClusterAutoscaling|null} [autoscaling] Cluster autoscaling + * @property {google.container.v1beta1.INetworkConfig|null} [networkConfig] Cluster networkConfig + * @property {boolean|null} [privateCluster] Cluster privateCluster + * @property {string|null} [masterIpv4CidrBlock] Cluster masterIpv4CidrBlock + * @property {google.container.v1beta1.IMaxPodsConstraint|null} [defaultMaxPodsConstraint] Cluster defaultMaxPodsConstraint + * @property {google.container.v1beta1.IResourceUsageExportConfig|null} [resourceUsageExportConfig] Cluster resourceUsageExportConfig + * @property {google.container.v1beta1.IAuthenticatorGroupsConfig|null} [authenticatorGroupsConfig] Cluster authenticatorGroupsConfig + * @property {google.container.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] Cluster privateClusterConfig + * @property {google.container.v1beta1.IVerticalPodAutoscaling|null} [verticalPodAutoscaling] Cluster verticalPodAutoscaling + * @property {google.container.v1beta1.IShieldedNodes|null} [shieldedNodes] Cluster shieldedNodes + * @property {google.container.v1beta1.IReleaseChannel|null} [releaseChannel] Cluster releaseChannel + * @property {google.container.v1beta1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] Cluster workloadIdentityConfig + * @property {google.container.v1beta1.IWorkloadCertificates|null} [workloadCertificates] Cluster workloadCertificates + * @property {google.container.v1beta1.IMeshCertificates|null} [meshCertificates] Cluster meshCertificates + * @property {google.container.v1beta1.IWorkloadALTSConfig|null} [workloadAltsConfig] Cluster workloadAltsConfig + * @property {google.container.v1beta1.ICostManagementConfig|null} [costManagementConfig] Cluster costManagementConfig + * @property {google.container.v1beta1.IClusterTelemetry|null} [clusterTelemetry] Cluster clusterTelemetry + * @property {google.container.v1beta1.ITpuConfig|null} [tpuConfig] Cluster tpuConfig + * @property {google.container.v1beta1.INotificationConfig|null} [notificationConfig] Cluster notificationConfig + * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] Cluster confidentialNodes + * @property {google.container.v1beta1.IIdentityServiceConfig|null} [identityServiceConfig] Cluster identityServiceConfig + * @property {string|null} [selfLink] Cluster selfLink + * @property {string|null} [zone] Cluster zone + * @property {string|null} [endpoint] Cluster endpoint + * @property {string|null} [initialClusterVersion] Cluster initialClusterVersion + * @property {string|null} [currentMasterVersion] Cluster currentMasterVersion + * @property {string|null} [currentNodeVersion] Cluster currentNodeVersion + * @property {string|null} [createTime] Cluster createTime + * @property {google.container.v1beta1.Cluster.Status|null} [status] Cluster status + * @property {string|null} [statusMessage] Cluster statusMessage + * @property {number|null} [nodeIpv4CidrSize] Cluster nodeIpv4CidrSize + * @property {string|null} [servicesIpv4Cidr] Cluster servicesIpv4Cidr + * @property {Array.|null} [instanceGroupUrls] Cluster instanceGroupUrls + * @property {number|null} [currentNodeCount] Cluster currentNodeCount + * @property {string|null} [expireTime] Cluster expireTime + * @property {string|null} [location] Cluster location + * @property {boolean|null} [enableTpu] Cluster enableTpu + * @property {string|null} [tpuIpv4CidrBlock] Cluster tpuIpv4CidrBlock + * @property {google.container.v1beta1.IDatabaseEncryption|null} [databaseEncryption] Cluster databaseEncryption + * @property {Array.|null} [conditions] Cluster conditions + * @property {google.container.v1beta1.IMaster|null} [master] Cluster master + * @property {google.container.v1beta1.IAutopilot|null} [autopilot] Cluster autopilot + * @property {string|null} [id] Cluster id + * @property {google.container.v1beta1.INodePoolDefaults|null} [nodePoolDefaults] Cluster nodePoolDefaults + * @property {google.container.v1beta1.ILoggingConfig|null} [loggingConfig] Cluster loggingConfig + * @property {google.container.v1beta1.IMonitoringConfig|null} [monitoringConfig] Cluster monitoringConfig + * @property {google.container.v1beta1.INodePoolAutoConfig|null} [nodePoolAutoConfig] Cluster nodePoolAutoConfig + * @property {google.container.v1beta1.IProtectConfig|null} [protectConfig] Cluster protectConfig + * @property {string|null} [etag] Cluster etag + * @property {google.container.v1beta1.IFleet|null} [fleet] Cluster fleet + * @property {google.container.v1beta1.ISecurityPostureConfig|null} [securityPostureConfig] Cluster securityPostureConfig + * @property {google.container.v1beta1.IEnterpriseConfig|null} [enterpriseConfig] Cluster enterpriseConfig + * @property {google.container.v1beta1.ISecretManagerConfig|null} [secretManagerConfig] Cluster secretManagerConfig + * @property {google.container.v1beta1.ICompliancePostureConfig|null} [compliancePostureConfig] Cluster compliancePostureConfig + * @property {boolean|null} [satisfiesPzs] Cluster satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi + */ + + /** + * Constructs a new Cluster. + * @memberof google.container.v1beta1 + * @classdesc Represents a Cluster. + * @implements ICluster + * @constructor + * @param {google.container.v1beta1.ICluster=} [properties] Properties to set + */ + function Cluster(properties) { + this.nodePools = []; + this.locations = []; + this.resourceLabels = {}; + this.instanceGroupUrls = []; + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cluster name. + * @member {string} name + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.name = ""; + + /** + * Cluster description. + * @member {string} description + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.description = ""; + + /** + * Cluster initialNodeCount. + * @member {number} initialNodeCount + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.initialNodeCount = 0; + + /** + * Cluster nodeConfig. + * @member {google.container.v1beta1.INodeConfig|null|undefined} nodeConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.nodeConfig = null; + + /** + * Cluster masterAuth. + * @member {google.container.v1beta1.IMasterAuth|null|undefined} masterAuth + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.masterAuth = null; + + /** + * Cluster loggingService. + * @member {string} loggingService + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.loggingService = ""; + + /** + * Cluster monitoringService. + * @member {string} monitoringService + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.monitoringService = ""; + + /** + * Cluster network. + * @member {string} network + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.network = ""; + + /** + * Cluster clusterIpv4Cidr. + * @member {string} clusterIpv4Cidr + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.clusterIpv4Cidr = ""; + + /** + * Cluster addonsConfig. + * @member {google.container.v1beta1.IAddonsConfig|null|undefined} addonsConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.addonsConfig = null; + + /** + * Cluster subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.subnetwork = ""; + + /** + * Cluster nodePools. + * @member {Array.} nodePools + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.nodePools = $util.emptyArray; + + /** + * Cluster locations. + * @member {Array.} locations + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.locations = $util.emptyArray; + + /** + * Cluster enableKubernetesAlpha. + * @member {boolean} enableKubernetesAlpha + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.enableKubernetesAlpha = false; + + /** + * Cluster enableK8sBetaApis. + * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.enableK8sBetaApis = null; + + /** + * Cluster resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.resourceLabels = $util.emptyObject; + + /** + * Cluster labelFingerprint. + * @member {string} labelFingerprint + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.labelFingerprint = ""; + + /** + * Cluster legacyAbac. + * @member {google.container.v1beta1.ILegacyAbac|null|undefined} legacyAbac + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.legacyAbac = null; + + /** + * Cluster networkPolicy. + * @member {google.container.v1beta1.INetworkPolicy|null|undefined} networkPolicy + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.networkPolicy = null; + + /** + * Cluster ipAllocationPolicy. + * @member {google.container.v1beta1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.ipAllocationPolicy = null; + + /** + * Cluster masterAuthorizedNetworksConfig. + * @member {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.masterAuthorizedNetworksConfig = null; + + /** + * Cluster maintenancePolicy. + * @member {google.container.v1beta1.IMaintenancePolicy|null|undefined} maintenancePolicy + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.maintenancePolicy = null; + + /** + * Cluster binaryAuthorization. + * @member {google.container.v1beta1.IBinaryAuthorization|null|undefined} binaryAuthorization + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.binaryAuthorization = null; + + /** + * Cluster podSecurityPolicyConfig. + * @member {google.container.v1beta1.IPodSecurityPolicyConfig|null|undefined} podSecurityPolicyConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.podSecurityPolicyConfig = null; + + /** + * Cluster autoscaling. + * @member {google.container.v1beta1.IClusterAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.autoscaling = null; + + /** + * Cluster networkConfig. + * @member {google.container.v1beta1.INetworkConfig|null|undefined} networkConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.networkConfig = null; + + /** + * Cluster privateCluster. + * @member {boolean} privateCluster + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.privateCluster = false; + + /** + * Cluster masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.masterIpv4CidrBlock = ""; + + /** + * Cluster defaultMaxPodsConstraint. + * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} defaultMaxPodsConstraint + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.defaultMaxPodsConstraint = null; + + /** + * Cluster resourceUsageExportConfig. + * @member {google.container.v1beta1.IResourceUsageExportConfig|null|undefined} resourceUsageExportConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.resourceUsageExportConfig = null; + + /** + * Cluster authenticatorGroupsConfig. + * @member {google.container.v1beta1.IAuthenticatorGroupsConfig|null|undefined} authenticatorGroupsConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.authenticatorGroupsConfig = null; + + /** + * Cluster privateClusterConfig. + * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.privateClusterConfig = null; + + /** + * Cluster verticalPodAutoscaling. + * @member {google.container.v1beta1.IVerticalPodAutoscaling|null|undefined} verticalPodAutoscaling + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.verticalPodAutoscaling = null; + + /** + * Cluster shieldedNodes. + * @member {google.container.v1beta1.IShieldedNodes|null|undefined} shieldedNodes + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.shieldedNodes = null; + + /** + * Cluster releaseChannel. + * @member {google.container.v1beta1.IReleaseChannel|null|undefined} releaseChannel + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.releaseChannel = null; + + /** + * Cluster workloadIdentityConfig. + * @member {google.container.v1beta1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.workloadIdentityConfig = null; + + /** + * Cluster workloadCertificates. + * @member {google.container.v1beta1.IWorkloadCertificates|null|undefined} workloadCertificates + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.workloadCertificates = null; + + /** + * Cluster meshCertificates. + * @member {google.container.v1beta1.IMeshCertificates|null|undefined} meshCertificates + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.meshCertificates = null; + + /** + * Cluster workloadAltsConfig. + * @member {google.container.v1beta1.IWorkloadALTSConfig|null|undefined} workloadAltsConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.workloadAltsConfig = null; + + /** + * Cluster costManagementConfig. + * @member {google.container.v1beta1.ICostManagementConfig|null|undefined} costManagementConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.costManagementConfig = null; + + /** + * Cluster clusterTelemetry. + * @member {google.container.v1beta1.IClusterTelemetry|null|undefined} clusterTelemetry + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.clusterTelemetry = null; + + /** + * Cluster tpuConfig. + * @member {google.container.v1beta1.ITpuConfig|null|undefined} tpuConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.tpuConfig = null; + + /** + * Cluster notificationConfig. + * @member {google.container.v1beta1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.notificationConfig = null; + + /** + * Cluster confidentialNodes. + * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.confidentialNodes = null; + + /** + * Cluster identityServiceConfig. + * @member {google.container.v1beta1.IIdentityServiceConfig|null|undefined} identityServiceConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.identityServiceConfig = null; + + /** + * Cluster selfLink. + * @member {string} selfLink + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.selfLink = ""; + + /** + * Cluster zone. + * @member {string} zone + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.zone = ""; + + /** + * Cluster endpoint. + * @member {string} endpoint + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.endpoint = ""; + + /** + * Cluster initialClusterVersion. + * @member {string} initialClusterVersion + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.initialClusterVersion = ""; + + /** + * Cluster currentMasterVersion. + * @member {string} currentMasterVersion + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.currentMasterVersion = ""; + + /** + * Cluster currentNodeVersion. + * @member {string} currentNodeVersion + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.currentNodeVersion = ""; + + /** + * Cluster createTime. + * @member {string} createTime + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.createTime = ""; + + /** + * Cluster status. + * @member {google.container.v1beta1.Cluster.Status} status + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.status = 0; + + /** + * Cluster statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.statusMessage = ""; + + /** + * Cluster nodeIpv4CidrSize. + * @member {number} nodeIpv4CidrSize + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.nodeIpv4CidrSize = 0; + + /** + * Cluster servicesIpv4Cidr. + * @member {string} servicesIpv4Cidr + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.servicesIpv4Cidr = ""; + + /** + * Cluster instanceGroupUrls. + * @member {Array.} instanceGroupUrls + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.instanceGroupUrls = $util.emptyArray; + + /** + * Cluster currentNodeCount. + * @member {number} currentNodeCount + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.currentNodeCount = 0; + + /** + * Cluster expireTime. + * @member {string} expireTime + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.expireTime = ""; + + /** + * Cluster location. + * @member {string} location + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.location = ""; + + /** + * Cluster enableTpu. + * @member {boolean} enableTpu + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.enableTpu = false; + + /** + * Cluster tpuIpv4CidrBlock. + * @member {string} tpuIpv4CidrBlock + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.tpuIpv4CidrBlock = ""; + + /** + * Cluster databaseEncryption. + * @member {google.container.v1beta1.IDatabaseEncryption|null|undefined} databaseEncryption + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.databaseEncryption = null; + + /** + * Cluster conditions. + * @member {Array.} conditions + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.conditions = $util.emptyArray; + + /** + * Cluster master. + * @member {google.container.v1beta1.IMaster|null|undefined} master + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.master = null; + + /** + * Cluster autopilot. + * @member {google.container.v1beta1.IAutopilot|null|undefined} autopilot + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.autopilot = null; + + /** + * Cluster id. + * @member {string} id + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.id = ""; + + /** + * Cluster nodePoolDefaults. + * @member {google.container.v1beta1.INodePoolDefaults|null|undefined} nodePoolDefaults + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.nodePoolDefaults = null; + + /** + * Cluster loggingConfig. + * @member {google.container.v1beta1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.loggingConfig = null; + + /** + * Cluster monitoringConfig. + * @member {google.container.v1beta1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.monitoringConfig = null; + + /** + * Cluster nodePoolAutoConfig. + * @member {google.container.v1beta1.INodePoolAutoConfig|null|undefined} nodePoolAutoConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.nodePoolAutoConfig = null; + + /** + * Cluster protectConfig. + * @member {google.container.v1beta1.IProtectConfig|null|undefined} protectConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.protectConfig = null; + + /** + * Cluster etag. + * @member {string} etag + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.etag = ""; + + /** + * Cluster fleet. + * @member {google.container.v1beta1.IFleet|null|undefined} fleet + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.fleet = null; + + /** + * Cluster securityPostureConfig. + * @member {google.container.v1beta1.ISecurityPostureConfig|null|undefined} securityPostureConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.securityPostureConfig = null; + + /** + * Cluster enterpriseConfig. + * @member {google.container.v1beta1.IEnterpriseConfig|null|undefined} enterpriseConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.enterpriseConfig = null; + + /** + * Cluster secretManagerConfig. + * @member {google.container.v1beta1.ISecretManagerConfig|null|undefined} secretManagerConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.secretManagerConfig = null; + + /** + * Cluster compliancePostureConfig. + * @member {google.container.v1beta1.ICompliancePostureConfig|null|undefined} compliancePostureConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.compliancePostureConfig = null; + + /** + * Cluster satisfiesPzs. + * @member {boolean|null|undefined} satisfiesPzs + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.satisfiesPzs = null; + + /** + * Cluster satisfiesPzi. + * @member {boolean|null|undefined} satisfiesPzi + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Cluster.prototype.satisfiesPzi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Cluster _nodePoolDefaults. + * @member {"nodePoolDefaults"|undefined} _nodePoolDefaults + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_nodePoolDefaults", { + get: $util.oneOfGetter($oneOfFields = ["nodePoolDefaults"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _protectConfig. + * @member {"protectConfig"|undefined} _protectConfig + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_protectConfig", { + get: $util.oneOfGetter($oneOfFields = ["protectConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _satisfiesPzs. + * @member {"satisfiesPzs"|undefined} _satisfiesPzs + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_satisfiesPzs", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _satisfiesPzi. + * @member {"satisfiesPzi"|undefined} _satisfiesPzi + * @memberof google.container.v1beta1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_satisfiesPzi", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Cluster instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Cluster + * @static + * @param {google.container.v1beta1.ICluster=} [properties] Properties to set + * @returns {google.container.v1beta1.Cluster} Cluster instance + */ + Cluster.create = function create(properties) { + return new Cluster(properties); + }; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Cluster + * @static + * @param {google.container.v1beta1.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.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.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.container.v1beta1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.masterAuth != null && Object.hasOwnProperty.call(message, "masterAuth")) + $root.google.container.v1beta1.MasterAuth.encode(message.masterAuth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.loggingService); + if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.monitoringService); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); + if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4Cidr); + if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) + $root.google.container.v1beta1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.subnetwork); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.container.v1beta1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.enableKubernetesAlpha != null && Object.hasOwnProperty.call(message, "enableKubernetesAlpha")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableKubernetesAlpha); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.labelFingerprint); + if (message.legacyAbac != null && Object.hasOwnProperty.call(message, "legacyAbac")) + $root.google.container.v1beta1.LegacyAbac.encode(message.legacyAbac, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) + $root.google.container.v1beta1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.container.v1beta1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) + $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) + $root.google.container.v1beta1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.binaryAuthorization != null && Object.hasOwnProperty.call(message, "binaryAuthorization")) + $root.google.container.v1beta1.BinaryAuthorization.encode(message.binaryAuthorization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.podSecurityPolicyConfig != null && Object.hasOwnProperty.call(message, "podSecurityPolicyConfig")) + $root.google.container.v1beta1.PodSecurityPolicyConfig.encode(message.podSecurityPolicyConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1beta1.ClusterAutoscaling.encode(message.autoscaling, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.container.v1beta1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.privateCluster != null && Object.hasOwnProperty.call(message, "privateCluster")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.privateCluster); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.masterIpv4CidrBlock); + if (message.defaultMaxPodsConstraint != null && Object.hasOwnProperty.call(message, "defaultMaxPodsConstraint")) + $root.google.container.v1beta1.MaxPodsConstraint.encode(message.defaultMaxPodsConstraint, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.resourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "resourceUsageExportConfig")) + $root.google.container.v1beta1.ResourceUsageExportConfig.encode(message.resourceUsageExportConfig, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.authenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "authenticatorGroupsConfig")) + $root.google.container.v1beta1.AuthenticatorGroupsConfig.encode(message.authenticatorGroupsConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.container.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) + $root.google.container.v1beta1.DatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.verticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "verticalPodAutoscaling")) + $root.google.container.v1beta1.VerticalPodAutoscaling.encode(message.verticalPodAutoscaling, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.shieldedNodes != null && Object.hasOwnProperty.call(message, "shieldedNodes")) + $root.google.container.v1beta1.ShieldedNodes.encode(message.shieldedNodes, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + $root.google.container.v1beta1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) + $root.google.container.v1beta1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.costManagementConfig != null && Object.hasOwnProperty.call(message, "costManagementConfig")) + $root.google.container.v1beta1.CostManagementConfig.encode(message.costManagementConfig, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.clusterTelemetry != null && Object.hasOwnProperty.call(message, "clusterTelemetry")) + $root.google.container.v1beta1.ClusterTelemetry.encode(message.clusterTelemetry, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.tpuConfig != null && Object.hasOwnProperty.call(message, "tpuConfig")) + $root.google.container.v1beta1.TpuConfig.encode(message.tpuConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.container.v1beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.workloadCertificates != null && Object.hasOwnProperty.call(message, "workloadCertificates")) + $root.google.container.v1beta1.WorkloadCertificates.encode(message.workloadCertificates, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.workloadAltsConfig != null && Object.hasOwnProperty.call(message, "workloadAltsConfig")) + $root.google.container.v1beta1.WorkloadALTSConfig.encode(message.workloadAltsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.identityServiceConfig != null && Object.hasOwnProperty.call(message, "identityServiceConfig")) + $root.google.container.v1beta1.IdentityServiceConfig.encode(message.identityServiceConfig, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.meshCertificates != null && Object.hasOwnProperty.call(message, "meshCertificates")) + $root.google.container.v1beta1.MeshCertificates.encode(message.meshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.zone); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.endpoint); + if (message.initialClusterVersion != null && Object.hasOwnProperty.call(message, "initialClusterVersion")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.initialClusterVersion); + if (message.currentMasterVersion != null && Object.hasOwnProperty.call(message, "currentMasterVersion")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.currentMasterVersion); + if (message.currentNodeVersion != null && Object.hasOwnProperty.call(message, "currentNodeVersion")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.currentNodeVersion); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.createTime); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 108, wireType 2 =*/866).string(message.statusMessage); + if (message.nodeIpv4CidrSize != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrSize")) + writer.uint32(/* id 109, wireType 0 =*/872).int32(message.nodeIpv4CidrSize); + if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.servicesIpv4Cidr); + if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.instanceGroupUrls[i]); + if (message.currentNodeCount != null && Object.hasOwnProperty.call(message, "currentNodeCount")) + writer.uint32(/* id 112, wireType 0 =*/896).int32(message.currentNodeCount); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + writer.uint32(/* id 113, wireType 2 =*/906).string(message.expireTime); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 114, wireType 2 =*/914).string(message.location); + if (message.enableTpu != null && Object.hasOwnProperty.call(message, "enableTpu")) + writer.uint32(/* id 115, wireType 0 =*/920).bool(message.enableTpu); + if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) + writer.uint32(/* id 116, wireType 2 =*/930).string(message.tpuIpv4CidrBlock); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.container.v1beta1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 118, wireType 2 =*/946).fork()).ldelim(); + if (message.master != null && Object.hasOwnProperty.call(message, "master")) + $root.google.container.v1beta1.Master.encode(message.master, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); + if (message.autopilot != null && Object.hasOwnProperty.call(message, "autopilot")) + $root.google.container.v1beta1.Autopilot.encode(message.autopilot, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 129, wireType 2 =*/1034).string(message.id); + if (message.nodePoolDefaults != null && Object.hasOwnProperty.call(message, "nodePoolDefaults")) + $root.google.container.v1beta1.NodePoolDefaults.encode(message.nodePoolDefaults, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1beta1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.container.v1beta1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 133, wireType 2 =*/1066).fork()).ldelim(); + if (message.nodePoolAutoConfig != null && Object.hasOwnProperty.call(message, "nodePoolAutoConfig")) + $root.google.container.v1beta1.NodePoolAutoConfig.encode(message.nodePoolAutoConfig, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); + if (message.protectConfig != null && Object.hasOwnProperty.call(message, "protectConfig")) + $root.google.container.v1beta1.ProtectConfig.encode(message.protectConfig, writer.uint32(/* id 137, wireType 2 =*/1098).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 139, wireType 2 =*/1114).string(message.etag); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.container.v1beta1.Fleet.encode(message.fleet, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); + if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) + $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); + if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) + $root.google.container.v1beta1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); + if (message.enterpriseConfig != null && Object.hasOwnProperty.call(message, "enterpriseConfig")) + $root.google.container.v1beta1.EnterpriseConfig.encode(message.enterpriseConfig, writer.uint32(/* id 149, wireType 2 =*/1194).fork()).ldelim(); + if (message.secretManagerConfig != null && Object.hasOwnProperty.call(message, "secretManagerConfig")) + $root.google.container.v1beta1.SecretManagerConfig.encode(message.secretManagerConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) + $root.google.container.v1beta1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 151, wireType 2 =*/1210).fork()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 152, wireType 0 =*/1216).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 153, wireType 0 =*/1224).bool(message.satisfiesPzi); + return writer; + }; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Cluster + * @static + * @param {google.container.v1beta1.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Cluster(), 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.initialNodeCount = reader.int32(); + break; + } + case 4: { + message.nodeConfig = $root.google.container.v1beta1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.masterAuth = $root.google.container.v1beta1.MasterAuth.decode(reader, reader.uint32()); + break; + } + case 6: { + message.loggingService = reader.string(); + break; + } + case 7: { + message.monitoringService = reader.string(); + break; + } + case 8: { + message.network = reader.string(); + break; + } + case 9: { + message.clusterIpv4Cidr = reader.string(); + break; + } + case 10: { + message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.subnetwork = reader.string(); + break; + } + case 12: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.container.v1beta1.NodePool.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.enableKubernetesAlpha = reader.bool(); + break; + } + case 143: { + message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 16: { + message.labelFingerprint = reader.string(); + break; + } + case 18: { + message.legacyAbac = $root.google.container.v1beta1.LegacyAbac.decode(reader, reader.uint32()); + break; + } + case 19: { + message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.decode(reader, reader.uint32()); + break; + } + case 20: { + message.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } + case 22: { + message.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 23: { + message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 24: { + message.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.decode(reader, reader.uint32()); + break; + } + case 25: { + message.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 26: { + message.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.decode(reader, reader.uint32()); + break; + } + case 27: { + message.networkConfig = $root.google.container.v1beta1.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 28: { + message.privateCluster = reader.bool(); + break; + } + case 29: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 30: { + message.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 33: { + message.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.decode(reader, reader.uint32()); + break; + } + case 34: { + message.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); + break; + } + case 37: { + message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 39: { + message.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 40: { + message.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.decode(reader, reader.uint32()); + break; + } + case 41: { + message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 43: { + message.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 52: { + message.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.decode(reader, reader.uint32()); + break; + } + case 67: { + message.meshCertificates = $root.google.container.v1beta1.MeshCertificates.decode(reader, reader.uint32()); + break; + } + case 53: { + message.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.decode(reader, reader.uint32()); + break; + } + case 45: { + message.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.decode(reader, reader.uint32()); + break; + } + case 46: { + message.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.decode(reader, reader.uint32()); + break; + } + case 47: { + message.tpuConfig = $root.google.container.v1beta1.TpuConfig.decode(reader, reader.uint32()); + break; + } + case 49: { + message.notificationConfig = $root.google.container.v1beta1.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 50: { + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 54: { + message.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.selfLink = reader.string(); + break; + } + case 101: { + message.zone = reader.string(); + break; + } + case 102: { + message.endpoint = reader.string(); + break; + } + case 103: { + message.initialClusterVersion = reader.string(); + break; + } + case 104: { + message.currentMasterVersion = reader.string(); + break; + } + case 105: { + message.currentNodeVersion = reader.string(); + break; + } + case 106: { + message.createTime = reader.string(); + break; + } + case 107: { + message.status = reader.int32(); + break; + } + case 108: { + message.statusMessage = reader.string(); + break; + } + case 109: { + message.nodeIpv4CidrSize = reader.int32(); + break; + } + case 110: { + message.servicesIpv4Cidr = reader.string(); + break; + } + case 111: { + if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) + message.instanceGroupUrls = []; + message.instanceGroupUrls.push(reader.string()); + break; + } + case 112: { + message.currentNodeCount = reader.int32(); + break; + } + case 113: { + message.expireTime = reader.string(); + break; + } + case 114: { + message.location = reader.string(); + break; + } + case 115: { + message.enableTpu = reader.bool(); + break; + } + case 116: { + message.tpuIpv4CidrBlock = reader.string(); + break; + } + case 38: { + message.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.decode(reader, reader.uint32()); + break; + } + case 118: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 124: { + message.master = $root.google.container.v1beta1.Master.decode(reader, reader.uint32()); + break; + } + case 128: { + message.autopilot = $root.google.container.v1beta1.Autopilot.decode(reader, reader.uint32()); + break; + } + case 129: { + message.id = reader.string(); + break; + } + case 131: { + message.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.decode(reader, reader.uint32()); + break; + } + case 132: { + message.loggingConfig = $root.google.container.v1beta1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 133: { + message.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } + case 136: { + message.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.decode(reader, reader.uint32()); + break; + } + case 137: { + message.protectConfig = $root.google.container.v1beta1.ProtectConfig.decode(reader, reader.uint32()); + break; + } + case 139: { + message.etag = reader.string(); + break; + } + case 140: { + message.fleet = $root.google.container.v1beta1.Fleet.decode(reader, reader.uint32()); + break; + } + case 145: { + message.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.decode(reader, reader.uint32()); + break; + } + case 149: { + message.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.decode(reader, reader.uint32()); + break; + } + case 150: { + message.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 151: { + message.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.decode(reader, reader.uint32()); + break; + } + case 152: { + message.satisfiesPzs = reader.bool(); + break; + } + case 153: { + message.satisfiesPzi = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cluster message. + * @function verify + * @memberof google.container.v1beta1.Cluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + if (!$util.isInteger(message.initialNodeCount)) + return "initialNodeCount: integer expected"; + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.container.v1beta1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) { + var error = $root.google.container.v1beta1.MasterAuth.verify(message.masterAuth); + if (error) + return "masterAuth." + error; + } + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + if (!$util.isString(message.loggingService)) + return "loggingService: string expected"; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + if (!$util.isString(message.monitoringService)) + return "monitoringService: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + if (!$util.isString(message.clusterIpv4Cidr)) + return "clusterIpv4Cidr: string expected"; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { + var error = $root.google.container.v1beta1.AddonsConfig.verify(message.addonsConfig); + if (error) + return "addonsConfig." + error; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.container.v1beta1.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) + if (typeof message.enableKubernetesAlpha !== "boolean") + return "enableKubernetesAlpha: boolean expected"; + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { + var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); + if (error) + return "enableK8sBetaApis." + error; + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + if (!$util.isString(message.labelFingerprint)) + return "labelFingerprint: string expected"; + if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) { + var error = $root.google.container.v1beta1.LegacyAbac.verify(message.legacyAbac); + if (error) + return "legacyAbac." + error; + } + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { + var error = $root.google.container.v1beta1.NetworkPolicy.verify(message.networkPolicy); + if (error) + return "networkPolicy." + error; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.container.v1beta1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { + var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); + if (error) + return "masterAuthorizedNetworksConfig." + error; + } + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { + var error = $root.google.container.v1beta1.MaintenancePolicy.verify(message.maintenancePolicy); + if (error) + return "maintenancePolicy." + error; + } + if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) { + var error = $root.google.container.v1beta1.BinaryAuthorization.verify(message.binaryAuthorization); + if (error) + return "binaryAuthorization." + error; + } + if (message.podSecurityPolicyConfig != null && message.hasOwnProperty("podSecurityPolicyConfig")) { + var error = $root.google.container.v1beta1.PodSecurityPolicyConfig.verify(message.podSecurityPolicyConfig); + if (error) + return "podSecurityPolicyConfig." + error; + } + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1beta1.ClusterAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.container.v1beta1.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.privateCluster != null && message.hasOwnProperty("privateCluster")) + if (typeof message.privateCluster !== "boolean") + return "privateCluster: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) { + var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.defaultMaxPodsConstraint); + if (error) + return "defaultMaxPodsConstraint." + error; + } + if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) { + var error = $root.google.container.v1beta1.ResourceUsageExportConfig.verify(message.resourceUsageExportConfig); + if (error) + return "resourceUsageExportConfig." + error; + } + if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) { + var error = $root.google.container.v1beta1.AuthenticatorGroupsConfig.verify(message.authenticatorGroupsConfig); + if (error) + return "authenticatorGroupsConfig." + error; + } + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) { + var error = $root.google.container.v1beta1.VerticalPodAutoscaling.verify(message.verticalPodAutoscaling); + if (error) + return "verticalPodAutoscaling." + error; + } + if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) { + var error = $root.google.container.v1beta1.ShieldedNodes.verify(message.shieldedNodes); + if (error) + return "shieldedNodes." + error; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.releaseChannel); + if (error) + return "releaseChannel." + error; + } + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { + var error = $root.google.container.v1beta1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); + if (error) + return "workloadIdentityConfig." + error; + } + if (message.workloadCertificates != null && message.hasOwnProperty("workloadCertificates")) { + var error = $root.google.container.v1beta1.WorkloadCertificates.verify(message.workloadCertificates); + if (error) + return "workloadCertificates." + error; + } + if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) { + var error = $root.google.container.v1beta1.MeshCertificates.verify(message.meshCertificates); + if (error) + return "meshCertificates." + error; + } + if (message.workloadAltsConfig != null && message.hasOwnProperty("workloadAltsConfig")) { + var error = $root.google.container.v1beta1.WorkloadALTSConfig.verify(message.workloadAltsConfig); + if (error) + return "workloadAltsConfig." + error; + } + if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) { + var error = $root.google.container.v1beta1.CostManagementConfig.verify(message.costManagementConfig); + if (error) + return "costManagementConfig." + error; + } + if (message.clusterTelemetry != null && message.hasOwnProperty("clusterTelemetry")) { + var error = $root.google.container.v1beta1.ClusterTelemetry.verify(message.clusterTelemetry); + if (error) + return "clusterTelemetry." + error; + } + if (message.tpuConfig != null && message.hasOwnProperty("tpuConfig")) { + var error = $root.google.container.v1beta1.TpuConfig.verify(message.tpuConfig); + if (error) + return "tpuConfig." + error; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.container.v1beta1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) { + var error = $root.google.container.v1beta1.IdentityServiceConfig.verify(message.identityServiceConfig); + if (error) + return "identityServiceConfig." + error; + } + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) + if (!$util.isString(message.initialClusterVersion)) + return "initialClusterVersion: string expected"; + if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) + if (!$util.isString(message.currentMasterVersion)) + return "currentMasterVersion: string expected"; + if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) + if (!$util.isString(message.currentNodeVersion)) + return "currentNodeVersion: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) + if (!$util.isString(message.createTime)) + return "createTime: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) + if (!$util.isInteger(message.nodeIpv4CidrSize)) + return "nodeIpv4CidrSize: integer expected"; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + if (!$util.isString(message.servicesIpv4Cidr)) + return "servicesIpv4Cidr: string expected"; + if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { + if (!Array.isArray(message.instanceGroupUrls)) + return "instanceGroupUrls: array expected"; + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + if (!$util.isString(message.instanceGroupUrls[i])) + return "instanceGroupUrls: string[] expected"; + } + if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) + if (!$util.isInteger(message.currentNodeCount)) + return "currentNodeCount: integer expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + if (!$util.isString(message.expireTime)) + return "expireTime: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) + if (typeof message.enableTpu !== "boolean") + return "enableTpu: boolean expected"; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + if (!$util.isString(message.tpuIpv4CidrBlock)) + return "tpuIpv4CidrBlock: string expected"; + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { + var error = $root.google.container.v1beta1.DatabaseEncryption.verify(message.databaseEncryption); + if (error) + return "databaseEncryption." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.container.v1beta1.StatusCondition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.master != null && message.hasOwnProperty("master")) { + var error = $root.google.container.v1beta1.Master.verify(message.master); + if (error) + return "master." + error; + } + if (message.autopilot != null && message.hasOwnProperty("autopilot")) { + var error = $root.google.container.v1beta1.Autopilot.verify(message.autopilot); + if (error) + return "autopilot." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { + properties._nodePoolDefaults = 1; + { + var error = $root.google.container.v1beta1.NodePoolDefaults.verify(message.nodePoolDefaults); + if (error) + return "nodePoolDefaults." + error; + } + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1beta1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.container.v1beta1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } + if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) { + var error = $root.google.container.v1beta1.NodePoolAutoConfig.verify(message.nodePoolAutoConfig); + if (error) + return "nodePoolAutoConfig." + error; + } + if (message.protectConfig != null && message.hasOwnProperty("protectConfig")) { + properties._protectConfig = 1; + { + var error = $root.google.container.v1beta1.ProtectConfig.verify(message.protectConfig); + if (error) + return "protectConfig." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.container.v1beta1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) { + var error = $root.google.container.v1beta1.SecurityPostureConfig.verify(message.securityPostureConfig); + if (error) + return "securityPostureConfig." + error; + } + if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) { + var error = $root.google.container.v1beta1.EnterpriseConfig.verify(message.enterpriseConfig); + if (error) + return "enterpriseConfig." + error; + } + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) { + var error = $root.google.container.v1beta1.SecretManagerConfig.verify(message.secretManagerConfig); + if (error) + return "secretManagerConfig." + error; + } + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { + var error = $root.google.container.v1beta1.CompliancePostureConfig.verify(message.compliancePostureConfig); + if (error) + return "compliancePostureConfig." + error; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + properties._satisfiesPzs = 1; + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + properties._satisfiesPzi = 1; + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + } + return null; + }; + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Cluster + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Cluster} Cluster + */ + Cluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Cluster) + return object; + var message = new $root.google.container.v1beta1.Cluster(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.initialNodeCount != null) + message.initialNodeCount = object.initialNodeCount | 0; + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.nodeConfig: object expected"); + message.nodeConfig = $root.google.container.v1beta1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.masterAuth != null) { + if (typeof object.masterAuth !== "object") + throw TypeError(".google.container.v1beta1.Cluster.masterAuth: object expected"); + message.masterAuth = $root.google.container.v1beta1.MasterAuth.fromObject(object.masterAuth); + } + if (object.loggingService != null) + message.loggingService = String(object.loggingService); + if (object.monitoringService != null) + message.monitoringService = String(object.monitoringService); + if (object.network != null) + message.network = String(object.network); + if (object.clusterIpv4Cidr != null) + message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); + if (object.addonsConfig != null) { + if (typeof object.addonsConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.addonsConfig: object expected"); + message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.addonsConfig); + } + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.container.v1beta1.Cluster.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.container.v1beta1.Cluster.nodePools: object expected"); + message.nodePools[i] = $root.google.container.v1beta1.NodePool.fromObject(object.nodePools[i]); + } + } + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1beta1.Cluster.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.enableKubernetesAlpha != null) + message.enableKubernetesAlpha = Boolean(object.enableKubernetesAlpha); + if (object.enableK8sBetaApis != null) { + if (typeof object.enableK8sBetaApis !== "object") + throw TypeError(".google.container.v1beta1.Cluster.enableK8sBetaApis: object expected"); + message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); + } + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1beta1.Cluster.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.labelFingerprint != null) + message.labelFingerprint = String(object.labelFingerprint); + if (object.legacyAbac != null) { + if (typeof object.legacyAbac !== "object") + throw TypeError(".google.container.v1beta1.Cluster.legacyAbac: object expected"); + message.legacyAbac = $root.google.container.v1beta1.LegacyAbac.fromObject(object.legacyAbac); + } + if (object.networkPolicy != null) { + if (typeof object.networkPolicy !== "object") + throw TypeError(".google.container.v1beta1.Cluster.networkPolicy: object expected"); + message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.fromObject(object.networkPolicy); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.container.v1beta1.Cluster.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + if (object.masterAuthorizedNetworksConfig != null) { + if (typeof object.masterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.masterAuthorizedNetworksConfig: object expected"); + message.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); + } + if (object.maintenancePolicy != null) { + if (typeof object.maintenancePolicy !== "object") + throw TypeError(".google.container.v1beta1.Cluster.maintenancePolicy: object expected"); + message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.fromObject(object.maintenancePolicy); + } + if (object.binaryAuthorization != null) { + if (typeof object.binaryAuthorization !== "object") + throw TypeError(".google.container.v1beta1.Cluster.binaryAuthorization: object expected"); + message.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.fromObject(object.binaryAuthorization); + } + if (object.podSecurityPolicyConfig != null) { + if (typeof object.podSecurityPolicyConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.podSecurityPolicyConfig: object expected"); + message.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.fromObject(object.podSecurityPolicyConfig); + } + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1beta1.Cluster.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.fromObject(object.autoscaling); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.networkConfig: object expected"); + message.networkConfig = $root.google.container.v1beta1.NetworkConfig.fromObject(object.networkConfig); + } + if (object.privateCluster != null) + message.privateCluster = Boolean(object.privateCluster); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.defaultMaxPodsConstraint != null) { + if (typeof object.defaultMaxPodsConstraint !== "object") + throw TypeError(".google.container.v1beta1.Cluster.defaultMaxPodsConstraint: object expected"); + message.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.defaultMaxPodsConstraint); + } + if (object.resourceUsageExportConfig != null) { + if (typeof object.resourceUsageExportConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.resourceUsageExportConfig: object expected"); + message.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.fromObject(object.resourceUsageExportConfig); + } + if (object.authenticatorGroupsConfig != null) { + if (typeof object.authenticatorGroupsConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.authenticatorGroupsConfig: object expected"); + message.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.fromObject(object.authenticatorGroupsConfig); + } + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.verticalPodAutoscaling != null) { + if (typeof object.verticalPodAutoscaling !== "object") + throw TypeError(".google.container.v1beta1.Cluster.verticalPodAutoscaling: object expected"); + message.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.fromObject(object.verticalPodAutoscaling); + } + if (object.shieldedNodes != null) { + if (typeof object.shieldedNodes !== "object") + throw TypeError(".google.container.v1beta1.Cluster.shieldedNodes: object expected"); + message.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.fromObject(object.shieldedNodes); + } + if (object.releaseChannel != null) { + if (typeof object.releaseChannel !== "object") + throw TypeError(".google.container.v1beta1.Cluster.releaseChannel: object expected"); + message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.releaseChannel); + } + if (object.workloadIdentityConfig != null) { + if (typeof object.workloadIdentityConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.workloadIdentityConfig: object expected"); + message.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); + } + if (object.workloadCertificates != null) { + if (typeof object.workloadCertificates !== "object") + throw TypeError(".google.container.v1beta1.Cluster.workloadCertificates: object expected"); + message.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.fromObject(object.workloadCertificates); + } + if (object.meshCertificates != null) { + if (typeof object.meshCertificates !== "object") + throw TypeError(".google.container.v1beta1.Cluster.meshCertificates: object expected"); + message.meshCertificates = $root.google.container.v1beta1.MeshCertificates.fromObject(object.meshCertificates); + } + if (object.workloadAltsConfig != null) { + if (typeof object.workloadAltsConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.workloadAltsConfig: object expected"); + message.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.fromObject(object.workloadAltsConfig); + } + if (object.costManagementConfig != null) { + if (typeof object.costManagementConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.costManagementConfig: object expected"); + message.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.fromObject(object.costManagementConfig); + } + if (object.clusterTelemetry != null) { + if (typeof object.clusterTelemetry !== "object") + throw TypeError(".google.container.v1beta1.Cluster.clusterTelemetry: object expected"); + message.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.fromObject(object.clusterTelemetry); + } + if (object.tpuConfig != null) { + if (typeof object.tpuConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.tpuConfig: object expected"); + message.tpuConfig = $root.google.container.v1beta1.TpuConfig.fromObject(object.tpuConfig); + } + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.notificationConfig: object expected"); + message.notificationConfig = $root.google.container.v1beta1.NotificationConfig.fromObject(object.notificationConfig); + } + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1beta1.Cluster.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.identityServiceConfig != null) { + if (typeof object.identityServiceConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.identityServiceConfig: object expected"); + message.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.fromObject(object.identityServiceConfig); + } + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.zone != null) + message.zone = String(object.zone); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.initialClusterVersion != null) + message.initialClusterVersion = String(object.initialClusterVersion); + if (object.currentMasterVersion != null) + message.currentMasterVersion = String(object.currentMasterVersion); + if (object.currentNodeVersion != null) + message.currentNodeVersion = String(object.currentNodeVersion); + if (object.createTime != null) + message.createTime = String(object.createTime); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROVISIONING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "RECONCILING": + case 3: + message.status = 3; + break; + case "STOPPING": + case 4: + message.status = 4; + break; + case "ERROR": + case 5: + message.status = 5; + break; + case "DEGRADED": + case 6: + message.status = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.nodeIpv4CidrSize != null) + message.nodeIpv4CidrSize = object.nodeIpv4CidrSize | 0; + if (object.servicesIpv4Cidr != null) + message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); + if (object.instanceGroupUrls) { + if (!Array.isArray(object.instanceGroupUrls)) + throw TypeError(".google.container.v1beta1.Cluster.instanceGroupUrls: array expected"); + message.instanceGroupUrls = []; + for (var i = 0; i < object.instanceGroupUrls.length; ++i) + message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); + } + if (object.currentNodeCount != null) + message.currentNodeCount = object.currentNodeCount | 0; + if (object.expireTime != null) + message.expireTime = String(object.expireTime); + if (object.location != null) + message.location = String(object.location); + if (object.enableTpu != null) + message.enableTpu = Boolean(object.enableTpu); + if (object.tpuIpv4CidrBlock != null) + message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); + if (object.databaseEncryption != null) { + if (typeof object.databaseEncryption !== "object") + throw TypeError(".google.container.v1beta1.Cluster.databaseEncryption: object expected"); + message.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.fromObject(object.databaseEncryption); + } + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.container.v1beta1.Cluster.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.container.v1beta1.Cluster.conditions: object expected"); + message.conditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.conditions[i]); + } + } + if (object.master != null) { + if (typeof object.master !== "object") + throw TypeError(".google.container.v1beta1.Cluster.master: object expected"); + message.master = $root.google.container.v1beta1.Master.fromObject(object.master); + } + if (object.autopilot != null) { + if (typeof object.autopilot !== "object") + throw TypeError(".google.container.v1beta1.Cluster.autopilot: object expected"); + message.autopilot = $root.google.container.v1beta1.Autopilot.fromObject(object.autopilot); + } + if (object.id != null) + message.id = String(object.id); + if (object.nodePoolDefaults != null) { + if (typeof object.nodePoolDefaults !== "object") + throw TypeError(".google.container.v1beta1.Cluster.nodePoolDefaults: object expected"); + message.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.fromObject(object.nodePoolDefaults); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1beta1.LoggingConfig.fromObject(object.loggingConfig); + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.fromObject(object.monitoringConfig); + } + if (object.nodePoolAutoConfig != null) { + if (typeof object.nodePoolAutoConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.nodePoolAutoConfig: object expected"); + message.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.fromObject(object.nodePoolAutoConfig); + } + if (object.protectConfig != null) { + if (typeof object.protectConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.protectConfig: object expected"); + message.protectConfig = $root.google.container.v1beta1.ProtectConfig.fromObject(object.protectConfig); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.container.v1beta1.Cluster.fleet: object expected"); + message.fleet = $root.google.container.v1beta1.Fleet.fromObject(object.fleet); + } + if (object.securityPostureConfig != null) { + if (typeof object.securityPostureConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.securityPostureConfig: object expected"); + message.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.fromObject(object.securityPostureConfig); + } + if (object.enterpriseConfig != null) { + if (typeof object.enterpriseConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.enterpriseConfig: object expected"); + message.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.fromObject(object.enterpriseConfig); + } + if (object.secretManagerConfig != null) { + if (typeof object.secretManagerConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.secretManagerConfig: object expected"); + message.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.fromObject(object.secretManagerConfig); + } + if (object.compliancePostureConfig != null) { + if (typeof object.compliancePostureConfig !== "object") + throw TypeError(".google.container.v1beta1.Cluster.compliancePostureConfig: object expected"); + message.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); + } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + return message; + }; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Cluster + * @static + * @param {google.container.v1beta1.Cluster} message Cluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.nodePools = []; + object.locations = []; + object.instanceGroupUrls = []; + object.conditions = []; + } + if (options.objects || options.defaults) + object.resourceLabels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.initialNodeCount = 0; + object.nodeConfig = null; + object.masterAuth = null; + object.loggingService = ""; + object.monitoringService = ""; + object.network = ""; + object.clusterIpv4Cidr = ""; + object.addonsConfig = null; + object.subnetwork = ""; + object.enableKubernetesAlpha = false; + object.labelFingerprint = ""; + object.legacyAbac = null; + object.networkPolicy = null; + object.ipAllocationPolicy = null; + object.masterAuthorizedNetworksConfig = null; + object.maintenancePolicy = null; + object.binaryAuthorization = null; + object.podSecurityPolicyConfig = null; + object.autoscaling = null; + object.networkConfig = null; + object.privateCluster = false; + object.masterIpv4CidrBlock = ""; + object.defaultMaxPodsConstraint = null; + object.resourceUsageExportConfig = null; + object.authenticatorGroupsConfig = null; + object.privateClusterConfig = null; + object.databaseEncryption = null; + object.verticalPodAutoscaling = null; + object.shieldedNodes = null; + object.releaseChannel = null; + object.workloadIdentityConfig = null; + object.costManagementConfig = null; + object.clusterTelemetry = null; + object.tpuConfig = null; + object.notificationConfig = null; + object.confidentialNodes = null; + object.workloadCertificates = null; + object.workloadAltsConfig = null; + object.identityServiceConfig = null; + object.meshCertificates = null; + object.selfLink = ""; + object.zone = ""; + object.endpoint = ""; + object.initialClusterVersion = ""; + object.currentMasterVersion = ""; + object.currentNodeVersion = ""; + object.createTime = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.nodeIpv4CidrSize = 0; + object.servicesIpv4Cidr = ""; + object.currentNodeCount = 0; + object.expireTime = ""; + object.location = ""; + object.enableTpu = false; + object.tpuIpv4CidrBlock = ""; + object.master = null; + object.autopilot = null; + object.id = ""; + object.loggingConfig = null; + object.monitoringConfig = null; + object.nodePoolAutoConfig = null; + object.etag = ""; + object.fleet = null; + object.enableK8sBetaApis = null; + object.securityPostureConfig = null; + object.enterpriseConfig = null; + object.secretManagerConfig = null; + object.compliancePostureConfig = 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.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + object.initialNodeCount = message.initialNodeCount; + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.container.v1beta1.NodeConfig.toObject(message.nodeConfig, options); + if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) + object.masterAuth = $root.google.container.v1beta1.MasterAuth.toObject(message.masterAuth, options); + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + object.loggingService = message.loggingService; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + object.monitoringService = message.monitoringService; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) + object.clusterIpv4Cidr = message.clusterIpv4Cidr; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) + object.addonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.addonsConfig, options); + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.container.v1beta1.NodePool.toObject(message.nodePools[j], options); + } + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) + object.enableKubernetesAlpha = message.enableKubernetesAlpha; + var keys2; + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + object.labelFingerprint = message.labelFingerprint; + if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) + object.legacyAbac = $root.google.container.v1beta1.LegacyAbac.toObject(message.legacyAbac, options); + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) + object.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.toObject(message.networkPolicy, options); + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) + object.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) + object.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.toObject(message.maintenancePolicy, options); + if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) + object.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.toObject(message.binaryAuthorization, options); + if (message.podSecurityPolicyConfig != null && message.hasOwnProperty("podSecurityPolicyConfig")) + object.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.toObject(message.podSecurityPolicyConfig, options); + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.toObject(message.autoscaling, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.container.v1beta1.NetworkConfig.toObject(message.networkConfig, options); + if (message.privateCluster != null && message.hasOwnProperty("privateCluster")) + object.privateCluster = message.privateCluster; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) + object.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.defaultMaxPodsConstraint, options); + if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) + object.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.toObject(message.resourceUsageExportConfig, options); + if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) + object.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.toObject(message.authenticatorGroupsConfig, options); + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) + object.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.toObject(message.databaseEncryption, options); + if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) + object.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.toObject(message.verticalPodAutoscaling, options); + if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) + object.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.toObject(message.shieldedNodes, options); + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.releaseChannel, options); + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) + object.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); + if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) + object.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.toObject(message.costManagementConfig, options); + if (message.clusterTelemetry != null && message.hasOwnProperty("clusterTelemetry")) + object.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.toObject(message.clusterTelemetry, options); + if (message.tpuConfig != null && message.hasOwnProperty("tpuConfig")) + object.tpuConfig = $root.google.container.v1beta1.TpuConfig.toObject(message.tpuConfig, options); + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.container.v1beta1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.workloadCertificates != null && message.hasOwnProperty("workloadCertificates")) + object.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.toObject(message.workloadCertificates, options); + if (message.workloadAltsConfig != null && message.hasOwnProperty("workloadAltsConfig")) + object.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.toObject(message.workloadAltsConfig, options); + if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) + object.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.toObject(message.identityServiceConfig, options); + if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) + object.meshCertificates = $root.google.container.v1beta1.MeshCertificates.toObject(message.meshCertificates, options); + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) + object.initialClusterVersion = message.initialClusterVersion; + if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) + object.currentMasterVersion = message.currentMasterVersion; + if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) + object.currentNodeVersion = message.currentNodeVersion; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = message.createTime; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1beta1.Cluster.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Cluster.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) + object.nodeIpv4CidrSize = message.nodeIpv4CidrSize; + if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) + object.servicesIpv4Cidr = message.servicesIpv4Cidr; + if (message.instanceGroupUrls && message.instanceGroupUrls.length) { + object.instanceGroupUrls = []; + for (var j = 0; j < message.instanceGroupUrls.length; ++j) + object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; + } + if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) + object.currentNodeCount = message.currentNodeCount; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = message.expireTime; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) + object.enableTpu = message.enableTpu; + if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) + object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.conditions[j], options); + } + if (message.master != null && message.hasOwnProperty("master")) + object.master = $root.google.container.v1beta1.Master.toObject(message.master, options); + if (message.autopilot != null && message.hasOwnProperty("autopilot")) + object.autopilot = $root.google.container.v1beta1.Autopilot.toObject(message.autopilot, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { + object.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.toObject(message.nodePoolDefaults, options); + if (options.oneofs) + object._nodePoolDefaults = "nodePoolDefaults"; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1beta1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.toObject(message.monitoringConfig, options); + if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) + object.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.toObject(message.nodePoolAutoConfig, options); + if (message.protectConfig != null && message.hasOwnProperty("protectConfig")) { + object.protectConfig = $root.google.container.v1beta1.ProtectConfig.toObject(message.protectConfig, options); + if (options.oneofs) + object._protectConfig = "protectConfig"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.container.v1beta1.Fleet.toObject(message.fleet, options); + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) + object.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) + object.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); + if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) + object.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.toObject(message.enterpriseConfig, options); + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) + object.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.toObject(message.secretManagerConfig, options); + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) + object.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + object.satisfiesPzs = message.satisfiesPzs; + if (options.oneofs) + object._satisfiesPzs = "satisfiesPzs"; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + object.satisfiesPzi = message.satisfiesPzi; + if (options.oneofs) + object._satisfiesPzi = "satisfiesPzi"; + } + return object; + }; + + /** + * Converts this Cluster to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Cluster + * @instance + * @returns {Object.} JSON object + */ + Cluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cluster + * @function getTypeUrl + * @memberof google.container.v1beta1.Cluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Cluster"; + }; + + /** + * Status enum. + * @name google.container.v1beta1.Cluster.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_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 + */ + Cluster.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_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 Cluster; + })(); + + v1beta1.CompliancePostureConfig = (function() { + + /** + * Properties of a CompliancePostureConfig. + * @memberof google.container.v1beta1 + * @interface ICompliancePostureConfig + * @property {google.container.v1beta1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode + * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards + */ + + /** + * Constructs a new CompliancePostureConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a CompliancePostureConfig. + * @implements ICompliancePostureConfig + * @constructor + * @param {google.container.v1beta1.ICompliancePostureConfig=} [properties] Properties to set + */ + function CompliancePostureConfig(properties) { + this.complianceStandards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompliancePostureConfig mode. + * @member {google.container.v1beta1.CompliancePostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1beta1.CompliancePostureConfig + * @instance + */ + CompliancePostureConfig.prototype.mode = null; + + /** + * CompliancePostureConfig complianceStandards. + * @member {Array.} complianceStandards + * @memberof google.container.v1beta1.CompliancePostureConfig + * @instance + */ + CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompliancePostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1beta1.CompliancePostureConfig + * @instance + */ + Object.defineProperty(CompliancePostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompliancePostureConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {google.container.v1beta1.ICompliancePostureConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig instance + */ + CompliancePostureConfig.create = function create(properties) { + return new CompliancePostureConfig(properties); + }; + + /** + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {google.container.v1beta1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompliancePostureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.complianceStandards != null && message.complianceStandards.length) + for (var i = 0; i < message.complianceStandards.length; ++i) + $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {google.container.v1beta1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompliancePostureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompliancePostureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + if (!(message.complianceStandards && message.complianceStandards.length)) + message.complianceStandards = []; + message.complianceStandards.push($root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompliancePostureConfig message. + * @function verify + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompliancePostureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { + if (!Array.isArray(message.complianceStandards)) + return "complianceStandards: array expected"; + for (var i = 0; i < message.complianceStandards.length; ++i) { + var error = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); + if (error) + return "complianceStandards." + error; + } + } + return null; + }; + + /** + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig + */ + CompliancePostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CompliancePostureConfig) + return object; + var message = new $root.google.container.v1beta1.CompliancePostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "ENABLED": + case 2: + message.mode = 2; + break; + } + if (object.complianceStandards) { + if (!Array.isArray(object.complianceStandards)) + throw TypeError(".google.container.v1beta1.CompliancePostureConfig.complianceStandards: array expected"); + message.complianceStandards = []; + for (var i = 0; i < object.complianceStandards.length; ++i) { + if (typeof object.complianceStandards[i] !== "object") + throw TypeError(".google.container.v1beta1.CompliancePostureConfig.complianceStandards: object expected"); + message.complianceStandards[i] = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {google.container.v1beta1.CompliancePostureConfig} message CompliancePostureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompliancePostureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.complianceStandards = []; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1beta1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.CompliancePostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.complianceStandards && message.complianceStandards.length) { + object.complianceStandards = []; + for (var j = 0; j < message.complianceStandards.length; ++j) + object.complianceStandards[j] = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); + } + return object; + }; + + /** + * Converts this CompliancePostureConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CompliancePostureConfig + * @instance + * @returns {Object.} JSON object + */ + CompliancePostureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompliancePostureConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.CompliancePostureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CompliancePostureConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1beta1.CompliancePostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + CompliancePostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + CompliancePostureConfig.ComplianceStandard = (function() { + + /** + * Properties of a ComplianceStandard. + * @memberof google.container.v1beta1.CompliancePostureConfig + * @interface IComplianceStandard + * @property {string|null} [standard] ComplianceStandard standard + */ + + /** + * Constructs a new ComplianceStandard. + * @memberof google.container.v1beta1.CompliancePostureConfig + * @classdesc Represents a ComplianceStandard. + * @implements IComplianceStandard + * @constructor + * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + */ + function ComplianceStandard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComplianceStandard standard. + * @member {string|null|undefined} standard + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + ComplianceStandard.prototype.standard = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComplianceStandard _standard. + * @member {"standard"|undefined} _standard + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + Object.defineProperty(ComplianceStandard.prototype, "_standard", { + get: $util.oneOfGetter($oneOfFields = ["standard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance + */ + ComplianceStandard.create = function create(properties) { + return new ComplianceStandard(properties); + }; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); + return writer; + }; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.standard = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComplianceStandard message. + * @function verify + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComplianceStandard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + properties._standard = 1; + if (!$util.isString(message.standard)) + return "standard: string expected"; + } + return null; + }; + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + */ + ComplianceStandard.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard) + return object; + var message = new $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard(); + if (object.standard != null) + message.standard = String(object.standard); + return message; + }; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComplianceStandard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + object.standard = message.standard; + if (options.oneofs) + object._standard = "standard"; + } + return object; + }; + + /** + * Converts this ComplianceStandard to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @instance + * @returns {Object.} JSON object + */ + ComplianceStandard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComplianceStandard + * @function getTypeUrl + * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CompliancePostureConfig.ComplianceStandard"; + }; + + return ComplianceStandard; + })(); + + return CompliancePostureConfig; + })(); + + v1beta1.K8sBetaAPIConfig = (function() { + + /** + * Properties of a K8sBetaAPIConfig. + * @memberof google.container.v1beta1 + * @interface IK8sBetaAPIConfig + * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis + */ + + /** + * Constructs a new K8sBetaAPIConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a K8sBetaAPIConfig. + * @implements IK8sBetaAPIConfig + * @constructor + * @param {google.container.v1beta1.IK8sBetaAPIConfig=} [properties] Properties to set + */ + function K8sBetaAPIConfig(properties) { + this.enabledApis = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * K8sBetaAPIConfig enabledApis. + * @member {Array.} enabledApis + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @instance + */ + K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; + + /** + * Creates a new K8sBetaAPIConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {google.container.v1beta1.IK8sBetaAPIConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig instance + */ + K8sBetaAPIConfig.create = function create(properties) { + return new K8sBetaAPIConfig(properties); + }; + + /** + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {google.container.v1beta1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + K8sBetaAPIConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabledApis != null && message.enabledApis.length) + for (var i = 0; i < message.enabledApis.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); + return writer; + }; + + /** + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {google.container.v1beta1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + K8sBetaAPIConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.K8sBetaAPIConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.enabledApis && message.enabledApis.length)) + message.enabledApis = []; + message.enabledApis.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a K8sBetaAPIConfig message. + * @function verify + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + K8sBetaAPIConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { + if (!Array.isArray(message.enabledApis)) + return "enabledApis: array expected"; + for (var i = 0; i < message.enabledApis.length; ++i) + if (!$util.isString(message.enabledApis[i])) + return "enabledApis: string[] expected"; + } + return null; + }; + + /** + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig + */ + K8sBetaAPIConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.K8sBetaAPIConfig) + return object; + var message = new $root.google.container.v1beta1.K8sBetaAPIConfig(); + if (object.enabledApis) { + if (!Array.isArray(object.enabledApis)) + throw TypeError(".google.container.v1beta1.K8sBetaAPIConfig.enabledApis: array expected"); + message.enabledApis = []; + for (var i = 0; i < object.enabledApis.length; ++i) + message.enabledApis[i] = String(object.enabledApis[i]); + } + return message; + }; + + /** + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {google.container.v1beta1.K8sBetaAPIConfig} message K8sBetaAPIConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + K8sBetaAPIConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.enabledApis = []; + if (message.enabledApis && message.enabledApis.length) { + object.enabledApis = []; + for (var j = 0; j < message.enabledApis.length; ++j) + object.enabledApis[j] = message.enabledApis[j]; + } + return object; + }; + + /** + * Converts this K8sBetaAPIConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @instance + * @returns {Object.} JSON object + */ + K8sBetaAPIConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for K8sBetaAPIConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.K8sBetaAPIConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.K8sBetaAPIConfig"; + }; + + return K8sBetaAPIConfig; + })(); + + v1beta1.WorkloadConfig = (function() { + + /** + * Properties of a WorkloadConfig. + * @memberof google.container.v1beta1 + * @interface IWorkloadConfig + * @property {google.container.v1beta1.WorkloadConfig.Mode|null} [auditMode] WorkloadConfig auditMode + */ + + /** + * Constructs a new WorkloadConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadConfig. + * @implements IWorkloadConfig + * @constructor + * @param {google.container.v1beta1.IWorkloadConfig=} [properties] Properties to set + */ + function WorkloadConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadConfig auditMode. + * @member {google.container.v1beta1.WorkloadConfig.Mode|null|undefined} auditMode + * @memberof google.container.v1beta1.WorkloadConfig + * @instance + */ + WorkloadConfig.prototype.auditMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WorkloadConfig _auditMode. + * @member {"auditMode"|undefined} _auditMode + * @memberof google.container.v1beta1.WorkloadConfig + * @instance + */ + Object.defineProperty(WorkloadConfig.prototype, "_auditMode", { + get: $util.oneOfGetter($oneOfFields = ["auditMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WorkloadConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {google.container.v1beta1.IWorkloadConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig instance + */ + WorkloadConfig.create = function create(properties) { + return new WorkloadConfig(properties); + }; + + /** + * Encodes the specified WorkloadConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {google.container.v1beta1.IWorkloadConfig} message WorkloadConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.auditMode != null && Object.hasOwnProperty.call(message, "auditMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.auditMode); + return writer; + }; + + /** + * Encodes the specified WorkloadConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {google.container.v1beta1.IWorkloadConfig} message WorkloadConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.auditMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadConfig message. + * @function verify + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.auditMode != null && message.hasOwnProperty("auditMode")) { + properties._auditMode = 1; + switch (message.auditMode) { + default: + return "auditMode: enum value expected"; + case 0: + case 1: + case 4: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a WorkloadConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig + */ + WorkloadConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadConfig) + return object; + var message = new $root.google.container.v1beta1.WorkloadConfig(); + switch (object.auditMode) { + default: + if (typeof object.auditMode === "number") { + message.auditMode = object.auditMode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.auditMode = 0; + break; + case "DISABLED": + case 1: + message.auditMode = 1; + break; + case "BASIC": + case 4: + message.auditMode = 4; + break; + case "BASELINE": + case 2: + message.auditMode = 2; + break; + case "RESTRICTED": + case 3: + message.auditMode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a WorkloadConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {google.container.v1beta1.WorkloadConfig} message WorkloadConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.auditMode != null && message.hasOwnProperty("auditMode")) { + object.auditMode = options.enums === String ? $root.google.container.v1beta1.WorkloadConfig.Mode[message.auditMode] === undefined ? message.auditMode : $root.google.container.v1beta1.WorkloadConfig.Mode[message.auditMode] : message.auditMode; + if (options.oneofs) + object._auditMode = "auditMode"; + } + return object; + }; + + /** + * Converts this WorkloadConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1beta1.WorkloadConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=4 BASIC value + * @property {number} BASELINE=2 BASELINE value + * @property {number} RESTRICTED=3 RESTRICTED value + */ + WorkloadConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[4] = "BASIC"] = 4; + values[valuesById[2] = "BASELINE"] = 2; + values[valuesById[3] = "RESTRICTED"] = 3; + return values; + })(); + + return WorkloadConfig; + })(); + + v1beta1.ProtectConfig = (function() { + + /** + * Properties of a ProtectConfig. + * @memberof google.container.v1beta1 + * @interface IProtectConfig + * @property {google.container.v1beta1.IWorkloadConfig|null} [workloadConfig] ProtectConfig workloadConfig + * @property {google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null} [workloadVulnerabilityMode] ProtectConfig workloadVulnerabilityMode + */ + + /** + * Constructs a new ProtectConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ProtectConfig. + * @implements IProtectConfig + * @constructor + * @param {google.container.v1beta1.IProtectConfig=} [properties] Properties to set + */ + function ProtectConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtectConfig workloadConfig. + * @member {google.container.v1beta1.IWorkloadConfig|null|undefined} workloadConfig + * @memberof google.container.v1beta1.ProtectConfig + * @instance + */ + ProtectConfig.prototype.workloadConfig = null; + + /** + * ProtectConfig workloadVulnerabilityMode. + * @member {google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null|undefined} workloadVulnerabilityMode + * @memberof google.container.v1beta1.ProtectConfig + * @instance + */ + ProtectConfig.prototype.workloadVulnerabilityMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ProtectConfig _workloadConfig. + * @member {"workloadConfig"|undefined} _workloadConfig + * @memberof google.container.v1beta1.ProtectConfig + * @instance + */ + Object.defineProperty(ProtectConfig.prototype, "_workloadConfig", { + get: $util.oneOfGetter($oneOfFields = ["workloadConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ProtectConfig _workloadVulnerabilityMode. + * @member {"workloadVulnerabilityMode"|undefined} _workloadVulnerabilityMode + * @memberof google.container.v1beta1.ProtectConfig + * @instance + */ + Object.defineProperty(ProtectConfig.prototype, "_workloadVulnerabilityMode", { + get: $util.oneOfGetter($oneOfFields = ["workloadVulnerabilityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProtectConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {google.container.v1beta1.IProtectConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig instance + */ + ProtectConfig.create = function create(properties) { + return new ProtectConfig(properties); + }; + + /** + * Encodes the specified ProtectConfig message. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {google.container.v1beta1.IProtectConfig} message ProtectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workloadConfig != null && Object.hasOwnProperty.call(message, "workloadConfig")) + $root.google.container.v1beta1.WorkloadConfig.encode(message.workloadConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.workloadVulnerabilityMode != null && Object.hasOwnProperty.call(message, "workloadVulnerabilityMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.workloadVulnerabilityMode); + return writer; + }; + + /** + * Encodes the specified ProtectConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {google.container.v1beta1.IProtectConfig} message ProtectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ProtectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.workloadVulnerabilityMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtectConfig message. + * @function verify + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.workloadConfig != null && message.hasOwnProperty("workloadConfig")) { + properties._workloadConfig = 1; + { + var error = $root.google.container.v1beta1.WorkloadConfig.verify(message.workloadConfig); + if (error) + return "workloadConfig." + error; + } + } + if (message.workloadVulnerabilityMode != null && message.hasOwnProperty("workloadVulnerabilityMode")) { + properties._workloadVulnerabilityMode = 1; + switch (message.workloadVulnerabilityMode) { + default: + return "workloadVulnerabilityMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a ProtectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig + */ + ProtectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ProtectConfig) + return object; + var message = new $root.google.container.v1beta1.ProtectConfig(); + if (object.workloadConfig != null) { + if (typeof object.workloadConfig !== "object") + throw TypeError(".google.container.v1beta1.ProtectConfig.workloadConfig: object expected"); + message.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.fromObject(object.workloadConfig); + } + switch (object.workloadVulnerabilityMode) { + default: + if (typeof object.workloadVulnerabilityMode === "number") { + message.workloadVulnerabilityMode = object.workloadVulnerabilityMode; + break; + } + break; + case "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED": + case 0: + message.workloadVulnerabilityMode = 0; + break; + case "DISABLED": + case 1: + message.workloadVulnerabilityMode = 1; + break; + case "BASIC": + case 2: + message.workloadVulnerabilityMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProtectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {google.container.v1beta1.ProtectConfig} message ProtectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.workloadConfig != null && message.hasOwnProperty("workloadConfig")) { + object.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.toObject(message.workloadConfig, options); + if (options.oneofs) + object._workloadConfig = "workloadConfig"; + } + if (message.workloadVulnerabilityMode != null && message.hasOwnProperty("workloadVulnerabilityMode")) { + object.workloadVulnerabilityMode = options.enums === String ? $root.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode[message.workloadVulnerabilityMode] === undefined ? message.workloadVulnerabilityMode : $root.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode[message.workloadVulnerabilityMode] : message.workloadVulnerabilityMode; + if (options.oneofs) + object._workloadVulnerabilityMode = "workloadVulnerabilityMode"; + } + return object; + }; + + /** + * Converts this ProtectConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ProtectConfig + * @instance + * @returns {Object.} JSON object + */ + ProtectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtectConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ProtectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ProtectConfig"; + }; + + /** + * WorkloadVulnerabilityMode enum. + * @name google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode + * @enum {number} + * @property {number} WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED=0 WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=2 BASIC value + */ + ProtectConfig.WorkloadVulnerabilityMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "BASIC"] = 2; + return values; + })(); + + return ProtectConfig; + })(); + + v1beta1.SecurityPostureConfig = (function() { + + /** + * Properties of a SecurityPostureConfig. + * @memberof google.container.v1beta1 + * @interface ISecurityPostureConfig + * @property {google.container.v1beta1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode + * @property {google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode + */ + + /** + * Constructs a new SecurityPostureConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a SecurityPostureConfig. + * @implements ISecurityPostureConfig + * @constructor + * @param {google.container.v1beta1.ISecurityPostureConfig=} [properties] Properties to set + */ + function SecurityPostureConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityPostureConfig mode. + * @member {google.container.v1beta1.SecurityPostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @instance + */ + SecurityPostureConfig.prototype.mode = null; + + /** + * SecurityPostureConfig vulnerabilityMode. + * @member {google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @instance + */ + SecurityPostureConfig.prototype.vulnerabilityMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecurityPostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SecurityPostureConfig _vulnerabilityMode. + * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { + get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {google.container.v1beta1.ISecurityPostureConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig instance + */ + SecurityPostureConfig.create = function create(properties) { + return new SecurityPostureConfig(properties); + }; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {google.container.v1beta1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); + return writer; + }; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {google.container.v1beta1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecurityPostureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.vulnerabilityMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityPostureConfig message. + * @function verify + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityPostureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + properties._vulnerabilityMode = 1; + switch (message.vulnerabilityMode) { + default: + return "vulnerabilityMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig + */ + SecurityPostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SecurityPostureConfig) + return object; + var message = new $root.google.container.v1beta1.SecurityPostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "BASIC": + case 2: + message.mode = 2; + break; + case "ENTERPRISE": + case 3: + message.mode = 3; + break; + } + switch (object.vulnerabilityMode) { + default: + if (typeof object.vulnerabilityMode === "number") { + message.vulnerabilityMode = object.vulnerabilityMode; + break; + } + break; + case "VULNERABILITY_MODE_UNSPECIFIED": + case 0: + message.vulnerabilityMode = 0; + break; + case "VULNERABILITY_DISABLED": + case 1: + message.vulnerabilityMode = 1; + break; + case "VULNERABILITY_BASIC": + case 2: + message.vulnerabilityMode = 2; + break; + case "VULNERABILITY_ENTERPRISE": + case 3: + message.vulnerabilityMode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {google.container.v1beta1.SecurityPostureConfig} message SecurityPostureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityPostureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1beta1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.SecurityPostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + object.vulnerabilityMode = options.enums === String ? $root.google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; + if (options.oneofs) + object._vulnerabilityMode = "vulnerabilityMode"; + } + return object; + }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SecurityPostureConfig + * @instance + * @returns {Object.} JSON object + */ + SecurityPostureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityPostureConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.SecurityPostureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SecurityPostureConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1beta1.SecurityPostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=2 BASIC value + * @property {number} ENTERPRISE=3 ENTERPRISE value + */ + SecurityPostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); + + /** + * VulnerabilityMode enum. + * @name google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode + * @enum {number} + * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value + * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value + * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value + * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value + */ + SecurityPostureConfig.VulnerabilityMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; + values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; + values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; + return values; + })(); + + return SecurityPostureConfig; + })(); + + v1beta1.NodePoolDefaults = (function() { + + /** + * Properties of a NodePoolDefaults. + * @memberof google.container.v1beta1 + * @interface INodePoolDefaults + * @property {google.container.v1beta1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults + */ + + /** + * Constructs a new NodePoolDefaults. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodePoolDefaults. + * @implements INodePoolDefaults + * @constructor + * @param {google.container.v1beta1.INodePoolDefaults=} [properties] Properties to set + */ + function NodePoolDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolDefaults nodeConfigDefaults. + * @member {google.container.v1beta1.INodeConfigDefaults|null|undefined} nodeConfigDefaults + * @memberof google.container.v1beta1.NodePoolDefaults + * @instance + */ + NodePoolDefaults.prototype.nodeConfigDefaults = null; + + /** + * Creates a new NodePoolDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {google.container.v1beta1.INodePoolDefaults=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults instance + */ + NodePoolDefaults.create = function create(properties) { + return new NodePoolDefaults(properties); + }; + + /** + * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {google.container.v1beta1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) + $root.google.container.v1beta1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {google.container.v1beta1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolDefaults message. + * @function verify + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { + var error = $root.google.container.v1beta1.NodeConfigDefaults.verify(message.nodeConfigDefaults); + if (error) + return "nodeConfigDefaults." + error; + } + return null; + }; + + /** + * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults + */ + NodePoolDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePoolDefaults) + return object; + var message = new $root.google.container.v1beta1.NodePoolDefaults(); + if (object.nodeConfigDefaults != null) { + if (typeof object.nodeConfigDefaults !== "object") + throw TypeError(".google.container.v1beta1.NodePoolDefaults.nodeConfigDefaults: object expected"); + message.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {google.container.v1beta1.NodePoolDefaults} message NodePoolDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nodeConfigDefaults = null; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) + object.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); + return object; + }; + + /** + * Converts this NodePoolDefaults to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePoolDefaults + * @instance + * @returns {Object.} JSON object + */ + NodePoolDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolDefaults + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePoolDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePoolDefaults"; + }; + + return NodePoolDefaults; + })(); + + v1beta1.NodeConfigDefaults = (function() { + + /** + * Properties of a NodeConfigDefaults. + * @memberof google.container.v1beta1 + * @interface INodeConfigDefaults + * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig + * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig + * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig + * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [hostMaintenancePolicy] NodeConfigDefaults hostMaintenancePolicy + * @property {google.container.v1beta1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig + */ + + /** + * Constructs a new NodeConfigDefaults. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeConfigDefaults. + * @implements INodeConfigDefaults + * @constructor + * @param {google.container.v1beta1.INodeConfigDefaults=} [properties] Properties to set + */ + function NodeConfigDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfigDefaults gcfsConfig. + * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.gcfsConfig = null; + + /** + * NodeConfigDefaults loggingConfig. + * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.loggingConfig = null; + + /** + * NodeConfigDefaults containerdConfig. + * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.containerdConfig = null; + + /** + * NodeConfigDefaults hostMaintenancePolicy. + * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} hostMaintenancePolicy + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.hostMaintenancePolicy = null; + + /** + * NodeConfigDefaults nodeKubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} nodeKubeletConfig + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.nodeKubeletConfig = null; + + /** + * Creates a new NodeConfigDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {google.container.v1beta1.INodeConfigDefaults=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults instance + */ + NodeConfigDefaults.create = function create(properties) { + return new NodeConfigDefaults(properties); + }; + + /** + * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {google.container.v1beta1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfigDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.hostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "hostMaintenancePolicy")) + $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.hostMaintenancePolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {google.container.v1beta1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfigDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfigDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeConfigDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 6: { + message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfigDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfigDefaults message. + * @function verify + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfigDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) { + var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.hostMaintenancePolicy); + if (error) + return "hostMaintenancePolicy." + error; + } + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.nodeKubeletConfig); + if (error) + return "nodeKubeletConfig." + error; + } + return null; + }; + + /** + * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults + */ + NodeConfigDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeConfigDefaults) + return object; + var message = new $root.google.container.v1beta1.NodeConfigDefaults(); + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfigDefaults.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfigDefaults.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfigDefaults.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.hostMaintenancePolicy != null) { + if (typeof object.hostMaintenancePolicy !== "object") + throw TypeError(".google.container.v1beta1.NodeConfigDefaults.hostMaintenancePolicy: object expected"); + message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.hostMaintenancePolicy); + } + if (object.nodeKubeletConfig != null) { + if (typeof object.nodeKubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.NodeConfigDefaults.nodeKubeletConfig: object expected"); + message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {google.container.v1beta1.NodeConfigDefaults} message NodeConfigDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfigDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcfsConfig = null; + object.loggingConfig = null; + object.containerdConfig = null; + object.hostMaintenancePolicy = null; + object.nodeKubeletConfig = null; + } + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) + object.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.hostMaintenancePolicy, options); + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) + object.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + return object; + }; + + /** + * Converts this NodeConfigDefaults to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeConfigDefaults + * @instance + * @returns {Object.} JSON object + */ + NodeConfigDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfigDefaults + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeConfigDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfigDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeConfigDefaults"; + }; + + return NodeConfigDefaults; + })(); + + v1beta1.NodePoolAutoConfig = (function() { + + /** + * Properties of a NodePoolAutoConfig. + * @memberof google.container.v1beta1 + * @interface INodePoolAutoConfig + * @property {google.container.v1beta1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags + * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags + * @property {google.container.v1beta1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig + */ + + /** + * Constructs a new NodePoolAutoConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodePoolAutoConfig. + * @implements INodePoolAutoConfig + * @constructor + * @param {google.container.v1beta1.INodePoolAutoConfig=} [properties] Properties to set + */ + function NodePoolAutoConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolAutoConfig networkTags. + * @member {google.container.v1beta1.INetworkTags|null|undefined} networkTags + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.networkTags = null; + + /** + * NodePoolAutoConfig resourceManagerTags. + * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.resourceManagerTags = null; + + /** + * NodePoolAutoConfig nodeKubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} nodeKubeletConfig + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.nodeKubeletConfig = null; + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {google.container.v1beta1.INodePoolAutoConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig instance + */ + NodePoolAutoConfig.create = function create(properties) { + return new NodePoolAutoConfig(properties); + }; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {google.container.v1beta1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) + $root.google.container.v1beta1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {google.container.v1beta1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolAutoConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkTags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 2: { + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolAutoConfig message. + * @function verify + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolAutoConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + var error = $root.google.container.v1beta1.NetworkTags.verify(message.networkTags); + if (error) + return "networkTags." + error; + } + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.nodeKubeletConfig); + if (error) + return "nodeKubeletConfig." + error; + } + return null; + }; + + /** + * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig + */ + NodePoolAutoConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePoolAutoConfig) + return object; + var message = new $root.google.container.v1beta1.NodePoolAutoConfig(); + if (object.networkTags != null) { + if (typeof object.networkTags !== "object") + throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.networkTags: object expected"); + message.networkTags = $root.google.container.v1beta1.NetworkTags.fromObject(object.networkTags); + } + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.nodeKubeletConfig != null) { + if (typeof object.nodeKubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); + message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {google.container.v1beta1.NodePoolAutoConfig} message NodePoolAutoConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolAutoConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkTags = null; + object.resourceManagerTags = null; + object.nodeKubeletConfig = null; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) + object.networkTags = $root.google.container.v1beta1.NetworkTags.toObject(message.networkTags, options); + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) + object.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + return object; + }; + + /** + * Converts this NodePoolAutoConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @instance + * @returns {Object.} JSON object + */ + NodePoolAutoConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolAutoConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePoolAutoConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePoolAutoConfig"; + }; + + return NodePoolAutoConfig; + })(); + + v1beta1.ClusterUpdate = (function() { + + /** + * Properties of a ClusterUpdate. + * @memberof google.container.v1beta1 + * @interface IClusterUpdate + * @property {string|null} [desiredNodeVersion] ClusterUpdate desiredNodeVersion + * @property {string|null} [desiredMonitoringService] ClusterUpdate desiredMonitoringService + * @property {google.container.v1beta1.IAddonsConfig|null} [desiredAddonsConfig] ClusterUpdate desiredAddonsConfig + * @property {string|null} [desiredNodePoolId] ClusterUpdate desiredNodePoolId + * @property {string|null} [desiredImageType] ClusterUpdate desiredImageType + * @property {google.container.v1beta1.INodePoolAutoscaling|null} [desiredNodePoolAutoscaling] ClusterUpdate desiredNodePoolAutoscaling + * @property {Array.|null} [desiredLocations] ClusterUpdate desiredLocations + * @property {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null} [desiredMasterAuthorizedNetworksConfig] ClusterUpdate desiredMasterAuthorizedNetworksConfig + * @property {google.container.v1beta1.IPodSecurityPolicyConfig|null} [desiredPodSecurityPolicyConfig] ClusterUpdate desiredPodSecurityPolicyConfig + * @property {google.container.v1beta1.IClusterAutoscaling|null} [desiredClusterAutoscaling] ClusterUpdate desiredClusterAutoscaling + * @property {google.container.v1beta1.IBinaryAuthorization|null} [desiredBinaryAuthorization] ClusterUpdate desiredBinaryAuthorization + * @property {string|null} [desiredLoggingService] ClusterUpdate desiredLoggingService + * @property {google.container.v1beta1.IResourceUsageExportConfig|null} [desiredResourceUsageExportConfig] ClusterUpdate desiredResourceUsageExportConfig + * @property {google.container.v1beta1.IVerticalPodAutoscaling|null} [desiredVerticalPodAutoscaling] ClusterUpdate desiredVerticalPodAutoscaling + * @property {google.container.v1beta1.IPrivateClusterConfig|null} [desiredPrivateClusterConfig] ClusterUpdate desiredPrivateClusterConfig + * @property {google.container.v1beta1.IIntraNodeVisibilityConfig|null} [desiredIntraNodeVisibilityConfig] ClusterUpdate desiredIntraNodeVisibilityConfig + * @property {google.container.v1beta1.IDefaultSnatStatus|null} [desiredDefaultSnatStatus] ClusterUpdate desiredDefaultSnatStatus + * @property {google.container.v1beta1.IClusterTelemetry|null} [desiredClusterTelemetry] ClusterUpdate desiredClusterTelemetry + * @property {google.container.v1beta1.IReleaseChannel|null} [desiredReleaseChannel] ClusterUpdate desiredReleaseChannel + * @property {google.container.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] ClusterUpdate privateClusterConfig + * @property {google.container.v1beta1.ITpuConfig|null} [desiredTpuConfig] ClusterUpdate desiredTpuConfig + * @property {google.container.v1beta1.IILBSubsettingConfig|null} [desiredL4ilbSubsettingConfig] ClusterUpdate desiredL4ilbSubsettingConfig + * @property {google.container.v1beta1.DatapathProvider|null} [desiredDatapathProvider] ClusterUpdate desiredDatapathProvider + * @property {google.container.v1beta1.PrivateIPv6GoogleAccess|null} [desiredPrivateIpv6GoogleAccess] ClusterUpdate desiredPrivateIpv6GoogleAccess + * @property {google.container.v1beta1.INotificationConfig|null} [desiredNotificationConfig] ClusterUpdate desiredNotificationConfig + * @property {string|null} [desiredMasterVersion] ClusterUpdate desiredMasterVersion + * @property {google.container.v1beta1.IGcfsConfig|null} [desiredGcfsConfig] ClusterUpdate desiredGcfsConfig + * @property {google.container.v1beta1.IDatabaseEncryption|null} [desiredDatabaseEncryption] ClusterUpdate desiredDatabaseEncryption + * @property {google.container.v1beta1.IWorkloadIdentityConfig|null} [desiredWorkloadIdentityConfig] ClusterUpdate desiredWorkloadIdentityConfig + * @property {google.container.v1beta1.IWorkloadCertificates|null} [desiredWorkloadCertificates] ClusterUpdate desiredWorkloadCertificates + * @property {google.container.v1beta1.IMeshCertificates|null} [desiredMeshCertificates] ClusterUpdate desiredMeshCertificates + * @property {google.container.v1beta1.IWorkloadALTSConfig|null} [desiredWorkloadAltsConfig] ClusterUpdate desiredWorkloadAltsConfig + * @property {google.container.v1beta1.IShieldedNodes|null} [desiredShieldedNodes] ClusterUpdate desiredShieldedNodes + * @property {google.container.v1beta1.ICostManagementConfig|null} [desiredCostManagementConfig] ClusterUpdate desiredCostManagementConfig + * @property {google.container.v1beta1.IMaster|null} [desiredMaster] ClusterUpdate desiredMaster + * @property {google.container.v1beta1.IDNSConfig|null} [desiredDnsConfig] ClusterUpdate desiredDnsConfig + * @property {google.container.v1beta1.IServiceExternalIPsConfig|null} [desiredServiceExternalIpsConfig] ClusterUpdate desiredServiceExternalIpsConfig + * @property {google.container.v1beta1.IAuthenticatorGroupsConfig|null} [desiredAuthenticatorGroupsConfig] ClusterUpdate desiredAuthenticatorGroupsConfig + * @property {google.container.v1beta1.ILoggingConfig|null} [desiredLoggingConfig] ClusterUpdate desiredLoggingConfig + * @property {google.container.v1beta1.IMonitoringConfig|null} [desiredMonitoringConfig] ClusterUpdate desiredMonitoringConfig + * @property {google.container.v1beta1.IIdentityServiceConfig|null} [desiredIdentityServiceConfig] ClusterUpdate desiredIdentityServiceConfig + * @property {boolean|null} [desiredEnablePrivateEndpoint] ClusterUpdate desiredEnablePrivateEndpoint + * @property {google.container.v1beta1.INetworkTags|null} [desiredNodePoolAutoConfigNetworkTags] ClusterUpdate desiredNodePoolAutoConfigNetworkTags + * @property {google.container.v1beta1.IProtectConfig|null} [desiredProtectConfig] ClusterUpdate desiredProtectConfig + * @property {google.container.v1beta1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig + * @property {string|null} [etag] ClusterUpdate etag + * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig + * @property {google.container.v1beta1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet + * @property {google.container.v1beta1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType + * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig + * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig + * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] ClusterUpdate enableK8sBetaApis + * @property {google.container.v1beta1.ISecurityPostureConfig|null} [desiredSecurityPostureConfig] ClusterUpdate desiredSecurityPostureConfig + * @property {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [desiredNetworkPerformanceConfig] ClusterUpdate desiredNetworkPerformanceConfig + * @property {boolean|null} [desiredEnableFqdnNetworkPolicy] ClusterUpdate desiredEnableFqdnNetworkPolicy + * @property {google.container.v1beta1.IWorkloadPolicyConfig|null} [desiredAutopilotWorkloadPolicyConfig] ClusterUpdate desiredAutopilotWorkloadPolicyConfig + * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [desiredK8sBetaApis] ClusterUpdate desiredK8sBetaApis + * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [desiredHostMaintenancePolicy] ClusterUpdate desiredHostMaintenancePolicy + * @property {google.container.v1beta1.IContainerdConfig|null} [desiredContainerdConfig] ClusterUpdate desiredContainerdConfig + * @property {boolean|null} [desiredEnableMultiNetworking] ClusterUpdate desiredEnableMultiNetworking + * @property {google.container.v1beta1.IResourceManagerTags|null} [desiredNodePoolAutoConfigResourceManagerTags] ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags + * @property {google.container.v1beta1.InTransitEncryptionConfig|null} [desiredInTransitEncryptionConfig] ClusterUpdate desiredInTransitEncryptionConfig + * @property {boolean|null} [desiredEnableCiliumClusterwideNetworkPolicy] ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy + * @property {google.container.v1beta1.ISecretManagerConfig|null} [desiredSecretManagerConfig] ClusterUpdate desiredSecretManagerConfig + * @property {google.container.v1beta1.INodeKubeletConfig|null} [desiredNodeKubeletConfig] ClusterUpdate desiredNodeKubeletConfig + * @property {google.container.v1beta1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig + */ + + /** + * Constructs a new ClusterUpdate. + * @memberof google.container.v1beta1 + * @classdesc Represents a ClusterUpdate. + * @implements IClusterUpdate + * @constructor + * @param {google.container.v1beta1.IClusterUpdate=} [properties] Properties to set + */ + function ClusterUpdate(properties) { + this.desiredLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterUpdate desiredNodeVersion. + * @member {string} desiredNodeVersion + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodeVersion = ""; + + /** + * ClusterUpdate desiredMonitoringService. + * @member {string} desiredMonitoringService + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMonitoringService = ""; + + /** + * ClusterUpdate desiredAddonsConfig. + * @member {google.container.v1beta1.IAddonsConfig|null|undefined} desiredAddonsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAddonsConfig = null; + + /** + * ClusterUpdate desiredNodePoolId. + * @member {string} desiredNodePoolId + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolId = ""; + + /** + * ClusterUpdate desiredImageType. + * @member {string} desiredImageType + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredImageType = ""; + + /** + * ClusterUpdate desiredNodePoolAutoscaling. + * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} desiredNodePoolAutoscaling + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoscaling = null; + + /** + * ClusterUpdate desiredLocations. + * @member {Array.} desiredLocations + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLocations = $util.emptyArray; + + /** + * ClusterUpdate desiredMasterAuthorizedNetworksConfig. + * @member {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} desiredMasterAuthorizedNetworksConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMasterAuthorizedNetworksConfig = null; + + /** + * ClusterUpdate desiredPodSecurityPolicyConfig. + * @member {google.container.v1beta1.IPodSecurityPolicyConfig|null|undefined} desiredPodSecurityPolicyConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredPodSecurityPolicyConfig = null; + + /** + * ClusterUpdate desiredClusterAutoscaling. + * @member {google.container.v1beta1.IClusterAutoscaling|null|undefined} desiredClusterAutoscaling + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredClusterAutoscaling = null; + + /** + * ClusterUpdate desiredBinaryAuthorization. + * @member {google.container.v1beta1.IBinaryAuthorization|null|undefined} desiredBinaryAuthorization + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredBinaryAuthorization = null; + + /** + * ClusterUpdate desiredLoggingService. + * @member {string} desiredLoggingService + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLoggingService = ""; + + /** + * ClusterUpdate desiredResourceUsageExportConfig. + * @member {google.container.v1beta1.IResourceUsageExportConfig|null|undefined} desiredResourceUsageExportConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredResourceUsageExportConfig = null; + + /** + * ClusterUpdate desiredVerticalPodAutoscaling. + * @member {google.container.v1beta1.IVerticalPodAutoscaling|null|undefined} desiredVerticalPodAutoscaling + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredVerticalPodAutoscaling = null; + + /** + * ClusterUpdate desiredPrivateClusterConfig. + * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} desiredPrivateClusterConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredPrivateClusterConfig = null; + + /** + * ClusterUpdate desiredIntraNodeVisibilityConfig. + * @member {google.container.v1beta1.IIntraNodeVisibilityConfig|null|undefined} desiredIntraNodeVisibilityConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredIntraNodeVisibilityConfig = null; + + /** + * ClusterUpdate desiredDefaultSnatStatus. + * @member {google.container.v1beta1.IDefaultSnatStatus|null|undefined} desiredDefaultSnatStatus + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDefaultSnatStatus = null; + + /** + * ClusterUpdate desiredClusterTelemetry. + * @member {google.container.v1beta1.IClusterTelemetry|null|undefined} desiredClusterTelemetry + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredClusterTelemetry = null; + + /** + * ClusterUpdate desiredReleaseChannel. + * @member {google.container.v1beta1.IReleaseChannel|null|undefined} desiredReleaseChannel + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredReleaseChannel = null; + + /** + * ClusterUpdate privateClusterConfig. + * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.privateClusterConfig = null; + + /** + * ClusterUpdate desiredTpuConfig. + * @member {google.container.v1beta1.ITpuConfig|null|undefined} desiredTpuConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredTpuConfig = null; + + /** + * ClusterUpdate desiredL4ilbSubsettingConfig. + * @member {google.container.v1beta1.IILBSubsettingConfig|null|undefined} desiredL4ilbSubsettingConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredL4ilbSubsettingConfig = null; + + /** + * ClusterUpdate desiredDatapathProvider. + * @member {google.container.v1beta1.DatapathProvider} desiredDatapathProvider + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDatapathProvider = 0; + + /** + * ClusterUpdate desiredPrivateIpv6GoogleAccess. + * @member {google.container.v1beta1.PrivateIPv6GoogleAccess} desiredPrivateIpv6GoogleAccess + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredPrivateIpv6GoogleAccess = 0; + + /** + * ClusterUpdate desiredNotificationConfig. + * @member {google.container.v1beta1.INotificationConfig|null|undefined} desiredNotificationConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNotificationConfig = null; + + /** + * ClusterUpdate desiredMasterVersion. + * @member {string} desiredMasterVersion + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMasterVersion = ""; + + /** + * ClusterUpdate desiredGcfsConfig. + * @member {google.container.v1beta1.IGcfsConfig|null|undefined} desiredGcfsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredGcfsConfig = null; + + /** + * ClusterUpdate desiredDatabaseEncryption. + * @member {google.container.v1beta1.IDatabaseEncryption|null|undefined} desiredDatabaseEncryption + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDatabaseEncryption = null; + + /** + * ClusterUpdate desiredWorkloadIdentityConfig. + * @member {google.container.v1beta1.IWorkloadIdentityConfig|null|undefined} desiredWorkloadIdentityConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredWorkloadIdentityConfig = null; + + /** + * ClusterUpdate desiredWorkloadCertificates. + * @member {google.container.v1beta1.IWorkloadCertificates|null|undefined} desiredWorkloadCertificates + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredWorkloadCertificates = null; + + /** + * ClusterUpdate desiredMeshCertificates. + * @member {google.container.v1beta1.IMeshCertificates|null|undefined} desiredMeshCertificates + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMeshCertificates = null; + + /** + * ClusterUpdate desiredWorkloadAltsConfig. + * @member {google.container.v1beta1.IWorkloadALTSConfig|null|undefined} desiredWorkloadAltsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredWorkloadAltsConfig = null; + + /** + * ClusterUpdate desiredShieldedNodes. + * @member {google.container.v1beta1.IShieldedNodes|null|undefined} desiredShieldedNodes + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredShieldedNodes = null; + + /** + * ClusterUpdate desiredCostManagementConfig. + * @member {google.container.v1beta1.ICostManagementConfig|null|undefined} desiredCostManagementConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredCostManagementConfig = null; + + /** + * ClusterUpdate desiredMaster. + * @member {google.container.v1beta1.IMaster|null|undefined} desiredMaster + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMaster = null; + + /** + * ClusterUpdate desiredDnsConfig. + * @member {google.container.v1beta1.IDNSConfig|null|undefined} desiredDnsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDnsConfig = null; + + /** + * ClusterUpdate desiredServiceExternalIpsConfig. + * @member {google.container.v1beta1.IServiceExternalIPsConfig|null|undefined} desiredServiceExternalIpsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredServiceExternalIpsConfig = null; + + /** + * ClusterUpdate desiredAuthenticatorGroupsConfig. + * @member {google.container.v1beta1.IAuthenticatorGroupsConfig|null|undefined} desiredAuthenticatorGroupsConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAuthenticatorGroupsConfig = null; + + /** + * ClusterUpdate desiredLoggingConfig. + * @member {google.container.v1beta1.ILoggingConfig|null|undefined} desiredLoggingConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredLoggingConfig = null; + + /** + * ClusterUpdate desiredMonitoringConfig. + * @member {google.container.v1beta1.IMonitoringConfig|null|undefined} desiredMonitoringConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredMonitoringConfig = null; + + /** + * ClusterUpdate desiredIdentityServiceConfig. + * @member {google.container.v1beta1.IIdentityServiceConfig|null|undefined} desiredIdentityServiceConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredIdentityServiceConfig = null; + + /** + * ClusterUpdate desiredEnablePrivateEndpoint. + * @member {boolean|null|undefined} desiredEnablePrivateEndpoint + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnablePrivateEndpoint = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigNetworkTags. + * @member {google.container.v1beta1.INetworkTags|null|undefined} desiredNodePoolAutoConfigNetworkTags + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigNetworkTags = null; + + /** + * ClusterUpdate desiredProtectConfig. + * @member {google.container.v1beta1.IProtectConfig|null|undefined} desiredProtectConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredProtectConfig = null; + + /** + * ClusterUpdate desiredGatewayApiConfig. + * @member {google.container.v1beta1.IGatewayAPIConfig|null|undefined} desiredGatewayApiConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredGatewayApiConfig = null; + + /** + * ClusterUpdate etag. + * @member {string} etag + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.etag = ""; + + /** + * ClusterUpdate desiredNodePoolLoggingConfig. + * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} desiredNodePoolLoggingConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; + + /** + * ClusterUpdate desiredFleet. + * @member {google.container.v1beta1.IFleet|null|undefined} desiredFleet + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredFleet = null; + + /** + * ClusterUpdate desiredStackType. + * @member {google.container.v1beta1.StackType} desiredStackType + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredStackType = 0; + + /** + * ClusterUpdate additionalPodRangesConfig. + * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.additionalPodRangesConfig = null; + + /** + * ClusterUpdate removedAdditionalPodRangesConfig. + * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} removedAdditionalPodRangesConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.removedAdditionalPodRangesConfig = null; + + /** + * ClusterUpdate enableK8sBetaApis. + * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.enableK8sBetaApis = null; + + /** + * ClusterUpdate desiredSecurityPostureConfig. + * @member {google.container.v1beta1.ISecurityPostureConfig|null|undefined} desiredSecurityPostureConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredSecurityPostureConfig = null; + + /** + * ClusterUpdate desiredNetworkPerformanceConfig. + * @member {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} desiredNetworkPerformanceConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNetworkPerformanceConfig = null; + + /** + * ClusterUpdate desiredEnableFqdnNetworkPolicy. + * @member {boolean|null|undefined} desiredEnableFqdnNetworkPolicy + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableFqdnNetworkPolicy = null; + + /** + * ClusterUpdate desiredAutopilotWorkloadPolicyConfig. + * @member {google.container.v1beta1.IWorkloadPolicyConfig|null|undefined} desiredAutopilotWorkloadPolicyConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAutopilotWorkloadPolicyConfig = null; + + /** + * ClusterUpdate desiredK8sBetaApis. + * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} desiredK8sBetaApis + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredK8sBetaApis = null; + + /** + * ClusterUpdate desiredHostMaintenancePolicy. + * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} desiredHostMaintenancePolicy + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredHostMaintenancePolicy = null; + + /** + * ClusterUpdate desiredContainerdConfig. + * @member {google.container.v1beta1.IContainerdConfig|null|undefined} desiredContainerdConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredContainerdConfig = null; + + /** + * ClusterUpdate desiredEnableMultiNetworking. + * @member {boolean|null|undefined} desiredEnableMultiNetworking + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableMultiNetworking = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. + * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} desiredNodePoolAutoConfigResourceManagerTags + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigResourceManagerTags = null; + + /** + * ClusterUpdate desiredInTransitEncryptionConfig. + * @member {google.container.v1beta1.InTransitEncryptionConfig|null|undefined} desiredInTransitEncryptionConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredInTransitEncryptionConfig = null; + + /** + * ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. + * @member {boolean|null|undefined} desiredEnableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnableCiliumClusterwideNetworkPolicy = null; + + /** + * ClusterUpdate desiredSecretManagerConfig. + * @member {google.container.v1beta1.ISecretManagerConfig|null|undefined} desiredSecretManagerConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredSecretManagerConfig = null; + + /** + * ClusterUpdate desiredNodeKubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} desiredNodeKubeletConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodeKubeletConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} desiredNodePoolAutoConfigKubeletConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigKubeletConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ClusterUpdate _desiredEnablePrivateEndpoint. + * @member {"desiredEnablePrivateEndpoint"|undefined} _desiredEnablePrivateEndpoint + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnablePrivateEndpoint", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnablePrivateEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredProtectConfig. + * @member {"desiredProtectConfig"|undefined} _desiredProtectConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredProtectConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredProtectConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableFqdnNetworkPolicy. + * @member {"desiredEnableFqdnNetworkPolicy"|undefined} _desiredEnableFqdnNetworkPolicy + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableFqdnNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableFqdnNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableMultiNetworking. + * @member {"desiredEnableMultiNetworking"|undefined} _desiredEnableMultiNetworking + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableMultiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableMultiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredInTransitEncryptionConfig. + * @member {"desiredInTransitEncryptionConfig"|undefined} _desiredInTransitEncryptionConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredInTransitEncryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredInTransitEncryptionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. + * @member {"desiredEnableCiliumClusterwideNetworkPolicy"|undefined} _desiredEnableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableCiliumClusterwideNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["desiredEnableCiliumClusterwideNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredSecretManagerConfig. + * @member {"desiredSecretManagerConfig"|undefined} _desiredSecretManagerConfig + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredSecretManagerConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredSecretManagerConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClusterUpdate instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {google.container.v1beta1.IClusterUpdate=} [properties] Properties to set + * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate instance + */ + ClusterUpdate.create = function create(properties) { + return new ClusterUpdate(properties); + }; + + /** + * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {google.container.v1beta1.IClusterUpdate} message ClusterUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredNodeVersion != null && Object.hasOwnProperty.call(message, "desiredNodeVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.desiredNodeVersion); + if (message.desiredMonitoringService != null && Object.hasOwnProperty.call(message, "desiredMonitoringService")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.desiredMonitoringService); + if (message.desiredAddonsConfig != null && Object.hasOwnProperty.call(message, "desiredAddonsConfig")) + $root.google.container.v1beta1.AddonsConfig.encode(message.desiredAddonsConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.desiredNodePoolId != null && Object.hasOwnProperty.call(message, "desiredNodePoolId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.desiredNodePoolId); + if (message.desiredImageType != null && Object.hasOwnProperty.call(message, "desiredImageType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.desiredImageType); + if (message.desiredNodePoolAutoscaling != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoscaling")) + $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.desiredNodePoolAutoscaling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.desiredLocations != null && message.desiredLocations.length) + for (var i = 0; i < message.desiredLocations.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.desiredLocations[i]); + if (message.desiredMasterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "desiredMasterAuthorizedNetworksConfig")) + $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.encode(message.desiredMasterAuthorizedNetworksConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.desiredPodSecurityPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredPodSecurityPolicyConfig")) + $root.google.container.v1beta1.PodSecurityPolicyConfig.encode(message.desiredPodSecurityPolicyConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.desiredClusterAutoscaling != null && Object.hasOwnProperty.call(message, "desiredClusterAutoscaling")) + $root.google.container.v1beta1.ClusterAutoscaling.encode(message.desiredClusterAutoscaling, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.desiredBinaryAuthorization != null && Object.hasOwnProperty.call(message, "desiredBinaryAuthorization")) + $root.google.container.v1beta1.BinaryAuthorization.encode(message.desiredBinaryAuthorization, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.desiredLoggingService != null && Object.hasOwnProperty.call(message, "desiredLoggingService")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.desiredLoggingService); + if (message.desiredResourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "desiredResourceUsageExportConfig")) + $root.google.container.v1beta1.ResourceUsageExportConfig.encode(message.desiredResourceUsageExportConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.desiredVerticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "desiredVerticalPodAutoscaling")) + $root.google.container.v1beta1.VerticalPodAutoscaling.encode(message.desiredVerticalPodAutoscaling, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.desiredPrivateClusterConfig != null && Object.hasOwnProperty.call(message, "desiredPrivateClusterConfig")) + $root.google.container.v1beta1.PrivateClusterConfig.encode(message.desiredPrivateClusterConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.desiredIntraNodeVisibilityConfig != null && Object.hasOwnProperty.call(message, "desiredIntraNodeVisibilityConfig")) + $root.google.container.v1beta1.IntraNodeVisibilityConfig.encode(message.desiredIntraNodeVisibilityConfig, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.desiredDefaultSnatStatus != null && Object.hasOwnProperty.call(message, "desiredDefaultSnatStatus")) + $root.google.container.v1beta1.DefaultSnatStatus.encode(message.desiredDefaultSnatStatus, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.desiredClusterTelemetry != null && Object.hasOwnProperty.call(message, "desiredClusterTelemetry")) + $root.google.container.v1beta1.ClusterTelemetry.encode(message.desiredClusterTelemetry, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.desiredReleaseChannel != null && Object.hasOwnProperty.call(message, "desiredReleaseChannel")) + $root.google.container.v1beta1.ReleaseChannel.encode(message.desiredReleaseChannel, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.container.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.desiredTpuConfig != null && Object.hasOwnProperty.call(message, "desiredTpuConfig")) + $root.google.container.v1beta1.TpuConfig.encode(message.desiredTpuConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.desiredL4ilbSubsettingConfig != null && Object.hasOwnProperty.call(message, "desiredL4ilbSubsettingConfig")) + $root.google.container.v1beta1.ILBSubsettingConfig.encode(message.desiredL4ilbSubsettingConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.desiredDatabaseEncryption != null && Object.hasOwnProperty.call(message, "desiredDatabaseEncryption")) + $root.google.container.v1beta1.DatabaseEncryption.encode(message.desiredDatabaseEncryption, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.desiredWorkloadIdentityConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadIdentityConfig")) + $root.google.container.v1beta1.WorkloadIdentityConfig.encode(message.desiredWorkloadIdentityConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.desiredShieldedNodes != null && Object.hasOwnProperty.call(message, "desiredShieldedNodes")) + $root.google.container.v1beta1.ShieldedNodes.encode(message.desiredShieldedNodes, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.desiredCostManagementConfig != null && Object.hasOwnProperty.call(message, "desiredCostManagementConfig")) + $root.google.container.v1beta1.CostManagementConfig.encode(message.desiredCostManagementConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.desiredDatapathProvider != null && Object.hasOwnProperty.call(message, "desiredDatapathProvider")) + writer.uint32(/* id 50, wireType 0 =*/400).int32(message.desiredDatapathProvider); + if (message.desiredPrivateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "desiredPrivateIpv6GoogleAccess")) + writer.uint32(/* id 51, wireType 0 =*/408).int32(message.desiredPrivateIpv6GoogleAccess); + if (message.desiredMaster != null && Object.hasOwnProperty.call(message, "desiredMaster")) + $root.google.container.v1beta1.Master.encode(message.desiredMaster, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.desiredDnsConfig != null && Object.hasOwnProperty.call(message, "desiredDnsConfig")) + $root.google.container.v1beta1.DNSConfig.encode(message.desiredDnsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.desiredNotificationConfig != null && Object.hasOwnProperty.call(message, "desiredNotificationConfig")) + $root.google.container.v1beta1.NotificationConfig.encode(message.desiredNotificationConfig, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.desiredServiceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "desiredServiceExternalIpsConfig")) + $root.google.container.v1beta1.ServiceExternalIPsConfig.encode(message.desiredServiceExternalIpsConfig, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); + if (message.desiredWorkloadCertificates != null && Object.hasOwnProperty.call(message, "desiredWorkloadCertificates")) + $root.google.container.v1beta1.WorkloadCertificates.encode(message.desiredWorkloadCertificates, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim(); + if (message.desiredWorkloadAltsConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadAltsConfig")) + $root.google.container.v1beta1.WorkloadALTSConfig.encode(message.desiredWorkloadAltsConfig, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); + if (message.desiredAuthenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "desiredAuthenticatorGroupsConfig")) + $root.google.container.v1beta1.AuthenticatorGroupsConfig.encode(message.desiredAuthenticatorGroupsConfig, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); + if (message.desiredLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredLoggingConfig")) + $root.google.container.v1beta1.LoggingConfig.encode(message.desiredLoggingConfig, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); + if (message.desiredMonitoringConfig != null && Object.hasOwnProperty.call(message, "desiredMonitoringConfig")) + $root.google.container.v1beta1.MonitoringConfig.encode(message.desiredMonitoringConfig, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); + if (message.desiredIdentityServiceConfig != null && Object.hasOwnProperty.call(message, "desiredIdentityServiceConfig")) + $root.google.container.v1beta1.IdentityServiceConfig.encode(message.desiredIdentityServiceConfig, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); + if (message.desiredMeshCertificates != null && Object.hasOwnProperty.call(message, "desiredMeshCertificates")) + $root.google.container.v1beta1.MeshCertificates.encode(message.desiredMeshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.desiredEnablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "desiredEnablePrivateEndpoint")) + writer.uint32(/* id 71, wireType 0 =*/568).bool(message.desiredEnablePrivateEndpoint); + if (message.desiredMasterVersion != null && Object.hasOwnProperty.call(message, "desiredMasterVersion")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.desiredMasterVersion); + if (message.desiredGcfsConfig != null && Object.hasOwnProperty.call(message, "desiredGcfsConfig")) + $root.google.container.v1beta1.GcfsConfig.encode(message.desiredGcfsConfig, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigNetworkTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigNetworkTags")) + $root.google.container.v1beta1.NetworkTags.encode(message.desiredNodePoolAutoConfigNetworkTags, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); + if (message.desiredProtectConfig != null && Object.hasOwnProperty.call(message, "desiredProtectConfig")) + $root.google.container.v1beta1.ProtectConfig.encode(message.desiredProtectConfig, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); + if (message.desiredGatewayApiConfig != null && Object.hasOwnProperty.call(message, "desiredGatewayApiConfig")) + $root.google.container.v1beta1.GatewayAPIConfig.encode(message.desiredGatewayApiConfig, writer.uint32(/* id 114, wireType 2 =*/914).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); + if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) + $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); + if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) + $root.google.container.v1beta1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); + if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) + writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); + if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) + $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); + if (message.removedAdditionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "removedAdditionalPodRangesConfig")) + $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.removedAdditionalPodRangesConfig, writer.uint32(/* id 121, wireType 2 =*/970).fork()).ldelim(); + if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) + $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 122, wireType 2 =*/978).fork()).ldelim(); + if (message.desiredSecurityPostureConfig != null && Object.hasOwnProperty.call(message, "desiredSecurityPostureConfig")) + $root.google.container.v1beta1.SecurityPostureConfig.encode(message.desiredSecurityPostureConfig, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); + if (message.desiredNetworkPerformanceConfig != null && Object.hasOwnProperty.call(message, "desiredNetworkPerformanceConfig")) + $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.desiredNetworkPerformanceConfig, writer.uint32(/* id 125, wireType 2 =*/1002).fork()).ldelim(); + if (message.desiredEnableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableFqdnNetworkPolicy")) + writer.uint32(/* id 126, wireType 0 =*/1008).bool(message.desiredEnableFqdnNetworkPolicy); + if (message.desiredAutopilotWorkloadPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredAutopilotWorkloadPolicyConfig")) + $root.google.container.v1beta1.WorkloadPolicyConfig.encode(message.desiredAutopilotWorkloadPolicyConfig, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); + if (message.desiredK8sBetaApis != null && Object.hasOwnProperty.call(message, "desiredK8sBetaApis")) + $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.desiredK8sBetaApis, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); + if (message.desiredHostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "desiredHostMaintenancePolicy")) + $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.desiredHostMaintenancePolicy, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); + if (message.desiredContainerdConfig != null && Object.hasOwnProperty.call(message, "desiredContainerdConfig")) + $root.google.container.v1beta1.ContainerdConfig.encode(message.desiredContainerdConfig, writer.uint32(/* id 134, wireType 2 =*/1074).fork()).ldelim(); + if (message.desiredEnableMultiNetworking != null && Object.hasOwnProperty.call(message, "desiredEnableMultiNetworking")) + writer.uint32(/* id 135, wireType 0 =*/1080).bool(message.desiredEnableMultiNetworking); + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigResourceManagerTags")) + $root.google.container.v1beta1.ResourceManagerTags.encode(message.desiredNodePoolAutoConfigResourceManagerTags, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); + if (message.desiredInTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "desiredInTransitEncryptionConfig")) + writer.uint32(/* id 137, wireType 0 =*/1096).int32(message.desiredInTransitEncryptionConfig); + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableCiliumClusterwideNetworkPolicy")) + writer.uint32(/* id 138, wireType 0 =*/1104).bool(message.desiredEnableCiliumClusterwideNetworkPolicy); + if (message.desiredSecretManagerConfig != null && Object.hasOwnProperty.call(message, "desiredSecretManagerConfig")) + $root.google.container.v1beta1.SecretManagerConfig.encode(message.desiredSecretManagerConfig, writer.uint32(/* id 139, wireType 2 =*/1114).fork()).ldelim(); + if (message.desiredNodeKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodeKubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.desiredNodeKubeletConfig, writer.uint32(/* id 141, wireType 2 =*/1130).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigKubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.desiredNodePoolAutoConfigKubeletConfig, writer.uint32(/* id 142, wireType 2 =*/1138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {google.container.v1beta1.IClusterUpdate} message ClusterUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.desiredNodeVersion = reader.string(); + break; + } + case 5: { + message.desiredMonitoringService = reader.string(); + break; + } + case 6: { + message.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.desiredNodePoolId = reader.string(); + break; + } + case 8: { + message.desiredImageType = reader.string(); + break; + } + case 9: { + message.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.desiredLocations && message.desiredLocations.length)) + message.desiredLocations = []; + message.desiredLocations.push(reader.string()); + break; + } + case 12: { + message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 14: { + message.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.decode(reader, reader.uint32()); + break; + } + case 16: { + message.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.decode(reader, reader.uint32()); + break; + } + case 19: { + message.desiredLoggingService = reader.string(); + break; + } + case 21: { + message.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.decode(reader, reader.uint32()); + break; + } + case 25: { + message.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 26: { + message.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.decode(reader, reader.uint32()); + break; + } + case 28: { + message.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.decode(reader, reader.uint32()); + break; + } + case 30: { + message.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.decode(reader, reader.uint32()); + break; + } + case 31: { + message.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 37: { + message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 38: { + message.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.decode(reader, reader.uint32()); + break; + } + case 39: { + message.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.decode(reader, reader.uint32()); + break; + } + case 50: { + message.desiredDatapathProvider = reader.int32(); + break; + } + case 51: { + message.desiredPrivateIpv6GoogleAccess = reader.int32(); + break; + } + case 55: { + message.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.desiredMasterVersion = reader.string(); + break; + } + case 109: { + message.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 46: { + message.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.decode(reader, reader.uint32()); + break; + } + case 47: { + message.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 61: { + message.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.decode(reader, reader.uint32()); + break; + } + case 67: { + message.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.decode(reader, reader.uint32()); + break; + } + case 62: { + message.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.decode(reader, reader.uint32()); + break; + } + case 48: { + message.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.decode(reader, reader.uint32()); + break; + } + case 49: { + message.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.decode(reader, reader.uint32()); + break; + } + case 52: { + message.desiredMaster = $root.google.container.v1beta1.Master.decode(reader, reader.uint32()); + break; + } + case 53: { + message.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.decode(reader, reader.uint32()); + break; + } + case 60: { + message.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); + break; + } + case 63: { + message.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); + break; + } + case 64: { + message.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 65: { + message.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } + case 66: { + message.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.decode(reader, reader.uint32()); + break; + } + case 71: { + message.desiredEnablePrivateEndpoint = reader.bool(); + break; + } + case 110: { + message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 112: { + message.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.decode(reader, reader.uint32()); + break; + } + case 114: { + message.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.decode(reader, reader.uint32()); + break; + } + case 115: { + message.etag = reader.string(); + break; + } + case 116: { + message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 117: { + message.desiredFleet = $root.google.container.v1beta1.Fleet.decode(reader, reader.uint32()); + break; + } + case 119: { + message.desiredStackType = reader.int32(); + break; + } + case 120: { + message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 121: { + message.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); + break; + } + case 122: { + message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 124: { + message.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.decode(reader, reader.uint32()); + break; + } + case 125: { + message.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 126: { + message.desiredEnableFqdnNetworkPolicy = reader.bool(); + break; + } + case 128: { + message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 131: { + message.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); + break; + } + case 132: { + message.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 134: { + message.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 135: { + message.desiredEnableMultiNetworking = reader.bool(); + break; + } + case 136: { + message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 137: { + message.desiredInTransitEncryptionConfig = reader.int32(); + break; + } + case 138: { + message.desiredEnableCiliumClusterwideNetworkPolicy = reader.bool(); + break; + } + case 139: { + message.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 141: { + message.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 142: { + message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterUpdate message. + * @function verify + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) + if (!$util.isString(message.desiredNodeVersion)) + return "desiredNodeVersion: string expected"; + if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) + if (!$util.isString(message.desiredMonitoringService)) + return "desiredMonitoringService: string expected"; + if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) { + var error = $root.google.container.v1beta1.AddonsConfig.verify(message.desiredAddonsConfig); + if (error) + return "desiredAddonsConfig." + error; + } + if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) + if (!$util.isString(message.desiredNodePoolId)) + return "desiredNodePoolId: string expected"; + if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) + if (!$util.isString(message.desiredImageType)) + return "desiredImageType: string expected"; + if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) { + var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.desiredNodePoolAutoscaling); + if (error) + return "desiredNodePoolAutoscaling." + error; + } + if (message.desiredLocations != null && message.hasOwnProperty("desiredLocations")) { + if (!Array.isArray(message.desiredLocations)) + return "desiredLocations: array expected"; + for (var i = 0; i < message.desiredLocations.length; ++i) + if (!$util.isString(message.desiredLocations[i])) + return "desiredLocations: string[] expected"; + } + if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) { + var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.verify(message.desiredMasterAuthorizedNetworksConfig); + if (error) + return "desiredMasterAuthorizedNetworksConfig." + error; + } + if (message.desiredPodSecurityPolicyConfig != null && message.hasOwnProperty("desiredPodSecurityPolicyConfig")) { + var error = $root.google.container.v1beta1.PodSecurityPolicyConfig.verify(message.desiredPodSecurityPolicyConfig); + if (error) + return "desiredPodSecurityPolicyConfig." + error; + } + if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) { + var error = $root.google.container.v1beta1.ClusterAutoscaling.verify(message.desiredClusterAutoscaling); + if (error) + return "desiredClusterAutoscaling." + error; + } + if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) { + var error = $root.google.container.v1beta1.BinaryAuthorization.verify(message.desiredBinaryAuthorization); + if (error) + return "desiredBinaryAuthorization." + error; + } + if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) + if (!$util.isString(message.desiredLoggingService)) + return "desiredLoggingService: string expected"; + if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) { + var error = $root.google.container.v1beta1.ResourceUsageExportConfig.verify(message.desiredResourceUsageExportConfig); + if (error) + return "desiredResourceUsageExportConfig." + error; + } + if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) { + var error = $root.google.container.v1beta1.VerticalPodAutoscaling.verify(message.desiredVerticalPodAutoscaling); + if (error) + return "desiredVerticalPodAutoscaling." + error; + } + if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) { + var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.desiredPrivateClusterConfig); + if (error) + return "desiredPrivateClusterConfig." + error; + } + if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) { + var error = $root.google.container.v1beta1.IntraNodeVisibilityConfig.verify(message.desiredIntraNodeVisibilityConfig); + if (error) + return "desiredIntraNodeVisibilityConfig." + error; + } + if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) { + var error = $root.google.container.v1beta1.DefaultSnatStatus.verify(message.desiredDefaultSnatStatus); + if (error) + return "desiredDefaultSnatStatus." + error; + } + if (message.desiredClusterTelemetry != null && message.hasOwnProperty("desiredClusterTelemetry")) { + var error = $root.google.container.v1beta1.ClusterTelemetry.verify(message.desiredClusterTelemetry); + if (error) + return "desiredClusterTelemetry." + error; + } + if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) { + var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.desiredReleaseChannel); + if (error) + return "desiredReleaseChannel." + error; + } + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.desiredTpuConfig != null && message.hasOwnProperty("desiredTpuConfig")) { + var error = $root.google.container.v1beta1.TpuConfig.verify(message.desiredTpuConfig); + if (error) + return "desiredTpuConfig." + error; + } + if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) { + var error = $root.google.container.v1beta1.ILBSubsettingConfig.verify(message.desiredL4ilbSubsettingConfig); + if (error) + return "desiredL4ilbSubsettingConfig." + error; + } + if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) + switch (message.desiredDatapathProvider) { + default: + return "desiredDatapathProvider: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) + switch (message.desiredPrivateIpv6GoogleAccess) { + default: + return "desiredPrivateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) { + var error = $root.google.container.v1beta1.NotificationConfig.verify(message.desiredNotificationConfig); + if (error) + return "desiredNotificationConfig." + error; + } + if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) + if (!$util.isString(message.desiredMasterVersion)) + return "desiredMasterVersion: string expected"; + if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) { + var error = $root.google.container.v1beta1.GcfsConfig.verify(message.desiredGcfsConfig); + if (error) + return "desiredGcfsConfig." + error; + } + if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) { + var error = $root.google.container.v1beta1.DatabaseEncryption.verify(message.desiredDatabaseEncryption); + if (error) + return "desiredDatabaseEncryption." + error; + } + if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) { + var error = $root.google.container.v1beta1.WorkloadIdentityConfig.verify(message.desiredWorkloadIdentityConfig); + if (error) + return "desiredWorkloadIdentityConfig." + error; + } + if (message.desiredWorkloadCertificates != null && message.hasOwnProperty("desiredWorkloadCertificates")) { + var error = $root.google.container.v1beta1.WorkloadCertificates.verify(message.desiredWorkloadCertificates); + if (error) + return "desiredWorkloadCertificates." + error; + } + if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) { + var error = $root.google.container.v1beta1.MeshCertificates.verify(message.desiredMeshCertificates); + if (error) + return "desiredMeshCertificates." + error; + } + if (message.desiredWorkloadAltsConfig != null && message.hasOwnProperty("desiredWorkloadAltsConfig")) { + var error = $root.google.container.v1beta1.WorkloadALTSConfig.verify(message.desiredWorkloadAltsConfig); + if (error) + return "desiredWorkloadAltsConfig." + error; + } + if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) { + var error = $root.google.container.v1beta1.ShieldedNodes.verify(message.desiredShieldedNodes); + if (error) + return "desiredShieldedNodes." + error; + } + if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) { + var error = $root.google.container.v1beta1.CostManagementConfig.verify(message.desiredCostManagementConfig); + if (error) + return "desiredCostManagementConfig." + error; + } + if (message.desiredMaster != null && message.hasOwnProperty("desiredMaster")) { + var error = $root.google.container.v1beta1.Master.verify(message.desiredMaster); + if (error) + return "desiredMaster." + error; + } + if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) { + var error = $root.google.container.v1beta1.DNSConfig.verify(message.desiredDnsConfig); + if (error) + return "desiredDnsConfig." + error; + } + if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) { + var error = $root.google.container.v1beta1.ServiceExternalIPsConfig.verify(message.desiredServiceExternalIpsConfig); + if (error) + return "desiredServiceExternalIpsConfig." + error; + } + if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) { + var error = $root.google.container.v1beta1.AuthenticatorGroupsConfig.verify(message.desiredAuthenticatorGroupsConfig); + if (error) + return "desiredAuthenticatorGroupsConfig." + error; + } + if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) { + var error = $root.google.container.v1beta1.LoggingConfig.verify(message.desiredLoggingConfig); + if (error) + return "desiredLoggingConfig." + error; + } + if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) { + var error = $root.google.container.v1beta1.MonitoringConfig.verify(message.desiredMonitoringConfig); + if (error) + return "desiredMonitoringConfig." + error; + } + if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) { + var error = $root.google.container.v1beta1.IdentityServiceConfig.verify(message.desiredIdentityServiceConfig); + if (error) + return "desiredIdentityServiceConfig." + error; + } + if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { + properties._desiredEnablePrivateEndpoint = 1; + if (typeof message.desiredEnablePrivateEndpoint !== "boolean") + return "desiredEnablePrivateEndpoint: boolean expected"; + } + if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) { + var error = $root.google.container.v1beta1.NetworkTags.verify(message.desiredNodePoolAutoConfigNetworkTags); + if (error) + return "desiredNodePoolAutoConfigNetworkTags." + error; + } + if (message.desiredProtectConfig != null && message.hasOwnProperty("desiredProtectConfig")) { + properties._desiredProtectConfig = 1; + { + var error = $root.google.container.v1beta1.ProtectConfig.verify(message.desiredProtectConfig); + if (error) + return "desiredProtectConfig." + error; + } + } + if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) { + var error = $root.google.container.v1beta1.GatewayAPIConfig.verify(message.desiredGatewayApiConfig); + if (error) + return "desiredGatewayApiConfig." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) { + var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.desiredNodePoolLoggingConfig); + if (error) + return "desiredNodePoolLoggingConfig." + error; + } + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { + var error = $root.google.container.v1beta1.Fleet.verify(message.desiredFleet); + if (error) + return "desiredFleet." + error; + } + if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) + switch (message.desiredStackType) { + default: + return "desiredStackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { + var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); + if (error) + return "additionalPodRangesConfig." + error; + } + if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) { + var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.removedAdditionalPodRangesConfig); + if (error) + return "removedAdditionalPodRangesConfig." + error; + } + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { + var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); + if (error) + return "enableK8sBetaApis." + error; + } + if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) { + var error = $root.google.container.v1beta1.SecurityPostureConfig.verify(message.desiredSecurityPostureConfig); + if (error) + return "desiredSecurityPostureConfig." + error; + } + if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) { + var error = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.desiredNetworkPerformanceConfig); + if (error) + return "desiredNetworkPerformanceConfig." + error; + } + if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { + properties._desiredEnableFqdnNetworkPolicy = 1; + if (typeof message.desiredEnableFqdnNetworkPolicy !== "boolean") + return "desiredEnableFqdnNetworkPolicy: boolean expected"; + } + if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) { + var error = $root.google.container.v1beta1.WorkloadPolicyConfig.verify(message.desiredAutopilotWorkloadPolicyConfig); + if (error) + return "desiredAutopilotWorkloadPolicyConfig." + error; + } + if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) { + var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.desiredK8sBetaApis); + if (error) + return "desiredK8sBetaApis." + error; + } + if (message.desiredHostMaintenancePolicy != null && message.hasOwnProperty("desiredHostMaintenancePolicy")) { + var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.desiredHostMaintenancePolicy); + if (error) + return "desiredHostMaintenancePolicy." + error; + } + if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) { + var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.desiredContainerdConfig); + if (error) + return "desiredContainerdConfig." + error; + } + if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { + properties._desiredEnableMultiNetworking = 1; + if (typeof message.desiredEnableMultiNetworking !== "boolean") + return "desiredEnableMultiNetworking: boolean expected"; + } + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) { + var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.desiredNodePoolAutoConfigResourceManagerTags); + if (error) + return "desiredNodePoolAutoConfigResourceManagerTags." + error; + } + if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { + properties._desiredInTransitEncryptionConfig = 1; + switch (message.desiredInTransitEncryptionConfig) { + default: + return "desiredInTransitEncryptionConfig: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { + properties._desiredEnableCiliumClusterwideNetworkPolicy = 1; + if (typeof message.desiredEnableCiliumClusterwideNetworkPolicy !== "boolean") + return "desiredEnableCiliumClusterwideNetworkPolicy: boolean expected"; + } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + properties._desiredSecretManagerConfig = 1; + { + var error = $root.google.container.v1beta1.SecretManagerConfig.verify(message.desiredSecretManagerConfig); + if (error) + return "desiredSecretManagerConfig." + error; + } + } + if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.desiredNodeKubeletConfig); + if (error) + return "desiredNodeKubeletConfig." + error; + } + if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.desiredNodePoolAutoConfigKubeletConfig); + if (error) + return "desiredNodePoolAutoConfigKubeletConfig." + error; + } + return null; + }; + + /** + * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate + */ + ClusterUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ClusterUpdate) + return object; + var message = new $root.google.container.v1beta1.ClusterUpdate(); + if (object.desiredNodeVersion != null) + message.desiredNodeVersion = String(object.desiredNodeVersion); + if (object.desiredMonitoringService != null) + message.desiredMonitoringService = String(object.desiredMonitoringService); + if (object.desiredAddonsConfig != null) { + if (typeof object.desiredAddonsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAddonsConfig: object expected"); + message.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.desiredAddonsConfig); + } + if (object.desiredNodePoolId != null) + message.desiredNodePoolId = String(object.desiredNodePoolId); + if (object.desiredImageType != null) + message.desiredImageType = String(object.desiredImageType); + if (object.desiredNodePoolAutoscaling != null) { + if (typeof object.desiredNodePoolAutoscaling !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoscaling: object expected"); + message.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.desiredNodePoolAutoscaling); + } + if (object.desiredLocations) { + if (!Array.isArray(object.desiredLocations)) + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredLocations: array expected"); + message.desiredLocations = []; + for (var i = 0; i < object.desiredLocations.length; ++i) + message.desiredLocations[i] = String(object.desiredLocations[i]); + } + if (object.desiredMasterAuthorizedNetworksConfig != null) { + if (typeof object.desiredMasterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMasterAuthorizedNetworksConfig: object expected"); + message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.desiredMasterAuthorizedNetworksConfig); + } + if (object.desiredPodSecurityPolicyConfig != null) { + if (typeof object.desiredPodSecurityPolicyConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredPodSecurityPolicyConfig: object expected"); + message.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.fromObject(object.desiredPodSecurityPolicyConfig); + } + if (object.desiredClusterAutoscaling != null) { + if (typeof object.desiredClusterAutoscaling !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredClusterAutoscaling: object expected"); + message.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.fromObject(object.desiredClusterAutoscaling); + } + if (object.desiredBinaryAuthorization != null) { + if (typeof object.desiredBinaryAuthorization !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredBinaryAuthorization: object expected"); + message.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.fromObject(object.desiredBinaryAuthorization); + } + if (object.desiredLoggingService != null) + message.desiredLoggingService = String(object.desiredLoggingService); + if (object.desiredResourceUsageExportConfig != null) { + if (typeof object.desiredResourceUsageExportConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredResourceUsageExportConfig: object expected"); + message.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.fromObject(object.desiredResourceUsageExportConfig); + } + if (object.desiredVerticalPodAutoscaling != null) { + if (typeof object.desiredVerticalPodAutoscaling !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredVerticalPodAutoscaling: object expected"); + message.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.fromObject(object.desiredVerticalPodAutoscaling); + } + if (object.desiredPrivateClusterConfig != null) { + if (typeof object.desiredPrivateClusterConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredPrivateClusterConfig: object expected"); + message.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.desiredPrivateClusterConfig); + } + if (object.desiredIntraNodeVisibilityConfig != null) { + if (typeof object.desiredIntraNodeVisibilityConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredIntraNodeVisibilityConfig: object expected"); + message.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.fromObject(object.desiredIntraNodeVisibilityConfig); + } + if (object.desiredDefaultSnatStatus != null) { + if (typeof object.desiredDefaultSnatStatus !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDefaultSnatStatus: object expected"); + message.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.fromObject(object.desiredDefaultSnatStatus); + } + if (object.desiredClusterTelemetry != null) { + if (typeof object.desiredClusterTelemetry !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredClusterTelemetry: object expected"); + message.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.fromObject(object.desiredClusterTelemetry); + } + if (object.desiredReleaseChannel != null) { + if (typeof object.desiredReleaseChannel !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredReleaseChannel: object expected"); + message.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.desiredReleaseChannel); + } + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.desiredTpuConfig != null) { + if (typeof object.desiredTpuConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredTpuConfig: object expected"); + message.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.fromObject(object.desiredTpuConfig); + } + if (object.desiredL4ilbSubsettingConfig != null) { + if (typeof object.desiredL4ilbSubsettingConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredL4ilbSubsettingConfig: object expected"); + message.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.fromObject(object.desiredL4ilbSubsettingConfig); + } + switch (object.desiredDatapathProvider) { + default: + if (typeof object.desiredDatapathProvider === "number") { + message.desiredDatapathProvider = object.desiredDatapathProvider; + break; + } + break; + case "DATAPATH_PROVIDER_UNSPECIFIED": + case 0: + message.desiredDatapathProvider = 0; + break; + case "LEGACY_DATAPATH": + case 1: + message.desiredDatapathProvider = 1; + break; + case "ADVANCED_DATAPATH": + case 2: + message.desiredDatapathProvider = 2; + break; + } + switch (object.desiredPrivateIpv6GoogleAccess) { + default: + if (typeof object.desiredPrivateIpv6GoogleAccess === "number") { + message.desiredPrivateIpv6GoogleAccess = object.desiredPrivateIpv6GoogleAccess; + break; + } + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.desiredPrivateIpv6GoogleAccess = 0; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": + case 1: + message.desiredPrivateIpv6GoogleAccess = 1; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": + case 2: + message.desiredPrivateIpv6GoogleAccess = 2; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": + case 3: + message.desiredPrivateIpv6GoogleAccess = 3; + break; + } + if (object.desiredNotificationConfig != null) { + if (typeof object.desiredNotificationConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNotificationConfig: object expected"); + message.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.fromObject(object.desiredNotificationConfig); + } + if (object.desiredMasterVersion != null) + message.desiredMasterVersion = String(object.desiredMasterVersion); + if (object.desiredGcfsConfig != null) { + if (typeof object.desiredGcfsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredGcfsConfig: object expected"); + message.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.desiredGcfsConfig); + } + if (object.desiredDatabaseEncryption != null) { + if (typeof object.desiredDatabaseEncryption !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDatabaseEncryption: object expected"); + message.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.fromObject(object.desiredDatabaseEncryption); + } + if (object.desiredWorkloadIdentityConfig != null) { + if (typeof object.desiredWorkloadIdentityConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadIdentityConfig: object expected"); + message.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.fromObject(object.desiredWorkloadIdentityConfig); + } + if (object.desiredWorkloadCertificates != null) { + if (typeof object.desiredWorkloadCertificates !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadCertificates: object expected"); + message.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.fromObject(object.desiredWorkloadCertificates); + } + if (object.desiredMeshCertificates != null) { + if (typeof object.desiredMeshCertificates !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMeshCertificates: object expected"); + message.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.fromObject(object.desiredMeshCertificates); + } + if (object.desiredWorkloadAltsConfig != null) { + if (typeof object.desiredWorkloadAltsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadAltsConfig: object expected"); + message.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.fromObject(object.desiredWorkloadAltsConfig); + } + if (object.desiredShieldedNodes != null) { + if (typeof object.desiredShieldedNodes !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredShieldedNodes: object expected"); + message.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.fromObject(object.desiredShieldedNodes); + } + if (object.desiredCostManagementConfig != null) { + if (typeof object.desiredCostManagementConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredCostManagementConfig: object expected"); + message.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.fromObject(object.desiredCostManagementConfig); + } + if (object.desiredMaster != null) { + if (typeof object.desiredMaster !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMaster: object expected"); + message.desiredMaster = $root.google.container.v1beta1.Master.fromObject(object.desiredMaster); + } + if (object.desiredDnsConfig != null) { + if (typeof object.desiredDnsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDnsConfig: object expected"); + message.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.fromObject(object.desiredDnsConfig); + } + if (object.desiredServiceExternalIpsConfig != null) { + if (typeof object.desiredServiceExternalIpsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredServiceExternalIpsConfig: object expected"); + message.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.fromObject(object.desiredServiceExternalIpsConfig); + } + if (object.desiredAuthenticatorGroupsConfig != null) { + if (typeof object.desiredAuthenticatorGroupsConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAuthenticatorGroupsConfig: object expected"); + message.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.fromObject(object.desiredAuthenticatorGroupsConfig); + } + if (object.desiredLoggingConfig != null) { + if (typeof object.desiredLoggingConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredLoggingConfig: object expected"); + message.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.fromObject(object.desiredLoggingConfig); + } + if (object.desiredMonitoringConfig != null) { + if (typeof object.desiredMonitoringConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMonitoringConfig: object expected"); + message.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.fromObject(object.desiredMonitoringConfig); + } + if (object.desiredIdentityServiceConfig != null) { + if (typeof object.desiredIdentityServiceConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredIdentityServiceConfig: object expected"); + message.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.fromObject(object.desiredIdentityServiceConfig); + } + if (object.desiredEnablePrivateEndpoint != null) + message.desiredEnablePrivateEndpoint = Boolean(object.desiredEnablePrivateEndpoint); + if (object.desiredNodePoolAutoConfigNetworkTags != null) { + if (typeof object.desiredNodePoolAutoConfigNetworkTags !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigNetworkTags: object expected"); + message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.fromObject(object.desiredNodePoolAutoConfigNetworkTags); + } + if (object.desiredProtectConfig != null) { + if (typeof object.desiredProtectConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredProtectConfig: object expected"); + message.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.fromObject(object.desiredProtectConfig); + } + if (object.desiredGatewayApiConfig != null) { + if (typeof object.desiredGatewayApiConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredGatewayApiConfig: object expected"); + message.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.fromObject(object.desiredGatewayApiConfig); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.desiredNodePoolLoggingConfig != null) { + if (typeof object.desiredNodePoolLoggingConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); + message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); + } + if (object.desiredFleet != null) { + if (typeof object.desiredFleet !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredFleet: object expected"); + message.desiredFleet = $root.google.container.v1beta1.Fleet.fromObject(object.desiredFleet); + } + switch (object.desiredStackType) { + default: + if (typeof object.desiredStackType === "number") { + message.desiredStackType = object.desiredStackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.desiredStackType = 0; + break; + case "IPV4": + case 1: + message.desiredStackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.desiredStackType = 2; + break; + } + if (object.additionalPodRangesConfig != null) { + if (typeof object.additionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.additionalPodRangesConfig: object expected"); + message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); + } + if (object.removedAdditionalPodRangesConfig != null) { + if (typeof object.removedAdditionalPodRangesConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.removedAdditionalPodRangesConfig: object expected"); + message.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.removedAdditionalPodRangesConfig); + } + if (object.enableK8sBetaApis != null) { + if (typeof object.enableK8sBetaApis !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.enableK8sBetaApis: object expected"); + message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); + } + if (object.desiredSecurityPostureConfig != null) { + if (typeof object.desiredSecurityPostureConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredSecurityPostureConfig: object expected"); + message.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.fromObject(object.desiredSecurityPostureConfig); + } + if (object.desiredNetworkPerformanceConfig != null) { + if (typeof object.desiredNetworkPerformanceConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNetworkPerformanceConfig: object expected"); + message.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.desiredNetworkPerformanceConfig); + } + if (object.desiredEnableFqdnNetworkPolicy != null) + message.desiredEnableFqdnNetworkPolicy = Boolean(object.desiredEnableFqdnNetworkPolicy); + if (object.desiredAutopilotWorkloadPolicyConfig != null) { + if (typeof object.desiredAutopilotWorkloadPolicyConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAutopilotWorkloadPolicyConfig: object expected"); + message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.fromObject(object.desiredAutopilotWorkloadPolicyConfig); + } + if (object.desiredK8sBetaApis != null) { + if (typeof object.desiredK8sBetaApis !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredK8sBetaApis: object expected"); + message.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.desiredK8sBetaApis); + } + if (object.desiredHostMaintenancePolicy != null) { + if (typeof object.desiredHostMaintenancePolicy !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredHostMaintenancePolicy: object expected"); + message.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.desiredHostMaintenancePolicy); + } + if (object.desiredContainerdConfig != null) { + if (typeof object.desiredContainerdConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredContainerdConfig: object expected"); + message.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.desiredContainerdConfig); + } + if (object.desiredEnableMultiNetworking != null) + message.desiredEnableMultiNetworking = Boolean(object.desiredEnableMultiNetworking); + if (object.desiredNodePoolAutoConfigResourceManagerTags != null) { + if (typeof object.desiredNodePoolAutoConfigResourceManagerTags !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigResourceManagerTags: object expected"); + message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.desiredNodePoolAutoConfigResourceManagerTags); + } + switch (object.desiredInTransitEncryptionConfig) { + default: + if (typeof object.desiredInTransitEncryptionConfig === "number") { + message.desiredInTransitEncryptionConfig = object.desiredInTransitEncryptionConfig; + break; + } + break; + case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": + case 0: + message.desiredInTransitEncryptionConfig = 0; + break; + case "IN_TRANSIT_ENCRYPTION_DISABLED": + case 1: + message.desiredInTransitEncryptionConfig = 1; + break; + case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": + case 2: + message.desiredInTransitEncryptionConfig = 2; + break; + } + if (object.desiredEnableCiliumClusterwideNetworkPolicy != null) + message.desiredEnableCiliumClusterwideNetworkPolicy = Boolean(object.desiredEnableCiliumClusterwideNetworkPolicy); + if (object.desiredSecretManagerConfig != null) { + if (typeof object.desiredSecretManagerConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredSecretManagerConfig: object expected"); + message.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.fromObject(object.desiredSecretManagerConfig); + } + if (object.desiredNodeKubeletConfig != null) { + if (typeof object.desiredNodeKubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodeKubeletConfig: object expected"); + message.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.desiredNodeKubeletConfig); + } + if (object.desiredNodePoolAutoConfigKubeletConfig != null) { + if (typeof object.desiredNodePoolAutoConfigKubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigKubeletConfig: object expected"); + message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.desiredNodePoolAutoConfigKubeletConfig); + } + return message; + }; + + /** + * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {google.container.v1beta1.ClusterUpdate} message ClusterUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.desiredLocations = []; + if (options.defaults) { + object.desiredNodeVersion = ""; + object.desiredMonitoringService = ""; + object.desiredAddonsConfig = null; + object.desiredNodePoolId = ""; + object.desiredImageType = ""; + object.desiredNodePoolAutoscaling = null; + object.desiredMasterAuthorizedNetworksConfig = null; + object.desiredPodSecurityPolicyConfig = null; + object.desiredClusterAutoscaling = null; + object.desiredBinaryAuthorization = null; + object.desiredLoggingService = ""; + object.desiredResourceUsageExportConfig = null; + object.desiredVerticalPodAutoscaling = null; + object.desiredPrivateClusterConfig = null; + object.desiredIntraNodeVisibilityConfig = null; + object.desiredDefaultSnatStatus = null; + object.desiredClusterTelemetry = null; + object.desiredReleaseChannel = null; + object.privateClusterConfig = null; + object.desiredTpuConfig = null; + object.desiredL4ilbSubsettingConfig = null; + object.desiredDatabaseEncryption = null; + object.desiredWorkloadIdentityConfig = null; + object.desiredShieldedNodes = null; + object.desiredCostManagementConfig = null; + object.desiredDatapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; + object.desiredPrivateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; + object.desiredMaster = null; + object.desiredDnsConfig = null; + object.desiredNotificationConfig = null; + object.desiredServiceExternalIpsConfig = null; + object.desiredWorkloadCertificates = null; + object.desiredWorkloadAltsConfig = null; + object.desiredAuthenticatorGroupsConfig = null; + object.desiredLoggingConfig = null; + object.desiredMonitoringConfig = null; + object.desiredIdentityServiceConfig = null; + object.desiredMeshCertificates = null; + object.desiredMasterVersion = ""; + object.desiredGcfsConfig = null; + object.desiredNodePoolAutoConfigNetworkTags = null; + object.desiredGatewayApiConfig = null; + object.etag = ""; + object.desiredNodePoolLoggingConfig = null; + object.desiredFleet = null; + object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; + object.additionalPodRangesConfig = null; + object.removedAdditionalPodRangesConfig = null; + object.enableK8sBetaApis = null; + object.desiredSecurityPostureConfig = null; + object.desiredNetworkPerformanceConfig = null; + object.desiredAutopilotWorkloadPolicyConfig = null; + object.desiredK8sBetaApis = null; + object.desiredHostMaintenancePolicy = null; + object.desiredContainerdConfig = null; + object.desiredNodePoolAutoConfigResourceManagerTags = null; + object.desiredNodeKubeletConfig = null; + object.desiredNodePoolAutoConfigKubeletConfig = null; + } + if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) + object.desiredNodeVersion = message.desiredNodeVersion; + if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) + object.desiredMonitoringService = message.desiredMonitoringService; + if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) + object.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.desiredAddonsConfig, options); + if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) + object.desiredNodePoolId = message.desiredNodePoolId; + if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) + object.desiredImageType = message.desiredImageType; + if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) + object.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.desiredNodePoolAutoscaling, options); + if (message.desiredLocations && message.desiredLocations.length) { + object.desiredLocations = []; + for (var j = 0; j < message.desiredLocations.length; ++j) + object.desiredLocations[j] = message.desiredLocations[j]; + } + if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) + object.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.desiredMasterAuthorizedNetworksConfig, options); + if (message.desiredPodSecurityPolicyConfig != null && message.hasOwnProperty("desiredPodSecurityPolicyConfig")) + object.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.toObject(message.desiredPodSecurityPolicyConfig, options); + if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) + object.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.toObject(message.desiredClusterAutoscaling, options); + if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) + object.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.toObject(message.desiredBinaryAuthorization, options); + if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) + object.desiredLoggingService = message.desiredLoggingService; + if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) + object.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.toObject(message.desiredResourceUsageExportConfig, options); + if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) + object.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.toObject(message.desiredVerticalPodAutoscaling, options); + if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) + object.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.desiredPrivateClusterConfig, options); + if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) + object.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.toObject(message.desiredIntraNodeVisibilityConfig, options); + if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) + object.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.toObject(message.desiredDefaultSnatStatus, options); + if (message.desiredClusterTelemetry != null && message.hasOwnProperty("desiredClusterTelemetry")) + object.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.toObject(message.desiredClusterTelemetry, options); + if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) + object.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.desiredReleaseChannel, options); + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.desiredTpuConfig != null && message.hasOwnProperty("desiredTpuConfig")) + object.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.toObject(message.desiredTpuConfig, options); + if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) + object.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.toObject(message.desiredL4ilbSubsettingConfig, options); + if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) + object.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.toObject(message.desiredDatabaseEncryption, options); + if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) + object.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.toObject(message.desiredWorkloadIdentityConfig, options); + if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) + object.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.toObject(message.desiredShieldedNodes, options); + if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) + object.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.toObject(message.desiredCostManagementConfig, options); + if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) + object.desiredDatapathProvider = options.enums === String ? $root.google.container.v1beta1.DatapathProvider[message.desiredDatapathProvider] === undefined ? message.desiredDatapathProvider : $root.google.container.v1beta1.DatapathProvider[message.desiredDatapathProvider] : message.desiredDatapathProvider; + if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) + object.desiredPrivateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] === undefined ? message.desiredPrivateIpv6GoogleAccess : $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] : message.desiredPrivateIpv6GoogleAccess; + if (message.desiredMaster != null && message.hasOwnProperty("desiredMaster")) + object.desiredMaster = $root.google.container.v1beta1.Master.toObject(message.desiredMaster, options); + if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) + object.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.toObject(message.desiredDnsConfig, options); + if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) + object.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.toObject(message.desiredNotificationConfig, options); + if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) + object.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.toObject(message.desiredServiceExternalIpsConfig, options); + if (message.desiredWorkloadCertificates != null && message.hasOwnProperty("desiredWorkloadCertificates")) + object.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.toObject(message.desiredWorkloadCertificates, options); + if (message.desiredWorkloadAltsConfig != null && message.hasOwnProperty("desiredWorkloadAltsConfig")) + object.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.toObject(message.desiredWorkloadAltsConfig, options); + if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) + object.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.toObject(message.desiredAuthenticatorGroupsConfig, options); + if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) + object.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.toObject(message.desiredLoggingConfig, options); + if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) + object.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.toObject(message.desiredMonitoringConfig, options); + if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) + object.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.toObject(message.desiredIdentityServiceConfig, options); + if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) + object.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.toObject(message.desiredMeshCertificates, options); + if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { + object.desiredEnablePrivateEndpoint = message.desiredEnablePrivateEndpoint; + if (options.oneofs) + object._desiredEnablePrivateEndpoint = "desiredEnablePrivateEndpoint"; + } + if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) + object.desiredMasterVersion = message.desiredMasterVersion; + if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) + object.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.desiredGcfsConfig, options); + if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) + object.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.toObject(message.desiredNodePoolAutoConfigNetworkTags, options); + if (message.desiredProtectConfig != null && message.hasOwnProperty("desiredProtectConfig")) { + object.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.toObject(message.desiredProtectConfig, options); + if (options.oneofs) + object._desiredProtectConfig = "desiredProtectConfig"; + } + if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) + object.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.toObject(message.desiredGatewayApiConfig, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) + object.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) + object.desiredFleet = $root.google.container.v1beta1.Fleet.toObject(message.desiredFleet, options); + if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) + object.desiredStackType = options.enums === String ? $root.google.container.v1beta1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1beta1.StackType[message.desiredStackType] : message.desiredStackType; + if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) + object.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); + if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) + object.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.removedAdditionalPodRangesConfig, options); + if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) + object.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); + if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) + object.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.toObject(message.desiredSecurityPostureConfig, options); + if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) + object.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.desiredNetworkPerformanceConfig, options); + if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { + object.desiredEnableFqdnNetworkPolicy = message.desiredEnableFqdnNetworkPolicy; + if (options.oneofs) + object._desiredEnableFqdnNetworkPolicy = "desiredEnableFqdnNetworkPolicy"; + } + if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) + object.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.toObject(message.desiredAutopilotWorkloadPolicyConfig, options); + if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) + object.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.desiredK8sBetaApis, options); + if (message.desiredHostMaintenancePolicy != null && message.hasOwnProperty("desiredHostMaintenancePolicy")) + object.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.desiredHostMaintenancePolicy, options); + if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) + object.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.desiredContainerdConfig, options); + if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { + object.desiredEnableMultiNetworking = message.desiredEnableMultiNetworking; + if (options.oneofs) + object._desiredEnableMultiNetworking = "desiredEnableMultiNetworking"; + } + if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) + object.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.desiredNodePoolAutoConfigResourceManagerTags, options); + if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { + object.desiredInTransitEncryptionConfig = options.enums === String ? $root.google.container.v1beta1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] === undefined ? message.desiredInTransitEncryptionConfig : $root.google.container.v1beta1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] : message.desiredInTransitEncryptionConfig; + if (options.oneofs) + object._desiredInTransitEncryptionConfig = "desiredInTransitEncryptionConfig"; + } + if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { + object.desiredEnableCiliumClusterwideNetworkPolicy = message.desiredEnableCiliumClusterwideNetworkPolicy; + if (options.oneofs) + object._desiredEnableCiliumClusterwideNetworkPolicy = "desiredEnableCiliumClusterwideNetworkPolicy"; + } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + object.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.toObject(message.desiredSecretManagerConfig, options); + if (options.oneofs) + object._desiredSecretManagerConfig = "desiredSecretManagerConfig"; + } + if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) + object.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.desiredNodeKubeletConfig, options); + if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) + object.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.desiredNodePoolAutoConfigKubeletConfig, options); + return object; + }; + + /** + * Converts this ClusterUpdate to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + * @returns {Object.} JSON object + */ + ClusterUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterUpdate + * @function getTypeUrl + * @memberof google.container.v1beta1.ClusterUpdate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ClusterUpdate"; + }; + + return ClusterUpdate; + })(); + + v1beta1.AdditionalPodRangesConfig = (function() { + + /** + * Properties of an AdditionalPodRangesConfig. + * @memberof google.container.v1beta1 + * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames + * @property {Array.|null} [podRangeInfo] AdditionalPodRangesConfig podRangeInfo + */ + + /** + * Constructs a new AdditionalPodRangesConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AdditionalPodRangesConfig. + * @implements IAdditionalPodRangesConfig + * @constructor + * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set + */ + function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; + this.podRangeInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + + /** + * AdditionalPodRangesConfig podRangeInfo. + * @member {Array.} podRangeInfo + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeInfo = $util.emptyArray; + + /** + * Creates a new AdditionalPodRangesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig instance + */ + AdditionalPodRangesConfig.create = function create(properties) { + return new AdditionalPodRangesConfig(properties); + }; + + /** + * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodRangesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); + if (message.podRangeInfo != null && message.podRangeInfo.length) + for (var i = 0; i < message.podRangeInfo.length; ++i) + $root.google.container.v1beta1.RangeInfo.encode(message.podRangeInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1beta1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalPodRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodRangesConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } + case 2: { + if (!(message.podRangeInfo && message.podRangeInfo.length)) + message.podRangeInfo = []; + message.podRangeInfo.push($root.google.container.v1beta1.RangeInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalPodRangesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalPodRangesConfig message. + * @function verify + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalPodRangesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } + if (message.podRangeInfo != null && message.hasOwnProperty("podRangeInfo")) { + if (!Array.isArray(message.podRangeInfo)) + return "podRangeInfo: array expected"; + for (var i = 0; i < message.podRangeInfo.length; ++i) { + var error = $root.google.container.v1beta1.RangeInfo.verify(message.podRangeInfo[i]); + if (error) + return "podRangeInfo." + error; + } + } + return null; + }; + + /** + * Creates an AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig + */ + AdditionalPodRangesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AdditionalPodRangesConfig) + return object; + var message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + if (object.podRangeInfo) { + if (!Array.isArray(object.podRangeInfo)) + throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeInfo: array expected"); + message.podRangeInfo = []; + for (var i = 0; i < object.podRangeInfo.length; ++i) { + if (typeof object.podRangeInfo[i] !== "object") + throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeInfo: object expected"); + message.podRangeInfo[i] = $root.google.container.v1beta1.RangeInfo.fromObject(object.podRangeInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {google.container.v1beta1.AdditionalPodRangesConfig} message AdditionalPodRangesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.podRangeNames = []; + object.podRangeInfo = []; + } + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + if (message.podRangeInfo && message.podRangeInfo.length) { + object.podRangeInfo = []; + for (var j = 0; j < message.podRangeInfo.length; ++j) + object.podRangeInfo[j] = $root.google.container.v1beta1.RangeInfo.toObject(message.podRangeInfo[j], options); + } + return object; + }; + + /** + * Converts this AdditionalPodRangesConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalPodRangesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalPodRangesConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalPodRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AdditionalPodRangesConfig"; + }; + + return AdditionalPodRangesConfig; + })(); + + v1beta1.RangeInfo = (function() { + + /** + * Properties of a RangeInfo. + * @memberof google.container.v1beta1 + * @interface IRangeInfo + * @property {string|null} [rangeName] RangeInfo rangeName + * @property {number|null} [utilization] RangeInfo utilization + */ + + /** + * Constructs a new RangeInfo. + * @memberof google.container.v1beta1 + * @classdesc Represents a RangeInfo. + * @implements IRangeInfo + * @constructor + * @param {google.container.v1beta1.IRangeInfo=} [properties] Properties to set + */ + function RangeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RangeInfo rangeName. + * @member {string} rangeName + * @memberof google.container.v1beta1.RangeInfo + * @instance + */ + RangeInfo.prototype.rangeName = ""; + + /** + * RangeInfo utilization. + * @member {number} utilization + * @memberof google.container.v1beta1.RangeInfo + * @instance + */ + RangeInfo.prototype.utilization = 0; + + /** + * Creates a new RangeInfo instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {google.container.v1beta1.IRangeInfo=} [properties] Properties to set + * @returns {google.container.v1beta1.RangeInfo} RangeInfo instance + */ + RangeInfo.create = function create(properties) { + return new RangeInfo(properties); + }; + + /** + * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {google.container.v1beta1.IRangeInfo} message RangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); + if (message.utilization != null && Object.hasOwnProperty.call(message, "utilization")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.utilization); + return writer; + }; + + /** + * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {google.container.v1beta1.IRangeInfo} message RangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RangeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RangeInfo} RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RangeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeName = reader.string(); + break; + } + case 2: { + message.utilization = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RangeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RangeInfo} RangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RangeInfo message. + * @function verify + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RangeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + if (!$util.isString(message.rangeName)) + return "rangeName: string expected"; + if (message.utilization != null && message.hasOwnProperty("utilization")) + if (typeof message.utilization !== "number") + return "utilization: number expected"; + return null; + }; + + /** + * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RangeInfo} RangeInfo + */ + RangeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RangeInfo) + return object; + var message = new $root.google.container.v1beta1.RangeInfo(); + if (object.rangeName != null) + message.rangeName = String(object.rangeName); + if (object.utilization != null) + message.utilization = Number(object.utilization); + return message; + }; + + /** + * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {google.container.v1beta1.RangeInfo} message RangeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RangeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rangeName = ""; + object.utilization = 0; + } + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + object.rangeName = message.rangeName; + if (message.utilization != null && message.hasOwnProperty("utilization")) + object.utilization = options.json && !isFinite(message.utilization) ? String(message.utilization) : message.utilization; + return object; + }; + + /** + * Converts this RangeInfo to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RangeInfo + * @instance + * @returns {Object.} JSON object + */ + RangeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RangeInfo + * @function getTypeUrl + * @memberof google.container.v1beta1.RangeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RangeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RangeInfo"; + }; + + return RangeInfo; + })(); + + v1beta1.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.container.v1beta1 + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {string|null} [zone] Operation zone + * @property {google.container.v1beta1.Operation.Type|null} [operationType] Operation operationType + * @property {google.container.v1beta1.Operation.Status|null} [status] Operation status + * @property {string|null} [detail] Operation detail + * @property {string|null} [statusMessage] Operation statusMessage + * @property {string|null} [selfLink] Operation selfLink + * @property {string|null} [targetLink] Operation targetLink + * @property {string|null} [location] Operation location + * @property {string|null} [startTime] Operation startTime + * @property {string|null} [endTime] Operation endTime + * @property {google.container.v1beta1.IOperationProgress|null} [progress] Operation progress + * @property {Array.|null} [clusterConditions] Operation clusterConditions + * @property {Array.|null} [nodepoolConditions] Operation nodepoolConditions + * @property {google.rpc.IStatus|null} [error] Operation error + */ + + /** + * Constructs a new Operation. + * @memberof google.container.v1beta1 + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.container.v1beta1.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + this.clusterConditions = []; + this.nodepoolConditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation zone. + * @member {string} zone + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.zone = ""; + + /** + * Operation operationType. + * @member {google.container.v1beta1.Operation.Type} operationType + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.operationType = 0; + + /** + * Operation status. + * @member {google.container.v1beta1.Operation.Status} status + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.status = 0; + + /** + * Operation detail. + * @member {string} detail + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.detail = ""; + + /** + * Operation statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.statusMessage = ""; + + /** + * Operation selfLink. + * @member {string} selfLink + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.selfLink = ""; + + /** + * Operation targetLink. + * @member {string} targetLink + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.targetLink = ""; + + /** + * Operation location. + * @member {string} location + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.location = ""; + + /** + * Operation startTime. + * @member {string} startTime + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.startTime = ""; + + /** + * Operation endTime. + * @member {string} endTime + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.endTime = ""; + + /** + * Operation progress. + * @member {google.container.v1beta1.IOperationProgress|null|undefined} progress + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.progress = null; + + /** + * Operation clusterConditions. + * @member {Array.} clusterConditions + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.clusterConditions = $util.emptyArray; + + /** + * Operation nodepoolConditions. + * @member {Array.} nodepoolConditions + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.nodepoolConditions = $util.emptyArray; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.container.v1beta1.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Operation + * @static + * @param {google.container.v1beta1.IOperation=} [properties] Properties to set + * @returns {google.container.v1beta1.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Operation + * @static + * @param {google.container.v1beta1.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operationType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selfLink); + if (message.targetLink != null && Object.hasOwnProperty.call(message, "targetLink")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetLink); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.detail); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.location); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.startTime); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.endTime); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.container.v1beta1.OperationProgress.encode(message.progress, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.clusterConditions != null && message.clusterConditions.length) + for (var i = 0; i < message.clusterConditions.length; ++i) + $root.google.container.v1beta1.StatusCondition.encode(message.clusterConditions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.nodepoolConditions != null && message.nodepoolConditions.length) + for (var i = 0; i < message.nodepoolConditions.length; ++i) + $root.google.container.v1beta1.StatusCondition.encode(message.nodepoolConditions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Operation + * @static + * @param {google.container.v1beta1.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationType = reader.int32(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 8: { + message.detail = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.selfLink = reader.string(); + break; + } + case 7: { + message.targetLink = reader.string(); + break; + } + case 9: { + message.location = reader.string(); + break; + } + case 10: { + message.startTime = reader.string(); + break; + } + case 11: { + message.endTime = reader.string(); + break; + } + case 12: { + message.progress = $root.google.container.v1beta1.OperationProgress.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.clusterConditions && message.clusterConditions.length)) + message.clusterConditions = []; + message.clusterConditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 14: { + if (!(message.nodepoolConditions && message.nodepoolConditions.length)) + message.nodepoolConditions = []; + message.nodepoolConditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 15: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.container.v1beta1.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 18: + case 19: + break; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.targetLink != null && message.hasOwnProperty("targetLink")) + if (!$util.isString(message.targetLink)) + return "targetLink: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isString(message.startTime)) + return "startTime: string expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isString(message.endTime)) + return "endTime: string expected"; + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.container.v1beta1.OperationProgress.verify(message.progress); + if (error) + return "progress." + error; + } + if (message.clusterConditions != null && message.hasOwnProperty("clusterConditions")) { + if (!Array.isArray(message.clusterConditions)) + return "clusterConditions: array expected"; + for (var i = 0; i < message.clusterConditions.length; ++i) { + var error = $root.google.container.v1beta1.StatusCondition.verify(message.clusterConditions[i]); + if (error) + return "clusterConditions." + error; + } + } + if (message.nodepoolConditions != null && message.hasOwnProperty("nodepoolConditions")) { + if (!Array.isArray(message.nodepoolConditions)) + return "nodepoolConditions: array expected"; + for (var i = 0; i < message.nodepoolConditions.length; ++i) { + var error = $root.google.container.v1beta1.StatusCondition.verify(message.nodepoolConditions[i]); + if (error) + return "nodepoolConditions." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Operation) + return object; + var message = new $root.google.container.v1beta1.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.zone != null) + message.zone = String(object.zone); + switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE_CLUSTER": + case 1: + message.operationType = 1; + break; + case "DELETE_CLUSTER": + case 2: + message.operationType = 2; + break; + case "UPGRADE_MASTER": + case 3: + message.operationType = 3; + break; + case "UPGRADE_NODES": + case 4: + message.operationType = 4; + break; + case "REPAIR_CLUSTER": + case 5: + message.operationType = 5; + break; + case "UPDATE_CLUSTER": + case 6: + message.operationType = 6; + break; + case "CREATE_NODE_POOL": + case 7: + message.operationType = 7; + break; + case "DELETE_NODE_POOL": + case 8: + message.operationType = 8; + break; + case "SET_NODE_POOL_MANAGEMENT": + case 9: + message.operationType = 9; + break; + case "AUTO_REPAIR_NODES": + case 10: + message.operationType = 10; + break; + case "AUTO_UPGRADE_NODES": + case 11: + message.operationType = 11; + break; + case "SET_LABELS": + case 12: + message.operationType = 12; + break; + case "SET_MASTER_AUTH": + case 13: + message.operationType = 13; + break; + case "SET_NODE_POOL_SIZE": + case 14: + message.operationType = 14; + break; + case "SET_NETWORK_POLICY": + case 15: + message.operationType = 15; + break; + case "SET_MAINTENANCE_POLICY": + case 16: + message.operationType = 16; + break; + case "RESIZE_CLUSTER": + case 18: + message.operationType = 18; + break; + case "FLEET_FEATURE_UPGRADE": + case 19: + message.operationType = 19; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "DONE": + case 3: + message.status = 3; + break; + case "ABORTING": + case 4: + message.status = 4; + break; + } + if (object.detail != null) + message.detail = String(object.detail); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.targetLink != null) + message.targetLink = String(object.targetLink); + if (object.location != null) + message.location = String(object.location); + if (object.startTime != null) + message.startTime = String(object.startTime); + if (object.endTime != null) + message.endTime = String(object.endTime); + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.container.v1beta1.Operation.progress: object expected"); + message.progress = $root.google.container.v1beta1.OperationProgress.fromObject(object.progress); + } + if (object.clusterConditions) { + if (!Array.isArray(object.clusterConditions)) + throw TypeError(".google.container.v1beta1.Operation.clusterConditions: array expected"); + message.clusterConditions = []; + for (var i = 0; i < object.clusterConditions.length; ++i) { + if (typeof object.clusterConditions[i] !== "object") + throw TypeError(".google.container.v1beta1.Operation.clusterConditions: object expected"); + message.clusterConditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.clusterConditions[i]); + } + } + if (object.nodepoolConditions) { + if (!Array.isArray(object.nodepoolConditions)) + throw TypeError(".google.container.v1beta1.Operation.nodepoolConditions: array expected"); + message.nodepoolConditions = []; + for (var i = 0; i < object.nodepoolConditions.length; ++i) { + if (typeof object.nodepoolConditions[i] !== "object") + throw TypeError(".google.container.v1beta1.Operation.nodepoolConditions: object expected"); + message.nodepoolConditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.nodepoolConditions[i]); + } + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.container.v1beta1.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Operation + * @static + * @param {google.container.v1beta1.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.clusterConditions = []; + object.nodepoolConditions = []; + } + if (options.defaults) { + object.name = ""; + object.zone = ""; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.selfLink = ""; + object.targetLink = ""; + object.detail = ""; + object.location = ""; + object.startTime = ""; + object.endTime = ""; + object.progress = null; + object.error = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.container.v1beta1.Operation.Type[message.operationType] === undefined ? message.operationType : $root.google.container.v1beta1.Operation.Type[message.operationType] : message.operationType; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1beta1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Operation.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.targetLink != null && message.hasOwnProperty("targetLink")) + object.targetLink = message.targetLink; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = message.startTime; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = message.endTime; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.container.v1beta1.OperationProgress.toObject(message.progress, options); + if (message.clusterConditions && message.clusterConditions.length) { + object.clusterConditions = []; + for (var j = 0; j < message.clusterConditions.length; ++j) + object.clusterConditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.clusterConditions[j], options); + } + if (message.nodepoolConditions && message.nodepoolConditions.length) { + object.nodepoolConditions = []; + for (var j = 0; j < message.nodepoolConditions.length; ++j) + object.nodepoolConditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.nodepoolConditions[j], options); + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.container.v1beta1.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Operation"; + }; + + /** + * Status enum. + * @name google.container.v1beta1.Operation.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + * @property {number} ABORTING=4 ABORTING value + */ + Operation.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + values[valuesById[4] = "ABORTING"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.container.v1beta1.Operation.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE_CLUSTER=1 CREATE_CLUSTER value + * @property {number} DELETE_CLUSTER=2 DELETE_CLUSTER value + * @property {number} UPGRADE_MASTER=3 UPGRADE_MASTER value + * @property {number} UPGRADE_NODES=4 UPGRADE_NODES value + * @property {number} REPAIR_CLUSTER=5 REPAIR_CLUSTER value + * @property {number} UPDATE_CLUSTER=6 UPDATE_CLUSTER value + * @property {number} CREATE_NODE_POOL=7 CREATE_NODE_POOL value + * @property {number} DELETE_NODE_POOL=8 DELETE_NODE_POOL value + * @property {number} SET_NODE_POOL_MANAGEMENT=9 SET_NODE_POOL_MANAGEMENT value + * @property {number} AUTO_REPAIR_NODES=10 AUTO_REPAIR_NODES value + * @property {number} AUTO_UPGRADE_NODES=11 AUTO_UPGRADE_NODES value + * @property {number} SET_LABELS=12 SET_LABELS value + * @property {number} SET_MASTER_AUTH=13 SET_MASTER_AUTH value + * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value + * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value + * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value + * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value + * @property {number} FLEET_FEATURE_UPGRADE=19 FLEET_FEATURE_UPGRADE value + */ + Operation.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE_CLUSTER"] = 1; + values[valuesById[2] = "DELETE_CLUSTER"] = 2; + values[valuesById[3] = "UPGRADE_MASTER"] = 3; + values[valuesById[4] = "UPGRADE_NODES"] = 4; + values[valuesById[5] = "REPAIR_CLUSTER"] = 5; + values[valuesById[6] = "UPDATE_CLUSTER"] = 6; + values[valuesById[7] = "CREATE_NODE_POOL"] = 7; + values[valuesById[8] = "DELETE_NODE_POOL"] = 8; + values[valuesById[9] = "SET_NODE_POOL_MANAGEMENT"] = 9; + values[valuesById[10] = "AUTO_REPAIR_NODES"] = 10; + values[valuesById[11] = "AUTO_UPGRADE_NODES"] = 11; + values[valuesById[12] = "SET_LABELS"] = 12; + values[valuesById[13] = "SET_MASTER_AUTH"] = 13; + values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; + values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; + values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; + values[valuesById[18] = "RESIZE_CLUSTER"] = 18; + values[valuesById[19] = "FLEET_FEATURE_UPGRADE"] = 19; + return values; + })(); + + return Operation; + })(); + + v1beta1.OperationProgress = (function() { + + /** + * Properties of an OperationProgress. + * @memberof google.container.v1beta1 + * @interface IOperationProgress + * @property {string|null} [name] OperationProgress name + * @property {google.container.v1beta1.Operation.Status|null} [status] OperationProgress status + * @property {Array.|null} [metrics] OperationProgress metrics + * @property {Array.|null} [stages] OperationProgress stages + */ + + /** + * Constructs a new OperationProgress. + * @memberof google.container.v1beta1 + * @classdesc Represents an OperationProgress. + * @implements IOperationProgress + * @constructor + * @param {google.container.v1beta1.IOperationProgress=} [properties] Properties to set + */ + function OperationProgress(properties) { + this.metrics = []; + this.stages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationProgress name. + * @member {string} name + * @memberof google.container.v1beta1.OperationProgress + * @instance + */ + OperationProgress.prototype.name = ""; + + /** + * OperationProgress status. + * @member {google.container.v1beta1.Operation.Status} status + * @memberof google.container.v1beta1.OperationProgress + * @instance + */ + OperationProgress.prototype.status = 0; + + /** + * OperationProgress metrics. + * @member {Array.} metrics + * @memberof google.container.v1beta1.OperationProgress + * @instance + */ + OperationProgress.prototype.metrics = $util.emptyArray; + + /** + * OperationProgress stages. + * @member {Array.} stages + * @memberof google.container.v1beta1.OperationProgress + * @instance + */ + OperationProgress.prototype.stages = $util.emptyArray; + + /** + * Creates a new OperationProgress instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {google.container.v1beta1.IOperationProgress=} [properties] Properties to set + * @returns {google.container.v1beta1.OperationProgress} OperationProgress instance + */ + OperationProgress.create = function create(properties) { + return new OperationProgress(properties); + }; + + /** + * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {google.container.v1beta1.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.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.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.container.v1beta1.OperationProgress.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.stages != null && message.stages.length) + for (var i = 0; i < message.stages.length; ++i) + $root.google.container.v1beta1.OperationProgress.encode(message.stages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {google.container.v1beta1.IOperationProgress} message OperationProgress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.OperationProgress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.status = reader.int32(); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.container.v1beta1.OperationProgress.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.stages && message.stages.length)) + message.stages = []; + message.stages.push($root.google.container.v1beta1.OperationProgress.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationProgress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.OperationProgress} OperationProgress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationProgress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationProgress message. + * @function verify + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationProgress.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.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + 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) { + var error = $root.google.container.v1beta1.OperationProgress.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.stages != null && message.hasOwnProperty("stages")) { + if (!Array.isArray(message.stages)) + return "stages: array expected"; + for (var i = 0; i < message.stages.length; ++i) { + var error = $root.google.container.v1beta1.OperationProgress.verify(message.stages[i]); + if (error) + return "stages." + error; + } + } + return null; + }; + + /** + * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.OperationProgress} OperationProgress + */ + OperationProgress.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.OperationProgress) + return object; + var message = new $root.google.container.v1beta1.OperationProgress(); + if (object.name != null) + message.name = String(object.name); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "DONE": + case 3: + message.status = 3; + break; + case "ABORTING": + case 4: + message.status = 4; + break; + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.container.v1beta1.OperationProgress.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.container.v1beta1.OperationProgress.metrics: object expected"); + message.metrics[i] = $root.google.container.v1beta1.OperationProgress.Metric.fromObject(object.metrics[i]); + } + } + if (object.stages) { + if (!Array.isArray(object.stages)) + throw TypeError(".google.container.v1beta1.OperationProgress.stages: array expected"); + message.stages = []; + for (var i = 0; i < object.stages.length; ++i) { + if (typeof object.stages[i] !== "object") + throw TypeError(".google.container.v1beta1.OperationProgress.stages: object expected"); + message.stages[i] = $root.google.container.v1beta1.OperationProgress.fromObject(object.stages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {google.container.v1beta1.OperationProgress} message OperationProgress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationProgress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metrics = []; + object.stages = []; + } + if (options.defaults) { + object.name = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1beta1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Operation.Status[message.status] : message.status; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.container.v1beta1.OperationProgress.Metric.toObject(message.metrics[j], options); + } + if (message.stages && message.stages.length) { + object.stages = []; + for (var j = 0; j < message.stages.length; ++j) + object.stages[j] = $root.google.container.v1beta1.OperationProgress.toObject(message.stages[j], options); + } + return object; + }; + + /** + * Converts this OperationProgress to JSON. + * @function toJSON + * @memberof google.container.v1beta1.OperationProgress + * @instance + * @returns {Object.} JSON object + */ + OperationProgress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationProgress + * @function getTypeUrl + * @memberof google.container.v1beta1.OperationProgress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.OperationProgress"; + }; + + OperationProgress.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.container.v1beta1.OperationProgress + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {number|Long|null} [intValue] Metric intValue + * @property {number|null} [doubleValue] Metric doubleValue + * @property {string|null} [stringValue] Metric stringValue + */ + + /** + * Constructs a new Metric. + * @memberof google.container.v1beta1.OperationProgress + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.container.v1beta1.OperationProgress.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric intValue. + * @member {number|Long|null|undefined} intValue + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + */ + Metric.prototype.intValue = null; + + /** + * Metric doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + */ + Metric.prototype.doubleValue = null; + + /** + * Metric stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + */ + Metric.prototype.stringValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Metric value. + * @member {"intValue"|"doubleValue"|"stringValue"|undefined} value + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {google.container.v1beta1.OperationProgress.IMetric=} [properties] Properties to set + * @returns {google.container.v1beta1.OperationProgress.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {google.container.v1beta1.OperationProgress.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.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.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.intValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {google.container.v1beta1.OperationProgress.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.OperationProgress.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.OperationProgress.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.intValue = reader.int64(); + break; + } + case 3: { + message.doubleValue = reader.double(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.OperationProgress.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.OperationProgress.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.OperationProgress.Metric) + return object; + var message = new $root.google.container.v1beta1.OperationProgress.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {google.container.v1beta1.OperationProgress.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.value = "intValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.container.v1beta1.OperationProgress.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.container.v1beta1.OperationProgress.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.OperationProgress.Metric"; + }; + + return Metric; + })(); + + return OperationProgress; + })(); + + v1beta1.CreateClusterRequest = (function() { + + /** + * Properties of a CreateClusterRequest. + * @memberof google.container.v1beta1 + * @interface ICreateClusterRequest + * @property {string|null} [projectId] CreateClusterRequest projectId + * @property {string|null} [zone] CreateClusterRequest zone + * @property {google.container.v1beta1.ICluster|null} [cluster] CreateClusterRequest cluster + * @property {string|null} [parent] CreateClusterRequest parent + */ + + /** + * Constructs a new CreateClusterRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CreateClusterRequest. + * @implements ICreateClusterRequest + * @constructor + * @param {google.container.v1beta1.ICreateClusterRequest=} [properties] Properties to set + */ + function CreateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.projectId = ""; + + /** + * CreateClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.zone = ""; + + /** + * CreateClusterRequest cluster. + * @member {google.container.v1beta1.ICluster|null|undefined} cluster + * @memberof google.container.v1beta1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.cluster = null; + + /** + * CreateClusterRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.CreateClusterRequest + * @instance + */ + CreateClusterRequest.prototype.parent = ""; + + /** + * Creates a new CreateClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {google.container.v1beta1.ICreateClusterRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest instance + */ + CreateClusterRequest.create = function create(properties) { + return new CreateClusterRequest(properties); + }; + + /** + * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {google.container.v1beta1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.google.container.v1beta1.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {google.container.v1beta1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CreateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.cluster = $root.google.container.v1beta1.Cluster.decode(reader, reader.uint32()); + break; + } + case 5: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateClusterRequest message. + * @function verify + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.google.container.v1beta1.Cluster.verify(message.cluster); + if (error) + return "cluster." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest + */ + CreateClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CreateClusterRequest) + return object; + var message = new $root.google.container.v1beta1.CreateClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".google.container.v1beta1.CreateClusterRequest.cluster: object expected"); + message.cluster = $root.google.container.v1beta1.Cluster.fromObject(object.cluster); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {google.container.v1beta1.CreateClusterRequest} message CreateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.cluster = null; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.google.container.v1beta1.Cluster.toObject(message.cluster, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CreateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + CreateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateClusterRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CreateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CreateClusterRequest"; + }; + + return CreateClusterRequest; + })(); + + v1beta1.GetClusterRequest = (function() { + + /** + * Properties of a GetClusterRequest. + * @memberof google.container.v1beta1 + * @interface IGetClusterRequest + * @property {string|null} [projectId] GetClusterRequest projectId + * @property {string|null} [zone] GetClusterRequest zone + * @property {string|null} [clusterId] GetClusterRequest clusterId + * @property {string|null} [name] GetClusterRequest name + */ + + /** + * Constructs a new GetClusterRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetClusterRequest. + * @implements IGetClusterRequest + * @constructor + * @param {google.container.v1beta1.IGetClusterRequest=} [properties] Properties to set + */ + function GetClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.projectId = ""; + + /** + * GetClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.zone = ""; + + /** + * GetClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.clusterId = ""; + + /** + * GetClusterRequest name. + * @member {string} name + * @memberof google.container.v1beta1.GetClusterRequest + * @instance + */ + GetClusterRequest.prototype.name = ""; + + /** + * Creates a new GetClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {google.container.v1beta1.IGetClusterRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest instance + */ + GetClusterRequest.create = function create(properties) { + return new GetClusterRequest(properties); + }; + + /** + * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {google.container.v1beta1.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {google.container.v1beta1.IGetClusterRequest} message GetClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetClusterRequest message. + * @function verify + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest + */ + GetClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetClusterRequest) + return object; + var message = new $root.google.container.v1beta1.GetClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {google.container.v1beta1.GetClusterRequest} message GetClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetClusterRequest + * @instance + * @returns {Object.} JSON object + */ + GetClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetClusterRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetClusterRequest"; + }; + + return GetClusterRequest; + })(); + + v1beta1.UpdateClusterRequest = (function() { + + /** + * Properties of an UpdateClusterRequest. + * @memberof google.container.v1beta1 + * @interface IUpdateClusterRequest + * @property {string|null} [projectId] UpdateClusterRequest projectId + * @property {string|null} [zone] UpdateClusterRequest zone + * @property {string|null} [clusterId] UpdateClusterRequest clusterId + * @property {google.container.v1beta1.IClusterUpdate|null} [update] UpdateClusterRequest update + * @property {string|null} [name] UpdateClusterRequest name + */ + + /** + * Constructs a new UpdateClusterRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents an UpdateClusterRequest. + * @implements IUpdateClusterRequest + * @constructor + * @param {google.container.v1beta1.IUpdateClusterRequest=} [properties] Properties to set + */ + function UpdateClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.projectId = ""; + + /** + * UpdateClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.zone = ""; + + /** + * UpdateClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.clusterId = ""; + + /** + * UpdateClusterRequest update. + * @member {google.container.v1beta1.IClusterUpdate|null|undefined} update + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.update = null; + + /** + * UpdateClusterRequest name. + * @member {string} name + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + */ + UpdateClusterRequest.prototype.name = ""; + + /** + * Creates a new UpdateClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {google.container.v1beta1.IUpdateClusterRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest instance + */ + UpdateClusterRequest.create = function create(properties) { + return new UpdateClusterRequest(properties); + }; + + /** + * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {google.container.v1beta1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.container.v1beta1.ClusterUpdate.encode(message.update, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {google.container.v1beta1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.update = $root.google.container.v1beta1.ClusterUpdate.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateClusterRequest message. + * @function verify + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.update != null && message.hasOwnProperty("update")) { + var error = $root.google.container.v1beta1.ClusterUpdate.verify(message.update); + if (error) + return "update." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest + */ + UpdateClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UpdateClusterRequest) + return object; + var message = new $root.google.container.v1beta1.UpdateClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.container.v1beta1.UpdateClusterRequest.update: object expected"); + message.update = $root.google.container.v1beta1.ClusterUpdate.fromObject(object.update); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {google.container.v1beta1.UpdateClusterRequest} message UpdateClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.update = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.update != null && message.hasOwnProperty("update")) + object.update = $root.google.container.v1beta1.ClusterUpdate.toObject(message.update, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UpdateClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UpdateClusterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateClusterRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.UpdateClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UpdateClusterRequest"; + }; + + return UpdateClusterRequest; + })(); + + v1beta1.UpdateNodePoolRequest = (function() { + + /** + * Properties of an UpdateNodePoolRequest. + * @memberof google.container.v1beta1 + * @interface IUpdateNodePoolRequest + * @property {string|null} [projectId] UpdateNodePoolRequest projectId + * @property {string|null} [zone] UpdateNodePoolRequest zone + * @property {string|null} [clusterId] UpdateNodePoolRequest clusterId + * @property {string|null} [nodePoolId] UpdateNodePoolRequest nodePoolId + * @property {string|null} [nodeVersion] UpdateNodePoolRequest nodeVersion + * @property {string|null} [imageType] UpdateNodePoolRequest imageType + * @property {Array.|null} [locations] UpdateNodePoolRequest locations + * @property {google.container.v1beta1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] UpdateNodePoolRequest workloadMetadataConfig + * @property {string|null} [name] UpdateNodePoolRequest name + * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] UpdateNodePoolRequest upgradeSettings + * @property {google.container.v1beta1.INetworkTags|null} [tags] UpdateNodePoolRequest tags + * @property {google.container.v1beta1.INodeTaints|null} [taints] UpdateNodePoolRequest taints + * @property {google.container.v1beta1.INodeLabels|null} [labels] UpdateNodePoolRequest labels + * @property {google.container.v1beta1.ILinuxNodeConfig|null} [linuxNodeConfig] UpdateNodePoolRequest linuxNodeConfig + * @property {google.container.v1beta1.INodeKubeletConfig|null} [kubeletConfig] UpdateNodePoolRequest kubeletConfig + * @property {google.container.v1beta1.INodeNetworkConfig|null} [nodeNetworkConfig] UpdateNodePoolRequest nodeNetworkConfig + * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] UpdateNodePoolRequest gcfsConfig + * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] UpdateNodePoolRequest confidentialNodes + * @property {google.container.v1beta1.IVirtualNIC|null} [gvnic] UpdateNodePoolRequest gvnic + * @property {string|null} [etag] UpdateNodePoolRequest etag + * @property {google.container.v1beta1.IFastSocket|null} [fastSocket] UpdateNodePoolRequest fastSocket + * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] UpdateNodePoolRequest loggingConfig + * @property {google.container.v1beta1.IResourceLabels|null} [resourceLabels] UpdateNodePoolRequest resourceLabels + * @property {google.container.v1beta1.IWindowsNodeConfig|null} [windowsNodeConfig] UpdateNodePoolRequest windowsNodeConfig + * @property {Array.|null} [accelerators] UpdateNodePoolRequest accelerators + * @property {string|null} [machineType] UpdateNodePoolRequest machineType + * @property {string|null} [diskType] UpdateNodePoolRequest diskType + * @property {number|Long|null} [diskSizeGb] UpdateNodePoolRequest diskSizeGb + * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] UpdateNodePoolRequest resourceManagerTags + * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] UpdateNodePoolRequest containerdConfig + * @property {google.container.v1beta1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] UpdateNodePoolRequest queuedProvisioning + */ + + /** + * Constructs a new UpdateNodePoolRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents an UpdateNodePoolRequest. + * @implements IUpdateNodePoolRequest + * @constructor + * @param {google.container.v1beta1.IUpdateNodePoolRequest=} [properties] Properties to set + */ + function UpdateNodePoolRequest(properties) { + this.locations = []; + this.accelerators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.projectId = ""; + + /** + * UpdateNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.zone = ""; + + /** + * UpdateNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.clusterId = ""; + + /** + * UpdateNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodePoolId = ""; + + /** + * UpdateNodePoolRequest nodeVersion. + * @member {string} nodeVersion + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodeVersion = ""; + + /** + * UpdateNodePoolRequest imageType. + * @member {string} imageType + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.imageType = ""; + + /** + * UpdateNodePoolRequest locations. + * @member {Array.} locations + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.locations = $util.emptyArray; + + /** + * UpdateNodePoolRequest workloadMetadataConfig. + * @member {google.container.v1beta1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.workloadMetadataConfig = null; + + /** + * UpdateNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.name = ""; + + /** + * UpdateNodePoolRequest upgradeSettings. + * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.upgradeSettings = null; + + /** + * UpdateNodePoolRequest tags. + * @member {google.container.v1beta1.INetworkTags|null|undefined} tags + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.tags = null; + + /** + * UpdateNodePoolRequest taints. + * @member {google.container.v1beta1.INodeTaints|null|undefined} taints + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.taints = null; + + /** + * UpdateNodePoolRequest labels. + * @member {google.container.v1beta1.INodeLabels|null|undefined} labels + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.labels = null; + + /** + * UpdateNodePoolRequest linuxNodeConfig. + * @member {google.container.v1beta1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.linuxNodeConfig = null; + + /** + * UpdateNodePoolRequest kubeletConfig. + * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} kubeletConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.kubeletConfig = null; + + /** + * UpdateNodePoolRequest nodeNetworkConfig. + * @member {google.container.v1beta1.INodeNetworkConfig|null|undefined} nodeNetworkConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.nodeNetworkConfig = null; + + /** + * UpdateNodePoolRequest gcfsConfig. + * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.gcfsConfig = null; + + /** + * UpdateNodePoolRequest confidentialNodes. + * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.confidentialNodes = null; + + /** + * UpdateNodePoolRequest gvnic. + * @member {google.container.v1beta1.IVirtualNIC|null|undefined} gvnic + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.gvnic = null; + + /** + * UpdateNodePoolRequest etag. + * @member {string} etag + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.etag = ""; + + /** + * UpdateNodePoolRequest fastSocket. + * @member {google.container.v1beta1.IFastSocket|null|undefined} fastSocket + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.fastSocket = null; + + /** + * UpdateNodePoolRequest loggingConfig. + * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.loggingConfig = null; + + /** + * UpdateNodePoolRequest resourceLabels. + * @member {google.container.v1beta1.IResourceLabels|null|undefined} resourceLabels + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.resourceLabels = null; + + /** + * UpdateNodePoolRequest windowsNodeConfig. + * @member {google.container.v1beta1.IWindowsNodeConfig|null|undefined} windowsNodeConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.windowsNodeConfig = null; + + /** + * UpdateNodePoolRequest accelerators. + * @member {Array.} accelerators + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.accelerators = $util.emptyArray; + + /** + * UpdateNodePoolRequest machineType. + * @member {string} machineType + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.machineType = ""; + + /** + * UpdateNodePoolRequest diskType. + * @member {string} diskType + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.diskType = ""; + + /** + * UpdateNodePoolRequest diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UpdateNodePoolRequest resourceManagerTags. + * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.resourceManagerTags = null; + + /** + * UpdateNodePoolRequest containerdConfig. + * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.containerdConfig = null; + + /** + * UpdateNodePoolRequest queuedProvisioning. + * @member {google.container.v1beta1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.queuedProvisioning = null; + + /** + * Creates a new UpdateNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {google.container.v1beta1.IUpdateNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest instance + */ + UpdateNodePoolRequest.create = function create(properties) { + return new UpdateNodePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {google.container.v1beta1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.nodeVersion != null && Object.hasOwnProperty.call(message, "nodeVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeVersion); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.imageType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.name); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) + $root.google.container.v1beta1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.container.v1beta1.NetworkTags.encode(message.tags, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.taints != null && Object.hasOwnProperty.call(message, "taints")) + $root.google.container.v1beta1.NodeTaints.encode(message.taints, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + $root.google.container.v1beta1.NodeLabels.encode(message.labels, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1beta1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) + $root.google.container.v1beta1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.nodeNetworkConfig != null && Object.hasOwnProperty.call(message, "nodeNetworkConfig")) + $root.google.container.v1beta1.NodeNetworkConfig.encode(message.nodeNetworkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) + $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) + $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) + $root.google.container.v1beta1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.etag); + if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) + $root.google.container.v1beta1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + $root.google.container.v1beta1.ResourceLabels.encode(message.resourceLabels, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) + $root.google.container.v1beta1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.accelerators != null && message.accelerators.length) + for (var i = 0; i < message.accelerators.length; ++i) + $root.google.container.v1beta1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.machineType); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.diskType); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 38, wireType 0 =*/304).int64(message.diskSizeGb); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) + $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) + $root.google.container.v1beta1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {google.container.v1beta1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.nodeVersion = reader.string(); + break; + } + case 6: { + message.imageType = reader.string(); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.name = reader.string(); + break; + } + case 15: { + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + message.tags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 17: { + message.taints = $root.google.container.v1beta1.NodeTaints.decode(reader, reader.uint32()); + break; + } + case 18: { + message.labels = $root.google.container.v1beta1.NodeLabels.decode(reader, reader.uint32()); + break; + } + case 19: { + message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } + case 20: { + message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + case 21: { + message.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.decode(reader, reader.uint32()); + break; + } + case 22: { + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); + break; + } + case 23: { + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); + break; + } + case 29: { + message.gvnic = $root.google.container.v1beta1.VirtualNIC.decode(reader, reader.uint32()); + break; + } + case 30: { + message.etag = reader.string(); + break; + } + case 31: { + message.fastSocket = $root.google.container.v1beta1.FastSocket.decode(reader, reader.uint32()); + break; + } + case 32: { + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); + break; + } + case 33: { + message.resourceLabels = $root.google.container.v1beta1.ResourceLabels.decode(reader, reader.uint32()); + break; + } + case 34: { + message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.decode(reader, reader.uint32()); + break; + } + case 35: { + if (!(message.accelerators && message.accelerators.length)) + message.accelerators = []; + message.accelerators.push($root.google.container.v1beta1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 36: { + message.machineType = reader.string(); + break; + } + case 37: { + message.diskType = reader.string(); + break; + } + case 38: { + message.diskSizeGb = reader.int64(); + break; + } + case 39: { + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 40: { + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); + break; + } + case 42: { + message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateNodePoolRequest message. + * @function verify + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) + if (!$util.isString(message.nodeVersion)) + return "nodeVersion: string expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { + var error = $root.google.container.v1beta1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); + if (error) + return "workloadMetadataConfig." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + var error = $root.google.container.v1beta1.NetworkTags.verify(message.tags); + if (error) + return "tags." + error; + } + if (message.taints != null && message.hasOwnProperty("taints")) { + var error = $root.google.container.v1beta1.NodeTaints.verify(message.taints); + if (error) + return "taints." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + var error = $root.google.container.v1beta1.NodeLabels.verify(message.labels); + if (error) + return "labels." + error; + } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1beta1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { + var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.kubeletConfig); + if (error) + return "kubeletConfig." + error; + } + if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) { + var error = $root.google.container.v1beta1.NodeNetworkConfig.verify(message.nodeNetworkConfig); + if (error) + return "nodeNetworkConfig." + error; + } + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { + var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); + if (error) + return "gcfsConfig." + error; + } + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { + var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); + if (error) + return "confidentialNodes." + error; + } + if (message.gvnic != null && message.hasOwnProperty("gvnic")) { + var error = $root.google.container.v1beta1.VirtualNIC.verify(message.gvnic); + if (error) + return "gvnic." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { + var error = $root.google.container.v1beta1.FastSocket.verify(message.fastSocket); + if (error) + return "fastSocket." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + var error = $root.google.container.v1beta1.ResourceLabels.verify(message.resourceLabels); + if (error) + return "resourceLabels." + error; + } + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { + var error = $root.google.container.v1beta1.WindowsNodeConfig.verify(message.windowsNodeConfig); + if (error) + return "windowsNodeConfig." + error; + } + if (message.accelerators != null && message.hasOwnProperty("accelerators")) { + if (!Array.isArray(message.accelerators)) + return "accelerators: array expected"; + for (var i = 0; i < message.accelerators.length; ++i) { + var error = $root.google.container.v1beta1.AcceleratorConfig.verify(message.accelerators[i]); + if (error) + return "accelerators." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { + var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); + if (error) + return "containerdConfig." + error; + } + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { + var error = $root.google.container.v1beta1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); + if (error) + return "queuedProvisioning." + error; + } + return null; + }; + + /** + * Creates an UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest + */ + UpdateNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UpdateNodePoolRequest) + return object; + var message = new $root.google.container.v1beta1.UpdateNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.nodeVersion != null) + message.nodeVersion = String(object.nodeVersion); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.workloadMetadataConfig != null) { + if (typeof object.workloadMetadataConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.workloadMetadataConfig: object expected"); + message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); + } + if (object.name != null) + message.name = String(object.name); + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.tags: object expected"); + message.tags = $root.google.container.v1beta1.NetworkTags.fromObject(object.tags); + } + if (object.taints != null) { + if (typeof object.taints !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.taints: object expected"); + message.taints = $root.google.container.v1beta1.NodeTaints.fromObject(object.taints); + } + if (object.labels != null) { + if (typeof object.labels !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.labels: object expected"); + message.labels = $root.google.container.v1beta1.NodeLabels.fromObject(object.labels); + } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } + if (object.kubeletConfig != null) { + if (typeof object.kubeletConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.kubeletConfig: object expected"); + message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.kubeletConfig); + } + if (object.nodeNetworkConfig != null) { + if (typeof object.nodeNetworkConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.nodeNetworkConfig: object expected"); + message.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.fromObject(object.nodeNetworkConfig); + } + if (object.gcfsConfig != null) { + if (typeof object.gcfsConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.gcfsConfig: object expected"); + message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); + } + if (object.confidentialNodes != null) { + if (typeof object.confidentialNodes !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.confidentialNodes: object expected"); + message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); + } + if (object.gvnic != null) { + if (typeof object.gvnic !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.gvnic: object expected"); + message.gvnic = $root.google.container.v1beta1.VirtualNIC.fromObject(object.gvnic); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.fastSocket != null) { + if (typeof object.fastSocket !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.fastSocket: object expected"); + message.fastSocket = $root.google.container.v1beta1.FastSocket.fromObject(object.fastSocket); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.loggingConfig: object expected"); + message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); + } + if (object.resourceLabels != null) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.resourceLabels: object expected"); + message.resourceLabels = $root.google.container.v1beta1.ResourceLabels.fromObject(object.resourceLabels); + } + if (object.windowsNodeConfig != null) { + if (typeof object.windowsNodeConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.windowsNodeConfig: object expected"); + message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); + } + if (object.accelerators) { + if (!Array.isArray(object.accelerators)) + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.accelerators: array expected"); + message.accelerators = []; + for (var i = 0; i < object.accelerators.length; ++i) { + if (typeof object.accelerators[i] !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.accelerators: object expected"); + message.accelerators[i] = $root.google.container.v1beta1.AcceleratorConfig.fromObject(object.accelerators[i]); + } + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.containerdConfig != null) { + if (typeof object.containerdConfig !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.containerdConfig: object expected"); + message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); + } + if (object.queuedProvisioning != null) { + if (typeof object.queuedProvisioning !== "object") + throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.queuedProvisioning: object expected"); + message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); + } + return message; + }; + + /** + * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {google.container.v1beta1.UpdateNodePoolRequest} message UpdateNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.locations = []; + object.accelerators = []; + } + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.nodeVersion = ""; + object.imageType = ""; + object.name = ""; + object.workloadMetadataConfig = null; + object.upgradeSettings = null; + object.tags = null; + object.taints = null; + object.labels = null; + object.linuxNodeConfig = null; + object.kubeletConfig = null; + object.nodeNetworkConfig = null; + object.gcfsConfig = null; + object.confidentialNodes = null; + object.gvnic = null; + object.etag = ""; + object.fastSocket = null; + object.loggingConfig = null; + object.resourceLabels = null; + object.windowsNodeConfig = null; + object.machineType = ""; + object.diskType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + object.resourceManagerTags = null; + object.containerdConfig = null; + object.queuedProvisioning = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) + object.nodeVersion = message.nodeVersion; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) + object.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.tags != null && message.hasOwnProperty("tags")) + object.tags = $root.google.container.v1beta1.NetworkTags.toObject(message.tags, options); + if (message.taints != null && message.hasOwnProperty("taints")) + object.taints = $root.google.container.v1beta1.NodeTaints.toObject(message.taints, options); + if (message.labels != null && message.hasOwnProperty("labels")) + object.labels = $root.google.container.v1beta1.NodeLabels.toObject(message.labels, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); + if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) + object.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.kubeletConfig, options); + if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) + object.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.toObject(message.nodeNetworkConfig, options); + if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) + object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); + if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) + object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); + if (message.gvnic != null && message.hasOwnProperty("gvnic")) + object.gvnic = $root.google.container.v1beta1.VirtualNIC.toObject(message.gvnic, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) + object.fastSocket = $root.google.container.v1beta1.FastSocket.toObject(message.fastSocket, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) + object.resourceLabels = $root.google.container.v1beta1.ResourceLabels.toObject(message.resourceLabels, options); + if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) + object.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); + if (message.accelerators && message.accelerators.length) { + object.accelerators = []; + for (var j = 0; j < message.accelerators.length; ++j) + object.accelerators[j] = $root.google.container.v1beta1.AcceleratorConfig.toObject(message.accelerators[j], options); + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) + object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) + object.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); + return object; + }; + + /** + * Converts this UpdateNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.UpdateNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UpdateNodePoolRequest"; + }; + + return UpdateNodePoolRequest; + })(); + + v1beta1.SetNodePoolAutoscalingRequest = (function() { + + /** + * Properties of a SetNodePoolAutoscalingRequest. + * @memberof google.container.v1beta1 + * @interface ISetNodePoolAutoscalingRequest + * @property {string|null} [projectId] SetNodePoolAutoscalingRequest projectId + * @property {string|null} [zone] SetNodePoolAutoscalingRequest zone + * @property {string|null} [clusterId] SetNodePoolAutoscalingRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolAutoscalingRequest nodePoolId + * @property {google.container.v1beta1.INodePoolAutoscaling|null} [autoscaling] SetNodePoolAutoscalingRequest autoscaling + * @property {string|null} [name] SetNodePoolAutoscalingRequest name + */ + + /** + * Constructs a new SetNodePoolAutoscalingRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetNodePoolAutoscalingRequest. + * @implements ISetNodePoolAutoscalingRequest + * @constructor + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set + */ + function SetNodePoolAutoscalingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolAutoscalingRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.projectId = ""; + + /** + * SetNodePoolAutoscalingRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.zone = ""; + + /** + * SetNodePoolAutoscalingRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.clusterId = ""; + + /** + * SetNodePoolAutoscalingRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolAutoscalingRequest autoscaling. + * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.autoscaling = null; + + /** + * SetNodePoolAutoscalingRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + */ + SetNodePoolAutoscalingRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest instance + */ + SetNodePoolAutoscalingRequest.create = function create(properties) { + return new SetNodePoolAutoscalingRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolAutoscalingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolAutoscalingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolAutoscalingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolAutoscalingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolAutoscalingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolAutoscalingRequest message. + * @function verify + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolAutoscalingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest + */ + SetNodePoolAutoscalingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetNodePoolAutoscalingRequest) + return object; + var message = new $root.google.container.v1beta1.SetNodePoolAutoscalingRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1beta1.SetNodePoolAutoscalingRequest.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.autoscaling); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {google.container.v1beta1.SetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolAutoscalingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.autoscaling = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolAutoscalingRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolAutoscalingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolAutoscalingRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolAutoscalingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolAutoscalingRequest"; + }; + + return SetNodePoolAutoscalingRequest; + })(); + + v1beta1.SetLoggingServiceRequest = (function() { + + /** + * Properties of a SetLoggingServiceRequest. + * @memberof google.container.v1beta1 + * @interface ISetLoggingServiceRequest + * @property {string|null} [projectId] SetLoggingServiceRequest projectId + * @property {string|null} [zone] SetLoggingServiceRequest zone + * @property {string|null} [clusterId] SetLoggingServiceRequest clusterId + * @property {string|null} [loggingService] SetLoggingServiceRequest loggingService + * @property {string|null} [name] SetLoggingServiceRequest name + */ + + /** + * Constructs a new SetLoggingServiceRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetLoggingServiceRequest. + * @implements ISetLoggingServiceRequest + * @constructor + * @param {google.container.v1beta1.ISetLoggingServiceRequest=} [properties] Properties to set + */ + function SetLoggingServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLoggingServiceRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.projectId = ""; + + /** + * SetLoggingServiceRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.zone = ""; + + /** + * SetLoggingServiceRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.clusterId = ""; + + /** + * SetLoggingServiceRequest loggingService. + * @member {string} loggingService + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.loggingService = ""; + + /** + * SetLoggingServiceRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + */ + SetLoggingServiceRequest.prototype.name = ""; + + /** + * Creates a new SetLoggingServiceRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {google.container.v1beta1.ISetLoggingServiceRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest instance + */ + SetLoggingServiceRequest.create = function create(properties) { + return new SetLoggingServiceRequest(properties); + }; + + /** + * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {google.container.v1beta1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLoggingServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.loggingService); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {google.container.v1beta1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLoggingServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLoggingServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLoggingServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.loggingService = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLoggingServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLoggingServiceRequest message. + * @function verify + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLoggingServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + if (!$util.isString(message.loggingService)) + return "loggingService: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest + */ + SetLoggingServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetLoggingServiceRequest) + return object; + var message = new $root.google.container.v1beta1.SetLoggingServiceRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.loggingService != null) + message.loggingService = String(object.loggingService); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {google.container.v1beta1.SetLoggingServiceRequest} message SetLoggingServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLoggingServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.loggingService = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.loggingService != null && message.hasOwnProperty("loggingService")) + object.loggingService = message.loggingService; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLoggingServiceRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @instance + * @returns {Object.} JSON object + */ + SetLoggingServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLoggingServiceRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetLoggingServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLoggingServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetLoggingServiceRequest"; + }; + + return SetLoggingServiceRequest; + })(); + + v1beta1.SetMonitoringServiceRequest = (function() { + + /** + * Properties of a SetMonitoringServiceRequest. + * @memberof google.container.v1beta1 + * @interface ISetMonitoringServiceRequest + * @property {string|null} [projectId] SetMonitoringServiceRequest projectId + * @property {string|null} [zone] SetMonitoringServiceRequest zone + * @property {string|null} [clusterId] SetMonitoringServiceRequest clusterId + * @property {string|null} [monitoringService] SetMonitoringServiceRequest monitoringService + * @property {string|null} [name] SetMonitoringServiceRequest name + */ + + /** + * Constructs a new SetMonitoringServiceRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetMonitoringServiceRequest. + * @implements ISetMonitoringServiceRequest + * @constructor + * @param {google.container.v1beta1.ISetMonitoringServiceRequest=} [properties] Properties to set + */ + function SetMonitoringServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMonitoringServiceRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.projectId = ""; + + /** + * SetMonitoringServiceRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.zone = ""; + + /** + * SetMonitoringServiceRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.clusterId = ""; + + /** + * SetMonitoringServiceRequest monitoringService. + * @member {string} monitoringService + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.monitoringService = ""; + + /** + * SetMonitoringServiceRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + */ + SetMonitoringServiceRequest.prototype.name = ""; + + /** + * Creates a new SetMonitoringServiceRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1beta1.ISetMonitoringServiceRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest instance + */ + SetMonitoringServiceRequest.create = function create(properties) { + return new SetMonitoringServiceRequest(properties); + }; + + /** + * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1beta1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMonitoringServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.monitoringService); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1beta1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMonitoringServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMonitoringServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMonitoringServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.monitoringService = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMonitoringServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMonitoringServiceRequest message. + * @function verify + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMonitoringServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + if (!$util.isString(message.monitoringService)) + return "monitoringService: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest + */ + SetMonitoringServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetMonitoringServiceRequest) + return object; + var message = new $root.google.container.v1beta1.SetMonitoringServiceRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.monitoringService != null) + message.monitoringService = String(object.monitoringService); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {google.container.v1beta1.SetMonitoringServiceRequest} message SetMonitoringServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMonitoringServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.monitoringService = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) + object.monitoringService = message.monitoringService; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMonitoringServiceRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @instance + * @returns {Object.} JSON object + */ + SetMonitoringServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMonitoringServiceRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetMonitoringServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMonitoringServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetMonitoringServiceRequest"; + }; + + return SetMonitoringServiceRequest; + })(); + + v1beta1.SetAddonsConfigRequest = (function() { + + /** + * Properties of a SetAddonsConfigRequest. + * @memberof google.container.v1beta1 + * @interface ISetAddonsConfigRequest + * @property {string|null} [projectId] SetAddonsConfigRequest projectId + * @property {string|null} [zone] SetAddonsConfigRequest zone + * @property {string|null} [clusterId] SetAddonsConfigRequest clusterId + * @property {google.container.v1beta1.IAddonsConfig|null} [addonsConfig] SetAddonsConfigRequest addonsConfig + * @property {string|null} [name] SetAddonsConfigRequest name + */ + + /** + * Constructs a new SetAddonsConfigRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetAddonsConfigRequest. + * @implements ISetAddonsConfigRequest + * @constructor + * @param {google.container.v1beta1.ISetAddonsConfigRequest=} [properties] Properties to set + */ + function SetAddonsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetAddonsConfigRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.projectId = ""; + + /** + * SetAddonsConfigRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.zone = ""; + + /** + * SetAddonsConfigRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.clusterId = ""; + + /** + * SetAddonsConfigRequest addonsConfig. + * @member {google.container.v1beta1.IAddonsConfig|null|undefined} addonsConfig + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.addonsConfig = null; + + /** + * SetAddonsConfigRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + */ + SetAddonsConfigRequest.prototype.name = ""; + + /** + * Creates a new SetAddonsConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {google.container.v1beta1.ISetAddonsConfigRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest instance + */ + SetAddonsConfigRequest.create = function create(properties) { + return new SetAddonsConfigRequest(properties); + }; + + /** + * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {google.container.v1beta1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetAddonsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) + $root.google.container.v1beta1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {google.container.v1beta1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetAddonsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetAddonsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetAddonsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetAddonsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetAddonsConfigRequest message. + * @function verify + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetAddonsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { + var error = $root.google.container.v1beta1.AddonsConfig.verify(message.addonsConfig); + if (error) + return "addonsConfig." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest + */ + SetAddonsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetAddonsConfigRequest) + return object; + var message = new $root.google.container.v1beta1.SetAddonsConfigRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.addonsConfig != null) { + if (typeof object.addonsConfig !== "object") + throw TypeError(".google.container.v1beta1.SetAddonsConfigRequest.addonsConfig: object expected"); + message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.addonsConfig); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {google.container.v1beta1.SetAddonsConfigRequest} message SetAddonsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetAddonsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.addonsConfig = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) + object.addonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.addonsConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetAddonsConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + SetAddonsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetAddonsConfigRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetAddonsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetAddonsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetAddonsConfigRequest"; + }; + + return SetAddonsConfigRequest; + })(); + + v1beta1.SetLocationsRequest = (function() { + + /** + * Properties of a SetLocationsRequest. + * @memberof google.container.v1beta1 + * @interface ISetLocationsRequest + * @property {string|null} [projectId] SetLocationsRequest projectId + * @property {string|null} [zone] SetLocationsRequest zone + * @property {string|null} [clusterId] SetLocationsRequest clusterId + * @property {Array.|null} [locations] SetLocationsRequest locations + * @property {string|null} [name] SetLocationsRequest name + */ + + /** + * Constructs a new SetLocationsRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetLocationsRequest. + * @implements ISetLocationsRequest + * @constructor + * @param {google.container.v1beta1.ISetLocationsRequest=} [properties] Properties to set + */ + function SetLocationsRequest(properties) { + this.locations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLocationsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.projectId = ""; + + /** + * SetLocationsRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.zone = ""; + + /** + * SetLocationsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.clusterId = ""; + + /** + * SetLocationsRequest locations. + * @member {Array.} locations + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.locations = $util.emptyArray; + + /** + * SetLocationsRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + */ + SetLocationsRequest.prototype.name = ""; + + /** + * Creates a new SetLocationsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {google.container.v1beta1.ISetLocationsRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest instance + */ + SetLocationsRequest.create = function create(properties) { + return new SetLocationsRequest(properties); + }; + + /** + * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {google.container.v1beta1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locations[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {google.container.v1beta1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLocationsRequest message. + * @function verify + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest + */ + SetLocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetLocationsRequest) + return object; + var message = new $root.google.container.v1beta1.SetLocationsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1beta1.SetLocationsRequest.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {google.container.v1beta1.SetLocationsRequest} message SetLocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLocationsRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetLocationsRequest + * @instance + * @returns {Object.} JSON object + */ + SetLocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLocationsRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetLocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetLocationsRequest"; + }; + + return SetLocationsRequest; + })(); + + v1beta1.UpdateMasterRequest = (function() { + + /** + * Properties of an UpdateMasterRequest. + * @memberof google.container.v1beta1 + * @interface IUpdateMasterRequest + * @property {string|null} [projectId] UpdateMasterRequest projectId + * @property {string|null} [zone] UpdateMasterRequest zone + * @property {string|null} [clusterId] UpdateMasterRequest clusterId + * @property {string|null} [masterVersion] UpdateMasterRequest masterVersion + * @property {string|null} [name] UpdateMasterRequest name + */ + + /** + * Constructs a new UpdateMasterRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents an UpdateMasterRequest. + * @implements IUpdateMasterRequest + * @constructor + * @param {google.container.v1beta1.IUpdateMasterRequest=} [properties] Properties to set + */ + function UpdateMasterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMasterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.projectId = ""; + + /** + * UpdateMasterRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.zone = ""; + + /** + * UpdateMasterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.clusterId = ""; + + /** + * UpdateMasterRequest masterVersion. + * @member {string} masterVersion + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.masterVersion = ""; + + /** + * UpdateMasterRequest name. + * @member {string} name + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + */ + UpdateMasterRequest.prototype.name = ""; + + /** + * Creates a new UpdateMasterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {google.container.v1beta1.IUpdateMasterRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest instance + */ + UpdateMasterRequest.create = function create(properties) { + return new UpdateMasterRequest(properties); + }; + + /** + * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {google.container.v1beta1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMasterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.masterVersion != null && Object.hasOwnProperty.call(message, "masterVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {google.container.v1beta1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMasterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateMasterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.masterVersion = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMasterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMasterRequest message. + * @function verify + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMasterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) + if (!$util.isString(message.masterVersion)) + return "masterVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest + */ + UpdateMasterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UpdateMasterRequest) + return object; + var message = new $root.google.container.v1beta1.UpdateMasterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.masterVersion != null) + message.masterVersion = String(object.masterVersion); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {google.container.v1beta1.UpdateMasterRequest} message UpdateMasterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMasterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.masterVersion = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) + object.masterVersion = message.masterVersion; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this UpdateMasterRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UpdateMasterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMasterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMasterRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.UpdateMasterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMasterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UpdateMasterRequest"; + }; + + return UpdateMasterRequest; + })(); + + v1beta1.SetMasterAuthRequest = (function() { + + /** + * Properties of a SetMasterAuthRequest. + * @memberof google.container.v1beta1 + * @interface ISetMasterAuthRequest + * @property {string|null} [projectId] SetMasterAuthRequest projectId + * @property {string|null} [zone] SetMasterAuthRequest zone + * @property {string|null} [clusterId] SetMasterAuthRequest clusterId + * @property {google.container.v1beta1.SetMasterAuthRequest.Action|null} [action] SetMasterAuthRequest action + * @property {google.container.v1beta1.IMasterAuth|null} [update] SetMasterAuthRequest update + * @property {string|null} [name] SetMasterAuthRequest name + */ + + /** + * Constructs a new SetMasterAuthRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetMasterAuthRequest. + * @implements ISetMasterAuthRequest + * @constructor + * @param {google.container.v1beta1.ISetMasterAuthRequest=} [properties] Properties to set + */ + function SetMasterAuthRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMasterAuthRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.projectId = ""; + + /** + * SetMasterAuthRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.zone = ""; + + /** + * SetMasterAuthRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.clusterId = ""; + + /** + * SetMasterAuthRequest action. + * @member {google.container.v1beta1.SetMasterAuthRequest.Action} action + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.action = 0; + + /** + * SetMasterAuthRequest update. + * @member {google.container.v1beta1.IMasterAuth|null|undefined} update + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.update = null; + + /** + * SetMasterAuthRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + */ + SetMasterAuthRequest.prototype.name = ""; + + /** + * Creates a new SetMasterAuthRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {google.container.v1beta1.ISetMasterAuthRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest instance + */ + SetMasterAuthRequest.create = function create(properties) { + return new SetMasterAuthRequest(properties); + }; + + /** + * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {google.container.v1beta1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMasterAuthRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.container.v1beta1.MasterAuth.encode(message.update, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {google.container.v1beta1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMasterAuthRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMasterAuthRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMasterAuthRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.action = reader.int32(); + break; + } + case 5: { + message.update = $root.google.container.v1beta1.MasterAuth.decode(reader, reader.uint32()); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMasterAuthRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMasterAuthRequest message. + * @function verify + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMasterAuthRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.update != null && message.hasOwnProperty("update")) { + var error = $root.google.container.v1beta1.MasterAuth.verify(message.update); + if (error) + return "update." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest + */ + SetMasterAuthRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetMasterAuthRequest) + return object; + var message = new $root.google.container.v1beta1.SetMasterAuthRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "UNKNOWN": + case 0: + message.action = 0; + break; + case "SET_PASSWORD": + case 1: + message.action = 1; + break; + case "GENERATE_PASSWORD": + case 2: + message.action = 2; + break; + case "SET_USERNAME": + case 3: + message.action = 3; + break; + } + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.container.v1beta1.SetMasterAuthRequest.update: object expected"); + message.update = $root.google.container.v1beta1.MasterAuth.fromObject(object.update); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {google.container.v1beta1.SetMasterAuthRequest} message SetMasterAuthRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMasterAuthRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.action = options.enums === String ? "UNKNOWN" : 0; + object.update = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.container.v1beta1.SetMasterAuthRequest.Action[message.action] === undefined ? message.action : $root.google.container.v1beta1.SetMasterAuthRequest.Action[message.action] : message.action; + if (message.update != null && message.hasOwnProperty("update")) + object.update = $root.google.container.v1beta1.MasterAuth.toObject(message.update, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMasterAuthRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @instance + * @returns {Object.} JSON object + */ + SetMasterAuthRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMasterAuthRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetMasterAuthRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMasterAuthRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetMasterAuthRequest"; + }; + + /** + * Action enum. + * @name google.container.v1beta1.SetMasterAuthRequest.Action + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} SET_PASSWORD=1 SET_PASSWORD value + * @property {number} GENERATE_PASSWORD=2 GENERATE_PASSWORD value + * @property {number} SET_USERNAME=3 SET_USERNAME value + */ + SetMasterAuthRequest.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "SET_PASSWORD"] = 1; + values[valuesById[2] = "GENERATE_PASSWORD"] = 2; + values[valuesById[3] = "SET_USERNAME"] = 3; + return values; + })(); + + return SetMasterAuthRequest; + })(); + + v1beta1.DeleteClusterRequest = (function() { + + /** + * Properties of a DeleteClusterRequest. + * @memberof google.container.v1beta1 + * @interface IDeleteClusterRequest + * @property {string|null} [projectId] DeleteClusterRequest projectId + * @property {string|null} [zone] DeleteClusterRequest zone + * @property {string|null} [clusterId] DeleteClusterRequest clusterId + * @property {string|null} [name] DeleteClusterRequest name + */ + + /** + * Constructs a new DeleteClusterRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a DeleteClusterRequest. + * @implements IDeleteClusterRequest + * @constructor + * @param {google.container.v1beta1.IDeleteClusterRequest=} [properties] Properties to set + */ + function DeleteClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteClusterRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.projectId = ""; + + /** + * DeleteClusterRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.zone = ""; + + /** + * DeleteClusterRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.clusterId = ""; + + /** + * DeleteClusterRequest name. + * @member {string} name + * @memberof google.container.v1beta1.DeleteClusterRequest + * @instance + */ + DeleteClusterRequest.prototype.name = ""; + + /** + * Creates a new DeleteClusterRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {google.container.v1beta1.IDeleteClusterRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest instance + */ + DeleteClusterRequest.create = function create(properties) { + return new DeleteClusterRequest(properties); + }; + + /** + * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {google.container.v1beta1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {google.container.v1beta1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DeleteClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteClusterRequest message. + * @function verify + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest + */ + DeleteClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DeleteClusterRequest) + return object; + var message = new $root.google.container.v1beta1.DeleteClusterRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {google.container.v1beta1.DeleteClusterRequest} message DeleteClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteClusterRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DeleteClusterRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteClusterRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.DeleteClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DeleteClusterRequest"; + }; + + return DeleteClusterRequest; + })(); + + v1beta1.ListClustersRequest = (function() { + + /** + * Properties of a ListClustersRequest. + * @memberof google.container.v1beta1 + * @interface IListClustersRequest + * @property {string|null} [projectId] ListClustersRequest projectId + * @property {string|null} [zone] ListClustersRequest zone + * @property {string|null} [parent] ListClustersRequest parent + */ + + /** + * Constructs a new ListClustersRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListClustersRequest. + * @implements IListClustersRequest + * @constructor + * @param {google.container.v1beta1.IListClustersRequest=} [properties] Properties to set + */ + function ListClustersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.projectId = ""; + + /** + * ListClustersRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.zone = ""; + + /** + * ListClustersRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.ListClustersRequest + * @instance + */ + ListClustersRequest.prototype.parent = ""; + + /** + * Creates a new ListClustersRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {google.container.v1beta1.IListClustersRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest instance + */ + ListClustersRequest.create = function create(properties) { + return new ListClustersRequest(properties); + }; + + /** + * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {google.container.v1beta1.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {google.container.v1beta1.IListClustersRequest} message ListClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListClustersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersRequest message. + * @function verify + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest + */ + ListClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListClustersRequest) + return object; + var message = new $root.google.container.v1beta1.ListClustersRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {google.container.v1beta1.ListClustersRequest} message ListClustersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListClustersRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListClustersRequest + * @instance + * @returns {Object.} JSON object + */ + ListClustersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.ListClustersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListClustersRequest"; + }; + + return ListClustersRequest; + })(); + + v1beta1.ListClustersResponse = (function() { + + /** + * Properties of a ListClustersResponse. + * @memberof google.container.v1beta1 + * @interface IListClustersResponse + * @property {Array.|null} [clusters] ListClustersResponse clusters + * @property {Array.|null} [missingZones] ListClustersResponse missingZones + */ + + /** + * Constructs a new ListClustersResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListClustersResponse. + * @implements IListClustersResponse + * @constructor + * @param {google.container.v1beta1.IListClustersResponse=} [properties] Properties to set + */ + function ListClustersResponse(properties) { + this.clusters = []; + this.missingZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListClustersResponse clusters. + * @member {Array.} clusters + * @memberof google.container.v1beta1.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.clusters = $util.emptyArray; + + /** + * ListClustersResponse missingZones. + * @member {Array.} missingZones + * @memberof google.container.v1beta1.ListClustersResponse + * @instance + */ + ListClustersResponse.prototype.missingZones = $util.emptyArray; + + /** + * Creates a new ListClustersResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {google.container.v1beta1.IListClustersResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse instance + */ + ListClustersResponse.create = function create(properties) { + return new ListClustersResponse(properties); + }; + + /** + * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {google.container.v1beta1.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusters != null && message.clusters.length) + for (var i = 0; i < message.clusters.length; ++i) + $root.google.container.v1beta1.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.missingZones != null && message.missingZones.length) + for (var i = 0; i < message.missingZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); + return writer; + }; + + /** + * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {google.container.v1beta1.IListClustersResponse} message ListClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListClustersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.clusters && message.clusters.length)) + message.clusters = []; + message.clusters.push($root.google.container.v1beta1.Cluster.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.missingZones && message.missingZones.length)) + message.missingZones = []; + message.missingZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListClustersResponse message. + * @function verify + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClustersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusters != null && message.hasOwnProperty("clusters")) { + if (!Array.isArray(message.clusters)) + return "clusters: array expected"; + for (var i = 0; i < message.clusters.length; ++i) { + var error = $root.google.container.v1beta1.Cluster.verify(message.clusters[i]); + if (error) + return "clusters." + error; + } + } + if (message.missingZones != null && message.hasOwnProperty("missingZones")) { + if (!Array.isArray(message.missingZones)) + return "missingZones: array expected"; + for (var i = 0; i < message.missingZones.length; ++i) + if (!$util.isString(message.missingZones[i])) + return "missingZones: string[] expected"; + } + return null; + }; + + /** + * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse + */ + ListClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListClustersResponse) + return object; + var message = new $root.google.container.v1beta1.ListClustersResponse(); + if (object.clusters) { + if (!Array.isArray(object.clusters)) + throw TypeError(".google.container.v1beta1.ListClustersResponse.clusters: array expected"); + message.clusters = []; + for (var i = 0; i < object.clusters.length; ++i) { + if (typeof object.clusters[i] !== "object") + throw TypeError(".google.container.v1beta1.ListClustersResponse.clusters: object expected"); + message.clusters[i] = $root.google.container.v1beta1.Cluster.fromObject(object.clusters[i]); + } + } + if (object.missingZones) { + if (!Array.isArray(object.missingZones)) + throw TypeError(".google.container.v1beta1.ListClustersResponse.missingZones: array expected"); + message.missingZones = []; + for (var i = 0; i < object.missingZones.length; ++i) + message.missingZones[i] = String(object.missingZones[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {google.container.v1beta1.ListClustersResponse} message ListClustersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClustersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.clusters = []; + object.missingZones = []; + } + if (message.clusters && message.clusters.length) { + object.clusters = []; + for (var j = 0; j < message.clusters.length; ++j) + object.clusters[j] = $root.google.container.v1beta1.Cluster.toObject(message.clusters[j], options); + } + if (message.missingZones && message.missingZones.length) { + object.missingZones = []; + for (var j = 0; j < message.missingZones.length; ++j) + object.missingZones[j] = message.missingZones[j]; + } + return object; + }; + + /** + * Converts this ListClustersResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListClustersResponse + * @instance + * @returns {Object.} JSON object + */ + ListClustersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListClustersResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.ListClustersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListClustersResponse"; + }; + + return ListClustersResponse; + })(); + + v1beta1.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.container.v1beta1 + * @interface IGetOperationRequest + * @property {string|null} [projectId] GetOperationRequest projectId + * @property {string|null} [zone] GetOperationRequest zone + * @property {string|null} [operationId] GetOperationRequest operationId + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.container.v1beta1.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.projectId = ""; + + /** + * GetOperationRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.zone = ""; + + /** + * GetOperationRequest operationId. + * @member {string} operationId + * @memberof google.container.v1beta1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.operationId = ""; + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.container.v1beta1.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {google.container.v1beta1.IGetOperationRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {google.container.v1beta1.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {google.container.v1beta1.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationId = reader.string(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationId != null && message.hasOwnProperty("operationId")) + if (!$util.isString(message.operationId)) + return "operationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetOperationRequest) + return object; + var message = new $root.google.container.v1beta1.GetOperationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.operationId != null) + message.operationId = String(object.operationId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {google.container.v1beta1.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.operationId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationId != null && message.hasOwnProperty("operationId")) + object.operationId = message.operationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + v1beta1.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.container.v1beta1 + * @interface IListOperationsRequest + * @property {string|null} [projectId] ListOperationsRequest projectId + * @property {string|null} [zone] ListOperationsRequest zone + * @property {string|null} [parent] ListOperationsRequest parent + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.container.v1beta1.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.projectId = ""; + + /** + * ListOperationsRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.zone = ""; + + /** + * ListOperationsRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.parent = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {google.container.v1beta1.IListOperationsRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {google.container.v1beta1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {google.container.v1beta1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListOperationsRequest) + return object; + var message = new $root.google.container.v1beta1.ListOperationsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {google.container.v1beta1.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + v1beta1.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.container.v1beta1 + * @interface ICancelOperationRequest + * @property {string|null} [projectId] CancelOperationRequest projectId + * @property {string|null} [zone] CancelOperationRequest zone + * @property {string|null} [operationId] CancelOperationRequest operationId + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.container.v1beta1.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.projectId = ""; + + /** + * CancelOperationRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.zone = ""; + + /** + * CancelOperationRequest operationId. + * @member {string} operationId + * @memberof google.container.v1beta1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.operationId = ""; + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.container.v1beta1.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {google.container.v1beta1.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {google.container.v1beta1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {google.container.v1beta1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.operationId = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.operationId != null && message.hasOwnProperty("operationId")) + if (!$util.isString(message.operationId)) + return "operationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CancelOperationRequest) + return object; + var message = new $root.google.container.v1beta1.CancelOperationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.operationId != null) + message.operationId = String(object.operationId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {google.container.v1beta1.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.operationId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.operationId != null && message.hasOwnProperty("operationId")) + object.operationId = message.operationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + v1beta1.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.container.v1beta1 + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {Array.|null} [missingZones] ListOperationsResponse missingZones + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.container.v1beta1.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + this.missingZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.container.v1beta1.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse missingZones. + * @member {Array.} missingZones + * @memberof google.container.v1beta1.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.missingZones = $util.emptyArray; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {google.container.v1beta1.IListOperationsResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {google.container.v1beta1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.container.v1beta1.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.missingZones != null && message.missingZones.length) + for (var i = 0; i < message.missingZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {google.container.v1beta1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.container.v1beta1.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.missingZones && message.missingZones.length)) + message.missingZones = []; + message.missingZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.container.v1beta1.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.missingZones != null && message.hasOwnProperty("missingZones")) { + if (!Array.isArray(message.missingZones)) + return "missingZones: array expected"; + for (var i = 0; i < message.missingZones.length; ++i) + if (!$util.isString(message.missingZones[i])) + return "missingZones: string[] expected"; + } + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListOperationsResponse) + return object; + var message = new $root.google.container.v1beta1.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.container.v1beta1.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.container.v1beta1.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.container.v1beta1.Operation.fromObject(object.operations[i]); + } + } + if (object.missingZones) { + if (!Array.isArray(object.missingZones)) + throw TypeError(".google.container.v1beta1.ListOperationsResponse.missingZones: array expected"); + message.missingZones = []; + for (var i = 0; i < object.missingZones.length; ++i) + message.missingZones[i] = String(object.missingZones[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {google.container.v1beta1.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.operations = []; + object.missingZones = []; + } + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.container.v1beta1.Operation.toObject(message.operations[j], options); + } + if (message.missingZones && message.missingZones.length) { + object.missingZones = []; + for (var j = 0; j < message.missingZones.length; ++j) + object.missingZones[j] = message.missingZones[j]; + } + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + v1beta1.GetServerConfigRequest = (function() { + + /** + * Properties of a GetServerConfigRequest. + * @memberof google.container.v1beta1 + * @interface IGetServerConfigRequest + * @property {string|null} [projectId] GetServerConfigRequest projectId + * @property {string|null} [zone] GetServerConfigRequest zone + * @property {string|null} [name] GetServerConfigRequest name + */ + + /** + * Constructs a new GetServerConfigRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetServerConfigRequest. + * @implements IGetServerConfigRequest + * @constructor + * @param {google.container.v1beta1.IGetServerConfigRequest=} [properties] Properties to set + */ + function GetServerConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServerConfigRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.projectId = ""; + + /** + * GetServerConfigRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.zone = ""; + + /** + * GetServerConfigRequest name. + * @member {string} name + * @memberof google.container.v1beta1.GetServerConfigRequest + * @instance + */ + GetServerConfigRequest.prototype.name = ""; + + /** + * Creates a new GetServerConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {google.container.v1beta1.IGetServerConfigRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest instance + */ + GetServerConfigRequest.create = function create(properties) { + return new GetServerConfigRequest(properties); + }; + + /** + * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {google.container.v1beta1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {google.container.v1beta1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetServerConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServerConfigRequest message. + * @function verify + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServerConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest + */ + GetServerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetServerConfigRequest) + return object; + var message = new $root.google.container.v1beta1.GetServerConfigRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {google.container.v1beta1.GetServerConfigRequest} message GetServerConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServerConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetServerConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetServerConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetServerConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetServerConfigRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetServerConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetServerConfigRequest"; + }; + + return GetServerConfigRequest; + })(); + + v1beta1.ServerConfig = (function() { + + /** + * Properties of a ServerConfig. + * @memberof google.container.v1beta1 + * @interface IServerConfig + * @property {string|null} [defaultClusterVersion] ServerConfig defaultClusterVersion + * @property {Array.|null} [validNodeVersions] ServerConfig validNodeVersions + * @property {string|null} [defaultImageType] ServerConfig defaultImageType + * @property {Array.|null} [validImageTypes] ServerConfig validImageTypes + * @property {Array.|null} [validMasterVersions] ServerConfig validMasterVersions + * @property {Array.|null} [channels] ServerConfig channels + * @property {Object.|null} [windowsVersionMaps] ServerConfig windowsVersionMaps + */ + + /** + * Constructs a new ServerConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ServerConfig. + * @implements IServerConfig + * @constructor + * @param {google.container.v1beta1.IServerConfig=} [properties] Properties to set + */ + function ServerConfig(properties) { + this.validNodeVersions = []; + this.validImageTypes = []; + this.validMasterVersions = []; + this.channels = []; + this.windowsVersionMaps = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerConfig defaultClusterVersion. + * @member {string} defaultClusterVersion + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.defaultClusterVersion = ""; + + /** + * ServerConfig validNodeVersions. + * @member {Array.} validNodeVersions + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.validNodeVersions = $util.emptyArray; + + /** + * ServerConfig defaultImageType. + * @member {string} defaultImageType + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.defaultImageType = ""; + + /** + * ServerConfig validImageTypes. + * @member {Array.} validImageTypes + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.validImageTypes = $util.emptyArray; + + /** + * ServerConfig validMasterVersions. + * @member {Array.} validMasterVersions + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.validMasterVersions = $util.emptyArray; + + /** + * ServerConfig channels. + * @member {Array.} channels + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.channels = $util.emptyArray; + + /** + * ServerConfig windowsVersionMaps. + * @member {Object.} windowsVersionMaps + * @memberof google.container.v1beta1.ServerConfig + * @instance + */ + ServerConfig.prototype.windowsVersionMaps = $util.emptyObject; + + /** + * Creates a new ServerConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {google.container.v1beta1.IServerConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ServerConfig} ServerConfig instance + */ + ServerConfig.create = function create(properties) { + return new ServerConfig(properties); + }; + + /** + * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {google.container.v1beta1.IServerConfig} message ServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultClusterVersion != null && Object.hasOwnProperty.call(message, "defaultClusterVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultClusterVersion); + if (message.validNodeVersions != null && message.validNodeVersions.length) + for (var i = 0; i < message.validNodeVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validNodeVersions[i]); + if (message.defaultImageType != null && Object.hasOwnProperty.call(message, "defaultImageType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultImageType); + if (message.validImageTypes != null && message.validImageTypes.length) + for (var i = 0; i < message.validImageTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validImageTypes[i]); + if (message.validMasterVersions != null && message.validMasterVersions.length) + for (var i = 0; i < message.validMasterVersions.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.validMasterVersions[i]); + if (message.channels != null && message.channels.length) + for (var i = 0; i < message.channels.length; ++i) + $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.encode(message.channels[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.windowsVersionMaps != null && Object.hasOwnProperty.call(message, "windowsVersionMaps")) + for (var keys = Object.keys(message.windowsVersionMaps), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.container.v1beta1.WindowsVersions.encode(message.windowsVersionMaps[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {google.container.v1beta1.IServerConfig} message ServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ServerConfig} ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.defaultClusterVersion = reader.string(); + break; + } + case 3: { + if (!(message.validNodeVersions && message.validNodeVersions.length)) + message.validNodeVersions = []; + message.validNodeVersions.push(reader.string()); + break; + } + case 4: { + message.defaultImageType = reader.string(); + break; + } + case 5: { + if (!(message.validImageTypes && message.validImageTypes.length)) + message.validImageTypes = []; + message.validImageTypes.push(reader.string()); + break; + } + case 6: { + if (!(message.validMasterVersions && message.validMasterVersions.length)) + message.validMasterVersions = []; + message.validMasterVersions.push(reader.string()); + break; + } + case 9: { + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + if (message.windowsVersionMaps === $util.emptyObject) + message.windowsVersionMaps = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.container.v1beta1.WindowsVersions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.windowsVersionMaps[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ServerConfig} ServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerConfig message. + * @function verify + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) + if (!$util.isString(message.defaultClusterVersion)) + return "defaultClusterVersion: string expected"; + if (message.validNodeVersions != null && message.hasOwnProperty("validNodeVersions")) { + if (!Array.isArray(message.validNodeVersions)) + return "validNodeVersions: array expected"; + for (var i = 0; i < message.validNodeVersions.length; ++i) + if (!$util.isString(message.validNodeVersions[i])) + return "validNodeVersions: string[] expected"; + } + if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) + if (!$util.isString(message.defaultImageType)) + return "defaultImageType: string expected"; + if (message.validImageTypes != null && message.hasOwnProperty("validImageTypes")) { + if (!Array.isArray(message.validImageTypes)) + return "validImageTypes: array expected"; + for (var i = 0; i < message.validImageTypes.length; ++i) + if (!$util.isString(message.validImageTypes[i])) + return "validImageTypes: string[] expected"; + } + if (message.validMasterVersions != null && message.hasOwnProperty("validMasterVersions")) { + if (!Array.isArray(message.validMasterVersions)) + return "validMasterVersions: array expected"; + for (var i = 0; i < message.validMasterVersions.length; ++i) + if (!$util.isString(message.validMasterVersions[i])) + return "validMasterVersions: string[] expected"; + } + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (var i = 0; i < message.channels.length; ++i) { + var error = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.windowsVersionMaps != null && message.hasOwnProperty("windowsVersionMaps")) { + if (!$util.isObject(message.windowsVersionMaps)) + return "windowsVersionMaps: object expected"; + var key = Object.keys(message.windowsVersionMaps); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.container.v1beta1.WindowsVersions.verify(message.windowsVersionMaps[key[i]]); + if (error) + return "windowsVersionMaps." + error; + } + } + return null; + }; + + /** + * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ServerConfig} ServerConfig + */ + ServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ServerConfig) + return object; + var message = new $root.google.container.v1beta1.ServerConfig(); + if (object.defaultClusterVersion != null) + message.defaultClusterVersion = String(object.defaultClusterVersion); + if (object.validNodeVersions) { + if (!Array.isArray(object.validNodeVersions)) + throw TypeError(".google.container.v1beta1.ServerConfig.validNodeVersions: array expected"); + message.validNodeVersions = []; + for (var i = 0; i < object.validNodeVersions.length; ++i) + message.validNodeVersions[i] = String(object.validNodeVersions[i]); + } + if (object.defaultImageType != null) + message.defaultImageType = String(object.defaultImageType); + if (object.validImageTypes) { + if (!Array.isArray(object.validImageTypes)) + throw TypeError(".google.container.v1beta1.ServerConfig.validImageTypes: array expected"); + message.validImageTypes = []; + for (var i = 0; i < object.validImageTypes.length; ++i) + message.validImageTypes[i] = String(object.validImageTypes[i]); + } + if (object.validMasterVersions) { + if (!Array.isArray(object.validMasterVersions)) + throw TypeError(".google.container.v1beta1.ServerConfig.validMasterVersions: array expected"); + message.validMasterVersions = []; + for (var i = 0; i < object.validMasterVersions.length; ++i) + message.validMasterVersions[i] = String(object.validMasterVersions[i]); + } + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".google.container.v1beta1.ServerConfig.channels: array expected"); + message.channels = []; + for (var i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".google.container.v1beta1.ServerConfig.channels: object expected"); + message.channels[i] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.fromObject(object.channels[i]); + } + } + if (object.windowsVersionMaps) { + if (typeof object.windowsVersionMaps !== "object") + throw TypeError(".google.container.v1beta1.ServerConfig.windowsVersionMaps: object expected"); + message.windowsVersionMaps = {}; + for (var keys = Object.keys(object.windowsVersionMaps), i = 0; i < keys.length; ++i) { + if (typeof object.windowsVersionMaps[keys[i]] !== "object") + throw TypeError(".google.container.v1beta1.ServerConfig.windowsVersionMaps: object expected"); + message.windowsVersionMaps[keys[i]] = $root.google.container.v1beta1.WindowsVersions.fromObject(object.windowsVersionMaps[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {google.container.v1beta1.ServerConfig} message ServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validNodeVersions = []; + object.validImageTypes = []; + object.validMasterVersions = []; + object.channels = []; + } + if (options.objects || options.defaults) + object.windowsVersionMaps = {}; + if (options.defaults) { + object.defaultClusterVersion = ""; + object.defaultImageType = ""; + } + if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) + object.defaultClusterVersion = message.defaultClusterVersion; + if (message.validNodeVersions && message.validNodeVersions.length) { + object.validNodeVersions = []; + for (var j = 0; j < message.validNodeVersions.length; ++j) + object.validNodeVersions[j] = message.validNodeVersions[j]; + } + if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) + object.defaultImageType = message.defaultImageType; + if (message.validImageTypes && message.validImageTypes.length) { + object.validImageTypes = []; + for (var j = 0; j < message.validImageTypes.length; ++j) + object.validImageTypes[j] = message.validImageTypes[j]; + } + if (message.validMasterVersions && message.validMasterVersions.length) { + object.validMasterVersions = []; + for (var j = 0; j < message.validMasterVersions.length; ++j) + object.validMasterVersions[j] = message.validMasterVersions[j]; + } + if (message.channels && message.channels.length) { + object.channels = []; + for (var j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.toObject(message.channels[j], options); + } + var keys2; + if (message.windowsVersionMaps && (keys2 = Object.keys(message.windowsVersionMaps)).length) { + object.windowsVersionMaps = {}; + for (var j = 0; j < keys2.length; ++j) + object.windowsVersionMaps[keys2[j]] = $root.google.container.v1beta1.WindowsVersions.toObject(message.windowsVersionMaps[keys2[j]], options); + } + return object; + }; + + /** + * Converts this ServerConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ServerConfig + * @instance + * @returns {Object.} JSON object + */ + ServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ServerConfig"; + }; + + ServerConfig.ReleaseChannelConfig = (function() { + + /** + * Properties of a ReleaseChannelConfig. + * @memberof google.container.v1beta1.ServerConfig + * @interface IReleaseChannelConfig + * @property {google.container.v1beta1.ReleaseChannel.Channel|null} [channel] ReleaseChannelConfig channel + * @property {string|null} [defaultVersion] ReleaseChannelConfig defaultVersion + * @property {Array.|null} [availableVersions] ReleaseChannelConfig availableVersions + * @property {Array.|null} [validVersions] ReleaseChannelConfig validVersions + */ + + /** + * Constructs a new ReleaseChannelConfig. + * @memberof google.container.v1beta1.ServerConfig + * @classdesc Represents a ReleaseChannelConfig. + * @implements IReleaseChannelConfig + * @constructor + * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set + */ + function ReleaseChannelConfig(properties) { + this.availableVersions = []; + this.validVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseChannelConfig channel. + * @member {google.container.v1beta1.ReleaseChannel.Channel} channel + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.channel = 0; + + /** + * ReleaseChannelConfig defaultVersion. + * @member {string} defaultVersion + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.defaultVersion = ""; + + /** + * ReleaseChannelConfig availableVersions. + * @member {Array.} availableVersions + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.availableVersions = $util.emptyArray; + + /** + * ReleaseChannelConfig validVersions. + * @member {Array.} validVersions + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.validVersions = $util.emptyArray; + + /** + * Creates a new ReleaseChannelConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig instance + */ + ReleaseChannelConfig.create = function create(properties) { + return new ReleaseChannelConfig(properties); + }; + + /** + * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannelConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + if (message.defaultVersion != null && Object.hasOwnProperty.call(message, "defaultVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultVersion); + if (message.availableVersions != null && message.availableVersions.length) + for (var i = 0; i < message.availableVersions.length; ++i) + $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.encode(message.availableVersions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validVersions != null && message.validVersions.length) + for (var i = 0; i < message.validVersions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.validVersions[i]); + return writer; + }; + + /** + * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannelConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + case 2: { + message.defaultVersion = reader.string(); + break; + } + case 3: { + if (!(message.availableVersions && message.availableVersions.length)) + message.availableVersions = []; + message.availableVersions.push($root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.validVersions && message.validVersions.length)) + message.validVersions = []; + message.validVersions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannelConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseChannelConfig message. + * @function verify + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseChannelConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) + if (!$util.isString(message.defaultVersion)) + return "defaultVersion: string expected"; + if (message.availableVersions != null && message.hasOwnProperty("availableVersions")) { + if (!Array.isArray(message.availableVersions)) + return "availableVersions: array expected"; + for (var i = 0; i < message.availableVersions.length; ++i) { + var error = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify(message.availableVersions[i]); + if (error) + return "availableVersions." + error; + } + } + 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) + if (!$util.isString(message.validVersions[i])) + return "validVersions: string[] expected"; + } + return null; + }; + + /** + * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig + */ + ReleaseChannelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig) + return object; + var message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "RAPID": + case 1: + message.channel = 1; + break; + case "REGULAR": + case 2: + message.channel = 2; + break; + case "STABLE": + case 3: + message.channel = 3; + break; + case "EXTENDED": + case 4: + message.channel = 4; + break; + } + if (object.defaultVersion != null) + message.defaultVersion = String(object.defaultVersion); + if (object.availableVersions) { + if (!Array.isArray(object.availableVersions)) + throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.availableVersions: array expected"); + message.availableVersions = []; + for (var i = 0; i < object.availableVersions.length; ++i) { + if (typeof object.availableVersions[i] !== "object") + throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.availableVersions: object expected"); + message.availableVersions[i] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.fromObject(object.availableVersions[i]); + } + } + if (object.validVersions) { + if (!Array.isArray(object.validVersions)) + throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.validVersions: array expected"); + message.validVersions = []; + for (var i = 0; i < object.validVersions.length; ++i) + message.validVersions[i] = String(object.validVersions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} message ReleaseChannelConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseChannelConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.availableVersions = []; + object.validVersions = []; + } + if (options.defaults) { + object.channel = options.enums === String ? "UNSPECIFIED" : 0; + object.defaultVersion = ""; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] : message.channel; + if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) + object.defaultVersion = message.defaultVersion; + if (message.availableVersions && message.availableVersions.length) { + object.availableVersions = []; + for (var j = 0; j < message.availableVersions.length; ++j) + object.availableVersions[j] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.toObject(message.availableVersions[j], options); + } + if (message.validVersions && message.validVersions.length) { + object.validVersions = []; + for (var j = 0; j < message.validVersions.length; ++j) + object.validVersions[j] = message.validVersions[j]; + } + return object; + }; + + /** + * Converts this ReleaseChannelConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @instance + * @returns {Object.} JSON object + */ + ReleaseChannelConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseChannelConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ServerConfig.ReleaseChannelConfig"; + }; + + ReleaseChannelConfig.AvailableVersion = (function() { + + /** + * Properties of an AvailableVersion. + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @interface IAvailableVersion + * @property {string|null} [version] AvailableVersion version + * @property {string|null} [reason] AvailableVersion reason + */ + + /** + * Constructs a new AvailableVersion. + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig + * @classdesc Represents an AvailableVersion. + * @implements IAvailableVersion + * @constructor + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion=} [properties] Properties to set + */ + function AvailableVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AvailableVersion version. + * @member {string} version + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @instance + */ + AvailableVersion.prototype.version = ""; + + /** + * AvailableVersion reason. + * @member {string} reason + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @instance + */ + AvailableVersion.prototype.reason = ""; + + /** + * Creates a new AvailableVersion instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion=} [properties] Properties to set + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion instance + */ + AvailableVersion.create = function create(properties) { + return new AvailableVersion(properties); + }; + + /** + * Encodes the specified AvailableVersion message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion} message AvailableVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvailableVersion.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.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + return writer; + }; + + /** + * Encodes the specified AvailableVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion} message AvailableVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvailableVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvailableVersion message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvailableVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.reason = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvailableVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvailableVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvailableVersion message. + * @function verify + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvailableVersion.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.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates an AvailableVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion + */ + AvailableVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion) + return object; + var message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from an AvailableVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} message AvailableVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvailableVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.reason = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this AvailableVersion to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @instance + * @returns {Object.} JSON object + */ + AvailableVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AvailableVersion + * @function getTypeUrl + * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvailableVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion"; + }; + + return AvailableVersion; + })(); + + return ReleaseChannelConfig; + })(); + + return ServerConfig; + })(); + + v1beta1.BestEffortProvisioning = (function() { + + /** + * Properties of a BestEffortProvisioning. + * @memberof google.container.v1beta1 + * @interface IBestEffortProvisioning + * @property {boolean|null} [enabled] BestEffortProvisioning enabled + * @property {number|null} [minProvisionNodes] BestEffortProvisioning minProvisionNodes + */ + + /** + * Constructs a new BestEffortProvisioning. + * @memberof google.container.v1beta1 + * @classdesc Represents a BestEffortProvisioning. + * @implements IBestEffortProvisioning + * @constructor + * @param {google.container.v1beta1.IBestEffortProvisioning=} [properties] Properties to set + */ + function BestEffortProvisioning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BestEffortProvisioning enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.BestEffortProvisioning + * @instance + */ + BestEffortProvisioning.prototype.enabled = false; + + /** + * BestEffortProvisioning minProvisionNodes. + * @member {number} minProvisionNodes + * @memberof google.container.v1beta1.BestEffortProvisioning + * @instance + */ + BestEffortProvisioning.prototype.minProvisionNodes = 0; + + /** + * Creates a new BestEffortProvisioning instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {google.container.v1beta1.IBestEffortProvisioning=} [properties] Properties to set + * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning instance + */ + BestEffortProvisioning.create = function create(properties) { + return new BestEffortProvisioning(properties); + }; + + /** + * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {google.container.v1beta1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BestEffortProvisioning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.minProvisionNodes != null && Object.hasOwnProperty.call(message, "minProvisionNodes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minProvisionNodes); + return writer; + }; + + /** + * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {google.container.v1beta1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BestEffortProvisioning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BestEffortProvisioning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BestEffortProvisioning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.minProvisionNodes = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BestEffortProvisioning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BestEffortProvisioning message. + * @function verify + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BestEffortProvisioning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) + if (!$util.isInteger(message.minProvisionNodes)) + return "minProvisionNodes: integer expected"; + return null; + }; + + /** + * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning + */ + BestEffortProvisioning.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BestEffortProvisioning) + return object; + var message = new $root.google.container.v1beta1.BestEffortProvisioning(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.minProvisionNodes != null) + message.minProvisionNodes = object.minProvisionNodes | 0; + return message; + }; + + /** + * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {google.container.v1beta1.BestEffortProvisioning} message BestEffortProvisioning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BestEffortProvisioning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.minProvisionNodes = 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) + object.minProvisionNodes = message.minProvisionNodes; + return object; + }; + + /** + * Converts this BestEffortProvisioning to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BestEffortProvisioning + * @instance + * @returns {Object.} JSON object + */ + BestEffortProvisioning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BestEffortProvisioning + * @function getTypeUrl + * @memberof google.container.v1beta1.BestEffortProvisioning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BestEffortProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BestEffortProvisioning"; + }; + + return BestEffortProvisioning; + })(); + + v1beta1.WindowsVersions = (function() { + + /** + * Properties of a WindowsVersions. + * @memberof google.container.v1beta1 + * @interface IWindowsVersions + * @property {Array.|null} [windowsVersions] WindowsVersions windowsVersions + */ + + /** + * Constructs a new WindowsVersions. + * @memberof google.container.v1beta1 + * @classdesc Represents a WindowsVersions. + * @implements IWindowsVersions + * @constructor + * @param {google.container.v1beta1.IWindowsVersions=} [properties] Properties to set + */ + function WindowsVersions(properties) { + this.windowsVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsVersions windowsVersions. + * @member {Array.} windowsVersions + * @memberof google.container.v1beta1.WindowsVersions + * @instance + */ + WindowsVersions.prototype.windowsVersions = $util.emptyArray; + + /** + * Creates a new WindowsVersions instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {google.container.v1beta1.IWindowsVersions=} [properties] Properties to set + * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions instance + */ + WindowsVersions.create = function create(properties) { + return new WindowsVersions(properties); + }; + + /** + * Encodes the specified WindowsVersions message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {google.container.v1beta1.IWindowsVersions} message WindowsVersions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsVersions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.windowsVersions != null && message.windowsVersions.length) + for (var i = 0; i < message.windowsVersions.length; ++i) + $root.google.container.v1beta1.WindowsVersions.WindowsVersion.encode(message.windowsVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WindowsVersions message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {google.container.v1beta1.IWindowsVersions} message WindowsVersions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsVersions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsVersions message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsVersions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsVersions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.windowsVersions && message.windowsVersions.length)) + message.windowsVersions = []; + message.windowsVersions.push($root.google.container.v1beta1.WindowsVersions.WindowsVersion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsVersions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsVersions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsVersions message. + * @function verify + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsVersions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) { + if (!Array.isArray(message.windowsVersions)) + return "windowsVersions: array expected"; + for (var i = 0; i < message.windowsVersions.length; ++i) { + var error = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.verify(message.windowsVersions[i]); + if (error) + return "windowsVersions." + error; + } + } + return null; + }; + + /** + * Creates a WindowsVersions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions + */ + WindowsVersions.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WindowsVersions) + return object; + var message = new $root.google.container.v1beta1.WindowsVersions(); + if (object.windowsVersions) { + if (!Array.isArray(object.windowsVersions)) + throw TypeError(".google.container.v1beta1.WindowsVersions.windowsVersions: array expected"); + message.windowsVersions = []; + for (var i = 0; i < object.windowsVersions.length; ++i) { + if (typeof object.windowsVersions[i] !== "object") + throw TypeError(".google.container.v1beta1.WindowsVersions.windowsVersions: object expected"); + message.windowsVersions[i] = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.fromObject(object.windowsVersions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WindowsVersions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {google.container.v1beta1.WindowsVersions} message WindowsVersions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsVersions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.windowsVersions = []; + if (message.windowsVersions && message.windowsVersions.length) { + object.windowsVersions = []; + for (var j = 0; j < message.windowsVersions.length; ++j) + object.windowsVersions[j] = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.toObject(message.windowsVersions[j], options); + } + return object; + }; + + /** + * Converts this WindowsVersions to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WindowsVersions + * @instance + * @returns {Object.} JSON object + */ + WindowsVersions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WindowsVersions + * @function getTypeUrl + * @memberof google.container.v1beta1.WindowsVersions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsVersions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WindowsVersions"; + }; + + WindowsVersions.WindowsVersion = (function() { + + /** + * Properties of a WindowsVersion. + * @memberof google.container.v1beta1.WindowsVersions + * @interface IWindowsVersion + * @property {string|null} [imageType] WindowsVersion imageType + * @property {string|null} [osVersion] WindowsVersion osVersion + * @property {google.type.IDate|null} [supportEndDate] WindowsVersion supportEndDate + */ + + /** + * Constructs a new WindowsVersion. + * @memberof google.container.v1beta1.WindowsVersions + * @classdesc Represents a WindowsVersion. + * @implements IWindowsVersion + * @constructor + * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion=} [properties] Properties to set + */ + function WindowsVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsVersion imageType. + * @member {string} imageType + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @instance + */ + WindowsVersion.prototype.imageType = ""; + + /** + * WindowsVersion osVersion. + * @member {string} osVersion + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @instance + */ + WindowsVersion.prototype.osVersion = ""; + + /** + * WindowsVersion supportEndDate. + * @member {google.type.IDate|null|undefined} supportEndDate + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @instance + */ + WindowsVersion.prototype.supportEndDate = null; + + /** + * Creates a new WindowsVersion instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion=} [properties] Properties to set + * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion instance + */ + WindowsVersion.create = function create(properties) { + return new WindowsVersion(properties); + }; + + /** + * Encodes the specified WindowsVersion message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion} message WindowsVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageType); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + if (message.supportEndDate != null && Object.hasOwnProperty.call(message, "supportEndDate")) + $root.google.type.Date.encode(message.supportEndDate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WindowsVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion} message WindowsVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsVersion message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsVersions.WindowsVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageType = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } + case 3: { + message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsVersion message. + * @function verify + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) { + var error = $root.google.type.Date.verify(message.supportEndDate); + if (error) + return "supportEndDate." + error; + } + return null; + }; + + /** + * Creates a WindowsVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion + */ + WindowsVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WindowsVersions.WindowsVersion) + return object; + var message = new $root.google.container.v1beta1.WindowsVersions.WindowsVersion(); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + if (object.supportEndDate != null) { + if (typeof object.supportEndDate !== "object") + throw TypeError(".google.container.v1beta1.WindowsVersions.WindowsVersion.supportEndDate: object expected"); + message.supportEndDate = $root.google.type.Date.fromObject(object.supportEndDate); + } + return message; + }; + + /** + * Creates a plain object from a WindowsVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {google.container.v1beta1.WindowsVersions.WindowsVersion} message WindowsVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.imageType = ""; + object.osVersion = ""; + object.supportEndDate = null; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) + object.supportEndDate = $root.google.type.Date.toObject(message.supportEndDate, options); + return object; + }; + + /** + * Converts this WindowsVersion to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @instance + * @returns {Object.} JSON object + */ + WindowsVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WindowsVersion + * @function getTypeUrl + * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WindowsVersions.WindowsVersion"; + }; + + return WindowsVersion; + })(); + + return WindowsVersions; + })(); + + v1beta1.CreateNodePoolRequest = (function() { + + /** + * Properties of a CreateNodePoolRequest. + * @memberof google.container.v1beta1 + * @interface ICreateNodePoolRequest + * @property {string|null} [projectId] CreateNodePoolRequest projectId + * @property {string|null} [zone] CreateNodePoolRequest zone + * @property {string|null} [clusterId] CreateNodePoolRequest clusterId + * @property {google.container.v1beta1.INodePool|null} [nodePool] CreateNodePoolRequest nodePool + * @property {string|null} [parent] CreateNodePoolRequest parent + */ + + /** + * Constructs a new CreateNodePoolRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CreateNodePoolRequest. + * @implements ICreateNodePoolRequest + * @constructor + * @param {google.container.v1beta1.ICreateNodePoolRequest=} [properties] Properties to set + */ + function CreateNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.projectId = ""; + + /** + * CreateNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.zone = ""; + + /** + * CreateNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.clusterId = ""; + + /** + * CreateNodePoolRequest nodePool. + * @member {google.container.v1beta1.INodePool|null|undefined} nodePool + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.nodePool = null; + + /** + * CreateNodePoolRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + */ + CreateNodePoolRequest.prototype.parent = ""; + + /** + * Creates a new CreateNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {google.container.v1beta1.ICreateNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest instance + */ + CreateNodePoolRequest.create = function create(properties) { + return new CreateNodePoolRequest(properties); + }; + + /** + * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {google.container.v1beta1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePool != null && Object.hasOwnProperty.call(message, "nodePool")) + $root.google.container.v1beta1.NodePool.encode(message.nodePool, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {google.container.v1beta1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CreateNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePool = $root.google.container.v1beta1.NodePool.decode(reader, reader.uint32()); + break; + } + case 6: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateNodePoolRequest message. + * @function verify + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePool != null && message.hasOwnProperty("nodePool")) { + var error = $root.google.container.v1beta1.NodePool.verify(message.nodePool); + if (error) + return "nodePool." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest + */ + CreateNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CreateNodePoolRequest) + return object; + var message = new $root.google.container.v1beta1.CreateNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePool != null) { + if (typeof object.nodePool !== "object") + throw TypeError(".google.container.v1beta1.CreateNodePoolRequest.nodePool: object expected"); + message.nodePool = $root.google.container.v1beta1.NodePool.fromObject(object.nodePool); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {google.container.v1beta1.CreateNodePoolRequest} message CreateNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePool = null; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePool != null && message.hasOwnProperty("nodePool")) + object.nodePool = $root.google.container.v1beta1.NodePool.toObject(message.nodePool, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CreateNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CreateNodePoolRequest"; + }; + + return CreateNodePoolRequest; + })(); + + v1beta1.DeleteNodePoolRequest = (function() { + + /** + * Properties of a DeleteNodePoolRequest. + * @memberof google.container.v1beta1 + * @interface IDeleteNodePoolRequest + * @property {string|null} [projectId] DeleteNodePoolRequest projectId + * @property {string|null} [zone] DeleteNodePoolRequest zone + * @property {string|null} [clusterId] DeleteNodePoolRequest clusterId + * @property {string|null} [nodePoolId] DeleteNodePoolRequest nodePoolId + * @property {string|null} [name] DeleteNodePoolRequest name + */ + + /** + * Constructs a new DeleteNodePoolRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a DeleteNodePoolRequest. + * @implements IDeleteNodePoolRequest + * @constructor + * @param {google.container.v1beta1.IDeleteNodePoolRequest=} [properties] Properties to set + */ + function DeleteNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.projectId = ""; + + /** + * DeleteNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.zone = ""; + + /** + * DeleteNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.clusterId = ""; + + /** + * DeleteNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.nodePoolId = ""; + + /** + * DeleteNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + */ + DeleteNodePoolRequest.prototype.name = ""; + + /** + * Creates a new DeleteNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {google.container.v1beta1.IDeleteNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest instance + */ + DeleteNodePoolRequest.create = function create(properties) { + return new DeleteNodePoolRequest(properties); + }; + + /** + * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {google.container.v1beta1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {google.container.v1beta1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DeleteNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteNodePoolRequest message. + * @function verify + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest + */ + DeleteNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DeleteNodePoolRequest) + return object; + var message = new $root.google.container.v1beta1.DeleteNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {google.container.v1beta1.DeleteNodePoolRequest} message DeleteNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.DeleteNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DeleteNodePoolRequest"; + }; + + return DeleteNodePoolRequest; + })(); + + v1beta1.ListNodePoolsRequest = (function() { + + /** + * Properties of a ListNodePoolsRequest. + * @memberof google.container.v1beta1 + * @interface IListNodePoolsRequest + * @property {string|null} [projectId] ListNodePoolsRequest projectId + * @property {string|null} [zone] ListNodePoolsRequest zone + * @property {string|null} [clusterId] ListNodePoolsRequest clusterId + * @property {string|null} [parent] ListNodePoolsRequest parent + */ + + /** + * Constructs a new ListNodePoolsRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListNodePoolsRequest. + * @implements IListNodePoolsRequest + * @constructor + * @param {google.container.v1beta1.IListNodePoolsRequest=} [properties] Properties to set + */ + function ListNodePoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNodePoolsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.projectId = ""; + + /** + * ListNodePoolsRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.zone = ""; + + /** + * ListNodePoolsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.clusterId = ""; + + /** + * ListNodePoolsRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @instance + */ + ListNodePoolsRequest.prototype.parent = ""; + + /** + * Creates a new ListNodePoolsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {google.container.v1beta1.IListNodePoolsRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest instance + */ + ListNodePoolsRequest.create = function create(properties) { + return new ListNodePoolsRequest(properties); + }; + + /** + * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {google.container.v1beta1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {google.container.v1beta1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListNodePoolsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 5: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNodePoolsRequest message. + * @function verify + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNodePoolsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest + */ + ListNodePoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListNodePoolsRequest) + return object; + var message = new $root.google.container.v1beta1.ListNodePoolsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {google.container.v1beta1.ListNodePoolsRequest} message ListNodePoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNodePoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.parent = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListNodePoolsRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListNodePoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNodePoolsRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.ListNodePoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListNodePoolsRequest"; + }; + + return ListNodePoolsRequest; + })(); + + v1beta1.GetNodePoolRequest = (function() { + + /** + * Properties of a GetNodePoolRequest. + * @memberof google.container.v1beta1 + * @interface IGetNodePoolRequest + * @property {string|null} [projectId] GetNodePoolRequest projectId + * @property {string|null} [zone] GetNodePoolRequest zone + * @property {string|null} [clusterId] GetNodePoolRequest clusterId + * @property {string|null} [nodePoolId] GetNodePoolRequest nodePoolId + * @property {string|null} [name] GetNodePoolRequest name + */ + + /** + * Constructs a new GetNodePoolRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetNodePoolRequest. + * @implements IGetNodePoolRequest + * @constructor + * @param {google.container.v1beta1.IGetNodePoolRequest=} [properties] Properties to set + */ + function GetNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNodePoolRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.projectId = ""; + + /** + * GetNodePoolRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.zone = ""; + + /** + * GetNodePoolRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.clusterId = ""; + + /** + * GetNodePoolRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.nodePoolId = ""; + + /** + * GetNodePoolRequest name. + * @member {string} name + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + */ + GetNodePoolRequest.prototype.name = ""; + + /** + * Creates a new GetNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {google.container.v1beta1.IGetNodePoolRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest instance + */ + GetNodePoolRequest.create = function create(properties) { + return new GetNodePoolRequest(properties); + }; + + /** + * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {google.container.v1beta1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {google.container.v1beta1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNodePoolRequest message. + * @function verify + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest + */ + GetNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetNodePoolRequest) + return object; + var message = new $root.google.container.v1beta1.GetNodePoolRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {google.container.v1beta1.GetNodePoolRequest} message GetNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetNodePoolRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNodePoolRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetNodePoolRequest"; + }; + + return GetNodePoolRequest; + })(); + + v1beta1.BlueGreenSettings = (function() { + + /** + * Properties of a BlueGreenSettings. + * @memberof google.container.v1beta1 + * @interface IBlueGreenSettings + * @property {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null} [standardRolloutPolicy] BlueGreenSettings standardRolloutPolicy + * @property {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null} [autoscaledRolloutPolicy] BlueGreenSettings autoscaledRolloutPolicy + * @property {google.protobuf.IDuration|null} [nodePoolSoakDuration] BlueGreenSettings nodePoolSoakDuration + */ + + /** + * Constructs a new BlueGreenSettings. + * @memberof google.container.v1beta1 + * @classdesc Represents a BlueGreenSettings. + * @implements IBlueGreenSettings + * @constructor + * @param {google.container.v1beta1.IBlueGreenSettings=} [properties] Properties to set + */ + function BlueGreenSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlueGreenSettings standardRolloutPolicy. + * @member {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null|undefined} standardRolloutPolicy + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + */ + BlueGreenSettings.prototype.standardRolloutPolicy = null; + + /** + * BlueGreenSettings autoscaledRolloutPolicy. + * @member {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null|undefined} autoscaledRolloutPolicy + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + */ + BlueGreenSettings.prototype.autoscaledRolloutPolicy = null; + + /** + * BlueGreenSettings nodePoolSoakDuration. + * @member {google.protobuf.IDuration|null|undefined} nodePoolSoakDuration + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + */ + BlueGreenSettings.prototype.nodePoolSoakDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BlueGreenSettings rolloutPolicy. + * @member {"standardRolloutPolicy"|"autoscaledRolloutPolicy"|undefined} rolloutPolicy + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + */ + Object.defineProperty(BlueGreenSettings.prototype, "rolloutPolicy", { + get: $util.oneOfGetter($oneOfFields = ["standardRolloutPolicy", "autoscaledRolloutPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BlueGreenSettings _nodePoolSoakDuration. + * @member {"nodePoolSoakDuration"|undefined} _nodePoolSoakDuration + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + */ + Object.defineProperty(BlueGreenSettings.prototype, "_nodePoolSoakDuration", { + get: $util.oneOfGetter($oneOfFields = ["nodePoolSoakDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BlueGreenSettings instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {google.container.v1beta1.IBlueGreenSettings=} [properties] Properties to set + * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings instance + */ + BlueGreenSettings.create = function create(properties) { + return new BlueGreenSettings(properties); + }; + + /** + * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {google.container.v1beta1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standardRolloutPolicy != null && Object.hasOwnProperty.call(message, "standardRolloutPolicy")) + $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.encode(message.standardRolloutPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodePoolSoakDuration != null && Object.hasOwnProperty.call(message, "nodePoolSoakDuration")) + $root.google.protobuf.Duration.encode(message.nodePoolSoakDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoscaledRolloutPolicy != null && Object.hasOwnProperty.call(message, "autoscaledRolloutPolicy")) + $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.encode(message.autoscaledRolloutPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {google.container.v1beta1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nodePoolSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlueGreenSettings message. + * @function verify + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlueGreenSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { + properties.rolloutPolicy = 1; + { + var error = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify(message.standardRolloutPolicy); + if (error) + return "standardRolloutPolicy." + error; + } + } + if (message.autoscaledRolloutPolicy != null && message.hasOwnProperty("autoscaledRolloutPolicy")) { + if (properties.rolloutPolicy === 1) + return "rolloutPolicy: multiple values"; + properties.rolloutPolicy = 1; + { + var error = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify(message.autoscaledRolloutPolicy); + if (error) + return "autoscaledRolloutPolicy." + error; + } + } + if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { + properties._nodePoolSoakDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.nodePoolSoakDuration); + if (error) + return "nodePoolSoakDuration." + error; + } + } + return null; + }; + + /** + * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings + */ + BlueGreenSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BlueGreenSettings) + return object; + var message = new $root.google.container.v1beta1.BlueGreenSettings(); + if (object.standardRolloutPolicy != null) { + if (typeof object.standardRolloutPolicy !== "object") + throw TypeError(".google.container.v1beta1.BlueGreenSettings.standardRolloutPolicy: object expected"); + message.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.fromObject(object.standardRolloutPolicy); + } + if (object.autoscaledRolloutPolicy != null) { + if (typeof object.autoscaledRolloutPolicy !== "object") + throw TypeError(".google.container.v1beta1.BlueGreenSettings.autoscaledRolloutPolicy: object expected"); + message.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.fromObject(object.autoscaledRolloutPolicy); + } + if (object.nodePoolSoakDuration != null) { + if (typeof object.nodePoolSoakDuration !== "object") + throw TypeError(".google.container.v1beta1.BlueGreenSettings.nodePoolSoakDuration: object expected"); + message.nodePoolSoakDuration = $root.google.protobuf.Duration.fromObject(object.nodePoolSoakDuration); + } + return message; + }; + + /** + * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {google.container.v1beta1.BlueGreenSettings} message BlueGreenSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlueGreenSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { + object.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.toObject(message.standardRolloutPolicy, options); + if (options.oneofs) + object.rolloutPolicy = "standardRolloutPolicy"; + } + if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { + object.nodePoolSoakDuration = $root.google.protobuf.Duration.toObject(message.nodePoolSoakDuration, options); + if (options.oneofs) + object._nodePoolSoakDuration = "nodePoolSoakDuration"; + } + if (message.autoscaledRolloutPolicy != null && message.hasOwnProperty("autoscaledRolloutPolicy")) { + object.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.toObject(message.autoscaledRolloutPolicy, options); + if (options.oneofs) + object.rolloutPolicy = "autoscaledRolloutPolicy"; + } + return object; + }; + + /** + * Converts this BlueGreenSettings to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BlueGreenSettings + * @instance + * @returns {Object.} JSON object + */ + BlueGreenSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlueGreenSettings + * @function getTypeUrl + * @memberof google.container.v1beta1.BlueGreenSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlueGreenSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings"; + }; + + BlueGreenSettings.StandardRolloutPolicy = (function() { + + /** + * Properties of a StandardRolloutPolicy. + * @memberof google.container.v1beta1.BlueGreenSettings + * @interface IStandardRolloutPolicy + * @property {number|null} [batchPercentage] StandardRolloutPolicy batchPercentage + * @property {number|null} [batchNodeCount] StandardRolloutPolicy batchNodeCount + * @property {google.protobuf.IDuration|null} [batchSoakDuration] StandardRolloutPolicy batchSoakDuration + */ + + /** + * Constructs a new StandardRolloutPolicy. + * @memberof google.container.v1beta1.BlueGreenSettings + * @classdesc Represents a StandardRolloutPolicy. + * @implements IStandardRolloutPolicy + * @constructor + * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set + */ + function StandardRolloutPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardRolloutPolicy batchPercentage. + * @member {number|null|undefined} batchPercentage + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchPercentage = null; + + /** + * StandardRolloutPolicy batchNodeCount. + * @member {number|null|undefined} batchNodeCount + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchNodeCount = null; + + /** + * StandardRolloutPolicy batchSoakDuration. + * @member {google.protobuf.IDuration|null|undefined} batchSoakDuration + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + StandardRolloutPolicy.prototype.batchSoakDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StandardRolloutPolicy updateBatchSize. + * @member {"batchPercentage"|"batchNodeCount"|undefined} updateBatchSize + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + Object.defineProperty(StandardRolloutPolicy.prototype, "updateBatchSize", { + get: $util.oneOfGetter($oneOfFields = ["batchPercentage", "batchNodeCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * StandardRolloutPolicy _batchSoakDuration. + * @member {"batchSoakDuration"|undefined} _batchSoakDuration + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + */ + Object.defineProperty(StandardRolloutPolicy.prototype, "_batchSoakDuration", { + get: $util.oneOfGetter($oneOfFields = ["batchSoakDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StandardRolloutPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy instance + */ + StandardRolloutPolicy.create = function create(properties) { + return new StandardRolloutPolicy(properties); + }; + + /** + * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardRolloutPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batchPercentage != null && Object.hasOwnProperty.call(message, "batchPercentage")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.batchPercentage); + if (message.batchNodeCount != null && Object.hasOwnProperty.call(message, "batchNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchNodeCount); + if (message.batchSoakDuration != null && Object.hasOwnProperty.call(message, "batchSoakDuration")) + $root.google.protobuf.Duration.encode(message.batchSoakDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardRolloutPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.batchPercentage = reader.float(); + break; + } + case 2: { + message.batchNodeCount = reader.int32(); + break; + } + case 3: { + message.batchSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardRolloutPolicy message. + * @function verify + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardRolloutPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { + properties.updateBatchSize = 1; + if (typeof message.batchPercentage !== "number") + return "batchPercentage: number expected"; + } + if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { + if (properties.updateBatchSize === 1) + return "updateBatchSize: multiple values"; + properties.updateBatchSize = 1; + if (!$util.isInteger(message.batchNodeCount)) + return "batchNodeCount: integer expected"; + } + if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { + properties._batchSoakDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.batchSoakDuration); + if (error) + return "batchSoakDuration." + error; + } + } + return null; + }; + + /** + * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy + */ + StandardRolloutPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy) + return object; + var message = new $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy(); + if (object.batchPercentage != null) + message.batchPercentage = Number(object.batchPercentage); + if (object.batchNodeCount != null) + message.batchNodeCount = object.batchNodeCount | 0; + if (object.batchSoakDuration != null) { + if (typeof object.batchSoakDuration !== "object") + throw TypeError(".google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.batchSoakDuration: object expected"); + message.batchSoakDuration = $root.google.protobuf.Duration.fromObject(object.batchSoakDuration); + } + return message; + }; + + /** + * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} message StandardRolloutPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardRolloutPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { + object.batchPercentage = options.json && !isFinite(message.batchPercentage) ? String(message.batchPercentage) : message.batchPercentage; + if (options.oneofs) + object.updateBatchSize = "batchPercentage"; + } + if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { + object.batchNodeCount = message.batchNodeCount; + if (options.oneofs) + object.updateBatchSize = "batchNodeCount"; + } + if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { + object.batchSoakDuration = $root.google.protobuf.Duration.toObject(message.batchSoakDuration, options); + if (options.oneofs) + object._batchSoakDuration = "batchSoakDuration"; + } + return object; + }; + + /** + * Converts this StandardRolloutPolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @instance + * @returns {Object.} JSON object + */ + StandardRolloutPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardRolloutPolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy"; + }; + + return StandardRolloutPolicy; + })(); + + BlueGreenSettings.AutoscaledRolloutPolicy = (function() { + + /** + * Properties of an AutoscaledRolloutPolicy. + * @memberof google.container.v1beta1.BlueGreenSettings + * @interface IAutoscaledRolloutPolicy + */ + + /** + * Constructs a new AutoscaledRolloutPolicy. + * @memberof google.container.v1beta1.BlueGreenSettings + * @classdesc Represents an AutoscaledRolloutPolicy. + * @implements IAutoscaledRolloutPolicy + * @constructor + * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy=} [properties] Properties to set + */ + function AutoscaledRolloutPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AutoscaledRolloutPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy instance + */ + AutoscaledRolloutPolicy.create = function create(properties) { + return new AutoscaledRolloutPolicy(properties); + }; + + /** + * Encodes the specified AutoscaledRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy} message AutoscaledRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscaledRolloutPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AutoscaledRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy} message AutoscaledRolloutPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscaledRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscaledRolloutPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscaledRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscaledRolloutPolicy message. + * @function verify + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscaledRolloutPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AutoscaledRolloutPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy + */ + AutoscaledRolloutPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy) + return object; + return new $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy(); + }; + + /** + * Creates a plain object from an AutoscaledRolloutPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} message AutoscaledRolloutPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscaledRolloutPolicy.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AutoscaledRolloutPolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @instance + * @returns {Object.} JSON object + */ + AutoscaledRolloutPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoscaledRolloutPolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoscaledRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy"; + }; + + return AutoscaledRolloutPolicy; + })(); + + return BlueGreenSettings; + })(); + + v1beta1.NodePool = (function() { + + /** + * Properties of a NodePool. + * @memberof google.container.v1beta1 + * @interface INodePool + * @property {string|null} [name] NodePool name + * @property {google.container.v1beta1.INodeConfig|null} [config] NodePool config + * @property {number|null} [initialNodeCount] NodePool initialNodeCount + * @property {Array.|null} [locations] NodePool locations + * @property {google.container.v1beta1.INodeNetworkConfig|null} [networkConfig] NodePool networkConfig + * @property {string|null} [selfLink] NodePool selfLink + * @property {string|null} [version] NodePool version + * @property {Array.|null} [instanceGroupUrls] NodePool instanceGroupUrls + * @property {google.container.v1beta1.NodePool.Status|null} [status] NodePool status + * @property {string|null} [statusMessage] NodePool statusMessage + * @property {google.container.v1beta1.INodePoolAutoscaling|null} [autoscaling] NodePool autoscaling + * @property {google.container.v1beta1.INodeManagement|null} [management] NodePool management + * @property {google.container.v1beta1.IMaxPodsConstraint|null} [maxPodsConstraint] NodePool maxPodsConstraint + * @property {Array.|null} [conditions] NodePool conditions + * @property {number|null} [podIpv4CidrSize] NodePool podIpv4CidrSize + * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] NodePool upgradeSettings + * @property {google.container.v1beta1.NodePool.IPlacementPolicy|null} [placementPolicy] NodePool placementPolicy + * @property {google.container.v1beta1.NodePool.IUpdateInfo|null} [updateInfo] NodePool updateInfo + * @property {string|null} [etag] NodePool etag + * @property {google.container.v1beta1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] NodePool queuedProvisioning + * @property {google.container.v1beta1.IBestEffortProvisioning|null} [bestEffortProvisioning] NodePool bestEffortProvisioning + */ + + /** + * Constructs a new NodePool. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodePool. + * @implements INodePool + * @constructor + * @param {google.container.v1beta1.INodePool=} [properties] Properties to set + */ + function NodePool(properties) { + this.locations = []; + this.instanceGroupUrls = []; + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePool name. + * @member {string} name + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.name = ""; + + /** + * NodePool config. + * @member {google.container.v1beta1.INodeConfig|null|undefined} config + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.config = null; + + /** + * NodePool initialNodeCount. + * @member {number} initialNodeCount + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.initialNodeCount = 0; + + /** + * NodePool locations. + * @member {Array.} locations + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.locations = $util.emptyArray; + + /** + * NodePool networkConfig. + * @member {google.container.v1beta1.INodeNetworkConfig|null|undefined} networkConfig + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.networkConfig = null; + + /** + * NodePool selfLink. + * @member {string} selfLink + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.selfLink = ""; + + /** + * NodePool version. + * @member {string} version + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.version = ""; + + /** + * NodePool instanceGroupUrls. + * @member {Array.} instanceGroupUrls + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.instanceGroupUrls = $util.emptyArray; + + /** + * NodePool status. + * @member {google.container.v1beta1.NodePool.Status} status + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.status = 0; + + /** + * NodePool statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.statusMessage = ""; + + /** + * NodePool autoscaling. + * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.autoscaling = null; + + /** + * NodePool management. + * @member {google.container.v1beta1.INodeManagement|null|undefined} management + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.management = null; + + /** + * NodePool maxPodsConstraint. + * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} maxPodsConstraint + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.maxPodsConstraint = null; + + /** + * NodePool conditions. + * @member {Array.} conditions + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.conditions = $util.emptyArray; + + /** + * NodePool podIpv4CidrSize. + * @member {number} podIpv4CidrSize + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.podIpv4CidrSize = 0; + + /** + * NodePool upgradeSettings. + * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.upgradeSettings = null; + + /** + * NodePool placementPolicy. + * @member {google.container.v1beta1.NodePool.IPlacementPolicy|null|undefined} placementPolicy + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.placementPolicy = null; + + /** + * NodePool updateInfo. + * @member {google.container.v1beta1.NodePool.IUpdateInfo|null|undefined} updateInfo + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.updateInfo = null; + + /** + * NodePool etag. + * @member {string} etag + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.etag = ""; + + /** + * NodePool queuedProvisioning. + * @member {google.container.v1beta1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.queuedProvisioning = null; + + /** + * NodePool bestEffortProvisioning. + * @member {google.container.v1beta1.IBestEffortProvisioning|null|undefined} bestEffortProvisioning + * @memberof google.container.v1beta1.NodePool + * @instance + */ + NodePool.prototype.bestEffortProvisioning = null; + + /** + * Creates a new NodePool instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool + * @static + * @param {google.container.v1beta1.INodePool=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool} NodePool instance + */ + NodePool.create = function create(properties) { + return new NodePool(properties); + }; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool + * @static + * @param {google.container.v1beta1.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.container.v1beta1.NodeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) + $root.google.container.v1beta1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.podIpv4CidrSize != null && Object.hasOwnProperty.call(message, "podIpv4CidrSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.podIpv4CidrSize); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.container.v1beta1.NodeNetworkConfig.encode(message.networkConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.version); + if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.instanceGroupUrls[i]); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 103, wireType 0 =*/824).int32(message.status); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.statusMessage); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.container.v1beta1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.placementPolicy != null && Object.hasOwnProperty.call(message, "placementPolicy")) + $root.google.container.v1beta1.NodePool.PlacementPolicy.encode(message.placementPolicy, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); + if (message.updateInfo != null && Object.hasOwnProperty.call(message, "updateInfo")) + $root.google.container.v1beta1.NodePool.UpdateInfo.encode(message.updateInfo, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.etag); + if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) + $root.google.container.v1beta1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); + if (message.bestEffortProvisioning != null && Object.hasOwnProperty.call(message, "bestEffortProvisioning")) + $root.google.container.v1beta1.BestEffortProvisioning.encode(message.bestEffortProvisioning, writer.uint32(/* id 113, wireType 2 =*/906).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool + * @static + * @param {google.container.v1beta1.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.container.v1beta1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.initialNodeCount = reader.int32(); + break; + } + case 13: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 14: { + message.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.selfLink = reader.string(); + break; + } + case 101: { + message.version = reader.string(); + break; + } + case 102: { + if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) + message.instanceGroupUrls = []; + message.instanceGroupUrls.push(reader.string()); + break; + } + case 103: { + message.status = reader.int32(); + break; + } + case 104: { + message.statusMessage = reader.string(); + break; + } + case 4: { + message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 5: { + message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 6: { + message.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 105: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); + break; + } + case 7: { + message.podIpv4CidrSize = reader.int32(); + break; + } + case 107: { + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 108: { + message.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.decode(reader, reader.uint32()); + break; + } + case 109: { + message.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.decode(reader, reader.uint32()); + break; + } + case 110: { + message.etag = reader.string(); + break; + } + case 112: { + message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); + break; + } + case 113: { + message.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePool message. + * @function verify + * @memberof google.container.v1beta1.NodePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.container.v1beta1.NodeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + if (!$util.isInteger(message.initialNodeCount)) + return "initialNodeCount: integer expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.container.v1beta1.NodeNetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + if (!$util.isString(message.selfLink)) + return "selfLink: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { + if (!Array.isArray(message.instanceGroupUrls)) + return "instanceGroupUrls: array expected"; + for (var i = 0; i < message.instanceGroupUrls.length; ++i) + if (!$util.isString(message.instanceGroupUrls[i])) + return "instanceGroupUrls: string[] expected"; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { + var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.maxPodsConstraint); + if (error) + return "maxPodsConstraint." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.container.v1beta1.StatusCondition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) + if (!$util.isInteger(message.podIpv4CidrSize)) + return "podIpv4CidrSize: integer expected"; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) { + var error = $root.google.container.v1beta1.NodePool.PlacementPolicy.verify(message.placementPolicy); + if (error) + return "placementPolicy." + error; + } + if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) { + var error = $root.google.container.v1beta1.NodePool.UpdateInfo.verify(message.updateInfo); + if (error) + return "updateInfo." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { + var error = $root.google.container.v1beta1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); + if (error) + return "queuedProvisioning." + error; + } + if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) { + var error = $root.google.container.v1beta1.BestEffortProvisioning.verify(message.bestEffortProvisioning); + if (error) + return "bestEffortProvisioning." + error; + } + return null; + }; + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool} NodePool + */ + NodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool) + return object; + var message = new $root.google.container.v1beta1.NodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.container.v1beta1.NodePool.config: object expected"); + message.config = $root.google.container.v1beta1.NodeConfig.fromObject(object.config); + } + if (object.initialNodeCount != null) + message.initialNodeCount = object.initialNodeCount | 0; + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1beta1.NodePool.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.container.v1beta1.NodePool.networkConfig: object expected"); + message.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.fromObject(object.networkConfig); + } + if (object.selfLink != null) + message.selfLink = String(object.selfLink); + if (object.version != null) + message.version = String(object.version); + if (object.instanceGroupUrls) { + if (!Array.isArray(object.instanceGroupUrls)) + throw TypeError(".google.container.v1beta1.NodePool.instanceGroupUrls: array expected"); + message.instanceGroupUrls = []; + for (var i = 0; i < object.instanceGroupUrls.length; ++i) + message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROVISIONING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "RUNNING_WITH_ERROR": + case 3: + message.status = 3; + break; + case "RECONCILING": + case 4: + message.status = 4; + break; + case "STOPPING": + case 5: + message.status = 5; + break; + case "ERROR": + case 6: + message.status = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.container.v1beta1.NodePool.autoscaling: object expected"); + message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.autoscaling); + } + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1beta1.NodePool.management: object expected"); + message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); + } + if (object.maxPodsConstraint != null) { + if (typeof object.maxPodsConstraint !== "object") + throw TypeError(".google.container.v1beta1.NodePool.maxPodsConstraint: object expected"); + message.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); + } + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.container.v1beta1.NodePool.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.container.v1beta1.NodePool.conditions: object expected"); + message.conditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.conditions[i]); + } + } + if (object.podIpv4CidrSize != null) + message.podIpv4CidrSize = object.podIpv4CidrSize | 0; + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1beta1.NodePool.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.placementPolicy != null) { + if (typeof object.placementPolicy !== "object") + throw TypeError(".google.container.v1beta1.NodePool.placementPolicy: object expected"); + message.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.fromObject(object.placementPolicy); + } + if (object.updateInfo != null) { + if (typeof object.updateInfo !== "object") + throw TypeError(".google.container.v1beta1.NodePool.updateInfo: object expected"); + message.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.fromObject(object.updateInfo); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.queuedProvisioning != null) { + if (typeof object.queuedProvisioning !== "object") + throw TypeError(".google.container.v1beta1.NodePool.queuedProvisioning: object expected"); + message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); + } + if (object.bestEffortProvisioning != null) { + if (typeof object.bestEffortProvisioning !== "object") + throw TypeError(".google.container.v1beta1.NodePool.bestEffortProvisioning: object expected"); + message.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.fromObject(object.bestEffortProvisioning); + } + return message; + }; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool + * @static + * @param {google.container.v1beta1.NodePool} message NodePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.locations = []; + object.instanceGroupUrls = []; + object.conditions = []; + } + if (options.defaults) { + object.name = ""; + object.config = null; + object.initialNodeCount = 0; + object.autoscaling = null; + object.management = null; + object.maxPodsConstraint = null; + object.podIpv4CidrSize = 0; + object.networkConfig = null; + object.selfLink = ""; + object.version = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.upgradeSettings = null; + object.placementPolicy = null; + object.updateInfo = null; + object.etag = ""; + object.queuedProvisioning = null; + object.bestEffortProvisioning = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.container.v1beta1.NodeConfig.toObject(message.config, options); + if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) + object.initialNodeCount = message.initialNodeCount; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); + if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) + object.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); + if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) + object.podIpv4CidrSize = message.podIpv4CidrSize; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.toObject(message.networkConfig, options); + if (message.selfLink != null && message.hasOwnProperty("selfLink")) + object.selfLink = message.selfLink; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.instanceGroupUrls && message.instanceGroupUrls.length) { + object.instanceGroupUrls = []; + for (var j = 0; j < message.instanceGroupUrls.length; ++j) + object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1beta1.NodePool.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.NodePool.Status[message.status] : message.status; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.conditions[j], options); + } + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) + object.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.toObject(message.placementPolicy, options); + if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) + object.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.toObject(message.updateInfo, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) + object.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); + if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) + object.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.toObject(message.bestEffortProvisioning, options); + return object; + }; + + /** + * Converts this NodePool to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool + * @instance + * @returns {Object.} JSON object + */ + NodePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePool + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool"; + }; + + NodePool.UpgradeSettings = (function() { + + /** + * Properties of an UpgradeSettings. + * @memberof google.container.v1beta1.NodePool + * @interface IUpgradeSettings + * @property {number|null} [maxSurge] UpgradeSettings maxSurge + * @property {number|null} [maxUnavailable] UpgradeSettings maxUnavailable + * @property {google.container.v1beta1.NodePoolUpdateStrategy|null} [strategy] UpgradeSettings strategy + * @property {google.container.v1beta1.IBlueGreenSettings|null} [blueGreenSettings] UpgradeSettings blueGreenSettings + */ + + /** + * Constructs a new UpgradeSettings. + * @memberof google.container.v1beta1.NodePool + * @classdesc Represents an UpgradeSettings. + * @implements IUpgradeSettings + * @constructor + * @param {google.container.v1beta1.NodePool.IUpgradeSettings=} [properties] Properties to set + */ + function UpgradeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeSettings maxSurge. + * @member {number} maxSurge + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.maxSurge = 0; + + /** + * UpgradeSettings maxUnavailable. + * @member {number} maxUnavailable + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.maxUnavailable = 0; + + /** + * UpgradeSettings strategy. + * @member {google.container.v1beta1.NodePoolUpdateStrategy|null|undefined} strategy + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.strategy = null; + + /** + * UpgradeSettings blueGreenSettings. + * @member {google.container.v1beta1.IBlueGreenSettings|null|undefined} blueGreenSettings + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + UpgradeSettings.prototype.blueGreenSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpgradeSettings _strategy. + * @member {"strategy"|undefined} _strategy + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + Object.defineProperty(UpgradeSettings.prototype, "_strategy", { + get: $util.oneOfGetter($oneOfFields = ["strategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpgradeSettings _blueGreenSettings. + * @member {"blueGreenSettings"|undefined} _blueGreenSettings + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + */ + Object.defineProperty(UpgradeSettings.prototype, "_blueGreenSettings", { + get: $util.oneOfGetter($oneOfFields = ["blueGreenSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpgradeSettings instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1beta1.NodePool.IUpgradeSettings=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings instance + */ + UpgradeSettings.create = function create(properties) { + return new UpgradeSettings(properties); + }; + + /** + * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1beta1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxSurge != null && Object.hasOwnProperty.call(message, "maxSurge")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxSurge); + if (message.maxUnavailable != null && Object.hasOwnProperty.call(message, "maxUnavailable")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxUnavailable); + if (message.strategy != null && Object.hasOwnProperty.call(message, "strategy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.strategy); + if (message.blueGreenSettings != null && Object.hasOwnProperty.call(message, "blueGreenSettings")) + $root.google.container.v1beta1.BlueGreenSettings.encode(message.blueGreenSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1beta1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpgradeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxSurge = reader.int32(); + break; + } + case 2: { + message.maxUnavailable = reader.int32(); + break; + } + case 3: { + message.strategy = reader.int32(); + break; + } + case 4: { + message.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeSettings message. + * @function verify + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) + if (!$util.isInteger(message.maxSurge)) + return "maxSurge: integer expected"; + if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) + if (!$util.isInteger(message.maxUnavailable)) + return "maxUnavailable: integer expected"; + if (message.strategy != null && message.hasOwnProperty("strategy")) { + properties._strategy = 1; + switch (message.strategy) { + default: + return "strategy: enum value expected"; + case 0: + case 2: + case 3: + break; + } + } + if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { + properties._blueGreenSettings = 1; + { + var error = $root.google.container.v1beta1.BlueGreenSettings.verify(message.blueGreenSettings); + if (error) + return "blueGreenSettings." + error; + } + } + return null; + }; + + /** + * Creates an UpgradeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings + */ + UpgradeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool.UpgradeSettings) + return object; + var message = new $root.google.container.v1beta1.NodePool.UpgradeSettings(); + if (object.maxSurge != null) + message.maxSurge = object.maxSurge | 0; + if (object.maxUnavailable != null) + message.maxUnavailable = object.maxUnavailable | 0; + switch (object.strategy) { + default: + if (typeof object.strategy === "number") { + message.strategy = object.strategy; + break; + } + break; + case "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": + case 0: + message.strategy = 0; + break; + case "BLUE_GREEN": + case 2: + message.strategy = 2; + break; + case "SURGE": + case 3: + message.strategy = 3; + break; + } + if (object.blueGreenSettings != null) { + if (typeof object.blueGreenSettings !== "object") + throw TypeError(".google.container.v1beta1.NodePool.UpgradeSettings.blueGreenSettings: object expected"); + message.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.fromObject(object.blueGreenSettings); + } + return message; + }; + + /** + * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {google.container.v1beta1.NodePool.UpgradeSettings} message UpgradeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxSurge = 0; + object.maxUnavailable = 0; + } + if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) + object.maxSurge = message.maxSurge; + if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) + object.maxUnavailable = message.maxUnavailable; + if (message.strategy != null && message.hasOwnProperty("strategy")) { + object.strategy = options.enums === String ? $root.google.container.v1beta1.NodePoolUpdateStrategy[message.strategy] === undefined ? message.strategy : $root.google.container.v1beta1.NodePoolUpdateStrategy[message.strategy] : message.strategy; + if (options.oneofs) + object._strategy = "strategy"; + } + if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { + object.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.toObject(message.blueGreenSettings, options); + if (options.oneofs) + object._blueGreenSettings = "blueGreenSettings"; + } + return object; + }; + + /** + * Converts this UpgradeSettings to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @instance + * @returns {Object.} JSON object + */ + UpgradeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeSettings + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool.UpgradeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpgradeSettings"; + }; + + return UpgradeSettings; + })(); + + NodePool.UpdateInfo = (function() { + + /** + * Properties of an UpdateInfo. + * @memberof google.container.v1beta1.NodePool + * @interface IUpdateInfo + * @property {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null} [blueGreenInfo] UpdateInfo blueGreenInfo + */ + + /** + * Constructs a new UpdateInfo. + * @memberof google.container.v1beta1.NodePool + * @classdesc Represents an UpdateInfo. + * @implements IUpdateInfo + * @constructor + * @param {google.container.v1beta1.NodePool.IUpdateInfo=} [properties] Properties to set + */ + function UpdateInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateInfo blueGreenInfo. + * @member {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null|undefined} blueGreenInfo + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @instance + */ + UpdateInfo.prototype.blueGreenInfo = null; + + /** + * Creates a new UpdateInfo instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {google.container.v1beta1.NodePool.IUpdateInfo=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo instance + */ + UpdateInfo.create = function create(properties) { + return new UpdateInfo(properties); + }; + + /** + * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {google.container.v1beta1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blueGreenInfo != null && Object.hasOwnProperty.call(message, "blueGreenInfo")) + $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.encode(message.blueGreenInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {google.container.v1beta1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpdateInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateInfo message. + * @function verify + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) { + var error = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify(message.blueGreenInfo); + if (error) + return "blueGreenInfo." + error; + } + return null; + }; + + /** + * Creates an UpdateInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo + */ + UpdateInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool.UpdateInfo) + return object; + var message = new $root.google.container.v1beta1.NodePool.UpdateInfo(); + if (object.blueGreenInfo != null) { + if (typeof object.blueGreenInfo !== "object") + throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.blueGreenInfo: object expected"); + message.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.fromObject(object.blueGreenInfo); + } + return message; + }; + + /** + * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {google.container.v1beta1.NodePool.UpdateInfo} message UpdateInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.blueGreenInfo = null; + if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) + object.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.toObject(message.blueGreenInfo, options); + return object; + }; + + /** + * Converts this UpdateInfo to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @instance + * @returns {Object.} JSON object + */ + UpdateInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateInfo + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpdateInfo"; + }; + + UpdateInfo.BlueGreenInfo = (function() { + + /** + * Properties of a BlueGreenInfo. + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @interface IBlueGreenInfo + * @property {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null} [phase] BlueGreenInfo phase + * @property {Array.|null} [blueInstanceGroupUrls] BlueGreenInfo blueInstanceGroupUrls + * @property {Array.|null} [greenInstanceGroupUrls] BlueGreenInfo greenInstanceGroupUrls + * @property {string|null} [bluePoolDeletionStartTime] BlueGreenInfo bluePoolDeletionStartTime + * @property {string|null} [greenPoolVersion] BlueGreenInfo greenPoolVersion + */ + + /** + * Constructs a new BlueGreenInfo. + * @memberof google.container.v1beta1.NodePool.UpdateInfo + * @classdesc Represents a BlueGreenInfo. + * @implements IBlueGreenInfo + * @constructor + * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set + */ + function BlueGreenInfo(properties) { + this.blueInstanceGroupUrls = []; + this.greenInstanceGroupUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlueGreenInfo phase. + * @member {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase} phase + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.phase = 0; + + /** + * BlueGreenInfo blueInstanceGroupUrls. + * @member {Array.} blueInstanceGroupUrls + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.blueInstanceGroupUrls = $util.emptyArray; + + /** + * BlueGreenInfo greenInstanceGroupUrls. + * @member {Array.} greenInstanceGroupUrls + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.greenInstanceGroupUrls = $util.emptyArray; + + /** + * BlueGreenInfo bluePoolDeletionStartTime. + * @member {string} bluePoolDeletionStartTime + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.bluePoolDeletionStartTime = ""; + + /** + * BlueGreenInfo greenPoolVersion. + * @member {string} greenPoolVersion + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + */ + BlueGreenInfo.prototype.greenPoolVersion = ""; + + /** + * Creates a new BlueGreenInfo instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo instance + */ + BlueGreenInfo.create = function create(properties) { + return new BlueGreenInfo(properties); + }; + + /** + * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.phase); + if (message.blueInstanceGroupUrls != null && message.blueInstanceGroupUrls.length) + for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.blueInstanceGroupUrls[i]); + if (message.greenInstanceGroupUrls != null && message.greenInstanceGroupUrls.length) + for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.greenInstanceGroupUrls[i]); + if (message.bluePoolDeletionStartTime != null && Object.hasOwnProperty.call(message, "bluePoolDeletionStartTime")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.bluePoolDeletionStartTime); + if (message.greenPoolVersion != null && Object.hasOwnProperty.call(message, "greenPoolVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.greenPoolVersion); + return writer; + }; + + /** + * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlueGreenInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phase = reader.int32(); + break; + } + case 2: { + if (!(message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length)) + message.blueInstanceGroupUrls = []; + message.blueInstanceGroupUrls.push(reader.string()); + break; + } + case 3: { + if (!(message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length)) + message.greenInstanceGroupUrls = []; + message.greenInstanceGroupUrls.push(reader.string()); + break; + } + case 4: { + message.bluePoolDeletionStartTime = reader.string(); + break; + } + case 5: { + message.greenPoolVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlueGreenInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlueGreenInfo message. + * @function verify + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlueGreenInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phase != null && message.hasOwnProperty("phase")) + switch (message.phase) { + default: + return "phase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 8: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.blueInstanceGroupUrls != null && message.hasOwnProperty("blueInstanceGroupUrls")) { + if (!Array.isArray(message.blueInstanceGroupUrls)) + return "blueInstanceGroupUrls: array expected"; + for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) + if (!$util.isString(message.blueInstanceGroupUrls[i])) + return "blueInstanceGroupUrls: string[] expected"; + } + if (message.greenInstanceGroupUrls != null && message.hasOwnProperty("greenInstanceGroupUrls")) { + if (!Array.isArray(message.greenInstanceGroupUrls)) + return "greenInstanceGroupUrls: array expected"; + for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) + if (!$util.isString(message.greenInstanceGroupUrls[i])) + return "greenInstanceGroupUrls: string[] expected"; + } + if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) + if (!$util.isString(message.bluePoolDeletionStartTime)) + return "bluePoolDeletionStartTime: string expected"; + if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) + if (!$util.isString(message.greenPoolVersion)) + return "greenPoolVersion: string expected"; + return null; + }; + + /** + * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo + */ + BlueGreenInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo) + return object; + var message = new $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo(); + switch (object.phase) { + default: + if (typeof object.phase === "number") { + message.phase = object.phase; + break; + } + break; + case "PHASE_UNSPECIFIED": + case 0: + message.phase = 0; + break; + case "UPDATE_STARTED": + case 1: + message.phase = 1; + break; + case "CREATING_GREEN_POOL": + case 2: + message.phase = 2; + break; + case "CORDONING_BLUE_POOL": + case 3: + message.phase = 3; + break; + case "WAITING_TO_DRAIN_BLUE_POOL": + case 8: + message.phase = 8; + break; + case "DRAINING_BLUE_POOL": + case 4: + message.phase = 4; + break; + case "NODE_POOL_SOAKING": + case 5: + message.phase = 5; + break; + case "DELETING_BLUE_POOL": + case 6: + message.phase = 6; + break; + case "ROLLBACK_STARTED": + case 7: + message.phase = 7; + break; + } + if (object.blueInstanceGroupUrls) { + if (!Array.isArray(object.blueInstanceGroupUrls)) + throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.blueInstanceGroupUrls: array expected"); + message.blueInstanceGroupUrls = []; + for (var i = 0; i < object.blueInstanceGroupUrls.length; ++i) + message.blueInstanceGroupUrls[i] = String(object.blueInstanceGroupUrls[i]); + } + if (object.greenInstanceGroupUrls) { + if (!Array.isArray(object.greenInstanceGroupUrls)) + throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.greenInstanceGroupUrls: array expected"); + message.greenInstanceGroupUrls = []; + for (var i = 0; i < object.greenInstanceGroupUrls.length; ++i) + message.greenInstanceGroupUrls[i] = String(object.greenInstanceGroupUrls[i]); + } + if (object.bluePoolDeletionStartTime != null) + message.bluePoolDeletionStartTime = String(object.bluePoolDeletionStartTime); + if (object.greenPoolVersion != null) + message.greenPoolVersion = String(object.greenPoolVersion); + return message; + }; + + /** + * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} message BlueGreenInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlueGreenInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.blueInstanceGroupUrls = []; + object.greenInstanceGroupUrls = []; + } + if (options.defaults) { + object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; + object.bluePoolDeletionStartTime = ""; + object.greenPoolVersion = ""; + } + if (message.phase != null && message.hasOwnProperty("phase")) + object.phase = options.enums === String ? $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] === undefined ? message.phase : $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] : message.phase; + if (message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length) { + object.blueInstanceGroupUrls = []; + for (var j = 0; j < message.blueInstanceGroupUrls.length; ++j) + object.blueInstanceGroupUrls[j] = message.blueInstanceGroupUrls[j]; + } + if (message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length) { + object.greenInstanceGroupUrls = []; + for (var j = 0; j < message.greenInstanceGroupUrls.length; ++j) + object.greenInstanceGroupUrls[j] = message.greenInstanceGroupUrls[j]; + } + if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) + object.bluePoolDeletionStartTime = message.bluePoolDeletionStartTime; + if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) + object.greenPoolVersion = message.greenPoolVersion; + return object; + }; + + /** + * Converts this BlueGreenInfo to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @instance + * @returns {Object.} JSON object + */ + BlueGreenInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlueGreenInfo + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlueGreenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo"; + }; + + /** + * Phase enum. + * @name google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase + * @enum {number} + * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value + * @property {number} UPDATE_STARTED=1 UPDATE_STARTED value + * @property {number} CREATING_GREEN_POOL=2 CREATING_GREEN_POOL value + * @property {number} CORDONING_BLUE_POOL=3 CORDONING_BLUE_POOL value + * @property {number} WAITING_TO_DRAIN_BLUE_POOL=8 WAITING_TO_DRAIN_BLUE_POOL value + * @property {number} DRAINING_BLUE_POOL=4 DRAINING_BLUE_POOL value + * @property {number} NODE_POOL_SOAKING=5 NODE_POOL_SOAKING value + * @property {number} DELETING_BLUE_POOL=6 DELETING_BLUE_POOL value + * @property {number} ROLLBACK_STARTED=7 ROLLBACK_STARTED value + */ + BlueGreenInfo.Phase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPDATE_STARTED"] = 1; + values[valuesById[2] = "CREATING_GREEN_POOL"] = 2; + values[valuesById[3] = "CORDONING_BLUE_POOL"] = 3; + values[valuesById[8] = "WAITING_TO_DRAIN_BLUE_POOL"] = 8; + values[valuesById[4] = "DRAINING_BLUE_POOL"] = 4; + values[valuesById[5] = "NODE_POOL_SOAKING"] = 5; + values[valuesById[6] = "DELETING_BLUE_POOL"] = 6; + values[valuesById[7] = "ROLLBACK_STARTED"] = 7; + return values; + })(); + + return BlueGreenInfo; + })(); + + return UpdateInfo; + })(); + + /** + * Status enum. + * @name google.container.v1beta1.NodePool.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RUNNING_WITH_ERROR=3 RUNNING_WITH_ERROR value + * @property {number} RECONCILING=4 RECONCILING value + * @property {number} STOPPING=5 STOPPING value + * @property {number} ERROR=6 ERROR value + */ + NodePool.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RUNNING_WITH_ERROR"] = 3; + values[valuesById[4] = "RECONCILING"] = 4; + values[valuesById[5] = "STOPPING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + NodePool.PlacementPolicy = (function() { + + /** + * Properties of a PlacementPolicy. + * @memberof google.container.v1beta1.NodePool + * @interface IPlacementPolicy + * @property {google.container.v1beta1.NodePool.PlacementPolicy.Type|null} [type] PlacementPolicy type + * @property {string|null} [tpuTopology] PlacementPolicy tpuTopology + * @property {string|null} [policyName] PlacementPolicy policyName + */ + + /** + * Constructs a new PlacementPolicy. + * @memberof google.container.v1beta1.NodePool + * @classdesc Represents a PlacementPolicy. + * @implements IPlacementPolicy + * @constructor + * @param {google.container.v1beta1.NodePool.IPlacementPolicy=} [properties] Properties to set + */ + function PlacementPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlacementPolicy type. + * @member {google.container.v1beta1.NodePool.PlacementPolicy.Type} type + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.type = 0; + + /** + * PlacementPolicy tpuTopology. + * @member {string} tpuTopology + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.tpuTopology = ""; + + /** + * PlacementPolicy policyName. + * @member {string} policyName + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.policyName = ""; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1beta1.NodePool.IPlacementPolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy instance + */ + PlacementPolicy.create = function create(properties) { + return new PlacementPolicy(properties); + }; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1beta1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.tpuTopology != null && Object.hasOwnProperty.call(message, "tpuTopology")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tpuTopology); + if (message.policyName != null && Object.hasOwnProperty.call(message, "policyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.policyName); + return writer; + }; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1beta1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.PlacementPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.tpuTopology = reader.string(); + break; + } + case 3: { + message.policyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacementPolicy message. + * @function verify + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacementPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) + if (!$util.isString(message.tpuTopology)) + return "tpuTopology: string expected"; + if (message.policyName != null && message.hasOwnProperty("policyName")) + if (!$util.isString(message.policyName)) + return "policyName: string expected"; + return null; + }; + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy + */ + PlacementPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool.PlacementPolicy) + return object; + var message = new $root.google.container.v1beta1.NodePool.PlacementPolicy(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "COMPACT": + case 1: + message.type = 1; + break; + } + if (object.tpuTopology != null) + message.tpuTopology = String(object.tpuTopology); + if (object.policyName != null) + message.policyName = String(object.policyName); + return message; + }; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {google.container.v1beta1.NodePool.PlacementPolicy} message PlacementPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacementPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.tpuTopology = ""; + object.policyName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1beta1.NodePool.PlacementPolicy.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.NodePool.PlacementPolicy.Type[message.type] : message.type; + if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) + object.tpuTopology = message.tpuTopology; + if (message.policyName != null && message.hasOwnProperty("policyName")) + object.policyName = message.policyName; + return object; + }; + + /** + * Converts this PlacementPolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @instance + * @returns {Object.} JSON object + */ + PlacementPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacementPolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool.PlacementPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool.PlacementPolicy"; + }; + + /** + * Type enum. + * @name google.container.v1beta1.NodePool.PlacementPolicy.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} COMPACT=1 COMPACT value + */ + PlacementPolicy.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPACT"] = 1; + return values; + })(); + + return PlacementPolicy; + })(); + + NodePool.QueuedProvisioning = (function() { + + /** + * Properties of a QueuedProvisioning. + * @memberof google.container.v1beta1.NodePool + * @interface IQueuedProvisioning + * @property {boolean|null} [enabled] QueuedProvisioning enabled + */ + + /** + * Constructs a new QueuedProvisioning. + * @memberof google.container.v1beta1.NodePool + * @classdesc Represents a QueuedProvisioning. + * @implements IQueuedProvisioning + * @constructor + * @param {google.container.v1beta1.NodePool.IQueuedProvisioning=} [properties] Properties to set + */ + function QueuedProvisioning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueuedProvisioning enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @instance + */ + QueuedProvisioning.prototype.enabled = false; + + /** + * Creates a new QueuedProvisioning instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1beta1.NodePool.IQueuedProvisioning=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning instance + */ + QueuedProvisioning.create = function create(properties) { + return new QueuedProvisioning(properties); + }; + + /** + * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1beta1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueuedProvisioning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1beta1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueuedProvisioning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueuedProvisioning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.QueuedProvisioning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueuedProvisioning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueuedProvisioning message. + * @function verify + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueuedProvisioning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning + */ + QueuedProvisioning.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePool.QueuedProvisioning) + return object; + var message = new $root.google.container.v1beta1.NodePool.QueuedProvisioning(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {google.container.v1beta1.NodePool.QueuedProvisioning} message QueuedProvisioning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueuedProvisioning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this QueuedProvisioning to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @instance + * @returns {Object.} JSON object + */ + QueuedProvisioning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueuedProvisioning + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePool.QueuedProvisioning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueuedProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePool.QueuedProvisioning"; + }; + + return QueuedProvisioning; + })(); + + return NodePool; + })(); + + v1beta1.NodeManagement = (function() { + + /** + * Properties of a NodeManagement. + * @memberof google.container.v1beta1 + * @interface INodeManagement + * @property {boolean|null} [autoUpgrade] NodeManagement autoUpgrade + * @property {boolean|null} [autoRepair] NodeManagement autoRepair + * @property {google.container.v1beta1.IAutoUpgradeOptions|null} [upgradeOptions] NodeManagement upgradeOptions + */ + + /** + * Constructs a new NodeManagement. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodeManagement. + * @implements INodeManagement + * @constructor + * @param {google.container.v1beta1.INodeManagement=} [properties] Properties to set + */ + function NodeManagement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeManagement autoUpgrade. + * @member {boolean} autoUpgrade + * @memberof google.container.v1beta1.NodeManagement + * @instance + */ + NodeManagement.prototype.autoUpgrade = false; + + /** + * NodeManagement autoRepair. + * @member {boolean} autoRepair + * @memberof google.container.v1beta1.NodeManagement + * @instance + */ + NodeManagement.prototype.autoRepair = false; + + /** + * NodeManagement upgradeOptions. + * @member {google.container.v1beta1.IAutoUpgradeOptions|null|undefined} upgradeOptions + * @memberof google.container.v1beta1.NodeManagement + * @instance + */ + NodeManagement.prototype.upgradeOptions = null; + + /** + * Creates a new NodeManagement instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {google.container.v1beta1.INodeManagement=} [properties] Properties to set + * @returns {google.container.v1beta1.NodeManagement} NodeManagement instance + */ + NodeManagement.create = function create(properties) { + return new NodeManagement(properties); + }; + + /** + * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {google.container.v1beta1.INodeManagement} message NodeManagement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeManagement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoUpgrade != null && Object.hasOwnProperty.call(message, "autoUpgrade")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.autoUpgrade); + if (message.autoRepair != null && Object.hasOwnProperty.call(message, "autoRepair")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRepair); + if (message.upgradeOptions != null && Object.hasOwnProperty.call(message, "upgradeOptions")) + $root.google.container.v1beta1.AutoUpgradeOptions.encode(message.upgradeOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {google.container.v1beta1.INodeManagement} message NodeManagement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeManagement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeManagement message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodeManagement} NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeManagement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeManagement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.autoUpgrade = reader.bool(); + break; + } + case 2: { + message.autoRepair = reader.bool(); + break; + } + case 10: { + message.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeManagement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodeManagement} NodeManagement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeManagement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeManagement message. + * @function verify + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeManagement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) + if (typeof message.autoUpgrade !== "boolean") + return "autoUpgrade: boolean expected"; + if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) + if (typeof message.autoRepair !== "boolean") + return "autoRepair: boolean expected"; + if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) { + var error = $root.google.container.v1beta1.AutoUpgradeOptions.verify(message.upgradeOptions); + if (error) + return "upgradeOptions." + error; + } + return null; + }; + + /** + * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodeManagement} NodeManagement + */ + NodeManagement.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodeManagement) + return object; + var message = new $root.google.container.v1beta1.NodeManagement(); + if (object.autoUpgrade != null) + message.autoUpgrade = Boolean(object.autoUpgrade); + if (object.autoRepair != null) + message.autoRepair = Boolean(object.autoRepair); + if (object.upgradeOptions != null) { + if (typeof object.upgradeOptions !== "object") + throw TypeError(".google.container.v1beta1.NodeManagement.upgradeOptions: object expected"); + message.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.fromObject(object.upgradeOptions); + } + return message; + }; + + /** + * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {google.container.v1beta1.NodeManagement} message NodeManagement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeManagement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoUpgrade = false; + object.autoRepair = false; + object.upgradeOptions = null; + } + if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) + object.autoUpgrade = message.autoUpgrade; + if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) + object.autoRepair = message.autoRepair; + if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) + object.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.toObject(message.upgradeOptions, options); + return object; + }; + + /** + * Converts this NodeManagement to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodeManagement + * @instance + * @returns {Object.} JSON object + */ + NodeManagement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeManagement + * @function getTypeUrl + * @memberof google.container.v1beta1.NodeManagement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeManagement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodeManagement"; + }; + + return NodeManagement; + })(); + + v1beta1.AutoUpgradeOptions = (function() { + + /** + * Properties of an AutoUpgradeOptions. + * @memberof google.container.v1beta1 + * @interface IAutoUpgradeOptions + * @property {string|null} [autoUpgradeStartTime] AutoUpgradeOptions autoUpgradeStartTime + * @property {string|null} [description] AutoUpgradeOptions description + */ + + /** + * Constructs a new AutoUpgradeOptions. + * @memberof google.container.v1beta1 + * @classdesc Represents an AutoUpgradeOptions. + * @implements IAutoUpgradeOptions + * @constructor + * @param {google.container.v1beta1.IAutoUpgradeOptions=} [properties] Properties to set + */ + function AutoUpgradeOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoUpgradeOptions autoUpgradeStartTime. + * @member {string} autoUpgradeStartTime + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @instance + */ + AutoUpgradeOptions.prototype.autoUpgradeStartTime = ""; + + /** + * AutoUpgradeOptions description. + * @member {string} description + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @instance + */ + AutoUpgradeOptions.prototype.description = ""; + + /** + * Creates a new AutoUpgradeOptions instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {google.container.v1beta1.IAutoUpgradeOptions=} [properties] Properties to set + * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions instance + */ + AutoUpgradeOptions.create = function create(properties) { + return new AutoUpgradeOptions(properties); + }; + + /** + * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {google.container.v1beta1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoUpgradeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoUpgradeStartTime != null && Object.hasOwnProperty.call(message, "autoUpgradeStartTime")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.autoUpgradeStartTime); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {google.container.v1beta1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoUpgradeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoUpgradeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutoUpgradeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.autoUpgradeStartTime = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoUpgradeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoUpgradeOptions message. + * @function verify + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoUpgradeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) + if (!$util.isString(message.autoUpgradeStartTime)) + return "autoUpgradeStartTime: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions + */ + AutoUpgradeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AutoUpgradeOptions) + return object; + var message = new $root.google.container.v1beta1.AutoUpgradeOptions(); + if (object.autoUpgradeStartTime != null) + message.autoUpgradeStartTime = String(object.autoUpgradeStartTime); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {google.container.v1beta1.AutoUpgradeOptions} message AutoUpgradeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoUpgradeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoUpgradeStartTime = ""; + object.description = ""; + } + if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) + object.autoUpgradeStartTime = message.autoUpgradeStartTime; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AutoUpgradeOptions to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @instance + * @returns {Object.} JSON object + */ + AutoUpgradeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoUpgradeOptions + * @function getTypeUrl + * @memberof google.container.v1beta1.AutoUpgradeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoUpgradeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AutoUpgradeOptions"; + }; + + return AutoUpgradeOptions; + })(); + + v1beta1.MaintenancePolicy = (function() { + + /** + * Properties of a MaintenancePolicy. + * @memberof google.container.v1beta1 + * @interface IMaintenancePolicy + * @property {google.container.v1beta1.IMaintenanceWindow|null} [window] MaintenancePolicy window + * @property {string|null} [resourceVersion] MaintenancePolicy resourceVersion + */ + + /** + * Constructs a new MaintenancePolicy. + * @memberof google.container.v1beta1 + * @classdesc Represents a MaintenancePolicy. + * @implements IMaintenancePolicy + * @constructor + * @param {google.container.v1beta1.IMaintenancePolicy=} [properties] Properties to set + */ + function MaintenancePolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenancePolicy window. + * @member {google.container.v1beta1.IMaintenanceWindow|null|undefined} window + * @memberof google.container.v1beta1.MaintenancePolicy + * @instance + */ + MaintenancePolicy.prototype.window = null; + + /** + * MaintenancePolicy resourceVersion. + * @member {string} resourceVersion + * @memberof google.container.v1beta1.MaintenancePolicy + * @instance + */ + MaintenancePolicy.prototype.resourceVersion = ""; + + /** + * Creates a new MaintenancePolicy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {google.container.v1beta1.IMaintenancePolicy=} [properties] Properties to set + * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy instance + */ + MaintenancePolicy.create = function create(properties) { + return new MaintenancePolicy(properties); + }; + + /** + * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {google.container.v1beta1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenancePolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.window != null && Object.hasOwnProperty.call(message, "window")) + $root.google.container.v1beta1.MaintenanceWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceVersion != null && Object.hasOwnProperty.call(message, "resourceVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceVersion); + return writer; + }; + + /** + * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {google.container.v1beta1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenancePolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenancePolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.window = $root.google.container.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resourceVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenancePolicy message. + * @function verify + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenancePolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.container.v1beta1.MaintenanceWindow.verify(message.window); + if (error) + return "window." + error; + } + if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) + if (!$util.isString(message.resourceVersion)) + return "resourceVersion: string expected"; + return null; + }; + + /** + * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy + */ + MaintenancePolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MaintenancePolicy) + return object; + var message = new $root.google.container.v1beta1.MaintenancePolicy(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.container.v1beta1.MaintenancePolicy.window: object expected"); + message.window = $root.google.container.v1beta1.MaintenanceWindow.fromObject(object.window); + } + if (object.resourceVersion != null) + message.resourceVersion = String(object.resourceVersion); + return message; + }; + + /** + * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {google.container.v1beta1.MaintenancePolicy} message MaintenancePolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenancePolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.window = null; + object.resourceVersion = ""; + } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.container.v1beta1.MaintenanceWindow.toObject(message.window, options); + if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) + object.resourceVersion = message.resourceVersion; + return object; + }; + + /** + * Converts this MaintenancePolicy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MaintenancePolicy + * @instance + * @returns {Object.} JSON object + */ + MaintenancePolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenancePolicy + * @function getTypeUrl + * @memberof google.container.v1beta1.MaintenancePolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MaintenancePolicy"; + }; + + return MaintenancePolicy; + })(); + + v1beta1.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.container.v1beta1 + * @interface IMaintenanceWindow + * @property {google.container.v1beta1.IDailyMaintenanceWindow|null} [dailyMaintenanceWindow] MaintenanceWindow dailyMaintenanceWindow + * @property {google.container.v1beta1.IRecurringTimeWindow|null} [recurringWindow] MaintenanceWindow recurringWindow + * @property {Object.|null} [maintenanceExclusions] MaintenanceWindow maintenanceExclusions + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.container.v1beta1 + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.container.v1beta1.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + this.maintenanceExclusions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow dailyMaintenanceWindow. + * @member {google.container.v1beta1.IDailyMaintenanceWindow|null|undefined} dailyMaintenanceWindow + * @memberof google.container.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.dailyMaintenanceWindow = null; + + /** + * MaintenanceWindow recurringWindow. + * @member {google.container.v1beta1.IRecurringTimeWindow|null|undefined} recurringWindow + * @memberof google.container.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.recurringWindow = null; + + /** + * MaintenanceWindow maintenanceExclusions. + * @member {Object.} maintenanceExclusions + * @memberof google.container.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.maintenanceExclusions = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MaintenanceWindow policy. + * @member {"dailyMaintenanceWindow"|"recurringWindow"|undefined} policy + * @memberof google.container.v1beta1.MaintenanceWindow + * @instance + */ + Object.defineProperty(MaintenanceWindow.prototype, "policy", { + get: $util.oneOfGetter($oneOfFields = ["dailyMaintenanceWindow", "recurringWindow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {google.container.v1beta1.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {google.container.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dailyMaintenanceWindow != null && Object.hasOwnProperty.call(message, "dailyMaintenanceWindow")) + $root.google.container.v1beta1.DailyMaintenanceWindow.encode(message.dailyMaintenanceWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recurringWindow != null && Object.hasOwnProperty.call(message, "recurringWindow")) + $root.google.container.v1beta1.RecurringTimeWindow.encode(message.recurringWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maintenanceExclusions != null && Object.hasOwnProperty.call(message, "maintenanceExclusions")) + for (var keys = Object.keys(message.maintenanceExclusions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.container.v1beta1.TimeWindow.encode(message.maintenanceExclusions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {google.container.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenanceWindow(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.maintenanceExclusions === $util.emptyObject) + message.maintenanceExclusions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.container.v1beta1.TimeWindow.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.maintenanceExclusions[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { + properties.policy = 1; + { + var error = $root.google.container.v1beta1.DailyMaintenanceWindow.verify(message.dailyMaintenanceWindow); + if (error) + return "dailyMaintenanceWindow." + error; + } + } + if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { + if (properties.policy === 1) + return "policy: multiple values"; + properties.policy = 1; + { + var error = $root.google.container.v1beta1.RecurringTimeWindow.verify(message.recurringWindow); + if (error) + return "recurringWindow." + error; + } + } + if (message.maintenanceExclusions != null && message.hasOwnProperty("maintenanceExclusions")) { + if (!$util.isObject(message.maintenanceExclusions)) + return "maintenanceExclusions: object expected"; + var key = Object.keys(message.maintenanceExclusions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.container.v1beta1.TimeWindow.verify(message.maintenanceExclusions[key[i]]); + if (error) + return "maintenanceExclusions." + error; + } + } + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MaintenanceWindow) + return object; + var message = new $root.google.container.v1beta1.MaintenanceWindow(); + if (object.dailyMaintenanceWindow != null) { + if (typeof object.dailyMaintenanceWindow !== "object") + throw TypeError(".google.container.v1beta1.MaintenanceWindow.dailyMaintenanceWindow: object expected"); + message.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.fromObject(object.dailyMaintenanceWindow); + } + if (object.recurringWindow != null) { + if (typeof object.recurringWindow !== "object") + throw TypeError(".google.container.v1beta1.MaintenanceWindow.recurringWindow: object expected"); + message.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.fromObject(object.recurringWindow); + } + if (object.maintenanceExclusions) { + if (typeof object.maintenanceExclusions !== "object") + throw TypeError(".google.container.v1beta1.MaintenanceWindow.maintenanceExclusions: object expected"); + message.maintenanceExclusions = {}; + for (var keys = Object.keys(object.maintenanceExclusions), i = 0; i < keys.length; ++i) { + if (typeof object.maintenanceExclusions[keys[i]] !== "object") + throw TypeError(".google.container.v1beta1.MaintenanceWindow.maintenanceExclusions: object expected"); + message.maintenanceExclusions[keys[i]] = $root.google.container.v1beta1.TimeWindow.fromObject(object.maintenanceExclusions[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {google.container.v1beta1.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.maintenanceExclusions = {}; + if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { + object.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.toObject(message.dailyMaintenanceWindow, options); + if (options.oneofs) + object.policy = "dailyMaintenanceWindow"; + } + if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { + object.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.toObject(message.recurringWindow, options); + if (options.oneofs) + object.policy = "recurringWindow"; + } + var keys2; + if (message.maintenanceExclusions && (keys2 = Object.keys(message.maintenanceExclusions)).length) { + object.maintenanceExclusions = {}; + for (var j = 0; j < keys2.length; ++j) + object.maintenanceExclusions[keys2[j]] = $root.google.container.v1beta1.TimeWindow.toObject(message.maintenanceExclusions[keys2[j]], options); + } + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.container.v1beta1.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MaintenanceWindow"; + }; + + return MaintenanceWindow; + })(); + + v1beta1.TimeWindow = (function() { + + /** + * Properties of a TimeWindow. + * @memberof google.container.v1beta1 + * @interface ITimeWindow + * @property {google.container.v1beta1.IMaintenanceExclusionOptions|null} [maintenanceExclusionOptions] TimeWindow maintenanceExclusionOptions + * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime + */ + + /** + * Constructs a new TimeWindow. + * @memberof google.container.v1beta1 + * @classdesc Represents a TimeWindow. + * @implements ITimeWindow + * @constructor + * @param {google.container.v1beta1.ITimeWindow=} [properties] Properties to set + */ + function TimeWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeWindow maintenanceExclusionOptions. + * @member {google.container.v1beta1.IMaintenanceExclusionOptions|null|undefined} maintenanceExclusionOptions + * @memberof google.container.v1beta1.TimeWindow + * @instance + */ + TimeWindow.prototype.maintenanceExclusionOptions = null; + + /** + * TimeWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.container.v1beta1.TimeWindow + * @instance + */ + TimeWindow.prototype.startTime = null; + + /** + * TimeWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.container.v1beta1.TimeWindow + * @instance + */ + TimeWindow.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeWindow options. + * @member {"maintenanceExclusionOptions"|undefined} options + * @memberof google.container.v1beta1.TimeWindow + * @instance + */ + Object.defineProperty(TimeWindow.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["maintenanceExclusionOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeWindow instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {google.container.v1beta1.ITimeWindow=} [properties] Properties to set + * @returns {google.container.v1beta1.TimeWindow} TimeWindow instance + */ + TimeWindow.create = function create(properties) { + return new TimeWindow(properties); + }; + + /** + * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {google.container.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maintenanceExclusionOptions != null && Object.hasOwnProperty.call(message, "maintenanceExclusionOptions")) + $root.google.container.v1beta1.MaintenanceExclusionOptions.encode(message.maintenanceExclusionOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {google.container.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.TimeWindow} TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.TimeWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.decode(reader, reader.uint32()); + break; + } + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.TimeWindow} TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeWindow message. + * @function verify + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { + properties.options = 1; + { + var error = $root.google.container.v1beta1.MaintenanceExclusionOptions.verify(message.maintenanceExclusionOptions); + if (error) + return "maintenanceExclusionOptions." + error; + } + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.TimeWindow} TimeWindow + */ + TimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.TimeWindow) + return object; + var message = new $root.google.container.v1beta1.TimeWindow(); + if (object.maintenanceExclusionOptions != null) { + if (typeof object.maintenanceExclusionOptions !== "object") + throw TypeError(".google.container.v1beta1.TimeWindow.maintenanceExclusionOptions: object expected"); + message.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.fromObject(object.maintenanceExclusionOptions); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.container.v1beta1.TimeWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.container.v1beta1.TimeWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {google.container.v1beta1.TimeWindow} message TimeWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { + object.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.toObject(message.maintenanceExclusionOptions, options); + if (options.oneofs) + object.options = "maintenanceExclusionOptions"; + } + return object; + }; + + /** + * Converts this TimeWindow to JSON. + * @function toJSON + * @memberof google.container.v1beta1.TimeWindow + * @instance + * @returns {Object.} JSON object + */ + TimeWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeWindow + * @function getTypeUrl + * @memberof google.container.v1beta1.TimeWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.TimeWindow"; + }; + + return TimeWindow; + })(); + + v1beta1.MaintenanceExclusionOptions = (function() { + + /** + * Properties of a MaintenanceExclusionOptions. + * @memberof google.container.v1beta1 + * @interface IMaintenanceExclusionOptions + * @property {google.container.v1beta1.MaintenanceExclusionOptions.Scope|null} [scope] MaintenanceExclusionOptions scope + */ + + /** + * Constructs a new MaintenanceExclusionOptions. + * @memberof google.container.v1beta1 + * @classdesc Represents a MaintenanceExclusionOptions. + * @implements IMaintenanceExclusionOptions + * @constructor + * @param {google.container.v1beta1.IMaintenanceExclusionOptions=} [properties] Properties to set + */ + function MaintenanceExclusionOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceExclusionOptions scope. + * @member {google.container.v1beta1.MaintenanceExclusionOptions.Scope} scope + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @instance + */ + MaintenanceExclusionOptions.prototype.scope = 0; + + /** + * Creates a new MaintenanceExclusionOptions instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1beta1.IMaintenanceExclusionOptions=} [properties] Properties to set + * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions instance + */ + MaintenanceExclusionOptions.create = function create(properties) { + return new MaintenanceExclusionOptions(properties); + }; + + /** + * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1beta1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceExclusionOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + return writer; + }; + + /** + * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1beta1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceExclusionOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceExclusionOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenanceExclusionOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceExclusionOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceExclusionOptions message. + * @function verify + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceExclusionOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions + */ + MaintenanceExclusionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MaintenanceExclusionOptions) + return object; + var message = new $root.google.container.v1beta1.MaintenanceExclusionOptions(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "NO_UPGRADES": + case 0: + message.scope = 0; + break; + case "NO_MINOR_UPGRADES": + case 1: + message.scope = 1; + break; + case "NO_MINOR_OR_NODE_UPGRADES": + case 2: + message.scope = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {google.container.v1beta1.MaintenanceExclusionOptions} message MaintenanceExclusionOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceExclusionOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scope = options.enums === String ? "NO_UPGRADES" : 0; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.container.v1beta1.MaintenanceExclusionOptions.Scope[message.scope] === undefined ? message.scope : $root.google.container.v1beta1.MaintenanceExclusionOptions.Scope[message.scope] : message.scope; + return object; + }; + + /** + * Converts this MaintenanceExclusionOptions to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @instance + * @returns {Object.} JSON object + */ + MaintenanceExclusionOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceExclusionOptions + * @function getTypeUrl + * @memberof google.container.v1beta1.MaintenanceExclusionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceExclusionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MaintenanceExclusionOptions"; + }; + + /** + * Scope enum. + * @name google.container.v1beta1.MaintenanceExclusionOptions.Scope + * @enum {number} + * @property {number} NO_UPGRADES=0 NO_UPGRADES value + * @property {number} NO_MINOR_UPGRADES=1 NO_MINOR_UPGRADES value + * @property {number} NO_MINOR_OR_NODE_UPGRADES=2 NO_MINOR_OR_NODE_UPGRADES value + */ + MaintenanceExclusionOptions.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NO_UPGRADES"] = 0; + values[valuesById[1] = "NO_MINOR_UPGRADES"] = 1; + values[valuesById[2] = "NO_MINOR_OR_NODE_UPGRADES"] = 2; + return values; + })(); + + return MaintenanceExclusionOptions; + })(); + + v1beta1.RecurringTimeWindow = (function() { + + /** + * Properties of a RecurringTimeWindow. + * @memberof google.container.v1beta1 + * @interface IRecurringTimeWindow + * @property {google.container.v1beta1.ITimeWindow|null} [window] RecurringTimeWindow window + * @property {string|null} [recurrence] RecurringTimeWindow recurrence + */ + + /** + * Constructs a new RecurringTimeWindow. + * @memberof google.container.v1beta1 + * @classdesc Represents a RecurringTimeWindow. + * @implements IRecurringTimeWindow + * @constructor + * @param {google.container.v1beta1.IRecurringTimeWindow=} [properties] Properties to set + */ + function RecurringTimeWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecurringTimeWindow window. + * @member {google.container.v1beta1.ITimeWindow|null|undefined} window + * @memberof google.container.v1beta1.RecurringTimeWindow + * @instance + */ + RecurringTimeWindow.prototype.window = null; + + /** + * RecurringTimeWindow recurrence. + * @member {string} recurrence + * @memberof google.container.v1beta1.RecurringTimeWindow + * @instance + */ + RecurringTimeWindow.prototype.recurrence = ""; + + /** + * Creates a new RecurringTimeWindow instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {google.container.v1beta1.IRecurringTimeWindow=} [properties] Properties to set + * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow instance + */ + RecurringTimeWindow.create = function create(properties) { + return new RecurringTimeWindow(properties); + }; + + /** + * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {google.container.v1beta1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringTimeWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.window != null && Object.hasOwnProperty.call(message, "window")) + $root.google.container.v1beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.recurrence); + return writer; + }; + + /** + * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {google.container.v1beta1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringTimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringTimeWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RecurringTimeWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.window = $root.google.container.v1beta1.TimeWindow.decode(reader, reader.uint32()); + break; + } + case 2: { + message.recurrence = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringTimeWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringTimeWindow message. + * @function verify + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringTimeWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.container.v1beta1.TimeWindow.verify(message.window); + if (error) + return "window." + error; + } + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + if (!$util.isString(message.recurrence)) + return "recurrence: string expected"; + return null; + }; + + /** + * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow + */ + RecurringTimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RecurringTimeWindow) + return object; + var message = new $root.google.container.v1beta1.RecurringTimeWindow(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.container.v1beta1.RecurringTimeWindow.window: object expected"); + message.window = $root.google.container.v1beta1.TimeWindow.fromObject(object.window); + } + if (object.recurrence != null) + message.recurrence = String(object.recurrence); + return message; + }; + + /** + * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {google.container.v1beta1.RecurringTimeWindow} message RecurringTimeWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringTimeWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.window = null; + object.recurrence = ""; + } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.container.v1beta1.TimeWindow.toObject(message.window, options); + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + object.recurrence = message.recurrence; + return object; + }; + + /** + * Converts this RecurringTimeWindow to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RecurringTimeWindow + * @instance + * @returns {Object.} JSON object + */ + RecurringTimeWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecurringTimeWindow + * @function getTypeUrl + * @memberof google.container.v1beta1.RecurringTimeWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringTimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RecurringTimeWindow"; + }; + + return RecurringTimeWindow; + })(); + + v1beta1.DailyMaintenanceWindow = (function() { + + /** + * Properties of a DailyMaintenanceWindow. + * @memberof google.container.v1beta1 + * @interface IDailyMaintenanceWindow + * @property {string|null} [startTime] DailyMaintenanceWindow startTime + * @property {string|null} [duration] DailyMaintenanceWindow duration + */ + + /** + * Constructs a new DailyMaintenanceWindow. + * @memberof google.container.v1beta1 + * @classdesc Represents a DailyMaintenanceWindow. + * @implements IDailyMaintenanceWindow + * @constructor + * @param {google.container.v1beta1.IDailyMaintenanceWindow=} [properties] Properties to set + */ + function DailyMaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DailyMaintenanceWindow startTime. + * @member {string} startTime + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @instance + */ + DailyMaintenanceWindow.prototype.startTime = ""; + + /** + * DailyMaintenanceWindow duration. + * @member {string} duration + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @instance + */ + DailyMaintenanceWindow.prototype.duration = ""; + + /** + * Creates a new DailyMaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {google.container.v1beta1.IDailyMaintenanceWindow=} [properties] Properties to set + * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow instance + */ + DailyMaintenanceWindow.create = function create(properties) { + return new DailyMaintenanceWindow(properties); + }; + + /** + * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {google.container.v1beta1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailyMaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.startTime); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.duration); + return writer; + }; + + /** + * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {google.container.v1beta1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailyMaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailyMaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DailyMaintenanceWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.startTime = reader.string(); + break; + } + case 3: { + message.duration = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailyMaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DailyMaintenanceWindow message. + * @function verify + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DailyMaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isString(message.startTime)) + return "startTime: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isString(message.duration)) + return "duration: string expected"; + return null; + }; + + /** + * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow + */ + DailyMaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DailyMaintenanceWindow) + return object; + var message = new $root.google.container.v1beta1.DailyMaintenanceWindow(); + if (object.startTime != null) + message.startTime = String(object.startTime); + if (object.duration != null) + message.duration = String(object.duration); + return message; + }; + + /** + * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {google.container.v1beta1.DailyMaintenanceWindow} message DailyMaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DailyMaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = ""; + object.duration = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = message.startTime; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + return object; + }; + + /** + * Converts this DailyMaintenanceWindow to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + DailyMaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DailyMaintenanceWindow + * @function getTypeUrl + * @memberof google.container.v1beta1.DailyMaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DailyMaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DailyMaintenanceWindow"; + }; + + return DailyMaintenanceWindow; + })(); + + v1beta1.SetNodePoolManagementRequest = (function() { + + /** + * Properties of a SetNodePoolManagementRequest. + * @memberof google.container.v1beta1 + * @interface ISetNodePoolManagementRequest + * @property {string|null} [projectId] SetNodePoolManagementRequest projectId + * @property {string|null} [zone] SetNodePoolManagementRequest zone + * @property {string|null} [clusterId] SetNodePoolManagementRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolManagementRequest nodePoolId + * @property {google.container.v1beta1.INodeManagement|null} [management] SetNodePoolManagementRequest management + * @property {string|null} [name] SetNodePoolManagementRequest name + */ + + /** + * Constructs a new SetNodePoolManagementRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetNodePoolManagementRequest. + * @implements ISetNodePoolManagementRequest + * @constructor + * @param {google.container.v1beta1.ISetNodePoolManagementRequest=} [properties] Properties to set + */ + function SetNodePoolManagementRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolManagementRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.projectId = ""; + + /** + * SetNodePoolManagementRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.zone = ""; + + /** + * SetNodePoolManagementRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.clusterId = ""; + + /** + * SetNodePoolManagementRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolManagementRequest management. + * @member {google.container.v1beta1.INodeManagement|null|undefined} management + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.management = null; + + /** + * SetNodePoolManagementRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + */ + SetNodePoolManagementRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolManagementRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolManagementRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest instance + */ + SetNodePoolManagementRequest.create = function create(properties) { + return new SetNodePoolManagementRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolManagementRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolManagementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolManagementRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolManagementRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolManagementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolManagementRequest message. + * @function verify + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolManagementRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest + */ + SetNodePoolManagementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetNodePoolManagementRequest) + return object; + var message = new $root.google.container.v1beta1.SetNodePoolManagementRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1beta1.SetNodePoolManagementRequest.management: object expected"); + message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {google.container.v1beta1.SetNodePoolManagementRequest} message SetNodePoolManagementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolManagementRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.management = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolManagementRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolManagementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolManagementRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetNodePoolManagementRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolManagementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolManagementRequest"; + }; + + return SetNodePoolManagementRequest; + })(); + + v1beta1.SetNodePoolSizeRequest = (function() { + + /** + * Properties of a SetNodePoolSizeRequest. + * @memberof google.container.v1beta1 + * @interface ISetNodePoolSizeRequest + * @property {string|null} [projectId] SetNodePoolSizeRequest projectId + * @property {string|null} [zone] SetNodePoolSizeRequest zone + * @property {string|null} [clusterId] SetNodePoolSizeRequest clusterId + * @property {string|null} [nodePoolId] SetNodePoolSizeRequest nodePoolId + * @property {number|null} [nodeCount] SetNodePoolSizeRequest nodeCount + * @property {string|null} [name] SetNodePoolSizeRequest name + */ + + /** + * Constructs a new SetNodePoolSizeRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetNodePoolSizeRequest. + * @implements ISetNodePoolSizeRequest + * @constructor + * @param {google.container.v1beta1.ISetNodePoolSizeRequest=} [properties] Properties to set + */ + function SetNodePoolSizeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNodePoolSizeRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.projectId = ""; + + /** + * SetNodePoolSizeRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.zone = ""; + + /** + * SetNodePoolSizeRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.clusterId = ""; + + /** + * SetNodePoolSizeRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.nodePoolId = ""; + + /** + * SetNodePoolSizeRequest nodeCount. + * @member {number} nodeCount + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.nodeCount = 0; + + /** + * SetNodePoolSizeRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + */ + SetNodePoolSizeRequest.prototype.name = ""; + + /** + * Creates a new SetNodePoolSizeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolSizeRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest instance + */ + SetNodePoolSizeRequest.create = function create(properties) { + return new SetNodePoolSizeRequest(properties); + }; + + /** + * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolSizeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nodeCount); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1beta1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNodePoolSizeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolSizeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolSizeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 5: { + message.nodeCount = reader.int32(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNodePoolSizeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNodePoolSizeRequest message. + * @function verify + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNodePoolSizeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest + */ + SetNodePoolSizeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetNodePoolSizeRequest) + return object; + var message = new $root.google.container.v1beta1.SetNodePoolSizeRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {google.container.v1beta1.SetNodePoolSizeRequest} message SetNodePoolSizeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNodePoolSizeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.nodeCount = 0; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNodePoolSizeRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @instance + * @returns {Object.} JSON object + */ + SetNodePoolSizeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNodePoolSizeRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetNodePoolSizeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNodePoolSizeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolSizeRequest"; + }; + + return SetNodePoolSizeRequest; + })(); + + v1beta1.CompleteNodePoolUpgradeRequest = (function() { + + /** + * Properties of a CompleteNodePoolUpgradeRequest. + * @memberof google.container.v1beta1 + * @interface ICompleteNodePoolUpgradeRequest + * @property {string|null} [name] CompleteNodePoolUpgradeRequest name + */ + + /** + * Constructs a new CompleteNodePoolUpgradeRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CompleteNodePoolUpgradeRequest. + * @implements ICompleteNodePoolUpgradeRequest + * @constructor + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set + */ + function CompleteNodePoolUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteNodePoolUpgradeRequest name. + * @member {string} name + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @instance + */ + CompleteNodePoolUpgradeRequest.prototype.name = ""; + + /** + * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest instance + */ + CompleteNodePoolUpgradeRequest.create = function create(properties) { + return new CompleteNodePoolUpgradeRequest(properties); + }; + + /** + * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteNodePoolUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest(); + 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 CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteNodePoolUpgradeRequest message. + * @function verify + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest + */ + CompleteNodePoolUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest) + return object; + var message = new $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.CompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteNodePoolUpgradeRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CompleteNodePoolUpgradeRequest"; + }; + + return CompleteNodePoolUpgradeRequest; + })(); + + v1beta1.RollbackNodePoolUpgradeRequest = (function() { + + /** + * Properties of a RollbackNodePoolUpgradeRequest. + * @memberof google.container.v1beta1 + * @interface IRollbackNodePoolUpgradeRequest + * @property {string|null} [projectId] RollbackNodePoolUpgradeRequest projectId + * @property {string|null} [zone] RollbackNodePoolUpgradeRequest zone + * @property {string|null} [clusterId] RollbackNodePoolUpgradeRequest clusterId + * @property {string|null} [nodePoolId] RollbackNodePoolUpgradeRequest nodePoolId + * @property {string|null} [name] RollbackNodePoolUpgradeRequest name + * @property {boolean|null} [respectPdb] RollbackNodePoolUpgradeRequest respectPdb + */ + + /** + * Constructs a new RollbackNodePoolUpgradeRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a RollbackNodePoolUpgradeRequest. + * @implements IRollbackNodePoolUpgradeRequest + * @constructor + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set + */ + function RollbackNodePoolUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackNodePoolUpgradeRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.projectId = ""; + + /** + * RollbackNodePoolUpgradeRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.zone = ""; + + /** + * RollbackNodePoolUpgradeRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.clusterId = ""; + + /** + * RollbackNodePoolUpgradeRequest nodePoolId. + * @member {string} nodePoolId + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.nodePoolId = ""; + + /** + * RollbackNodePoolUpgradeRequest name. + * @member {string} name + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.name = ""; + + /** + * RollbackNodePoolUpgradeRequest respectPdb. + * @member {boolean} respectPdb + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + */ + RollbackNodePoolUpgradeRequest.prototype.respectPdb = false; + + /** + * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest instance + */ + RollbackNodePoolUpgradeRequest.create = function create(properties) { + return new RollbackNodePoolUpgradeRequest(properties); + }; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackNodePoolUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.respectPdb != null && Object.hasOwnProperty.call(message, "respectPdb")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.respectPdb); + return writer; + }; + + /** + * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackNodePoolUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.nodePoolId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + message.respectPdb = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RollbackNodePoolUpgradeRequest message. + * @function verify + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RollbackNodePoolUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + if (!$util.isString(message.nodePoolId)) + return "nodePoolId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) + if (typeof message.respectPdb !== "boolean") + return "respectPdb: boolean expected"; + return null; + }; + + /** + * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest + */ + RollbackNodePoolUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest) + return object; + var message = new $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.nodePoolId != null) + message.nodePoolId = String(object.nodePoolId); + if (object.name != null) + message.name = String(object.name); + if (object.respectPdb != null) + message.respectPdb = Boolean(object.respectPdb); + return message; + }; + + /** + * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {google.container.v1beta1.RollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RollbackNodePoolUpgradeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.nodePoolId = ""; + object.name = ""; + object.respectPdb = false; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) + object.nodePoolId = message.nodePoolId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) + object.respectPdb = message.respectPdb; + return object; + }; + + /** + * Converts this RollbackNodePoolUpgradeRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + RollbackNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RollbackNodePoolUpgradeRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RollbackNodePoolUpgradeRequest"; + }; + + return RollbackNodePoolUpgradeRequest; + })(); + + v1beta1.ListNodePoolsResponse = (function() { + + /** + * Properties of a ListNodePoolsResponse. + * @memberof google.container.v1beta1 + * @interface IListNodePoolsResponse + * @property {Array.|null} [nodePools] ListNodePoolsResponse nodePools + */ + + /** + * Constructs a new ListNodePoolsResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListNodePoolsResponse. + * @implements IListNodePoolsResponse + * @constructor + * @param {google.container.v1beta1.IListNodePoolsResponse=} [properties] Properties to set + */ + function ListNodePoolsResponse(properties) { + this.nodePools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNodePoolsResponse nodePools. + * @member {Array.} nodePools + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @instance + */ + ListNodePoolsResponse.prototype.nodePools = $util.emptyArray; + + /** + * Creates a new ListNodePoolsResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {google.container.v1beta1.IListNodePoolsResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse instance + */ + ListNodePoolsResponse.create = function create(properties) { + return new ListNodePoolsResponse(properties); + }; + + /** + * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {google.container.v1beta1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.container.v1beta1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {google.container.v1beta1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListNodePoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.container.v1beta1.NodePool.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNodePoolsResponse message. + * @function verify + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNodePoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.container.v1beta1.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + return null; + }; + + /** + * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse + */ + ListNodePoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListNodePoolsResponse) + return object; + var message = new $root.google.container.v1beta1.ListNodePoolsResponse(); + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.container.v1beta1.ListNodePoolsResponse.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.container.v1beta1.ListNodePoolsResponse.nodePools: object expected"); + message.nodePools[i] = $root.google.container.v1beta1.NodePool.fromObject(object.nodePools[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {google.container.v1beta1.ListNodePoolsResponse} message ListNodePoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNodePoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodePools = []; + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.container.v1beta1.NodePool.toObject(message.nodePools[j], options); + } + return object; + }; + + /** + * Converts this ListNodePoolsResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListNodePoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNodePoolsResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.ListNodePoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListNodePoolsResponse"; + }; + + return ListNodePoolsResponse; + })(); + + v1beta1.ClusterAutoscaling = (function() { + + /** + * Properties of a ClusterAutoscaling. + * @memberof google.container.v1beta1 + * @interface IClusterAutoscaling + * @property {boolean|null} [enableNodeAutoprovisioning] ClusterAutoscaling enableNodeAutoprovisioning + * @property {Array.|null} [resourceLimits] ClusterAutoscaling resourceLimits + * @property {google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|null} [autoscalingProfile] ClusterAutoscaling autoscalingProfile + * @property {google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null} [autoprovisioningNodePoolDefaults] ClusterAutoscaling autoprovisioningNodePoolDefaults + * @property {Array.|null} [autoprovisioningLocations] ClusterAutoscaling autoprovisioningLocations + */ + + /** + * Constructs a new ClusterAutoscaling. + * @memberof google.container.v1beta1 + * @classdesc Represents a ClusterAutoscaling. + * @implements IClusterAutoscaling + * @constructor + * @param {google.container.v1beta1.IClusterAutoscaling=} [properties] Properties to set + */ + function ClusterAutoscaling(properties) { + this.resourceLimits = []; + this.autoprovisioningLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterAutoscaling enableNodeAutoprovisioning. + * @member {boolean} enableNodeAutoprovisioning + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.enableNodeAutoprovisioning = false; + + /** + * ClusterAutoscaling resourceLimits. + * @member {Array.} resourceLimits + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.resourceLimits = $util.emptyArray; + + /** + * ClusterAutoscaling autoscalingProfile. + * @member {google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile} autoscalingProfile + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoscalingProfile = 0; + + /** + * ClusterAutoscaling autoprovisioningNodePoolDefaults. + * @member {google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null|undefined} autoprovisioningNodePoolDefaults + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoprovisioningNodePoolDefaults = null; + + /** + * ClusterAutoscaling autoprovisioningLocations. + * @member {Array.} autoprovisioningLocations + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.autoprovisioningLocations = $util.emptyArray; + + /** + * Creates a new ClusterAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {google.container.v1beta1.IClusterAutoscaling=} [properties] Properties to set + * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling instance + */ + ClusterAutoscaling.create = function create(properties) { + return new ClusterAutoscaling(properties); + }; + + /** + * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {google.container.v1beta1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNodeAutoprovisioning != null && Object.hasOwnProperty.call(message, "enableNodeAutoprovisioning")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNodeAutoprovisioning); + if (message.resourceLimits != null && message.resourceLimits.length) + for (var i = 0; i < message.resourceLimits.length; ++i) + $root.google.container.v1beta1.ResourceLimit.encode(message.resourceLimits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoscalingProfile != null && Object.hasOwnProperty.call(message, "autoscalingProfile")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.autoscalingProfile); + if (message.autoprovisioningNodePoolDefaults != null && Object.hasOwnProperty.call(message, "autoprovisioningNodePoolDefaults")) + $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.encode(message.autoprovisioningNodePoolDefaults, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.autoprovisioningLocations != null && message.autoprovisioningLocations.length) + for (var i = 0; i < message.autoprovisioningLocations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.autoprovisioningLocations[i]); + return writer; + }; + + /** + * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {google.container.v1beta1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNodeAutoprovisioning = reader.bool(); + break; + } + case 2: { + if (!(message.resourceLimits && message.resourceLimits.length)) + message.resourceLimits = []; + message.resourceLimits.push($root.google.container.v1beta1.ResourceLimit.decode(reader, reader.uint32())); + break; + } + case 3: { + message.autoscalingProfile = reader.int32(); + break; + } + case 4: { + message.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.autoprovisioningLocations && message.autoprovisioningLocations.length)) + message.autoprovisioningLocations = []; + message.autoprovisioningLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterAutoscaling message. + * @function verify + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) + if (typeof message.enableNodeAutoprovisioning !== "boolean") + return "enableNodeAutoprovisioning: boolean expected"; + if (message.resourceLimits != null && message.hasOwnProperty("resourceLimits")) { + if (!Array.isArray(message.resourceLimits)) + return "resourceLimits: array expected"; + for (var i = 0; i < message.resourceLimits.length; ++i) { + var error = $root.google.container.v1beta1.ResourceLimit.verify(message.resourceLimits[i]); + if (error) + return "resourceLimits." + error; + } + } + if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) + switch (message.autoscalingProfile) { + default: + return "autoscalingProfile: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) { + var error = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify(message.autoprovisioningNodePoolDefaults); + if (error) + return "autoprovisioningNodePoolDefaults." + error; + } + if (message.autoprovisioningLocations != null && message.hasOwnProperty("autoprovisioningLocations")) { + if (!Array.isArray(message.autoprovisioningLocations)) + return "autoprovisioningLocations: array expected"; + for (var i = 0; i < message.autoprovisioningLocations.length; ++i) + if (!$util.isString(message.autoprovisioningLocations[i])) + return "autoprovisioningLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling + */ + ClusterAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ClusterAutoscaling) + return object; + var message = new $root.google.container.v1beta1.ClusterAutoscaling(); + if (object.enableNodeAutoprovisioning != null) + message.enableNodeAutoprovisioning = Boolean(object.enableNodeAutoprovisioning); + if (object.resourceLimits) { + if (!Array.isArray(object.resourceLimits)) + throw TypeError(".google.container.v1beta1.ClusterAutoscaling.resourceLimits: array expected"); + message.resourceLimits = []; + for (var i = 0; i < object.resourceLimits.length; ++i) { + if (typeof object.resourceLimits[i] !== "object") + throw TypeError(".google.container.v1beta1.ClusterAutoscaling.resourceLimits: object expected"); + message.resourceLimits[i] = $root.google.container.v1beta1.ResourceLimit.fromObject(object.resourceLimits[i]); + } + } + switch (object.autoscalingProfile) { + default: + if (typeof object.autoscalingProfile === "number") { + message.autoscalingProfile = object.autoscalingProfile; + break; + } + break; + case "PROFILE_UNSPECIFIED": + case 0: + message.autoscalingProfile = 0; + break; + case "OPTIMIZE_UTILIZATION": + case 1: + message.autoscalingProfile = 1; + break; + case "BALANCED": + case 2: + message.autoscalingProfile = 2; + break; + } + if (object.autoprovisioningNodePoolDefaults != null) { + if (typeof object.autoprovisioningNodePoolDefaults !== "object") + throw TypeError(".google.container.v1beta1.ClusterAutoscaling.autoprovisioningNodePoolDefaults: object expected"); + message.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.fromObject(object.autoprovisioningNodePoolDefaults); + } + if (object.autoprovisioningLocations) { + if (!Array.isArray(object.autoprovisioningLocations)) + throw TypeError(".google.container.v1beta1.ClusterAutoscaling.autoprovisioningLocations: array expected"); + message.autoprovisioningLocations = []; + for (var i = 0; i < object.autoprovisioningLocations.length; ++i) + message.autoprovisioningLocations[i] = String(object.autoprovisioningLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {google.container.v1beta1.ClusterAutoscaling} message ClusterAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceLimits = []; + object.autoprovisioningLocations = []; + } + if (options.defaults) { + object.enableNodeAutoprovisioning = false; + object.autoscalingProfile = options.enums === String ? "PROFILE_UNSPECIFIED" : 0; + object.autoprovisioningNodePoolDefaults = null; + } + if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) + object.enableNodeAutoprovisioning = message.enableNodeAutoprovisioning; + if (message.resourceLimits && message.resourceLimits.length) { + object.resourceLimits = []; + for (var j = 0; j < message.resourceLimits.length; ++j) + object.resourceLimits[j] = $root.google.container.v1beta1.ResourceLimit.toObject(message.resourceLimits[j], options); + } + if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) + object.autoscalingProfile = options.enums === String ? $root.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] === undefined ? message.autoscalingProfile : $root.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] : message.autoscalingProfile; + if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) + object.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.toObject(message.autoprovisioningNodePoolDefaults, options); + if (message.autoprovisioningLocations && message.autoprovisioningLocations.length) { + object.autoprovisioningLocations = []; + for (var j = 0; j < message.autoprovisioningLocations.length; ++j) + object.autoprovisioningLocations[j] = message.autoprovisioningLocations[j]; + } + return object; + }; + + /** + * Converts this ClusterAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ClusterAutoscaling + * @instance + * @returns {Object.} JSON object + */ + ClusterAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterAutoscaling + * @function getTypeUrl + * @memberof google.container.v1beta1.ClusterAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ClusterAutoscaling"; + }; + + /** + * AutoscalingProfile enum. + * @name google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile + * @enum {number} + * @property {number} PROFILE_UNSPECIFIED=0 PROFILE_UNSPECIFIED value + * @property {number} OPTIMIZE_UTILIZATION=1 OPTIMIZE_UTILIZATION value + * @property {number} BALANCED=2 BALANCED value + */ + ClusterAutoscaling.AutoscalingProfile = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROFILE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIMIZE_UTILIZATION"] = 1; + values[valuesById[2] = "BALANCED"] = 2; + return values; + })(); + + return ClusterAutoscaling; + })(); + + v1beta1.AutoprovisioningNodePoolDefaults = (function() { + + /** + * Properties of an AutoprovisioningNodePoolDefaults. + * @memberof google.container.v1beta1 + * @interface IAutoprovisioningNodePoolDefaults + * @property {Array.|null} [oauthScopes] AutoprovisioningNodePoolDefaults oauthScopes + * @property {string|null} [serviceAccount] AutoprovisioningNodePoolDefaults serviceAccount + * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] AutoprovisioningNodePoolDefaults upgradeSettings + * @property {google.container.v1beta1.INodeManagement|null} [management] AutoprovisioningNodePoolDefaults management + * @property {string|null} [minCpuPlatform] AutoprovisioningNodePoolDefaults minCpuPlatform + * @property {number|null} [diskSizeGb] AutoprovisioningNodePoolDefaults diskSizeGb + * @property {string|null} [diskType] AutoprovisioningNodePoolDefaults diskType + * @property {google.container.v1beta1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] AutoprovisioningNodePoolDefaults shieldedInstanceConfig + * @property {string|null} [bootDiskKmsKey] AutoprovisioningNodePoolDefaults bootDiskKmsKey + * @property {string|null} [imageType] AutoprovisioningNodePoolDefaults imageType + * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled + */ + + /** + * Constructs a new AutoprovisioningNodePoolDefaults. + * @memberof google.container.v1beta1 + * @classdesc Represents an AutoprovisioningNodePoolDefaults. + * @implements IAutoprovisioningNodePoolDefaults + * @constructor + * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set + */ + function AutoprovisioningNodePoolDefaults(properties) { + this.oauthScopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoprovisioningNodePoolDefaults oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.oauthScopes = $util.emptyArray; + + /** + * AutoprovisioningNodePoolDefaults serviceAccount. + * @member {string} serviceAccount + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.serviceAccount = ""; + + /** + * AutoprovisioningNodePoolDefaults upgradeSettings. + * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.upgradeSettings = null; + + /** + * AutoprovisioningNodePoolDefaults management. + * @member {google.container.v1beta1.INodeManagement|null|undefined} management + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.management = null; + + /** + * AutoprovisioningNodePoolDefaults minCpuPlatform. + * @member {string} minCpuPlatform + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.minCpuPlatform = ""; + + /** + * AutoprovisioningNodePoolDefaults diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.diskSizeGb = 0; + + /** + * AutoprovisioningNodePoolDefaults diskType. + * @member {string} diskType + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.diskType = ""; + + /** + * AutoprovisioningNodePoolDefaults shieldedInstanceConfig. + * @member {google.container.v1beta1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.shieldedInstanceConfig = null; + + /** + * AutoprovisioningNodePoolDefaults bootDiskKmsKey. + * @member {string} bootDiskKmsKey + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.bootDiskKmsKey = ""; + + /** + * AutoprovisioningNodePoolDefaults imageType. + * @member {string} imageType + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.imageType = ""; + + /** + * AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. + * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + AutoprovisioningNodePoolDefaults.prototype.insecureKubeletReadonlyPortEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. + * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + */ + Object.defineProperty(AutoprovisioningNodePoolDefaults.prototype, "_insecureKubeletReadonlyPortEnabled", { + get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set + * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults instance + */ + AutoprovisioningNodePoolDefaults.create = function create(properties) { + return new AutoprovisioningNodePoolDefaults(properties); + }; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoprovisioningNodePoolDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) + $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.management != null && Object.hasOwnProperty.call(message, "management")) + $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.minCpuPlatform); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskSizeGb); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.diskType); + if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) + $root.google.container.v1beta1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.bootDiskKmsKey); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.imageType); + if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.insecureKubeletReadonlyPortEnabled); + return writer; + }; + + /** + * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoprovisioningNodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoprovisioningNodePoolDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 2: { + message.serviceAccount = reader.string(); + break; + } + case 3: { + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); + break; + } + case 4: { + message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); + break; + } + case 5: { + message.minCpuPlatform = reader.string(); + break; + } + case 6: { + message.diskSizeGb = reader.int32(); + break; + } + case 7: { + message.diskType = reader.string(); + break; + } + case 8: { + message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.bootDiskKmsKey = reader.string(); + break; + } + case 10: { + message.imageType = reader.string(); + break; + } + case 13: { + message.insecureKubeletReadonlyPortEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoprovisioningNodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoprovisioningNodePoolDefaults message. + * @function verify + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoprovisioningNodePoolDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { + var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); + if (error) + return "upgradeSettings." + error; + } + if (message.management != null && message.hasOwnProperty("management")) { + var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); + if (error) + return "management." + error; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { + var error = $root.google.container.v1beta1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); + if (error) + return "shieldedInstanceConfig." + error; + } + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + if (!$util.isString(message.bootDiskKmsKey)) + return "bootDiskKmsKey: string expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + properties._insecureKubeletReadonlyPortEnabled = 1; + if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") + return "insecureKubeletReadonlyPortEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates an AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults + */ + AutoprovisioningNodePoolDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults) + return object; + var message = new $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults(); + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.upgradeSettings != null) { + if (typeof object.upgradeSettings !== "object") + throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.upgradeSettings: object expected"); + message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); + } + if (object.management != null) { + if (typeof object.management !== "object") + throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.management: object expected"); + message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.shieldedInstanceConfig != null) { + if (typeof object.shieldedInstanceConfig !== "object") + throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.shieldedInstanceConfig: object expected"); + message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); + } + if (object.bootDiskKmsKey != null) + message.bootDiskKmsKey = String(object.bootDiskKmsKey); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.insecureKubeletReadonlyPortEnabled != null) + message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); + return message; + }; + + /** + * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {google.container.v1beta1.AutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoprovisioningNodePoolDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.oauthScopes = []; + if (options.defaults) { + object.serviceAccount = ""; + object.upgradeSettings = null; + object.management = null; + object.minCpuPlatform = ""; + object.diskSizeGb = 0; + object.diskType = ""; + object.shieldedInstanceConfig = null; + object.bootDiskKmsKey = ""; + object.imageType = ""; + } + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) + object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); + if (message.management != null && message.hasOwnProperty("management")) + object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) + object.minCpuPlatform = message.minCpuPlatform; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) + object.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + object.bootDiskKmsKey = message.bootDiskKmsKey; + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { + object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; + if (options.oneofs) + object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; + } + return object; + }; + + /** + * Converts this AutoprovisioningNodePoolDefaults to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @instance + * @returns {Object.} JSON object + */ + AutoprovisioningNodePoolDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoprovisioningNodePoolDefaults + * @function getTypeUrl + * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoprovisioningNodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AutoprovisioningNodePoolDefaults"; + }; + + return AutoprovisioningNodePoolDefaults; + })(); + + v1beta1.ResourceLimit = (function() { + + /** + * Properties of a ResourceLimit. + * @memberof google.container.v1beta1 + * @interface IResourceLimit + * @property {string|null} [resourceType] ResourceLimit resourceType + * @property {number|Long|null} [minimum] ResourceLimit minimum + * @property {number|Long|null} [maximum] ResourceLimit maximum + */ + + /** + * Constructs a new ResourceLimit. + * @memberof google.container.v1beta1 + * @classdesc Represents a ResourceLimit. + * @implements IResourceLimit + * @constructor + * @param {google.container.v1beta1.IResourceLimit=} [properties] Properties to set + */ + function ResourceLimit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceLimit resourceType. + * @member {string} resourceType + * @memberof google.container.v1beta1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.resourceType = ""; + + /** + * ResourceLimit minimum. + * @member {number|Long} minimum + * @memberof google.container.v1beta1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.minimum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResourceLimit maximum. + * @member {number|Long} maximum + * @memberof google.container.v1beta1.ResourceLimit + * @instance + */ + ResourceLimit.prototype.maximum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ResourceLimit instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {google.container.v1beta1.IResourceLimit=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit instance + */ + ResourceLimit.create = function create(properties) { + return new ResourceLimit(properties); + }; + + /** + * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {google.container.v1beta1.IResourceLimit} message ResourceLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLimit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.minimum); + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maximum); + return writer; + }; + + /** + * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {google.container.v1beta1.IResourceLimit} message ResourceLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLimit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLimit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceLimit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.minimum = reader.int64(); + break; + } + case 3: { + message.maximum = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLimit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceLimit message. + * @function verify + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLimit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.minimum != null && message.hasOwnProperty("minimum")) + if (!$util.isInteger(message.minimum) && !(message.minimum && $util.isInteger(message.minimum.low) && $util.isInteger(message.minimum.high))) + return "minimum: integer|Long expected"; + if (message.maximum != null && message.hasOwnProperty("maximum")) + if (!$util.isInteger(message.maximum) && !(message.maximum && $util.isInteger(message.maximum.low) && $util.isInteger(message.maximum.high))) + return "maximum: integer|Long expected"; + return null; + }; + + /** + * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit + */ + ResourceLimit.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceLimit) + return object; + var message = new $root.google.container.v1beta1.ResourceLimit(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.minimum != null) + if ($util.Long) + (message.minimum = $util.Long.fromValue(object.minimum)).unsigned = false; + else if (typeof object.minimum === "string") + message.minimum = parseInt(object.minimum, 10); + else if (typeof object.minimum === "number") + message.minimum = object.minimum; + else if (typeof object.minimum === "object") + message.minimum = new $util.LongBits(object.minimum.low >>> 0, object.minimum.high >>> 0).toNumber(); + if (object.maximum != null) + if ($util.Long) + (message.maximum = $util.Long.fromValue(object.maximum)).unsigned = false; + else if (typeof object.maximum === "string") + message.maximum = parseInt(object.maximum, 10); + else if (typeof object.maximum === "number") + message.maximum = object.maximum; + else if (typeof object.maximum === "object") + message.maximum = new $util.LongBits(object.maximum.low >>> 0, object.maximum.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {google.container.v1beta1.ResourceLimit} message ResourceLimit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLimit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minimum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minimum = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maximum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maximum = options.longs === String ? "0" : 0; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.minimum != null && message.hasOwnProperty("minimum")) + if (typeof message.minimum === "number") + object.minimum = options.longs === String ? String(message.minimum) : message.minimum; + else + object.minimum = options.longs === String ? $util.Long.prototype.toString.call(message.minimum) : options.longs === Number ? new $util.LongBits(message.minimum.low >>> 0, message.minimum.high >>> 0).toNumber() : message.minimum; + if (message.maximum != null && message.hasOwnProperty("maximum")) + if (typeof message.maximum === "number") + object.maximum = options.longs === String ? String(message.maximum) : message.maximum; + else + object.maximum = options.longs === String ? $util.Long.prototype.toString.call(message.maximum) : options.longs === Number ? new $util.LongBits(message.maximum.low >>> 0, message.maximum.high >>> 0).toNumber() : message.maximum; + return object; + }; + + /** + * Converts this ResourceLimit to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceLimit + * @instance + * @returns {Object.} JSON object + */ + ResourceLimit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceLimit + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceLimit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceLimit"; + }; + + return ResourceLimit; + })(); + + v1beta1.NodePoolAutoscaling = (function() { + + /** + * Properties of a NodePoolAutoscaling. + * @memberof google.container.v1beta1 + * @interface INodePoolAutoscaling + * @property {boolean|null} [enabled] NodePoolAutoscaling enabled + * @property {number|null} [minNodeCount] NodePoolAutoscaling minNodeCount + * @property {number|null} [maxNodeCount] NodePoolAutoscaling maxNodeCount + * @property {boolean|null} [autoprovisioned] NodePoolAutoscaling autoprovisioned + * @property {google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|null} [locationPolicy] NodePoolAutoscaling locationPolicy + * @property {number|null} [totalMinNodeCount] NodePoolAutoscaling totalMinNodeCount + * @property {number|null} [totalMaxNodeCount] NodePoolAutoscaling totalMaxNodeCount + */ + + /** + * Constructs a new NodePoolAutoscaling. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodePoolAutoscaling. + * @implements INodePoolAutoscaling + * @constructor + * @param {google.container.v1beta1.INodePoolAutoscaling=} [properties] Properties to set + */ + function NodePoolAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolAutoscaling enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.enabled = false; + + /** + * NodePoolAutoscaling minNodeCount. + * @member {number} minNodeCount + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.minNodeCount = 0; + + /** + * NodePoolAutoscaling maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.maxNodeCount = 0; + + /** + * NodePoolAutoscaling autoprovisioned. + * @member {boolean} autoprovisioned + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.autoprovisioned = false; + + /** + * NodePoolAutoscaling locationPolicy. + * @member {google.container.v1beta1.NodePoolAutoscaling.LocationPolicy} locationPolicy + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.locationPolicy = 0; + + /** + * NodePoolAutoscaling totalMinNodeCount. + * @member {number} totalMinNodeCount + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.totalMinNodeCount = 0; + + /** + * NodePoolAutoscaling totalMaxNodeCount. + * @member {number} totalMaxNodeCount + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + */ + NodePoolAutoscaling.prototype.totalMaxNodeCount = 0; + + /** + * Creates a new NodePoolAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {google.container.v1beta1.INodePoolAutoscaling=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling instance + */ + NodePoolAutoscaling.create = function create(properties) { + return new NodePoolAutoscaling(properties); + }; + + /** + * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {google.container.v1beta1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minNodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); + if (message.autoprovisioned != null && Object.hasOwnProperty.call(message, "autoprovisioned")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autoprovisioned); + if (message.locationPolicy != null && Object.hasOwnProperty.call(message, "locationPolicy")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.locationPolicy); + if (message.totalMinNodeCount != null && Object.hasOwnProperty.call(message, "totalMinNodeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalMinNodeCount); + if (message.totalMaxNodeCount != null && Object.hasOwnProperty.call(message, "totalMaxNodeCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.totalMaxNodeCount); + return writer; + }; + + /** + * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {google.container.v1beta1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.minNodeCount = reader.int32(); + break; + } + case 3: { + message.maxNodeCount = reader.int32(); + break; + } + case 4: { + message.autoprovisioned = reader.bool(); + break; + } + case 5: { + message.locationPolicy = reader.int32(); + break; + } + case 6: { + message.totalMinNodeCount = reader.int32(); + break; + } + case 7: { + message.totalMaxNodeCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolAutoscaling message. + * @function verify + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean 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.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) + if (typeof message.autoprovisioned !== "boolean") + return "autoprovisioned: boolean expected"; + if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) + switch (message.locationPolicy) { + default: + return "locationPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) + if (!$util.isInteger(message.totalMinNodeCount)) + return "totalMinNodeCount: integer expected"; + if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) + if (!$util.isInteger(message.totalMaxNodeCount)) + return "totalMaxNodeCount: integer expected"; + return null; + }; + + /** + * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling + */ + NodePoolAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePoolAutoscaling) + return object; + var message = new $root.google.container.v1beta1.NodePoolAutoscaling(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.minNodeCount != null) + message.minNodeCount = object.minNodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; + if (object.autoprovisioned != null) + message.autoprovisioned = Boolean(object.autoprovisioned); + switch (object.locationPolicy) { + default: + if (typeof object.locationPolicy === "number") { + message.locationPolicy = object.locationPolicy; + break; + } + break; + case "LOCATION_POLICY_UNSPECIFIED": + case 0: + message.locationPolicy = 0; + break; + case "BALANCED": + case 1: + message.locationPolicy = 1; + break; + case "ANY": + case 2: + message.locationPolicy = 2; + break; + } + if (object.totalMinNodeCount != null) + message.totalMinNodeCount = object.totalMinNodeCount | 0; + if (object.totalMaxNodeCount != null) + message.totalMaxNodeCount = object.totalMaxNodeCount | 0; + return message; + }; + + /** + * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {google.container.v1beta1.NodePoolAutoscaling} message NodePoolAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.minNodeCount = 0; + object.maxNodeCount = 0; + object.autoprovisioned = false; + object.locationPolicy = options.enums === String ? "LOCATION_POLICY_UNSPECIFIED" : 0; + object.totalMinNodeCount = 0; + object.totalMaxNodeCount = 0; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + object.minNodeCount = message.minNodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; + if (message.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) + object.autoprovisioned = message.autoprovisioned; + if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) + object.locationPolicy = options.enums === String ? $root.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] === undefined ? message.locationPolicy : $root.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] : message.locationPolicy; + if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) + object.totalMinNodeCount = message.totalMinNodeCount; + if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) + object.totalMaxNodeCount = message.totalMaxNodeCount; + return object; + }; + + /** + * Converts this NodePoolAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @instance + * @returns {Object.} JSON object + */ + NodePoolAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolAutoscaling + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePoolAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePoolAutoscaling"; + }; + + /** + * LocationPolicy enum. + * @name google.container.v1beta1.NodePoolAutoscaling.LocationPolicy + * @enum {number} + * @property {number} LOCATION_POLICY_UNSPECIFIED=0 LOCATION_POLICY_UNSPECIFIED value + * @property {number} BALANCED=1 BALANCED value + * @property {number} ANY=2 ANY value + */ + NodePoolAutoscaling.LocationPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "BALANCED"] = 1; + values[valuesById[2] = "ANY"] = 2; + return values; + })(); + + return NodePoolAutoscaling; + })(); + + v1beta1.SetLabelsRequest = (function() { + + /** + * Properties of a SetLabelsRequest. + * @memberof google.container.v1beta1 + * @interface ISetLabelsRequest + * @property {string|null} [projectId] SetLabelsRequest projectId + * @property {string|null} [zone] SetLabelsRequest zone + * @property {string|null} [clusterId] SetLabelsRequest clusterId + * @property {Object.|null} [resourceLabels] SetLabelsRequest resourceLabels + * @property {string|null} [labelFingerprint] SetLabelsRequest labelFingerprint + * @property {string|null} [name] SetLabelsRequest name + */ + + /** + * Constructs a new SetLabelsRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetLabelsRequest. + * @implements ISetLabelsRequest + * @constructor + * @param {google.container.v1beta1.ISetLabelsRequest=} [properties] Properties to set + */ + function SetLabelsRequest(properties) { + this.resourceLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLabelsRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.projectId = ""; + + /** + * SetLabelsRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.zone = ""; + + /** + * SetLabelsRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.clusterId = ""; + + /** + * SetLabelsRequest resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.resourceLabels = $util.emptyObject; + + /** + * SetLabelsRequest labelFingerprint. + * @member {string} labelFingerprint + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.labelFingerprint = ""; + + /** + * SetLabelsRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + */ + SetLabelsRequest.prototype.name = ""; + + /** + * Creates a new SetLabelsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {google.container.v1beta1.ISetLabelsRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest instance + */ + SetLabelsRequest.create = function create(properties) { + return new SetLabelsRequest(properties); + }; + + /** + * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {google.container.v1beta1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLabelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), 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.resourceLabels[keys[i]]).ldelim(); + if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.labelFingerprint); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {google.container.v1beta1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLabelsRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + 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.resourceLabels[key] = value; + break; + } + case 5: { + message.labelFingerprint = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLabelsRequest message. + * @function verify + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLabelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + if (!$util.isString(message.labelFingerprint)) + return "labelFingerprint: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest + */ + SetLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetLabelsRequest) + return object; + var message = new $root.google.container.v1beta1.SetLabelsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.container.v1beta1.SetLabelsRequest.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + if (object.labelFingerprint != null) + message.labelFingerprint = String(object.labelFingerprint); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {google.container.v1beta1.SetLabelsRequest} message SetLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLabelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceLabels = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.labelFingerprint = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + var keys2; + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) + object.labelFingerprint = message.labelFingerprint; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLabelsRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + SetLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLabelsRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetLabelsRequest"; + }; + + return SetLabelsRequest; + })(); + + v1beta1.SetLegacyAbacRequest = (function() { + + /** + * Properties of a SetLegacyAbacRequest. + * @memberof google.container.v1beta1 + * @interface ISetLegacyAbacRequest + * @property {string|null} [projectId] SetLegacyAbacRequest projectId + * @property {string|null} [zone] SetLegacyAbacRequest zone + * @property {string|null} [clusterId] SetLegacyAbacRequest clusterId + * @property {boolean|null} [enabled] SetLegacyAbacRequest enabled + * @property {string|null} [name] SetLegacyAbacRequest name + */ + + /** + * Constructs a new SetLegacyAbacRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetLegacyAbacRequest. + * @implements ISetLegacyAbacRequest + * @constructor + * @param {google.container.v1beta1.ISetLegacyAbacRequest=} [properties] Properties to set + */ + function SetLegacyAbacRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetLegacyAbacRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.projectId = ""; + + /** + * SetLegacyAbacRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.zone = ""; + + /** + * SetLegacyAbacRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.clusterId = ""; + + /** + * SetLegacyAbacRequest enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.enabled = false; + + /** + * SetLegacyAbacRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + */ + SetLegacyAbacRequest.prototype.name = ""; + + /** + * Creates a new SetLegacyAbacRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {google.container.v1beta1.ISetLegacyAbacRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest instance + */ + SetLegacyAbacRequest.create = function create(properties) { + return new SetLegacyAbacRequest(properties); + }; + + /** + * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {google.container.v1beta1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLegacyAbacRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {google.container.v1beta1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetLegacyAbacRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLegacyAbacRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLegacyAbacRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.enabled = reader.bool(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetLegacyAbacRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetLegacyAbacRequest message. + * @function verify + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetLegacyAbacRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest + */ + SetLegacyAbacRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetLegacyAbacRequest) + return object; + var message = new $root.google.container.v1beta1.SetLegacyAbacRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {google.container.v1beta1.SetLegacyAbacRequest} message SetLegacyAbacRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetLegacyAbacRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.enabled = false; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetLegacyAbacRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @instance + * @returns {Object.} JSON object + */ + SetLegacyAbacRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetLegacyAbacRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetLegacyAbacRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetLegacyAbacRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetLegacyAbacRequest"; + }; + + return SetLegacyAbacRequest; + })(); + + v1beta1.StartIPRotationRequest = (function() { + + /** + * Properties of a StartIPRotationRequest. + * @memberof google.container.v1beta1 + * @interface IStartIPRotationRequest + * @property {string|null} [projectId] StartIPRotationRequest projectId + * @property {string|null} [zone] StartIPRotationRequest zone + * @property {string|null} [clusterId] StartIPRotationRequest clusterId + * @property {string|null} [name] StartIPRotationRequest name + * @property {boolean|null} [rotateCredentials] StartIPRotationRequest rotateCredentials + */ + + /** + * Constructs a new StartIPRotationRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a StartIPRotationRequest. + * @implements IStartIPRotationRequest + * @constructor + * @param {google.container.v1beta1.IStartIPRotationRequest=} [properties] Properties to set + */ + function StartIPRotationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartIPRotationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.projectId = ""; + + /** + * StartIPRotationRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.zone = ""; + + /** + * StartIPRotationRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.clusterId = ""; + + /** + * StartIPRotationRequest name. + * @member {string} name + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.name = ""; + + /** + * StartIPRotationRequest rotateCredentials. + * @member {boolean} rotateCredentials + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + */ + StartIPRotationRequest.prototype.rotateCredentials = false; + + /** + * Creates a new StartIPRotationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {google.container.v1beta1.IStartIPRotationRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest instance + */ + StartIPRotationRequest.create = function create(properties) { + return new StartIPRotationRequest(properties); + }; + + /** + * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {google.container.v1beta1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartIPRotationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.rotateCredentials != null && Object.hasOwnProperty.call(message, "rotateCredentials")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.rotateCredentials); + return writer; + }; + + /** + * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {google.container.v1beta1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartIPRotationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StartIPRotationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + message.rotateCredentials = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartIPRotationRequest message. + * @function verify + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartIPRotationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) + if (typeof message.rotateCredentials !== "boolean") + return "rotateCredentials: boolean expected"; + return null; + }; + + /** + * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest + */ + StartIPRotationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.StartIPRotationRequest) + return object; + var message = new $root.google.container.v1beta1.StartIPRotationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + if (object.rotateCredentials != null) + message.rotateCredentials = Boolean(object.rotateCredentials); + return message; + }; + + /** + * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {google.container.v1beta1.StartIPRotationRequest} message StartIPRotationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartIPRotationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + object.rotateCredentials = false; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) + object.rotateCredentials = message.rotateCredentials; + return object; + }; + + /** + * Converts this StartIPRotationRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.StartIPRotationRequest + * @instance + * @returns {Object.} JSON object + */ + StartIPRotationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartIPRotationRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.StartIPRotationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.StartIPRotationRequest"; + }; + + return StartIPRotationRequest; + })(); + + v1beta1.CompleteIPRotationRequest = (function() { + + /** + * Properties of a CompleteIPRotationRequest. + * @memberof google.container.v1beta1 + * @interface ICompleteIPRotationRequest + * @property {string|null} [projectId] CompleteIPRotationRequest projectId + * @property {string|null} [zone] CompleteIPRotationRequest zone + * @property {string|null} [clusterId] CompleteIPRotationRequest clusterId + * @property {string|null} [name] CompleteIPRotationRequest name + */ + + /** + * Constructs a new CompleteIPRotationRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CompleteIPRotationRequest. + * @implements ICompleteIPRotationRequest + * @constructor + * @param {google.container.v1beta1.ICompleteIPRotationRequest=} [properties] Properties to set + */ + function CompleteIPRotationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteIPRotationRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.projectId = ""; + + /** + * CompleteIPRotationRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.zone = ""; + + /** + * CompleteIPRotationRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.clusterId = ""; + + /** + * CompleteIPRotationRequest name. + * @member {string} name + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @instance + */ + CompleteIPRotationRequest.prototype.name = ""; + + /** + * Creates a new CompleteIPRotationRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {google.container.v1beta1.ICompleteIPRotationRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest instance + */ + CompleteIPRotationRequest.create = function create(properties) { + return new CompleteIPRotationRequest(properties); + }; + + /** + * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {google.container.v1beta1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteIPRotationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {google.container.v1beta1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteIPRotationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompleteIPRotationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteIPRotationRequest message. + * @function verify + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteIPRotationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest + */ + CompleteIPRotationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CompleteIPRotationRequest) + return object; + var message = new $root.google.container.v1beta1.CompleteIPRotationRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {google.container.v1beta1.CompleteIPRotationRequest} message CompleteIPRotationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteIPRotationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CompleteIPRotationRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteIPRotationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteIPRotationRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CompleteIPRotationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CompleteIPRotationRequest"; + }; + + return CompleteIPRotationRequest; + })(); + + v1beta1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.container.v1beta1 + * @interface IAcceleratorConfig + * @property {number|Long|null} [acceleratorCount] AcceleratorConfig acceleratorCount + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {string|null} [gpuPartitionSize] AcceleratorConfig gpuPartitionSize + * @property {number|Long|null} [maxTimeSharedClientsPerGpu] AcceleratorConfig maxTimeSharedClientsPerGpu + * @property {google.container.v1beta1.IGPUSharingConfig|null} [gpuSharingConfig] AcceleratorConfig gpuSharingConfig + * @property {google.container.v1beta1.IGPUDriverInstallationConfig|null} [gpuDriverInstallationConfig] AcceleratorConfig gpuDriverInstallationConfig + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.container.v1beta1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|Long} acceleratorCount + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AcceleratorConfig acceleratorType. + * @member {string} acceleratorType + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = ""; + + /** + * AcceleratorConfig gpuPartitionSize. + * @member {string} gpuPartitionSize + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuPartitionSize = ""; + + /** + * AcceleratorConfig maxTimeSharedClientsPerGpu. + * @member {number|Long} maxTimeSharedClientsPerGpu + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.maxTimeSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AcceleratorConfig gpuSharingConfig. + * @member {google.container.v1beta1.IGPUSharingConfig|null|undefined} gpuSharingConfig + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuSharingConfig = null; + + /** + * AcceleratorConfig gpuDriverInstallationConfig. + * @member {google.container.v1beta1.IGPUDriverInstallationConfig|null|undefined} gpuDriverInstallationConfig + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.gpuDriverInstallationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _gpuSharingConfig. + * @member {"gpuSharingConfig"|undefined} _gpuSharingConfig + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_gpuSharingConfig", { + get: $util.oneOfGetter($oneOfFields = ["gpuSharingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _gpuDriverInstallationConfig. + * @member {"gpuDriverInstallationConfig"|undefined} _gpuDriverInstallationConfig + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_gpuDriverInstallationConfig", { + get: $util.oneOfGetter($oneOfFields = ["gpuDriverInstallationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {google.container.v1beta1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {google.container.v1beta1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.acceleratorCount); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.acceleratorType); + if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gpuPartitionSize); + if (message.maxTimeSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxTimeSharedClientsPerGpu")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxTimeSharedClientsPerGpu); + if (message.gpuSharingConfig != null && Object.hasOwnProperty.call(message, "gpuSharingConfig")) + $root.google.container.v1beta1.GPUSharingConfig.encode(message.gpuSharingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.gpuDriverInstallationConfig != null && Object.hasOwnProperty.call(message, "gpuDriverInstallationConfig")) + $root.google.container.v1beta1.GPUDriverInstallationConfig.encode(message.gpuDriverInstallationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {google.container.v1beta1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorCount = reader.int64(); + break; + } + case 2: { + message.acceleratorType = reader.string(); + break; + } + case 3: { + message.gpuPartitionSize = reader.string(); + break; + } + case 4: { + message.maxTimeSharedClientsPerGpu = reader.int64(); + break; + } + case 5: { + message.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) + if (!$util.isInteger(message.acceleratorCount) && !(message.acceleratorCount && $util.isInteger(message.acceleratorCount.low) && $util.isInteger(message.acceleratorCount.high))) + return "acceleratorCount: integer|Long expected"; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + if (!$util.isString(message.gpuPartitionSize)) + return "gpuPartitionSize: string expected"; + if (message.maxTimeSharedClientsPerGpu != null && message.hasOwnProperty("maxTimeSharedClientsPerGpu")) + if (!$util.isInteger(message.maxTimeSharedClientsPerGpu) && !(message.maxTimeSharedClientsPerGpu && $util.isInteger(message.maxTimeSharedClientsPerGpu.low) && $util.isInteger(message.maxTimeSharedClientsPerGpu.high))) + return "maxTimeSharedClientsPerGpu: integer|Long expected"; + if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { + properties._gpuSharingConfig = 1; + { + var error = $root.google.container.v1beta1.GPUSharingConfig.verify(message.gpuSharingConfig); + if (error) + return "gpuSharingConfig." + error; + } + } + if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { + properties._gpuDriverInstallationConfig = 1; + { + var error = $root.google.container.v1beta1.GPUDriverInstallationConfig.verify(message.gpuDriverInstallationConfig); + if (error) + return "gpuDriverInstallationConfig." + error; + } + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AcceleratorConfig) + return object; + var message = new $root.google.container.v1beta1.AcceleratorConfig(); + if (object.acceleratorCount != null) + if ($util.Long) + (message.acceleratorCount = $util.Long.fromValue(object.acceleratorCount)).unsigned = false; + else if (typeof object.acceleratorCount === "string") + message.acceleratorCount = parseInt(object.acceleratorCount, 10); + else if (typeof object.acceleratorCount === "number") + message.acceleratorCount = object.acceleratorCount; + else if (typeof object.acceleratorCount === "object") + message.acceleratorCount = new $util.LongBits(object.acceleratorCount.low >>> 0, object.acceleratorCount.high >>> 0).toNumber(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.gpuPartitionSize != null) + message.gpuPartitionSize = String(object.gpuPartitionSize); + if (object.maxTimeSharedClientsPerGpu != null) + if ($util.Long) + (message.maxTimeSharedClientsPerGpu = $util.Long.fromValue(object.maxTimeSharedClientsPerGpu)).unsigned = false; + else if (typeof object.maxTimeSharedClientsPerGpu === "string") + message.maxTimeSharedClientsPerGpu = parseInt(object.maxTimeSharedClientsPerGpu, 10); + else if (typeof object.maxTimeSharedClientsPerGpu === "number") + message.maxTimeSharedClientsPerGpu = object.maxTimeSharedClientsPerGpu; + else if (typeof object.maxTimeSharedClientsPerGpu === "object") + message.maxTimeSharedClientsPerGpu = new $util.LongBits(object.maxTimeSharedClientsPerGpu.low >>> 0, object.maxTimeSharedClientsPerGpu.high >>> 0).toNumber(); + if (object.gpuSharingConfig != null) { + if (typeof object.gpuSharingConfig !== "object") + throw TypeError(".google.container.v1beta1.AcceleratorConfig.gpuSharingConfig: object expected"); + message.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.fromObject(object.gpuSharingConfig); + } + if (object.gpuDriverInstallationConfig != null) { + if (typeof object.gpuDriverInstallationConfig !== "object") + throw TypeError(".google.container.v1beta1.AcceleratorConfig.gpuDriverInstallationConfig: object expected"); + message.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.fromObject(object.gpuDriverInstallationConfig); + } + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {google.container.v1beta1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.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.acceleratorCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.acceleratorCount = options.longs === String ? "0" : 0; + object.acceleratorType = ""; + object.gpuPartitionSize = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxTimeSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxTimeSharedClientsPerGpu = options.longs === String ? "0" : 0; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) + if (typeof message.acceleratorCount === "number") + object.acceleratorCount = options.longs === String ? String(message.acceleratorCount) : message.acceleratorCount; + else + object.acceleratorCount = options.longs === String ? $util.Long.prototype.toString.call(message.acceleratorCount) : options.longs === Number ? new $util.LongBits(message.acceleratorCount.low >>> 0, message.acceleratorCount.high >>> 0).toNumber() : message.acceleratorCount; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) + object.acceleratorType = message.acceleratorType; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + object.gpuPartitionSize = message.gpuPartitionSize; + if (message.maxTimeSharedClientsPerGpu != null && message.hasOwnProperty("maxTimeSharedClientsPerGpu")) + if (typeof message.maxTimeSharedClientsPerGpu === "number") + object.maxTimeSharedClientsPerGpu = options.longs === String ? String(message.maxTimeSharedClientsPerGpu) : message.maxTimeSharedClientsPerGpu; + else + object.maxTimeSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxTimeSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxTimeSharedClientsPerGpu.low >>> 0, message.maxTimeSharedClientsPerGpu.high >>> 0).toNumber() : message.maxTimeSharedClientsPerGpu; + if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { + object.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.toObject(message.gpuSharingConfig, options); + if (options.oneofs) + object._gpuSharingConfig = "gpuSharingConfig"; + } + if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { + object.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.toObject(message.gpuDriverInstallationConfig, options); + if (options.oneofs) + object._gpuDriverInstallationConfig = "gpuDriverInstallationConfig"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1beta1.GPUSharingConfig = (function() { + + /** + * Properties of a GPUSharingConfig. + * @memberof google.container.v1beta1 + * @interface IGPUSharingConfig + * @property {number|Long|null} [maxSharedClientsPerGpu] GPUSharingConfig maxSharedClientsPerGpu + * @property {google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null} [gpuSharingStrategy] GPUSharingConfig gpuSharingStrategy + */ + + /** + * Constructs a new GPUSharingConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GPUSharingConfig. + * @implements IGPUSharingConfig + * @constructor + * @param {google.container.v1beta1.IGPUSharingConfig=} [properties] Properties to set + */ + function GPUSharingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GPUSharingConfig maxSharedClientsPerGpu. + * @member {number|Long} maxSharedClientsPerGpu + * @memberof google.container.v1beta1.GPUSharingConfig + * @instance + */ + GPUSharingConfig.prototype.maxSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GPUSharingConfig gpuSharingStrategy. + * @member {google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null|undefined} gpuSharingStrategy + * @memberof google.container.v1beta1.GPUSharingConfig + * @instance + */ + GPUSharingConfig.prototype.gpuSharingStrategy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GPUSharingConfig _gpuSharingStrategy. + * @member {"gpuSharingStrategy"|undefined} _gpuSharingStrategy + * @memberof google.container.v1beta1.GPUSharingConfig + * @instance + */ + Object.defineProperty(GPUSharingConfig.prototype, "_gpuSharingStrategy", { + get: $util.oneOfGetter($oneOfFields = ["gpuSharingStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GPUSharingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {google.container.v1beta1.IGPUSharingConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig instance + */ + GPUSharingConfig.create = function create(properties) { + return new GPUSharingConfig(properties); + }; + + /** + * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {google.container.v1beta1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUSharingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxSharedClientsPerGpu")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxSharedClientsPerGpu); + if (message.gpuSharingStrategy != null && Object.hasOwnProperty.call(message, "gpuSharingStrategy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gpuSharingStrategy); + return writer; + }; + + /** + * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {google.container.v1beta1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUSharingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUSharingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GPUSharingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxSharedClientsPerGpu = reader.int64(); + break; + } + case 2: { + message.gpuSharingStrategy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUSharingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GPUSharingConfig message. + * @function verify + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GPUSharingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) + if (!$util.isInteger(message.maxSharedClientsPerGpu) && !(message.maxSharedClientsPerGpu && $util.isInteger(message.maxSharedClientsPerGpu.low) && $util.isInteger(message.maxSharedClientsPerGpu.high))) + return "maxSharedClientsPerGpu: integer|Long expected"; + if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { + properties._gpuSharingStrategy = 1; + switch (message.gpuSharingStrategy) { + default: + return "gpuSharingStrategy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig + */ + GPUSharingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GPUSharingConfig) + return object; + var message = new $root.google.container.v1beta1.GPUSharingConfig(); + if (object.maxSharedClientsPerGpu != null) + if ($util.Long) + (message.maxSharedClientsPerGpu = $util.Long.fromValue(object.maxSharedClientsPerGpu)).unsigned = false; + else if (typeof object.maxSharedClientsPerGpu === "string") + message.maxSharedClientsPerGpu = parseInt(object.maxSharedClientsPerGpu, 10); + else if (typeof object.maxSharedClientsPerGpu === "number") + message.maxSharedClientsPerGpu = object.maxSharedClientsPerGpu; + else if (typeof object.maxSharedClientsPerGpu === "object") + message.maxSharedClientsPerGpu = new $util.LongBits(object.maxSharedClientsPerGpu.low >>> 0, object.maxSharedClientsPerGpu.high >>> 0).toNumber(); + switch (object.gpuSharingStrategy) { + default: + if (typeof object.gpuSharingStrategy === "number") { + message.gpuSharingStrategy = object.gpuSharingStrategy; + break; + } + break; + case "GPU_SHARING_STRATEGY_UNSPECIFIED": + case 0: + message.gpuSharingStrategy = 0; + break; + case "TIME_SHARING": + case 1: + message.gpuSharingStrategy = 1; + break; + case "MPS": + case 2: + message.gpuSharingStrategy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {google.container.v1beta1.GPUSharingConfig} message GPUSharingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GPUSharingConfig.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.maxSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxSharedClientsPerGpu = options.longs === String ? "0" : 0; + if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) + if (typeof message.maxSharedClientsPerGpu === "number") + object.maxSharedClientsPerGpu = options.longs === String ? String(message.maxSharedClientsPerGpu) : message.maxSharedClientsPerGpu; + else + object.maxSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxSharedClientsPerGpu.low >>> 0, message.maxSharedClientsPerGpu.high >>> 0).toNumber() : message.maxSharedClientsPerGpu; + if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { + object.gpuSharingStrategy = options.enums === String ? $root.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] === undefined ? message.gpuSharingStrategy : $root.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] : message.gpuSharingStrategy; + if (options.oneofs) + object._gpuSharingStrategy = "gpuSharingStrategy"; + } + return object; + }; + + /** + * Converts this GPUSharingConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GPUSharingConfig + * @instance + * @returns {Object.} JSON object + */ + GPUSharingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GPUSharingConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GPUSharingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GPUSharingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GPUSharingConfig"; + }; + + /** + * GPUSharingStrategy enum. + * @name google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy + * @enum {number} + * @property {number} GPU_SHARING_STRATEGY_UNSPECIFIED=0 GPU_SHARING_STRATEGY_UNSPECIFIED value + * @property {number} TIME_SHARING=1 TIME_SHARING value + * @property {number} MPS=2 MPS value + */ + GPUSharingConfig.GPUSharingStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_SHARING_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIME_SHARING"] = 1; + values[valuesById[2] = "MPS"] = 2; + return values; + })(); + + return GPUSharingConfig; + })(); + + v1beta1.GPUDriverInstallationConfig = (function() { + + /** + * Properties of a GPUDriverInstallationConfig. + * @memberof google.container.v1beta1 + * @interface IGPUDriverInstallationConfig + * @property {google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null} [gpuDriverVersion] GPUDriverInstallationConfig gpuDriverVersion + */ + + /** + * Constructs a new GPUDriverInstallationConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GPUDriverInstallationConfig. + * @implements IGPUDriverInstallationConfig + * @constructor + * @param {google.container.v1beta1.IGPUDriverInstallationConfig=} [properties] Properties to set + */ + function GPUDriverInstallationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GPUDriverInstallationConfig gpuDriverVersion. + * @member {google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null|undefined} gpuDriverVersion + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @instance + */ + GPUDriverInstallationConfig.prototype.gpuDriverVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GPUDriverInstallationConfig _gpuDriverVersion. + * @member {"gpuDriverVersion"|undefined} _gpuDriverVersion + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @instance + */ + Object.defineProperty(GPUDriverInstallationConfig.prototype, "_gpuDriverVersion", { + get: $util.oneOfGetter($oneOfFields = ["gpuDriverVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GPUDriverInstallationConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1beta1.IGPUDriverInstallationConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig instance + */ + GPUDriverInstallationConfig.create = function create(properties) { + return new GPUDriverInstallationConfig(properties); + }; + + /** + * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1beta1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUDriverInstallationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gpuDriverVersion != null && Object.hasOwnProperty.call(message, "gpuDriverVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gpuDriverVersion); + return writer; + }; + + /** + * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1beta1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GPUDriverInstallationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUDriverInstallationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GPUDriverInstallationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gpuDriverVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GPUDriverInstallationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GPUDriverInstallationConfig message. + * @function verify + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GPUDriverInstallationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { + properties._gpuDriverVersion = 1; + switch (message.gpuDriverVersion) { + default: + return "gpuDriverVersion: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig + */ + GPUDriverInstallationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GPUDriverInstallationConfig) + return object; + var message = new $root.google.container.v1beta1.GPUDriverInstallationConfig(); + switch (object.gpuDriverVersion) { + default: + if (typeof object.gpuDriverVersion === "number") { + message.gpuDriverVersion = object.gpuDriverVersion; + break; + } + break; + case "GPU_DRIVER_VERSION_UNSPECIFIED": + case 0: + message.gpuDriverVersion = 0; + break; + case "INSTALLATION_DISABLED": + case 1: + message.gpuDriverVersion = 1; + break; + case "DEFAULT": + case 2: + message.gpuDriverVersion = 2; + break; + case "LATEST": + case 3: + message.gpuDriverVersion = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {google.container.v1beta1.GPUDriverInstallationConfig} message GPUDriverInstallationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GPUDriverInstallationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { + object.gpuDriverVersion = options.enums === String ? $root.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] === undefined ? message.gpuDriverVersion : $root.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] : message.gpuDriverVersion; + if (options.oneofs) + object._gpuDriverVersion = "gpuDriverVersion"; + } + return object; + }; + + /** + * Converts this GPUDriverInstallationConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @instance + * @returns {Object.} JSON object + */ + GPUDriverInstallationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GPUDriverInstallationConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GPUDriverInstallationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GPUDriverInstallationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GPUDriverInstallationConfig"; + }; + + /** + * GPUDriverVersion enum. + * @name google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion + * @enum {number} + * @property {number} GPU_DRIVER_VERSION_UNSPECIFIED=0 GPU_DRIVER_VERSION_UNSPECIFIED value + * @property {number} INSTALLATION_DISABLED=1 INSTALLATION_DISABLED value + * @property {number} DEFAULT=2 DEFAULT value + * @property {number} LATEST=3 LATEST value + */ + GPUDriverInstallationConfig.GPUDriverVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_DRIVER_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLATION_DISABLED"] = 1; + values[valuesById[2] = "DEFAULT"] = 2; + values[valuesById[3] = "LATEST"] = 3; + return values; + })(); + + return GPUDriverInstallationConfig; + })(); + + v1beta1.ManagedPrometheusConfig = (function() { + + /** + * Properties of a ManagedPrometheusConfig. + * @memberof google.container.v1beta1 + * @interface IManagedPrometheusConfig + * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled + */ + + /** + * Constructs a new ManagedPrometheusConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ManagedPrometheusConfig. + * @implements IManagedPrometheusConfig + * @constructor + * @param {google.container.v1beta1.IManagedPrometheusConfig=} [properties] Properties to set + */ + function ManagedPrometheusConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagedPrometheusConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @instance + */ + ManagedPrometheusConfig.prototype.enabled = false; + + /** + * Creates a new ManagedPrometheusConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {google.container.v1beta1.IManagedPrometheusConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig instance + */ + ManagedPrometheusConfig.create = function create(properties) { + return new ManagedPrometheusConfig(properties); + }; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1beta1.ManagedPrometheusConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {google.container.v1beta1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ManagedPrometheusConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {google.container.v1beta1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.container.v1beta1.ManagedPrometheusConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagedPrometheusConfig message. + * @function verify + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagedPrometheusConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig + */ + ManagedPrometheusConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ManagedPrometheusConfig) + return object; + var message = new $root.google.container.v1beta1.ManagedPrometheusConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {google.container.v1beta1.ManagedPrometheusConfig} message ManagedPrometheusConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagedPrometheusConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ManagedPrometheusConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @instance + * @returns {Object.} JSON object + */ + ManagedPrometheusConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagedPrometheusConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ManagedPrometheusConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ManagedPrometheusConfig"; + }; + + return ManagedPrometheusConfig; + })(); + + v1beta1.WorkloadMetadataConfig = (function() { + + /** + * Properties of a WorkloadMetadataConfig. + * @memberof google.container.v1beta1 + * @interface IWorkloadMetadataConfig + * @property {google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|null} [nodeMetadata] WorkloadMetadataConfig nodeMetadata + * @property {google.container.v1beta1.WorkloadMetadataConfig.Mode|null} [mode] WorkloadMetadataConfig mode + */ + + /** + * Constructs a new WorkloadMetadataConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadMetadataConfig. + * @implements IWorkloadMetadataConfig + * @constructor + * @param {google.container.v1beta1.IWorkloadMetadataConfig=} [properties] Properties to set + */ + function WorkloadMetadataConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadMetadataConfig nodeMetadata. + * @member {google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata} nodeMetadata + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @instance + */ + WorkloadMetadataConfig.prototype.nodeMetadata = 0; + + /** + * WorkloadMetadataConfig mode. + * @member {google.container.v1beta1.WorkloadMetadataConfig.Mode} mode + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @instance + */ + WorkloadMetadataConfig.prototype.mode = 0; + + /** + * Creates a new WorkloadMetadataConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {google.container.v1beta1.IWorkloadMetadataConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig instance + */ + WorkloadMetadataConfig.create = function create(properties) { + return new WorkloadMetadataConfig(properties); + }; + + /** + * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {google.container.v1beta1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadMetadataConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeMetadata != null && Object.hasOwnProperty.call(message, "nodeMetadata")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nodeMetadata); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {google.container.v1beta1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadMetadataConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadMetadataConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadMetadataConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeMetadata = reader.int32(); + break; + } + case 2: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadMetadataConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadMetadataConfig message. + * @function verify + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadMetadataConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeMetadata != null && message.hasOwnProperty("nodeMetadata")) + switch (message.nodeMetadata) { + default: + return "nodeMetadata: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig + */ + WorkloadMetadataConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadMetadataConfig) + return object; + var message = new $root.google.container.v1beta1.WorkloadMetadataConfig(); + switch (object.nodeMetadata) { + default: + if (typeof object.nodeMetadata === "number") { + message.nodeMetadata = object.nodeMetadata; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.nodeMetadata = 0; + break; + case "SECURE": + case 1: + message.nodeMetadata = 1; + break; + case "EXPOSE": + case 2: + message.nodeMetadata = 2; + break; + case "GKE_METADATA_SERVER": + case 3: + message.nodeMetadata = 3; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "GCE_METADATA": + case 1: + message.mode = 1; + break; + case "GKE_METADATA": + case 2: + message.mode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {google.container.v1beta1.WorkloadMetadataConfig} message WorkloadMetadataConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadMetadataConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.nodeMetadata = options.enums === String ? "UNSPECIFIED" : 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + } + if (message.nodeMetadata != null && message.hasOwnProperty("nodeMetadata")) + object.nodeMetadata = options.enums === String ? $root.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata[message.nodeMetadata] === undefined ? message.nodeMetadata : $root.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata[message.nodeMetadata] : message.nodeMetadata; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.container.v1beta1.WorkloadMetadataConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.WorkloadMetadataConfig.Mode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this WorkloadMetadataConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadMetadataConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadMetadataConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadMetadataConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadMetadataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadMetadataConfig"; + }; + + /** + * NodeMetadata enum. + * @name google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} SECURE=1 SECURE value + * @property {number} EXPOSE=2 EXPOSE value + * @property {number} GKE_METADATA_SERVER=3 GKE_METADATA_SERVER value + */ + WorkloadMetadataConfig.NodeMetadata = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "SECURE"] = 1; + values[valuesById[2] = "EXPOSE"] = 2; + values[valuesById[3] = "GKE_METADATA_SERVER"] = 3; + return values; + })(); + + /** + * Mode enum. + * @name google.container.v1beta1.WorkloadMetadataConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} GCE_METADATA=1 GCE_METADATA value + * @property {number} GKE_METADATA=2 GKE_METADATA value + */ + WorkloadMetadataConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCE_METADATA"] = 1; + values[valuesById[2] = "GKE_METADATA"] = 2; + return values; + })(); + + return WorkloadMetadataConfig; + })(); + + v1beta1.SetNetworkPolicyRequest = (function() { + + /** + * Properties of a SetNetworkPolicyRequest. + * @memberof google.container.v1beta1 + * @interface ISetNetworkPolicyRequest + * @property {string|null} [projectId] SetNetworkPolicyRequest projectId + * @property {string|null} [zone] SetNetworkPolicyRequest zone + * @property {string|null} [clusterId] SetNetworkPolicyRequest clusterId + * @property {google.container.v1beta1.INetworkPolicy|null} [networkPolicy] SetNetworkPolicyRequest networkPolicy + * @property {string|null} [name] SetNetworkPolicyRequest name + */ + + /** + * Constructs a new SetNetworkPolicyRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetNetworkPolicyRequest. + * @implements ISetNetworkPolicyRequest + * @constructor + * @param {google.container.v1beta1.ISetNetworkPolicyRequest=} [properties] Properties to set + */ + function SetNetworkPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNetworkPolicyRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.projectId = ""; + + /** + * SetNetworkPolicyRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.zone = ""; + + /** + * SetNetworkPolicyRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.clusterId = ""; + + /** + * SetNetworkPolicyRequest networkPolicy. + * @member {google.container.v1beta1.INetworkPolicy|null|undefined} networkPolicy + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.networkPolicy = null; + + /** + * SetNetworkPolicyRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + */ + SetNetworkPolicyRequest.prototype.name = ""; + + /** + * Creates a new SetNetworkPolicyRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1beta1.ISetNetworkPolicyRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest instance + */ + SetNetworkPolicyRequest.create = function create(properties) { + return new SetNetworkPolicyRequest(properties); + }; + + /** + * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1beta1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNetworkPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) + $root.google.container.v1beta1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1beta1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNetworkPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNetworkPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNetworkPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.decode(reader, reader.uint32()); + break; + } + case 6: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNetworkPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNetworkPolicyRequest message. + * @function verify + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNetworkPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { + var error = $root.google.container.v1beta1.NetworkPolicy.verify(message.networkPolicy); + if (error) + return "networkPolicy." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest + */ + SetNetworkPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetNetworkPolicyRequest) + return object; + var message = new $root.google.container.v1beta1.SetNetworkPolicyRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.networkPolicy != null) { + if (typeof object.networkPolicy !== "object") + throw TypeError(".google.container.v1beta1.SetNetworkPolicyRequest.networkPolicy: object expected"); + message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.fromObject(object.networkPolicy); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {google.container.v1beta1.SetNetworkPolicyRequest} message SetNetworkPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNetworkPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.networkPolicy = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) + object.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.toObject(message.networkPolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetNetworkPolicyRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetNetworkPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNetworkPolicyRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetNetworkPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNetworkPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetNetworkPolicyRequest"; + }; + + return SetNetworkPolicyRequest; + })(); + + v1beta1.SetMaintenancePolicyRequest = (function() { + + /** + * Properties of a SetMaintenancePolicyRequest. + * @memberof google.container.v1beta1 + * @interface ISetMaintenancePolicyRequest + * @property {string|null} [projectId] SetMaintenancePolicyRequest projectId + * @property {string|null} [zone] SetMaintenancePolicyRequest zone + * @property {string|null} [clusterId] SetMaintenancePolicyRequest clusterId + * @property {google.container.v1beta1.IMaintenancePolicy|null} [maintenancePolicy] SetMaintenancePolicyRequest maintenancePolicy + * @property {string|null} [name] SetMaintenancePolicyRequest name + */ + + /** + * Constructs a new SetMaintenancePolicyRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a SetMaintenancePolicyRequest. + * @implements ISetMaintenancePolicyRequest + * @constructor + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest=} [properties] Properties to set + */ + function SetMaintenancePolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetMaintenancePolicyRequest projectId. + * @member {string} projectId + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.projectId = ""; + + /** + * SetMaintenancePolicyRequest zone. + * @member {string} zone + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.zone = ""; + + /** + * SetMaintenancePolicyRequest clusterId. + * @member {string} clusterId + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.clusterId = ""; + + /** + * SetMaintenancePolicyRequest maintenancePolicy. + * @member {google.container.v1beta1.IMaintenancePolicy|null|undefined} maintenancePolicy + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.maintenancePolicy = null; + + /** + * SetMaintenancePolicyRequest name. + * @member {string} name + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + */ + SetMaintenancePolicyRequest.prototype.name = ""; + + /** + * Creates a new SetMaintenancePolicyRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest instance + */ + SetMaintenancePolicyRequest.create = function create(properties) { + return new SetMaintenancePolicyRequest(properties); + }; + + /** + * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMaintenancePolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) + $root.google.container.v1beta1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetMaintenancePolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMaintenancePolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMaintenancePolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetMaintenancePolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetMaintenancePolicyRequest message. + * @function verify + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetMaintenancePolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { + var error = $root.google.container.v1beta1.MaintenancePolicy.verify(message.maintenancePolicy); + if (error) + return "maintenancePolicy." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest + */ + SetMaintenancePolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SetMaintenancePolicyRequest) + return object; + var message = new $root.google.container.v1beta1.SetMaintenancePolicyRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.zone != null) + message.zone = String(object.zone); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.maintenancePolicy != null) { + if (typeof object.maintenancePolicy !== "object") + throw TypeError(".google.container.v1beta1.SetMaintenancePolicyRequest.maintenancePolicy: object expected"); + message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.fromObject(object.maintenancePolicy); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {google.container.v1beta1.SetMaintenancePolicyRequest} message SetMaintenancePolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetMaintenancePolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.zone = ""; + object.clusterId = ""; + object.maintenancePolicy = null; + object.name = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) + object.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.toObject(message.maintenancePolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SetMaintenancePolicyRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetMaintenancePolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetMaintenancePolicyRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.SetMaintenancePolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetMaintenancePolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SetMaintenancePolicyRequest"; + }; + + return SetMaintenancePolicyRequest; + })(); + + v1beta1.ListLocationsRequest = (function() { + + /** + * Properties of a ListLocationsRequest. + * @memberof google.container.v1beta1 + * @interface IListLocationsRequest + * @property {string|null} [parent] ListLocationsRequest parent + */ + + /** + * Constructs a new ListLocationsRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListLocationsRequest. + * @implements IListLocationsRequest + * @constructor + * @param {google.container.v1beta1.IListLocationsRequest=} [properties] Properties to set + */ + function ListLocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLocationsRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.ListLocationsRequest + * @instance + */ + ListLocationsRequest.prototype.parent = ""; + + /** + * Creates a new ListLocationsRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {google.container.v1beta1.IListLocationsRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest instance + */ + ListLocationsRequest.create = function create(properties) { + return new ListLocationsRequest(properties); + }; + + /** + * Encodes the specified ListLocationsRequest message. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {google.container.v1beta1.IListLocationsRequest} message ListLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLocationsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {google.container.v1beta1.IListLocationsRequest} message ListLocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListLocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLocationsRequest message. + * @function verify + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListLocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest + */ + ListLocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListLocationsRequest) + return object; + var message = new $root.google.container.v1beta1.ListLocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListLocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {google.container.v1beta1.ListLocationsRequest} message ListLocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListLocationsRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListLocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLocationsRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.ListLocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListLocationsRequest"; + }; + + return ListLocationsRequest; + })(); + + v1beta1.ListLocationsResponse = (function() { + + /** + * Properties of a ListLocationsResponse. + * @memberof google.container.v1beta1 + * @interface IListLocationsResponse + * @property {Array.|null} [locations] ListLocationsResponse locations + * @property {string|null} [nextPageToken] ListLocationsResponse nextPageToken + */ + + /** + * Constructs a new ListLocationsResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListLocationsResponse. + * @implements IListLocationsResponse + * @constructor + * @param {google.container.v1beta1.IListLocationsResponse=} [properties] Properties to set + */ + function ListLocationsResponse(properties) { + this.locations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLocationsResponse locations. + * @member {Array.} locations + * @memberof google.container.v1beta1.ListLocationsResponse + * @instance + */ + ListLocationsResponse.prototype.locations = $util.emptyArray; + + /** + * ListLocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.container.v1beta1.ListLocationsResponse + * @instance + */ + ListLocationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLocationsResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {google.container.v1beta1.IListLocationsResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse instance + */ + ListLocationsResponse.create = function create(properties) { + return new ListLocationsResponse(properties); + }; + + /** + * Encodes the specified ListLocationsResponse message. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {google.container.v1beta1.IListLocationsResponse} message ListLocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + $root.google.container.v1beta1.Location.encode(message.locations[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 ListLocationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {google.container.v1beta1.IListLocationsResponse} message ListLocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListLocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push($root.google.container.v1beta1.Location.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLocationsResponse message. + * @function verify + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) { + var error = $root.google.container.v1beta1.Location.verify(message.locations[i]); + if (error) + return "locations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse + */ + ListLocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListLocationsResponse) + return object; + var message = new $root.google.container.v1beta1.ListLocationsResponse(); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.container.v1beta1.ListLocationsResponse.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) { + if (typeof object.locations[i] !== "object") + throw TypeError(".google.container.v1beta1.ListLocationsResponse.locations: object expected"); + message.locations[i] = $root.google.container.v1beta1.Location.fromObject(object.locations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {google.container.v1beta1.ListLocationsResponse} message ListLocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = $root.google.container.v1beta1.Location.toObject(message.locations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLocationsResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListLocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLocationsResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.ListLocationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListLocationsResponse"; + }; + + return ListLocationsResponse; + })(); + + v1beta1.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.container.v1beta1 + * @interface ILocation + * @property {google.container.v1beta1.Location.LocationType|null} [type] Location type + * @property {string|null} [name] Location name + * @property {boolean|null} [recommended] Location recommended + */ + + /** + * Constructs a new Location. + * @memberof google.container.v1beta1 + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.container.v1beta1.ILocation=} [properties] Properties to set + */ + function Location(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location type. + * @member {google.container.v1beta1.Location.LocationType} type + * @memberof google.container.v1beta1.Location + * @instance + */ + Location.prototype.type = 0; + + /** + * Location name. + * @member {string} name + * @memberof google.container.v1beta1.Location + * @instance + */ + Location.prototype.name = ""; + + /** + * Location recommended. + * @member {boolean} recommended + * @memberof google.container.v1beta1.Location + * @instance + */ + Location.prototype.recommended = false; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Location + * @static + * @param {google.container.v1beta1.ILocation=} [properties] Properties to set + * @returns {google.container.v1beta1.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Location + * @static + * @param {google.container.v1beta1.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.recommended != null && Object.hasOwnProperty.call(message, "recommended")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recommended); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Location + * @static + * @param {google.container.v1beta1.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.recommended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.container.v1beta1.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.recommended != null && message.hasOwnProperty("recommended")) + if (typeof message.recommended !== "boolean") + return "recommended: boolean expected"; + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Location + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Location) + return object; + var message = new $root.google.container.v1beta1.Location(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "LOCATION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ZONE": + case 1: + message.type = 1; + break; + case "REGION": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.recommended != null) + message.recommended = Boolean(object.recommended); + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Location + * @static + * @param {google.container.v1beta1.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; + object.name = ""; + object.recommended = false; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.container.v1beta1.Location.LocationType[message.type] === undefined ? message.type : $root.google.container.v1beta1.Location.LocationType[message.type] : message.type; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.recommended != null && message.hasOwnProperty("recommended")) + object.recommended = message.recommended; + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.container.v1beta1.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Location"; + }; + + /** + * LocationType enum. + * @name google.container.v1beta1.Location.LocationType + * @enum {number} + * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value + * @property {number} ZONE=1 ZONE value + * @property {number} REGION=2 REGION value + */ + Location.LocationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ZONE"] = 1; + values[valuesById[2] = "REGION"] = 2; + return values; + })(); + + return Location; + })(); + + v1beta1.StatusCondition = (function() { + + /** + * Properties of a StatusCondition. + * @memberof google.container.v1beta1 + * @interface IStatusCondition + * @property {google.container.v1beta1.StatusCondition.Code|null} [code] StatusCondition code + * @property {string|null} [message] StatusCondition message + * @property {google.rpc.Code|null} [canonicalCode] StatusCondition canonicalCode + */ + + /** + * Constructs a new StatusCondition. + * @memberof google.container.v1beta1 + * @classdesc Represents a StatusCondition. + * @implements IStatusCondition + * @constructor + * @param {google.container.v1beta1.IStatusCondition=} [properties] Properties to set + */ + function StatusCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusCondition code. + * @member {google.container.v1beta1.StatusCondition.Code} code + * @memberof google.container.v1beta1.StatusCondition + * @instance + */ + StatusCondition.prototype.code = 0; + + /** + * StatusCondition message. + * @member {string} message + * @memberof google.container.v1beta1.StatusCondition + * @instance + */ + StatusCondition.prototype.message = ""; + + /** + * StatusCondition canonicalCode. + * @member {google.rpc.Code} canonicalCode + * @memberof google.container.v1beta1.StatusCondition + * @instance + */ + StatusCondition.prototype.canonicalCode = 0; + + /** + * Creates a new StatusCondition instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {google.container.v1beta1.IStatusCondition=} [properties] Properties to set + * @returns {google.container.v1beta1.StatusCondition} StatusCondition instance + */ + StatusCondition.create = function create(properties) { + return new StatusCondition(properties); + }; + + /** + * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {google.container.v1beta1.IStatusCondition} message StatusCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.canonicalCode != null && Object.hasOwnProperty.call(message, "canonicalCode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.canonicalCode); + return writer; + }; + + /** + * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {google.container.v1beta1.IStatusCondition} message StatusCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusCondition message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.StatusCondition} StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StatusCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.canonicalCode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatusCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.StatusCondition} StatusCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusCondition message. + * @function verify + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 7: + case 9: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) + switch (message.canonicalCode) { + default: + return "canonicalCode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 16: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + return null; + }; + + /** + * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.StatusCondition} StatusCondition + */ + StatusCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.StatusCondition) + return object; + var message = new $root.google.container.v1beta1.StatusCondition(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "UNKNOWN": + case 0: + message.code = 0; + break; + case "GCE_STOCKOUT": + case 1: + message.code = 1; + break; + case "GKE_SERVICE_ACCOUNT_DELETED": + case 2: + message.code = 2; + break; + case "GCE_QUOTA_EXCEEDED": + case 3: + message.code = 3; + break; + case "SET_BY_OPERATOR": + case 4: + message.code = 4; + break; + case "CLOUD_KMS_KEY_ERROR": + case 7: + message.code = 7; + break; + case "CA_EXPIRING": + case 9: + message.code = 9; + break; + } + if (object.message != null) + message.message = String(object.message); + switch (object.canonicalCode) { + default: + if (typeof object.canonicalCode === "number") { + message.canonicalCode = object.canonicalCode; + break; + } + break; + case "OK": + case 0: + message.canonicalCode = 0; + break; + case "CANCELLED": + case 1: + message.canonicalCode = 1; + break; + case "UNKNOWN": + case 2: + message.canonicalCode = 2; + break; + case "INVALID_ARGUMENT": + case 3: + message.canonicalCode = 3; + break; + case "DEADLINE_EXCEEDED": + case 4: + message.canonicalCode = 4; + break; + case "NOT_FOUND": + case 5: + message.canonicalCode = 5; + break; + case "ALREADY_EXISTS": + case 6: + message.canonicalCode = 6; + break; + case "PERMISSION_DENIED": + case 7: + message.canonicalCode = 7; + break; + case "UNAUTHENTICATED": + case 16: + message.canonicalCode = 16; + break; + case "RESOURCE_EXHAUSTED": + case 8: + message.canonicalCode = 8; + break; + case "FAILED_PRECONDITION": + case 9: + message.canonicalCode = 9; + break; + case "ABORTED": + case 10: + message.canonicalCode = 10; + break; + case "OUT_OF_RANGE": + case 11: + message.canonicalCode = 11; + break; + case "UNIMPLEMENTED": + case 12: + message.canonicalCode = 12; + break; + case "INTERNAL": + case 13: + message.canonicalCode = 13; + break; + case "UNAVAILABLE": + case 14: + message.canonicalCode = 14; + break; + case "DATA_LOSS": + case 15: + message.canonicalCode = 15; + break; + } + return message; + }; + + /** + * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {google.container.v1beta1.StatusCondition} message StatusCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = options.enums === String ? "UNKNOWN" : 0; + object.message = ""; + object.canonicalCode = options.enums === String ? "OK" : 0; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.container.v1beta1.StatusCondition.Code[message.code] === undefined ? message.code : $root.google.container.v1beta1.StatusCondition.Code[message.code] : message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) + object.canonicalCode = options.enums === String ? $root.google.rpc.Code[message.canonicalCode] === undefined ? message.canonicalCode : $root.google.rpc.Code[message.canonicalCode] : message.canonicalCode; + return object; + }; + + /** + * Converts this StatusCondition to JSON. + * @function toJSON + * @memberof google.container.v1beta1.StatusCondition + * @instance + * @returns {Object.} JSON object + */ + StatusCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatusCondition + * @function getTypeUrl + * @memberof google.container.v1beta1.StatusCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.StatusCondition"; + }; + + /** + * Code enum. + * @name google.container.v1beta1.StatusCondition.Code + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} GCE_STOCKOUT=1 GCE_STOCKOUT value + * @property {number} GKE_SERVICE_ACCOUNT_DELETED=2 GKE_SERVICE_ACCOUNT_DELETED value + * @property {number} GCE_QUOTA_EXCEEDED=3 GCE_QUOTA_EXCEEDED value + * @property {number} SET_BY_OPERATOR=4 SET_BY_OPERATOR value + * @property {number} CLOUD_KMS_KEY_ERROR=7 CLOUD_KMS_KEY_ERROR value + * @property {number} CA_EXPIRING=9 CA_EXPIRING value + */ + StatusCondition.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "GCE_STOCKOUT"] = 1; + values[valuesById[2] = "GKE_SERVICE_ACCOUNT_DELETED"] = 2; + values[valuesById[3] = "GCE_QUOTA_EXCEEDED"] = 3; + values[valuesById[4] = "SET_BY_OPERATOR"] = 4; + values[valuesById[7] = "CLOUD_KMS_KEY_ERROR"] = 7; + values[valuesById[9] = "CA_EXPIRING"] = 9; + return values; + })(); + + return StatusCondition; + })(); + + v1beta1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.container.v1beta1 + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {string|null} [subnetwork] NetworkConfig subnetwork + * @property {boolean|null} [enableIntraNodeVisibility] NetworkConfig enableIntraNodeVisibility + * @property {google.container.v1beta1.IDefaultSnatStatus|null} [defaultSnatStatus] NetworkConfig defaultSnatStatus + * @property {boolean|null} [enableL4ilbSubsetting] NetworkConfig enableL4ilbSubsetting + * @property {google.container.v1beta1.DatapathProvider|null} [datapathProvider] NetworkConfig datapathProvider + * @property {google.container.v1beta1.PrivateIPv6GoogleAccess|null} [privateIpv6GoogleAccess] NetworkConfig privateIpv6GoogleAccess + * @property {google.container.v1beta1.IDNSConfig|null} [dnsConfig] NetworkConfig dnsConfig + * @property {google.container.v1beta1.IServiceExternalIPsConfig|null} [serviceExternalIpsConfig] NetworkConfig serviceExternalIpsConfig + * @property {google.container.v1beta1.IGatewayAPIConfig|null} [gatewayApiConfig] NetworkConfig gatewayApiConfig + * @property {boolean|null} [enableMultiNetworking] NetworkConfig enableMultiNetworking + * @property {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [networkPerformanceConfig] NetworkConfig networkPerformanceConfig + * @property {boolean|null} [enableFqdnNetworkPolicy] NetworkConfig enableFqdnNetworkPolicy + * @property {google.container.v1beta1.InTransitEncryptionConfig|null} [inTransitEncryptionConfig] NetworkConfig inTransitEncryptionConfig + * @property {boolean|null} [enableCiliumClusterwideNetworkPolicy] NetworkConfig enableCiliumClusterwideNetworkPolicy + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.container.v1beta1.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig network. + * @member {string} network + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.network = ""; + + /** + * NetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.subnetwork = ""; + + /** + * NetworkConfig enableIntraNodeVisibility. + * @member {boolean} enableIntraNodeVisibility + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableIntraNodeVisibility = false; + + /** + * NetworkConfig defaultSnatStatus. + * @member {google.container.v1beta1.IDefaultSnatStatus|null|undefined} defaultSnatStatus + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.defaultSnatStatus = null; + + /** + * NetworkConfig enableL4ilbSubsetting. + * @member {boolean} enableL4ilbSubsetting + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableL4ilbSubsetting = false; + + /** + * NetworkConfig datapathProvider. + * @member {google.container.v1beta1.DatapathProvider} datapathProvider + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.datapathProvider = 0; + + /** + * NetworkConfig privateIpv6GoogleAccess. + * @member {google.container.v1beta1.PrivateIPv6GoogleAccess} privateIpv6GoogleAccess + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.privateIpv6GoogleAccess = 0; + + /** + * NetworkConfig dnsConfig. + * @member {google.container.v1beta1.IDNSConfig|null|undefined} dnsConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.dnsConfig = null; + + /** + * NetworkConfig serviceExternalIpsConfig. + * @member {google.container.v1beta1.IServiceExternalIPsConfig|null|undefined} serviceExternalIpsConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.serviceExternalIpsConfig = null; + + /** + * NetworkConfig gatewayApiConfig. + * @member {google.container.v1beta1.IGatewayAPIConfig|null|undefined} gatewayApiConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.gatewayApiConfig = null; + + /** + * NetworkConfig enableMultiNetworking. + * @member {boolean} enableMultiNetworking + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableMultiNetworking = false; + + /** + * NetworkConfig networkPerformanceConfig. + * @member {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.networkPerformanceConfig = null; + + /** + * NetworkConfig enableFqdnNetworkPolicy. + * @member {boolean|null|undefined} enableFqdnNetworkPolicy + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableFqdnNetworkPolicy = null; + + /** + * NetworkConfig inTransitEncryptionConfig. + * @member {google.container.v1beta1.InTransitEncryptionConfig|null|undefined} inTransitEncryptionConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.inTransitEncryptionConfig = null; + + /** + * NetworkConfig enableCiliumClusterwideNetworkPolicy. + * @member {boolean|null|undefined} enableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.enableCiliumClusterwideNetworkPolicy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkConfig _enableFqdnNetworkPolicy. + * @member {"enableFqdnNetworkPolicy"|undefined} _enableFqdnNetworkPolicy + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_enableFqdnNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["enableFqdnNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkConfig _inTransitEncryptionConfig. + * @member {"inTransitEncryptionConfig"|undefined} _inTransitEncryptionConfig + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_inTransitEncryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["inTransitEncryptionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkConfig _enableCiliumClusterwideNetworkPolicy. + * @member {"enableCiliumClusterwideNetworkPolicy"|undefined} _enableCiliumClusterwideNetworkPolicy + * @memberof google.container.v1beta1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_enableCiliumClusterwideNetworkPolicy", { + get: $util.oneOfGetter($oneOfFields = ["enableCiliumClusterwideNetworkPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {google.container.v1beta1.INetworkConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {google.container.v1beta1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.enableIntraNodeVisibility != null && Object.hasOwnProperty.call(message, "enableIntraNodeVisibility")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableIntraNodeVisibility); + if (message.defaultSnatStatus != null && Object.hasOwnProperty.call(message, "defaultSnatStatus")) + $root.google.container.v1beta1.DefaultSnatStatus.encode(message.defaultSnatStatus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enableL4ilbSubsetting != null && Object.hasOwnProperty.call(message, "enableL4ilbSubsetting")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableL4ilbSubsetting); + if (message.datapathProvider != null && Object.hasOwnProperty.call(message, "datapathProvider")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.datapathProvider); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.privateIpv6GoogleAccess); + if (message.dnsConfig != null && Object.hasOwnProperty.call(message, "dnsConfig")) + $root.google.container.v1beta1.DNSConfig.encode(message.dnsConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.serviceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "serviceExternalIpsConfig")) + $root.google.container.v1beta1.ServiceExternalIPsConfig.encode(message.serviceExternalIpsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.gatewayApiConfig != null && Object.hasOwnProperty.call(message, "gatewayApiConfig")) + $root.google.container.v1beta1.GatewayAPIConfig.encode(message.gatewayApiConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.enableMultiNetworking != null && Object.hasOwnProperty.call(message, "enableMultiNetworking")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableMultiNetworking); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.enableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableFqdnNetworkPolicy")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableFqdnNetworkPolicy); + if (message.inTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "inTransitEncryptionConfig")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.inTransitEncryptionConfig); + if (message.enableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableCiliumClusterwideNetworkPolicy")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.enableCiliumClusterwideNetworkPolicy); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {google.container.v1beta1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.enableIntraNodeVisibility = reader.bool(); + break; + } + case 7: { + message.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.decode(reader, reader.uint32()); + break; + } + case 10: { + message.enableL4ilbSubsetting = reader.bool(); + break; + } + case 11: { + message.datapathProvider = reader.int32(); + break; + } + case 12: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 13: { + message.dnsConfig = $root.google.container.v1beta1.DNSConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.enableMultiNetworking = reader.bool(); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.enableFqdnNetworkPolicy = reader.bool(); + break; + } + case 20: { + message.inTransitEncryptionConfig = reader.int32(); + break; + } + case 21: { + message.enableCiliumClusterwideNetworkPolicy = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) + if (typeof message.enableIntraNodeVisibility !== "boolean") + return "enableIntraNodeVisibility: boolean expected"; + if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) { + var error = $root.google.container.v1beta1.DefaultSnatStatus.verify(message.defaultSnatStatus); + if (error) + return "defaultSnatStatus." + error; + } + if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) + if (typeof message.enableL4ilbSubsetting !== "boolean") + return "enableL4ilbSubsetting: boolean expected"; + if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) + switch (message.datapathProvider) { + default: + return "datapathProvider: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) { + var error = $root.google.container.v1beta1.DNSConfig.verify(message.dnsConfig); + if (error) + return "dnsConfig." + error; + } + if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) { + var error = $root.google.container.v1beta1.ServiceExternalIPsConfig.verify(message.serviceExternalIpsConfig); + if (error) + return "serviceExternalIpsConfig." + error; + } + if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) { + var error = $root.google.container.v1beta1.GatewayAPIConfig.verify(message.gatewayApiConfig); + if (error) + return "gatewayApiConfig." + error; + } + if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) + if (typeof message.enableMultiNetworking !== "boolean") + return "enableMultiNetworking: boolean expected"; + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + var error = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { + properties._enableFqdnNetworkPolicy = 1; + if (typeof message.enableFqdnNetworkPolicy !== "boolean") + return "enableFqdnNetworkPolicy: boolean expected"; + } + if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { + properties._inTransitEncryptionConfig = 1; + switch (message.inTransitEncryptionConfig) { + default: + return "inTransitEncryptionConfig: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { + properties._enableCiliumClusterwideNetworkPolicy = 1; + if (typeof message.enableCiliumClusterwideNetworkPolicy !== "boolean") + return "enableCiliumClusterwideNetworkPolicy: boolean expected"; + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NetworkConfig) + return object; + var message = new $root.google.container.v1beta1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.enableIntraNodeVisibility != null) + message.enableIntraNodeVisibility = Boolean(object.enableIntraNodeVisibility); + if (object.defaultSnatStatus != null) { + if (typeof object.defaultSnatStatus !== "object") + throw TypeError(".google.container.v1beta1.NetworkConfig.defaultSnatStatus: object expected"); + message.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.fromObject(object.defaultSnatStatus); + } + if (object.enableL4ilbSubsetting != null) + message.enableL4ilbSubsetting = Boolean(object.enableL4ilbSubsetting); + switch (object.datapathProvider) { + default: + if (typeof object.datapathProvider === "number") { + message.datapathProvider = object.datapathProvider; + break; + } + break; + case "DATAPATH_PROVIDER_UNSPECIFIED": + case 0: + message.datapathProvider = 0; + break; + case "LEGACY_DATAPATH": + case 1: + message.datapathProvider = 1; + break; + case "ADVANCED_DATAPATH": + case 2: + message.datapathProvider = 2; + break; + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.dnsConfig != null) { + if (typeof object.dnsConfig !== "object") + throw TypeError(".google.container.v1beta1.NetworkConfig.dnsConfig: object expected"); + message.dnsConfig = $root.google.container.v1beta1.DNSConfig.fromObject(object.dnsConfig); + } + if (object.serviceExternalIpsConfig != null) { + if (typeof object.serviceExternalIpsConfig !== "object") + throw TypeError(".google.container.v1beta1.NetworkConfig.serviceExternalIpsConfig: object expected"); + message.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.fromObject(object.serviceExternalIpsConfig); + } + if (object.gatewayApiConfig != null) { + if (typeof object.gatewayApiConfig !== "object") + throw TypeError(".google.container.v1beta1.NetworkConfig.gatewayApiConfig: object expected"); + message.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.fromObject(object.gatewayApiConfig); + } + if (object.enableMultiNetworking != null) + message.enableMultiNetworking = Boolean(object.enableMultiNetworking); + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.container.v1beta1.NetworkConfig.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.enableFqdnNetworkPolicy != null) + message.enableFqdnNetworkPolicy = Boolean(object.enableFqdnNetworkPolicy); + switch (object.inTransitEncryptionConfig) { + default: + if (typeof object.inTransitEncryptionConfig === "number") { + message.inTransitEncryptionConfig = object.inTransitEncryptionConfig; + break; + } + break; + case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": + case 0: + message.inTransitEncryptionConfig = 0; + break; + case "IN_TRANSIT_ENCRYPTION_DISABLED": + case 1: + message.inTransitEncryptionConfig = 1; + break; + case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": + case 2: + message.inTransitEncryptionConfig = 2; + break; + } + if (object.enableCiliumClusterwideNetworkPolicy != null) + message.enableCiliumClusterwideNetworkPolicy = Boolean(object.enableCiliumClusterwideNetworkPolicy); + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {google.container.v1beta1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.subnetwork = ""; + object.enableIntraNodeVisibility = false; + object.defaultSnatStatus = null; + object.enableL4ilbSubsetting = false; + object.datapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; + object.privateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; + object.dnsConfig = null; + object.serviceExternalIpsConfig = null; + object.gatewayApiConfig = null; + object.enableMultiNetworking = false; + object.networkPerformanceConfig = null; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) + object.enableIntraNodeVisibility = message.enableIntraNodeVisibility; + if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) + object.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.toObject(message.defaultSnatStatus, options); + if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) + object.enableL4ilbSubsetting = message.enableL4ilbSubsetting; + if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) + object.datapathProvider = options.enums === String ? $root.google.container.v1beta1.DatapathProvider[message.datapathProvider] === undefined ? message.datapathProvider : $root.google.container.v1beta1.DatapathProvider[message.datapathProvider] : message.datapathProvider; + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) + object.dnsConfig = $root.google.container.v1beta1.DNSConfig.toObject(message.dnsConfig, options); + if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) + object.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.toObject(message.serviceExternalIpsConfig, options); + if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) + object.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.toObject(message.gatewayApiConfig, options); + if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) + object.enableMultiNetworking = message.enableMultiNetworking; + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) + object.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { + object.enableFqdnNetworkPolicy = message.enableFqdnNetworkPolicy; + if (options.oneofs) + object._enableFqdnNetworkPolicy = "enableFqdnNetworkPolicy"; + } + if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { + object.inTransitEncryptionConfig = options.enums === String ? $root.google.container.v1beta1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] === undefined ? message.inTransitEncryptionConfig : $root.google.container.v1beta1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] : message.inTransitEncryptionConfig; + if (options.oneofs) + object._inTransitEncryptionConfig = "inTransitEncryptionConfig"; + } + if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { + object.enableCiliumClusterwideNetworkPolicy = message.enableCiliumClusterwideNetworkPolicy; + if (options.oneofs) + object._enableCiliumClusterwideNetworkPolicy = "enableCiliumClusterwideNetworkPolicy"; + } + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NetworkConfig"; + }; + + NetworkConfig.ClusterNetworkPerformanceConfig = (function() { + + /** + * Properties of a ClusterNetworkPerformanceConfig. + * @memberof google.container.v1beta1.NetworkConfig + * @interface IClusterNetworkPerformanceConfig + * @property {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] ClusterNetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new ClusterNetworkPerformanceConfig. + * @memberof google.container.v1beta1.NetworkConfig + * @classdesc Represents a ClusterNetworkPerformanceConfig. + * @implements IClusterNetworkPerformanceConfig + * @constructor + * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set + */ + function ClusterNetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterNetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + */ + ClusterNetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + */ + Object.defineProperty(ClusterNetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig instance + */ + ClusterNetworkPerformanceConfig.create = function create(properties) { + return new ClusterNetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterNetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterNetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterNetworkPerformanceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterNetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterNetworkPerformanceConfig message. + * @function verify + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterNetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig + */ + ClusterNetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig) + return object; + var message = new $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "TIER_1": + case 1: + message.totalEgressBandwidthTier = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterNetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this ClusterNetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterNetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterNetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterNetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} TIER_1=1 TIER_1 value + */ + ClusterNetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TIER_1"] = 1; + return values; + })(); + + return ClusterNetworkPerformanceConfig; + })(); + + return NetworkConfig; + })(); + + v1beta1.GatewayAPIConfig = (function() { + + /** + * Properties of a GatewayAPIConfig. + * @memberof google.container.v1beta1 + * @interface IGatewayAPIConfig + * @property {google.container.v1beta1.GatewayAPIConfig.Channel|null} [channel] GatewayAPIConfig channel + */ + + /** + * Constructs a new GatewayAPIConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GatewayAPIConfig. + * @implements IGatewayAPIConfig + * @constructor + * @param {google.container.v1beta1.IGatewayAPIConfig=} [properties] Properties to set + */ + function GatewayAPIConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GatewayAPIConfig channel. + * @member {google.container.v1beta1.GatewayAPIConfig.Channel} channel + * @memberof google.container.v1beta1.GatewayAPIConfig + * @instance + */ + GatewayAPIConfig.prototype.channel = 0; + + /** + * Creates a new GatewayAPIConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {google.container.v1beta1.IGatewayAPIConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig instance + */ + GatewayAPIConfig.create = function create(properties) { + return new GatewayAPIConfig(properties); + }; + + /** + * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {google.container.v1beta1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayAPIConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + return writer; + }; + + /** + * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {google.container.v1beta1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatewayAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayAPIConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GatewayAPIConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatewayAPIConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GatewayAPIConfig message. + * @function verify + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GatewayAPIConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig + */ + GatewayAPIConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GatewayAPIConfig) + return object; + var message = new $root.google.container.v1beta1.GatewayAPIConfig(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "CHANNEL_UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "CHANNEL_DISABLED": + case 1: + message.channel = 1; + break; + case "CHANNEL_EXPERIMENTAL": + case 3: + message.channel = 3; + break; + case "CHANNEL_STANDARD": + case 4: + message.channel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {google.container.v1beta1.GatewayAPIConfig} message GatewayAPIConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GatewayAPIConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = options.enums === String ? "CHANNEL_UNSPECIFIED" : 0; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1beta1.GatewayAPIConfig.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.GatewayAPIConfig.Channel[message.channel] : message.channel; + return object; + }; + + /** + * Converts this GatewayAPIConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GatewayAPIConfig + * @instance + * @returns {Object.} JSON object + */ + GatewayAPIConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GatewayAPIConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GatewayAPIConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GatewayAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GatewayAPIConfig"; + }; + + /** + * Channel enum. + * @name google.container.v1beta1.GatewayAPIConfig.Channel + * @enum {number} + * @property {number} CHANNEL_UNSPECIFIED=0 CHANNEL_UNSPECIFIED value + * @property {number} CHANNEL_DISABLED=1 CHANNEL_DISABLED value + * @property {number} CHANNEL_EXPERIMENTAL=3 CHANNEL_EXPERIMENTAL value + * @property {number} CHANNEL_STANDARD=4 CHANNEL_STANDARD value + */ + GatewayAPIConfig.Channel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANNEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CHANNEL_DISABLED"] = 1; + values[valuesById[3] = "CHANNEL_EXPERIMENTAL"] = 3; + values[valuesById[4] = "CHANNEL_STANDARD"] = 4; + return values; + })(); + + return GatewayAPIConfig; + })(); + + v1beta1.ServiceExternalIPsConfig = (function() { + + /** + * Properties of a ServiceExternalIPsConfig. + * @memberof google.container.v1beta1 + * @interface IServiceExternalIPsConfig + * @property {boolean|null} [enabled] ServiceExternalIPsConfig enabled + */ + + /** + * Constructs a new ServiceExternalIPsConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ServiceExternalIPsConfig. + * @implements IServiceExternalIPsConfig + * @constructor + * @param {google.container.v1beta1.IServiceExternalIPsConfig=} [properties] Properties to set + */ + function ServiceExternalIPsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceExternalIPsConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @instance + */ + ServiceExternalIPsConfig.prototype.enabled = false; + + /** + * Creates a new ServiceExternalIPsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1beta1.IServiceExternalIPsConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig instance + */ + ServiceExternalIPsConfig.create = function create(properties) { + return new ServiceExternalIPsConfig(properties); + }; + + /** + * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1beta1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceExternalIPsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1beta1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceExternalIPsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceExternalIPsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServiceExternalIPsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceExternalIPsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceExternalIPsConfig message. + * @function verify + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceExternalIPsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig + */ + ServiceExternalIPsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ServiceExternalIPsConfig) + return object; + var message = new $root.google.container.v1beta1.ServiceExternalIPsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {google.container.v1beta1.ServiceExternalIPsConfig} message ServiceExternalIPsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceExternalIPsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ServiceExternalIPsConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceExternalIPsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceExternalIPsConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ServiceExternalIPsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceExternalIPsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ServiceExternalIPsConfig"; + }; + + return ServiceExternalIPsConfig; + })(); + + v1beta1.ListUsableSubnetworksRequest = (function() { + + /** + * Properties of a ListUsableSubnetworksRequest. + * @memberof google.container.v1beta1 + * @interface IListUsableSubnetworksRequest + * @property {string|null} [parent] ListUsableSubnetworksRequest parent + * @property {string|null} [filter] ListUsableSubnetworksRequest filter + * @property {number|null} [pageSize] ListUsableSubnetworksRequest pageSize + * @property {string|null} [pageToken] ListUsableSubnetworksRequest pageToken + */ + + /** + * Constructs a new ListUsableSubnetworksRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListUsableSubnetworksRequest. + * @implements IListUsableSubnetworksRequest + * @constructor + * @param {google.container.v1beta1.IListUsableSubnetworksRequest=} [properties] Properties to set + */ + function ListUsableSubnetworksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUsableSubnetworksRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.parent = ""; + + /** + * ListUsableSubnetworksRequest filter. + * @member {string} filter + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.filter = ""; + + /** + * ListUsableSubnetworksRequest pageSize. + * @member {number} pageSize + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.pageSize = 0; + + /** + * ListUsableSubnetworksRequest pageToken. + * @member {string} pageToken + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @instance + */ + ListUsableSubnetworksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUsableSubnetworksRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest instance + */ + ListUsableSubnetworksRequest.create = function create(properties) { + return new ListUsableSubnetworksRequest(properties); + }; + + /** + * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListUsableSubnetworksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUsableSubnetworksRequest message. + * @function verify + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUsableSubnetworksRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest + */ + ListUsableSubnetworksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListUsableSubnetworksRequest) + return object; + var message = new $root.google.container.v1beta1.ListUsableSubnetworksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {google.container.v1beta1.ListUsableSubnetworksRequest} message ListUsableSubnetworksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUsableSubnetworksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUsableSubnetworksRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @instance + * @returns {Object.} JSON object + */ + ListUsableSubnetworksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUsableSubnetworksRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.ListUsableSubnetworksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUsableSubnetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListUsableSubnetworksRequest"; + }; + + return ListUsableSubnetworksRequest; + })(); + + v1beta1.ListUsableSubnetworksResponse = (function() { + + /** + * Properties of a ListUsableSubnetworksResponse. + * @memberof google.container.v1beta1 + * @interface IListUsableSubnetworksResponse + * @property {Array.|null} [subnetworks] ListUsableSubnetworksResponse subnetworks + * @property {string|null} [nextPageToken] ListUsableSubnetworksResponse nextPageToken + */ + + /** + * Constructs a new ListUsableSubnetworksResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a ListUsableSubnetworksResponse. + * @implements IListUsableSubnetworksResponse + * @constructor + * @param {google.container.v1beta1.IListUsableSubnetworksResponse=} [properties] Properties to set + */ + function ListUsableSubnetworksResponse(properties) { + this.subnetworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUsableSubnetworksResponse subnetworks. + * @member {Array.} subnetworks + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @instance + */ + ListUsableSubnetworksResponse.prototype.subnetworks = $util.emptyArray; + + /** + * ListUsableSubnetworksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @instance + */ + ListUsableSubnetworksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUsableSubnetworksResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse instance + */ + ListUsableSubnetworksResponse.create = function create(properties) { + return new ListUsableSubnetworksResponse(properties); + }; + + /** + * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetworks != null && message.subnetworks.length) + for (var i = 0; i < message.subnetworks.length; ++i) + $root.google.container.v1beta1.UsableSubnetwork.encode(message.subnetworks[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 ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1beta1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUsableSubnetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListUsableSubnetworksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.subnetworks && message.subnetworks.length)) + message.subnetworks = []; + message.subnetworks.push($root.google.container.v1beta1.UsableSubnetwork.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUsableSubnetworksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUsableSubnetworksResponse message. + * @function verify + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUsableSubnetworksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetworks != null && message.hasOwnProperty("subnetworks")) { + if (!Array.isArray(message.subnetworks)) + return "subnetworks: array expected"; + for (var i = 0; i < message.subnetworks.length; ++i) { + var error = $root.google.container.v1beta1.UsableSubnetwork.verify(message.subnetworks[i]); + if (error) + return "subnetworks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse + */ + ListUsableSubnetworksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ListUsableSubnetworksResponse) + return object; + var message = new $root.google.container.v1beta1.ListUsableSubnetworksResponse(); + if (object.subnetworks) { + if (!Array.isArray(object.subnetworks)) + throw TypeError(".google.container.v1beta1.ListUsableSubnetworksResponse.subnetworks: array expected"); + message.subnetworks = []; + for (var i = 0; i < object.subnetworks.length; ++i) { + if (typeof object.subnetworks[i] !== "object") + throw TypeError(".google.container.v1beta1.ListUsableSubnetworksResponse.subnetworks: object expected"); + message.subnetworks[i] = $root.google.container.v1beta1.UsableSubnetwork.fromObject(object.subnetworks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {google.container.v1beta1.ListUsableSubnetworksResponse} message ListUsableSubnetworksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUsableSubnetworksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subnetworks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.subnetworks && message.subnetworks.length) { + object.subnetworks = []; + for (var j = 0; j < message.subnetworks.length; ++j) + object.subnetworks[j] = $root.google.container.v1beta1.UsableSubnetwork.toObject(message.subnetworks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUsableSubnetworksResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @instance + * @returns {Object.} JSON object + */ + ListUsableSubnetworksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUsableSubnetworksResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.ListUsableSubnetworksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUsableSubnetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ListUsableSubnetworksResponse"; + }; + + return ListUsableSubnetworksResponse; + })(); + + v1beta1.UsableSubnetworkSecondaryRange = (function() { + + /** + * Properties of a UsableSubnetworkSecondaryRange. + * @memberof google.container.v1beta1 + * @interface IUsableSubnetworkSecondaryRange + * @property {string|null} [rangeName] UsableSubnetworkSecondaryRange rangeName + * @property {string|null} [ipCidrRange] UsableSubnetworkSecondaryRange ipCidrRange + * @property {google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|null} [status] UsableSubnetworkSecondaryRange status + */ + + /** + * Constructs a new UsableSubnetworkSecondaryRange. + * @memberof google.container.v1beta1 + * @classdesc Represents a UsableSubnetworkSecondaryRange. + * @implements IUsableSubnetworkSecondaryRange + * @constructor + * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set + */ + function UsableSubnetworkSecondaryRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsableSubnetworkSecondaryRange rangeName. + * @member {string} rangeName + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.rangeName = ""; + + /** + * UsableSubnetworkSecondaryRange ipCidrRange. + * @member {string} ipCidrRange + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.ipCidrRange = ""; + + /** + * UsableSubnetworkSecondaryRange status. + * @member {google.container.v1beta1.UsableSubnetworkSecondaryRange.Status} status + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @instance + */ + UsableSubnetworkSecondaryRange.prototype.status = 0; + + /** + * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set + * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange instance + */ + UsableSubnetworkSecondaryRange.create = function create(properties) { + return new UsableSubnetworkSecondaryRange(properties); + }; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetworkSecondaryRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipCidrRange); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + return writer; + }; + + /** + * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetworkSecondaryRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetworkSecondaryRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UsableSubnetworkSecondaryRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeName = reader.string(); + break; + } + case 2: { + message.ipCidrRange = reader.string(); + break; + } + case 3: { + message.status = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetworkSecondaryRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsableSubnetworkSecondaryRange message. + * @function verify + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsableSubnetworkSecondaryRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + if (!$util.isString(message.rangeName)) + return "rangeName: string expected"; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange + */ + UsableSubnetworkSecondaryRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UsableSubnetworkSecondaryRange) + return object; + var message = new $root.google.container.v1beta1.UsableSubnetworkSecondaryRange(); + if (object.rangeName != null) + message.rangeName = String(object.rangeName); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "UNUSED": + case 1: + message.status = 1; + break; + case "IN_USE_SERVICE": + case 2: + message.status = 2; + break; + case "IN_USE_SHAREABLE_POD": + case 3: + message.status = 3; + break; + case "IN_USE_MANAGED_POD": + case 4: + message.status = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {google.container.v1beta1.UsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsableSubnetworkSecondaryRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rangeName = ""; + object.ipCidrRange = ""; + object.status = options.enums === String ? "UNKNOWN" : 0; + } + if (message.rangeName != null && message.hasOwnProperty("rangeName")) + object.rangeName = message.rangeName; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + object.ipCidrRange = message.ipCidrRange; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status[message.status] : message.status; + return object; + }; + + /** + * Converts this UsableSubnetworkSecondaryRange to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @instance + * @returns {Object.} JSON object + */ + UsableSubnetworkSecondaryRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsableSubnetworkSecondaryRange + * @function getTypeUrl + * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsableSubnetworkSecondaryRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UsableSubnetworkSecondaryRange"; + }; + + /** + * Status enum. + * @name google.container.v1beta1.UsableSubnetworkSecondaryRange.Status + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} UNUSED=1 UNUSED value + * @property {number} IN_USE_SERVICE=2 IN_USE_SERVICE value + * @property {number} IN_USE_SHAREABLE_POD=3 IN_USE_SHAREABLE_POD value + * @property {number} IN_USE_MANAGED_POD=4 IN_USE_MANAGED_POD value + */ + UsableSubnetworkSecondaryRange.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "UNUSED"] = 1; + values[valuesById[2] = "IN_USE_SERVICE"] = 2; + values[valuesById[3] = "IN_USE_SHAREABLE_POD"] = 3; + values[valuesById[4] = "IN_USE_MANAGED_POD"] = 4; + return values; + })(); + + return UsableSubnetworkSecondaryRange; + })(); + + v1beta1.UsableSubnetwork = (function() { + + /** + * Properties of a UsableSubnetwork. + * @memberof google.container.v1beta1 + * @interface IUsableSubnetwork + * @property {string|null} [subnetwork] UsableSubnetwork subnetwork + * @property {string|null} [network] UsableSubnetwork network + * @property {string|null} [ipCidrRange] UsableSubnetwork ipCidrRange + * @property {Array.|null} [secondaryIpRanges] UsableSubnetwork secondaryIpRanges + * @property {string|null} [statusMessage] UsableSubnetwork statusMessage + */ + + /** + * Constructs a new UsableSubnetwork. + * @memberof google.container.v1beta1 + * @classdesc Represents a UsableSubnetwork. + * @implements IUsableSubnetwork + * @constructor + * @param {google.container.v1beta1.IUsableSubnetwork=} [properties] Properties to set + */ + function UsableSubnetwork(properties) { + this.secondaryIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsableSubnetwork subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.subnetwork = ""; + + /** + * UsableSubnetwork network. + * @member {string} network + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.network = ""; + + /** + * UsableSubnetwork ipCidrRange. + * @member {string} ipCidrRange + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.ipCidrRange = ""; + + /** + * UsableSubnetwork secondaryIpRanges. + * @member {Array.} secondaryIpRanges + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.secondaryIpRanges = $util.emptyArray; + + /** + * UsableSubnetwork statusMessage. + * @member {string} statusMessage + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + */ + UsableSubnetwork.prototype.statusMessage = ""; + + /** + * Creates a new UsableSubnetwork instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {google.container.v1beta1.IUsableSubnetwork=} [properties] Properties to set + * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork instance + */ + UsableSubnetwork.create = function create(properties) { + return new UsableSubnetwork(properties); + }; + + /** + * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {google.container.v1beta1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipCidrRange); + if (message.secondaryIpRanges != null && message.secondaryIpRanges.length) + for (var i = 0; i < message.secondaryIpRanges.length; ++i) + $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.encode(message.secondaryIpRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + return writer; + }; + + /** + * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {google.container.v1beta1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsableSubnetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UsableSubnetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 2: { + message.network = reader.string(); + break; + } + case 3: { + message.ipCidrRange = reader.string(); + break; + } + case 4: { + if (!(message.secondaryIpRanges && message.secondaryIpRanges.length)) + message.secondaryIpRanges = []; + message.secondaryIpRanges.push($root.google.container.v1beta1.UsableSubnetworkSecondaryRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsableSubnetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsableSubnetwork message. + * @function verify + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsableSubnetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + if (message.secondaryIpRanges != null && message.hasOwnProperty("secondaryIpRanges")) { + if (!Array.isArray(message.secondaryIpRanges)) + return "secondaryIpRanges: array expected"; + for (var i = 0; i < message.secondaryIpRanges.length; ++i) { + var error = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.verify(message.secondaryIpRanges[i]); + if (error) + return "secondaryIpRanges." + error; + } + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + return null; + }; + + /** + * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork + */ + UsableSubnetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UsableSubnetwork) + return object; + var message = new $root.google.container.v1beta1.UsableSubnetwork(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.network != null) + message.network = String(object.network); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.secondaryIpRanges) { + if (!Array.isArray(object.secondaryIpRanges)) + throw TypeError(".google.container.v1beta1.UsableSubnetwork.secondaryIpRanges: array expected"); + message.secondaryIpRanges = []; + for (var i = 0; i < object.secondaryIpRanges.length; ++i) { + if (typeof object.secondaryIpRanges[i] !== "object") + throw TypeError(".google.container.v1beta1.UsableSubnetwork.secondaryIpRanges: object expected"); + message.secondaryIpRanges[i] = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.fromObject(object.secondaryIpRanges[i]); + } + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + return message; + }; + + /** + * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {google.container.v1beta1.UsableSubnetwork} message UsableSubnetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsableSubnetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.secondaryIpRanges = []; + if (options.defaults) { + object.subnetwork = ""; + object.network = ""; + object.ipCidrRange = ""; + object.statusMessage = ""; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) + object.ipCidrRange = message.ipCidrRange; + if (message.secondaryIpRanges && message.secondaryIpRanges.length) { + object.secondaryIpRanges = []; + for (var j = 0; j < message.secondaryIpRanges.length; ++j) + object.secondaryIpRanges[j] = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.toObject(message.secondaryIpRanges[j], options); + } + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + return object; + }; + + /** + * Converts this UsableSubnetwork to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UsableSubnetwork + * @instance + * @returns {Object.} JSON object + */ + UsableSubnetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsableSubnetwork + * @function getTypeUrl + * @memberof google.container.v1beta1.UsableSubnetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsableSubnetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UsableSubnetwork"; + }; + + return UsableSubnetwork; + })(); + + v1beta1.VerticalPodAutoscaling = (function() { + + /** + * Properties of a VerticalPodAutoscaling. + * @memberof google.container.v1beta1 + * @interface IVerticalPodAutoscaling + * @property {boolean|null} [enabled] VerticalPodAutoscaling enabled + */ + + /** + * Constructs a new VerticalPodAutoscaling. + * @memberof google.container.v1beta1 + * @classdesc Represents a VerticalPodAutoscaling. + * @implements IVerticalPodAutoscaling + * @constructor + * @param {google.container.v1beta1.IVerticalPodAutoscaling=} [properties] Properties to set + */ + function VerticalPodAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerticalPodAutoscaling enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @instance + */ + VerticalPodAutoscaling.prototype.enabled = false; + + /** + * Creates a new VerticalPodAutoscaling instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {google.container.v1beta1.IVerticalPodAutoscaling=} [properties] Properties to set + * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling instance + */ + VerticalPodAutoscaling.create = function create(properties) { + return new VerticalPodAutoscaling(properties); + }; + + /** + * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {google.container.v1beta1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerticalPodAutoscaling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {google.container.v1beta1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerticalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerticalPodAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.VerticalPodAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerticalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerticalPodAutoscaling message. + * @function verify + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerticalPodAutoscaling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling + */ + VerticalPodAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.VerticalPodAutoscaling) + return object; + var message = new $root.google.container.v1beta1.VerticalPodAutoscaling(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {google.container.v1beta1.VerticalPodAutoscaling} message VerticalPodAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerticalPodAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this VerticalPodAutoscaling to JSON. + * @function toJSON + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @instance + * @returns {Object.} JSON object + */ + VerticalPodAutoscaling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerticalPodAutoscaling + * @function getTypeUrl + * @memberof google.container.v1beta1.VerticalPodAutoscaling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerticalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.VerticalPodAutoscaling"; + }; + + return VerticalPodAutoscaling; + })(); + + v1beta1.DefaultSnatStatus = (function() { + + /** + * Properties of a DefaultSnatStatus. + * @memberof google.container.v1beta1 + * @interface IDefaultSnatStatus + * @property {boolean|null} [disabled] DefaultSnatStatus disabled + */ + + /** + * Constructs a new DefaultSnatStatus. + * @memberof google.container.v1beta1 + * @classdesc Represents a DefaultSnatStatus. + * @implements IDefaultSnatStatus + * @constructor + * @param {google.container.v1beta1.IDefaultSnatStatus=} [properties] Properties to set + */ + function DefaultSnatStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultSnatStatus disabled. + * @member {boolean} disabled + * @memberof google.container.v1beta1.DefaultSnatStatus + * @instance + */ + DefaultSnatStatus.prototype.disabled = false; + + /** + * Creates a new DefaultSnatStatus instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {google.container.v1beta1.IDefaultSnatStatus=} [properties] Properties to set + * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus instance + */ + DefaultSnatStatus.create = function create(properties) { + return new DefaultSnatStatus(properties); + }; + + /** + * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {google.container.v1beta1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultSnatStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); + return writer; + }; + + /** + * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {google.container.v1beta1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultSnatStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultSnatStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DefaultSnatStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultSnatStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultSnatStatus message. + * @function verify + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultSnatStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus + */ + DefaultSnatStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DefaultSnatStatus) + return object; + var message = new $root.google.container.v1beta1.DefaultSnatStatus(); + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {google.container.v1beta1.DefaultSnatStatus} message DefaultSnatStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultSnatStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.disabled = false; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + return object; + }; + + /** + * Converts this DefaultSnatStatus to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DefaultSnatStatus + * @instance + * @returns {Object.} JSON object + */ + DefaultSnatStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DefaultSnatStatus + * @function getTypeUrl + * @memberof google.container.v1beta1.DefaultSnatStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DefaultSnatStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DefaultSnatStatus"; + }; + + return DefaultSnatStatus; + })(); + + v1beta1.IntraNodeVisibilityConfig = (function() { + + /** + * Properties of an IntraNodeVisibilityConfig. + * @memberof google.container.v1beta1 + * @interface IIntraNodeVisibilityConfig + * @property {boolean|null} [enabled] IntraNodeVisibilityConfig enabled + */ + + /** + * Constructs a new IntraNodeVisibilityConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an IntraNodeVisibilityConfig. + * @implements IIntraNodeVisibilityConfig + * @constructor + * @param {google.container.v1beta1.IIntraNodeVisibilityConfig=} [properties] Properties to set + */ + function IntraNodeVisibilityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntraNodeVisibilityConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @instance + */ + IntraNodeVisibilityConfig.prototype.enabled = false; + + /** + * Creates a new IntraNodeVisibilityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1beta1.IIntraNodeVisibilityConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig instance + */ + IntraNodeVisibilityConfig.create = function create(properties) { + return new IntraNodeVisibilityConfig(properties); + }; + + /** + * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1beta1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntraNodeVisibilityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1beta1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntraNodeVisibilityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntraNodeVisibilityConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IntraNodeVisibilityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntraNodeVisibilityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntraNodeVisibilityConfig message. + * @function verify + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntraNodeVisibilityConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates an IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig + */ + IntraNodeVisibilityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.IntraNodeVisibilityConfig) + return object; + var message = new $root.google.container.v1beta1.IntraNodeVisibilityConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {google.container.v1beta1.IntraNodeVisibilityConfig} message IntraNodeVisibilityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntraNodeVisibilityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this IntraNodeVisibilityConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @instance + * @returns {Object.} JSON object + */ + IntraNodeVisibilityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntraNodeVisibilityConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.IntraNodeVisibilityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntraNodeVisibilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.IntraNodeVisibilityConfig"; + }; + + return IntraNodeVisibilityConfig; + })(); + + v1beta1.ILBSubsettingConfig = (function() { + + /** + * Properties of a ILBSubsettingConfig. + * @memberof google.container.v1beta1 + * @interface IILBSubsettingConfig + * @property {boolean|null} [enabled] ILBSubsettingConfig enabled + */ + + /** + * Constructs a new ILBSubsettingConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ILBSubsettingConfig. + * @implements IILBSubsettingConfig + * @constructor + * @param {google.container.v1beta1.IILBSubsettingConfig=} [properties] Properties to set + */ + function ILBSubsettingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ILBSubsettingConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @instance + */ + ILBSubsettingConfig.prototype.enabled = false; + + /** + * Creates a new ILBSubsettingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {google.container.v1beta1.IILBSubsettingConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig instance + */ + ILBSubsettingConfig.create = function create(properties) { + return new ILBSubsettingConfig(properties); + }; + + /** + * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {google.container.v1beta1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ILBSubsettingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {google.container.v1beta1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ILBSubsettingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ILBSubsettingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ILBSubsettingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ILBSubsettingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ILBSubsettingConfig message. + * @function verify + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ILBSubsettingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig + */ + ILBSubsettingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ILBSubsettingConfig) + return object; + var message = new $root.google.container.v1beta1.ILBSubsettingConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {google.container.v1beta1.ILBSubsettingConfig} message ILBSubsettingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ILBSubsettingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ILBSubsettingConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @instance + * @returns {Object.} JSON object + */ + ILBSubsettingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ILBSubsettingConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ILBSubsettingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ILBSubsettingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ILBSubsettingConfig"; + }; + + return ILBSubsettingConfig; + })(); + + v1beta1.DNSConfig = (function() { + + /** + * Properties of a DNSConfig. + * @memberof google.container.v1beta1 + * @interface IDNSConfig + * @property {google.container.v1beta1.DNSConfig.Provider|null} [clusterDns] DNSConfig clusterDns + * @property {google.container.v1beta1.DNSConfig.DNSScope|null} [clusterDnsScope] DNSConfig clusterDnsScope + * @property {string|null} [clusterDnsDomain] DNSConfig clusterDnsDomain + * @property {string|null} [additiveVpcScopeDnsDomain] DNSConfig additiveVpcScopeDnsDomain + */ + + /** + * Constructs a new DNSConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a DNSConfig. + * @implements IDNSConfig + * @constructor + * @param {google.container.v1beta1.IDNSConfig=} [properties] Properties to set + */ + function DNSConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DNSConfig clusterDns. + * @member {google.container.v1beta1.DNSConfig.Provider} clusterDns + * @memberof google.container.v1beta1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDns = 0; + + /** + * DNSConfig clusterDnsScope. + * @member {google.container.v1beta1.DNSConfig.DNSScope} clusterDnsScope + * @memberof google.container.v1beta1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDnsScope = 0; + + /** + * DNSConfig clusterDnsDomain. + * @member {string} clusterDnsDomain + * @memberof google.container.v1beta1.DNSConfig + * @instance + */ + DNSConfig.prototype.clusterDnsDomain = ""; + + /** + * DNSConfig additiveVpcScopeDnsDomain. + * @member {string} additiveVpcScopeDnsDomain + * @memberof google.container.v1beta1.DNSConfig + * @instance + */ + DNSConfig.prototype.additiveVpcScopeDnsDomain = ""; + + /** + * Creates a new DNSConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {google.container.v1beta1.IDNSConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.DNSConfig} DNSConfig instance + */ + DNSConfig.create = function create(properties) { + return new DNSConfig(properties); + }; + + /** + * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {google.container.v1beta1.IDNSConfig} message DNSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterDns != null && Object.hasOwnProperty.call(message, "clusterDns")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterDns); + if (message.clusterDnsScope != null && Object.hasOwnProperty.call(message, "clusterDnsScope")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.clusterDnsScope); + if (message.clusterDnsDomain != null && Object.hasOwnProperty.call(message, "clusterDnsDomain")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterDnsDomain); + if (message.additiveVpcScopeDnsDomain != null && Object.hasOwnProperty.call(message, "additiveVpcScopeDnsDomain")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.additiveVpcScopeDnsDomain); + return writer; + }; + + /** + * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {google.container.v1beta1.IDNSConfig} message DNSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DNSConfig} DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DNSConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clusterDns = reader.int32(); + break; + } + case 2: { + message.clusterDnsScope = reader.int32(); + break; + } + case 3: { + message.clusterDnsDomain = reader.string(); + break; + } + case 5: { + message.additiveVpcScopeDnsDomain = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DNSConfig} DNSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSConfig message. + * @function verify + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) + switch (message.clusterDns) { + default: + return "clusterDns: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) + switch (message.clusterDnsScope) { + default: + return "clusterDnsScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) + if (!$util.isString(message.clusterDnsDomain)) + return "clusterDnsDomain: string expected"; + if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) + if (!$util.isString(message.additiveVpcScopeDnsDomain)) + return "additiveVpcScopeDnsDomain: string expected"; + return null; + }; + + /** + * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DNSConfig} DNSConfig + */ + DNSConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DNSConfig) + return object; + var message = new $root.google.container.v1beta1.DNSConfig(); + switch (object.clusterDns) { + default: + if (typeof object.clusterDns === "number") { + message.clusterDns = object.clusterDns; + break; + } + break; + case "PROVIDER_UNSPECIFIED": + case 0: + message.clusterDns = 0; + break; + case "PLATFORM_DEFAULT": + case 1: + message.clusterDns = 1; + break; + case "CLOUD_DNS": + case 2: + message.clusterDns = 2; + break; + case "KUBE_DNS": + case 3: + message.clusterDns = 3; + break; + } + switch (object.clusterDnsScope) { + default: + if (typeof object.clusterDnsScope === "number") { + message.clusterDnsScope = object.clusterDnsScope; + break; + } + break; + case "DNS_SCOPE_UNSPECIFIED": + case 0: + message.clusterDnsScope = 0; + break; + case "CLUSTER_SCOPE": + case 1: + message.clusterDnsScope = 1; + break; + case "VPC_SCOPE": + case 2: + message.clusterDnsScope = 2; + break; + } + if (object.clusterDnsDomain != null) + message.clusterDnsDomain = String(object.clusterDnsDomain); + if (object.additiveVpcScopeDnsDomain != null) + message.additiveVpcScopeDnsDomain = String(object.additiveVpcScopeDnsDomain); + return message; + }; + + /** + * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {google.container.v1beta1.DNSConfig} message DNSConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterDns = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; + object.clusterDnsScope = options.enums === String ? "DNS_SCOPE_UNSPECIFIED" : 0; + object.clusterDnsDomain = ""; + object.additiveVpcScopeDnsDomain = ""; + } + if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) + object.clusterDns = options.enums === String ? $root.google.container.v1beta1.DNSConfig.Provider[message.clusterDns] === undefined ? message.clusterDns : $root.google.container.v1beta1.DNSConfig.Provider[message.clusterDns] : message.clusterDns; + if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) + object.clusterDnsScope = options.enums === String ? $root.google.container.v1beta1.DNSConfig.DNSScope[message.clusterDnsScope] === undefined ? message.clusterDnsScope : $root.google.container.v1beta1.DNSConfig.DNSScope[message.clusterDnsScope] : message.clusterDnsScope; + if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) + object.clusterDnsDomain = message.clusterDnsDomain; + if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) + object.additiveVpcScopeDnsDomain = message.additiveVpcScopeDnsDomain; + return object; + }; + + /** + * Converts this DNSConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DNSConfig + * @instance + * @returns {Object.} JSON object + */ + DNSConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DNSConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.DNSConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DNSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DNSConfig"; + }; + + /** + * Provider enum. + * @name google.container.v1beta1.DNSConfig.Provider + * @enum {number} + * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value + * @property {number} PLATFORM_DEFAULT=1 PLATFORM_DEFAULT value + * @property {number} CLOUD_DNS=2 CLOUD_DNS value + * @property {number} KUBE_DNS=3 KUBE_DNS value + */ + DNSConfig.Provider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLATFORM_DEFAULT"] = 1; + values[valuesById[2] = "CLOUD_DNS"] = 2; + values[valuesById[3] = "KUBE_DNS"] = 3; + return values; + })(); + + /** + * DNSScope enum. + * @name google.container.v1beta1.DNSConfig.DNSScope + * @enum {number} + * @property {number} DNS_SCOPE_UNSPECIFIED=0 DNS_SCOPE_UNSPECIFIED value + * @property {number} CLUSTER_SCOPE=1 CLUSTER_SCOPE value + * @property {number} VPC_SCOPE=2 VPC_SCOPE value + */ + DNSConfig.DNSScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DNS_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLUSTER_SCOPE"] = 1; + values[valuesById[2] = "VPC_SCOPE"] = 2; + return values; + })(); + + return DNSConfig; + })(); + + v1beta1.MaxPodsConstraint = (function() { + + /** + * Properties of a MaxPodsConstraint. + * @memberof google.container.v1beta1 + * @interface IMaxPodsConstraint + * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode + */ + + /** + * Constructs a new MaxPodsConstraint. + * @memberof google.container.v1beta1 + * @classdesc Represents a MaxPodsConstraint. + * @implements IMaxPodsConstraint + * @constructor + * @param {google.container.v1beta1.IMaxPodsConstraint=} [properties] Properties to set + */ + function MaxPodsConstraint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaxPodsConstraint maxPodsPerNode. + * @member {number|Long} maxPodsPerNode + * @memberof google.container.v1beta1.MaxPodsConstraint + * @instance + */ + MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new MaxPodsConstraint instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {google.container.v1beta1.IMaxPodsConstraint=} [properties] Properties to set + * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint instance + */ + MaxPodsConstraint.create = function create(properties) { + return new MaxPodsConstraint(properties); + }; + + /** + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1beta1.MaxPodsConstraint.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {google.container.v1beta1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1beta1.MaxPodsConstraint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {google.container.v1beta1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.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; + }; + + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaxPodsConstraint message. + * @function verify + * @memberof google.container.v1beta1.MaxPodsConstraint + * @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) { + 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; + }; + + /** + * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MaxPodsConstraint + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint + */ + MaxPodsConstraint.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MaxPodsConstraint) + return object; + var message = new $root.google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint + * @static + * @param {google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint + * @instance + * @returns {Object.} JSON object + */ + MaxPodsConstraint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaxPodsConstraint + * @function getTypeUrl + * @memberof google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint"; + }; + + return MaxPodsConstraint; + })(); + + v1beta1.WorkloadIdentityConfig = (function() { + + /** + * Properties of a WorkloadIdentityConfig. + * @memberof google.container.v1beta1 + * @interface IWorkloadIdentityConfig + * @property {string|null} [identityNamespace] WorkloadIdentityConfig identityNamespace + * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool + * @property {string|null} [identityProvider] WorkloadIdentityConfig identityProvider + */ + + /** + * Constructs a new WorkloadIdentityConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadIdentityConfig. + * @implements IWorkloadIdentityConfig + * @constructor + * @param {google.container.v1beta1.IWorkloadIdentityConfig=} [properties] Properties to set + */ + function WorkloadIdentityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadIdentityConfig identityNamespace. + * @member {string} identityNamespace + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @instance + */ + WorkloadIdentityConfig.prototype.identityNamespace = ""; + + /** + * WorkloadIdentityConfig workloadPool. + * @member {string} workloadPool + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @instance + */ + WorkloadIdentityConfig.prototype.workloadPool = ""; + + /** + * WorkloadIdentityConfig identityProvider. + * @member {string} identityProvider + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @instance + */ + WorkloadIdentityConfig.prototype.identityProvider = ""; + + /** + * Creates a new WorkloadIdentityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {google.container.v1beta1.IWorkloadIdentityConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig instance + */ + WorkloadIdentityConfig.create = function create(properties) { + return new WorkloadIdentityConfig(properties); + }; + + /** + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadIdentityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {google.container.v1beta1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadIdentityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identityNamespace != null && Object.hasOwnProperty.call(message, "identityNamespace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.identityNamespace); + 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 WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadIdentityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {google.container.v1beta1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadIdentityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.identityNamespace = reader.string(); + break; + } + case 2: { + message.workloadPool = reader.string(); + break; + } + case 3: { + message.identityProvider = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadIdentityConfig message. + * @function verify + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identityNamespace != null && message.hasOwnProperty("identityNamespace")) + if (!$util.isString(message.identityNamespace)) + return "identityNamespace: 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig + */ + WorkloadIdentityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadIdentityConfig) + return object; + var message = new $root.google.container.v1beta1.WorkloadIdentityConfig(); + if (object.identityNamespace != null) + message.identityNamespace = String(object.identityNamespace); + 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 a WorkloadIdentityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {google.container.v1beta1.WorkloadIdentityConfig} message WorkloadIdentityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadIdentityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.identityNamespace = ""; + object.workloadPool = ""; + object.identityProvider = ""; + } + if (message.identityNamespace != null && message.hasOwnProperty("identityNamespace")) + object.identityNamespace = message.identityNamespace; + 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 WorkloadIdentityConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadIdentityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadIdentityConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadIdentityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadIdentityConfig"; + }; + + return WorkloadIdentityConfig; + })(); + + v1beta1.WorkloadALTSConfig = (function() { + + /** + * Properties of a WorkloadALTSConfig. + * @memberof google.container.v1beta1 + * @interface IWorkloadALTSConfig + * @property {google.protobuf.IBoolValue|null} [enableAlts] WorkloadALTSConfig enableAlts + */ + + /** + * Constructs a new WorkloadALTSConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadALTSConfig. + * @implements IWorkloadALTSConfig + * @constructor + * @param {google.container.v1beta1.IWorkloadALTSConfig=} [properties] Properties to set + */ + function WorkloadALTSConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadALTSConfig enableAlts. + * @member {google.protobuf.IBoolValue|null|undefined} enableAlts + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @instance + */ + WorkloadALTSConfig.prototype.enableAlts = null; + + /** + * Creates a new WorkloadALTSConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {google.container.v1beta1.IWorkloadALTSConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig instance + */ + WorkloadALTSConfig.create = function create(properties) { + return new WorkloadALTSConfig(properties); + }; + + /** + * Encodes the specified WorkloadALTSConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {google.container.v1beta1.IWorkloadALTSConfig} message WorkloadALTSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadALTSConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableAlts != null && Object.hasOwnProperty.call(message, "enableAlts")) + $root.google.protobuf.BoolValue.encode(message.enableAlts, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkloadALTSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {google.container.v1beta1.IWorkloadALTSConfig} message WorkloadALTSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadALTSConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadALTSConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadALTSConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadALTSConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableAlts = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadALTSConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadALTSConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadALTSConfig message. + * @function verify + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadALTSConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableAlts != null && message.hasOwnProperty("enableAlts")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableAlts); + if (error) + return "enableAlts." + error; + } + return null; + }; + + /** + * Creates a WorkloadALTSConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig + */ + WorkloadALTSConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadALTSConfig) + return object; + var message = new $root.google.container.v1beta1.WorkloadALTSConfig(); + if (object.enableAlts != null) { + if (typeof object.enableAlts !== "object") + throw TypeError(".google.container.v1beta1.WorkloadALTSConfig.enableAlts: object expected"); + message.enableAlts = $root.google.protobuf.BoolValue.fromObject(object.enableAlts); + } + return message; + }; + + /** + * Creates a plain object from a WorkloadALTSConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {google.container.v1beta1.WorkloadALTSConfig} message WorkloadALTSConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadALTSConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableAlts = null; + if (message.enableAlts != null && message.hasOwnProperty("enableAlts")) + object.enableAlts = $root.google.protobuf.BoolValue.toObject(message.enableAlts, options); + return object; + }; + + /** + * Converts this WorkloadALTSConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadALTSConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadALTSConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadALTSConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadALTSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadALTSConfig"; + }; + + return WorkloadALTSConfig; + })(); + + v1beta1.WorkloadCertificates = (function() { + + /** + * Properties of a WorkloadCertificates. + * @memberof google.container.v1beta1 + * @interface IWorkloadCertificates + * @property {google.protobuf.IBoolValue|null} [enableCertificates] WorkloadCertificates enableCertificates + */ + + /** + * Constructs a new WorkloadCertificates. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadCertificates. + * @implements IWorkloadCertificates + * @constructor + * @param {google.container.v1beta1.IWorkloadCertificates=} [properties] Properties to set + */ + function WorkloadCertificates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadCertificates enableCertificates. + * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates + * @memberof google.container.v1beta1.WorkloadCertificates + * @instance + */ + WorkloadCertificates.prototype.enableCertificates = null; + + /** + * Creates a new WorkloadCertificates instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {google.container.v1beta1.IWorkloadCertificates=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates instance + */ + WorkloadCertificates.create = function create(properties) { + return new WorkloadCertificates(properties); + }; + + /** + * Encodes the specified WorkloadCertificates message. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {google.container.v1beta1.IWorkloadCertificates} message WorkloadCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadCertificates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) + $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkloadCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {google.container.v1beta1.IWorkloadCertificates} message WorkloadCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadCertificates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadCertificates message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadCertificates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadCertificates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadCertificates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadCertificates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadCertificates message. + * @function verify + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadCertificates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); + if (error) + return "enableCertificates." + error; + } + return null; + }; + + /** + * Creates a WorkloadCertificates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates + */ + WorkloadCertificates.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadCertificates) + return object; + var message = new $root.google.container.v1beta1.WorkloadCertificates(); + if (object.enableCertificates != null) { + if (typeof object.enableCertificates !== "object") + throw TypeError(".google.container.v1beta1.WorkloadCertificates.enableCertificates: object expected"); + message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); + } + return message; + }; + + /** + * Creates a plain object from a WorkloadCertificates message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {google.container.v1beta1.WorkloadCertificates} message WorkloadCertificates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadCertificates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableCertificates = null; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) + object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); + return object; + }; + + /** + * Converts this WorkloadCertificates to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadCertificates + * @instance + * @returns {Object.} JSON object + */ + WorkloadCertificates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadCertificates + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadCertificates + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadCertificates"; + }; + + return WorkloadCertificates; + })(); + + v1beta1.MeshCertificates = (function() { + + /** + * Properties of a MeshCertificates. + * @memberof google.container.v1beta1 + * @interface IMeshCertificates + * @property {google.protobuf.IBoolValue|null} [enableCertificates] MeshCertificates enableCertificates + */ + + /** + * Constructs a new MeshCertificates. + * @memberof google.container.v1beta1 + * @classdesc Represents a MeshCertificates. + * @implements IMeshCertificates + * @constructor + * @param {google.container.v1beta1.IMeshCertificates=} [properties] Properties to set + */ + function MeshCertificates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeshCertificates enableCertificates. + * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates + * @memberof google.container.v1beta1.MeshCertificates + * @instance + */ + MeshCertificates.prototype.enableCertificates = null; + + /** + * Creates a new MeshCertificates instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {google.container.v1beta1.IMeshCertificates=} [properties] Properties to set + * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates instance + */ + MeshCertificates.create = function create(properties) { + return new MeshCertificates(properties); + }; + + /** + * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {google.container.v1beta1.IMeshCertificates} message MeshCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshCertificates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) + $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {google.container.v1beta1.IMeshCertificates} message MeshCertificates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshCertificates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshCertificates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MeshCertificates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshCertificates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeshCertificates message. + * @function verify + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeshCertificates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); + if (error) + return "enableCertificates." + error; + } + return null; + }; + + /** + * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates + */ + MeshCertificates.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MeshCertificates) + return object; + var message = new $root.google.container.v1beta1.MeshCertificates(); + if (object.enableCertificates != null) { + if (typeof object.enableCertificates !== "object") + throw TypeError(".google.container.v1beta1.MeshCertificates.enableCertificates: object expected"); + message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); + } + return message; + }; + + /** + * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {google.container.v1beta1.MeshCertificates} message MeshCertificates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeshCertificates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableCertificates = null; + if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) + object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); + return object; + }; + + /** + * Converts this MeshCertificates to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MeshCertificates + * @instance + * @returns {Object.} JSON object + */ + MeshCertificates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MeshCertificates + * @function getTypeUrl + * @memberof google.container.v1beta1.MeshCertificates + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeshCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MeshCertificates"; + }; + + return MeshCertificates; + })(); + + v1beta1.DatabaseEncryption = (function() { + + /** + * Properties of a DatabaseEncryption. + * @memberof google.container.v1beta1 + * @interface IDatabaseEncryption + * @property {string|null} [keyName] DatabaseEncryption keyName + * @property {google.container.v1beta1.DatabaseEncryption.State|null} [state] DatabaseEncryption state + * @property {google.container.v1beta1.DatabaseEncryption.CurrentState|null} [currentState] DatabaseEncryption currentState + * @property {Array.|null} [decryptionKeys] DatabaseEncryption decryptionKeys + * @property {Array.|null} [lastOperationErrors] DatabaseEncryption lastOperationErrors + */ + + /** + * Constructs a new DatabaseEncryption. + * @memberof google.container.v1beta1 + * @classdesc Represents a DatabaseEncryption. + * @implements IDatabaseEncryption + * @constructor + * @param {google.container.v1beta1.IDatabaseEncryption=} [properties] Properties to set + */ + function DatabaseEncryption(properties) { + this.decryptionKeys = []; + this.lastOperationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseEncryption keyName. + * @member {string} keyName + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.keyName = ""; + + /** + * DatabaseEncryption state. + * @member {google.container.v1beta1.DatabaseEncryption.State} state + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.state = 0; + + /** + * DatabaseEncryption currentState. + * @member {google.container.v1beta1.DatabaseEncryption.CurrentState|null|undefined} currentState + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.currentState = null; + + /** + * DatabaseEncryption decryptionKeys. + * @member {Array.} decryptionKeys + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.decryptionKeys = $util.emptyArray; + + /** + * DatabaseEncryption lastOperationErrors. + * @member {Array.} lastOperationErrors + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + DatabaseEncryption.prototype.lastOperationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatabaseEncryption _currentState. + * @member {"currentState"|undefined} _currentState + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + */ + Object.defineProperty(DatabaseEncryption.prototype, "_currentState", { + get: $util.oneOfGetter($oneOfFields = ["currentState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatabaseEncryption instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {google.container.v1beta1.IDatabaseEncryption=} [properties] Properties to set + * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption instance + */ + DatabaseEncryption.create = function create(properties) { + return new DatabaseEncryption(properties); + }; + + /** + * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {google.container.v1beta1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.currentState != null && Object.hasOwnProperty.call(message, "currentState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currentState); + if (message.decryptionKeys != null && message.decryptionKeys.length) + for (var i = 0; i < message.decryptionKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.decryptionKeys[i]); + if (message.lastOperationErrors != null && message.lastOperationErrors.length) + for (var i = 0; i < message.lastOperationErrors.length; ++i) + $root.google.container.v1beta1.DatabaseEncryption.OperationError.encode(message.lastOperationErrors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {google.container.v1beta1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEncryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DatabaseEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyName = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.currentState = reader.int32(); + break; + } + case 4: { + if (!(message.decryptionKeys && message.decryptionKeys.length)) + message.decryptionKeys = []; + message.decryptionKeys.push(reader.string()); + break; + } + case 5: { + if (!(message.lastOperationErrors && message.lastOperationErrors.length)) + message.lastOperationErrors = []; + message.lastOperationErrors.push($root.google.container.v1beta1.DatabaseEncryption.OperationError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseEncryption message. + * @function verify + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.currentState != null && message.hasOwnProperty("currentState")) { + properties._currentState = 1; + switch (message.currentState) { + default: + return "currentState: enum value expected"; + case 0: + case 7: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.decryptionKeys != null && message.hasOwnProperty("decryptionKeys")) { + if (!Array.isArray(message.decryptionKeys)) + return "decryptionKeys: array expected"; + for (var i = 0; i < message.decryptionKeys.length; ++i) + if (!$util.isString(message.decryptionKeys[i])) + return "decryptionKeys: string[] expected"; + } + if (message.lastOperationErrors != null && message.hasOwnProperty("lastOperationErrors")) { + if (!Array.isArray(message.lastOperationErrors)) + return "lastOperationErrors: array expected"; + for (var i = 0; i < message.lastOperationErrors.length; ++i) { + var error = $root.google.container.v1beta1.DatabaseEncryption.OperationError.verify(message.lastOperationErrors[i]); + if (error) + return "lastOperationErrors." + error; + } + } + return null; + }; + + /** + * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption + */ + DatabaseEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DatabaseEncryption) + return object; + var message = new $root.google.container.v1beta1.DatabaseEncryption(); + if (object.keyName != null) + message.keyName = String(object.keyName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "UNKNOWN": + case 0: + message.state = 0; + break; + case "ENCRYPTED": + case 1: + message.state = 1; + break; + case "DECRYPTED": + case 2: + message.state = 2; + break; + } + switch (object.currentState) { + default: + if (typeof object.currentState === "number") { + message.currentState = object.currentState; + break; + } + break; + case "CURRENT_STATE_UNSPECIFIED": + case 0: + message.currentState = 0; + break; + case "CURRENT_STATE_ENCRYPTED": + case 7: + message.currentState = 7; + break; + case "CURRENT_STATE_DECRYPTED": + case 2: + message.currentState = 2; + break; + case "CURRENT_STATE_ENCRYPTION_PENDING": + case 3: + message.currentState = 3; + break; + case "CURRENT_STATE_ENCRYPTION_ERROR": + case 4: + message.currentState = 4; + break; + case "CURRENT_STATE_DECRYPTION_PENDING": + case 5: + message.currentState = 5; + break; + case "CURRENT_STATE_DECRYPTION_ERROR": + case 6: + message.currentState = 6; + break; + } + if (object.decryptionKeys) { + if (!Array.isArray(object.decryptionKeys)) + throw TypeError(".google.container.v1beta1.DatabaseEncryption.decryptionKeys: array expected"); + message.decryptionKeys = []; + for (var i = 0; i < object.decryptionKeys.length; ++i) + message.decryptionKeys[i] = String(object.decryptionKeys[i]); + } + if (object.lastOperationErrors) { + if (!Array.isArray(object.lastOperationErrors)) + throw TypeError(".google.container.v1beta1.DatabaseEncryption.lastOperationErrors: array expected"); + message.lastOperationErrors = []; + for (var i = 0; i < object.lastOperationErrors.length; ++i) { + if (typeof object.lastOperationErrors[i] !== "object") + throw TypeError(".google.container.v1beta1.DatabaseEncryption.lastOperationErrors: object expected"); + message.lastOperationErrors[i] = $root.google.container.v1beta1.DatabaseEncryption.OperationError.fromObject(object.lastOperationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {google.container.v1beta1.DatabaseEncryption} message DatabaseEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.decryptionKeys = []; + object.lastOperationErrors = []; + } + if (options.defaults) { + object.keyName = ""; + object.state = options.enums === String ? "UNKNOWN" : 0; + } + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.container.v1beta1.DatabaseEncryption.State[message.state] === undefined ? message.state : $root.google.container.v1beta1.DatabaseEncryption.State[message.state] : message.state; + if (message.currentState != null && message.hasOwnProperty("currentState")) { + object.currentState = options.enums === String ? $root.google.container.v1beta1.DatabaseEncryption.CurrentState[message.currentState] === undefined ? message.currentState : $root.google.container.v1beta1.DatabaseEncryption.CurrentState[message.currentState] : message.currentState; + if (options.oneofs) + object._currentState = "currentState"; + } + if (message.decryptionKeys && message.decryptionKeys.length) { + object.decryptionKeys = []; + for (var j = 0; j < message.decryptionKeys.length; ++j) + object.decryptionKeys[j] = message.decryptionKeys[j]; + } + if (message.lastOperationErrors && message.lastOperationErrors.length) { + object.lastOperationErrors = []; + for (var j = 0; j < message.lastOperationErrors.length; ++j) + object.lastOperationErrors[j] = $root.google.container.v1beta1.DatabaseEncryption.OperationError.toObject(message.lastOperationErrors[j], options); + } + return object; + }; + + /** + * Converts this DatabaseEncryption to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DatabaseEncryption + * @instance + * @returns {Object.} JSON object + */ + DatabaseEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseEncryption + * @function getTypeUrl + * @memberof google.container.v1beta1.DatabaseEncryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DatabaseEncryption"; + }; + + /** + * State enum. + * @name google.container.v1beta1.DatabaseEncryption.State + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ENCRYPTED=1 ENCRYPTED value + * @property {number} DECRYPTED=2 DECRYPTED value + */ + DatabaseEncryption.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ENCRYPTED"] = 1; + values[valuesById[2] = "DECRYPTED"] = 2; + return values; + })(); + + /** + * CurrentState enum. + * @name google.container.v1beta1.DatabaseEncryption.CurrentState + * @enum {number} + * @property {number} CURRENT_STATE_UNSPECIFIED=0 CURRENT_STATE_UNSPECIFIED value + * @property {number} CURRENT_STATE_ENCRYPTED=7 CURRENT_STATE_ENCRYPTED value + * @property {number} CURRENT_STATE_DECRYPTED=2 CURRENT_STATE_DECRYPTED value + * @property {number} CURRENT_STATE_ENCRYPTION_PENDING=3 CURRENT_STATE_ENCRYPTION_PENDING value + * @property {number} CURRENT_STATE_ENCRYPTION_ERROR=4 CURRENT_STATE_ENCRYPTION_ERROR value + * @property {number} CURRENT_STATE_DECRYPTION_PENDING=5 CURRENT_STATE_DECRYPTION_PENDING value + * @property {number} CURRENT_STATE_DECRYPTION_ERROR=6 CURRENT_STATE_DECRYPTION_ERROR value + */ + DatabaseEncryption.CurrentState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CURRENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[7] = "CURRENT_STATE_ENCRYPTED"] = 7; + values[valuesById[2] = "CURRENT_STATE_DECRYPTED"] = 2; + values[valuesById[3] = "CURRENT_STATE_ENCRYPTION_PENDING"] = 3; + values[valuesById[4] = "CURRENT_STATE_ENCRYPTION_ERROR"] = 4; + values[valuesById[5] = "CURRENT_STATE_DECRYPTION_PENDING"] = 5; + values[valuesById[6] = "CURRENT_STATE_DECRYPTION_ERROR"] = 6; + return values; + })(); + + DatabaseEncryption.OperationError = (function() { + + /** + * Properties of an OperationError. + * @memberof google.container.v1beta1.DatabaseEncryption + * @interface IOperationError + * @property {string|null} [keyName] OperationError keyName + * @property {string|null} [errorMessage] OperationError errorMessage + * @property {google.protobuf.ITimestamp|null} [timestamp] OperationError timestamp + */ + + /** + * Constructs a new OperationError. + * @memberof google.container.v1beta1.DatabaseEncryption + * @classdesc Represents an OperationError. + * @implements IOperationError + * @constructor + * @param {google.container.v1beta1.DatabaseEncryption.IOperationError=} [properties] Properties to set + */ + function OperationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationError keyName. + * @member {string} keyName + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.keyName = ""; + + /** + * OperationError errorMessage. + * @member {string} errorMessage + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.errorMessage = ""; + + /** + * OperationError timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @instance + */ + OperationError.prototype.timestamp = null; + + /** + * Creates a new OperationError instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1beta1.DatabaseEncryption.IOperationError=} [properties] Properties to set + * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError instance + */ + OperationError.create = function create(properties) { + return new OperationError(properties); + }; + + /** + * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1beta1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1beta1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationError message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DatabaseEncryption.OperationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyName = reader.string(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + case 3: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationError message. + * @function verify + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates an OperationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError + */ + OperationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.DatabaseEncryption.OperationError) + return object; + var message = new $root.google.container.v1beta1.DatabaseEncryption.OperationError(); + if (object.keyName != null) + message.keyName = String(object.keyName); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.container.v1beta1.DatabaseEncryption.OperationError.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from an OperationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {google.container.v1beta1.DatabaseEncryption.OperationError} message OperationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyName = ""; + object.errorMessage = ""; + object.timestamp = null; + } + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this OperationError to JSON. + * @function toJSON + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @instance + * @returns {Object.} JSON object + */ + OperationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationError + * @function getTypeUrl + * @memberof google.container.v1beta1.DatabaseEncryption.OperationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.DatabaseEncryption.OperationError"; + }; + + return OperationError; + })(); + + return DatabaseEncryption; + })(); + + v1beta1.ResourceUsageExportConfig = (function() { + + /** + * Properties of a ResourceUsageExportConfig. + * @memberof google.container.v1beta1 + * @interface IResourceUsageExportConfig + * @property {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null} [bigqueryDestination] ResourceUsageExportConfig bigqueryDestination + * @property {boolean|null} [enableNetworkEgressMetering] ResourceUsageExportConfig enableNetworkEgressMetering + * @property {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null} [consumptionMeteringConfig] ResourceUsageExportConfig consumptionMeteringConfig + */ + + /** + * Constructs a new ResourceUsageExportConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a ResourceUsageExportConfig. + * @implements IResourceUsageExportConfig + * @constructor + * @param {google.container.v1beta1.IResourceUsageExportConfig=} [properties] Properties to set + */ + function ResourceUsageExportConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceUsageExportConfig bigqueryDestination. + * @member {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.bigqueryDestination = null; + + /** + * ResourceUsageExportConfig enableNetworkEgressMetering. + * @member {boolean} enableNetworkEgressMetering + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.enableNetworkEgressMetering = false; + + /** + * ResourceUsageExportConfig consumptionMeteringConfig. + * @member {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null|undefined} consumptionMeteringConfig + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @instance + */ + ResourceUsageExportConfig.prototype.consumptionMeteringConfig = null; + + /** + * Creates a new ResourceUsageExportConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {google.container.v1beta1.IResourceUsageExportConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig instance + */ + ResourceUsageExportConfig.create = function create(properties) { + return new ResourceUsageExportConfig(properties); + }; + + /** + * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {google.container.v1beta1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsageExportConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryDestination != null && Object.hasOwnProperty.call(message, "bigqueryDestination")) + $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enableNetworkEgressMetering != null && Object.hasOwnProperty.call(message, "enableNetworkEgressMetering")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNetworkEgressMetering); + if (message.consumptionMeteringConfig != null && Object.hasOwnProperty.call(message, "consumptionMeteringConfig")) + $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.encode(message.consumptionMeteringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {google.container.v1beta1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsageExportConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsageExportConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enableNetworkEgressMetering = reader.bool(); + break; + } + case 3: { + message.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsageExportConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceUsageExportConfig message. + * @function verify + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceUsageExportConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + var error = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } + if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) + if (typeof message.enableNetworkEgressMetering !== "boolean") + return "enableNetworkEgressMetering: boolean expected"; + if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) { + var error = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify(message.consumptionMeteringConfig); + if (error) + return "consumptionMeteringConfig." + error; + } + return null; + }; + + /** + * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig + */ + ResourceUsageExportConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig) + return object; + var message = new $root.google.container.v1beta1.ResourceUsageExportConfig(); + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.container.v1beta1.ResourceUsageExportConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.fromObject(object.bigqueryDestination); + } + if (object.enableNetworkEgressMetering != null) + message.enableNetworkEgressMetering = Boolean(object.enableNetworkEgressMetering); + if (object.consumptionMeteringConfig != null) { + if (typeof object.consumptionMeteringConfig !== "object") + throw TypeError(".google.container.v1beta1.ResourceUsageExportConfig.consumptionMeteringConfig: object expected"); + message.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.fromObject(object.consumptionMeteringConfig); + } + return message; + }; + + /** + * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig} message ResourceUsageExportConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceUsageExportConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bigqueryDestination = null; + object.enableNetworkEgressMetering = false; + object.consumptionMeteringConfig = null; + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + object.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) + object.enableNetworkEgressMetering = message.enableNetworkEgressMetering; + if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) + object.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.toObject(message.consumptionMeteringConfig, options); + return object; + }; + + /** + * Converts this ResourceUsageExportConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @instance + * @returns {Object.} JSON object + */ + ResourceUsageExportConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceUsageExportConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceUsageExportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig"; + }; + + ResourceUsageExportConfig.BigQueryDestination = (function() { + + /** + * Properties of a BigQueryDestination. + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @interface IBigQueryDestination + * @property {string|null} [datasetId] BigQueryDestination datasetId + */ + + /** + * Constructs a new BigQueryDestination. + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @classdesc Represents a BigQueryDestination. + * @implements IBigQueryDestination + * @constructor + * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set + */ + function BigQueryDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDestination datasetId. + * @member {string} datasetId + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.datasetId = ""; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination instance + */ + BigQueryDestination.create = function create(properties) { + return new BigQueryDestination(properties); + }; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); + return writer; + }; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datasetId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDestination message. + * @function verify + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + return null; + }; + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination + */ + BigQueryDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination) + return object; + var message = new $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + return message; + }; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} message BigQueryDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasetId = ""; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + return object; + }; + + /** + * Converts this BigQueryDestination to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @instance + * @returns {Object.} JSON object + */ + BigQueryDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDestination + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination"; + }; + + return BigQueryDestination; + })(); + + ResourceUsageExportConfig.ConsumptionMeteringConfig = (function() { + + /** + * Properties of a ConsumptionMeteringConfig. + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @interface IConsumptionMeteringConfig + * @property {boolean|null} [enabled] ConsumptionMeteringConfig enabled + */ + + /** + * Constructs a new ConsumptionMeteringConfig. + * @memberof google.container.v1beta1.ResourceUsageExportConfig + * @classdesc Represents a ConsumptionMeteringConfig. + * @implements IConsumptionMeteringConfig + * @constructor + * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set + */ + function ConsumptionMeteringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsumptionMeteringConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @instance + */ + ConsumptionMeteringConfig.prototype.enabled = false; + + /** + * Creates a new ConsumptionMeteringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig instance + */ + ConsumptionMeteringConfig.create = function create(properties) { + return new ConsumptionMeteringConfig(properties); + }; + + /** + * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumptionMeteringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsumptionMeteringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumptionMeteringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsumptionMeteringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsumptionMeteringConfig message. + * @function verify + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsumptionMeteringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig + */ + ConsumptionMeteringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig) + return object; + var message = new $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} message ConsumptionMeteringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsumptionMeteringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConsumptionMeteringConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @instance + * @returns {Object.} JSON object + */ + ConsumptionMeteringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConsumptionMeteringConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConsumptionMeteringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig"; + }; + + return ConsumptionMeteringConfig; + })(); + + return ResourceUsageExportConfig; + })(); + + v1beta1.ShieldedNodes = (function() { + + /** + * Properties of a ShieldedNodes. + * @memberof google.container.v1beta1 + * @interface IShieldedNodes + * @property {boolean|null} [enabled] ShieldedNodes enabled + */ + + /** + * Constructs a new ShieldedNodes. + * @memberof google.container.v1beta1 + * @classdesc Represents a ShieldedNodes. + * @implements IShieldedNodes + * @constructor + * @param {google.container.v1beta1.IShieldedNodes=} [properties] Properties to set + */ + function ShieldedNodes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShieldedNodes enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ShieldedNodes + * @instance + */ + ShieldedNodes.prototype.enabled = false; + + /** + * Creates a new ShieldedNodes instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {google.container.v1beta1.IShieldedNodes=} [properties] Properties to set + * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes instance + */ + ShieldedNodes.create = function create(properties) { + return new ShieldedNodes(properties); + }; + + /** + * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {google.container.v1beta1.IShieldedNodes} message ShieldedNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedNodes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {google.container.v1beta1.IShieldedNodes} message ShieldedNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShieldedNodes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedNodes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ShieldedNodes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShieldedNodes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShieldedNodes message. + * @function verify + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShieldedNodes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes + */ + ShieldedNodes.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ShieldedNodes) + return object; + var message = new $root.google.container.v1beta1.ShieldedNodes(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {google.container.v1beta1.ShieldedNodes} message ShieldedNodes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShieldedNodes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ShieldedNodes to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ShieldedNodes + * @instance + * @returns {Object.} JSON object + */ + ShieldedNodes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShieldedNodes + * @function getTypeUrl + * @memberof google.container.v1beta1.ShieldedNodes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShieldedNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ShieldedNodes"; + }; + + return ShieldedNodes; + })(); + + v1beta1.VirtualNIC = (function() { + + /** + * Properties of a VirtualNIC. + * @memberof google.container.v1beta1 + * @interface IVirtualNIC + * @property {boolean|null} [enabled] VirtualNIC enabled + */ + + /** + * Constructs a new VirtualNIC. + * @memberof google.container.v1beta1 + * @classdesc Represents a VirtualNIC. + * @implements IVirtualNIC + * @constructor + * @param {google.container.v1beta1.IVirtualNIC=} [properties] Properties to set + */ + function VirtualNIC(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VirtualNIC enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.VirtualNIC + * @instance + */ + VirtualNIC.prototype.enabled = false; + + /** + * Creates a new VirtualNIC instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {google.container.v1beta1.IVirtualNIC=} [properties] Properties to set + * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC instance + */ + VirtualNIC.create = function create(properties) { + return new VirtualNIC(properties); + }; + + /** + * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {google.container.v1beta1.IVirtualNIC} message VirtualNIC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualNIC.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {google.container.v1beta1.IVirtualNIC} message VirtualNIC message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualNIC.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualNIC.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.VirtualNIC(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualNIC.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualNIC message. + * @function verify + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualNIC.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC + */ + VirtualNIC.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.VirtualNIC) + return object; + var message = new $root.google.container.v1beta1.VirtualNIC(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {google.container.v1beta1.VirtualNIC} message VirtualNIC + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualNIC.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this VirtualNIC to JSON. + * @function toJSON + * @memberof google.container.v1beta1.VirtualNIC + * @instance + * @returns {Object.} JSON object + */ + VirtualNIC.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VirtualNIC + * @function getTypeUrl + * @memberof google.container.v1beta1.VirtualNIC + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualNIC.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.VirtualNIC"; + }; + + return VirtualNIC; + })(); + + v1beta1.FastSocket = (function() { + + /** + * Properties of a FastSocket. + * @memberof google.container.v1beta1 + * @interface IFastSocket + * @property {boolean|null} [enabled] FastSocket enabled + */ + + /** + * Constructs a new FastSocket. + * @memberof google.container.v1beta1 + * @classdesc Represents a FastSocket. + * @implements IFastSocket + * @constructor + * @param {google.container.v1beta1.IFastSocket=} [properties] Properties to set + */ + function FastSocket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FastSocket enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.FastSocket + * @instance + */ + FastSocket.prototype.enabled = false; + + /** + * Creates a new FastSocket instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {google.container.v1beta1.IFastSocket=} [properties] Properties to set + * @returns {google.container.v1beta1.FastSocket} FastSocket instance + */ + FastSocket.create = function create(properties) { + return new FastSocket(properties); + }; + + /** + * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {google.container.v1beta1.IFastSocket} message FastSocket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FastSocket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {google.container.v1beta1.IFastSocket} message FastSocket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FastSocket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FastSocket message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.FastSocket} FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FastSocket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.FastSocket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FastSocket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.FastSocket} FastSocket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FastSocket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FastSocket message. + * @function verify + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FastSocket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.FastSocket} FastSocket + */ + FastSocket.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.FastSocket) + return object; + var message = new $root.google.container.v1beta1.FastSocket(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a FastSocket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {google.container.v1beta1.FastSocket} message FastSocket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FastSocket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this FastSocket to JSON. + * @function toJSON + * @memberof google.container.v1beta1.FastSocket + * @instance + * @returns {Object.} JSON object + */ + FastSocket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FastSocket + * @function getTypeUrl + * @memberof google.container.v1beta1.FastSocket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FastSocket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.FastSocket"; + }; + + return FastSocket; + })(); + + v1beta1.GetOpenIDConfigRequest = (function() { + + /** + * Properties of a GetOpenIDConfigRequest. + * @memberof google.container.v1beta1 + * @interface IGetOpenIDConfigRequest + * @property {string|null} [parent] GetOpenIDConfigRequest parent + */ + + /** + * Constructs a new GetOpenIDConfigRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetOpenIDConfigRequest. + * @implements IGetOpenIDConfigRequest + * @constructor + * @param {google.container.v1beta1.IGetOpenIDConfigRequest=} [properties] Properties to set + */ + function GetOpenIDConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOpenIDConfigRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @instance + */ + GetOpenIDConfigRequest.prototype.parent = ""; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest instance + */ + GetOpenIDConfigRequest.create = function create(properties) { + return new GetOpenIDConfigRequest(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.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); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOpenIDConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigRequest message. + * @function verify + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + */ + GetOpenIDConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetOpenIDConfigRequest) + return object; + var message = new $root.google.container.v1beta1.GetOpenIDConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1beta1.GetOpenIDConfigRequest} message GetOpenIDConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOpenIDConfigRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetOpenIDConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOpenIDConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetOpenIDConfigRequest"; + }; + + return GetOpenIDConfigRequest; + })(); + + v1beta1.GetOpenIDConfigResponse = (function() { + + /** + * Properties of a GetOpenIDConfigResponse. + * @memberof google.container.v1beta1 + * @interface IGetOpenIDConfigResponse + * @property {string|null} [issuer] GetOpenIDConfigResponse issuer + * @property {string|null} [jwksUri] GetOpenIDConfigResponse jwksUri + * @property {Array.|null} [responseTypesSupported] GetOpenIDConfigResponse responseTypesSupported + * @property {Array.|null} [subjectTypesSupported] GetOpenIDConfigResponse subjectTypesSupported + * @property {Array.|null} [idTokenSigningAlgValuesSupported] GetOpenIDConfigResponse idTokenSigningAlgValuesSupported + * @property {Array.|null} [claimsSupported] GetOpenIDConfigResponse claimsSupported + * @property {Array.|null} [grantTypes] GetOpenIDConfigResponse grantTypes + */ + + /** + * Constructs a new GetOpenIDConfigResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetOpenIDConfigResponse. + * @implements IGetOpenIDConfigResponse + * @constructor + * @param {google.container.v1beta1.IGetOpenIDConfigResponse=} [properties] Properties to set + */ + function GetOpenIDConfigResponse(properties) { + this.responseTypesSupported = []; + this.subjectTypesSupported = []; + this.idTokenSigningAlgValuesSupported = []; + this.claimsSupported = []; + this.grantTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOpenIDConfigResponse issuer. + * @member {string} issuer + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.issuer = ""; + + /** + * GetOpenIDConfigResponse jwksUri. + * @member {string} jwksUri + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.jwksUri = ""; + + /** + * GetOpenIDConfigResponse responseTypesSupported. + * @member {Array.} responseTypesSupported + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.responseTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse subjectTypesSupported. + * @member {Array.} subjectTypesSupported + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.subjectTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. + * @member {Array.} idTokenSigningAlgValuesSupported + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.idTokenSigningAlgValuesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse claimsSupported. + * @member {Array.} claimsSupported + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.claimsSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse grantTypes. + * @member {Array.} grantTypes + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.grantTypes = $util.emptyArray; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse instance + */ + GetOpenIDConfigResponse.create = function create(properties) { + return new GetOpenIDConfigResponse(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jwksUri); + if (message.responseTypesSupported != null && message.responseTypesSupported.length) + for (var i = 0; i < message.responseTypesSupported.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.responseTypesSupported[i]); + if (message.subjectTypesSupported != null && message.subjectTypesSupported.length) + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjectTypesSupported[i]); + if (message.idTokenSigningAlgValuesSupported != null && message.idTokenSigningAlgValuesSupported.length) + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.idTokenSigningAlgValuesSupported[i]); + if (message.claimsSupported != null && message.claimsSupported.length) + for (var i = 0; i < message.claimsSupported.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.claimsSupported[i]); + if (message.grantTypes != null && message.grantTypes.length) + for (var i = 0; i < message.grantTypes.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.grantTypes[i]); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1beta1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOpenIDConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issuer = reader.string(); + break; + } + case 2: { + message.jwksUri = reader.string(); + break; + } + case 3: { + if (!(message.responseTypesSupported && message.responseTypesSupported.length)) + message.responseTypesSupported = []; + message.responseTypesSupported.push(reader.string()); + break; + } + case 4: { + if (!(message.subjectTypesSupported && message.subjectTypesSupported.length)) + message.subjectTypesSupported = []; + message.subjectTypesSupported.push(reader.string()); + break; + } + case 5: { + if (!(message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length)) + message.idTokenSigningAlgValuesSupported = []; + message.idTokenSigningAlgValuesSupported.push(reader.string()); + break; + } + case 6: { + if (!(message.claimsSupported && message.claimsSupported.length)) + message.claimsSupported = []; + message.claimsSupported.push(reader.string()); + break; + } + case 7: { + if (!(message.grantTypes && message.grantTypes.length)) + message.grantTypes = []; + message.grantTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigResponse message. + * @function verify + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + if (!$util.isString(message.jwksUri)) + return "jwksUri: string expected"; + if (message.responseTypesSupported != null && message.hasOwnProperty("responseTypesSupported")) { + if (!Array.isArray(message.responseTypesSupported)) + return "responseTypesSupported: array expected"; + for (var i = 0; i < message.responseTypesSupported.length; ++i) + if (!$util.isString(message.responseTypesSupported[i])) + return "responseTypesSupported: string[] expected"; + } + if (message.subjectTypesSupported != null && message.hasOwnProperty("subjectTypesSupported")) { + if (!Array.isArray(message.subjectTypesSupported)) + return "subjectTypesSupported: array expected"; + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + if (!$util.isString(message.subjectTypesSupported[i])) + return "subjectTypesSupported: string[] expected"; + } + if (message.idTokenSigningAlgValuesSupported != null && message.hasOwnProperty("idTokenSigningAlgValuesSupported")) { + if (!Array.isArray(message.idTokenSigningAlgValuesSupported)) + return "idTokenSigningAlgValuesSupported: array expected"; + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + if (!$util.isString(message.idTokenSigningAlgValuesSupported[i])) + return "idTokenSigningAlgValuesSupported: string[] expected"; + } + if (message.claimsSupported != null && message.hasOwnProperty("claimsSupported")) { + if (!Array.isArray(message.claimsSupported)) + return "claimsSupported: array expected"; + for (var i = 0; i < message.claimsSupported.length; ++i) + if (!$util.isString(message.claimsSupported[i])) + return "claimsSupported: string[] expected"; + } + if (message.grantTypes != null && message.hasOwnProperty("grantTypes")) { + if (!Array.isArray(message.grantTypes)) + return "grantTypes: array expected"; + for (var i = 0; i < message.grantTypes.length; ++i) + if (!$util.isString(message.grantTypes[i])) + return "grantTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + */ + GetOpenIDConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetOpenIDConfigResponse) + return object; + var message = new $root.google.container.v1beta1.GetOpenIDConfigResponse(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.jwksUri != null) + message.jwksUri = String(object.jwksUri); + if (object.responseTypesSupported) { + if (!Array.isArray(object.responseTypesSupported)) + throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.responseTypesSupported: array expected"); + message.responseTypesSupported = []; + for (var i = 0; i < object.responseTypesSupported.length; ++i) + message.responseTypesSupported[i] = String(object.responseTypesSupported[i]); + } + if (object.subjectTypesSupported) { + if (!Array.isArray(object.subjectTypesSupported)) + throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.subjectTypesSupported: array expected"); + message.subjectTypesSupported = []; + for (var i = 0; i < object.subjectTypesSupported.length; ++i) + message.subjectTypesSupported[i] = String(object.subjectTypesSupported[i]); + } + if (object.idTokenSigningAlgValuesSupported) { + if (!Array.isArray(object.idTokenSigningAlgValuesSupported)) + throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.idTokenSigningAlgValuesSupported: array expected"); + message.idTokenSigningAlgValuesSupported = []; + for (var i = 0; i < object.idTokenSigningAlgValuesSupported.length; ++i) + message.idTokenSigningAlgValuesSupported[i] = String(object.idTokenSigningAlgValuesSupported[i]); + } + if (object.claimsSupported) { + if (!Array.isArray(object.claimsSupported)) + throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.claimsSupported: array expected"); + message.claimsSupported = []; + for (var i = 0; i < object.claimsSupported.length; ++i) + message.claimsSupported[i] = String(object.claimsSupported[i]); + } + if (object.grantTypes) { + if (!Array.isArray(object.grantTypes)) + throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.grantTypes: array expected"); + message.grantTypes = []; + for (var i = 0; i < object.grantTypes.length; ++i) + message.grantTypes[i] = String(object.grantTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1beta1.GetOpenIDConfigResponse} message GetOpenIDConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.responseTypesSupported = []; + object.subjectTypesSupported = []; + object.idTokenSigningAlgValuesSupported = []; + object.claimsSupported = []; + object.grantTypes = []; + } + if (options.defaults) { + object.issuer = ""; + object.jwksUri = ""; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + object.jwksUri = message.jwksUri; + if (message.responseTypesSupported && message.responseTypesSupported.length) { + object.responseTypesSupported = []; + for (var j = 0; j < message.responseTypesSupported.length; ++j) + object.responseTypesSupported[j] = message.responseTypesSupported[j]; + } + if (message.subjectTypesSupported && message.subjectTypesSupported.length) { + object.subjectTypesSupported = []; + for (var j = 0; j < message.subjectTypesSupported.length; ++j) + object.subjectTypesSupported[j] = message.subjectTypesSupported[j]; + } + if (message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length) { + object.idTokenSigningAlgValuesSupported = []; + for (var j = 0; j < message.idTokenSigningAlgValuesSupported.length; ++j) + object.idTokenSigningAlgValuesSupported[j] = message.idTokenSigningAlgValuesSupported[j]; + } + if (message.claimsSupported && message.claimsSupported.length) { + object.claimsSupported = []; + for (var j = 0; j < message.claimsSupported.length; ++j) + object.claimsSupported[j] = message.claimsSupported[j]; + } + if (message.grantTypes && message.grantTypes.length) { + object.grantTypes = []; + for (var j = 0; j < message.grantTypes.length; ++j) + object.grantTypes[j] = message.grantTypes[j]; + } + return object; + }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOpenIDConfigResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.GetOpenIDConfigResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOpenIDConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetOpenIDConfigResponse"; + }; + + return GetOpenIDConfigResponse; + })(); + + v1beta1.GetJSONWebKeysRequest = (function() { + + /** + * Properties of a GetJSONWebKeysRequest. + * @memberof google.container.v1beta1 + * @interface IGetJSONWebKeysRequest + * @property {string|null} [parent] GetJSONWebKeysRequest parent + */ + + /** + * Constructs a new GetJSONWebKeysRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetJSONWebKeysRequest. + * @implements IGetJSONWebKeysRequest + * @constructor + * @param {google.container.v1beta1.IGetJSONWebKeysRequest=} [properties] Properties to set + */ + function GetJSONWebKeysRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJSONWebKeysRequest parent. + * @member {string} parent + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @instance + */ + GetJSONWebKeysRequest.prototype.parent = ""; + + /** + * Creates a new GetJSONWebKeysRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest instance + */ + GetJSONWebKeysRequest.create = function create(properties) { + return new GetJSONWebKeysRequest(properties); + }; + + /** + * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysRequest.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); + return writer; + }; + + /** + * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetJSONWebKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJSONWebKeysRequest message. + * @function verify + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJSONWebKeysRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest + */ + GetJSONWebKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetJSONWebKeysRequest) + return object; + var message = new $root.google.container.v1beta1.GetJSONWebKeysRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {google.container.v1beta1.GetJSONWebKeysRequest} message GetJSONWebKeysRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJSONWebKeysRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this GetJSONWebKeysRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @instance + * @returns {Object.} JSON object + */ + GetJSONWebKeysRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJSONWebKeysRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.GetJSONWebKeysRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJSONWebKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetJSONWebKeysRequest"; + }; + + return GetJSONWebKeysRequest; + })(); + + v1beta1.Jwk = (function() { + + /** + * Properties of a Jwk. + * @memberof google.container.v1beta1 + * @interface IJwk + * @property {string|null} [kty] Jwk kty + * @property {string|null} [alg] Jwk alg + * @property {string|null} [use] Jwk use + * @property {string|null} [kid] Jwk kid + * @property {string|null} [n] Jwk n + * @property {string|null} [e] Jwk e + * @property {string|null} [x] Jwk x + * @property {string|null} [y] Jwk y + * @property {string|null} [crv] Jwk crv + */ + + /** + * Constructs a new Jwk. + * @memberof google.container.v1beta1 + * @classdesc Represents a Jwk. + * @implements IJwk + * @constructor + * @param {google.container.v1beta1.IJwk=} [properties] Properties to set + */ + function Jwk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Jwk kty. + * @member {string} kty + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.kty = ""; + + /** + * Jwk alg. + * @member {string} alg + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.alg = ""; + + /** + * Jwk use. + * @member {string} use + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.use = ""; + + /** + * Jwk kid. + * @member {string} kid + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.kid = ""; + + /** + * Jwk n. + * @member {string} n + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.n = ""; + + /** + * Jwk e. + * @member {string} e + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.e = ""; + + /** + * Jwk x. + * @member {string} x + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.x = ""; + + /** + * Jwk y. + * @member {string} y + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.y = ""; + + /** + * Jwk crv. + * @member {string} crv + * @memberof google.container.v1beta1.Jwk + * @instance + */ + Jwk.prototype.crv = ""; + + /** + * Creates a new Jwk instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Jwk + * @static + * @param {google.container.v1beta1.IJwk=} [properties] Properties to set + * @returns {google.container.v1beta1.Jwk} Jwk instance + */ + Jwk.create = function create(properties) { + return new Jwk(properties); + }; + + /** + * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Jwk + * @static + * @param {google.container.v1beta1.IJwk} message Jwk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kty != null && Object.hasOwnProperty.call(message, "kty")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kty); + if (message.alg != null && Object.hasOwnProperty.call(message, "alg")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.alg); + if (message.use != null && Object.hasOwnProperty.call(message, "use")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.use); + if (message.kid != null && Object.hasOwnProperty.call(message, "kid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kid); + if (message.n != null && Object.hasOwnProperty.call(message, "n")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.n); + if (message.e != null && Object.hasOwnProperty.call(message, "e")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.e); + if (message.x != null && Object.hasOwnProperty.call(message, "x")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.x); + if (message.y != null && Object.hasOwnProperty.call(message, "y")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.y); + if (message.crv != null && Object.hasOwnProperty.call(message, "crv")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.crv); + return writer; + }; + + /** + * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Jwk + * @static + * @param {google.container.v1beta1.IJwk} message Jwk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Jwk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Jwk message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Jwk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Jwk} Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Jwk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kty = reader.string(); + break; + } + case 2: { + message.alg = reader.string(); + break; + } + case 3: { + message.use = reader.string(); + break; + } + case 4: { + message.kid = reader.string(); + break; + } + case 5: { + message.n = reader.string(); + break; + } + case 6: { + message.e = reader.string(); + break; + } + case 7: { + message.x = reader.string(); + break; + } + case 8: { + message.y = reader.string(); + break; + } + case 9: { + message.crv = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Jwk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Jwk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Jwk} Jwk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Jwk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Jwk message. + * @function verify + * @memberof google.container.v1beta1.Jwk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Jwk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kty != null && message.hasOwnProperty("kty")) + if (!$util.isString(message.kty)) + return "kty: string expected"; + if (message.alg != null && message.hasOwnProperty("alg")) + if (!$util.isString(message.alg)) + return "alg: string expected"; + if (message.use != null && message.hasOwnProperty("use")) + if (!$util.isString(message.use)) + return "use: string expected"; + if (message.kid != null && message.hasOwnProperty("kid")) + if (!$util.isString(message.kid)) + return "kid: string expected"; + if (message.n != null && message.hasOwnProperty("n")) + if (!$util.isString(message.n)) + return "n: string expected"; + if (message.e != null && message.hasOwnProperty("e")) + if (!$util.isString(message.e)) + return "e: string expected"; + if (message.x != null && message.hasOwnProperty("x")) + if (!$util.isString(message.x)) + return "x: string expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (!$util.isString(message.y)) + return "y: string expected"; + if (message.crv != null && message.hasOwnProperty("crv")) + if (!$util.isString(message.crv)) + return "crv: string expected"; + return null; + }; + + /** + * Creates a Jwk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Jwk + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Jwk} Jwk + */ + Jwk.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Jwk) + return object; + var message = new $root.google.container.v1beta1.Jwk(); + if (object.kty != null) + message.kty = String(object.kty); + if (object.alg != null) + message.alg = String(object.alg); + if (object.use != null) + message.use = String(object.use); + if (object.kid != null) + message.kid = String(object.kid); + if (object.n != null) + message.n = String(object.n); + if (object.e != null) + message.e = String(object.e); + if (object.x != null) + message.x = String(object.x); + if (object.y != null) + message.y = String(object.y); + if (object.crv != null) + message.crv = String(object.crv); + return message; + }; + + /** + * Creates a plain object from a Jwk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Jwk + * @static + * @param {google.container.v1beta1.Jwk} message Jwk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Jwk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kty = ""; + object.alg = ""; + object.use = ""; + object.kid = ""; + object.n = ""; + object.e = ""; + object.x = ""; + object.y = ""; + object.crv = ""; + } + if (message.kty != null && message.hasOwnProperty("kty")) + object.kty = message.kty; + if (message.alg != null && message.hasOwnProperty("alg")) + object.alg = message.alg; + if (message.use != null && message.hasOwnProperty("use")) + object.use = message.use; + if (message.kid != null && message.hasOwnProperty("kid")) + object.kid = message.kid; + if (message.n != null && message.hasOwnProperty("n")) + object.n = message.n; + if (message.e != null && message.hasOwnProperty("e")) + object.e = message.e; + if (message.x != null && message.hasOwnProperty("x")) + object.x = message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = message.y; + if (message.crv != null && message.hasOwnProperty("crv")) + object.crv = message.crv; + return object; + }; + + /** + * Converts this Jwk to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Jwk + * @instance + * @returns {Object.} JSON object + */ + Jwk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Jwk + * @function getTypeUrl + * @memberof google.container.v1beta1.Jwk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Jwk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Jwk"; + }; + + return Jwk; + })(); + + v1beta1.GetJSONWebKeysResponse = (function() { + + /** + * Properties of a GetJSONWebKeysResponse. + * @memberof google.container.v1beta1 + * @interface IGetJSONWebKeysResponse + * @property {Array.|null} [keys] GetJSONWebKeysResponse keys + */ + + /** + * Constructs a new GetJSONWebKeysResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a GetJSONWebKeysResponse. + * @implements IGetJSONWebKeysResponse + * @constructor + * @param {google.container.v1beta1.IGetJSONWebKeysResponse=} [properties] Properties to set + */ + function GetJSONWebKeysResponse(properties) { + this.keys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJSONWebKeysResponse keys. + * @member {Array.} keys + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @instance + */ + GetJSONWebKeysResponse.prototype.keys = $util.emptyArray; + + /** + * Creates a new GetJSONWebKeysResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse instance + */ + GetJSONWebKeysResponse.create = function create(properties) { + return new GetJSONWebKeysResponse(properties); + }; + + /** + * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.google.container.v1beta1.Jwk.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1beta1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJSONWebKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetJSONWebKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.google.container.v1beta1.Jwk.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJSONWebKeysResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJSONWebKeysResponse message. + * @function verify + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJSONWebKeysResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.google.container.v1beta1.Jwk.verify(message.keys[i]); + if (error) + return "keys." + error; + } + } + return null; + }; + + /** + * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse + */ + GetJSONWebKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GetJSONWebKeysResponse) + return object; + var message = new $root.google.container.v1beta1.GetJSONWebKeysResponse(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".google.container.v1beta1.GetJSONWebKeysResponse.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".google.container.v1beta1.GetJSONWebKeysResponse.keys: object expected"); + message.keys[i] = $root.google.container.v1beta1.Jwk.fromObject(object.keys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {google.container.v1beta1.GetJSONWebKeysResponse} message GetJSONWebKeysResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJSONWebKeysResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keys = []; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.google.container.v1beta1.Jwk.toObject(message.keys[j], options); + } + return object; + }; + + /** + * Converts this GetJSONWebKeysResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @instance + * @returns {Object.} JSON object + */ + GetJSONWebKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJSONWebKeysResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.GetJSONWebKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJSONWebKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GetJSONWebKeysResponse"; + }; + + return GetJSONWebKeysResponse; + })(); + + v1beta1.CheckAutopilotCompatibilityRequest = (function() { + + /** + * Properties of a CheckAutopilotCompatibilityRequest. + * @memberof google.container.v1beta1 + * @interface ICheckAutopilotCompatibilityRequest + * @property {string|null} [name] CheckAutopilotCompatibilityRequest name + */ + + /** + * Constructs a new CheckAutopilotCompatibilityRequest. + * @memberof google.container.v1beta1 + * @classdesc Represents a CheckAutopilotCompatibilityRequest. + * @implements ICheckAutopilotCompatibilityRequest + * @constructor + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set + */ + function CheckAutopilotCompatibilityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAutopilotCompatibilityRequest name. + * @member {string} name + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @instance + */ + CheckAutopilotCompatibilityRequest.prototype.name = ""; + + /** + * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest instance + */ + CheckAutopilotCompatibilityRequest.create = function create(properties) { + return new CheckAutopilotCompatibilityRequest(properties); + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest(); + 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 CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAutopilotCompatibilityRequest message. + * @function verify + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest + */ + CheckAutopilotCompatibilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest) + return object; + var message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {google.container.v1beta1.CheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @instance + * @returns {Object.} JSON object + */ + CheckAutopilotCompatibilityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityRequest + * @function getTypeUrl + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAutopilotCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CheckAutopilotCompatibilityRequest"; + }; + + return CheckAutopilotCompatibilityRequest; + })(); + + v1beta1.AutopilotCompatibilityIssue = (function() { + + /** + * Properties of an AutopilotCompatibilityIssue. + * @memberof google.container.v1beta1 + * @interface IAutopilotCompatibilityIssue + * @property {google.protobuf.ITimestamp|null} [lastObservation] AutopilotCompatibilityIssue lastObservation + * @property {string|null} [constraintType] AutopilotCompatibilityIssue constraintType + * @property {google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|null} [incompatibilityType] AutopilotCompatibilityIssue incompatibilityType + * @property {Array.|null} [subjects] AutopilotCompatibilityIssue subjects + * @property {string|null} [documentationUrl] AutopilotCompatibilityIssue documentationUrl + * @property {string|null} [description] AutopilotCompatibilityIssue description + */ + + /** + * Constructs a new AutopilotCompatibilityIssue. + * @memberof google.container.v1beta1 + * @classdesc Represents an AutopilotCompatibilityIssue. + * @implements IAutopilotCompatibilityIssue + * @constructor + * @param {google.container.v1beta1.IAutopilotCompatibilityIssue=} [properties] Properties to set + */ + function AutopilotCompatibilityIssue(properties) { + this.subjects = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutopilotCompatibilityIssue lastObservation. + * @member {google.protobuf.ITimestamp|null|undefined} lastObservation + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.lastObservation = null; + + /** + * AutopilotCompatibilityIssue constraintType. + * @member {string} constraintType + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.constraintType = ""; + + /** + * AutopilotCompatibilityIssue incompatibilityType. + * @member {google.container.v1beta1.AutopilotCompatibilityIssue.IssueType} incompatibilityType + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.incompatibilityType = 0; + + /** + * AutopilotCompatibilityIssue subjects. + * @member {Array.} subjects + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.subjects = $util.emptyArray; + + /** + * AutopilotCompatibilityIssue documentationUrl. + * @member {string} documentationUrl + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.documentationUrl = ""; + + /** + * AutopilotCompatibilityIssue description. + * @member {string} description + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + */ + AutopilotCompatibilityIssue.prototype.description = ""; + + /** + * Creates a new AutopilotCompatibilityIssue instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1beta1.IAutopilotCompatibilityIssue=} [properties] Properties to set + * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue instance + */ + AutopilotCompatibilityIssue.create = function create(properties) { + return new AutopilotCompatibilityIssue(properties); + }; + + /** + * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1beta1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotCompatibilityIssue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastObservation != null && Object.hasOwnProperty.call(message, "lastObservation")) + $root.google.protobuf.Timestamp.encode(message.lastObservation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.constraintType); + if (message.incompatibilityType != null && Object.hasOwnProperty.call(message, "incompatibilityType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.incompatibilityType); + if (message.subjects != null && message.subjects.length) + for (var i = 0; i < message.subjects.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjects[i]); + if (message.documentationUrl != null && Object.hasOwnProperty.call(message, "documentationUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.documentationUrl); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + return writer; + }; + + /** + * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1beta1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotCompatibilityIssue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotCompatibilityIssue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutopilotCompatibilityIssue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastObservation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.constraintType = reader.string(); + break; + } + case 3: { + message.incompatibilityType = reader.int32(); + break; + } + case 4: { + if (!(message.subjects && message.subjects.length)) + message.subjects = []; + message.subjects.push(reader.string()); + break; + } + case 5: { + message.documentationUrl = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotCompatibilityIssue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutopilotCompatibilityIssue message. + * @function verify + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutopilotCompatibilityIssue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastObservation); + if (error) + return "lastObservation." + error; + } + if (message.constraintType != null && message.hasOwnProperty("constraintType")) + if (!$util.isString(message.constraintType)) + return "constraintType: string expected"; + if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) + switch (message.incompatibilityType) { + default: + return "incompatibilityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.subjects != null && message.hasOwnProperty("subjects")) { + if (!Array.isArray(message.subjects)) + return "subjects: array expected"; + for (var i = 0; i < message.subjects.length; ++i) + if (!$util.isString(message.subjects[i])) + return "subjects: string[] expected"; + } + if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) + if (!$util.isString(message.documentationUrl)) + return "documentationUrl: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue + */ + AutopilotCompatibilityIssue.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AutopilotCompatibilityIssue) + return object; + var message = new $root.google.container.v1beta1.AutopilotCompatibilityIssue(); + if (object.lastObservation != null) { + if (typeof object.lastObservation !== "object") + throw TypeError(".google.container.v1beta1.AutopilotCompatibilityIssue.lastObservation: object expected"); + message.lastObservation = $root.google.protobuf.Timestamp.fromObject(object.lastObservation); + } + if (object.constraintType != null) + message.constraintType = String(object.constraintType); + switch (object.incompatibilityType) { + default: + if (typeof object.incompatibilityType === "number") { + message.incompatibilityType = object.incompatibilityType; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.incompatibilityType = 0; + break; + case "INCOMPATIBILITY": + case 1: + message.incompatibilityType = 1; + break; + case "ADDITIONAL_CONFIG_REQUIRED": + case 2: + message.incompatibilityType = 2; + break; + case "PASSED_WITH_OPTIONAL_CONFIG": + case 3: + message.incompatibilityType = 3; + break; + } + if (object.subjects) { + if (!Array.isArray(object.subjects)) + throw TypeError(".google.container.v1beta1.AutopilotCompatibilityIssue.subjects: array expected"); + message.subjects = []; + for (var i = 0; i < object.subjects.length; ++i) + message.subjects[i] = String(object.subjects[i]); + } + if (object.documentationUrl != null) + message.documentationUrl = String(object.documentationUrl); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {google.container.v1beta1.AutopilotCompatibilityIssue} message AutopilotCompatibilityIssue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutopilotCompatibilityIssue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subjects = []; + if (options.defaults) { + object.lastObservation = null; + object.constraintType = ""; + object.incompatibilityType = options.enums === String ? "UNSPECIFIED" : 0; + object.documentationUrl = ""; + object.description = ""; + } + if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) + object.lastObservation = $root.google.protobuf.Timestamp.toObject(message.lastObservation, options); + if (message.constraintType != null && message.hasOwnProperty("constraintType")) + object.constraintType = message.constraintType; + if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) + object.incompatibilityType = options.enums === String ? $root.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] === undefined ? message.incompatibilityType : $root.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] : message.incompatibilityType; + if (message.subjects && message.subjects.length) { + object.subjects = []; + for (var j = 0; j < message.subjects.length; ++j) + object.subjects[j] = message.subjects[j]; + } + if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) + object.documentationUrl = message.documentationUrl; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AutopilotCompatibilityIssue to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @instance + * @returns {Object.} JSON object + */ + AutopilotCompatibilityIssue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutopilotCompatibilityIssue + * @function getTypeUrl + * @memberof google.container.v1beta1.AutopilotCompatibilityIssue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutopilotCompatibilityIssue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AutopilotCompatibilityIssue"; + }; + + /** + * IssueType enum. + * @name google.container.v1beta1.AutopilotCompatibilityIssue.IssueType + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} INCOMPATIBILITY=1 INCOMPATIBILITY value + * @property {number} ADDITIONAL_CONFIG_REQUIRED=2 ADDITIONAL_CONFIG_REQUIRED value + * @property {number} PASSED_WITH_OPTIONAL_CONFIG=3 PASSED_WITH_OPTIONAL_CONFIG value + */ + AutopilotCompatibilityIssue.IssueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBILITY"] = 1; + values[valuesById[2] = "ADDITIONAL_CONFIG_REQUIRED"] = 2; + values[valuesById[3] = "PASSED_WITH_OPTIONAL_CONFIG"] = 3; + return values; + })(); + + return AutopilotCompatibilityIssue; + })(); + + v1beta1.CheckAutopilotCompatibilityResponse = (function() { + + /** + * Properties of a CheckAutopilotCompatibilityResponse. + * @memberof google.container.v1beta1 + * @interface ICheckAutopilotCompatibilityResponse + * @property {Array.|null} [issues] CheckAutopilotCompatibilityResponse issues + * @property {string|null} [summary] CheckAutopilotCompatibilityResponse summary + */ + + /** + * Constructs a new CheckAutopilotCompatibilityResponse. + * @memberof google.container.v1beta1 + * @classdesc Represents a CheckAutopilotCompatibilityResponse. + * @implements ICheckAutopilotCompatibilityResponse + * @constructor + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set + */ + function CheckAutopilotCompatibilityResponse(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAutopilotCompatibilityResponse issues. + * @member {Array.} issues + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @instance + */ + CheckAutopilotCompatibilityResponse.prototype.issues = $util.emptyArray; + + /** + * CheckAutopilotCompatibilityResponse summary. + * @member {string} summary + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @instance + */ + CheckAutopilotCompatibilityResponse.prototype.summary = ""; + + /** + * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse instance + */ + CheckAutopilotCompatibilityResponse.create = function create(properties) { + return new CheckAutopilotCompatibilityResponse(properties); + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.container.v1beta1.AutopilotCompatibilityIssue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); + return writer; + }; + + /** + * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAutopilotCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.container.v1beta1.AutopilotCompatibilityIssue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.summary = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckAutopilotCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckAutopilotCompatibilityResponse message. + * @function verify + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckAutopilotCompatibilityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.container.v1beta1.AutopilotCompatibilityIssue.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; + + /** + * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse + */ + CheckAutopilotCompatibilityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse) + return object; + var message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse(); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.container.v1beta1.CheckAutopilotCompatibilityResponse.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.container.v1beta1.CheckAutopilotCompatibilityResponse.issues: object expected"); + message.issues[i] = $root.google.container.v1beta1.AutopilotCompatibilityIssue.fromObject(object.issues[i]); + } + } + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; + + /** + * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {google.container.v1beta1.CheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckAutopilotCompatibilityResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (options.defaults) + object.summary = ""; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.container.v1beta1.AutopilotCompatibilityIssue.toObject(message.issues[j], options); + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + return object; + }; + + /** + * Converts this CheckAutopilotCompatibilityResponse to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @instance + * @returns {Object.} JSON object + */ + CheckAutopilotCompatibilityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckAutopilotCompatibilityResponse + * @function getTypeUrl + * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckAutopilotCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CheckAutopilotCompatibilityResponse"; + }; + + return CheckAutopilotCompatibilityResponse; + })(); + + v1beta1.ReleaseChannel = (function() { + + /** + * Properties of a ReleaseChannel. + * @memberof google.container.v1beta1 + * @interface IReleaseChannel + * @property {google.container.v1beta1.ReleaseChannel.Channel|null} [channel] ReleaseChannel channel + */ + + /** + * Constructs a new ReleaseChannel. + * @memberof google.container.v1beta1 + * @classdesc Represents a ReleaseChannel. + * @implements IReleaseChannel + * @constructor + * @param {google.container.v1beta1.IReleaseChannel=} [properties] Properties to set + */ + function ReleaseChannel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseChannel channel. + * @member {google.container.v1beta1.ReleaseChannel.Channel} channel + * @memberof google.container.v1beta1.ReleaseChannel + * @instance + */ + ReleaseChannel.prototype.channel = 0; + + /** + * Creates a new ReleaseChannel instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {google.container.v1beta1.IReleaseChannel=} [properties] Properties to set + * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel instance + */ + ReleaseChannel.create = function create(properties) { + return new ReleaseChannel(properties); + }; + + /** + * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {google.container.v1beta1.IReleaseChannel} message ReleaseChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); + return writer; + }; + + /** + * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {google.container.v1beta1.IReleaseChannel} message ReleaseChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseChannel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ReleaseChannel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseChannel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseChannel message. + * @function verify + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseChannel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel + */ + ReleaseChannel.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ReleaseChannel) + return object; + var message = new $root.google.container.v1beta1.ReleaseChannel(); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "UNSPECIFIED": + case 0: + message.channel = 0; + break; + case "RAPID": + case 1: + message.channel = 1; + break; + case "REGULAR": + case 2: + message.channel = 2; + break; + case "STABLE": + case 3: + message.channel = 3; + break; + case "EXTENDED": + case 4: + message.channel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {google.container.v1beta1.ReleaseChannel} message ReleaseChannel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseChannel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = options.enums === String ? "UNSPECIFIED" : 0; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] : message.channel; + return object; + }; + + /** + * Converts this ReleaseChannel to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ReleaseChannel + * @instance + * @returns {Object.} JSON object + */ + ReleaseChannel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseChannel + * @function getTypeUrl + * @memberof google.container.v1beta1.ReleaseChannel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseChannel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ReleaseChannel"; + }; + + /** + * Channel enum. + * @name google.container.v1beta1.ReleaseChannel.Channel + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} RAPID=1 RAPID value + * @property {number} REGULAR=2 REGULAR value + * @property {number} STABLE=3 STABLE value + * @property {number} EXTENDED=4 EXTENDED value + */ + ReleaseChannel.Channel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "RAPID"] = 1; + values[valuesById[2] = "REGULAR"] = 2; + values[valuesById[3] = "STABLE"] = 3; + values[valuesById[4] = "EXTENDED"] = 4; + return values; + })(); + + return ReleaseChannel; + })(); + + v1beta1.CostManagementConfig = (function() { + + /** + * Properties of a CostManagementConfig. + * @memberof google.container.v1beta1 + * @interface ICostManagementConfig + * @property {boolean|null} [enabled] CostManagementConfig enabled + */ + + /** + * Constructs a new CostManagementConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a CostManagementConfig. + * @implements ICostManagementConfig + * @constructor + * @param {google.container.v1beta1.ICostManagementConfig=} [properties] Properties to set + */ + function CostManagementConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CostManagementConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.CostManagementConfig + * @instance + */ + CostManagementConfig.prototype.enabled = false; + + /** + * Creates a new CostManagementConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {google.container.v1beta1.ICostManagementConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig instance + */ + CostManagementConfig.create = function create(properties) { + return new CostManagementConfig(properties); + }; + + /** + * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {google.container.v1beta1.ICostManagementConfig} message CostManagementConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CostManagementConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {google.container.v1beta1.ICostManagementConfig} message CostManagementConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CostManagementConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CostManagementConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CostManagementConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CostManagementConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CostManagementConfig message. + * @function verify + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CostManagementConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig + */ + CostManagementConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.CostManagementConfig) + return object; + var message = new $root.google.container.v1beta1.CostManagementConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {google.container.v1beta1.CostManagementConfig} message CostManagementConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CostManagementConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this CostManagementConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.CostManagementConfig + * @instance + * @returns {Object.} JSON object + */ + CostManagementConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CostManagementConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.CostManagementConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CostManagementConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.CostManagementConfig"; + }; + + return CostManagementConfig; + })(); + + v1beta1.TpuConfig = (function() { + + /** + * Properties of a TpuConfig. + * @memberof google.container.v1beta1 + * @interface ITpuConfig + * @property {boolean|null} [enabled] TpuConfig enabled + * @property {boolean|null} [useServiceNetworking] TpuConfig useServiceNetworking + * @property {string|null} [ipv4CidrBlock] TpuConfig ipv4CidrBlock + */ + + /** + * Constructs a new TpuConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a TpuConfig. + * @implements ITpuConfig + * @constructor + * @param {google.container.v1beta1.ITpuConfig=} [properties] Properties to set + */ + function TpuConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TpuConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.TpuConfig + * @instance + */ + TpuConfig.prototype.enabled = false; + + /** + * TpuConfig useServiceNetworking. + * @member {boolean} useServiceNetworking + * @memberof google.container.v1beta1.TpuConfig + * @instance + */ + TpuConfig.prototype.useServiceNetworking = false; + + /** + * TpuConfig ipv4CidrBlock. + * @member {string} ipv4CidrBlock + * @memberof google.container.v1beta1.TpuConfig + * @instance + */ + TpuConfig.prototype.ipv4CidrBlock = ""; + + /** + * Creates a new TpuConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {google.container.v1beta1.ITpuConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.TpuConfig} TpuConfig instance + */ + TpuConfig.create = function create(properties) { + return new TpuConfig(properties); + }; + + /** + * Encodes the specified TpuConfig message. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {google.container.v1beta1.ITpuConfig} message TpuConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpuConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.useServiceNetworking != null && Object.hasOwnProperty.call(message, "useServiceNetworking")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useServiceNetworking); + if (message.ipv4CidrBlock != null && Object.hasOwnProperty.call(message, "ipv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified TpuConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {google.container.v1beta1.ITpuConfig} message TpuConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpuConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TpuConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.TpuConfig} TpuConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpuConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.TpuConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.useServiceNetworking = reader.bool(); + break; + } + case 3: { + message.ipv4CidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TpuConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.TpuConfig} TpuConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpuConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TpuConfig message. + * @function verify + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TpuConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.useServiceNetworking != null && message.hasOwnProperty("useServiceNetworking")) + if (typeof message.useServiceNetworking !== "boolean") + return "useServiceNetworking: boolean expected"; + if (message.ipv4CidrBlock != null && message.hasOwnProperty("ipv4CidrBlock")) + if (!$util.isString(message.ipv4CidrBlock)) + return "ipv4CidrBlock: string expected"; + return null; + }; + + /** + * Creates a TpuConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.TpuConfig} TpuConfig + */ + TpuConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.TpuConfig) + return object; + var message = new $root.google.container.v1beta1.TpuConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.useServiceNetworking != null) + message.useServiceNetworking = Boolean(object.useServiceNetworking); + if (object.ipv4CidrBlock != null) + message.ipv4CidrBlock = String(object.ipv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a TpuConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {google.container.v1beta1.TpuConfig} message TpuConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TpuConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.useServiceNetworking = false; + object.ipv4CidrBlock = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.useServiceNetworking != null && message.hasOwnProperty("useServiceNetworking")) + object.useServiceNetworking = message.useServiceNetworking; + if (message.ipv4CidrBlock != null && message.hasOwnProperty("ipv4CidrBlock")) + object.ipv4CidrBlock = message.ipv4CidrBlock; + return object; + }; + + /** + * Converts this TpuConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.TpuConfig + * @instance + * @returns {Object.} JSON object + */ + TpuConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TpuConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.TpuConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TpuConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.TpuConfig"; + }; + + return TpuConfig; + })(); + + /** + * PrivateIPv6GoogleAccess enum. + * @name google.container.v1beta1.PrivateIPv6GoogleAccess + * @enum {number} + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED=1 PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE=2 PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE value + * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL=3 PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL value + */ + v1beta1.PrivateIPv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED"] = 1; + values[valuesById[2] = "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL"] = 3; + return values; + })(); + + v1beta1.Master = (function() { + + /** + * Properties of a Master. + * @memberof google.container.v1beta1 + * @interface IMaster + */ + + /** + * Constructs a new Master. + * @memberof google.container.v1beta1 + * @classdesc Represents a Master. + * @implements IMaster + * @constructor + * @param {google.container.v1beta1.IMaster=} [properties] Properties to set + */ + function Master(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Master instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Master + * @static + * @param {google.container.v1beta1.IMaster=} [properties] Properties to set + * @returns {google.container.v1beta1.Master} Master instance + */ + Master.create = function create(properties) { + return new Master(properties); + }; + + /** + * Encodes the specified Master message. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Master + * @static + * @param {google.container.v1beta1.IMaster} message Master message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Master.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Master message, length delimited. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Master + * @static + * @param {google.container.v1beta1.IMaster} message Master message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Master.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Master message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Master + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Master} Master + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Master.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Master(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Master message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Master + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Master} Master + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Master.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Master message. + * @function verify + * @memberof google.container.v1beta1.Master + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Master.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Master message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Master + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Master} Master + */ + Master.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Master) + return object; + return new $root.google.container.v1beta1.Master(); + }; + + /** + * Creates a plain object from a Master message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Master + * @static + * @param {google.container.v1beta1.Master} message Master + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Master.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Master to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Master + * @instance + * @returns {Object.} JSON object + */ + Master.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Master + * @function getTypeUrl + * @memberof google.container.v1beta1.Master + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Master.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Master"; + }; + + return Master; + })(); + + v1beta1.AutopilotConversionStatus = (function() { + + /** + * Properties of an AutopilotConversionStatus. + * @memberof google.container.v1beta1 + * @interface IAutopilotConversionStatus + * @property {google.container.v1beta1.AutopilotConversionStatus.State|null} [state] AutopilotConversionStatus state + */ + + /** + * Constructs a new AutopilotConversionStatus. + * @memberof google.container.v1beta1 + * @classdesc Represents an AutopilotConversionStatus. + * @implements IAutopilotConversionStatus + * @constructor + * @param {google.container.v1beta1.IAutopilotConversionStatus=} [properties] Properties to set + */ + function AutopilotConversionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutopilotConversionStatus state. + * @member {google.container.v1beta1.AutopilotConversionStatus.State} state + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @instance + */ + AutopilotConversionStatus.prototype.state = 0; + + /** + * Creates a new AutopilotConversionStatus instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {google.container.v1beta1.IAutopilotConversionStatus=} [properties] Properties to set + * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus instance + */ + AutopilotConversionStatus.create = function create(properties) { + return new AutopilotConversionStatus(properties); + }; + + /** + * Encodes the specified AutopilotConversionStatus message. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {google.container.v1beta1.IAutopilotConversionStatus} message AutopilotConversionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotConversionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified AutopilotConversionStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {google.container.v1beta1.IAutopilotConversionStatus} message AutopilotConversionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutopilotConversionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutopilotConversionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotConversionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutopilotConversionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutopilotConversionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutopilotConversionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutopilotConversionStatus message. + * @function verify + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutopilotConversionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 5: + break; + } + return null; + }; + + /** + * Creates an AutopilotConversionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus + */ + AutopilotConversionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AutopilotConversionStatus) + return object; + var message = new $root.google.container.v1beta1.AutopilotConversionStatus(); + 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 "DONE": + case 5: + message.state = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from an AutopilotConversionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {google.container.v1beta1.AutopilotConversionStatus} message AutopilotConversionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutopilotConversionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.container.v1beta1.AutopilotConversionStatus.State[message.state] === undefined ? message.state : $root.google.container.v1beta1.AutopilotConversionStatus.State[message.state] : message.state; + return object; + }; + + /** + * Converts this AutopilotConversionStatus to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @instance + * @returns {Object.} JSON object + */ + AutopilotConversionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutopilotConversionStatus + * @function getTypeUrl + * @memberof google.container.v1beta1.AutopilotConversionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutopilotConversionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AutopilotConversionStatus"; + }; + + /** + * State enum. + * @name google.container.v1beta1.AutopilotConversionStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DONE=5 DONE value + */ + AutopilotConversionStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[5] = "DONE"] = 5; + return values; + })(); + + return AutopilotConversionStatus; + })(); + + v1beta1.Autopilot = (function() { + + /** + * Properties of an Autopilot. + * @memberof google.container.v1beta1 + * @interface IAutopilot + * @property {boolean|null} [enabled] Autopilot enabled + * @property {google.container.v1beta1.IWorkloadPolicyConfig|null} [workloadPolicyConfig] Autopilot workloadPolicyConfig + * @property {google.container.v1beta1.IAutopilotConversionStatus|null} [conversionStatus] Autopilot conversionStatus + */ + + /** + * Constructs a new Autopilot. + * @memberof google.container.v1beta1 + * @classdesc Represents an Autopilot. + * @implements IAutopilot + * @constructor + * @param {google.container.v1beta1.IAutopilot=} [properties] Properties to set + */ + function Autopilot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Autopilot enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.Autopilot + * @instance + */ + Autopilot.prototype.enabled = false; + + /** + * Autopilot workloadPolicyConfig. + * @member {google.container.v1beta1.IWorkloadPolicyConfig|null|undefined} workloadPolicyConfig + * @memberof google.container.v1beta1.Autopilot + * @instance + */ + Autopilot.prototype.workloadPolicyConfig = null; + + /** + * Autopilot conversionStatus. + * @member {google.container.v1beta1.IAutopilotConversionStatus|null|undefined} conversionStatus + * @memberof google.container.v1beta1.Autopilot + * @instance + */ + Autopilot.prototype.conversionStatus = null; + + /** + * Creates a new Autopilot instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {google.container.v1beta1.IAutopilot=} [properties] Properties to set + * @returns {google.container.v1beta1.Autopilot} Autopilot instance + */ + Autopilot.create = function create(properties) { + return new Autopilot(properties); + }; + + /** + * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {google.container.v1beta1.IAutopilot} message Autopilot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Autopilot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.workloadPolicyConfig != null && Object.hasOwnProperty.call(message, "workloadPolicyConfig")) + $root.google.container.v1beta1.WorkloadPolicyConfig.encode(message.workloadPolicyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversionStatus != null && Object.hasOwnProperty.call(message, "conversionStatus")) + $root.google.container.v1beta1.AutopilotConversionStatus.encode(message.conversionStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {google.container.v1beta1.IAutopilot} message Autopilot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Autopilot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Autopilot message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Autopilot} Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Autopilot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Autopilot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Autopilot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Autopilot} Autopilot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Autopilot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Autopilot message. + * @function verify + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Autopilot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) { + var error = $root.google.container.v1beta1.WorkloadPolicyConfig.verify(message.workloadPolicyConfig); + if (error) + return "workloadPolicyConfig." + error; + } + if (message.conversionStatus != null && message.hasOwnProperty("conversionStatus")) { + var error = $root.google.container.v1beta1.AutopilotConversionStatus.verify(message.conversionStatus); + if (error) + return "conversionStatus." + error; + } + return null; + }; + + /** + * Creates an Autopilot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Autopilot} Autopilot + */ + Autopilot.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Autopilot) + return object; + var message = new $root.google.container.v1beta1.Autopilot(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.workloadPolicyConfig != null) { + if (typeof object.workloadPolicyConfig !== "object") + throw TypeError(".google.container.v1beta1.Autopilot.workloadPolicyConfig: object expected"); + message.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.fromObject(object.workloadPolicyConfig); + } + if (object.conversionStatus != null) { + if (typeof object.conversionStatus !== "object") + throw TypeError(".google.container.v1beta1.Autopilot.conversionStatus: object expected"); + message.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.fromObject(object.conversionStatus); + } + return message; + }; + + /** + * Creates a plain object from an Autopilot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {google.container.v1beta1.Autopilot} message Autopilot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Autopilot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.workloadPolicyConfig = null; + object.conversionStatus = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) + object.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.toObject(message.workloadPolicyConfig, options); + if (message.conversionStatus != null && message.hasOwnProperty("conversionStatus")) + object.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.toObject(message.conversionStatus, options); + return object; + }; + + /** + * Converts this Autopilot to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Autopilot + * @instance + * @returns {Object.} JSON object + */ + Autopilot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Autopilot + * @function getTypeUrl + * @memberof google.container.v1beta1.Autopilot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Autopilot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Autopilot"; + }; + + return Autopilot; + })(); + + v1beta1.WorkloadPolicyConfig = (function() { + + /** + * Properties of a WorkloadPolicyConfig. + * @memberof google.container.v1beta1 + * @interface IWorkloadPolicyConfig + * @property {boolean|null} [allowNetAdmin] WorkloadPolicyConfig allowNetAdmin + */ + + /** + * Constructs a new WorkloadPolicyConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a WorkloadPolicyConfig. + * @implements IWorkloadPolicyConfig + * @constructor + * @param {google.container.v1beta1.IWorkloadPolicyConfig=} [properties] Properties to set + */ + function WorkloadPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadPolicyConfig allowNetAdmin. + * @member {boolean|null|undefined} allowNetAdmin + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @instance + */ + WorkloadPolicyConfig.prototype.allowNetAdmin = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WorkloadPolicyConfig _allowNetAdmin. + * @member {"allowNetAdmin"|undefined} _allowNetAdmin + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @instance + */ + Object.defineProperty(WorkloadPolicyConfig.prototype, "_allowNetAdmin", { + get: $util.oneOfGetter($oneOfFields = ["allowNetAdmin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WorkloadPolicyConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {google.container.v1beta1.IWorkloadPolicyConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig instance + */ + WorkloadPolicyConfig.create = function create(properties) { + return new WorkloadPolicyConfig(properties); + }; + + /** + * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {google.container.v1beta1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowNetAdmin != null && Object.hasOwnProperty.call(message, "allowNetAdmin")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowNetAdmin); + return writer; + }; + + /** + * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {google.container.v1beta1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowNetAdmin = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadPolicyConfig message. + * @function verify + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { + properties._allowNetAdmin = 1; + if (typeof message.allowNetAdmin !== "boolean") + return "allowNetAdmin: boolean expected"; + } + return null; + }; + + /** + * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig + */ + WorkloadPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.WorkloadPolicyConfig) + return object; + var message = new $root.google.container.v1beta1.WorkloadPolicyConfig(); + if (object.allowNetAdmin != null) + message.allowNetAdmin = Boolean(object.allowNetAdmin); + return message; + }; + + /** + * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {google.container.v1beta1.WorkloadPolicyConfig} message WorkloadPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { + object.allowNetAdmin = message.allowNetAdmin; + if (options.oneofs) + object._allowNetAdmin = "allowNetAdmin"; + } + return object; + }; + + /** + * Converts this WorkloadPolicyConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadPolicyConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.WorkloadPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.WorkloadPolicyConfig"; + }; + + return WorkloadPolicyConfig; + })(); + + v1beta1.NotificationConfig = (function() { + + /** + * Properties of a NotificationConfig. + * @memberof google.container.v1beta1 + * @interface INotificationConfig + * @property {google.container.v1beta1.NotificationConfig.IPubSub|null} [pubsub] NotificationConfig pubsub + */ + + /** + * Constructs a new NotificationConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig + * @constructor + * @param {google.container.v1beta1.INotificationConfig=} [properties] Properties to set + */ + function NotificationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationConfig pubsub. + * @member {google.container.v1beta1.NotificationConfig.IPubSub|null|undefined} pubsub + * @memberof google.container.v1beta1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.pubsub = null; + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {google.container.v1beta1.INotificationConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig instance + */ + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); + }; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {google.container.v1beta1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) + $root.google.container.v1beta1.NotificationConfig.PubSub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {google.container.v1beta1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationConfig message. + * @function verify + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) { + var error = $root.google.container.v1beta1.NotificationConfig.PubSub.verify(message.pubsub); + if (error) + return "pubsub." + error; + } + return null; + }; + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig + */ + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NotificationConfig) + return object; + var message = new $root.google.container.v1beta1.NotificationConfig(); + if (object.pubsub != null) { + if (typeof object.pubsub !== "object") + throw TypeError(".google.container.v1beta1.NotificationConfig.pubsub: object expected"); + message.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.fromObject(object.pubsub); + } + return message; + }; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {google.container.v1beta1.NotificationConfig} message NotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pubsub = null; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) + object.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.toObject(message.pubsub, options); + return object; + }; + + /** + * Converts this NotificationConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NotificationConfig + * @instance + * @returns {Object.} JSON object + */ + NotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig"; + }; + + /** + * EventType enum. + * @name google.container.v1beta1.NotificationConfig.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} UPGRADE_AVAILABLE_EVENT=1 UPGRADE_AVAILABLE_EVENT value + * @property {number} UPGRADE_EVENT=2 UPGRADE_EVENT value + * @property {number} SECURITY_BULLETIN_EVENT=3 SECURITY_BULLETIN_EVENT value + */ + NotificationConfig.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPGRADE_AVAILABLE_EVENT"] = 1; + values[valuesById[2] = "UPGRADE_EVENT"] = 2; + values[valuesById[3] = "SECURITY_BULLETIN_EVENT"] = 3; + return values; + })(); + + NotificationConfig.PubSub = (function() { + + /** + * Properties of a PubSub. + * @memberof google.container.v1beta1.NotificationConfig + * @interface IPubSub + * @property {boolean|null} [enabled] PubSub enabled + * @property {string|null} [topic] PubSub topic + * @property {google.container.v1beta1.NotificationConfig.IFilter|null} [filter] PubSub filter + */ + + /** + * Constructs a new PubSub. + * @memberof google.container.v1beta1.NotificationConfig + * @classdesc Represents a PubSub. + * @implements IPubSub + * @constructor + * @param {google.container.v1beta1.NotificationConfig.IPubSub=} [properties] Properties to set + */ + function PubSub(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubSub enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.enabled = false; + + /** + * PubSub topic. + * @member {string} topic + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.topic = ""; + + /** + * PubSub filter. + * @member {google.container.v1beta1.NotificationConfig.IFilter|null|undefined} filter + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @instance + */ + PubSub.prototype.filter = null; + + /** + * Creates a new PubSub instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {google.container.v1beta1.NotificationConfig.IPubSub=} [properties] Properties to set + * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub instance + */ + PubSub.create = function create(properties) { + return new PubSub(properties); + }; + + /** + * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {google.container.v1beta1.NotificationConfig.IPubSub} message PubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSub.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.container.v1beta1.NotificationConfig.Filter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {google.container.v1beta1.NotificationConfig.IPubSub} message PubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSub.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSub message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSub.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig.PubSub(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.topic = reader.string(); + break; + } + case 3: { + message.filter = $root.google.container.v1beta1.NotificationConfig.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubSub message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSub.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSub message. + * @function verify + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSub.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.container.v1beta1.NotificationConfig.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + return null; + }; + + /** + * Creates a PubSub message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub + */ + PubSub.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NotificationConfig.PubSub) + return object; + var message = new $root.google.container.v1beta1.NotificationConfig.PubSub(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.topic != null) + message.topic = String(object.topic); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.container.v1beta1.NotificationConfig.PubSub.filter: object expected"); + message.filter = $root.google.container.v1beta1.NotificationConfig.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a PubSub message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {google.container.v1beta1.NotificationConfig.PubSub} message PubSub + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSub.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.topic = ""; + object.filter = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.container.v1beta1.NotificationConfig.Filter.toObject(message.filter, options); + return object; + }; + + /** + * Converts this PubSub to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @instance + * @returns {Object.} JSON object + */ + PubSub.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSub + * @function getTypeUrl + * @memberof google.container.v1beta1.NotificationConfig.PubSub + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig.PubSub"; + }; + + return PubSub; + })(); + + NotificationConfig.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.container.v1beta1.NotificationConfig + * @interface IFilter + * @property {Array.|null} [eventType] Filter eventType + */ + + /** + * Constructs a new Filter. + * @memberof google.container.v1beta1.NotificationConfig + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.container.v1beta1.NotificationConfig.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + this.eventType = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter eventType. + * @member {Array.} eventType + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @instance + */ + Filter.prototype.eventType = $util.emptyArray; + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {google.container.v1beta1.NotificationConfig.IFilter=} [properties] Properties to set + * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {google.container.v1beta1.NotificationConfig.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventType != null && message.eventType.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.eventType.length; ++i) + writer.int32(message.eventType[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {google.container.v1beta1.NotificationConfig.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.eventType && message.eventType.length)) + message.eventType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.eventType.push(reader.int32()); + } else + message.eventType.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventType != null && message.hasOwnProperty("eventType")) { + if (!Array.isArray(message.eventType)) + return "eventType: array expected"; + for (var i = 0; i < message.eventType.length; ++i) + switch (message.eventType[i]) { + default: + return "eventType: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NotificationConfig.Filter) + return object; + var message = new $root.google.container.v1beta1.NotificationConfig.Filter(); + if (object.eventType) { + if (!Array.isArray(object.eventType)) + throw TypeError(".google.container.v1beta1.NotificationConfig.Filter.eventType: array expected"); + message.eventType = []; + for (var i = 0; i < object.eventType.length; ++i) + switch (object.eventType[i]) { + default: + if (typeof object.eventType[i] === "number") { + message.eventType[i] = object.eventType[i]; + break; + } + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.eventType[i] = 0; + break; + case "UPGRADE_AVAILABLE_EVENT": + case 1: + message.eventType[i] = 1; + break; + case "UPGRADE_EVENT": + case 2: + message.eventType[i] = 2; + break; + case "SECURITY_BULLETIN_EVENT": + case 3: + message.eventType[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {google.container.v1beta1.NotificationConfig.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.eventType = []; + if (message.eventType && message.eventType.length) { + object.eventType = []; + for (var j = 0; j < message.eventType.length; ++j) + object.eventType[j] = options.enums === String ? $root.google.container.v1beta1.NotificationConfig.EventType[message.eventType[j]] === undefined ? message.eventType[j] : $root.google.container.v1beta1.NotificationConfig.EventType[message.eventType[j]] : message.eventType[j]; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.container.v1beta1.NotificationConfig.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig.Filter"; + }; + + return Filter; + })(); + + return NotificationConfig; + })(); + + v1beta1.ConfidentialNodes = (function() { + + /** + * Properties of a ConfidentialNodes. + * @memberof google.container.v1beta1 + * @interface IConfidentialNodes + * @property {boolean|null} [enabled] ConfidentialNodes enabled + */ + + /** + * Constructs a new ConfidentialNodes. + * @memberof google.container.v1beta1 + * @classdesc Represents a ConfidentialNodes. + * @implements IConfidentialNodes + * @constructor + * @param {google.container.v1beta1.IConfidentialNodes=} [properties] Properties to set + */ + function ConfidentialNodes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialNodes enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.ConfidentialNodes + * @instance + */ + ConfidentialNodes.prototype.enabled = false; + + /** + * Creates a new ConfidentialNodes instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {google.container.v1beta1.IConfidentialNodes=} [properties] Properties to set + * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes instance + */ + ConfidentialNodes.create = function create(properties) { + return new ConfidentialNodes(properties); + }; + + /** + * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {google.container.v1beta1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialNodes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {google.container.v1beta1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialNodes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialNodes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ConfidentialNodes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialNodes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialNodes message. + * @function verify + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialNodes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes + */ + ConfidentialNodes.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ConfidentialNodes) + return object; + var message = new $root.google.container.v1beta1.ConfidentialNodes(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {google.container.v1beta1.ConfidentialNodes} message ConfidentialNodes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialNodes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ConfidentialNodes to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ConfidentialNodes + * @instance + * @returns {Object.} JSON object + */ + ConfidentialNodes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialNodes + * @function getTypeUrl + * @memberof google.container.v1beta1.ConfidentialNodes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ConfidentialNodes"; + }; + + return ConfidentialNodes; + })(); + + /** + * UpgradeResourceType enum. + * @name google.container.v1beta1.UpgradeResourceType + * @enum {number} + * @property {number} UPGRADE_RESOURCE_TYPE_UNSPECIFIED=0 UPGRADE_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} MASTER=1 MASTER value + * @property {number} NODE_POOL=2 NODE_POOL value + */ + v1beta1.UpgradeResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPGRADE_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MASTER"] = 1; + values[valuesById[2] = "NODE_POOL"] = 2; + return values; + })(); + + v1beta1.UpgradeEvent = (function() { + + /** + * Properties of an UpgradeEvent. + * @memberof google.container.v1beta1 + * @interface IUpgradeEvent + * @property {google.container.v1beta1.UpgradeResourceType|null} [resourceType] UpgradeEvent resourceType + * @property {string|null} [operation] UpgradeEvent operation + * @property {google.protobuf.ITimestamp|null} [operationStartTime] UpgradeEvent operationStartTime + * @property {string|null} [currentVersion] UpgradeEvent currentVersion + * @property {string|null} [targetVersion] UpgradeEvent targetVersion + * @property {string|null} [resource] UpgradeEvent resource + */ + + /** + * Constructs a new UpgradeEvent. + * @memberof google.container.v1beta1 + * @classdesc Represents an UpgradeEvent. + * @implements IUpgradeEvent + * @constructor + * @param {google.container.v1beta1.IUpgradeEvent=} [properties] Properties to set + */ + function UpgradeEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeEvent resourceType. + * @member {google.container.v1beta1.UpgradeResourceType} resourceType + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.resourceType = 0; + + /** + * UpgradeEvent operation. + * @member {string} operation + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.operation = ""; + + /** + * UpgradeEvent operationStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} operationStartTime + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.operationStartTime = null; + + /** + * UpgradeEvent currentVersion. + * @member {string} currentVersion + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.currentVersion = ""; + + /** + * UpgradeEvent targetVersion. + * @member {string} targetVersion + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.targetVersion = ""; + + /** + * UpgradeEvent resource. + * @member {string} resource + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + */ + UpgradeEvent.prototype.resource = ""; + + /** + * Creates a new UpgradeEvent instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {google.container.v1beta1.IUpgradeEvent=} [properties] Properties to set + * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent instance + */ + UpgradeEvent.create = function create(properties) { + return new UpgradeEvent(properties); + }; + + /** + * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {google.container.v1beta1.IUpgradeEvent} message UpgradeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); + if (message.operationStartTime != null && Object.hasOwnProperty.call(message, "operationStartTime")) + $root.google.protobuf.Timestamp.encode(message.operationStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.currentVersion); + if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetVersion); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.resource); + return writer; + }; + + /** + * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {google.container.v1beta1.IUpgradeEvent} message UpgradeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpgradeEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.int32(); + break; + } + case 2: { + message.operation = reader.string(); + break; + } + case 3: { + message.operationStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.currentVersion = reader.string(); + break; + } + case 5: { + message.targetVersion = reader.string(); + break; + } + case 6: { + message.resource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeEvent message. + * @function verify + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.operationStartTime); + if (error) + return "operationStartTime." + error; + } + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + if (!$util.isString(message.currentVersion)) + return "currentVersion: string expected"; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + if (!$util.isString(message.targetVersion)) + return "targetVersion: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + return null; + }; + + /** + * Creates an UpgradeEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent + */ + UpgradeEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UpgradeEvent) + return object; + var message = new $root.google.container.v1beta1.UpgradeEvent(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.operation != null) + message.operation = String(object.operation); + if (object.operationStartTime != null) { + if (typeof object.operationStartTime !== "object") + throw TypeError(".google.container.v1beta1.UpgradeEvent.operationStartTime: object expected"); + message.operationStartTime = $root.google.protobuf.Timestamp.fromObject(object.operationStartTime); + } + if (object.currentVersion != null) + message.currentVersion = String(object.currentVersion); + if (object.targetVersion != null) + message.targetVersion = String(object.targetVersion); + if (object.resource != null) + message.resource = String(object.resource); + return message; + }; + + /** + * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {google.container.v1beta1.UpgradeEvent} message UpgradeEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.operation = ""; + object.operationStartTime = null; + object.currentVersion = ""; + object.targetVersion = ""; + object.resource = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) + object.operationStartTime = $root.google.protobuf.Timestamp.toObject(message.operationStartTime, options); + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = message.currentVersion; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + object.targetVersion = message.targetVersion; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + return object; + }; + + /** + * Converts this UpgradeEvent to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UpgradeEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeEvent + * @function getTypeUrl + * @memberof google.container.v1beta1.UpgradeEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UpgradeEvent"; + }; + + return UpgradeEvent; + })(); + + v1beta1.UpgradeAvailableEvent = (function() { + + /** + * Properties of an UpgradeAvailableEvent. + * @memberof google.container.v1beta1 + * @interface IUpgradeAvailableEvent + * @property {string|null} [version] UpgradeAvailableEvent version + * @property {google.container.v1beta1.UpgradeResourceType|null} [resourceType] UpgradeAvailableEvent resourceType + * @property {google.container.v1beta1.IReleaseChannel|null} [releaseChannel] UpgradeAvailableEvent releaseChannel + * @property {string|null} [resource] UpgradeAvailableEvent resource + * @property {google.container.v1beta1.IWindowsVersions|null} [windowsVersions] UpgradeAvailableEvent windowsVersions + */ + + /** + * Constructs a new UpgradeAvailableEvent. + * @memberof google.container.v1beta1 + * @classdesc Represents an UpgradeAvailableEvent. + * @implements IUpgradeAvailableEvent + * @constructor + * @param {google.container.v1beta1.IUpgradeAvailableEvent=} [properties] Properties to set + */ + function UpgradeAvailableEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeAvailableEvent version. + * @member {string} version + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.version = ""; + + /** + * UpgradeAvailableEvent resourceType. + * @member {google.container.v1beta1.UpgradeResourceType} resourceType + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.resourceType = 0; + + /** + * UpgradeAvailableEvent releaseChannel. + * @member {google.container.v1beta1.IReleaseChannel|null|undefined} releaseChannel + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.releaseChannel = null; + + /** + * UpgradeAvailableEvent resource. + * @member {string} resource + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.resource = ""; + + /** + * UpgradeAvailableEvent windowsVersions. + * @member {google.container.v1beta1.IWindowsVersions|null|undefined} windowsVersions + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + */ + UpgradeAvailableEvent.prototype.windowsVersions = null; + + /** + * Creates a new UpgradeAvailableEvent instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {google.container.v1beta1.IUpgradeAvailableEvent=} [properties] Properties to set + * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent instance + */ + UpgradeAvailableEvent.create = function create(properties) { + return new UpgradeAvailableEvent(properties); + }; + + /** + * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {google.container.v1beta1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeAvailableEvent.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + $root.google.container.v1beta1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); + if (message.windowsVersions != null && Object.hasOwnProperty.call(message, "windowsVersions")) + $root.google.container.v1beta1.WindowsVersions.encode(message.windowsVersions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {google.container.v1beta1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeAvailableEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeAvailableEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpgradeAvailableEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.resourceType = reader.int32(); + break; + } + case 3: { + message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resource = reader.string(); + break; + } + case 5: { + message.windowsVersions = $root.google.container.v1beta1.WindowsVersions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeAvailableEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeAvailableEvent message. + * @function verify + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeAvailableEvent.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.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.releaseChannel); + if (error) + return "releaseChannel." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) { + var error = $root.google.container.v1beta1.WindowsVersions.verify(message.windowsVersions); + if (error) + return "windowsVersions." + error; + } + return null; + }; + + /** + * Creates an UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent + */ + UpgradeAvailableEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.UpgradeAvailableEvent) + return object; + var message = new $root.google.container.v1beta1.UpgradeAvailableEvent(); + if (object.version != null) + message.version = String(object.version); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.releaseChannel != null) { + if (typeof object.releaseChannel !== "object") + throw TypeError(".google.container.v1beta1.UpgradeAvailableEvent.releaseChannel: object expected"); + message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.releaseChannel); + } + if (object.resource != null) + message.resource = String(object.resource); + if (object.windowsVersions != null) { + if (typeof object.windowsVersions !== "object") + throw TypeError(".google.container.v1beta1.UpgradeAvailableEvent.windowsVersions: object expected"); + message.windowsVersions = $root.google.container.v1beta1.WindowsVersions.fromObject(object.windowsVersions); + } + return message; + }; + + /** + * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {google.container.v1beta1.UpgradeAvailableEvent} message UpgradeAvailableEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeAvailableEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.releaseChannel = null; + object.resource = ""; + object.windowsVersions = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.releaseChannel, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) + object.windowsVersions = $root.google.container.v1beta1.WindowsVersions.toObject(message.windowsVersions, options); + return object; + }; + + /** + * Converts this UpgradeAvailableEvent to JSON. + * @function toJSON + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeAvailableEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeAvailableEvent + * @function getTypeUrl + * @memberof google.container.v1beta1.UpgradeAvailableEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeAvailableEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.UpgradeAvailableEvent"; + }; + + return UpgradeAvailableEvent; + })(); + + v1beta1.SecurityBulletinEvent = (function() { + + /** + * Properties of a SecurityBulletinEvent. + * @memberof google.container.v1beta1 + * @interface ISecurityBulletinEvent + * @property {string|null} [resourceTypeAffected] SecurityBulletinEvent resourceTypeAffected + * @property {string|null} [bulletinId] SecurityBulletinEvent bulletinId + * @property {Array.|null} [cveIds] SecurityBulletinEvent cveIds + * @property {string|null} [severity] SecurityBulletinEvent severity + * @property {string|null} [bulletinUri] SecurityBulletinEvent bulletinUri + * @property {string|null} [briefDescription] SecurityBulletinEvent briefDescription + * @property {Array.|null} [affectedSupportedMinors] SecurityBulletinEvent affectedSupportedMinors + * @property {Array.|null} [patchedVersions] SecurityBulletinEvent patchedVersions + * @property {string|null} [suggestedUpgradeTarget] SecurityBulletinEvent suggestedUpgradeTarget + * @property {boolean|null} [manualStepsRequired] SecurityBulletinEvent manualStepsRequired + */ + + /** + * Constructs a new SecurityBulletinEvent. + * @memberof google.container.v1beta1 + * @classdesc Represents a SecurityBulletinEvent. + * @implements ISecurityBulletinEvent + * @constructor + * @param {google.container.v1beta1.ISecurityBulletinEvent=} [properties] Properties to set + */ + function SecurityBulletinEvent(properties) { + this.cveIds = []; + this.affectedSupportedMinors = []; + this.patchedVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityBulletinEvent resourceTypeAffected. + * @member {string} resourceTypeAffected + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.resourceTypeAffected = ""; + + /** + * SecurityBulletinEvent bulletinId. + * @member {string} bulletinId + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.bulletinId = ""; + + /** + * SecurityBulletinEvent cveIds. + * @member {Array.} cveIds + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.cveIds = $util.emptyArray; + + /** + * SecurityBulletinEvent severity. + * @member {string} severity + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.severity = ""; + + /** + * SecurityBulletinEvent bulletinUri. + * @member {string} bulletinUri + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.bulletinUri = ""; + + /** + * SecurityBulletinEvent briefDescription. + * @member {string} briefDescription + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.briefDescription = ""; + + /** + * SecurityBulletinEvent affectedSupportedMinors. + * @member {Array.} affectedSupportedMinors + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.affectedSupportedMinors = $util.emptyArray; + + /** + * SecurityBulletinEvent patchedVersions. + * @member {Array.} patchedVersions + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.patchedVersions = $util.emptyArray; + + /** + * SecurityBulletinEvent suggestedUpgradeTarget. + * @member {string} suggestedUpgradeTarget + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.suggestedUpgradeTarget = ""; + + /** + * SecurityBulletinEvent manualStepsRequired. + * @member {boolean} manualStepsRequired + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + */ + SecurityBulletinEvent.prototype.manualStepsRequired = false; + + /** + * Creates a new SecurityBulletinEvent instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {google.container.v1beta1.ISecurityBulletinEvent=} [properties] Properties to set + * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent instance + */ + SecurityBulletinEvent.create = function create(properties) { + return new SecurityBulletinEvent(properties); + }; + + /** + * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {google.container.v1beta1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletinEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceTypeAffected != null && Object.hasOwnProperty.call(message, "resourceTypeAffected")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypeAffected); + if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletinId); + if (message.cveIds != null && message.cveIds.length) + for (var i = 0; i < message.cveIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cveIds[i]); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); + if (message.bulletinUri != null && Object.hasOwnProperty.call(message, "bulletinUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bulletinUri); + if (message.briefDescription != null && Object.hasOwnProperty.call(message, "briefDescription")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.briefDescription); + if (message.affectedSupportedMinors != null && message.affectedSupportedMinors.length) + for (var i = 0; i < message.affectedSupportedMinors.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.affectedSupportedMinors[i]); + if (message.patchedVersions != null && message.patchedVersions.length) + for (var i = 0; i < message.patchedVersions.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.patchedVersions[i]); + if (message.suggestedUpgradeTarget != null && Object.hasOwnProperty.call(message, "suggestedUpgradeTarget")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.suggestedUpgradeTarget); + if (message.manualStepsRequired != null && Object.hasOwnProperty.call(message, "manualStepsRequired")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.manualStepsRequired); + return writer; + }; + + /** + * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {google.container.v1beta1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletinEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletinEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecurityBulletinEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceTypeAffected = reader.string(); + break; + } + case 2: { + message.bulletinId = reader.string(); + break; + } + case 3: { + if (!(message.cveIds && message.cveIds.length)) + message.cveIds = []; + message.cveIds.push(reader.string()); + break; + } + case 4: { + message.severity = reader.string(); + break; + } + case 5: { + message.bulletinUri = reader.string(); + break; + } + case 6: { + message.briefDescription = reader.string(); + break; + } + case 7: { + if (!(message.affectedSupportedMinors && message.affectedSupportedMinors.length)) + message.affectedSupportedMinors = []; + message.affectedSupportedMinors.push(reader.string()); + break; + } + case 8: { + if (!(message.patchedVersions && message.patchedVersions.length)) + message.patchedVersions = []; + message.patchedVersions.push(reader.string()); + break; + } + case 9: { + message.suggestedUpgradeTarget = reader.string(); + break; + } + case 10: { + message.manualStepsRequired = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletinEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityBulletinEvent message. + * @function verify + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityBulletinEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) + if (!$util.isString(message.resourceTypeAffected)) + return "resourceTypeAffected: string expected"; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + if (!$util.isString(message.bulletinId)) + return "bulletinId: string expected"; + if (message.cveIds != null && message.hasOwnProperty("cveIds")) { + if (!Array.isArray(message.cveIds)) + return "cveIds: array expected"; + for (var i = 0; i < message.cveIds.length; ++i) + if (!$util.isString(message.cveIds[i])) + return "cveIds: string[] expected"; + } + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) + if (!$util.isString(message.bulletinUri)) + return "bulletinUri: string expected"; + if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) + if (!$util.isString(message.briefDescription)) + return "briefDescription: string expected"; + if (message.affectedSupportedMinors != null && message.hasOwnProperty("affectedSupportedMinors")) { + if (!Array.isArray(message.affectedSupportedMinors)) + return "affectedSupportedMinors: array expected"; + for (var i = 0; i < message.affectedSupportedMinors.length; ++i) + if (!$util.isString(message.affectedSupportedMinors[i])) + return "affectedSupportedMinors: string[] expected"; + } + if (message.patchedVersions != null && message.hasOwnProperty("patchedVersions")) { + if (!Array.isArray(message.patchedVersions)) + return "patchedVersions: array expected"; + for (var i = 0; i < message.patchedVersions.length; ++i) + if (!$util.isString(message.patchedVersions[i])) + return "patchedVersions: string[] expected"; + } + if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) + if (!$util.isString(message.suggestedUpgradeTarget)) + return "suggestedUpgradeTarget: string expected"; + if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) + if (typeof message.manualStepsRequired !== "boolean") + return "manualStepsRequired: boolean expected"; + return null; + }; + + /** + * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent + */ + SecurityBulletinEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SecurityBulletinEvent) + return object; + var message = new $root.google.container.v1beta1.SecurityBulletinEvent(); + if (object.resourceTypeAffected != null) + message.resourceTypeAffected = String(object.resourceTypeAffected); + if (object.bulletinId != null) + message.bulletinId = String(object.bulletinId); + if (object.cveIds) { + if (!Array.isArray(object.cveIds)) + throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.cveIds: array expected"); + message.cveIds = []; + for (var i = 0; i < object.cveIds.length; ++i) + message.cveIds[i] = String(object.cveIds[i]); + } + if (object.severity != null) + message.severity = String(object.severity); + if (object.bulletinUri != null) + message.bulletinUri = String(object.bulletinUri); + if (object.briefDescription != null) + message.briefDescription = String(object.briefDescription); + if (object.affectedSupportedMinors) { + if (!Array.isArray(object.affectedSupportedMinors)) + throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.affectedSupportedMinors: array expected"); + message.affectedSupportedMinors = []; + for (var i = 0; i < object.affectedSupportedMinors.length; ++i) + message.affectedSupportedMinors[i] = String(object.affectedSupportedMinors[i]); + } + if (object.patchedVersions) { + if (!Array.isArray(object.patchedVersions)) + throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.patchedVersions: array expected"); + message.patchedVersions = []; + for (var i = 0; i < object.patchedVersions.length; ++i) + message.patchedVersions[i] = String(object.patchedVersions[i]); + } + if (object.suggestedUpgradeTarget != null) + message.suggestedUpgradeTarget = String(object.suggestedUpgradeTarget); + if (object.manualStepsRequired != null) + message.manualStepsRequired = Boolean(object.manualStepsRequired); + return message; + }; + + /** + * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {google.container.v1beta1.SecurityBulletinEvent} message SecurityBulletinEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityBulletinEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cveIds = []; + object.affectedSupportedMinors = []; + object.patchedVersions = []; + } + if (options.defaults) { + object.resourceTypeAffected = ""; + object.bulletinId = ""; + object.severity = ""; + object.bulletinUri = ""; + object.briefDescription = ""; + object.suggestedUpgradeTarget = ""; + object.manualStepsRequired = false; + } + if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) + object.resourceTypeAffected = message.resourceTypeAffected; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + object.bulletinId = message.bulletinId; + if (message.cveIds && message.cveIds.length) { + object.cveIds = []; + for (var j = 0; j < message.cveIds.length; ++j) + object.cveIds[j] = message.cveIds[j]; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) + object.bulletinUri = message.bulletinUri; + if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) + object.briefDescription = message.briefDescription; + if (message.affectedSupportedMinors && message.affectedSupportedMinors.length) { + object.affectedSupportedMinors = []; + for (var j = 0; j < message.affectedSupportedMinors.length; ++j) + object.affectedSupportedMinors[j] = message.affectedSupportedMinors[j]; + } + if (message.patchedVersions && message.patchedVersions.length) { + object.patchedVersions = []; + for (var j = 0; j < message.patchedVersions.length; ++j) + object.patchedVersions[j] = message.patchedVersions[j]; + } + if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) + object.suggestedUpgradeTarget = message.suggestedUpgradeTarget; + if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) + object.manualStepsRequired = message.manualStepsRequired; + return object; + }; + + /** + * Converts this SecurityBulletinEvent to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @instance + * @returns {Object.} JSON object + */ + SecurityBulletinEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityBulletinEvent + * @function getTypeUrl + * @memberof google.container.v1beta1.SecurityBulletinEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityBulletinEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SecurityBulletinEvent"; + }; + + return SecurityBulletinEvent; + })(); + + v1beta1.IdentityServiceConfig = (function() { + + /** + * Properties of an IdentityServiceConfig. + * @memberof google.container.v1beta1 + * @interface IIdentityServiceConfig + * @property {boolean|null} [enabled] IdentityServiceConfig enabled + */ + + /** + * Constructs a new IdentityServiceConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an IdentityServiceConfig. + * @implements IIdentityServiceConfig + * @constructor + * @param {google.container.v1beta1.IIdentityServiceConfig=} [properties] Properties to set + */ + function IdentityServiceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentityServiceConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.IdentityServiceConfig + * @instance + */ + IdentityServiceConfig.prototype.enabled = false; + + /** + * Creates a new IdentityServiceConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {google.container.v1beta1.IIdentityServiceConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig instance + */ + IdentityServiceConfig.create = function create(properties) { + return new IdentityServiceConfig(properties); + }; + + /** + * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {google.container.v1beta1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityServiceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {google.container.v1beta1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityServiceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityServiceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IdentityServiceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityServiceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityServiceConfig message. + * @function verify + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityServiceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates an IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig + */ + IdentityServiceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.IdentityServiceConfig) + return object; + var message = new $root.google.container.v1beta1.IdentityServiceConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {google.container.v1beta1.IdentityServiceConfig} message IdentityServiceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityServiceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this IdentityServiceConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.IdentityServiceConfig + * @instance + * @returns {Object.} JSON object + */ + IdentityServiceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IdentityServiceConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.IdentityServiceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IdentityServiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.IdentityServiceConfig"; + }; + + return IdentityServiceConfig; + })(); + + /** + * NodePoolUpdateStrategy enum. + * @name google.container.v1beta1.NodePoolUpdateStrategy + * @enum {number} + * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value + * @property {number} BLUE_GREEN=2 BLUE_GREEN value + * @property {number} SURGE=3 SURGE value + */ + v1beta1.NodePoolUpdateStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[2] = "BLUE_GREEN"] = 2; + values[valuesById[3] = "SURGE"] = 3; + return values; + })(); + + v1beta1.LoggingConfig = (function() { + + /** + * Properties of a LoggingConfig. + * @memberof google.container.v1beta1 + * @interface ILoggingConfig + * @property {google.container.v1beta1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig + */ + + /** + * Constructs a new LoggingConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig + * @constructor + * @param {google.container.v1beta1.ILoggingConfig=} [properties] Properties to set + */ + function LoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingConfig componentConfig. + * @member {google.container.v1beta1.ILoggingComponentConfig|null|undefined} componentConfig + * @memberof google.container.v1beta1.LoggingConfig + * @instance + */ + LoggingConfig.prototype.componentConfig = null; + + /** + * Creates a new LoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {google.container.v1beta1.ILoggingConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig instance + */ + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); + }; + + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1beta1.LoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {google.container.v1beta1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) + $root.google.container.v1beta1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {google.container.v1beta1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.componentConfig = $root.google.container.v1beta1.LoggingComponentConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingConfig message. + * @function verify + * @memberof google.container.v1beta1.LoggingConfig + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { + var error = $root.google.container.v1beta1.LoggingComponentConfig.verify(message.componentConfig); + if (error) + return "componentConfig." + error; + } + return null; + }; + + /** + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig + */ + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LoggingConfig) + return object; + var message = new $root.google.container.v1beta1.LoggingConfig(); + if (object.componentConfig != null) { + if (typeof object.componentConfig !== "object") + throw TypeError(".google.container.v1beta1.LoggingConfig.componentConfig: object expected"); + message.componentConfig = $root.google.container.v1beta1.LoggingComponentConfig.fromObject(object.componentConfig); + } + return message; + }; + + /** + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {google.container.v1beta1.LoggingConfig} message LoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingConfig.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.container.v1beta1.LoggingComponentConfig.toObject(message.componentConfig, options); + return object; + }; + + /** + * Converts this LoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LoggingConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LoggingConfig"; + }; + + return LoggingConfig; + })(); + + v1beta1.LoggingComponentConfig = (function() { + + /** + * Properties of a LoggingComponentConfig. + * @memberof google.container.v1beta1 + * @interface ILoggingComponentConfig + * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents + */ + + /** + * Constructs a new LoggingComponentConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a LoggingComponentConfig. + * @implements ILoggingComponentConfig + * @constructor + * @param {google.container.v1beta1.ILoggingComponentConfig=} [properties] Properties to set + */ + function LoggingComponentConfig(properties) { + this.enableComponents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingComponentConfig enableComponents. + * @member {Array.} enableComponents + * @memberof google.container.v1beta1.LoggingComponentConfig + * @instance + */ + LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; + + /** + * Creates a new LoggingComponentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {google.container.v1beta1.ILoggingComponentConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig instance + */ + LoggingComponentConfig.create = function create(properties) { + return new LoggingComponentConfig(properties); + }; + + /** + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1beta1.LoggingComponentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {google.container.v1beta1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingComponentConfig.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(); + } + return writer; + }; + + /** + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingComponentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {google.container.v1beta1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingComponentConfig(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingComponentConfig message. + * @function verify + * @memberof google.container.v1beta1.LoggingComponentConfig + * @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) { + 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: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig + */ + LoggingComponentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LoggingComponentConfig) + return object; + var message = new $root.google.container.v1beta1.LoggingComponentConfig(); + if (object.enableComponents) { + if (!Array.isArray(object.enableComponents)) + throw TypeError(".google.container.v1beta1.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; + case "APISERVER": + case 3: + message.enableComponents[i] = 3; + break; + case "SCHEDULER": + case 4: + message.enableComponents[i] = 4; + break; + case "CONTROLLER_MANAGER": + case 5: + message.enableComponents[i] = 5; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {google.container.v1beta1.LoggingComponentConfig} message LoggingComponentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingComponentConfig.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.container.v1beta1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1beta1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } + return object; + }; + + /** + * Converts this LoggingComponentConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LoggingComponentConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingComponentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingComponentConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LoggingComponentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LoggingComponentConfig"; + }; + + /** + * Component enum. + * @name google.container.v1beta1.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 + * @property {number} APISERVER=3 APISERVER value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER 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; + values[valuesById[3] = "APISERVER"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + return values; + })(); + + return LoggingComponentConfig; + })(); + + v1beta1.RayClusterLoggingConfig = (function() { + + /** + * Properties of a RayClusterLoggingConfig. + * @memberof google.container.v1beta1 + * @interface IRayClusterLoggingConfig + * @property {boolean|null} [enabled] RayClusterLoggingConfig enabled + */ + + /** + * Constructs a new RayClusterLoggingConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a RayClusterLoggingConfig. + * @implements IRayClusterLoggingConfig + * @constructor + * @param {google.container.v1beta1.IRayClusterLoggingConfig=} [properties] Properties to set + */ + function RayClusterLoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayClusterLoggingConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @instance + */ + RayClusterLoggingConfig.prototype.enabled = false; + + /** + * Creates a new RayClusterLoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {google.container.v1beta1.IRayClusterLoggingConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig instance + */ + RayClusterLoggingConfig.create = function create(properties) { + return new RayClusterLoggingConfig(properties); + }; + + /** + * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {google.container.v1beta1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterLoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {google.container.v1beta1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterLoggingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayClusterLoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterLoggingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayClusterLoggingConfig message. + * @function verify + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayClusterLoggingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig + */ + RayClusterLoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RayClusterLoggingConfig) + return object; + var message = new $root.google.container.v1beta1.RayClusterLoggingConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {google.container.v1beta1.RayClusterLoggingConfig} message RayClusterLoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayClusterLoggingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this RayClusterLoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @instance + * @returns {Object.} JSON object + */ + RayClusterLoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayClusterLoggingConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.RayClusterLoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayClusterLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RayClusterLoggingConfig"; + }; + + return RayClusterLoggingConfig; + })(); + + v1beta1.MonitoringConfig = (function() { + + /** + * Properties of a MonitoringConfig. + * @memberof google.container.v1beta1 + * @interface IMonitoringConfig + * @property {google.container.v1beta1.IMonitoringComponentConfig|null} [componentConfig] MonitoringConfig componentConfig + * @property {google.container.v1beta1.IManagedPrometheusConfig|null} [managedPrometheusConfig] MonitoringConfig managedPrometheusConfig + * @property {google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null} [advancedDatapathObservabilityConfig] MonitoringConfig advancedDatapathObservabilityConfig + */ + + /** + * Constructs a new MonitoringConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig + * @constructor + * @param {google.container.v1beta1.IMonitoringConfig=} [properties] Properties to set + */ + function MonitoringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringConfig componentConfig. + * @member {google.container.v1beta1.IMonitoringComponentConfig|null|undefined} componentConfig + * @memberof google.container.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.componentConfig = null; + + /** + * MonitoringConfig managedPrometheusConfig. + * @member {google.container.v1beta1.IManagedPrometheusConfig|null|undefined} managedPrometheusConfig + * @memberof google.container.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.managedPrometheusConfig = null; + + /** + * MonitoringConfig advancedDatapathObservabilityConfig. + * @member {google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null|undefined} advancedDatapathObservabilityConfig + * @memberof google.container.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.advancedDatapathObservabilityConfig = null; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {google.container.v1beta1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig instance + */ + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); + }; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {google.container.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) + $root.google.container.v1beta1.MonitoringComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.managedPrometheusConfig != null && Object.hasOwnProperty.call(message, "managedPrometheusConfig")) + $root.google.container.v1beta1.ManagedPrometheusConfig.encode(message.managedPrometheusConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.advancedDatapathObservabilityConfig != null && Object.hasOwnProperty.call(message, "advancedDatapathObservabilityConfig")) + $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.encode(message.advancedDatapathObservabilityConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {google.container.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.container.v1beta1.MonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringConfig message. + * @function verify + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { + var error = $root.google.container.v1beta1.MonitoringComponentConfig.verify(message.componentConfig); + if (error) + return "componentConfig." + error; + } + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) { + var error = $root.google.container.v1beta1.ManagedPrometheusConfig.verify(message.managedPrometheusConfig); + if (error) + return "managedPrometheusConfig." + error; + } + if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) { + var error = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify(message.advancedDatapathObservabilityConfig); + if (error) + return "advancedDatapathObservabilityConfig." + error; + } + return null; + }; + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig + */ + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MonitoringConfig) + return object; + var message = new $root.google.container.v1beta1.MonitoringConfig(); + if (object.componentConfig != null) { + if (typeof object.componentConfig !== "object") + throw TypeError(".google.container.v1beta1.MonitoringConfig.componentConfig: object expected"); + message.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.fromObject(object.componentConfig); + } + if (object.managedPrometheusConfig != null) { + if (typeof object.managedPrometheusConfig !== "object") + throw TypeError(".google.container.v1beta1.MonitoringConfig.managedPrometheusConfig: object expected"); + message.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.fromObject(object.managedPrometheusConfig); + } + if (object.advancedDatapathObservabilityConfig != null) { + if (typeof object.advancedDatapathObservabilityConfig !== "object") + throw TypeError(".google.container.v1beta1.MonitoringConfig.advancedDatapathObservabilityConfig: object expected"); + message.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.fromObject(object.advancedDatapathObservabilityConfig); + } + return message; + }; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {google.container.v1beta1.MonitoringConfig} message MonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.componentConfig = null; + object.managedPrometheusConfig = null; + object.advancedDatapathObservabilityConfig = null; + } + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) + object.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.toObject(message.componentConfig, options); + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) + object.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.toObject(message.managedPrometheusConfig, options); + if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) + object.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.toObject(message.advancedDatapathObservabilityConfig, options); + return object; + }; + + /** + * Converts this MonitoringConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.MonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MonitoringConfig"; + }; + + return MonitoringConfig; + })(); + + v1beta1.AdvancedDatapathObservabilityConfig = (function() { + + /** + * Properties of an AdvancedDatapathObservabilityConfig. + * @memberof google.container.v1beta1 + * @interface IAdvancedDatapathObservabilityConfig + * @property {boolean|null} [enableMetrics] AdvancedDatapathObservabilityConfig enableMetrics + * @property {google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|null} [relayMode] AdvancedDatapathObservabilityConfig relayMode + * @property {boolean|null} [enableRelay] AdvancedDatapathObservabilityConfig enableRelay + */ + + /** + * Constructs a new AdvancedDatapathObservabilityConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an AdvancedDatapathObservabilityConfig. + * @implements IAdvancedDatapathObservabilityConfig + * @constructor + * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set + */ + function AdvancedDatapathObservabilityConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedDatapathObservabilityConfig enableMetrics. + * @member {boolean} enableMetrics + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.enableMetrics = false; + + /** + * AdvancedDatapathObservabilityConfig relayMode. + * @member {google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode} relayMode + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.relayMode = 0; + + /** + * AdvancedDatapathObservabilityConfig enableRelay. + * @member {boolean|null|undefined} enableRelay + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @instance + */ + AdvancedDatapathObservabilityConfig.prototype.enableRelay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedDatapathObservabilityConfig _enableRelay. + * @member {"enableRelay"|undefined} _enableRelay + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @instance + */ + Object.defineProperty(AdvancedDatapathObservabilityConfig.prototype, "_enableRelay", { + get: $util.oneOfGetter($oneOfFields = ["enableRelay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig instance + */ + AdvancedDatapathObservabilityConfig.create = function create(properties) { + return new AdvancedDatapathObservabilityConfig(properties); + }; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedDatapathObservabilityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableMetrics != null && Object.hasOwnProperty.call(message, "enableMetrics")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableMetrics); + if (message.relayMode != null && Object.hasOwnProperty.call(message, "relayMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relayMode); + if (message.enableRelay != null && Object.hasOwnProperty.call(message, "enableRelay")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableRelay); + return writer; + }; + + /** + * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedDatapathObservabilityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedDatapathObservabilityConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableMetrics = reader.bool(); + break; + } + case 2: { + message.relayMode = reader.int32(); + break; + } + case 3: { + message.enableRelay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedDatapathObservabilityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedDatapathObservabilityConfig message. + * @function verify + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedDatapathObservabilityConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) + if (typeof message.enableMetrics !== "boolean") + return "enableMetrics: boolean expected"; + if (message.relayMode != null && message.hasOwnProperty("relayMode")) + switch (message.relayMode) { + default: + return "relayMode: enum value expected"; + case 0: + case 1: + case 3: + case 4: + break; + } + if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { + properties._enableRelay = 1; + if (typeof message.enableRelay !== "boolean") + return "enableRelay: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig + */ + AdvancedDatapathObservabilityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig) + return object; + var message = new $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig(); + if (object.enableMetrics != null) + message.enableMetrics = Boolean(object.enableMetrics); + switch (object.relayMode) { + default: + if (typeof object.relayMode === "number") { + message.relayMode = object.relayMode; + break; + } + break; + case "RELAY_MODE_UNSPECIFIED": + case 0: + message.relayMode = 0; + break; + case "DISABLED": + case 1: + message.relayMode = 1; + break; + case "INTERNAL_VPC_LB": + case 3: + message.relayMode = 3; + break; + case "EXTERNAL_LB": + case 4: + message.relayMode = 4; + break; + } + if (object.enableRelay != null) + message.enableRelay = Boolean(object.enableRelay); + return message; + }; + + /** + * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {google.container.v1beta1.AdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedDatapathObservabilityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableMetrics = false; + object.relayMode = options.enums === String ? "RELAY_MODE_UNSPECIFIED" : 0; + } + if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) + object.enableMetrics = message.enableMetrics; + if (message.relayMode != null && message.hasOwnProperty("relayMode")) + object.relayMode = options.enums === String ? $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] === undefined ? message.relayMode : $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] : message.relayMode; + if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { + object.enableRelay = message.enableRelay; + if (options.oneofs) + object._enableRelay = "enableRelay"; + } + return object; + }; + + /** + * Converts this AdvancedDatapathObservabilityConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @instance + * @returns {Object.} JSON object + */ + AdvancedDatapathObservabilityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedDatapathObservabilityConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedDatapathObservabilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.AdvancedDatapathObservabilityConfig"; + }; + + /** + * RelayMode enum. + * @name google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode + * @enum {number} + * @property {number} RELAY_MODE_UNSPECIFIED=0 RELAY_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} INTERNAL_VPC_LB=3 INTERNAL_VPC_LB value + * @property {number} EXTERNAL_LB=4 EXTERNAL_LB value + */ + AdvancedDatapathObservabilityConfig.RelayMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELAY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[3] = "INTERNAL_VPC_LB"] = 3; + values[valuesById[4] = "EXTERNAL_LB"] = 4; + return values; + })(); + + return AdvancedDatapathObservabilityConfig; + })(); + + v1beta1.RayClusterMonitoringConfig = (function() { + + /** + * Properties of a RayClusterMonitoringConfig. + * @memberof google.container.v1beta1 + * @interface IRayClusterMonitoringConfig + * @property {boolean|null} [enabled] RayClusterMonitoringConfig enabled + */ + + /** + * Constructs a new RayClusterMonitoringConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a RayClusterMonitoringConfig. + * @implements IRayClusterMonitoringConfig + * @constructor + * @param {google.container.v1beta1.IRayClusterMonitoringConfig=} [properties] Properties to set + */ + function RayClusterMonitoringConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RayClusterMonitoringConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @instance + */ + RayClusterMonitoringConfig.prototype.enabled = false; + + /** + * Creates a new RayClusterMonitoringConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1beta1.IRayClusterMonitoringConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig instance + */ + RayClusterMonitoringConfig.create = function create(properties) { + return new RayClusterMonitoringConfig(properties); + }; + + /** + * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1beta1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterMonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1beta1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RayClusterMonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterMonitoringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayClusterMonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RayClusterMonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RayClusterMonitoringConfig message. + * @function verify + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RayClusterMonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig + */ + RayClusterMonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.RayClusterMonitoringConfig) + return object; + var message = new $root.google.container.v1beta1.RayClusterMonitoringConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {google.container.v1beta1.RayClusterMonitoringConfig} message RayClusterMonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RayClusterMonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this RayClusterMonitoringConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + RayClusterMonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RayClusterMonitoringConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.RayClusterMonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RayClusterMonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.RayClusterMonitoringConfig"; + }; + + return RayClusterMonitoringConfig; + })(); + + v1beta1.NodePoolLoggingConfig = (function() { + + /** + * Properties of a NodePoolLoggingConfig. + * @memberof google.container.v1beta1 + * @interface INodePoolLoggingConfig + * @property {google.container.v1beta1.ILoggingVariantConfig|null} [variantConfig] NodePoolLoggingConfig variantConfig + */ + + /** + * Constructs a new NodePoolLoggingConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a NodePoolLoggingConfig. + * @implements INodePoolLoggingConfig + * @constructor + * @param {google.container.v1beta1.INodePoolLoggingConfig=} [properties] Properties to set + */ + function NodePoolLoggingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolLoggingConfig variantConfig. + * @member {google.container.v1beta1.ILoggingVariantConfig|null|undefined} variantConfig + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @instance + */ + NodePoolLoggingConfig.prototype.variantConfig = null; + + /** + * Creates a new NodePoolLoggingConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {google.container.v1beta1.INodePoolLoggingConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig instance + */ + NodePoolLoggingConfig.create = function create(properties) { + return new NodePoolLoggingConfig(properties); + }; + + /** + * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {google.container.v1beta1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolLoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variantConfig != null && Object.hasOwnProperty.call(message, "variantConfig")) + $root.google.container.v1beta1.LoggingVariantConfig.encode(message.variantConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {google.container.v1beta1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolLoggingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolLoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolLoggingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolLoggingConfig message. + * @function verify + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolLoggingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) { + var error = $root.google.container.v1beta1.LoggingVariantConfig.verify(message.variantConfig); + if (error) + return "variantConfig." + error; + } + return null; + }; + + /** + * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig + */ + NodePoolLoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.NodePoolLoggingConfig) + return object; + var message = new $root.google.container.v1beta1.NodePoolLoggingConfig(); + if (object.variantConfig != null) { + if (typeof object.variantConfig !== "object") + throw TypeError(".google.container.v1beta1.NodePoolLoggingConfig.variantConfig: object expected"); + message.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.fromObject(object.variantConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {google.container.v1beta1.NodePoolLoggingConfig} message NodePoolLoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolLoggingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.variantConfig = null; + if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) + object.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.toObject(message.variantConfig, options); + return object; + }; + + /** + * Converts this NodePoolLoggingConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @instance + * @returns {Object.} JSON object + */ + NodePoolLoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolLoggingConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.NodePoolLoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.NodePoolLoggingConfig"; + }; + + return NodePoolLoggingConfig; + })(); + + v1beta1.LoggingVariantConfig = (function() { + + /** + * Properties of a LoggingVariantConfig. + * @memberof google.container.v1beta1 + * @interface ILoggingVariantConfig + * @property {google.container.v1beta1.LoggingVariantConfig.Variant|null} [variant] LoggingVariantConfig variant + */ + + /** + * Constructs a new LoggingVariantConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a LoggingVariantConfig. + * @implements ILoggingVariantConfig + * @constructor + * @param {google.container.v1beta1.ILoggingVariantConfig=} [properties] Properties to set + */ + function LoggingVariantConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingVariantConfig variant. + * @member {google.container.v1beta1.LoggingVariantConfig.Variant} variant + * @memberof google.container.v1beta1.LoggingVariantConfig + * @instance + */ + LoggingVariantConfig.prototype.variant = 0; + + /** + * Creates a new LoggingVariantConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {google.container.v1beta1.ILoggingVariantConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig instance + */ + LoggingVariantConfig.create = function create(properties) { + return new LoggingVariantConfig(properties); + }; + + /** + * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {google.container.v1beta1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingVariantConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.variant); + return writer; + }; + + /** + * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {google.container.v1beta1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingVariantConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingVariantConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingVariantConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.variant = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingVariantConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingVariantConfig message. + * @function verify + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingVariantConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variant != null && message.hasOwnProperty("variant")) + switch (message.variant) { + default: + return "variant: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig + */ + LoggingVariantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.LoggingVariantConfig) + return object; + var message = new $root.google.container.v1beta1.LoggingVariantConfig(); + switch (object.variant) { + default: + if (typeof object.variant === "number") { + message.variant = object.variant; + break; + } + break; + case "VARIANT_UNSPECIFIED": + case 0: + message.variant = 0; + break; + case "DEFAULT": + case 1: + message.variant = 1; + break; + case "MAX_THROUGHPUT": + case 2: + message.variant = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {google.container.v1beta1.LoggingVariantConfig} message LoggingVariantConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingVariantConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.variant = options.enums === String ? "VARIANT_UNSPECIFIED" : 0; + if (message.variant != null && message.hasOwnProperty("variant")) + object.variant = options.enums === String ? $root.google.container.v1beta1.LoggingVariantConfig.Variant[message.variant] === undefined ? message.variant : $root.google.container.v1beta1.LoggingVariantConfig.Variant[message.variant] : message.variant; + return object; + }; + + /** + * Converts this LoggingVariantConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.LoggingVariantConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingVariantConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingVariantConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.LoggingVariantConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingVariantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.LoggingVariantConfig"; + }; + + /** + * Variant enum. + * @name google.container.v1beta1.LoggingVariantConfig.Variant + * @enum {number} + * @property {number} VARIANT_UNSPECIFIED=0 VARIANT_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} MAX_THROUGHPUT=2 MAX_THROUGHPUT value + */ + LoggingVariantConfig.Variant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "MAX_THROUGHPUT"] = 2; + return values; + })(); + + return LoggingVariantConfig; + })(); + + v1beta1.MonitoringComponentConfig = (function() { + + /** + * Properties of a MonitoringComponentConfig. + * @memberof google.container.v1beta1 + * @interface IMonitoringComponentConfig + * @property {Array.|null} [enableComponents] MonitoringComponentConfig enableComponents + */ + + /** + * Constructs a new MonitoringComponentConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a MonitoringComponentConfig. + * @implements IMonitoringComponentConfig + * @constructor + * @param {google.container.v1beta1.IMonitoringComponentConfig=} [properties] Properties to set + */ + function MonitoringComponentConfig(properties) { + this.enableComponents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringComponentConfig enableComponents. + * @member {Array.} enableComponents + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @instance + */ + MonitoringComponentConfig.prototype.enableComponents = $util.emptyArray; + + /** + * Creates a new MonitoringComponentConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {google.container.v1beta1.IMonitoringComponentConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig instance + */ + MonitoringComponentConfig.create = function create(properties) { + return new MonitoringComponentConfig(properties); + }; + + /** + * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {google.container.v1beta1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringComponentConfig.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(); + } + return writer; + }; + + /** + * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {google.container.v1beta1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringComponentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MonitoringComponentConfig(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringComponentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringComponentConfig message. + * @function verify + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringComponentConfig.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: + case 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + } + return null; + }; + + /** + * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig + */ + MonitoringComponentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.MonitoringComponentConfig) + return object; + var message = new $root.google.container.v1beta1.MonitoringComponentConfig(); + if (object.enableComponents) { + if (!Array.isArray(object.enableComponents)) + throw TypeError(".google.container.v1beta1.MonitoringComponentConfig.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; + case "APISERVER": + case 3: + message.enableComponents[i] = 3; + break; + case "SCHEDULER": + case 4: + message.enableComponents[i] = 4; + break; + case "CONTROLLER_MANAGER": + case 5: + message.enableComponents[i] = 5; + break; + case "STORAGE": + case 7: + message.enableComponents[i] = 7; + break; + case "HPA": + case 8: + message.enableComponents[i] = 8; + break; + case "POD": + case 9: + message.enableComponents[i] = 9; + break; + case "DAEMONSET": + case 10: + message.enableComponents[i] = 10; + break; + case "DEPLOYMENT": + case 11: + message.enableComponents[i] = 11; + break; + case "STATEFULSET": + case 12: + message.enableComponents[i] = 12; + break; + case "CADVISOR": + case 13: + message.enableComponents[i] = 13; + break; + case "KUBELET": + case 14: + message.enableComponents[i] = 14; + break; + case "DCGM": + case 15: + message.enableComponents[i] = 15; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {google.container.v1beta1.MonitoringComponentConfig} message MonitoringComponentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringComponentConfig.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.container.v1beta1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1beta1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } + return object; + }; + + /** + * Converts this MonitoringComponentConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringComponentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringComponentConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.MonitoringComponentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.MonitoringComponentConfig"; + }; + + /** + * Component enum. + * @name google.container.v1beta1.MonitoringComponentConfig.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 + * @property {number} APISERVER=3 APISERVER value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value + * @property {number} STORAGE=7 STORAGE value + * @property {number} HPA=8 HPA value + * @property {number} POD=9 POD value + * @property {number} DAEMONSET=10 DAEMONSET value + * @property {number} DEPLOYMENT=11 DEPLOYMENT value + * @property {number} STATEFULSET=12 STATEFULSET value + * @property {number} CADVISOR=13 CADVISOR value + * @property {number} KUBELET=14 KUBELET value + * @property {number} DCGM=15 DCGM value + */ + MonitoringComponentConfig.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; + values[valuesById[3] = "APISERVER"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + values[valuesById[7] = "STORAGE"] = 7; + values[valuesById[8] = "HPA"] = 8; + values[valuesById[9] = "POD"] = 9; + values[valuesById[10] = "DAEMONSET"] = 10; + values[valuesById[11] = "DEPLOYMENT"] = 11; + values[valuesById[12] = "STATEFULSET"] = 12; + values[valuesById[13] = "CADVISOR"] = 13; + values[valuesById[14] = "KUBELET"] = 14; + values[valuesById[15] = "DCGM"] = 15; + return values; + })(); + + return MonitoringComponentConfig; + })(); + + /** + * DatapathProvider enum. + * @name google.container.v1beta1.DatapathProvider + * @enum {number} + * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value + * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value + * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value + */ + v1beta1.DatapathProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY_DATAPATH"] = 1; + values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; + return values; + })(); + + v1beta1.Fleet = (function() { + + /** + * Properties of a Fleet. + * @memberof google.container.v1beta1 + * @interface IFleet + * @property {string|null} [project] Fleet project + * @property {string|null} [membership] Fleet membership + * @property {boolean|null} [preRegistered] Fleet preRegistered + */ + + /** + * Constructs a new Fleet. + * @memberof google.container.v1beta1 + * @classdesc Represents a Fleet. + * @implements IFleet + * @constructor + * @param {google.container.v1beta1.IFleet=} [properties] Properties to set + */ + function Fleet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fleet project. + * @member {string} project + * @memberof google.container.v1beta1.Fleet + * @instance + */ + Fleet.prototype.project = ""; + + /** + * Fleet membership. + * @member {string} membership + * @memberof google.container.v1beta1.Fleet + * @instance + */ + Fleet.prototype.membership = ""; + + /** + * Fleet preRegistered. + * @member {boolean} preRegistered + * @memberof google.container.v1beta1.Fleet + * @instance + */ + Fleet.prototype.preRegistered = false; + + /** + * Creates a new Fleet instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.Fleet + * @static + * @param {google.container.v1beta1.IFleet=} [properties] Properties to set + * @returns {google.container.v1beta1.Fleet} Fleet instance + */ + Fleet.create = function create(properties) { + return new Fleet(properties); + }; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1beta1.Fleet.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.Fleet + * @static + * @param {google.container.v1beta1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.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.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); + return writer; + }; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1beta1.Fleet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.Fleet + * @static + * @param {google.container.v1beta1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fleet message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.Fleet} Fleet + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Fleet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.membership = reader.string(); + break; + } + case 3: { + message.preRegistered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fleet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.Fleet} Fleet + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fleet message. + * @function verify + * @memberof google.container.v1beta1.Fleet + * @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) { + 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.preRegistered != null && message.hasOwnProperty("preRegistered")) + if (typeof message.preRegistered !== "boolean") + return "preRegistered: boolean expected"; + return null; + }; + + /** + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.Fleet + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.Fleet} Fleet + */ + Fleet.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.Fleet) + return object; + var message = new $root.google.container.v1beta1.Fleet(); + if (object.project != null) + message.project = String(object.project); + if (object.membership != null) + message.membership = String(object.membership); + if (object.preRegistered != null) + message.preRegistered = Boolean(object.preRegistered); + return message; + }; + + /** + * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.Fleet + * @static + * @param {google.container.v1beta1.Fleet} message Fleet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fleet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.membership = ""; + object.preRegistered = false; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; + if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) + object.preRegistered = message.preRegistered; + return object; + }; + + /** + * Converts this Fleet to JSON. + * @function toJSON + * @memberof google.container.v1beta1.Fleet + * @instance + * @returns {Object.} JSON object + */ + Fleet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Fleet + * @function getTypeUrl + * @memberof google.container.v1beta1.Fleet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.Fleet"; + }; + + return Fleet; + })(); + + /** + * StackType enum. + * @name google.container.v1beta1.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4=1 IPV4 value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + v1beta1.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + v1beta1.ResourceManagerTags = (function() { + + /** + * Properties of a ResourceManagerTags. + * @memberof google.container.v1beta1 + * @interface IResourceManagerTags + * @property {Object.|null} [tags] ResourceManagerTags tags + */ + + /** + * Constructs a new ResourceManagerTags. + * @memberof google.container.v1beta1 + * @classdesc Represents a ResourceManagerTags. + * @implements IResourceManagerTags + * @constructor + * @param {google.container.v1beta1.IResourceManagerTags=} [properties] Properties to set + */ + function ResourceManagerTags(properties) { + this.tags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceManagerTags tags. + * @member {Object.} tags + * @memberof google.container.v1beta1.ResourceManagerTags + * @instance + */ + ResourceManagerTags.prototype.tags = $util.emptyObject; + + /** + * Creates a new ResourceManagerTags instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {google.container.v1beta1.IResourceManagerTags=} [properties] Properties to set + * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags instance + */ + ResourceManagerTags.create = function create(properties) { + return new ResourceManagerTags(properties); + }; + + /** + * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {google.container.v1beta1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceManagerTags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {google.container.v1beta1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceManagerTags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceManagerTags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceManagerTags(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceManagerTags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceManagerTags message. + * @function verify + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceManagerTags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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"; + } + return null; + }; + + /** + * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags + */ + ResourceManagerTags.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.ResourceManagerTags) + return object; + var message = new $root.google.container.v1beta1.ResourceManagerTags(); + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.container.v1beta1.ResourceManagerTags.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]]); + } + return message; + }; + + /** + * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {google.container.v1beta1.ResourceManagerTags} message ResourceManagerTags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceManagerTags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.tags = {}; + 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]]; + } + return object; + }; + + /** + * Converts this ResourceManagerTags to JSON. + * @function toJSON + * @memberof google.container.v1beta1.ResourceManagerTags + * @instance + * @returns {Object.} JSON object + */ + ResourceManagerTags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceManagerTags + * @function getTypeUrl + * @memberof google.container.v1beta1.ResourceManagerTags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceManagerTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.ResourceManagerTags"; + }; + + return ResourceManagerTags; + })(); + + v1beta1.EnterpriseConfig = (function() { + + /** + * Properties of an EnterpriseConfig. + * @memberof google.container.v1beta1 + * @interface IEnterpriseConfig + * @property {google.container.v1beta1.EnterpriseConfig.ClusterTier|null} [clusterTier] EnterpriseConfig clusterTier + */ + + /** + * Constructs a new EnterpriseConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents an EnterpriseConfig. + * @implements IEnterpriseConfig + * @constructor + * @param {google.container.v1beta1.IEnterpriseConfig=} [properties] Properties to set + */ + function EnterpriseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnterpriseConfig clusterTier. + * @member {google.container.v1beta1.EnterpriseConfig.ClusterTier} clusterTier + * @memberof google.container.v1beta1.EnterpriseConfig + * @instance + */ + EnterpriseConfig.prototype.clusterTier = 0; + + /** + * Creates a new EnterpriseConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {google.container.v1beta1.IEnterpriseConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig instance + */ + EnterpriseConfig.create = function create(properties) { + return new EnterpriseConfig(properties); + }; + + /** + * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {google.container.v1beta1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnterpriseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterTier); + return writer; + }; + + /** + * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {google.container.v1beta1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnterpriseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EnterpriseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clusterTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnterpriseConfig message. + * @function verify + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnterpriseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) + switch (message.clusterTier) { + default: + return "clusterTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig + */ + EnterpriseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.EnterpriseConfig) + return object; + var message = new $root.google.container.v1beta1.EnterpriseConfig(); + switch (object.clusterTier) { + default: + if (typeof object.clusterTier === "number") { + message.clusterTier = object.clusterTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.clusterTier = 0; + break; + case "STANDARD": + case 1: + message.clusterTier = 1; + break; + case "ENTERPRISE": + case 2: + message.clusterTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {google.container.v1beta1.EnterpriseConfig} message EnterpriseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnterpriseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) + object.clusterTier = options.enums === String ? $root.google.container.v1beta1.EnterpriseConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.container.v1beta1.EnterpriseConfig.ClusterTier[message.clusterTier] : message.clusterTier; + return object; + }; + + /** + * Converts this EnterpriseConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.EnterpriseConfig + * @instance + * @returns {Object.} JSON object + */ + EnterpriseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnterpriseConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.EnterpriseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.EnterpriseConfig"; + }; + + /** + * ClusterTier enum. + * @name google.container.v1beta1.EnterpriseConfig.ClusterTier + * @enum {number} + * @property {number} CLUSTER_TIER_UNSPECIFIED=0 CLUSTER_TIER_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} ENTERPRISE=2 ENTERPRISE value + */ + EnterpriseConfig.ClusterTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLUSTER_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "ENTERPRISE"] = 2; + return values; + })(); + + return EnterpriseConfig; + })(); + + v1beta1.SecretManagerConfig = (function() { + + /** + * Properties of a SecretManagerConfig. + * @memberof google.container.v1beta1 + * @interface ISecretManagerConfig + * @property {boolean|null} [enabled] SecretManagerConfig enabled + */ + + /** + * Constructs a new SecretManagerConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a SecretManagerConfig. + * @implements ISecretManagerConfig + * @constructor + * @param {google.container.v1beta1.ISecretManagerConfig=} [properties] Properties to set + */ + function SecretManagerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretManagerConfig enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.container.v1beta1.SecretManagerConfig + * @instance + */ + SecretManagerConfig.prototype.enabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecretManagerConfig _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.container.v1beta1.SecretManagerConfig + * @instance + */ + Object.defineProperty(SecretManagerConfig.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {google.container.v1beta1.ISecretManagerConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig instance + */ + SecretManagerConfig.create = function create(properties) { + return new SecretManagerConfig(properties); + }; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {google.container.v1beta1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {google.container.v1beta1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecretManagerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretManagerConfig message. + * @function verify + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretManagerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + return null; + }; + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig + */ + SecretManagerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SecretManagerConfig) + return object; + var message = new $root.google.container.v1beta1.SecretManagerConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {google.container.v1beta1.SecretManagerConfig} message SecretManagerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretManagerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + return object; + }; + + /** + * Converts this SecretManagerConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SecretManagerConfig + * @instance + * @returns {Object.} JSON object + */ + SecretManagerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretManagerConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.SecretManagerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SecretManagerConfig"; + }; + + return SecretManagerConfig; + })(); + + v1beta1.SecondaryBootDisk = (function() { + + /** + * Properties of a SecondaryBootDisk. + * @memberof google.container.v1beta1 + * @interface ISecondaryBootDisk + * @property {google.container.v1beta1.SecondaryBootDisk.Mode|null} [mode] SecondaryBootDisk mode + * @property {string|null} [diskImage] SecondaryBootDisk diskImage + */ + + /** + * Constructs a new SecondaryBootDisk. + * @memberof google.container.v1beta1 + * @classdesc Represents a SecondaryBootDisk. + * @implements ISecondaryBootDisk + * @constructor + * @param {google.container.v1beta1.ISecondaryBootDisk=} [properties] Properties to set + */ + function SecondaryBootDisk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecondaryBootDisk mode. + * @member {google.container.v1beta1.SecondaryBootDisk.Mode} mode + * @memberof google.container.v1beta1.SecondaryBootDisk + * @instance + */ + SecondaryBootDisk.prototype.mode = 0; + + /** + * SecondaryBootDisk diskImage. + * @member {string} diskImage + * @memberof google.container.v1beta1.SecondaryBootDisk + * @instance + */ + SecondaryBootDisk.prototype.diskImage = ""; + + /** + * Creates a new SecondaryBootDisk instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {google.container.v1beta1.ISecondaryBootDisk=} [properties] Properties to set + * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk instance + */ + SecondaryBootDisk.create = function create(properties) { + return new SecondaryBootDisk(properties); + }; + + /** + * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {google.container.v1beta1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.diskImage != null && Object.hasOwnProperty.call(message, "diskImage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.diskImage); + return writer; + }; + + /** + * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {google.container.v1beta1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDisk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecondaryBootDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.diskImage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecondaryBootDisk message. + * @function verify + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecondaryBootDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + break; + } + if (message.diskImage != null && message.hasOwnProperty("diskImage")) + if (!$util.isString(message.diskImage)) + return "diskImage: string expected"; + return null; + }; + + /** + * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk + */ + SecondaryBootDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SecondaryBootDisk) + return object; + var message = new $root.google.container.v1beta1.SecondaryBootDisk(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "CONTAINER_IMAGE_CACHE": + case 1: + message.mode = 1; + break; + } + if (object.diskImage != null) + message.diskImage = String(object.diskImage); + return message; + }; + + /** + * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {google.container.v1beta1.SecondaryBootDisk} message SecondaryBootDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecondaryBootDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.diskImage = ""; + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.container.v1beta1.SecondaryBootDisk.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.SecondaryBootDisk.Mode[message.mode] : message.mode; + if (message.diskImage != null && message.hasOwnProperty("diskImage")) + object.diskImage = message.diskImage; + return object; + }; + + /** + * Converts this SecondaryBootDisk to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SecondaryBootDisk + * @instance + * @returns {Object.} JSON object + */ + SecondaryBootDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecondaryBootDisk + * @function getTypeUrl + * @memberof google.container.v1beta1.SecondaryBootDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecondaryBootDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SecondaryBootDisk"; + }; + + /** + * Mode enum. + * @name google.container.v1beta1.SecondaryBootDisk.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} CONTAINER_IMAGE_CACHE=1 CONTAINER_IMAGE_CACHE value + */ + SecondaryBootDisk.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINER_IMAGE_CACHE"] = 1; + return values; + })(); + + return SecondaryBootDisk; + })(); + + /** + * InTransitEncryptionConfig enum. + * @name google.container.v1beta1.InTransitEncryptionConfig + * @enum {number} + * @property {number} IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED=0 IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED value + * @property {number} IN_TRANSIT_ENCRYPTION_DISABLED=1 IN_TRANSIT_ENCRYPTION_DISABLED value + * @property {number} IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT=2 IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT value + */ + v1beta1.InTransitEncryptionConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_TRANSIT_ENCRYPTION_DISABLED"] = 1; + values[valuesById[2] = "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT"] = 2; + return values; + })(); + + v1beta1.SecondaryBootDiskUpdateStrategy = (function() { + + /** + * Properties of a SecondaryBootDiskUpdateStrategy. + * @memberof google.container.v1beta1 + * @interface ISecondaryBootDiskUpdateStrategy + */ + + /** + * Constructs a new SecondaryBootDiskUpdateStrategy. + * @memberof google.container.v1beta1 + * @classdesc Represents a SecondaryBootDiskUpdateStrategy. + * @implements ISecondaryBootDiskUpdateStrategy + * @constructor + * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set + */ + function SecondaryBootDiskUpdateStrategy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set + * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy instance + */ + SecondaryBootDiskUpdateStrategy.create = function create(properties) { + return new SecondaryBootDiskUpdateStrategy(properties); + }; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDiskUpdateStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecondaryBootDiskUpdateStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDiskUpdateStrategy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecondaryBootDiskUpdateStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecondaryBootDiskUpdateStrategy message. + * @function verify + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecondaryBootDiskUpdateStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy + */ + SecondaryBootDiskUpdateStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy) + return object; + return new $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy(); + }; + + /** + * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecondaryBootDiskUpdateStrategy.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SecondaryBootDiskUpdateStrategy to JSON. + * @function toJSON + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @instance + * @returns {Object.} JSON object + */ + SecondaryBootDiskUpdateStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecondaryBootDiskUpdateStrategy + * @function getTypeUrl + * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecondaryBootDiskUpdateStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.SecondaryBootDiskUpdateStrategy"; + }; + + return SecondaryBootDiskUpdateStrategy; + })(); + + return v1beta1; + })(); + + return container; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.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.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.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.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), 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.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + /** + * Code enum. + * @name google.rpc.Code + * @enum {number} + * @property {number} OK=0 OK value + * @property {number} CANCELLED=1 CANCELLED value + * @property {number} UNKNOWN=2 UNKNOWN value + * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value + * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value + * @property {number} NOT_FOUND=5 NOT_FOUND value + * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value + * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value + * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value + * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value + * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value + * @property {number} ABORTED=10 ABORTED value + * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value + * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value + * @property {number} INTERNAL=13 INTERNAL value + * @property {number} UNAVAILABLE=14 UNAVAILABLE value + * @property {number} DATA_LOSS=15 DATA_LOSS value + */ + rpc.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OK"] = 0; + values[valuesById[1] = "CANCELLED"] = 1; + values[valuesById[2] = "UNKNOWN"] = 2; + values[valuesById[3] = "INVALID_ARGUMENT"] = 3; + values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; + values[valuesById[5] = "NOT_FOUND"] = 5; + values[valuesById[6] = "ALREADY_EXISTS"] = 6; + values[valuesById[7] = "PERMISSION_DENIED"] = 7; + values[valuesById[16] = "UNAUTHENTICATED"] = 16; + values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; + values[valuesById[9] = "FAILED_PRECONDITION"] = 9; + values[valuesById[10] = "ABORTED"] = 10; + values[valuesById[11] = "OUT_OF_RANGE"] = 11; + values[valuesById[12] = "UNIMPLEMENTED"] = 12; + values[valuesById[13] = "INTERNAL"] = 13; + values[valuesById[14] = "UNAVAILABLE"] = 14; + values[valuesById[15] = "DATA_LOSS"] = 15; + return values; + })(); + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.json b/owl-bot-staging/google-container/v1beta1/protos/protos.json new file mode 100644 index 00000000000..9a8f8b114db --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/protos/protos.json @@ -0,0 +1,9015 @@ +{ + "nested": { + "google": { + "nested": { + "container": { + "nested": { + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Container.V1Beta1", + "go_package": "cloud.google.com/go/container/apiv1beta1/containerpb;containerpb", + "java_multiple_files": true, + "java_outer_classname": "ClusterServiceProto", + "java_package": "com.google.container.v1beta1", + "php_namespace": "Google\\Cloud\\Container\\V1beta1", + "ruby_package": "Google::Cloud::Container::V1beta1", + "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", + "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" + }, + "nested": { + "ClusterManager": { + "options": { + "(google.api.default_host)": "container.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListClusters": { + "requestType": "ListClustersRequest", + "responseType": "ListClustersResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/clusters", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", + "(google.api.method_signature)": "project_id,zone" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/clusters", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + } + ] + }, + "GetCluster": { + "requestType": "GetClusterRequest", + "responseType": "Cluster", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + } + ] + }, + "CreateCluster": { + "requestType": "CreateClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/clusters", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/clusters", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster" + } + ] + }, + "UpdateCluster": { + "requestType": "UpdateClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).put": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.put": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,update" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "body": "*", + "additional_bindings": { + "put": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,update" + } + ] + }, + "UpdateNodePool": { + "requestType": "UpdateNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).put": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", + "body": "*" + } + } + } + ] + }, + "SetNodePoolAutoscaling": { + "requestType": "SetNodePoolAutoscalingRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", + "body": "*" + } + } + } + ] + }, + "SetLoggingService": { + "requestType": "SetLoggingServiceRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" + } + ] + }, + "SetMonitoringService": { + "requestType": "SetMonitoringServiceRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" + } + ] + }, + "SetAddonsConfig": { + "requestType": "SetAddonsConfigRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" + } + ] + }, + "SetLocations": { + "requestType": "SetLocationsRequest", + "responseType": "Operation", + "options": { + "deprecated": true, + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,locations" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,locations" + } + ] + }, + "UpdateMaster": { + "requestType": "UpdateMasterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" + } + ] + }, + "SetMasterAuth": { + "requestType": "SetMasterAuthRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", + "body": "*" + } + } + } + ] + }, + "DeleteCluster": { + "requestType": "DeleteClusterRequest", + "responseType": "Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "(google.api.http).additional_bindings.delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/clusters/*}", + "additional_bindings": { + "delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + } + ] + }, + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/operations", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/operations", + "(google.api.method_signature)": "project_id,zone" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/operations", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/operations" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/operations/*}", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}", + "(google.api.method_signature)": "project_id,zone,operation_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/operations/*}", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,operation_id" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,operation_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,operation_id" + } + ] + }, + "GetServerConfig": { + "requestType": "GetServerConfigRequest", + "responseType": "ServerConfig", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*}/serverConfig", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig", + "(google.api.method_signature)": "project_id,zone" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*}/serverConfig", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone" + } + ] + }, + "GetJSONWebKeys": { + "requestType": "GetJSONWebKeysRequest", + "responseType": "GetJSONWebKeysResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + } + } + ] + }, + "ListNodePools": { + "requestType": "ListNodePoolsRequest", + "responseType": "ListNodePoolsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + } + ] + }, + "GetNodePool": { + "requestType": "GetNodePoolRequest", + "responseType": "NodePool", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "additional_bindings": { + "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + } + ] + }, + "CreateNodePool": { + "requestType": "CreateNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" + } + ] + }, + "DeleteNodePool": { + "requestType": "DeleteNodePoolRequest", + "responseType": "Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "(google.api.http).additional_bindings.delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", + "additional_bindings": { + "delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + } + ] + }, + "CompleteNodePoolUpgrade": { + "requestType": "CompleteNodePoolUpgradeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", + "body": "*" + } + } + ] + }, + "RollbackNodePoolUpgrade": { + "requestType": "RollbackNodePoolUpgradeRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" + } + ] + }, + "SetNodePoolManagement": { + "requestType": "SetNodePoolManagementRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id,management" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id,management" + } + ] + }, + "SetLabels": { + "requestType": "SetLabelsRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,resource_labels,label_fingerprint" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,resource_labels,label_fingerprint" + } + ] + }, + "SetLegacyAbac": { + "requestType": "SetLegacyAbacRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" + } + ] + }, + "StartIPRotation": { + "requestType": "StartIPRotationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + } + ] + }, + "CompleteIPRotation": { + "requestType": "CompleteIPRotationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id" + } + ] + }, + "SetNodePoolSize": { + "requestType": "SetNodePoolSizeRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", + "body": "*" + } + } + } + ] + }, + "SetNetworkPolicy": { + "requestType": "SetNetworkPolicyRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" + } + ] + }, + "SetMaintenancePolicy": { + "requestType": "SetMaintenancePolicyRequest", + "responseType": "Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" + } + ] + }, + "ListUsableSubnetworks": { + "requestType": "ListUsableSubnetworksRequest", + "responseType": "ListUsableSubnetworksResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CheckAutopilotCompatibility": { + "requestType": "CheckAutopilotCompatibilityRequest", + "responseType": "CheckAutopilotCompatibilityResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" + } + } + ] + }, + "ListLocations": { + "requestType": "ListLocationsRequest", + "responseType": "ListLocationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*}/locations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/locations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "LinuxNodeConfig": { + "oneofs": { + "_hugepages": { + "oneof": [ + "hugepages" + ] + } + }, + "fields": { + "sysctls": { + "keyType": "string", + "type": "string", + "id": 1 + }, + "cgroupMode": { + "type": "CgroupMode", + "id": 2 + }, + "hugepages": { + "type": "HugepagesConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "CgroupMode": { + "values": { + "CGROUP_MODE_UNSPECIFIED": 0, + "CGROUP_MODE_V1": 1, + "CGROUP_MODE_V2": 2 + } + }, + "HugepagesConfig": { + "oneofs": { + "_hugepageSize2m": { + "oneof": [ + "hugepageSize2m" + ] + }, + "_hugepageSize1g": { + "oneof": [ + "hugepageSize1g" + ] + } + }, + "fields": { + "hugepageSize2m": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "hugepageSize1g": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + } + } + }, + "WindowsNodeConfig": { + "fields": { + "osVersion": { + "type": "OSVersion", + "id": 1 + } + }, + "nested": { + "OSVersion": { + "values": { + "OS_VERSION_UNSPECIFIED": 0, + "OS_VERSION_LTSC2019": 1, + "OS_VERSION_LTSC2022": 2 + } + } + } + }, + "NodeKubeletConfig": { + "oneofs": { + "_insecureKubeletReadonlyPortEnabled": { + "oneof": [ + "insecureKubeletReadonlyPortEnabled" + ] + } + }, + "fields": { + "cpuManagerPolicy": { + "type": "string", + "id": 1 + }, + "cpuCfsQuota": { + "type": "google.protobuf.BoolValue", + "id": 2 + }, + "cpuCfsQuotaPeriod": { + "type": "string", + "id": 3 + }, + "podPidsLimit": { + "type": "int64", + "id": 4 + }, + "insecureKubeletReadonlyPortEnabled": { + "type": "bool", + "id": 7, + "options": { + "proto3_optional": true + } + } + } + }, + "NodeConfig": { + "oneofs": { + "_fastSocket": { + "oneof": [ + "fastSocket" + ] + }, + "_secondaryBootDiskUpdateStrategy": { + "oneof": [ + "secondaryBootDiskUpdateStrategy" + ] + } + }, + "fields": { + "machineType": { + "type": "string", + "id": 1 + }, + "diskSizeGb": { + "type": "int32", + "id": 2 + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "serviceAccount": { + "type": "string", + "id": 9 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "imageType": { + "type": "string", + "id": 5 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "localSsdCount": { + "type": "int32", + "id": 7 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "preemptible": { + "type": "bool", + "id": 10 + }, + "accelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 11 + }, + "sandboxConfig": { + "type": "SandboxConfig", + "id": 17 + }, + "nodeGroup": { + "type": "string", + "id": 18 + }, + "reservationAffinity": { + "type": "ReservationAffinity", + "id": 19 + }, + "diskType": { + "type": "string", + "id": 12 + }, + "minCpuPlatform": { + "type": "string", + "id": 13 + }, + "workloadMetadataConfig": { + "type": "WorkloadMetadataConfig", + "id": 14 + }, + "taints": { + "rule": "repeated", + "type": "NodeTaint", + "id": 15 + }, + "bootDiskKmsKey": { + "type": "string", + "id": 23 + }, + "shieldedInstanceConfig": { + "type": "ShieldedInstanceConfig", + "id": 20 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 21 + }, + "kubeletConfig": { + "type": "NodeKubeletConfig", + "id": 22 + }, + "ephemeralStorageConfig": { + "type": "EphemeralStorageConfig", + "id": 24 + }, + "gcfsConfig": { + "type": "GcfsConfig", + "id": 25 + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 26 + }, + "gvnic": { + "type": "VirtualNIC", + "id": 29 + }, + "spot": { + "type": "bool", + "id": 32 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 35 + }, + "fastSocket": { + "type": "FastSocket", + "id": 36, + "options": { + "proto3_optional": true + } + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 37 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 38 + }, + "windowsNodeConfig": { + "type": "WindowsNodeConfig", + "id": 39 + }, + "localNvmeSsdBlockConfig": { + "type": "LocalNvmeSsdBlockConfig", + "id": 40 + }, + "ephemeralStorageLocalSsdConfig": { + "type": "EphemeralStorageLocalSsdConfig", + "id": 41 + }, + "soleTenantConfig": { + "type": "SoleTenantConfig", + "id": 42 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 43 + }, + "hostMaintenancePolicy": { + "type": "HostMaintenancePolicy", + "id": 44 + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 45 + }, + "enableConfidentialStorage": { + "type": "bool", + "id": 46, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secondaryBootDisks": { + "rule": "repeated", + "type": "SecondaryBootDisk", + "id": 48 + }, + "secondaryBootDiskUpdateStrategy": { + "type": "SecondaryBootDiskUpdateStrategy", + "id": 50, + "options": { + "proto3_optional": true + } + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + } + }, + "fields": { + "threadsPerCore": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enableNestedVirtualization": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "NodeNetworkConfig": { + "oneofs": { + "_enablePrivateNodes": { + "oneof": [ + "enablePrivateNodes" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + } + }, + "fields": { + "createPodRange": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "podRange": { + "type": "string", + "id": 5 + }, + "podIpv4CidrBlock": { + "type": "string", + "id": 6 + }, + "enablePrivateNodes": { + "type": "bool", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "podCidrOverprovisionConfig": { + "type": "PodCIDROverprovisionConfig", + "id": 13 + }, + "additionalNodeNetworkConfigs": { + "rule": "repeated", + "type": "AdditionalNodeNetworkConfig", + "id": 14 + }, + "additionalPodNetworkConfigs": { + "rule": "repeated", + "type": "AdditionalPodNetworkConfig", + "id": 15 + }, + "podIpv4RangeUtilization": { + "type": "double", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + }, + "_externalIpEgressBandwidthTier": { + "oneof": [ + "externalIpEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "externalIpEgressBandwidthTier": { + "type": "Tier", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "TIER_1": 1 + } + } + } + } + } + }, + "AdditionalNodeNetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1 + }, + "subnetwork": { + "type": "string", + "id": 2 + } + } + }, + "AdditionalPodNetworkConfig": { + "oneofs": { + "_maxPodsPerNode": { + "oneof": [ + "maxPodsPerNode" + ] + } + }, + "fields": { + "subnetwork": { + "type": "string", + "id": 1 + }, + "secondaryPodRange": { + "type": "string", + "id": 2 + }, + "maxPodsPerNode": { + "type": "MaxPodsConstraint", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "ShieldedInstanceConfig": { + "fields": { + "enableSecureBoot": { + "type": "bool", + "id": 1 + }, + "enableIntegrityMonitoring": { + "type": "bool", + "id": 2 + } + } + }, + "SandboxConfig": { + "fields": { + "sandboxType": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "type": { + "type": "Type", + "id": 2 + } + }, + "nested": { + "Type": { + "values": { + "UNSPECIFIED": 0, + "GVISOR": 1 + } + } + } + }, + "EphemeralStorageConfig": { + "fields": { + "localSsdCount": { + "type": "int32", + "id": 1 + } + } + }, + "LocalNvmeSsdBlockConfig": { + "fields": { + "localSsdCount": { + "type": "int32", + "id": 1 + } + } + }, + "EphemeralStorageLocalSsdConfig": { + "fields": { + "localSsdCount": { + "type": "int32", + "id": 1 + } + } + }, + "GcfsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ReservationAffinity": { + "fields": { + "consumeReservationType": { + "type": "Type", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "SoleTenantConfig": { + "fields": { + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 1 + } + }, + "nested": { + "NodeAffinity": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "operator": { + "type": "Operator", + "id": 2 + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } + } + } + } + }, + "ContainerdConfig": { + "fields": { + "privateRegistryAccessConfig": { + "type": "PrivateRegistryAccessConfig", + "id": 1 + } + }, + "nested": { + "PrivateRegistryAccessConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "certificateAuthorityDomainConfig": { + "rule": "repeated", + "type": "CertificateAuthorityDomainConfig", + "id": 2 + } + }, + "nested": { + "CertificateAuthorityDomainConfig": { + "oneofs": { + "certificateConfig": { + "oneof": [ + "gcpSecretManagerCertificateConfig" + ] + } + }, + "fields": { + "fqdns": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "gcpSecretManagerCertificateConfig": { + "type": "GCPSecretManagerCertificateConfig", + "id": 2 + } + }, + "nested": { + "GCPSecretManagerCertificateConfig": { + "fields": { + "secretUri": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } + }, + "HostMaintenancePolicy": { + "oneofs": { + "_maintenanceInterval": { + "oneof": [ + "maintenanceInterval" + ] + }, + "maintenanceStrategy": { + "oneof": [ + "opportunisticMaintenanceStrategy" + ] + } + }, + "fields": { + "maintenanceInterval": { + "type": "MaintenanceInterval", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "opportunisticMaintenanceStrategy": { + "type": "OpportunisticMaintenanceStrategy", + "id": 2 + } + }, + "nested": { + "MaintenanceInterval": { + "values": { + "MAINTENANCE_INTERVAL_UNSPECIFIED": 0, + "AS_NEEDED": 1, + "PERIODIC": 2 + } + }, + "OpportunisticMaintenanceStrategy": { + "oneofs": { + "_nodeIdleTimeWindow": { + "oneof": [ + "nodeIdleTimeWindow" + ] + }, + "_maintenanceAvailabilityWindow": { + "oneof": [ + "maintenanceAvailabilityWindow" + ] + }, + "_minNodesPerPool": { + "oneof": [ + "minNodesPerPool" + ] + } + }, + "fields": { + "nodeIdleTimeWindow": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "maintenanceAvailabilityWindow": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "minNodesPerPool": { + "type": "int64", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "NodeTaint": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "effect": { + "type": "Effect", + "id": 3 + } + }, + "nested": { + "Effect": { + "values": { + "EFFECT_UNSPECIFIED": 0, + "NO_SCHEDULE": 1, + "PREFER_NO_SCHEDULE": 2, + "NO_EXECUTE": 3 + } + } + } + }, + "NodeTaints": { + "fields": { + "taints": { + "rule": "repeated", + "type": "NodeTaint", + "id": 1 + } + } + }, + "NodeLabels": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "ResourceLabels": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "NetworkTags": { + "fields": { + "tags": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "MasterAuth": { + "fields": { + "username": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "password": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "clientCertificateConfig": { + "type": "ClientCertificateConfig", + "id": 3 + }, + "clusterCaCertificate": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientCertificate": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientKey": { + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ClientCertificateConfig": { + "fields": { + "issueClientCertificate": { + "type": "bool", + "id": 1 + } + } + }, + "AddonsConfig": { + "fields": { + "httpLoadBalancing": { + "type": "HttpLoadBalancing", + "id": 1 + }, + "horizontalPodAutoscaling": { + "type": "HorizontalPodAutoscaling", + "id": 2 + }, + "kubernetesDashboard": { + "type": "KubernetesDashboard", + "id": 3, + "options": { + "deprecated": true + } + }, + "networkPolicyConfig": { + "type": "NetworkPolicyConfig", + "id": 4 + }, + "istioConfig": { + "type": "IstioConfig", + "id": 5, + "options": { + "deprecated": true + } + }, + "cloudRunConfig": { + "type": "CloudRunConfig", + "id": 7 + }, + "dnsCacheConfig": { + "type": "DnsCacheConfig", + "id": 8 + }, + "configConnectorConfig": { + "type": "ConfigConnectorConfig", + "id": 10 + }, + "gcePersistentDiskCsiDriverConfig": { + "type": "GcePersistentDiskCsiDriverConfig", + "id": 11 + }, + "kalmConfig": { + "type": "KalmConfig", + "id": 12, + "options": { + "deprecated": true + } + }, + "gcpFilestoreCsiDriverConfig": { + "type": "GcpFilestoreCsiDriverConfig", + "id": 14 + }, + "gkeBackupAgentConfig": { + "type": "GkeBackupAgentConfig", + "id": 16 + }, + "gcsFuseCsiDriverConfig": { + "type": "GcsFuseCsiDriverConfig", + "id": 17 + }, + "statefulHaConfig": { + "type": "StatefulHAConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rayOperatorConfig": { + "type": "RayOperatorConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "HttpLoadBalancing": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "HorizontalPodAutoscaling": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "KubernetesDashboard": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "NetworkPolicyConfig": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "DnsCacheConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "KalmConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "deprecated": true + } + } + } + }, + "GkeBackupAgentConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "StatefulHAConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ConfigConnectorConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcePersistentDiskCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcpFilestoreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GcsFuseCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "RayOperatorConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "rayClusterLoggingConfig": { + "type": "RayClusterLoggingConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rayClusterMonitoringConfig": { + "type": "RayClusterMonitoringConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateClusterMasterGlobalAccessConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateNodes": { + "type": "bool", + "id": 1 + }, + "enablePrivateEndpoint": { + "type": "bool", + "id": 2 + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 3 + }, + "privateEndpoint": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "publicEndpoint": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peeringName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "masterGlobalAccessConfig": { + "type": "PrivateClusterMasterGlobalAccessConfig", + "id": 8 + }, + "privateEndpointSubnetwork": { + "type": "string", + "id": 10 + } + } + }, + "IstioConfig": { + "fields": { + "disabled": { + "type": "bool", + "id": 1, + "options": { + "deprecated": true + } + }, + "auth": { + "type": "IstioAuthMode", + "id": 2, + "options": { + "deprecated": true + } + } + }, + "nested": { + "IstioAuthMode": { + "values": { + "AUTH_NONE": 0, + "AUTH_MUTUAL_TLS": 1 + } + } + } + }, + "CloudRunConfig": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 3 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "LOAD_BALANCER_TYPE_EXTERNAL": 1, + "LOAD_BALANCER_TYPE_INTERNAL": 2 + } + } + } + }, + "MasterAuthorizedNetworksConfig": { + "oneofs": { + "_gcpPublicCidrsAccessEnabled": { + "oneof": [ + "gcpPublicCidrsAccessEnabled" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "cidrBlocks": { + "rule": "repeated", + "type": "CidrBlock", + "id": 2 + }, + "gcpPublicCidrsAccessEnabled": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "CidrBlock": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "cidrBlock": { + "type": "string", + "id": 2 + } + } + } + } + }, + "LegacyAbac": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "NetworkPolicy": { + "fields": { + "provider": { + "type": "Provider", + "id": 1 + }, + "enabled": { + "type": "bool", + "id": 2 + } + }, + "nested": { + "Provider": { + "values": { + "PROVIDER_UNSPECIFIED": 0, + "CALICO": 1 + } + } + } + }, + "PodCIDROverprovisionConfig": { + "fields": { + "disable": { + "type": "bool", + "id": 1 + } + } + }, + "IPAllocationPolicy": { + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1 + }, + "createSubnetwork": { + "type": "bool", + "id": 2 + }, + "subnetworkName": { + "type": "string", + "id": 3 + }, + "clusterIpv4Cidr": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "nodeIpv4Cidr": { + "type": "string", + "id": 5, + "options": { + "deprecated": true + } + }, + "servicesIpv4Cidr": { + "type": "string", + "id": 6, + "options": { + "deprecated": true + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 7 + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 8 + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 9 + }, + "nodeIpv4CidrBlock": { + "type": "string", + "id": 10 + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 11 + }, + "allowRouteOverlap": { + "type": "bool", + "id": 12 + }, + "tpuIpv4CidrBlock": { + "type": "string", + "id": 13 + }, + "useRoutes": { + "type": "bool", + "id": 15 + }, + "stackType": { + "type": "StackType", + "id": 16 + }, + "ipv6AccessType": { + "type": "IPv6AccessType", + "id": 17 + }, + "podCidrOverprovisionConfig": { + "type": "PodCIDROverprovisionConfig", + "id": 21 + }, + "subnetIpv6CidrBlock": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "servicesIpv6CidrBlock": { + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultPodIpv4RangeUtilization": { + "type": "double", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4": 1, + "IPV4_IPV6": 2 + } + }, + "IPv6AccessType": { + "values": { + "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + } + } + }, + "BinaryAuthorization": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "deprecated": true + } + }, + "evaluationMode": { + "type": "EvaluationMode", + "id": 2 + }, + "policyBindings": { + "rule": "repeated", + "type": "PolicyBinding", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EvaluationMode": { + "values": { + "EVALUATION_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "PROJECT_SINGLETON_POLICY_ENFORCE": 2, + "POLICY_BINDINGS": 5, + "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE": 6 + } + }, + "PolicyBinding": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "PodSecurityPolicyConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "AuthenticatorGroupsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "securityGroup": { + "type": "string", + "id": 2 + } + } + }, + "ClusterTelemetry": { + "fields": { + "type": { + "type": "Type", + "id": 1 + } + }, + "nested": { + "Type": { + "values": { + "UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2, + "SYSTEM_ONLY": 3 + } + } + } + }, + "Cluster": { + "oneofs": { + "_nodePoolDefaults": { + "oneof": [ + "nodePoolDefaults" + ] + }, + "_protectConfig": { + "oneof": [ + "protectConfig" + ] + }, + "_satisfiesPzs": { + "oneof": [ + "satisfiesPzs" + ] + }, + "_satisfiesPzi": { + "oneof": [ + "satisfiesPzi" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "initialNodeCount": { + "type": "int32", + "id": 3, + "options": { + "deprecated": true + } + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 4, + "options": { + "deprecated": true + } + }, + "masterAuth": { + "type": "MasterAuth", + "id": 5 + }, + "loggingService": { + "type": "string", + "id": 6 + }, + "monitoringService": { + "type": "string", + "id": 7 + }, + "network": { + "type": "string", + "id": 8 + }, + "clusterIpv4Cidr": { + "type": "string", + "id": 9 + }, + "addonsConfig": { + "type": "AddonsConfig", + "id": 10 + }, + "subnetwork": { + "type": "string", + "id": 11 + }, + "nodePools": { + "rule": "repeated", + "type": "NodePool", + "id": 12 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "enableKubernetesAlpha": { + "type": "bool", + "id": 14 + }, + "enableK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 143 + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 15 + }, + "labelFingerprint": { + "type": "string", + "id": 16 + }, + "legacyAbac": { + "type": "LegacyAbac", + "id": 18 + }, + "networkPolicy": { + "type": "NetworkPolicy", + "id": 19 + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 20 + }, + "masterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 22 + }, + "maintenancePolicy": { + "type": "MaintenancePolicy", + "id": 23 + }, + "binaryAuthorization": { + "type": "BinaryAuthorization", + "id": 24 + }, + "podSecurityPolicyConfig": { + "type": "PodSecurityPolicyConfig", + "id": 25 + }, + "autoscaling": { + "type": "ClusterAutoscaling", + "id": 26 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 27 + }, + "privateCluster": { + "type": "bool", + "id": 28, + "options": { + "deprecated": true + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 29, + "options": { + "deprecated": true + } + }, + "defaultMaxPodsConstraint": { + "type": "MaxPodsConstraint", + "id": 30 + }, + "resourceUsageExportConfig": { + "type": "ResourceUsageExportConfig", + "id": 33 + }, + "authenticatorGroupsConfig": { + "type": "AuthenticatorGroupsConfig", + "id": 34 + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 37 + }, + "verticalPodAutoscaling": { + "type": "VerticalPodAutoscaling", + "id": 39 + }, + "shieldedNodes": { + "type": "ShieldedNodes", + "id": 40 + }, + "releaseChannel": { + "type": "ReleaseChannel", + "id": 41 + }, + "workloadIdentityConfig": { + "type": "WorkloadIdentityConfig", + "id": 43 + }, + "workloadCertificates": { + "type": "WorkloadCertificates", + "id": 52 + }, + "meshCertificates": { + "type": "MeshCertificates", + "id": 67 + }, + "workloadAltsConfig": { + "type": "WorkloadALTSConfig", + "id": 53 + }, + "costManagementConfig": { + "type": "CostManagementConfig", + "id": 45 + }, + "clusterTelemetry": { + "type": "ClusterTelemetry", + "id": 46 + }, + "tpuConfig": { + "type": "TpuConfig", + "id": 47 + }, + "notificationConfig": { + "type": "NotificationConfig", + "id": 49 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 50 + }, + "identityServiceConfig": { + "type": "IdentityServiceConfig", + "id": 54 + }, + "selfLink": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "zone": { + "type": "string", + "id": 101, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endpoint": { + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "initialClusterVersion": { + "type": "string", + "id": 103 + }, + "currentMasterVersion": { + "type": "string", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentNodeVersion": { + "type": "string", + "id": 105, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "string", + "id": 106, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 107, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 108, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeIpv4CidrSize": { + "type": "int32", + "id": 109, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "servicesIpv4Cidr": { + "type": "string", + "id": 110, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 111, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentNodeCount": { + "type": "int32", + "id": 112, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "string", + "id": 113, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 114, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enableTpu": { + "type": "bool", + "id": 115 + }, + "tpuIpv4CidrBlock": { + "type": "string", + "id": 116, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "databaseEncryption": { + "type": "DatabaseEncryption", + "id": 38 + }, + "conditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 118 + }, + "master": { + "type": "Master", + "id": 124 + }, + "autopilot": { + "type": "Autopilot", + "id": 128 + }, + "id": { + "type": "string", + "id": 129, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodePoolDefaults": { + "type": "NodePoolDefaults", + "id": 131, + "options": { + "proto3_optional": true + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 132 + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 133 + }, + "nodePoolAutoConfig": { + "type": "NodePoolAutoConfig", + "id": 136 + }, + "protectConfig": { + "type": "ProtectConfig", + "id": 137, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 139 + }, + "fleet": { + "type": "Fleet", + "id": 140 + }, + "securityPostureConfig": { + "type": "SecurityPostureConfig", + "id": 145 + }, + "enterpriseConfig": { + "type": "EnterpriseConfig", + "id": 149 + }, + "secretManagerConfig": { + "type": "SecretManagerConfig", + "id": 150 + }, + "compliancePostureConfig": { + "type": "CompliancePostureConfig", + "id": 151 + }, + "satisfiesPzs": { + "type": "bool", + "id": 152, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 153, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RECONCILING": 3, + "STOPPING": 4, + "ERROR": 5, + "DEGRADED": 6 + } + } + } + }, + "CompliancePostureConfig": { + "oneofs": { + "_mode": { + "oneof": [ + "mode" + ] + } + }, + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "complianceStandards": { + "rule": "repeated", + "type": "ComplianceStandard", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + }, + "ComplianceStandard": { + "oneofs": { + "_standard": { + "oneof": [ + "standard" + ] + } + }, + "fields": { + "standard": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "K8sBetaAPIConfig": { + "fields": { + "enabledApis": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "WorkloadConfig": { + "oneofs": { + "_auditMode": { + "oneof": [ + "auditMode" + ] + } + }, + "fields": { + "auditMode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Mode": { + "valuesOptions": { + "BASELINE": { + "deprecated": true + }, + "RESTRICTED": { + "deprecated": true + } + }, + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "BASIC": 4, + "BASELINE": 2, + "RESTRICTED": 3 + } + } + } + }, + "ProtectConfig": { + "oneofs": { + "_workloadConfig": { + "oneof": [ + "workloadConfig" + ] + }, + "_workloadVulnerabilityMode": { + "oneof": [ + "workloadVulnerabilityMode" + ] + } + }, + "fields": { + "workloadConfig": { + "type": "WorkloadConfig", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "workloadVulnerabilityMode": { + "type": "WorkloadVulnerabilityMode", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "WorkloadVulnerabilityMode": { + "values": { + "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "BASIC": 2 + } + } + } + }, + "SecurityPostureConfig": { + "oneofs": { + "_mode": { + "oneof": [ + "mode" + ] + }, + "_vulnerabilityMode": { + "oneof": [ + "vulnerabilityMode" + ] + } + }, + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "vulnerabilityMode": { + "type": "VulnerabilityMode", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "BASIC": 2, + "ENTERPRISE": 3 + } + }, + "VulnerabilityMode": { + "values": { + "VULNERABILITY_MODE_UNSPECIFIED": 0, + "VULNERABILITY_DISABLED": 1, + "VULNERABILITY_BASIC": 2, + "VULNERABILITY_ENTERPRISE": 3 + } + } + } + }, + "NodePoolDefaults": { + "fields": { + "nodeConfigDefaults": { + "type": "NodeConfigDefaults", + "id": 1 + } + } + }, + "NodeConfigDefaults": { + "fields": { + "gcfsConfig": { + "type": "GcfsConfig", + "id": 1 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 3 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 4 + }, + "hostMaintenancePolicy": { + "type": "HostMaintenancePolicy", + "id": 5 + }, + "nodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 6 + } + } + }, + "NodePoolAutoConfig": { + "fields": { + "networkTags": { + "type": "NetworkTags", + "id": 1 + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 2 + }, + "nodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 3 + } + } + }, + "ClusterUpdate": { + "oneofs": { + "_desiredEnablePrivateEndpoint": { + "oneof": [ + "desiredEnablePrivateEndpoint" + ] + }, + "_desiredProtectConfig": { + "oneof": [ + "desiredProtectConfig" + ] + }, + "_desiredEnableFqdnNetworkPolicy": { + "oneof": [ + "desiredEnableFqdnNetworkPolicy" + ] + }, + "_desiredEnableMultiNetworking": { + "oneof": [ + "desiredEnableMultiNetworking" + ] + }, + "_desiredInTransitEncryptionConfig": { + "oneof": [ + "desiredInTransitEncryptionConfig" + ] + }, + "_desiredEnableCiliumClusterwideNetworkPolicy": { + "oneof": [ + "desiredEnableCiliumClusterwideNetworkPolicy" + ] + }, + "_desiredSecretManagerConfig": { + "oneof": [ + "desiredSecretManagerConfig" + ] + } + }, + "fields": { + "desiredNodeVersion": { + "type": "string", + "id": 4 + }, + "desiredMonitoringService": { + "type": "string", + "id": 5 + }, + "desiredAddonsConfig": { + "type": "AddonsConfig", + "id": 6 + }, + "desiredNodePoolId": { + "type": "string", + "id": 7 + }, + "desiredImageType": { + "type": "string", + "id": 8 + }, + "desiredNodePoolAutoscaling": { + "type": "NodePoolAutoscaling", + "id": 9 + }, + "desiredLocations": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "desiredMasterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 12 + }, + "desiredPodSecurityPolicyConfig": { + "type": "PodSecurityPolicyConfig", + "id": 14 + }, + "desiredClusterAutoscaling": { + "type": "ClusterAutoscaling", + "id": 15 + }, + "desiredBinaryAuthorization": { + "type": "BinaryAuthorization", + "id": 16 + }, + "desiredLoggingService": { + "type": "string", + "id": 19 + }, + "desiredResourceUsageExportConfig": { + "type": "ResourceUsageExportConfig", + "id": 21 + }, + "desiredVerticalPodAutoscaling": { + "type": "VerticalPodAutoscaling", + "id": 22 + }, + "desiredPrivateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 25 + }, + "desiredIntraNodeVisibilityConfig": { + "type": "IntraNodeVisibilityConfig", + "id": 26 + }, + "desiredDefaultSnatStatus": { + "type": "DefaultSnatStatus", + "id": 28 + }, + "desiredClusterTelemetry": { + "type": "ClusterTelemetry", + "id": 30 + }, + "desiredReleaseChannel": { + "type": "ReleaseChannel", + "id": 31 + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 37, + "options": { + "deprecated": true + } + }, + "desiredTpuConfig": { + "type": "TpuConfig", + "id": 38 + }, + "desiredL4ilbSubsettingConfig": { + "type": "ILBSubsettingConfig", + "id": 39 + }, + "desiredDatapathProvider": { + "type": "DatapathProvider", + "id": 50 + }, + "desiredPrivateIpv6GoogleAccess": { + "type": "PrivateIPv6GoogleAccess", + "id": 51 + }, + "desiredNotificationConfig": { + "type": "NotificationConfig", + "id": 55 + }, + "desiredMasterVersion": { + "type": "string", + "id": 100 + }, + "desiredGcfsConfig": { + "type": "GcfsConfig", + "id": 109 + }, + "desiredDatabaseEncryption": { + "type": "DatabaseEncryption", + "id": 46 + }, + "desiredWorkloadIdentityConfig": { + "type": "WorkloadIdentityConfig", + "id": 47 + }, + "desiredWorkloadCertificates": { + "type": "WorkloadCertificates", + "id": 61 + }, + "desiredMeshCertificates": { + "type": "MeshCertificates", + "id": 67 + }, + "desiredWorkloadAltsConfig": { + "type": "WorkloadALTSConfig", + "id": 62 + }, + "desiredShieldedNodes": { + "type": "ShieldedNodes", + "id": 48 + }, + "desiredCostManagementConfig": { + "type": "CostManagementConfig", + "id": 49 + }, + "desiredMaster": { + "type": "Master", + "id": 52 + }, + "desiredDnsConfig": { + "type": "DNSConfig", + "id": 53 + }, + "desiredServiceExternalIpsConfig": { + "type": "ServiceExternalIPsConfig", + "id": 60 + }, + "desiredAuthenticatorGroupsConfig": { + "type": "AuthenticatorGroupsConfig", + "id": 63 + }, + "desiredLoggingConfig": { + "type": "LoggingConfig", + "id": 64 + }, + "desiredMonitoringConfig": { + "type": "MonitoringConfig", + "id": 65 + }, + "desiredIdentityServiceConfig": { + "type": "IdentityServiceConfig", + "id": 66 + }, + "desiredEnablePrivateEndpoint": { + "type": "bool", + "id": 71, + "options": { + "proto3_optional": true + } + }, + "desiredNodePoolAutoConfigNetworkTags": { + "type": "NetworkTags", + "id": 110 + }, + "desiredProtectConfig": { + "type": "ProtectConfig", + "id": 112, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "desiredGatewayApiConfig": { + "type": "GatewayAPIConfig", + "id": 114 + }, + "etag": { + "type": "string", + "id": 115 + }, + "desiredNodePoolLoggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 116 + }, + "desiredFleet": { + "type": "Fleet", + "id": 117 + }, + "desiredStackType": { + "type": "StackType", + "id": 119 + }, + "additionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 120 + }, + "removedAdditionalPodRangesConfig": { + "type": "AdditionalPodRangesConfig", + "id": 121 + }, + "enableK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 122 + }, + "desiredSecurityPostureConfig": { + "type": "SecurityPostureConfig", + "id": 124 + }, + "desiredNetworkPerformanceConfig": { + "type": "NetworkConfig.ClusterNetworkPerformanceConfig", + "id": 125 + }, + "desiredEnableFqdnNetworkPolicy": { + "type": "bool", + "id": 126, + "options": { + "proto3_optional": true + } + }, + "desiredAutopilotWorkloadPolicyConfig": { + "type": "WorkloadPolicyConfig", + "id": 128 + }, + "desiredK8sBetaApis": { + "type": "K8sBetaAPIConfig", + "id": 131 + }, + "desiredHostMaintenancePolicy": { + "type": "HostMaintenancePolicy", + "id": 132 + }, + "desiredContainerdConfig": { + "type": "ContainerdConfig", + "id": 134 + }, + "desiredEnableMultiNetworking": { + "type": "bool", + "id": 135, + "options": { + "proto3_optional": true + } + }, + "desiredNodePoolAutoConfigResourceManagerTags": { + "type": "ResourceManagerTags", + "id": 136 + }, + "desiredInTransitEncryptionConfig": { + "type": "InTransitEncryptionConfig", + "id": 137, + "options": { + "proto3_optional": true + } + }, + "desiredEnableCiliumClusterwideNetworkPolicy": { + "type": "bool", + "id": 138, + "options": { + "proto3_optional": true + } + }, + "desiredSecretManagerConfig": { + "type": "SecretManagerConfig", + "id": 139, + "options": { + "proto3_optional": true + } + }, + "desiredNodeKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 141 + }, + "desiredNodePoolAutoConfigKubeletConfig": { + "type": "NodeKubeletConfig", + "id": 142 + } + } + }, + "AdditionalPodRangesConfig": { + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "podRangeInfo": { + "rule": "repeated", + "type": "RangeInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RangeInfo": { + "fields": { + "rangeName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "utilization": { + "type": "double", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Operation": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "operationType": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detail": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "selfLink": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetLink": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "progress": { + "type": "OperationProgress", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clusterConditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 13, + "options": { + "deprecated": true + } + }, + "nodepoolConditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 14, + "options": { + "deprecated": true + } + }, + "error": { + "type": "google.rpc.Status", + "id": 15 + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "DONE": 3, + "ABORTING": 4 + } + }, + "Type": { + "valuesOptions": { + "AUTO_UPGRADE_NODES": { + "deprecated": true + }, + "SET_LABELS": { + "deprecated": true + }, + "SET_MASTER_AUTH": { + "deprecated": true + }, + "SET_NETWORK_POLICY": { + "deprecated": true + }, + "SET_MAINTENANCE_POLICY": { + "deprecated": true + } + }, + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE_CLUSTER": 1, + "DELETE_CLUSTER": 2, + "UPGRADE_MASTER": 3, + "UPGRADE_NODES": 4, + "REPAIR_CLUSTER": 5, + "UPDATE_CLUSTER": 6, + "CREATE_NODE_POOL": 7, + "DELETE_NODE_POOL": 8, + "SET_NODE_POOL_MANAGEMENT": 9, + "AUTO_REPAIR_NODES": 10, + "AUTO_UPGRADE_NODES": 11, + "SET_LABELS": 12, + "SET_MASTER_AUTH": 13, + "SET_NODE_POOL_SIZE": 14, + "SET_NETWORK_POLICY": 15, + "SET_MAINTENANCE_POLICY": 16, + "RESIZE_CLUSTER": 18, + "FLEET_FEATURE_UPGRADE": 19 + } + } + } + }, + "OperationProgress": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "status": { + "type": "Operation.Status", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "stages": { + "rule": "repeated", + "type": "OperationProgress", + "id": 4 + } + }, + "nested": { + "Metric": { + "oneofs": { + "value": { + "oneof": [ + "intValue", + "doubleValue", + "stringValue" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "intValue": { + "type": "int64", + "id": 2 + }, + "doubleValue": { + "type": "double", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + } + } + } + } + }, + "CreateClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cluster": { + "type": "Cluster", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 5 + } + } + }, + "GetClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "UpdateClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "update": { + "type": "ClusterUpdate", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "UpdateNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodeVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "imageType": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "workloadMetadataConfig": { + "type": "WorkloadMetadataConfig", + "id": 14 + }, + "name": { + "type": "string", + "id": 8 + }, + "upgradeSettings": { + "type": "NodePool.UpgradeSettings", + "id": 15 + }, + "tags": { + "type": "NetworkTags", + "id": 16 + }, + "taints": { + "type": "NodeTaints", + "id": 17 + }, + "labels": { + "type": "NodeLabels", + "id": 18 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 19 + }, + "kubeletConfig": { + "type": "NodeKubeletConfig", + "id": 20 + }, + "nodeNetworkConfig": { + "type": "NodeNetworkConfig", + "id": 21 + }, + "gcfsConfig": { + "type": "GcfsConfig", + "id": 22 + }, + "confidentialNodes": { + "type": "ConfidentialNodes", + "id": 23 + }, + "gvnic": { + "type": "VirtualNIC", + "id": 29 + }, + "etag": { + "type": "string", + "id": 30 + }, + "fastSocket": { + "type": "FastSocket", + "id": 31 + }, + "loggingConfig": { + "type": "NodePoolLoggingConfig", + "id": 32 + }, + "resourceLabels": { + "type": "ResourceLabels", + "id": 33 + }, + "windowsNodeConfig": { + "type": "WindowsNodeConfig", + "id": 34 + }, + "accelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 35 + }, + "machineType": { + "type": "string", + "id": 36, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskType": { + "type": "string", + "id": 37, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskSizeGb": { + "type": "int64", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceManagerTags": { + "type": "ResourceManagerTags", + "id": 39 + }, + "containerdConfig": { + "type": "ContainerdConfig", + "id": 40 + }, + "queuedProvisioning": { + "type": "NodePool.QueuedProvisioning", + "id": 42 + } + } + }, + "SetNodePoolAutoscalingRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoscaling": { + "type": "NodePoolAutoscaling", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetLoggingServiceRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "loggingService": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "SetMonitoringServiceRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "monitoringService": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetAddonsConfigRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "addonsConfig": { + "type": "AddonsConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetLocationsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "UpdateMasterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "masterVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetMasterAuthRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "action": { + "type": "Action", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "update": { + "type": "MasterAuth", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + }, + "nested": { + "Action": { + "values": { + "UNKNOWN": 0, + "SET_PASSWORD": 1, + "GENERATE_PASSWORD": 2, + "SET_USERNAME": 3 + } + } + } + }, + "DeleteClusterRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ListClustersRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "ListClustersResponse": { + "fields": { + "clusters": { + "rule": "repeated", + "type": "Cluster", + "id": 1 + }, + "missingZones": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "GetOperationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "operationId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "ListOperationsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "CancelOperationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "operationId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "missingZones": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "GetServerConfigRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 4 + } + } + }, + "ServerConfig": { + "fields": { + "defaultClusterVersion": { + "type": "string", + "id": 1 + }, + "validNodeVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "defaultImageType": { + "type": "string", + "id": 4 + }, + "validImageTypes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "validMasterVersions": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "channels": { + "rule": "repeated", + "type": "ReleaseChannelConfig", + "id": 9 + }, + "windowsVersionMaps": { + "keyType": "string", + "type": "WindowsVersions", + "id": 10 + } + }, + "nested": { + "ReleaseChannelConfig": { + "fields": { + "channel": { + "type": "ReleaseChannel.Channel", + "id": 1 + }, + "defaultVersion": { + "type": "string", + "id": 2 + }, + "availableVersions": { + "rule": "repeated", + "type": "AvailableVersion", + "id": 3, + "options": { + "deprecated": true + } + }, + "validVersions": { + "rule": "repeated", + "type": "string", + "id": 4 + } + }, + "nested": { + "AvailableVersion": { + "options": { + "deprecated": true + }, + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "reason": { + "type": "string", + "id": 2 + } + } + } + } + } + } + }, + "BestEffortProvisioning": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "minProvisionNodes": { + "type": "int32", + "id": 2 + } + } + }, + "WindowsVersions": { + "fields": { + "windowsVersions": { + "rule": "repeated", + "type": "WindowsVersion", + "id": 1 + } + }, + "nested": { + "WindowsVersion": { + "fields": { + "imageType": { + "type": "string", + "id": 1 + }, + "osVersion": { + "type": "string", + "id": 2 + }, + "supportEndDate": { + "type": "google.type.Date", + "id": 3 + } + } + } + } + }, + "CreateNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePool": { + "type": "NodePool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 6 + } + } + }, + "DeleteNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "ListNodePoolsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 5 + } + } + }, + "GetNodePoolRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "BlueGreenSettings": { + "oneofs": { + "rolloutPolicy": { + "oneof": [ + "standardRolloutPolicy", + "autoscaledRolloutPolicy" + ] + }, + "_nodePoolSoakDuration": { + "oneof": [ + "nodePoolSoakDuration" + ] + } + }, + "fields": { + "standardRolloutPolicy": { + "type": "StandardRolloutPolicy", + "id": 1 + }, + "autoscaledRolloutPolicy": { + "type": "AutoscaledRolloutPolicy", + "id": 3 + }, + "nodePoolSoakDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "StandardRolloutPolicy": { + "oneofs": { + "updateBatchSize": { + "oneof": [ + "batchPercentage", + "batchNodeCount" + ] + }, + "_batchSoakDuration": { + "oneof": [ + "batchSoakDuration" + ] + } + }, + "fields": { + "batchPercentage": { + "type": "float", + "id": 1 + }, + "batchNodeCount": { + "type": "int32", + "id": 2 + }, + "batchSoakDuration": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "AutoscaledRolloutPolicy": { + "fields": {} + } + } + }, + "NodePool": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "NodeConfig", + "id": 2 + }, + "initialNodeCount": { + "type": "int32", + "id": 3 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "networkConfig": { + "type": "NodeNetworkConfig", + "id": 14 + }, + "selfLink": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "version": { + "type": "string", + "id": 101 + }, + "instanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 104, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoscaling": { + "type": "NodePoolAutoscaling", + "id": 4 + }, + "management": { + "type": "NodeManagement", + "id": 5 + }, + "maxPodsConstraint": { + "type": "MaxPodsConstraint", + "id": 6 + }, + "conditions": { + "rule": "repeated", + "type": "StatusCondition", + "id": 105 + }, + "podIpv4CidrSize": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "upgradeSettings": { + "type": "UpgradeSettings", + "id": 107 + }, + "placementPolicy": { + "type": "PlacementPolicy", + "id": 108 + }, + "updateInfo": { + "type": "UpdateInfo", + "id": 109, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 110 + }, + "queuedProvisioning": { + "type": "QueuedProvisioning", + "id": 112 + }, + "bestEffortProvisioning": { + "type": "BestEffortProvisioning", + "id": 113 + } + }, + "nested": { + "UpgradeSettings": { + "oneofs": { + "_strategy": { + "oneof": [ + "strategy" + ] + }, + "_blueGreenSettings": { + "oneof": [ + "blueGreenSettings" + ] + } + }, + "fields": { + "maxSurge": { + "type": "int32", + "id": 1 + }, + "maxUnavailable": { + "type": "int32", + "id": 2 + }, + "strategy": { + "type": "NodePoolUpdateStrategy", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "blueGreenSettings": { + "type": "BlueGreenSettings", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "UpdateInfo": { + "fields": { + "blueGreenInfo": { + "type": "BlueGreenInfo", + "id": 1 + } + }, + "nested": { + "BlueGreenInfo": { + "fields": { + "phase": { + "type": "Phase", + "id": 1 + }, + "blueInstanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "greenInstanceGroupUrls": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "bluePoolDeletionStartTime": { + "type": "string", + "id": 4 + }, + "greenPoolVersion": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Phase": { + "values": { + "PHASE_UNSPECIFIED": 0, + "UPDATE_STARTED": 1, + "CREATING_GREEN_POOL": 2, + "CORDONING_BLUE_POOL": 3, + "WAITING_TO_DRAIN_BLUE_POOL": 8, + "DRAINING_BLUE_POOL": 4, + "NODE_POOL_SOAKING": 5, + "DELETING_BLUE_POOL": 6, + "ROLLBACK_STARTED": 7 + } + } + } + } + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RUNNING_WITH_ERROR": 3, + "RECONCILING": 4, + "STOPPING": 5, + "ERROR": 6 + } + }, + "PlacementPolicy": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "tpuTopology": { + "type": "string", + "id": 2 + }, + "policyName": { + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "COMPACT": 1 + } + } + } + }, + "QueuedProvisioning": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + } + } + }, + "NodeManagement": { + "fields": { + "autoUpgrade": { + "type": "bool", + "id": 1 + }, + "autoRepair": { + "type": "bool", + "id": 2 + }, + "upgradeOptions": { + "type": "AutoUpgradeOptions", + "id": 10 + } + } + }, + "AutoUpgradeOptions": { + "fields": { + "autoUpgradeStartTime": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "MaintenancePolicy": { + "fields": { + "window": { + "type": "MaintenanceWindow", + "id": 1 + }, + "resourceVersion": { + "type": "string", + "id": 3 + } + } + }, + "MaintenanceWindow": { + "oneofs": { + "policy": { + "oneof": [ + "dailyMaintenanceWindow", + "recurringWindow" + ] + } + }, + "fields": { + "dailyMaintenanceWindow": { + "type": "DailyMaintenanceWindow", + "id": 2 + }, + "recurringWindow": { + "type": "RecurringTimeWindow", + "id": 3 + }, + "maintenanceExclusions": { + "keyType": "string", + "type": "TimeWindow", + "id": 4 + } + } + }, + "TimeWindow": { + "oneofs": { + "options": { + "oneof": [ + "maintenanceExclusionOptions" + ] + } + }, + "fields": { + "maintenanceExclusionOptions": { + "type": "MaintenanceExclusionOptions", + "id": 3 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "MaintenanceExclusionOptions": { + "fields": { + "scope": { + "type": "Scope", + "id": 1 + } + }, + "nested": { + "Scope": { + "values": { + "NO_UPGRADES": 0, + "NO_MINOR_UPGRADES": 1, + "NO_MINOR_OR_NODE_UPGRADES": 2 + } + } + } + }, + "RecurringTimeWindow": { + "fields": { + "window": { + "type": "TimeWindow", + "id": 1 + }, + "recurrence": { + "type": "string", + "id": 2 + } + } + }, + "DailyMaintenanceWindow": { + "fields": { + "startTime": { + "type": "string", + "id": 2 + }, + "duration": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SetNodePoolManagementRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "management": { + "type": "NodeManagement", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetNodePoolSizeRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodeCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "CompleteNodePoolUpgradeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "RollbackNodePoolUpgradeRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodePoolId": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + }, + "respectPdb": { + "type": "bool", + "id": 7 + } + } + }, + "ListNodePoolsResponse": { + "fields": { + "nodePools": { + "rule": "repeated", + "type": "NodePool", + "id": 1 + } + } + }, + "ClusterAutoscaling": { + "fields": { + "enableNodeAutoprovisioning": { + "type": "bool", + "id": 1 + }, + "resourceLimits": { + "rule": "repeated", + "type": "ResourceLimit", + "id": 2 + }, + "autoscalingProfile": { + "type": "AutoscalingProfile", + "id": 3 + }, + "autoprovisioningNodePoolDefaults": { + "type": "AutoprovisioningNodePoolDefaults", + "id": 4 + }, + "autoprovisioningLocations": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "AutoscalingProfile": { + "values": { + "PROFILE_UNSPECIFIED": 0, + "OPTIMIZE_UTILIZATION": 1, + "BALANCED": 2 + } + } + } + }, + "AutoprovisioningNodePoolDefaults": { + "oneofs": { + "_insecureKubeletReadonlyPortEnabled": { + "oneof": [ + "insecureKubeletReadonlyPortEnabled" + ] + } + }, + "fields": { + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "serviceAccount": { + "type": "string", + "id": 2 + }, + "upgradeSettings": { + "type": "NodePool.UpgradeSettings", + "id": 3 + }, + "management": { + "type": "NodeManagement", + "id": 4 + }, + "minCpuPlatform": { + "type": "string", + "id": 5, + "options": { + "deprecated": true + } + }, + "diskSizeGb": { + "type": "int32", + "id": 6 + }, + "diskType": { + "type": "string", + "id": 7 + }, + "shieldedInstanceConfig": { + "type": "ShieldedInstanceConfig", + "id": 8 + }, + "bootDiskKmsKey": { + "type": "string", + "id": 9 + }, + "imageType": { + "type": "string", + "id": 10 + }, + "insecureKubeletReadonlyPortEnabled": { + "type": "bool", + "id": 13, + "options": { + "proto3_optional": true + } + } + } + }, + "ResourceLimit": { + "fields": { + "resourceType": { + "type": "string", + "id": 1 + }, + "minimum": { + "type": "int64", + "id": 2 + }, + "maximum": { + "type": "int64", + "id": 3 + } + } + }, + "NodePoolAutoscaling": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "minNodeCount": { + "type": "int32", + "id": 2 + }, + "maxNodeCount": { + "type": "int32", + "id": 3 + }, + "autoprovisioned": { + "type": "bool", + "id": 4 + }, + "locationPolicy": { + "type": "LocationPolicy", + "id": 5 + }, + "totalMinNodeCount": { + "type": "int32", + "id": 6 + }, + "totalMaxNodeCount": { + "type": "int32", + "id": 7 + } + }, + "nested": { + "LocationPolicy": { + "values": { + "LOCATION_POLICY_UNSPECIFIED": 0, + "BALANCED": 1, + "ANY": 2 + } + } + } + }, + "SetLabelsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "labelFingerprint": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "SetLegacyAbacRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "StartIPRotationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + }, + "rotateCredentials": { + "type": "bool", + "id": 7 + } + } + }, + "CompleteIPRotationRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 7 + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_gpuSharingConfig": { + "oneof": [ + "gpuSharingConfig" + ] + }, + "_gpuDriverInstallationConfig": { + "oneof": [ + "gpuDriverInstallationConfig" + ] + } + }, + "fields": { + "acceleratorCount": { + "type": "int64", + "id": 1 + }, + "acceleratorType": { + "type": "string", + "id": 2 + }, + "gpuPartitionSize": { + "type": "string", + "id": 3 + }, + "maxTimeSharedClientsPerGpu": { + "type": "int64", + "id": 4, + "options": { + "deprecated": true + } + }, + "gpuSharingConfig": { + "type": "GPUSharingConfig", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "gpuDriverInstallationConfig": { + "type": "GPUDriverInstallationConfig", + "id": 6, + "options": { + "proto3_optional": true + } + } + } + }, + "GPUSharingConfig": { + "oneofs": { + "_gpuSharingStrategy": { + "oneof": [ + "gpuSharingStrategy" + ] + } + }, + "fields": { + "maxSharedClientsPerGpu": { + "type": "int64", + "id": 1 + }, + "gpuSharingStrategy": { + "type": "GPUSharingStrategy", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "GPUSharingStrategy": { + "values": { + "GPU_SHARING_STRATEGY_UNSPECIFIED": 0, + "TIME_SHARING": 1, + "MPS": 2 + } + } + } + }, + "GPUDriverInstallationConfig": { + "oneofs": { + "_gpuDriverVersion": { + "oneof": [ + "gpuDriverVersion" + ] + } + }, + "fields": { + "gpuDriverVersion": { + "type": "GPUDriverVersion", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "GPUDriverVersion": { + "values": { + "GPU_DRIVER_VERSION_UNSPECIFIED": 0, + "INSTALLATION_DISABLED": 1, + "DEFAULT": 2, + "LATEST": 3 + } + } + } + }, + "ManagedPrometheusConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "WorkloadMetadataConfig": { + "fields": { + "nodeMetadata": { + "type": "NodeMetadata", + "id": 1, + "options": { + "deprecated": true + } + }, + "mode": { + "type": "Mode", + "id": 2 + } + }, + "nested": { + "NodeMetadata": { + "values": { + "UNSPECIFIED": 0, + "SECURE": 1, + "EXPOSE": 2, + "GKE_METADATA_SERVER": 3 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "GCE_METADATA": 1, + "GKE_METADATA": 2 + } + } + } + }, + "SetNetworkPolicyRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "REQUIRED" + } + }, + "networkPolicy": { + "type": "NetworkPolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 6 + } + } + }, + "SetMaintenancePolicyRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maintenancePolicy": { + "type": "MaintenancePolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 5 + } + } + }, + "ListLocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListLocationsResponse": { + "fields": { + "locations": { + "rule": "repeated", + "type": "Location", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "Location": { + "fields": { + "type": { + "type": "LocationType", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + }, + "recommended": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "LocationType": { + "values": { + "LOCATION_TYPE_UNSPECIFIED": 0, + "ZONE": 1, + "REGION": 2 + } + } + } + }, + "StatusCondition": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "deprecated": true + } + }, + "message": { + "type": "string", + "id": 2 + }, + "canonicalCode": { + "type": "google.rpc.Code", + "id": 3 + } + }, + "nested": { + "Code": { + "options": { + "deprecated": true + }, + "values": { + "UNKNOWN": 0, + "GCE_STOCKOUT": 1, + "GKE_SERVICE_ACCOUNT_DELETED": 2, + "GCE_QUOTA_EXCEEDED": 3, + "SET_BY_OPERATOR": 4, + "CLOUD_KMS_KEY_ERROR": 7, + "CA_EXPIRING": 9 + } + } + } + }, + "NetworkConfig": { + "oneofs": { + "_enableFqdnNetworkPolicy": { + "oneof": [ + "enableFqdnNetworkPolicy" + ] + }, + "_inTransitEncryptionConfig": { + "oneof": [ + "inTransitEncryptionConfig" + ] + }, + "_enableCiliumClusterwideNetworkPolicy": { + "oneof": [ + "enableCiliumClusterwideNetworkPolicy" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "subnetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enableIntraNodeVisibility": { + "type": "bool", + "id": 5 + }, + "defaultSnatStatus": { + "type": "DefaultSnatStatus", + "id": 7 + }, + "enableL4ilbSubsetting": { + "type": "bool", + "id": 10 + }, + "datapathProvider": { + "type": "DatapathProvider", + "id": 11 + }, + "privateIpv6GoogleAccess": { + "type": "PrivateIPv6GoogleAccess", + "id": 12 + }, + "dnsConfig": { + "type": "DNSConfig", + "id": 13 + }, + "serviceExternalIpsConfig": { + "type": "ServiceExternalIPsConfig", + "id": 15 + }, + "gatewayApiConfig": { + "type": "GatewayAPIConfig", + "id": 16 + }, + "enableMultiNetworking": { + "type": "bool", + "id": 17 + }, + "networkPerformanceConfig": { + "type": "ClusterNetworkPerformanceConfig", + "id": 18 + }, + "enableFqdnNetworkPolicy": { + "type": "bool", + "id": 19, + "options": { + "proto3_optional": true + } + }, + "inTransitEncryptionConfig": { + "type": "InTransitEncryptionConfig", + "id": 20, + "options": { + "proto3_optional": true + } + }, + "enableCiliumClusterwideNetworkPolicy": { + "type": "bool", + "id": 21, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "ClusterNetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "TIER_1": 1 + } + } + } + } + } + }, + "GatewayAPIConfig": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "valuesOptions": { + "CHANNEL_EXPERIMENTAL": { + "deprecated": true + } + }, + "values": { + "CHANNEL_UNSPECIFIED": 0, + "CHANNEL_DISABLED": 1, + "CHANNEL_EXPERIMENTAL": 3, + "CHANNEL_STANDARD": 4 + } + } + } + }, + "ServiceExternalIPsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ListUsableSubnetworksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListUsableSubnetworksResponse": { + "fields": { + "subnetworks": { + "rule": "repeated", + "type": "UsableSubnetwork", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UsableSubnetworkSecondaryRange": { + "fields": { + "rangeName": { + "type": "string", + "id": 1 + }, + "ipCidrRange": { + "type": "string", + "id": 2 + }, + "status": { + "type": "Status", + "id": 3 + } + }, + "nested": { + "Status": { + "values": { + "UNKNOWN": 0, + "UNUSED": 1, + "IN_USE_SERVICE": 2, + "IN_USE_SHAREABLE_POD": 3, + "IN_USE_MANAGED_POD": 4 + } + } + } + }, + "UsableSubnetwork": { + "fields": { + "subnetwork": { + "type": "string", + "id": 1 + }, + "network": { + "type": "string", + "id": 2 + }, + "ipCidrRange": { + "type": "string", + "id": 3 + }, + "secondaryIpRanges": { + "rule": "repeated", + "type": "UsableSubnetworkSecondaryRange", + "id": 4 + }, + "statusMessage": { + "type": "string", + "id": 5 + } + } + }, + "VerticalPodAutoscaling": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "DefaultSnatStatus": { + "fields": { + "disabled": { + "type": "bool", + "id": 1 + } + } + }, + "IntraNodeVisibilityConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "ILBSubsettingConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "DNSConfig": { + "fields": { + "clusterDns": { + "type": "Provider", + "id": 1 + }, + "clusterDnsScope": { + "type": "DNSScope", + "id": 2 + }, + "clusterDnsDomain": { + "type": "string", + "id": 3 + }, + "additiveVpcScopeDnsDomain": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Provider": { + "values": { + "PROVIDER_UNSPECIFIED": 0, + "PLATFORM_DEFAULT": 1, + "CLOUD_DNS": 2, + "KUBE_DNS": 3 + } + }, + "DNSScope": { + "values": { + "DNS_SCOPE_UNSPECIFIED": 0, + "CLUSTER_SCOPE": 1, + "VPC_SCOPE": 2 + } + } + } + }, + "MaxPodsConstraint": { + "fields": { + "maxPodsPerNode": { + "type": "int64", + "id": 1 + } + } + }, + "WorkloadIdentityConfig": { + "fields": { + "identityNamespace": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "workloadPool": { + "type": "string", + "id": 2 + }, + "identityProvider": { + "type": "string", + "id": 3 + } + } + }, + "WorkloadALTSConfig": { + "fields": { + "enableAlts": { + "type": "google.protobuf.BoolValue", + "id": 1 + } + } + }, + "WorkloadCertificates": { + "fields": { + "enableCertificates": { + "type": "google.protobuf.BoolValue", + "id": 1 + } + } + }, + "MeshCertificates": { + "fields": { + "enableCertificates": { + "type": "google.protobuf.BoolValue", + "id": 1 + } + } + }, + "DatabaseEncryption": { + "oneofs": { + "_currentState": { + "oneof": [ + "currentState" + ] + } + }, + "fields": { + "keyName": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "currentState": { + "type": "CurrentState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "decryptionKeys": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastOperationErrors": { + "rule": "repeated", + "type": "OperationError", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "UNKNOWN": 0, + "ENCRYPTED": 1, + "DECRYPTED": 2 + } + }, + "CurrentState": { + "values": { + "CURRENT_STATE_UNSPECIFIED": 0, + "CURRENT_STATE_ENCRYPTED": 7, + "CURRENT_STATE_DECRYPTED": 2, + "CURRENT_STATE_ENCRYPTION_PENDING": 3, + "CURRENT_STATE_ENCRYPTION_ERROR": 4, + "CURRENT_STATE_DECRYPTION_PENDING": 5, + "CURRENT_STATE_DECRYPTION_ERROR": 6 + } + }, + "OperationError": { + "fields": { + "keyName": { + "type": "string", + "id": 1 + }, + "errorMessage": { + "type": "string", + "id": 2 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + } + } + }, + "ResourceUsageExportConfig": { + "fields": { + "bigqueryDestination": { + "type": "BigQueryDestination", + "id": 1 + }, + "enableNetworkEgressMetering": { + "type": "bool", + "id": 2 + }, + "consumptionMeteringConfig": { + "type": "ConsumptionMeteringConfig", + "id": 3 + } + }, + "nested": { + "BigQueryDestination": { + "fields": { + "datasetId": { + "type": "string", + "id": 1 + } + } + }, + "ConsumptionMeteringConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + } + } + }, + "ShieldedNodes": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "VirtualNIC": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "FastSocket": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "GetOpenIDConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "GetOpenIDConfigResponse": { + "fields": { + "issuer": { + "type": "string", + "id": 1 + }, + "jwksUri": { + "type": "string", + "id": 2 + }, + "responseTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "subjectTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "idTokenSigningAlgValuesSupported": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "claimsSupported": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "grantTypes": { + "rule": "repeated", + "type": "string", + "id": 7 + } + } + }, + "GetJSONWebKeysRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "Jwk": { + "fields": { + "kty": { + "type": "string", + "id": 1 + }, + "alg": { + "type": "string", + "id": 2 + }, + "use": { + "type": "string", + "id": 3 + }, + "kid": { + "type": "string", + "id": 4 + }, + "n": { + "type": "string", + "id": 5 + }, + "e": { + "type": "string", + "id": 6 + }, + "x": { + "type": "string", + "id": 7 + }, + "y": { + "type": "string", + "id": 8 + }, + "crv": { + "type": "string", + "id": 9 + } + } + }, + "GetJSONWebKeysResponse": { + "fields": { + "keys": { + "rule": "repeated", + "type": "Jwk", + "id": 1 + } + } + }, + "CheckAutopilotCompatibilityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "AutopilotCompatibilityIssue": { + "fields": { + "lastObservation": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "constraintType": { + "type": "string", + "id": 2 + }, + "incompatibilityType": { + "type": "IssueType", + "id": 3 + }, + "subjects": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "documentationUrl": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + } + }, + "nested": { + "IssueType": { + "values": { + "UNSPECIFIED": 0, + "INCOMPATIBILITY": 1, + "ADDITIONAL_CONFIG_REQUIRED": 2, + "PASSED_WITH_OPTIONAL_CONFIG": 3 + } + } + } + }, + "CheckAutopilotCompatibilityResponse": { + "fields": { + "issues": { + "rule": "repeated", + "type": "AutopilotCompatibilityIssue", + "id": 1 + }, + "summary": { + "type": "string", + "id": 2 + } + } + }, + "ReleaseChannel": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + } + }, + "nested": { + "Channel": { + "values": { + "UNSPECIFIED": 0, + "RAPID": 1, + "REGULAR": 2, + "STABLE": 3, + "EXTENDED": 4 + } + } + } + }, + "CostManagementConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "TpuConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "useServiceNetworking": { + "type": "bool", + "id": 2 + }, + "ipv4CidrBlock": { + "type": "string", + "id": 3 + } + } + }, + "PrivateIPv6GoogleAccess": { + "values": { + "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": 1, + "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": 2, + "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": 3 + } + }, + "Master": { + "fields": {} + }, + "AutopilotConversionStatus": { + "fields": { + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DONE": 5 + } + } + } + }, + "Autopilot": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "workloadPolicyConfig": { + "type": "WorkloadPolicyConfig", + "id": 2 + }, + "conversionStatus": { + "type": "AutopilotConversionStatus", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkloadPolicyConfig": { + "oneofs": { + "_allowNetAdmin": { + "oneof": [ + "allowNetAdmin" + ] + } + }, + "fields": { + "allowNetAdmin": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "NotificationConfig": { + "fields": { + "pubsub": { + "type": "PubSub", + "id": 1 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "UPGRADE_AVAILABLE_EVENT": 1, + "UPGRADE_EVENT": 2, + "SECURITY_BULLETIN_EVENT": 3 + } + }, + "PubSub": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "topic": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" + } + }, + "filter": { + "type": "Filter", + "id": 3 + } + } + }, + "Filter": { + "fields": { + "eventType": { + "rule": "repeated", + "type": "EventType", + "id": 1 + } + } + } + } + }, + "ConfidentialNodes": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "UpgradeResourceType": { + "values": { + "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": 0, + "MASTER": 1, + "NODE_POOL": 2 + } + }, + "UpgradeEvent": { + "fields": { + "resourceType": { + "type": "UpgradeResourceType", + "id": 1 + }, + "operation": { + "type": "string", + "id": 2 + }, + "operationStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "currentVersion": { + "type": "string", + "id": 4 + }, + "targetVersion": { + "type": "string", + "id": 5 + }, + "resource": { + "type": "string", + "id": 6 + } + } + }, + "UpgradeAvailableEvent": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "resourceType": { + "type": "UpgradeResourceType", + "id": 2 + }, + "releaseChannel": { + "type": "ReleaseChannel", + "id": 3 + }, + "resource": { + "type": "string", + "id": 4 + }, + "windowsVersions": { + "type": "WindowsVersions", + "id": 5 + } + } + }, + "SecurityBulletinEvent": { + "fields": { + "resourceTypeAffected": { + "type": "string", + "id": 1 + }, + "bulletinId": { + "type": "string", + "id": 2 + }, + "cveIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "severity": { + "type": "string", + "id": 4 + }, + "bulletinUri": { + "type": "string", + "id": 5 + }, + "briefDescription": { + "type": "string", + "id": 6 + }, + "affectedSupportedMinors": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "patchedVersions": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "suggestedUpgradeTarget": { + "type": "string", + "id": 9 + }, + "manualStepsRequired": { + "type": "bool", + "id": 10 + } + } + }, + "IdentityServiceConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "NodePoolUpdateStrategy": { + "values": { + "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": 0, + "BLUE_GREEN": 2, + "SURGE": 3 + } + }, + "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, + "APISERVER": 3, + "SCHEDULER": 4, + "CONTROLLER_MANAGER": 5 + } + } + } + }, + "RayClusterLoggingConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "MonitoringConfig": { + "fields": { + "componentConfig": { + "type": "MonitoringComponentConfig", + "id": 1 + }, + "managedPrometheusConfig": { + "type": "ManagedPrometheusConfig", + "id": 2 + }, + "advancedDatapathObservabilityConfig": { + "type": "AdvancedDatapathObservabilityConfig", + "id": 3 + } + } + }, + "AdvancedDatapathObservabilityConfig": { + "oneofs": { + "_enableRelay": { + "oneof": [ + "enableRelay" + ] + } + }, + "fields": { + "enableMetrics": { + "type": "bool", + "id": 1 + }, + "relayMode": { + "type": "RelayMode", + "id": 2 + }, + "enableRelay": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RelayMode": { + "values": { + "RELAY_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "INTERNAL_VPC_LB": 3, + "EXTERNAL_LB": 4 + } + } + } + }, + "RayClusterMonitoringConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "NodePoolLoggingConfig": { + "fields": { + "variantConfig": { + "type": "LoggingVariantConfig", + "id": 1 + } + } + }, + "LoggingVariantConfig": { + "fields": { + "variant": { + "type": "Variant", + "id": 1 + } + }, + "nested": { + "Variant": { + "values": { + "VARIANT_UNSPECIFIED": 0, + "DEFAULT": 1, + "MAX_THROUGHPUT": 2 + } + } + } + }, + "MonitoringComponentConfig": { + "fields": { + "enableComponents": { + "rule": "repeated", + "type": "Component", + "id": 1 + } + }, + "nested": { + "Component": { + "valuesOptions": { + "WORKLOADS": { + "deprecated": true + } + }, + "values": { + "COMPONENT_UNSPECIFIED": 0, + "SYSTEM_COMPONENTS": 1, + "WORKLOADS": 2, + "APISERVER": 3, + "SCHEDULER": 4, + "CONTROLLER_MANAGER": 5, + "STORAGE": 7, + "HPA": 8, + "POD": 9, + "DAEMONSET": 10, + "DEPLOYMENT": 11, + "STATEFULSET": 12, + "CADVISOR": 13, + "KUBELET": 14, + "DCGM": 15 + } + } + } + }, + "DatapathProvider": { + "values": { + "DATAPATH_PROVIDER_UNSPECIFIED": 0, + "LEGACY_DATAPATH": 1, + "ADVANCED_DATAPATH": 2 + } + }, + "Fleet": { + "fields": { + "project": { + "type": "string", + "id": 1 + }, + "membership": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "preRegistered": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4": 1, + "IPV4_IPV6": 2 + } + }, + "ResourceManagerTags": { + "fields": { + "tags": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EnterpriseConfig": { + "fields": { + "clusterTier": { + "type": "ClusterTier", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ClusterTier": { + "values": { + "CLUSTER_TIER_UNSPECIFIED": 0, + "STANDARD": 1, + "ENTERPRISE": 2 + } + } + } + }, + "SecretManagerConfig": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "SecondaryBootDisk": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + }, + "diskImage": { + "type": "string", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "CONTAINER_IMAGE_CACHE": 1 + } + } + } + }, + "InTransitEncryptionConfig": { + "values": { + "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": 0, + "IN_TRANSIT_ENCRYPTION_DISABLED": 1, + "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": 2 + } + }, + "SecondaryBootDiskUpdateStrategy": { + "fields": {} + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC", + "cc_enable_arenas": true + }, + "nested": { + "Code": { + "values": { + "OK": 0, + "CANCELLED": 1, + "UNKNOWN": 2, + "INVALID_ARGUMENT": 3, + "DEADLINE_EXCEEDED": 4, + "NOT_FOUND": 5, + "ALREADY_EXISTS": 6, + "PERMISSION_DENIED": 7, + "UNAUTHENTICATED": 16, + "RESOURCE_EXHAUSTED": 8, + "FAILED_PRECONDITION": 9, + "ABORTED": 10, + "OUT_OF_RANGE": 11, + "UNIMPLEMENTED": 12, + "INTERNAL": 13, + "UNAVAILABLE": 14, + "DATA_LOSS": 15 + } + }, + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js new file mode 100644 index 00000000000..ff5878650df --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, operationId) { + // [START container_v1beta1_generated_ClusterManager_CancelOperation_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. + */ + /** + * The name (project, location, operation id) of the operation to cancel. + * Specified in the format `projects/* /locations/* /operations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCancelOperation() { + // Construct request + const request = { + projectId, + zone, + operationId, + }; + + // Run request + const response = await containerClient.cancelOperation(request); + console.log(response); + } + + callCancelOperation(); + // [END container_v1beta1_generated_ClusterManager_CancelOperation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js new file mode 100644 index 00000000000..59762987ecf --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_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. + */ + /** + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCheckAutopilotCompatibility() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.checkAutopilotCompatibility(request); + console.log(response); + } + + callCheckAutopilotCompatibility(); + // [END container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js new file mode 100644 index 00000000000..4c1f6d71936 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId) { + // [START container_v1beta1_generated_ClusterManager_CompleteIPRotation_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. + */ + /** + * The name (project, location, cluster name) of the cluster to complete IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCompleteIPRotation() { + // Construct request + const request = { + projectId, + zone, + clusterId, + }; + + // Run request + const response = await containerClient.completeIPRotation(request); + console.log(response); + } + + callCompleteIPRotation(); + // [END container_v1beta1_generated_ClusterManager_CompleteIPRotation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js new file mode 100644 index 00000000000..330bbd2ffc2 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * complete upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCompleteNodePoolUpgrade() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.completeNodePoolUpgrade(request); + console.log(response); + } + + callCompleteNodePoolUpgrade(); + // [END container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js new file mode 100644 index 00000000000..dda327ddae4 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, cluster) { + // [START container_v1beta1_generated_ClusterManager_CreateCluster_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. A cluster + * resource (https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) + */ + // const cluster = {} + /** + * The parent (project and location) where the cluster will be created. + * Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCreateCluster() { + // Construct request + const request = { + projectId, + zone, + cluster, + }; + + // Run request + const response = await containerClient.createCluster(request); + console.log(response); + } + + callCreateCluster(); + // [END container_v1beta1_generated_ClusterManager_CreateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js new file mode 100644 index 00000000000..c12cfe58144 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePool) { + // [START container_v1beta1_generated_ClusterManager_CreateNodePool_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 node pool to create. + */ + // const nodePool = {} + /** + * The parent (project, location, cluster name) where the node pool will be + * created. Specified in the format + * `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callCreateNodePool() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePool, + }; + + // Run request + const response = await containerClient.createNodePool(request); + console.log(response); + } + + callCreateNodePool(); + // [END container_v1beta1_generated_ClusterManager_CreateNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js new file mode 100644 index 00000000000..2da98075c9f --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId) { + // [START container_v1beta1_generated_ClusterManager_DeleteCluster_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. + */ + /** + * The name (project, location, cluster) of the cluster to delete. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callDeleteCluster() { + // Construct request + const request = { + projectId, + zone, + clusterId, + }; + + // Run request + const response = await containerClient.deleteCluster(request); + console.log(response); + } + + callDeleteCluster(); + // [END container_v1beta1_generated_ClusterManager_DeleteCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js new file mode 100644 index 00000000000..a11d3dbd020 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId) { + // [START container_v1beta1_generated_ClusterManager_DeleteNodePool_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * delete. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callDeleteNodePool() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + }; + + // Run request + const response = await containerClient.deleteNodePool(request); + console.log(response); + } + + callDeleteNodePool(); + // [END container_v1beta1_generated_ClusterManager_DeleteNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js new file mode 100644 index 00000000000..2c68f56dfdf --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId) { + // [START container_v1beta1_generated_ClusterManager_GetCluster_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. + */ + /** + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetCluster() { + // Construct request + const request = { + projectId, + zone, + clusterId, + }; + + // Run request + const response = await containerClient.getCluster(request); + console.log(response); + } + + callGetCluster(); + // [END container_v1beta1_generated_ClusterManager_GetCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js new file mode 100644 index 00000000000..9b8720fed83 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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() { + // [START container_v1beta1_generated_ClusterManager_GetJSONWebKeys_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. + */ + /** + * The cluster (project, location, cluster name) to get keys for. Specified in + * the format `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetJSONWebKeys() { + // Construct request + const request = { + }; + + // Run request + const response = await containerClient.getJSONWebKeys(request); + console.log(response); + } + + callGetJSONWebKeys(); + // [END container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js new file mode 100644 index 00000000000..4d05c713dd4 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId) { + // [START container_v1beta1_generated_ClusterManager_GetNodePool_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node pool to + * get. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetNodePool() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + }; + + // Run request + const response = await containerClient.getNodePool(request); + console.log(response); + } + + callGetNodePool(); + // [END container_v1beta1_generated_ClusterManager_GetNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js new file mode 100644 index 00000000000..82bd868b959 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, operationId) { + // [START container_v1beta1_generated_ClusterManager_GetOperation_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. + */ + /** + * The name (project, location, operation id) of the operation to get. + * Specified in the format `projects/* /locations/* /operations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetOperation() { + // Construct request + const request = { + projectId, + zone, + operationId, + }; + + // Run request + const response = await containerClient.getOperation(request); + console.log(response); + } + + callGetOperation(); + // [END container_v1beta1_generated_ClusterManager_GetOperation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js new file mode 100644 index 00000000000..ffdaf1b8e4d --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone) { + // [START container_v1beta1_generated_ClusterManager_GetServerConfig_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. + */ + /** + * The name (project and location) of the server config to get, + * specified in the format `projects/* /locations/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callGetServerConfig() { + // Construct request + const request = { + projectId, + zone, + }; + + // Run request + const response = await containerClient.getServerConfig(request); + console.log(response); + } + + callGetServerConfig(); + // [END container_v1beta1_generated_ClusterManager_GetServerConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js new file mode 100644 index 00000000000..3062b95c518 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone) { + // [START container_v1beta1_generated_ClusterManager_ListClusters_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. + */ + /** + * The parent (project and location) where the clusters will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListClusters() { + // Construct request + const request = { + projectId, + zone, + }; + + // Run request + const response = await containerClient.listClusters(request); + console.log(response); + } + + callListClusters(); + // [END container_v1beta1_generated_ClusterManager_ListClusters_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js new file mode 100644 index 00000000000..12e0cf5c5d1 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 container_v1beta1_generated_ClusterManager_ListLocations_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. Contains the name of the resource requested. + * Specified in the format `projects/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListLocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await containerClient.listLocations(request); + console.log(response); + } + + callListLocations(); + // [END container_v1beta1_generated_ClusterManager_ListLocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js new file mode 100644 index 00000000000..cd741e4614c --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId) { + // [START container_v1beta1_generated_ClusterManager_ListNodePools_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. + */ + /** + * The parent (project, location, cluster name) where the node pools will be + * listed. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListNodePools() { + // Construct request + const request = { + projectId, + zone, + clusterId, + }; + + // Run request + const response = await containerClient.listNodePools(request); + console.log(response); + } + + callListNodePools(); + // [END container_v1beta1_generated_ClusterManager_ListNodePools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js new file mode 100644 index 00000000000..a2b63247fe8 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone) { + // [START container_v1beta1_generated_ClusterManager_ListOperations_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. + */ + /** + * The parent (project and location) where the operations will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + */ + // const parent = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListOperations() { + // Construct request + const request = { + projectId, + zone, + }; + + // Run request + const response = await containerClient.listOperations(request); + console.log(response); + } + + callListOperations(); + // [END container_v1beta1_generated_ClusterManager_ListOperations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js new file mode 100644 index 00000000000..0b2b15f22d0 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_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 project where subnetworks are usable. + * Specified in the format `projects/*`. + */ + // const parent = 'abc123' + /** + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + */ + // const filter = 'abc123' + /** + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + // const pageSize = 1234 + /** + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + */ + // const pageToken = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callListUsableSubnetworks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = containerClient.listUsableSubnetworksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUsableSubnetworks(); + // [END container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js new file mode 100644 index 00000000000..812733d6941 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId) { + // [START container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_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. + */ + /** + * The name (project, location, cluster, node pool id) of the node poll to + * rollback upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + /** + * Option for rollback to ignore the PodDisruptionBudget. + * Default value is false. + */ + // const respectPdb = true + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callRollbackNodePoolUpgrade() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + }; + + // Run request + const response = await containerClient.rollbackNodePoolUpgrade(request); + console.log(response); + } + + callRollbackNodePoolUpgrade(); + // [END container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js new file mode 100644 index 00000000000..a2b7c973d73 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, addonsConfig) { + // [START container_v1beta1_generated_ClusterManager_SetAddonsConfig_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 desired configurations for the various addons available to + * run in the cluster. + */ + // const addonsConfig = {} + /** + * The name (project, location, cluster) of the cluster to set addons. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetAddonsConfig() { + // Construct request + const request = { + projectId, + zone, + clusterId, + addonsConfig, + }; + + // Run request + const response = await containerClient.setAddonsConfig(request); + console.log(response); + } + + callSetAddonsConfig(); + // [END container_v1beta1_generated_ClusterManager_SetAddonsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js new file mode 100644 index 00000000000..bd9833ac87c --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, resourceLabels, labelFingerprint) { + // [START container_v1beta1_generated_ClusterManager_SetLabels_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 labels to set for that cluster. + */ + // const resourceLabels = [1,2,3,4] + /** + * Required. The fingerprint of the previous set of labels for this resource, + * used to detect conflicts. The fingerprint is initially generated by + * Kubernetes Engine and changes after every request to modify or update + * labels. You must always provide an up-to-date fingerprint hash when + * updating or changing labels. Make a `get()` request to the + * resource to get the latest fingerprint. + */ + // const labelFingerprint = 'abc123' + /** + * The name (project, location, cluster name) of the cluster to set labels. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLabels() { + // Construct request + const request = { + projectId, + zone, + clusterId, + resourceLabels, + labelFingerprint, + }; + + // Run request + const response = await containerClient.setLabels(request); + console.log(response); + } + + callSetLabels(); + // [END container_v1beta1_generated_ClusterManager_SetLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js new file mode 100644 index 00000000000..347161f6357 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, enabled) { + // [START container_v1beta1_generated_ClusterManager_SetLegacyAbac_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. Whether ABAC authorization will be enabled in the cluster. + */ + // const enabled = true + /** + * The name (project, location, cluster name) of the cluster to set legacy + * abac. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLegacyAbac() { + // Construct request + const request = { + projectId, + zone, + clusterId, + enabled, + }; + + // Run request + const response = await containerClient.setLegacyAbac(request); + console.log(response); + } + + callSetLegacyAbac(); + // [END container_v1beta1_generated_ClusterManager_SetLegacyAbac_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js new file mode 100644 index 00000000000..75565c475a6 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, locations) { + // [START container_v1beta1_generated_ClusterManager_SetLocations_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 desired list of Google Compute Engine + * zones (https://cloud.google.com/compute/docs/zones#available) in which the + * cluster's nodes should be located. Changing the locations a cluster is in + * will result in nodes being either created or removed from the cluster, + * depending on whether locations are being added or removed. + * This list must always include the cluster's primary zone. + */ + // const locations = ['abc','def'] + /** + * The name (project, location, cluster) of the cluster to set locations. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLocations() { + // Construct request + const request = { + projectId, + zone, + clusterId, + locations, + }; + + // Run request + const response = await containerClient.setLocations(request); + console.log(response); + } + + callSetLocations(); + // [END container_v1beta1_generated_ClusterManager_SetLocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js new file mode 100644 index 00000000000..55a67ed9634 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, loggingService) { + // [START container_v1beta1_generated_ClusterManager_SetLoggingService_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 logging service the cluster should use to write logs. + * Currently available options: + * * `logging.googleapis.com/kubernetes` - The Cloud Logging + * service with a Kubernetes-native resource model + * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + * available as of GKE 1.15). + * * `none` - no logs will be exported from the cluster. + * If left as an empty string,`logging.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + */ + // const loggingService = 'abc123' + /** + * The name (project, location, cluster) of the cluster to set logging. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetLoggingService() { + // Construct request + const request = { + projectId, + zone, + clusterId, + loggingService, + }; + + // Run request + const response = await containerClient.setLoggingService(request); + console.log(response); + } + + callSetLoggingService(); + // [END container_v1beta1_generated_ClusterManager_SetLoggingService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js new file mode 100644 index 00000000000..18ae4736ab7 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, maintenancePolicy) { + // [START container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_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 Google Developers Console project ID or project + * number (https://cloud.google.com/resource-manager/docs/creating-managing-projects). + */ + // const projectId = 'abc123' + /** + * Required. The name of the Google Compute Engine + * zone (https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. + */ + // const zone = 'abc123' + /** + * Required. The name of the cluster to update. + */ + // const clusterId = 'abc123' + /** + * Required. The maintenance policy to be set for the cluster. An empty field + * clears the existing maintenance policy. + */ + // const maintenancePolicy = {} + /** + * The name (project, location, cluster name) of the cluster to set + * maintenance policy. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMaintenancePolicy() { + // Construct request + const request = { + projectId, + zone, + clusterId, + maintenancePolicy, + }; + + // Run request + const response = await containerClient.setMaintenancePolicy(request); + console.log(response); + } + + callSetMaintenancePolicy(); + // [END container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js new file mode 100644 index 00000000000..ad3513790e4 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, action, update) { + // [START container_v1beta1_generated_ClusterManager_SetMasterAuth_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 exact form of action to be taken on the master auth. + */ + // const action = {} + /** + * Required. A description of the update. + */ + // const update = {} + /** + * The name (project, location, cluster) of the cluster to set auth. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMasterAuth() { + // Construct request + const request = { + projectId, + zone, + clusterId, + action, + update, + }; + + // Run request + const response = await containerClient.setMasterAuth(request); + console.log(response); + } + + callSetMasterAuth(); + // [END container_v1beta1_generated_ClusterManager_SetMasterAuth_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js new file mode 100644 index 00000000000..caa715511dc --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, monitoringService) { + // [START container_v1beta1_generated_ClusterManager_SetMonitoringService_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 monitoring service the cluster should use to write metrics. + * Currently available options: + * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + * service with a Kubernetes-native resource model + * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + * longer available as of GKE 1.15). + * * `none` - No metrics will be exported from the cluster. + * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + */ + // const monitoringService = 'abc123' + /** + * The name (project, location, cluster) of the cluster to set monitoring. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetMonitoringService() { + // Construct request + const request = { + projectId, + zone, + clusterId, + monitoringService, + }; + + // Run request + const response = await containerClient.setMonitoringService(request); + console.log(response); + } + + callSetMonitoringService(); + // [END container_v1beta1_generated_ClusterManager_SetMonitoringService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js new file mode 100644 index 00000000000..1d596241a96 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, networkPolicy) { + // [START container_v1beta1_generated_ClusterManager_SetNetworkPolicy_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. Configuration options for the NetworkPolicy feature. + */ + // const networkPolicy = {} + /** + * The name (project, location, cluster name) of the cluster to set networking + * policy. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNetworkPolicy() { + // Construct request + const request = { + projectId, + zone, + clusterId, + networkPolicy, + }; + + // Run request + const response = await containerClient.setNetworkPolicy(request); + console.log(response); + } + + callSetNetworkPolicy(); + // [END container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js new file mode 100644 index 00000000000..cf5b1664e49 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId, autoscaling) { + // [START container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_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. Autoscaling configuration for the node pool. + */ + // const autoscaling = {} + /** + * The name (project, location, cluster, node pool) of the node pool to set + * autoscaler settings. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolAutoscaling() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + autoscaling, + }; + + // Run request + const response = await containerClient.setNodePoolAutoscaling(request); + console.log(response); + } + + callSetNodePoolAutoscaling(); + // [END container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js new file mode 100644 index 00000000000..ee44e4267bb --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId, management) { + // [START container_v1beta1_generated_ClusterManager_SetNodePoolManagement_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. NodeManagement configuration for the node pool. + */ + // const management = {} + /** + * The name (project, location, cluster, node pool id) of the node pool to set + * management properties. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolManagement() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + management, + }; + + // Run request + const response = await containerClient.setNodePoolManagement(request); + console.log(response); + } + + callSetNodePoolManagement(); + // [END container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js new file mode 100644 index 00000000000..f35fcae02e7 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId, nodeCount) { + // [START container_v1beta1_generated_ClusterManager_SetNodePoolSize_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 desired node count for the pool. + */ + // const nodeCount = 1234 + /** + * The name (project, location, cluster, node pool id) of the node pool to set + * size. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callSetNodePoolSize() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + nodeCount, + }; + + // Run request + const response = await containerClient.setNodePoolSize(request); + console.log(response); + } + + callSetNodePoolSize(); + // [END container_v1beta1_generated_ClusterManager_SetNodePoolSize_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js new file mode 100644 index 00000000000..aa01319ae56 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId) { + // [START container_v1beta1_generated_ClusterManager_StartIPRotation_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. + */ + /** + * The name (project, location, cluster name) of the cluster to start IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + /** + * Whether to rotate credentials during IP rotation. + */ + // const rotateCredentials = true + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callStartIPRotation() { + // Construct request + const request = { + projectId, + zone, + clusterId, + }; + + // Run request + const response = await containerClient.startIPRotation(request); + console.log(response); + } + + callStartIPRotation(); + // [END container_v1beta1_generated_ClusterManager_StartIPRotation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js new file mode 100644 index 00000000000..fc86ab3d9a9 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, update) { + // [START container_v1beta1_generated_ClusterManager_UpdateCluster_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. A description of the update. + */ + // const update = {} + /** + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateCluster() { + // Construct request + const request = { + projectId, + zone, + clusterId, + update, + }; + + // Run request + const response = await containerClient.updateCluster(request); + console.log(response); + } + + callUpdateCluster(); + // [END container_v1beta1_generated_ClusterManager_UpdateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js new file mode 100644 index 00000000000..91ea8344b8c --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, masterVersion) { + // [START container_v1beta1_generated_ClusterManager_UpdateMaster_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 Kubernetes version to change the master to. + * Users may specify either explicit versions offered by + * Kubernetes Engine or version aliases, which have the following behavior: + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the default Kubernetes version + */ + // const masterVersion = 'abc123' + /** + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + */ + // const name = 'abc123' + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateMaster() { + // Construct request + const request = { + projectId, + zone, + clusterId, + masterVersion, + }; + + // Run request + const response = await containerClient.updateMaster(request); + console.log(response); + } + + callUpdateMaster(); + // [END container_v1beta1_generated_ClusterManager_UpdateMaster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js new file mode 100644 index 00000000000..af202e83760 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js @@ -0,0 +1,208 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(projectId, zone, clusterId, nodePoolId, nodeVersion, imageType) { + // [START container_v1beta1_generated_ClusterManager_UpdateNodePool_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 Kubernetes version to change the nodes to (typically an + * upgrade). + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the Kubernetes master version + */ + // const nodeVersion = 'abc123' + /** + * Required. The desired image type for the node pool. Please see + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + * available image types. + */ + // const imageType = 'abc123' + /** + * The desired list of Google Compute Engine + * zones (https://cloud.google.com/compute/docs/zones#available) in which the + * node pool's nodes should be located. Changing the locations for a node pool + * will result in nodes being either created or removed from the node pool, + * depending on whether locations are being added or removed. + */ + // const locations = ['abc','def'] + /** + * The desired workload metadata config for the node pool. + */ + // const workloadMetadataConfig = {} + /** + * The name (project, location, cluster, node pool) of the node pool to + * update. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + */ + // const name = 'abc123' + /** + * Upgrade settings control disruption and speed of the upgrade. + */ + // const upgradeSettings = {} + /** + * The desired network tags to be applied to all nodes in the node pool. + * If this field is not present, the tags will not be changed. Otherwise, + * the existing network tags will be *replaced* with the provided tags. + */ + // const tags = {} + /** + * The desired node taints to be applied to all nodes in the node pool. + * If this field is not present, the taints will not be changed. Otherwise, + * the existing node taints will be *replaced* with the provided taints. + */ + // const taints = {} + /** + * The desired node labels to be applied to all nodes in the node pool. + * If this field is not present, the labels will not be changed. Otherwise, + * the existing node labels will be *replaced* with the provided labels. + */ + // const labels = {} + /** + * Parameters that can be configured on Linux nodes. + */ + // const linuxNodeConfig = {} + /** + * Node kubelet configs. + */ + // const kubeletConfig = {} + /** + * Node network config. + */ + // const nodeNetworkConfig = {} + /** + * GCFS config. + */ + // const gcfsConfig = {} + /** + * Confidential nodes config. + * All the nodes in the node pool will be Confidential VM once enabled. + */ + // const confidentialNodes = {} + /** + * Enable or disable gvnic on the node pool. + */ + // const gvnic = {} + /** + * The current etag of the node pool. + * If an etag is provided and does not match the current etag of the node + * pool, update will be blocked and an ABORTED error will be returned. + */ + // const etag = 'abc123' + /** + * Enable or disable NCCL fast socket for the node pool. + */ + // const fastSocket = {} + /** + * Logging configuration. + */ + // const loggingConfig = {} + /** + * The resource labels for the node pool to use to annotate any related + * Google Compute Engine resources. + */ + // const resourceLabels = {} + /** + * Parameters that can be configured on Windows nodes. + */ + // const windowsNodeConfig = {} + /** + * A list of hardware accelerators to be attached to each node. + * See https://cloud.google.com/compute/docs/gpus for more information about + * support for GPUs. + */ + // const accelerators = [1,2,3,4] + /** + * Optional. The desired machine type for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified machine type. + */ + // const machineType = 'abc123' + /** + * Optional. The desired disk type for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk type. + */ + // const diskType = 'abc123' + /** + * Optional. The desired disk size for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk size. + */ + // const diskSizeGb = 1234 + /** + * Desired resource manager tag keys and values to be attached to the nodes + * for managing Compute Engine firewalls using Network Firewall Policies. + * Existing tags will be replaced with new values. + */ + // const resourceManagerTags = {} + /** + * The desired containerd config for nodes in the node pool. + * Initiates an upgrade operation that recreates the nodes with the new + * config. + */ + // const containerdConfig = {} + /** + * Specifies the configuration of queued provisioning. + */ + // const queuedProvisioning = {} + + // Imports the Container library + const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; + + // Instantiates a client + const containerClient = new ClusterManagerClient(); + + async function callUpdateNodePool() { + // Construct request + const request = { + projectId, + zone, + clusterId, + nodePoolId, + nodeVersion, + imageType, + }; + + // Run request + const response = await containerClient.updateNodePool(request); + console.log(response); + } + + callUpdateNodePool(); + // [END container_v1beta1_generated_ClusterManager_UpdateNodePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json new file mode 100644 index 00000000000..b43486c8c1c --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json @@ -0,0 +1,1983 @@ +{ + "clientLibrary": { + "name": "nodejs-container", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.container.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "container_v1beta1_generated_ClusterManager_ListClusters_async", + "title": "ClusterManager listClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all clusters owned by a project in either the specified zone or all zones.", + "canonical": true, + "file": "cluster_manager.list_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListClusters", + "fullName": "google.container.v1beta1.ClusterManager.ListClusters", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ListClustersResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "ListClusters", + "fullName": "google.container.v1beta1.ClusterManager.ListClusters", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_GetCluster_async", + "title": "ClusterManager getCluster Sample", + "origin": "API_DEFINITION", + "description": " Gets the details for a specific cluster.", + "canonical": true, + "file": "cluster_manager.get_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCluster", + "fullName": "google.container.v1beta1.ClusterManager.GetCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Cluster", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "GetCluster", + "fullName": "google.container.v1beta1.ClusterManager.GetCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CreateCluster_async", + "title": "ClusterManager createCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", + "canonical": true, + "file": "cluster_manager.create_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCluster", + "fullName": "google.container.v1beta1.ClusterManager.CreateCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster", + "type": ".google.container.v1beta1.Cluster" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CreateCluster", + "fullName": "google.container.v1beta1.ClusterManager.CreateCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_UpdateCluster_async", + "title": "ClusterManager updateCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings for a specific cluster.", + "canonical": true, + "file": "cluster_manager.update_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCluster", + "fullName": "google.container.v1beta1.ClusterManager.UpdateCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "update", + "type": ".google.container.v1beta1.ClusterUpdate" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateCluster", + "fullName": "google.container.v1beta1.ClusterManager.UpdateCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_UpdateNodePool_async", + "title": "ClusterManager updateNodePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the version and/or image type of a specific node pool.", + "canonical": true, + "file": "cluster_manager.update_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 200, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateNodePool", + "fullName": "google.container.v1beta1.ClusterManager.UpdateNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "node_version", + "type": "TYPE_STRING" + }, + { + "name": "image_type", + "type": "TYPE_STRING" + }, + { + "name": "locations", + "type": "TYPE_STRING[]" + }, + { + "name": "workload_metadata_config", + "type": ".google.container.v1beta1.WorkloadMetadataConfig" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "upgrade_settings", + "type": ".google.container.v1beta1.NodePool.UpgradeSettings" + }, + { + "name": "tags", + "type": ".google.container.v1beta1.NetworkTags" + }, + { + "name": "taints", + "type": ".google.container.v1beta1.NodeTaints" + }, + { + "name": "labels", + "type": ".google.container.v1beta1.NodeLabels" + }, + { + "name": "linux_node_config", + "type": ".google.container.v1beta1.LinuxNodeConfig" + }, + { + "name": "kubelet_config", + "type": ".google.container.v1beta1.NodeKubeletConfig" + }, + { + "name": "node_network_config", + "type": ".google.container.v1beta1.NodeNetworkConfig" + }, + { + "name": "gcfs_config", + "type": ".google.container.v1beta1.GcfsConfig" + }, + { + "name": "confidential_nodes", + "type": ".google.container.v1beta1.ConfidentialNodes" + }, + { + "name": "gvnic", + "type": ".google.container.v1beta1.VirtualNIC" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "fast_socket", + "type": ".google.container.v1beta1.FastSocket" + }, + { + "name": "logging_config", + "type": ".google.container.v1beta1.NodePoolLoggingConfig" + }, + { + "name": "resource_labels", + "type": ".google.container.v1beta1.ResourceLabels" + }, + { + "name": "windows_node_config", + "type": ".google.container.v1beta1.WindowsNodeConfig" + }, + { + "name": "accelerators", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "machine_type", + "type": "TYPE_STRING" + }, + { + "name": "disk_type", + "type": "TYPE_STRING" + }, + { + "name": "disk_size_gb", + "type": "TYPE_INT64" + }, + { + "name": "resource_manager_tags", + "type": ".google.container.v1beta1.ResourceManagerTags" + }, + { + "name": "containerd_config", + "type": ".google.container.v1beta1.ContainerdConfig" + }, + { + "name": "queued_provisioning", + "type": ".google.container.v1beta1.NodePool.QueuedProvisioning" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateNodePool", + "fullName": "google.container.v1beta1.ClusterManager.UpdateNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async", + "title": "ClusterManager setNodePoolAutoscaling Sample", + "origin": "API_DEFINITION", + "description": " Sets the autoscaling settings of a specific node pool.", + "canonical": true, + "file": "cluster_manager.set_node_pool_autoscaling.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolAutoscaling", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "autoscaling", + "type": ".google.container.v1beta1.NodePoolAutoscaling" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolAutoscaling", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetLoggingService_async", + "title": "ClusterManager setLoggingService Sample", + "origin": "API_DEFINITION", + "description": " Sets the logging service for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_logging_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLoggingService", + "fullName": "google.container.v1beta1.ClusterManager.SetLoggingService", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "logging_service", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLoggingService", + "fullName": "google.container.v1beta1.ClusterManager.SetLoggingService", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetMonitoringService_async", + "title": "ClusterManager setMonitoringService Sample", + "origin": "API_DEFINITION", + "description": " Sets the monitoring service for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_monitoring_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMonitoringService", + "fullName": "google.container.v1beta1.ClusterManager.SetMonitoringService", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "monitoring_service", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMonitoringService", + "fullName": "google.container.v1beta1.ClusterManager.SetMonitoringService", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetAddonsConfig_async", + "title": "ClusterManager setAddonsConfig Sample", + "origin": "API_DEFINITION", + "description": " Sets the addons for a specific cluster.", + "canonical": true, + "file": "cluster_manager.set_addons_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetAddonsConfig", + "fullName": "google.container.v1beta1.ClusterManager.SetAddonsConfig", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "addons_config", + "type": ".google.container.v1beta1.AddonsConfig" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetAddonsConfig", + "fullName": "google.container.v1beta1.ClusterManager.SetAddonsConfig", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetLocations_async", + "title": "ClusterManager setLocations Sample", + "origin": "API_DEFINITION", + "description": " Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) instead.", + "canonical": true, + "file": "cluster_manager.set_locations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLocations", + "fullName": "google.container.v1beta1.ClusterManager.SetLocations", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "locations", + "type": "TYPE_STRING[]" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLocations", + "fullName": "google.container.v1beta1.ClusterManager.SetLocations", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_UpdateMaster_async", + "title": "ClusterManager updateMaster Sample", + "origin": "API_DEFINITION", + "description": " Updates the master for a specific cluster.", + "canonical": true, + "file": "cluster_manager.update_master.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMaster", + "fullName": "google.container.v1beta1.ClusterManager.UpdateMaster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "master_version", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "UpdateMaster", + "fullName": "google.container.v1beta1.ClusterManager.UpdateMaster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetMasterAuth_async", + "title": "ClusterManager setMasterAuth Sample", + "origin": "API_DEFINITION", + "description": " Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", + "canonical": true, + "file": "cluster_manager.set_master_auth.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMasterAuth", + "fullName": "google.container.v1beta1.ClusterManager.SetMasterAuth", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "action", + "type": ".google.container.v1beta1.SetMasterAuthRequest.Action" + }, + { + "name": "update", + "type": ".google.container.v1beta1.MasterAuth" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMasterAuth", + "fullName": "google.container.v1beta1.ClusterManager.SetMasterAuth", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_DeleteCluster_async", + "title": "ClusterManager deleteCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", + "canonical": true, + "file": "cluster_manager.delete_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCluster", + "fullName": "google.container.v1beta1.ClusterManager.DeleteCluster", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "DeleteCluster", + "fullName": "google.container.v1beta1.ClusterManager.DeleteCluster", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_ListOperations_async", + "title": "ClusterManager listOperations Sample", + "origin": "API_DEFINITION", + "description": " Lists all operations in a project in the specified zone or all zones.", + "canonical": true, + "file": "cluster_manager.list_operations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.container.v1beta1.ClusterManager.ListOperations", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ListOperationsResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.container.v1beta1.ClusterManager.ListOperations", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_GetOperation_async", + "title": "ClusterManager getOperation Sample", + "origin": "API_DEFINITION", + "description": " Gets the specified operation.", + "canonical": true, + "file": "cluster_manager.get_operation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.container.v1beta1.ClusterManager.GetOperation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "operation_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.container.v1beta1.ClusterManager.GetOperation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CancelOperation_async", + "title": "ClusterManager cancelOperation Sample", + "origin": "API_DEFINITION", + "description": " Cancels the specified operation.", + "canonical": true, + "file": "cluster_manager.cancel_operation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.container.v1beta1.ClusterManager.CancelOperation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "operation_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.container.v1beta1.ClusterManager.CancelOperation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_GetServerConfig_async", + "title": "ClusterManager getServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns configuration info about the Google Kubernetes Engine service.", + "canonical": true, + "file": "cluster_manager.get_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServerConfig", + "fullName": "google.container.v1beta1.ClusterManager.GetServerConfig", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ServerConfig", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "GetServerConfig", + "fullName": "google.container.v1beta1.ClusterManager.GetServerConfig", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async", + "title": "ClusterManager getJSONWebKeys Sample", + "origin": "API_DEFINITION", + "description": " Gets the public component of the cluster signing keys in JSON Web Key format.", + "canonical": true, + "file": "cluster_manager.get_j_s_o_n_web_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.GetJSONWebKeysResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_ListNodePools_async", + "title": "ClusterManager listNodePools Sample", + "origin": "API_DEFINITION", + "description": " Lists the node pools for a cluster.", + "canonical": true, + "file": "cluster_manager.list_node_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNodePools", + "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ListNodePoolsResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "ListNodePools", + "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_GetNodePool_async", + "title": "ClusterManager getNodePool Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the requested node pool.", + "canonical": true, + "file": "cluster_manager.get_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNodePool", + "fullName": "google.container.v1beta1.ClusterManager.GetNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.NodePool", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "GetNodePool", + "fullName": "google.container.v1beta1.ClusterManager.GetNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CreateNodePool_async", + "title": "ClusterManager createNodePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a node pool for a cluster.", + "canonical": true, + "file": "cluster_manager.create_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateNodePool", + "fullName": "google.container.v1beta1.ClusterManager.CreateNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool", + "type": ".google.container.v1beta1.NodePool" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CreateNodePool", + "fullName": "google.container.v1beta1.ClusterManager.CreateNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_DeleteNodePool_async", + "title": "ClusterManager deleteNodePool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a node pool from a cluster.", + "canonical": true, + "file": "cluster_manager.delete_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteNodePool", + "fullName": "google.container.v1beta1.ClusterManager.DeleteNodePool", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "DeleteNodePool", + "fullName": "google.container.v1beta1.ClusterManager.DeleteNodePool", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async", + "title": "ClusterManager completeNodePoolUpgrade Sample", + "origin": "API_DEFINITION", + "description": " CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", + "canonical": true, + "file": "cluster_manager.complete_node_pool_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CompleteNodePoolUpgrade", + "fullName": "google.container.v1beta1.ClusterManager.CompleteNodePoolUpgrade", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CompleteNodePoolUpgrade", + "fullName": "google.container.v1beta1.ClusterManager.CompleteNodePoolUpgrade", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async", + "title": "ClusterManager rollbackNodePoolUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", + "canonical": true, + "file": "cluster_manager.rollback_node_pool_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackNodePoolUpgrade", + "fullName": "google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "respect_pdb", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "RollbackNodePoolUpgrade", + "fullName": "google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async", + "title": "ClusterManager setNodePoolManagement Sample", + "origin": "API_DEFINITION", + "description": " Sets the NodeManagement options for a node pool.", + "canonical": true, + "file": "cluster_manager.set_node_pool_management.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolManagement", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolManagement", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "management", + "type": ".google.container.v1beta1.NodeManagement" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolManagement", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolManagement", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetLabels_async", + "title": "ClusterManager setLabels Sample", + "origin": "API_DEFINITION", + "description": " Sets labels on a cluster.", + "canonical": true, + "file": "cluster_manager.set_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLabels", + "fullName": "google.container.v1beta1.ClusterManager.SetLabels", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "resource_labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "label_fingerprint", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLabels", + "fullName": "google.container.v1beta1.ClusterManager.SetLabels", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetLegacyAbac_async", + "title": "ClusterManager setLegacyAbac Sample", + "origin": "API_DEFINITION", + "description": " Enables or disables the ABAC authorization mechanism on a cluster.", + "canonical": true, + "file": "cluster_manager.set_legacy_abac.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetLegacyAbac", + "fullName": "google.container.v1beta1.ClusterManager.SetLegacyAbac", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "enabled", + "type": "TYPE_BOOL" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetLegacyAbac", + "fullName": "google.container.v1beta1.ClusterManager.SetLegacyAbac", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_StartIPRotation_async", + "title": "ClusterManager startIPRotation Sample", + "origin": "API_DEFINITION", + "description": " Starts master IP rotation.", + "canonical": true, + "file": "cluster_manager.start_i_p_rotation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StartIPRotation", + "fullName": "google.container.v1beta1.ClusterManager.StartIPRotation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rotate_credentials", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "StartIPRotation", + "fullName": "google.container.v1beta1.ClusterManager.StartIPRotation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CompleteIPRotation_async", + "title": "ClusterManager completeIPRotation Sample", + "origin": "API_DEFINITION", + "description": " Completes master IP rotation.", + "canonical": true, + "file": "cluster_manager.complete_i_p_rotation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CompleteIPRotation", + "fullName": "google.container.v1beta1.ClusterManager.CompleteIPRotation", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CompleteIPRotation", + "fullName": "google.container.v1beta1.ClusterManager.CompleteIPRotation", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolSize_async", + "title": "ClusterManager setNodePoolSize Sample", + "origin": "API_DEFINITION", + "description": " SetNodePoolSizeRequest sets the size of a node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1beta1.NodePool.locations].", + "canonical": true, + "file": "cluster_manager.set_node_pool_size.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNodePoolSize", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolSize", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "node_count", + "type": "TYPE_INT32" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNodePoolSize", + "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolSize", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async", + "title": "ClusterManager setNetworkPolicy Sample", + "origin": "API_DEFINITION", + "description": " Enables or disables Network Policy for a cluster.", + "canonical": true, + "file": "cluster_manager.set_network_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetNetworkPolicy", + "fullName": "google.container.v1beta1.ClusterManager.SetNetworkPolicy", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "network_policy", + "type": ".google.container.v1beta1.NetworkPolicy" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetNetworkPolicy", + "fullName": "google.container.v1beta1.ClusterManager.SetNetworkPolicy", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async", + "title": "ClusterManager setMaintenancePolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the maintenance policy for a cluster.", + "canonical": true, + "file": "cluster_manager.set_maintenance_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetMaintenancePolicy", + "fullName": "google.container.v1beta1.ClusterManager.SetMaintenancePolicy", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "maintenance_policy", + "type": ".google.container.v1beta1.MaintenancePolicy" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.Operation", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "SetMaintenancePolicy", + "fullName": "google.container.v1beta1.ClusterManager.SetMaintenancePolicy", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async", + "title": "ClusterManager listUsableSubnetworks Sample", + "origin": "API_DEFINITION", + "description": " Lists subnetworks that can be used for creating clusters in a project.", + "canonical": true, + "file": "cluster_manager.list_usable_subnetworks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUsableSubnetworks", + "fullName": "google.container.v1beta1.ClusterManager.ListUsableSubnetworks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ListUsableSubnetworksResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "ListUsableSubnetworks", + "fullName": "google.container.v1beta1.ClusterManager.ListUsableSubnetworks", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async", + "title": "ClusterManager checkAutopilotCompatibility Sample", + "origin": "API_DEFINITION", + "description": " Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.", + "canonical": true, + "file": "cluster_manager.check_autopilot_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckAutopilotCompatibility", + "fullName": "google.container.v1beta1.ClusterManager.CheckAutopilotCompatibility", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.CheckAutopilotCompatibilityResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "CheckAutopilotCompatibility", + "fullName": "google.container.v1beta1.ClusterManager.CheckAutopilotCompatibility", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + }, + { + "regionTag": "container_v1beta1_generated_ClusterManager_ListLocations_async", + "title": "ClusterManager listLocations Sample", + "origin": "API_DEFINITION", + "description": " Fetches locations that offer Google Kubernetes Engine.", + "canonical": true, + "file": "cluster_manager.list_locations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.container.v1beta1.ClusterManager.ListLocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.container.v1beta1.ListLocationsResponse", + "client": { + "shortName": "ClusterManagerClient", + "fullName": "google.container.v1beta1.ClusterManagerClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.container.v1beta1.ClusterManager.ListLocations", + "service": { + "shortName": "ClusterManager", + "fullName": "google.container.v1beta1.ClusterManager" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-container/v1beta1/src/index.ts b/owl-bot-staging/google-container/v1beta1/src/index.ts new file mode 100644 index 00000000000..bdbfbc9ddbb --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 v1beta1 from './v1beta1'; +const ClusterManagerClient = v1beta1.ClusterManagerClient; +type ClusterManagerClient = v1beta1.ClusterManagerClient; +export {v1beta1, ClusterManagerClient}; +export default {v1beta1, ClusterManagerClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts new file mode 100644 index 00000000000..2544f20e8d8 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts @@ -0,0 +1,3637 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/cluster_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cluster_manager_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Kubernetes Engine Cluster Manager v1beta1 + * @class + * @memberof v1beta1 + */ +export class ClusterManagerClient { + 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + clusterManagerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ClusterManagerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ClusterManagerClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ClusterManagerClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'container.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._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 = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // 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 = { + listUsableSubnetworks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'subnetworks') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.container.v1beta1.ClusterManager', 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.clusterManagerStub) { + return this.clusterManagerStub; + } + + // Put together the "service stub" for + // google.container.v1beta1.ClusterManager. + this.clusterManagerStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.container.v1beta1.ClusterManager') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.container.v1beta1.ClusterManager, + 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 clusterManagerStubMethods = + ['listClusters', 'getCluster', 'createCluster', 'updateCluster', 'updateNodePool', 'setNodePoolAutoscaling', 'setLoggingService', 'setMonitoringService', 'setAddonsConfig', 'setLocations', 'updateMaster', 'setMasterAuth', 'deleteCluster', 'listOperations', 'getOperation', 'cancelOperation', 'getServerConfig', 'getJsonWebKeys', 'listNodePools', 'getNodePool', 'createNodePool', 'deleteNodePool', 'completeNodePoolUpgrade', 'rollbackNodePoolUpgrade', 'setNodePoolManagement', 'setLabels', 'setLegacyAbac', 'startIpRotation', 'completeIpRotation', 'setNodePoolSize', 'setNetworkPolicy', 'setMaintenancePolicy', 'listUsableSubnetworks', 'checkAutopilotCompatibility', 'listLocations']; + for (const methodName of clusterManagerStubMethods) { + const callPromise = this.clusterManagerStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.clusterManagerStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'container.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'container.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Lists all clusters owned by a project in either the specified zone or all + * zones. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides, or "-" for all zones. This field has been deprecated and + * replaced by the parent field. + * @param {string} request.parent + * The parent (project and location) where the clusters will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListClustersResponse|ListClustersResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.list_clusters.js + * region_tag:container_v1beta1_generated_ClusterManager_ListClusters_async + */ + listClusters( + request?: protos.google.container.v1beta1.IListClustersRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|undefined, {}|undefined + ]>; + listClusters( + request: protos.google.container.v1beta1.IListClustersRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|null|undefined, + {}|null|undefined>): void; + listClusters( + request: protos.google.container.v1beta1.IListClustersRequest, + callback: Callback< + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|null|undefined, + {}|null|undefined>): void; + listClusters( + request?: protos.google.container.v1beta1.IListClustersRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IListClustersResponse, + protos.google.container.v1beta1.IListClustersRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.listClusters(request, options, callback); + } +/** + * Gets the details for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to retrieve. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Cluster|Cluster}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.get_cluster.js + * region_tag:container_v1beta1_generated_ClusterManager_GetCluster_async + */ + getCluster( + request?: protos.google.container.v1beta1.IGetClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|undefined, {}|undefined + ]>; + getCluster( + request: protos.google.container.v1beta1.IGetClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|null|undefined, + {}|null|undefined>): void; + getCluster( + request: protos.google.container.v1beta1.IGetClusterRequest, + callback: Callback< + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|null|undefined, + {}|null|undefined>): void; + getCluster( + request?: protos.google.container.v1beta1.IGetClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.ICluster, + protos.google.container.v1beta1.IGetClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCluster(request, options, callback); + } +/** + * Creates a cluster, consisting of the specified number and type of Google + * Compute Engine instances. + * + * By default, the cluster is created in the project's + * [default + * network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + * + * One firewall is added for the cluster. After cluster creation, + * the Kubelet creates routes for each node to allow the containers + * on that node to communicate with all other instances in the + * cluster. + * + * Finally, an entry is added to the project's global metadata indicating + * which CIDR range the cluster is using. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {google.container.v1beta1.Cluster} request.cluster + * Required. A [cluster + * resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) + * @param {string} request.parent + * The parent (project and location) where the cluster will be created. + * Specified in the format `projects/* /locations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.create_cluster.js + * region_tag:container_v1beta1_generated_ClusterManager_CreateCluster_async + */ + createCluster( + request?: protos.google.container.v1beta1.ICreateClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|undefined, {}|undefined + ]>; + createCluster( + request: protos.google.container.v1beta1.ICreateClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): void; + createCluster( + request: protos.google.container.v1beta1.ICreateClusterRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): void; + createCluster( + request?: protos.google.container.v1beta1.ICreateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCluster(request, options, callback); + } +/** + * Updates the settings for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.ClusterUpdate} request.update + * Required. A description of the update. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.update_cluster.js + * region_tag:container_v1beta1_generated_ClusterManager_UpdateCluster_async + */ + updateCluster( + request?: protos.google.container.v1beta1.IUpdateClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|undefined, {}|undefined + ]>; + updateCluster( + request: protos.google.container.v1beta1.IUpdateClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): void; + updateCluster( + request: protos.google.container.v1beta1.IUpdateClusterRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): void; + updateCluster( + request?: protos.google.container.v1beta1.IUpdateClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCluster(request, options, callback); + } +/** + * Updates the version and/or image type of a specific node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodeVersion + * Required. The Kubernetes version to change the nodes to (typically an + * upgrade). + * + * Users may specify either explicit versions offered by Kubernetes Engine or + * version aliases, which have the following behavior: + * + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the Kubernetes master version + * @param {string} request.imageType + * Required. The desired image type for the node pool. Please see + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for + * available image types. + * @param {string[]} request.locations + * The desired list of Google Compute Engine + * [zones](https://cloud.google.com/compute/docs/zones#available) in which the + * node pool's nodes should be located. Changing the locations for a node pool + * will result in nodes being either created or removed from the node pool, + * depending on whether locations are being added or removed. + * @param {google.container.v1beta1.WorkloadMetadataConfig} request.workloadMetadataConfig + * The desired workload metadata config for the node pool. + * @param {string} request.name + * The name (project, location, cluster, node pool) of the node pool to + * update. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {google.container.v1beta1.NodePool.UpgradeSettings} request.upgradeSettings + * Upgrade settings control disruption and speed of the upgrade. + * @param {google.container.v1beta1.NetworkTags} request.tags + * The desired network tags to be applied to all nodes in the node pool. + * If this field is not present, the tags will not be changed. Otherwise, + * the existing network tags will be *replaced* with the provided tags. + * @param {google.container.v1beta1.NodeTaints} request.taints + * The desired node taints to be applied to all nodes in the node pool. + * If this field is not present, the taints will not be changed. Otherwise, + * the existing node taints will be *replaced* with the provided taints. + * @param {google.container.v1beta1.NodeLabels} request.labels + * The desired node labels to be applied to all nodes in the node pool. + * If this field is not present, the labels will not be changed. Otherwise, + * the existing node labels will be *replaced* with the provided labels. + * @param {google.container.v1beta1.LinuxNodeConfig} request.linuxNodeConfig + * Parameters that can be configured on Linux nodes. + * @param {google.container.v1beta1.NodeKubeletConfig} request.kubeletConfig + * Node kubelet configs. + * @param {google.container.v1beta1.NodeNetworkConfig} request.nodeNetworkConfig + * Node network config. + * @param {google.container.v1beta1.GcfsConfig} request.gcfsConfig + * GCFS config. + * @param {google.container.v1beta1.ConfidentialNodes} request.confidentialNodes + * Confidential nodes config. + * All the nodes in the node pool will be Confidential VM once enabled. + * @param {google.container.v1beta1.VirtualNIC} request.gvnic + * Enable or disable gvnic on the node pool. + * @param {string} request.etag + * The current etag of the node pool. + * If an etag is provided and does not match the current etag of the node + * pool, update will be blocked and an ABORTED error will be returned. + * @param {google.container.v1beta1.FastSocket} request.fastSocket + * Enable or disable NCCL fast socket for the node pool. + * @param {google.container.v1beta1.NodePoolLoggingConfig} request.loggingConfig + * Logging configuration. + * @param {google.container.v1beta1.ResourceLabels} request.resourceLabels + * The resource labels for the node pool to use to annotate any related + * Google Compute Engine resources. + * @param {google.container.v1beta1.WindowsNodeConfig} request.windowsNodeConfig + * Parameters that can be configured on Windows nodes. + * @param {number[]} request.accelerators + * A list of hardware accelerators to be attached to each node. + * See https://cloud.google.com/compute/docs/gpus for more information about + * support for GPUs. + * @param {string} [request.machineType] + * Optional. The desired machine type for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified machine type. + * @param {string} [request.diskType] + * Optional. The desired disk type for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk type. + * @param {number} [request.diskSizeGb] + * Optional. The desired disk size for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified disk size. + * @param {google.container.v1beta1.ResourceManagerTags} request.resourceManagerTags + * Desired resource manager tag keys and values to be attached to the nodes + * for managing Compute Engine firewalls using Network Firewall Policies. + * Existing tags will be replaced with new values. + * @param {google.container.v1beta1.ContainerdConfig} request.containerdConfig + * The desired containerd config for nodes in the node pool. + * Initiates an upgrade operation that recreates the nodes with the new + * config. + * @param {google.container.v1beta1.NodePool.QueuedProvisioning} request.queuedProvisioning + * Specifies the configuration of queued provisioning. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.update_node_pool.js + * region_tag:container_v1beta1_generated_ClusterManager_UpdateNodePool_async + */ + updateNodePool( + request?: protos.google.container.v1beta1.IUpdateNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|undefined, {}|undefined + ]>; + updateNodePool( + request: protos.google.container.v1beta1.IUpdateNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + updateNodePool( + request: protos.google.container.v1beta1.IUpdateNodePoolRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + updateNodePool( + request?: protos.google.container.v1beta1.IUpdateNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateNodePool(request, options, callback); + } +/** + * Sets the autoscaling settings of a specific node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.NodePoolAutoscaling} request.autoscaling + * Required. Autoscaling configuration for the node pool. + * @param {string} request.name + * The name (project, location, cluster, node pool) of the node pool to set + * autoscaler settings. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js + * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async + */ + setNodePoolAutoscaling( + request?: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|undefined, {}|undefined + ]>; + setNodePoolAutoscaling( + request: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolAutoscaling( + request: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolAutoscaling( + request?: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolAutoscaling(request, options, callback); + } +/** + * Sets the logging service for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.loggingService + * Required. The logging service the cluster should use to write logs. + * Currently available options: + * + * * `logging.googleapis.com/kubernetes` - The Cloud Logging + * service with a Kubernetes-native resource model + * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer + * available as of GKE 1.15). + * * `none` - no logs will be exported from the cluster. + * + * If left as an empty string,`logging.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set logging. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_logging_service.js + * region_tag:container_v1beta1_generated_ClusterManager_SetLoggingService_async + */ + setLoggingService( + request?: protos.google.container.v1beta1.ISetLoggingServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|undefined, {}|undefined + ]>; + setLoggingService( + request: protos.google.container.v1beta1.ISetLoggingServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): void; + setLoggingService( + request: protos.google.container.v1beta1.ISetLoggingServiceRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): void; + setLoggingService( + request?: protos.google.container.v1beta1.ISetLoggingServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLoggingServiceRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLoggingService(request, options, callback); + } +/** + * Sets the monitoring service for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.monitoringService + * Required. The monitoring service the cluster should use to write metrics. + * Currently available options: + * + * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring + * service with a Kubernetes-native resource model + * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no + * longer available as of GKE 1.15). + * * `none` - No metrics will be exported from the cluster. + * + * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be + * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set monitoring. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_monitoring_service.js + * region_tag:container_v1beta1_generated_ClusterManager_SetMonitoringService_async + */ + setMonitoringService( + request?: protos.google.container.v1beta1.ISetMonitoringServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|undefined, {}|undefined + ]>; + setMonitoringService( + request: protos.google.container.v1beta1.ISetMonitoringServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): void; + setMonitoringService( + request: protos.google.container.v1beta1.ISetMonitoringServiceRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): void; + setMonitoringService( + request?: protos.google.container.v1beta1.ISetMonitoringServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMonitoringServiceRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMonitoringService(request, options, callback); + } +/** + * Sets the addons for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.AddonsConfig} request.addonsConfig + * Required. The desired configurations for the various addons available to + * run in the cluster. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set addons. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_addons_config.js + * region_tag:container_v1beta1_generated_ClusterManager_SetAddonsConfig_async + */ + setAddonsConfig( + request?: protos.google.container.v1beta1.ISetAddonsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|undefined, {}|undefined + ]>; + setAddonsConfig( + request: protos.google.container.v1beta1.ISetAddonsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): void; + setAddonsConfig( + request: protos.google.container.v1beta1.ISetAddonsConfigRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): void; + setAddonsConfig( + request?: protos.google.container.v1beta1.ISetAddonsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetAddonsConfigRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setAddonsConfig(request, options, callback); + } +/** + * Sets the locations for a specific cluster. + * Deprecated. Use + * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) + * instead. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string[]} request.locations + * Required. The desired list of Google Compute Engine + * [zones](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster's nodes should be located. Changing the locations a cluster is in + * will result in nodes being either created or removed from the cluster, + * depending on whether locations are being added or removed. + * + * This list must always include the cluster's primary zone. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set locations. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_locations.js + * region_tag:container_v1beta1_generated_ClusterManager_SetLocations_async + * @deprecated SetLocations is deprecated and may be removed in a future version. + */ + setLocations( + request?: protos.google.container.v1beta1.ISetLocationsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|undefined, {}|undefined + ]>; + setLocations( + request: protos.google.container.v1beta1.ISetLocationsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): void; + setLocations( + request: protos.google.container.v1beta1.ISetLocationsRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): void; + setLocations( + request?: protos.google.container.v1beta1.ISetLocationsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLocationsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + this.warn('DEP$ClusterManager-$SetLocations','SetLocations is deprecated and may be removed in a future version.', 'DeprecationWarning'); + return this.innerApiCalls.setLocations(request, options, callback); + } +/** + * Updates the master for a specific cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {string} request.masterVersion + * Required. The Kubernetes version to change the master to. + * + * Users may specify either explicit versions offered by + * Kubernetes Engine or version aliases, which have the following behavior: + * + * - "latest": picks the highest valid Kubernetes version + * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version + * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version + * - "1.X.Y-gke.N": picks an explicit Kubernetes version + * - "-": picks the default Kubernetes version + * @param {string} request.name + * The name (project, location, cluster) of the cluster to update. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.update_master.js + * region_tag:container_v1beta1_generated_ClusterManager_UpdateMaster_async + */ + updateMaster( + request?: protos.google.container.v1beta1.IUpdateMasterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|undefined, {}|undefined + ]>; + updateMaster( + request: protos.google.container.v1beta1.IUpdateMasterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): void; + updateMaster( + request: protos.google.container.v1beta1.IUpdateMasterRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): void; + updateMaster( + request?: protos.google.container.v1beta1.IUpdateMasterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IUpdateMasterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateMaster(request, options, callback); + } +/** + * Sets master auth materials. Currently supports changing the admin password + * or a specific cluster, either via password generation or explicitly setting + * the password. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to upgrade. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.SetMasterAuthRequest.Action} request.action + * Required. The exact form of action to be taken on the master auth. + * @param {google.container.v1beta1.MasterAuth} request.update + * Required. A description of the update. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to set auth. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_master_auth.js + * region_tag:container_v1beta1_generated_ClusterManager_SetMasterAuth_async + */ + setMasterAuth( + request?: protos.google.container.v1beta1.ISetMasterAuthRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|undefined, {}|undefined + ]>; + setMasterAuth( + request: protos.google.container.v1beta1.ISetMasterAuthRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): void; + setMasterAuth( + request: protos.google.container.v1beta1.ISetMasterAuthRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): void; + setMasterAuth( + request?: protos.google.container.v1beta1.ISetMasterAuthRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMasterAuthRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMasterAuth(request, options, callback); + } +/** + * Deletes the cluster, including the Kubernetes endpoint and all worker + * nodes. + * + * Firewalls and routes that were configured during cluster creation + * are also deleted. + * + * Other Google Compute Engine resources that might be in use by the cluster, + * such as load balancer resources, are not deleted if they weren't present + * when the cluster was initially created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to delete. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to delete. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.delete_cluster.js + * region_tag:container_v1beta1_generated_ClusterManager_DeleteCluster_async + */ + deleteCluster( + request?: protos.google.container.v1beta1.IDeleteClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|undefined, {}|undefined + ]>; + deleteCluster( + request: protos.google.container.v1beta1.IDeleteClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): void; + deleteCluster( + request: protos.google.container.v1beta1.IDeleteClusterRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): void; + deleteCluster( + request?: protos.google.container.v1beta1.IDeleteClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteClusterRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteCluster(request, options, callback); + } +/** + * Lists all operations in a project in the specified zone or all zones. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) to return + * operations for, or `-` for all zones. This field has been deprecated and + * replaced by the parent field. + * @param {string} request.parent + * The parent (project and location) where the operations will be listed. + * Specified in the format `projects/* /locations/*`. + * Location "-" matches all zones and all regions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListOperationsResponse|ListOperationsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.list_operations.js + * region_tag:container_v1beta1_generated_ClusterManager_ListOperations_async + */ + listOperations( + request?: protos.google.container.v1beta1.IListOperationsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|undefined, {}|undefined + ]>; + listOperations( + request: protos.google.container.v1beta1.IListOperationsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|null|undefined, + {}|null|undefined>): void; + listOperations( + request: protos.google.container.v1beta1.IListOperationsRequest, + callback: Callback< + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|null|undefined, + {}|null|undefined>): void; + listOperations( + request?: protos.google.container.v1beta1.IListOperationsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IListOperationsResponse, + protos.google.container.v1beta1.IListOperationsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.listOperations(request, options, callback); + } +/** + * Gets the specified operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.operationId + * Required. Deprecated. The server-assigned `name` of the operation. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, operation id) of the operation to get. + * Specified in the format `projects/* /locations/* /operations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.get_operation.js + * region_tag:container_v1beta1_generated_ClusterManager_GetOperation_async + */ + getOperation( + request?: protos.google.container.v1beta1.IGetOperationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|undefined, {}|undefined + ]>; + getOperation( + request: protos.google.container.v1beta1.IGetOperationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|null|undefined, + {}|null|undefined>): void; + getOperation( + request: protos.google.container.v1beta1.IGetOperationRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|null|undefined, + {}|null|undefined>): void; + getOperation( + request?: protos.google.container.v1beta1.IGetOperationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IGetOperationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'operation_id': request.operationId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getOperation(request, options, callback); + } +/** + * Cancels the specified operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * operation resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.operationId + * Required. Deprecated. The server-assigned `name` of the operation. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, operation id) of the operation to cancel. + * Specified in the format `projects/* /locations/* /operations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.cancel_operation.js + * region_tag:container_v1beta1_generated_ClusterManager_CancelOperation_async + */ + cancelOperation( + request?: protos.google.container.v1beta1.ICancelOperationRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|undefined, {}|undefined + ]>; + cancelOperation( + request: protos.google.container.v1beta1.ICancelOperationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): void; + cancelOperation( + request: protos.google.container.v1beta1.ICancelOperationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): void; + cancelOperation( + request?: protos.google.container.v1beta1.ICancelOperationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICancelOperationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'operation_id': request.operationId ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelOperation(request, options, callback); + } +/** + * Returns configuration info about the Google Kubernetes Engine service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) to return + * operations for. This field has been deprecated and replaced by the name + * field. + * @param {string} request.name + * The name (project and location) of the server config to get, + * specified in the format `projects/* /locations/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.ServerConfig|ServerConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.get_server_config.js + * region_tag:container_v1beta1_generated_ClusterManager_GetServerConfig_async + */ + getServerConfig( + request?: protos.google.container.v1beta1.IGetServerConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|undefined, {}|undefined + ]>; + getServerConfig( + request: protos.google.container.v1beta1.IGetServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getServerConfig( + request: protos.google.container.v1beta1.IGetServerConfigRequest, + callback: Callback< + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getServerConfig( + request?: protos.google.container.v1beta1.IGetServerConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IServerConfig, + protos.google.container.v1beta1.IGetServerConfigRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + }); + this.initialize(); + return this.innerApiCalls.getServerConfig(request, options, callback); + } +/** + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The cluster (project, location, cluster name) to get keys for. Specified in + * the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.GetJSONWebKeysResponse|GetJSONWebKeysResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js + * region_tag:container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async + */ + getJSONWebKeys( + request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|undefined, {}|undefined + ]>; + getJSONWebKeys( + request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): void; + getJSONWebKeys( + request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + callback: Callback< + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): void; + getJSONWebKeys( + request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest|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.getJsonWebKeys(request, options, callback); + } +/** + * Lists the node pools for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the parent field. + * @param {string} request.parent + * The parent (project, location, cluster name) where the node pools will be + * listed. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListNodePoolsResponse|ListNodePoolsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.list_node_pools.js + * region_tag:container_v1beta1_generated_ClusterManager_ListNodePools_async + */ + listNodePools( + request?: protos.google.container.v1beta1.IListNodePoolsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|undefined, {}|undefined + ]>; + listNodePools( + request: protos.google.container.v1beta1.IListNodePoolsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): void; + listNodePools( + request: protos.google.container.v1beta1.IListNodePoolsRequest, + callback: Callback< + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): void; + listNodePools( + request?: protos.google.container.v1beta1.IListNodePoolsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.listNodePools(request, options, callback); + } +/** + * Retrieves the requested node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * get. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.NodePool|NodePool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.get_node_pool.js + * region_tag:container_v1beta1_generated_ClusterManager_GetNodePool_async + */ + getNodePool( + request?: protos.google.container.v1beta1.IGetNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|undefined, {}|undefined + ]>; + getNodePool( + request: protos.google.container.v1beta1.IGetNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getNodePool( + request: protos.google.container.v1beta1.IGetNodePoolRequest, + callback: Callback< + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getNodePool( + request?: protos.google.container.v1beta1.IGetNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.INodePool, + protos.google.container.v1beta1.IGetNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.getNodePool(request, options, callback); + } +/** + * Creates a node pool for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the parent field. + * @param {google.container.v1beta1.NodePool} request.nodePool + * Required. The node pool to create. + * @param {string} request.parent + * The parent (project, location, cluster name) where the node pool will be + * created. Specified in the format + * `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.create_node_pool.js + * region_tag:container_v1beta1_generated_ClusterManager_CreateNodePool_async + */ + createNodePool( + request?: protos.google.container.v1beta1.ICreateNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|undefined, {}|undefined + ]>; + createNodePool( + request: protos.google.container.v1beta1.ICreateNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + createNodePool( + request: protos.google.container.v1beta1.ICreateNodePoolRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): void; + createNodePool( + request?: protos.google.container.v1beta1.ICreateNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICreateNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.createNodePool(request, options, callback); + } +/** + * Deletes a node pool from a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to delete. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * delete. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.delete_node_pool.js + * region_tag:container_v1beta1_generated_ClusterManager_DeleteNodePool_async + */ + deleteNodePool( + request?: protos.google.container.v1beta1.IDeleteNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|undefined, {}|undefined + ]>; + deleteNodePool( + request: protos.google.container.v1beta1.IDeleteNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): void; + deleteNodePool( + request: protos.google.container.v1beta1.IDeleteNodePoolRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): void; + deleteNodePool( + request?: protos.google.container.v1beta1.IDeleteNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IDeleteNodePoolRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteNodePool(request, options, callback); + } +/** + * CompleteNodePoolUpgrade will signal an on-going node pool upgrade to + * complete. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to + * complete upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js + * region_tag:container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async + */ + completeNodePoolUpgrade( + request?: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|undefined, {}|undefined + ]>; + completeNodePoolUpgrade( + request: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + completeNodePoolUpgrade( + request: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + completeNodePoolUpgrade( + request?: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|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.completeNodePoolUpgrade(request, options, callback); + } +/** + * Rolls back a previously Aborted or Failed NodePool upgrade. + * This makes no changes if the last upgrade successfully completed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to rollback. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to rollback. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node poll to + * rollback upgrade. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {boolean} request.respectPdb + * Option for rollback to ignore the PodDisruptionBudget. + * Default value is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js + * region_tag:container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async + */ + rollbackNodePoolUpgrade( + request?: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|undefined, {}|undefined + ]>; + rollbackNodePoolUpgrade( + request: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + rollbackNodePoolUpgrade( + request: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): void; + rollbackNodePoolUpgrade( + request?: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.rollbackNodePoolUpgrade(request, options, callback); + } +/** + * Sets the NodeManagement options for a node pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to update. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.NodeManagement} request.management + * Required. NodeManagement configuration for the node pool. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to set + * management properties. Specified in the format + * `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_management.js + * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async + */ + setNodePoolManagement( + request?: protos.google.container.v1beta1.ISetNodePoolManagementRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|undefined, {}|undefined + ]>; + setNodePoolManagement( + request: protos.google.container.v1beta1.ISetNodePoolManagementRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolManagement( + request: protos.google.container.v1beta1.ISetNodePoolManagementRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolManagement( + request?: protos.google.container.v1beta1.ISetNodePoolManagementRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolManagementRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolManagement(request, options, callback); + } +/** + * Sets labels on a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {number[]} request.resourceLabels + * Required. The labels to set for that cluster. + * @param {string} request.labelFingerprint + * Required. The fingerprint of the previous set of labels for this resource, + * used to detect conflicts. The fingerprint is initially generated by + * Kubernetes Engine and changes after every request to modify or update + * labels. You must always provide an up-to-date fingerprint hash when + * updating or changing labels. Make a `get()` request to the + * resource to get the latest fingerprint. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set labels. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_labels.js + * region_tag:container_v1beta1_generated_ClusterManager_SetLabels_async + */ + setLabels( + request?: protos.google.container.v1beta1.ISetLabelsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|undefined, {}|undefined + ]>; + setLabels( + request: protos.google.container.v1beta1.ISetLabelsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): void; + setLabels( + request: protos.google.container.v1beta1.ISetLabelsRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): void; + setLabels( + request?: protos.google.container.v1beta1.ISetLabelsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLabelsRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLabels(request, options, callback); + } +/** + * Enables or disables the ABAC authorization mechanism on a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {boolean} request.enabled + * Required. Whether ABAC authorization will be enabled in the cluster. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set legacy + * abac. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_legacy_abac.js + * region_tag:container_v1beta1_generated_ClusterManager_SetLegacyAbac_async + */ + setLegacyAbac( + request?: protos.google.container.v1beta1.ISetLegacyAbacRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|undefined, {}|undefined + ]>; + setLegacyAbac( + request: protos.google.container.v1beta1.ISetLegacyAbacRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): void; + setLegacyAbac( + request: protos.google.container.v1beta1.ISetLegacyAbacRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): void; + setLegacyAbac( + request?: protos.google.container.v1beta1.ISetLegacyAbacRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetLegacyAbacRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setLegacyAbac(request, options, callback); + } +/** + * Starts master IP rotation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to start IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {boolean} request.rotateCredentials + * Whether to rotate credentials during IP rotation. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js + * region_tag:container_v1beta1_generated_ClusterManager_StartIPRotation_async + */ + startIPRotation( + request?: protos.google.container.v1beta1.IStartIPRotationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|undefined, {}|undefined + ]>; + startIPRotation( + request: protos.google.container.v1beta1.IStartIPRotationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): void; + startIPRotation( + request: protos.google.container.v1beta1.IStartIPRotationRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): void; + startIPRotation( + request?: protos.google.container.v1beta1.IStartIPRotationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.IStartIPRotationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.startIpRotation(request, options, callback); + } +/** + * Completes master IP rotation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to complete IP + * rotation. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js + * region_tag:container_v1beta1_generated_ClusterManager_CompleteIPRotation_async + */ + completeIPRotation( + request?: protos.google.container.v1beta1.ICompleteIPRotationRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|undefined, {}|undefined + ]>; + completeIPRotation( + request: protos.google.container.v1beta1.ICompleteIPRotationRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): void; + completeIPRotation( + request: protos.google.container.v1beta1.ICompleteIPRotationRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): void; + completeIPRotation( + request?: protos.google.container.v1beta1.ICompleteIPRotationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ICompleteIPRotationRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.completeIpRotation(request, options, callback); + } +/** + * SetNodePoolSizeRequest sets the size of a node pool. The new size will be + * used for all replicas, including future replicas created by modifying + * {@link protos.google.container.v1beta1.NodePool.locations|NodePool.locations}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster to update. + * This field has been deprecated and replaced by the name field. + * @param {string} request.nodePoolId + * Required. Deprecated. The name of the node pool to update. + * This field has been deprecated and replaced by the name field. + * @param {number} request.nodeCount + * Required. The desired node count for the pool. + * @param {string} request.name + * The name (project, location, cluster, node pool id) of the node pool to set + * size. + * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_size.js + * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolSize_async + */ + setNodePoolSize( + request?: protos.google.container.v1beta1.ISetNodePoolSizeRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|undefined, {}|undefined + ]>; + setNodePoolSize( + request: protos.google.container.v1beta1.ISetNodePoolSizeRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolSize( + request: protos.google.container.v1beta1.ISetNodePoolSizeRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): void; + setNodePoolSize( + request?: protos.google.container.v1beta1.ISetNodePoolSizeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNodePoolSizeRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + 'node_pool_id': request.nodePoolId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNodePoolSize(request, options, callback); + } +/** + * Enables or disables Network Policy for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the name field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the name + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the name field. + * @param {google.container.v1beta1.NetworkPolicy} request.networkPolicy + * Required. Configuration options for the NetworkPolicy feature. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set networking + * policy. Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_network_policy.js + * region_tag:container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async + */ + setNetworkPolicy( + request?: protos.google.container.v1beta1.ISetNetworkPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|undefined, {}|undefined + ]>; + setNetworkPolicy( + request: protos.google.container.v1beta1.ISetNetworkPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): void; + setNetworkPolicy( + request: protos.google.container.v1beta1.ISetNetworkPolicyRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): void; + setNetworkPolicy( + request?: protos.google.container.v1beta1.ISetNetworkPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetNetworkPolicyRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setNetworkPolicy(request, options, callback); + } +/** + * Sets the maintenance policy for a cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * @param {string} request.zone + * Required. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. + * @param {string} request.clusterId + * Required. The name of the cluster to update. + * @param {google.container.v1beta1.MaintenancePolicy} request.maintenancePolicy + * Required. The maintenance policy to be set for the cluster. An empty field + * clears the existing maintenance policy. + * @param {string} request.name + * The name (project, location, cluster name) of the cluster to set + * maintenance policy. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js + * region_tag:container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async + */ + setMaintenancePolicy( + request?: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|undefined, {}|undefined + ]>; + setMaintenancePolicy( + request: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): void; + setMaintenancePolicy( + request: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, + callback: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): void; + setMaintenancePolicy( + request?: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IOperation, + protos.google.container.v1beta1.ISetMaintenancePolicyRequest|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 ?? '', + 'project_id': request.projectId ?? '', + 'zone': request.zone ?? '', + 'cluster_id': request.clusterId ?? '', + }); + this.initialize(); + return this.innerApiCalls.setMaintenancePolicy(request, options, callback); + } +/** + * Checks the cluster compatibility with Autopilot mode, and returns a list of + * compatibility issues. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name (project, location, cluster) of the cluster to retrieve. + * Specified in the format `projects/* /locations/* /clusters/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse|CheckAutopilotCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js + * region_tag:container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async + */ + checkAutopilotCompatibility( + request?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|undefined, {}|undefined + ]>; + checkAutopilotCompatibility( + request: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkAutopilotCompatibility( + request: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, + callback: Callback< + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkAutopilotCompatibility( + request?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, + protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|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.checkAutopilotCompatibility(request, options, callback); + } +/** + * Fetches locations that offer Google Kubernetes Engine. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Contains the name of the resource requested. + * Specified in the format `projects/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListLocationsResponse|ListLocationsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.list_locations.js + * region_tag:container_v1beta1_generated_ClusterManager_ListLocations_async + */ + listLocations( + request?: protos.google.container.v1beta1.IListLocationsRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|undefined, {}|undefined + ]>; + listLocations( + request: protos.google.container.v1beta1.IListLocationsRequest, + options: CallOptions, + callback: Callback< + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|null|undefined, + {}|null|undefined>): void; + listLocations( + request: protos.google.container.v1beta1.IListLocationsRequest, + callback: Callback< + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|null|undefined, + {}|null|undefined>): void; + listLocations( + request?: protos.google.container.v1beta1.IListLocationsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.container.v1beta1.IListLocationsResponse, + protos.google.container.v1beta1.IListLocationsRequest|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.listLocations(request, options, callback); + } + + /** + * Lists subnetworks that can be used for creating clusters in a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork}. + * 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 `listUsableSubnetworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listUsableSubnetworks( + request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + options?: CallOptions): + Promise<[ + protos.google.container.v1beta1.IUsableSubnetwork[], + protos.google.container.v1beta1.IListUsableSubnetworksRequest|null, + protos.google.container.v1beta1.IListUsableSubnetworksResponse + ]>; + listUsableSubnetworks( + request: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.container.v1beta1.IListUsableSubnetworksRequest, + protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1beta1.IUsableSubnetwork>): void; + listUsableSubnetworks( + request: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + callback: PaginationCallback< + protos.google.container.v1beta1.IListUsableSubnetworksRequest, + protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1beta1.IUsableSubnetwork>): void; + listUsableSubnetworks( + request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.container.v1beta1.IListUsableSubnetworksRequest, + protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1beta1.IUsableSubnetwork>, + callback?: PaginationCallback< + protos.google.container.v1beta1.IListUsableSubnetworksRequest, + protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, + protos.google.container.v1beta1.IUsableSubnetwork>): + Promise<[ + protos.google.container.v1beta1.IUsableSubnetwork[], + protos.google.container.v1beta1.IListUsableSubnetworksRequest|null, + protos.google.container.v1beta1.IListUsableSubnetworksResponse + ]>|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.listUsableSubnetworks(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 project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork} 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 `listUsableSubnetworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listUsableSubnetworksStream( + request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + 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['listUsableSubnetworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUsableSubnetworks.createStream( + this.innerApiCalls.listUsableSubnetworks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUsableSubnetworks`, 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 project where subnetworks are usable. + * Specified in the format `projects/*`. + * @param {string} request.filter + * Filtering currently only supports equality on the networkProjectId and must + * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` + * is the project which owns the listed subnetworks. This defaults to the + * parent project ID. + * @param {number} request.pageSize + * The max number of results per page that should be returned. If the number + * of available results is larger than `page_size`, a `next_page_token` is + * returned which can be used to get the next page of results in subsequent + * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} request.pageToken + * Specifies a page token to use. Set this to the nextPageToken returned by + * previous list requests to get the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js + * region_tag:container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async + */ + listUsableSubnetworksAsync( + request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, + 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['listUsableSubnetworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUsableSubnetworks.asyncIterate( + this.innerApiCalls['listUsableSubnetworks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + + /** + * 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.clusterManagerStub && !this._terminated) { + return this.clusterManagerStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json new file mode 100644 index 00000000000..911352f9362 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json @@ -0,0 +1,198 @@ +{ + "interfaces": { + "google.container.v1beta1.ClusterManager": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListClusters": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetCluster": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateCluster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCluster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateNodePool": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolAutoscaling": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLoggingService": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMonitoringService": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetAddonsConfig": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLocations": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateMaster": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMasterAuth": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCluster": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListOperations": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetOperation": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CancelOperation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetServerConfig": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetJSONWebKeys": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListNodePools": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetNodePool": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateNodePool": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteNodePool": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CompleteNodePoolUpgrade": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RollbackNodePoolUpgrade": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolManagement": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLabels": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetLegacyAbac": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StartIPRotation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CompleteIPRotation": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNodePoolSize": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetNetworkPolicy": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetMaintenancePolicy": { + "timeout_millis": 45000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUsableSubnetworks": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CheckAutopilotCompatibility": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLocations": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json new file mode 100644 index 00000000000..7a594ccf698 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/container/v1beta1/cluster_service.proto" +] diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..0278af900c2 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json @@ -0,0 +1,377 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.container.v1beta1", + "libraryPackage": "@google-cloud/container", + "services": { + "ClusterManager": { + "clients": { + "grpc": { + "libraryClient": "ClusterManagerClient", + "rpcs": { + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateNodePool": { + "methods": [ + "updateNodePool" + ] + }, + "SetNodePoolAutoscaling": { + "methods": [ + "setNodePoolAutoscaling" + ] + }, + "SetLoggingService": { + "methods": [ + "setLoggingService" + ] + }, + "SetMonitoringService": { + "methods": [ + "setMonitoringService" + ] + }, + "SetAddonsConfig": { + "methods": [ + "setAddonsConfig" + ] + }, + "SetLocations": { + "methods": [ + "setLocations" + ] + }, + "UpdateMaster": { + "methods": [ + "updateMaster" + ] + }, + "SetMasterAuth": { + "methods": [ + "setMasterAuth" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "ListOperations": { + "methods": [ + "listOperations" + ] + }, + "GetOperation": { + "methods": [ + "getOperation" + ] + }, + "CancelOperation": { + "methods": [ + "cancelOperation" + ] + }, + "GetServerConfig": { + "methods": [ + "getServerConfig" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetNodePool": { + "methods": [ + "getNodePool" + ] + }, + "CreateNodePool": { + "methods": [ + "createNodePool" + ] + }, + "DeleteNodePool": { + "methods": [ + "deleteNodePool" + ] + }, + "CompleteNodePoolUpgrade": { + "methods": [ + "completeNodePoolUpgrade" + ] + }, + "RollbackNodePoolUpgrade": { + "methods": [ + "rollbackNodePoolUpgrade" + ] + }, + "SetNodePoolManagement": { + "methods": [ + "setNodePoolManagement" + ] + }, + "SetLabels": { + "methods": [ + "setLabels" + ] + }, + "SetLegacyAbac": { + "methods": [ + "setLegacyAbac" + ] + }, + "StartIPRotation": { + "methods": [ + "startIPRotation" + ] + }, + "CompleteIPRotation": { + "methods": [ + "completeIPRotation" + ] + }, + "SetNodePoolSize": { + "methods": [ + "setNodePoolSize" + ] + }, + "SetNetworkPolicy": { + "methods": [ + "setNetworkPolicy" + ] + }, + "SetMaintenancePolicy": { + "methods": [ + "setMaintenancePolicy" + ] + }, + "CheckAutopilotCompatibility": { + "methods": [ + "checkAutopilotCompatibility" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "ListUsableSubnetworks": { + "methods": [ + "listUsableSubnetworks", + "listUsableSubnetworksStream", + "listUsableSubnetworksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ClusterManagerClient", + "rpcs": { + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateNodePool": { + "methods": [ + "updateNodePool" + ] + }, + "SetNodePoolAutoscaling": { + "methods": [ + "setNodePoolAutoscaling" + ] + }, + "SetLoggingService": { + "methods": [ + "setLoggingService" + ] + }, + "SetMonitoringService": { + "methods": [ + "setMonitoringService" + ] + }, + "SetAddonsConfig": { + "methods": [ + "setAddonsConfig" + ] + }, + "SetLocations": { + "methods": [ + "setLocations" + ] + }, + "UpdateMaster": { + "methods": [ + "updateMaster" + ] + }, + "SetMasterAuth": { + "methods": [ + "setMasterAuth" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "ListOperations": { + "methods": [ + "listOperations" + ] + }, + "GetOperation": { + "methods": [ + "getOperation" + ] + }, + "CancelOperation": { + "methods": [ + "cancelOperation" + ] + }, + "GetServerConfig": { + "methods": [ + "getServerConfig" + ] + }, + "GetJSONWebKeys": { + "methods": [ + "getJSONWebKeys" + ] + }, + "ListNodePools": { + "methods": [ + "listNodePools" + ] + }, + "GetNodePool": { + "methods": [ + "getNodePool" + ] + }, + "CreateNodePool": { + "methods": [ + "createNodePool" + ] + }, + "DeleteNodePool": { + "methods": [ + "deleteNodePool" + ] + }, + "CompleteNodePoolUpgrade": { + "methods": [ + "completeNodePoolUpgrade" + ] + }, + "RollbackNodePoolUpgrade": { + "methods": [ + "rollbackNodePoolUpgrade" + ] + }, + "SetNodePoolManagement": { + "methods": [ + "setNodePoolManagement" + ] + }, + "SetLabels": { + "methods": [ + "setLabels" + ] + }, + "SetLegacyAbac": { + "methods": [ + "setLegacyAbac" + ] + }, + "StartIPRotation": { + "methods": [ + "startIPRotation" + ] + }, + "CompleteIPRotation": { + "methods": [ + "completeIPRotation" + ] + }, + "SetNodePoolSize": { + "methods": [ + "setNodePoolSize" + ] + }, + "SetNetworkPolicy": { + "methods": [ + "setNetworkPolicy" + ] + }, + "SetMaintenancePolicy": { + "methods": [ + "setMaintenancePolicy" + ] + }, + "CheckAutopilotCompatibility": { + "methods": [ + "checkAutopilotCompatibility" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "ListUsableSubnetworks": { + "methods": [ + "listUsableSubnetworks", + "listUsableSubnetworksStream", + "listUsableSubnetworksAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts new file mode 100644 index 00000000000..aa5679ebbc4 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {ClusterManagerClient} from './cluster_manager_client'; diff --git a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..b200c9d2b4f --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 container = require('@google-cloud/container'); + +function main() { + const clusterManagerClient = new container.ClusterManagerClient(); +} + +main(); diff --git a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..e4bc67faf05 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {ClusterManagerClient} from '@google-cloud/container'; + +// check that the client class type name can be used +function doStuffWithClusterManagerClient(client: ClusterManagerClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const clusterManagerClient = new ClusterManagerClient(); + doStuffWithClusterManagerClient(clusterManagerClient); +} + +main(); diff --git a/owl-bot-staging/google-container/v1beta1/system-test/install.ts b/owl-bot-staging/google-container/v1beta1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts b/owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts new file mode 100644 index 00000000000..4470c410220 --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts @@ -0,0 +1,5302 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 clustermanagerModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.ClusterManagerClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'container.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = clustermanagerModule.v1beta1.ClusterManagerClient.servicePath; + assert.strictEqual(servicePath, 'container.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = clustermanagerModule.v1beta1.ClusterManagerClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'container.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'container.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new clustermanagerModule.v1beta1.ClusterManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = clustermanagerModule.v1beta1.ClusterManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.clusterManagerStub, undefined); + await client.initialize(); + assert(client.clusterManagerStub); + }); + + it('has close method for the initialized client', done => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.clusterManagerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.clusterManagerStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + 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 clustermanagerModule.v1beta1.ClusterManagerClient({ + 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('listClusters', () => { + it('invokes listClusters without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersResponse() + ); + client.innerApiCalls.listClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersResponse() + ); + client.innerApiCalls.listClusters = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listClusters( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IListClustersResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listClusters = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listClusters(request), expectedError); + const actualRequest = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClusters with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listClusters(request), expectedError); + }); + }); + + describe('getCluster', () => { + it('invokes getCluster without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Cluster() + ); + client.innerApiCalls.getCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Cluster() + ); + client.innerApiCalls.getCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCluster( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.ICluster|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCluster with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCluster(request), expectedError); + }); + }); + + describe('createCluster', () => { + it('invokes createCluster without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.createCluster = stubSimpleCall(expectedResponse); + const [response] = await client.createCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.createCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCluster( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCluster with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCluster(request), expectedError); + }); + }); + + describe('updateCluster', () => { + it('invokes updateCluster without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateCluster = stubSimpleCall(expectedResponse); + const [response] = await client.updateCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCluster( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCluster with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCluster(request), expectedError); + }); + }); + + describe('updateNodePool', () => { + it('invokes updateNodePool without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.updateNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateNodePool with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateNodePool(request), expectedError); + }); + }); + + describe('setNodePoolAutoscaling', () => { + it('invokes setNodePoolAutoscaling without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolAutoscaling(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolAutoscaling( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolAutoscaling with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); + }); + }); + + describe('setLoggingService', () => { + it('invokes setLoggingService without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLoggingService = stubSimpleCall(expectedResponse); + const [response] = await client.setLoggingService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLoggingService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLoggingService( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLoggingService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLoggingService(request), expectedError); + const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLoggingService with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLoggingServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLoggingService(request), expectedError); + }); + }); + + describe('setMonitoringService', () => { + it('invokes setMonitoringService without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMonitoringService = stubSimpleCall(expectedResponse); + const [response] = await client.setMonitoringService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMonitoringService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMonitoringService( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMonitoringService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMonitoringService(request), expectedError); + const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMonitoringService with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMonitoringServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMonitoringService(request), expectedError); + }); + }); + + describe('setAddonsConfig', () => { + it('invokes setAddonsConfig without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setAddonsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.setAddonsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setAddonsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setAddonsConfig( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setAddonsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setAddonsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setAddonsConfig with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetAddonsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setAddonsConfig(request), expectedError); + }); + }); + + describe('setLocations', () => { + it('invokes setLocations without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLocations = stubSimpleCall(expectedResponse); + const [response] = await client.setLocations(request); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLocations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLocations( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLocations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLocations(request), expectedError); + assert(stub.calledOnce); + const actualRequest = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLocations with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLocations(request), expectedError); + assert(stub.calledOnce); + }); + }); + + describe('updateMaster', () => { + it('invokes updateMaster without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateMaster = stubSimpleCall(expectedResponse); + const [response] = await client.updateMaster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.updateMaster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMaster( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMaster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateMaster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMaster with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.UpdateMasterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateMaster(request), expectedError); + }); + }); + + describe('setMasterAuth', () => { + it('invokes setMasterAuth without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMasterAuth = stubSimpleCall(expectedResponse); + const [response] = await client.setMasterAuth(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMasterAuth = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMasterAuth( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMasterAuth = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMasterAuth(request), expectedError); + const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMasterAuth with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMasterAuthRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMasterAuth(request), expectedError); + }); + }); + + describe('deleteCluster', () => { + it('invokes deleteCluster without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.deleteCluster = stubSimpleCall(expectedResponse); + const [response] = await client.deleteCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.deleteCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteCluster( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCluster with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteCluster(request), expectedError); + }); + }); + + describe('listOperations', () => { + it('invokes listOperations without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsResponse() + ); + client.innerApiCalls.listOperations = stubSimpleCall(expectedResponse); + const [response] = await client.listOperations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsResponse() + ); + client.innerApiCalls.listOperations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOperations( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IListOperationsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listOperations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listOperations(request), expectedError); + const actualRequest = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listOperations with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListOperationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listOperations(request), expectedError); + }); + }); + + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.getOperation = stubSimpleCall(expectedResponse); + const [response] = await client.getOperation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.getOperation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOperation( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getOperation(request), expectedError); + const actualRequest = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOperation with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getOperation(request), expectedError); + }); + }); + + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelOperation = stubSimpleCall(expectedResponse); + const [response] = await client.cancelOperation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelOperation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelOperation( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelOperation(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOperation with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CancelOperationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); + request.operationId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelOperation(request), expectedError); + }); + }); + + describe('getServerConfig', () => { + it('invokes getServerConfig without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ServerConfig() + ); + client.innerApiCalls.getServerConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ServerConfig() + ); + client.innerApiCalls.getServerConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getServerConfig( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IServerConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getServerConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getServerConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getServerConfig with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); + request.zone = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getServerConfig(request), expectedError); + }); + }); + + describe('getJSONWebKeys', () => { + it('invokes getJSONWebKeys without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysResponse() + ); + client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); + const [response] = await client.getJSONWebKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysResponse() + ); + client.innerApiCalls.getJsonWebKeys = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJSONWebKeys( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IGetJSONWebKeysResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getJsonWebKeys = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJSONWebKeys(request), expectedError); + const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJSONWebKeys with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJSONWebKeys(request), expectedError); + }); + }); + + describe('listNodePools', () => { + it('invokes listNodePools without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsResponse() + ); + client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); + const [response] = await client.listNodePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsResponse() + ); + client.innerApiCalls.listNodePools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listNodePools( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IListNodePoolsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listNodePools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listNodePools(request), expectedError); + const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNodePools with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listNodePools(request), expectedError); + }); + }); + + describe('getNodePool', () => { + it('invokes getNodePool without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.NodePool() + ); + client.innerApiCalls.getNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.getNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.NodePool() + ); + client.innerApiCalls.getNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.INodePool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNodePool with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getNodePool(request), expectedError); + }); + }); + + describe('createNodePool', () => { + it('invokes createNodePool without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.createNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.createNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.createNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createNodePool with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CreateNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createNodePool(request), expectedError); + }); + }); + + describe('deleteNodePool', () => { + it('invokes deleteNodePool without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.deleteNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.deleteNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.deleteNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteNodePool( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteNodePool with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.DeleteNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteNodePool(request), expectedError); + }); + }); + + describe('completeNodePoolUpgrade', () => { + it('invokes completeNodePoolUpgrade without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(expectedResponse); + const [response] = await client.completeNodePoolUpgrade(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.completeNodePoolUpgrade( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeNodePoolUpgrade with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); + }); + }); + + describe('rollbackNodePoolUpgrade', () => { + it('invokes rollbackNodePoolUpgrade without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(expectedResponse); + const [response] = await client.rollbackNodePoolUpgrade(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackNodePoolUpgrade( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackNodePoolUpgrade with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); + }); + }); + + describe('setNodePoolManagement', () => { + it('invokes setNodePoolManagement without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolManagement = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolManagement(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolManagement = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolManagement( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolManagement = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolManagement(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolManagement with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolManagementRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolManagement(request), expectedError); + }); + }); + + describe('setLabels', () => { + it('invokes setLabels without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLabels = stubSimpleCall(expectedResponse); + const [response] = await client.setLabels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLabels = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLabels( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLabels = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLabels(request), expectedError); + const actualRequest = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLabels with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLabelsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLabels(request), expectedError); + }); + }); + + describe('setLegacyAbac', () => { + it('invokes setLegacyAbac without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLegacyAbac = stubSimpleCall(expectedResponse); + const [response] = await client.setLegacyAbac(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setLegacyAbac = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setLegacyAbac( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setLegacyAbac = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setLegacyAbac(request), expectedError); + const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setLegacyAbac with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetLegacyAbacRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setLegacyAbac(request), expectedError); + }); + }); + + describe('startIPRotation', () => { + it('invokes startIPRotation without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.startIpRotation = stubSimpleCall(expectedResponse); + const [response] = await client.startIPRotation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.startIpRotation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startIPRotation( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.startIpRotation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.startIPRotation(request), expectedError); + const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startIPRotation with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.StartIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.startIPRotation(request), expectedError); + }); + }); + + describe('completeIPRotation', () => { + it('invokes completeIPRotation without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.completeIpRotation = stubSimpleCall(expectedResponse); + const [response] = await client.completeIPRotation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.completeIpRotation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.completeIPRotation( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.completeIpRotation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.completeIPRotation(request), expectedError); + const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeIPRotation with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CompleteIPRotationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.completeIPRotation(request), expectedError); + }); + }); + + describe('setNodePoolSize', () => { + it('invokes setNodePoolSize without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolSize = stubSimpleCall(expectedResponse); + const [response] = await client.setNodePoolSize(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNodePoolSize = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNodePoolSize( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNodePoolSize = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNodePoolSize(request), expectedError); + const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNodePoolSize with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNodePoolSizeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); + request.clusterId = defaultValue4; + const defaultValue5 = + getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); + request.nodePoolId = defaultValue5; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNodePoolSize(request), expectedError); + }); + }); + + describe('setNetworkPolicy', () => { + it('invokes setNetworkPolicy without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNetworkPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setNetworkPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setNetworkPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setNetworkPolicy( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setNetworkPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setNetworkPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setNetworkPolicy with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetNetworkPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setNetworkPolicy(request), expectedError); + }); + }); + + describe('setMaintenancePolicy', () => { + it('invokes setMaintenancePolicy without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setMaintenancePolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.Operation() + ); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setMaintenancePolicy( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setMaintenancePolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setMaintenancePolicy with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.SetMaintenancePolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); + request.name = defaultValue1; + const defaultValue2 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); + request.projectId = defaultValue2; + const defaultValue3 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); + request.zone = defaultValue3; + const defaultValue4 = + getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); + request.clusterId = defaultValue4; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setMaintenancePolicy(request), expectedError); + }); + }); + + describe('checkAutopilotCompatibility', () => { + it('invokes checkAutopilotCompatibility without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse() + ); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkAutopilotCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse() + ); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkAutopilotCompatibility( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAutopilotCompatibility with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); + }); + }); + + describe('listLocations', () => { + it('invokes listLocations without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsResponse() + ); + client.innerApiCalls.listLocations = stubSimpleCall(expectedResponse); + const [response] = await client.listLocations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLocations without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsResponse() + ); + client.innerApiCalls.listLocations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLocations( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IListLocationsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLocations with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listLocations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLocations(request), expectedError); + const actualRequest = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLocations with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListLocationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listLocations(request), expectedError); + }); + }); + + describe('listUsableSubnetworks', () => { + it('invokes listUsableSubnetworks without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + ]; + client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(expectedResponse); + const [response] = await client.listUsableSubnetworks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworks without error using callback', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + ]; + client.innerApiCalls.listUsableSubnetworks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUsableSubnetworks( + request, + (err?: Error|null, result?: protos.google.container.v1beta1.IUsableSubnetwork[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworks with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUsableSubnetworks(request), expectedError); + const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUsableSubnetworksStream without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + ]; + client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUsableSubnetworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.container.v1beta1.UsableSubnetwork[] = []; + stream.on('data', (response: protos.google.container.v1beta1.UsableSubnetwork) => { + 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.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); + assert( + (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUsableSubnetworksStream with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUsableSubnetworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.container.v1beta1.UsableSubnetwork[] = []; + stream.on('data', (response: protos.google.container.v1beta1.UsableSubnetwork) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); + assert( + (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUsableSubnetworks without error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), + ]; + client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.container.v1beta1.IUsableSubnetwork[] = []; + const iterable = client.listUsableSubnetworksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUsableSubnetworks with error', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.ListUsableSubnetworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUsableSubnetworksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.container.v1beta1.IUsableSubnetwork[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); +}); diff --git a/owl-bot-staging/google-container/v1beta1/tsconfig.json b/owl-bot-staging/google-container/v1beta1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/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-container/v1beta1/webpack.config.js b/owl-bot-staging/google-container/v1beta1/webpack.config.js new file mode 100644 index 00000000000..9032271af9d --- /dev/null +++ b/owl-bot-staging/google-container/v1beta1/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: 'ClusterManager', + filename: './cluster-manager.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 5385295b3915499d442dffdc45dac5d3cdad77c1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 8 Nov 2024 20:14:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-container/v1/.eslintignore | 7 - .../google-container/v1/.eslintrc.json | 3 - .../google-container/v1/.gitignore | 14 - owl-bot-staging/google-container/v1/.jsdoc.js | 55 - .../google-container/v1/.mocharc.js | 33 - .../google-container/v1/.prettierrc.js | 22 - owl-bot-staging/google-container/v1/README.md | 1 - .../google-container/v1/package.json | 58 - .../google/container/v1/cluster_service.proto | 6061 -- .../google-container/v1/protos/protos.d.ts | 32009 ------ .../google-container/v1/protos/protos.js | 83279 --------------- .../google-container/v1/protos/protos.json | 8766 -- .../v1/cluster_manager.cancel_operation.js | 61 - ...r_manager.check_autopilot_compatibility.js | 61 - .../cluster_manager.complete_i_p_rotation.js | 61 - ...ster_manager.complete_node_pool_upgrade.js | 62 - .../v1/cluster_manager.create_cluster.js | 67 - .../v1/cluster_manager.create_node_pool.js | 67 - .../v1/cluster_manager.delete_cluster.js | 61 - .../v1/cluster_manager.delete_node_pool.js | 62 - .../v1/cluster_manager.get_cluster.js | 61 - .../cluster_manager.get_j_s_o_n_web_keys.js | 61 - .../v1/cluster_manager.get_node_pool.js | 62 - .../v1/cluster_manager.get_operation.js | 61 - .../v1/cluster_manager.get_server_config.js | 61 - .../v1/cluster_manager.list_clusters.js | 62 - .../v1/cluster_manager.list_node_pools.js | 61 - .../v1/cluster_manager.list_operations.js | 62 - ...cluster_manager.list_usable_subnetworks.js | 82 - ...ster_manager.rollback_node_pool_upgrade.js | 67 - .../v1/cluster_manager.set_addons_config.js | 67 - .../v1/cluster_manager.set_labels.js | 76 - .../v1/cluster_manager.set_legacy_abac.js | 66 - .../v1/cluster_manager.set_locations.js | 71 - .../v1/cluster_manager.set_logging_service.js | 74 - .../cluster_manager.set_maintenance_policy.js | 86 - .../v1/cluster_manager.set_master_auth.js | 71 - .../cluster_manager.set_monitoring_service.js | 74 - .../v1/cluster_manager.set_network_policy.js | 66 - ...uster_manager.set_node_pool_autoscaling.js | 67 - ...luster_manager.set_node_pool_management.js | 67 - .../v1/cluster_manager.set_node_pool_size.js | 67 - .../v1/cluster_manager.start_i_p_rotation.js | 65 - .../v1/cluster_manager.update_cluster.js | 66 - .../v1/cluster_manager.update_master.js | 73 - .../v1/cluster_manager.update_node_pool.js | 212 - .../snippet_metadata_google.container.v1.json | 1947 - .../google-container/v1/src/index.ts | 25 - .../v1/src/v1/cluster_manager_client.ts | 3712 - .../src/v1/cluster_manager_client_config.json | 192 - .../v1/src/v1/cluster_manager_proto_list.json | 3 - .../v1/src/v1/gapic_metadata.json | 367 - .../google-container/v1/src/v1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_cluster_manager_v1.ts | 5305 - .../google-container/v1/tsconfig.json | 19 - .../google-container/v1/webpack.config.js | 64 - .../google-container/v1beta1/.eslintignore | 7 - .../google-container/v1beta1/.eslintrc.json | 3 - .../google-container/v1beta1/.gitignore | 14 - .../google-container/v1beta1/.jsdoc.js | 55 - .../google-container/v1beta1/.mocharc.js | 33 - .../google-container/v1beta1/.prettierrc.js | 22 - .../google-container/v1beta1/README.md | 1 - .../google-container/v1beta1/package.json | 58 - .../container/v1beta1/cluster_service.proto | 6275 -- .../v1beta1/protos/protos.d.ts | 33578 ------ .../google-container/v1beta1/protos/protos.js | 86801 ---------------- .../v1beta1/protos/protos.json | 9015 -- .../cluster_manager.cancel_operation.js | 64 - ...r_manager.check_autopilot_compatibility.js | 61 - .../cluster_manager.complete_i_p_rotation.js | 64 - ...ster_manager.complete_node_pool_upgrade.js | 62 - .../v1beta1/cluster_manager.create_cluster.js | 69 - .../cluster_manager.create_node_pool.js | 70 - .../v1beta1/cluster_manager.delete_cluster.js | 64 - .../cluster_manager.delete_node_pool.js | 66 - .../v1beta1/cluster_manager.get_cluster.js | 64 - .../cluster_manager.get_j_s_o_n_web_keys.js | 61 - .../v1beta1/cluster_manager.get_node_pool.js | 66 - .../v1beta1/cluster_manager.get_operation.js | 64 - .../cluster_manager.get_server_config.js | 63 - .../v1beta1/cluster_manager.list_clusters.js | 64 - .../v1beta1/cluster_manager.list_locations.js | 62 - .../cluster_manager.list_node_pools.js | 64 - .../cluster_manager.list_operations.js | 64 - ...cluster_manager.list_usable_subnetworks.js | 83 - ...ster_manager.rollback_node_pool_upgrade.js | 71 - .../cluster_manager.set_addons_config.js | 70 - .../v1beta1/cluster_manager.set_labels.js | 79 - .../cluster_manager.set_legacy_abac.js | 69 - .../v1beta1/cluster_manager.set_locations.js | 74 - .../cluster_manager.set_logging_service.js | 77 - .../cluster_manager.set_maintenance_policy.js | 86 - .../cluster_manager.set_master_auth.js | 74 - .../cluster_manager.set_monitoring_service.js | 77 - .../cluster_manager.set_network_policy.js | 69 - ...uster_manager.set_node_pool_autoscaling.js | 71 - ...luster_manager.set_node_pool_management.js | 71 - .../cluster_manager.set_node_pool_size.js | 71 - .../cluster_manager.start_i_p_rotation.js | 68 - .../v1beta1/cluster_manager.update_cluster.js | 69 - .../v1beta1/cluster_manager.update_master.js | 76 - .../cluster_manager.update_node_pool.js | 208 - ...pet_metadata_google.container.v1beta1.json | 1983 - .../google-container/v1beta1/src/index.ts | 25 - .../src/v1beta1/cluster_manager_client.ts | 3637 - .../cluster_manager_client_config.json | 198 - .../v1beta1/cluster_manager_proto_list.json | 3 - .../v1beta1/src/v1beta1/gapic_metadata.json | 377 - .../v1beta1/src/v1beta1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1beta1/system-test/install.ts | 49 - .../test/gapic_cluster_manager_v1beta1.ts | 5302 - .../google-container/v1beta1/tsconfig.json | 19 - .../v1beta1/webpack.config.js | 64 - .../google/container/v1/cluster_service.proto | 111 +- packages/google-container/protos/protos.d.ts | 294 + packages/google-container/protos/protos.js | 915 +- packages/google-container/protos/protos.json | 100 + 123 files changed, 1413 insertions(+), 294638 deletions(-) delete mode 100644 owl-bot-staging/google-container/v1/.eslintignore delete mode 100644 owl-bot-staging/google-container/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-container/v1/.gitignore delete mode 100644 owl-bot-staging/google-container/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-container/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-container/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-container/v1/README.md delete mode 100644 owl-bot-staging/google-container/v1/package.json delete mode 100644 owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto delete mode 100644 owl-bot-staging/google-container/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-container/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-container/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json delete mode 100644 owl-bot-staging/google-container/v1/src/index.ts delete mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts delete mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json delete mode 100644 owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json delete mode 100644 owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-container/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-container/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts delete mode 100644 owl-bot-staging/google-container/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-container/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-container/v1beta1/.eslintignore delete mode 100644 owl-bot-staging/google-container/v1beta1/.eslintrc.json delete mode 100644 owl-bot-staging/google-container/v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-container/v1beta1/.jsdoc.js delete mode 100644 owl-bot-staging/google-container/v1beta1/.mocharc.js delete mode 100644 owl-bot-staging/google-container/v1beta1/.prettierrc.js delete mode 100644 owl-bot-staging/google-container/v1beta1/README.md delete mode 100644 owl-bot-staging/google-container/v1beta1/package.json delete mode 100644 owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto delete mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.js delete mode 100644 owl-bot-staging/google-container/v1beta1/protos/protos.json delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js delete mode 100644 owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json delete mode 100644 owl-bot-staging/google-container/v1beta1/src/index.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json delete mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json delete mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/system-test/install.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts delete mode 100644 owl-bot-staging/google-container/v1beta1/tsconfig.json delete mode 100644 owl-bot-staging/google-container/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-container/v1/.eslintignore b/owl-bot-staging/google-container/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-container/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-container/v1/.eslintrc.json b/owl-bot-staging/google-container/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-container/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-container/v1/.gitignore b/owl-bot-staging/google-container/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-container/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-container/v1/.jsdoc.js b/owl-bot-staging/google-container/v1/.jsdoc.js deleted file mode 100644 index afb61595735..00000000000 --- a/owl-bot-staging/google-container/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/container', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-container/v1/.mocharc.js b/owl-bot-staging/google-container/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-container/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1/.prettierrc.js b/owl-bot-staging/google-container/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-container/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1/README.md b/owl-bot-staging/google-container/v1/README.md deleted file mode 100644 index f32441d7e6b..00000000000 --- a/owl-bot-staging/google-container/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Container: Nodejs Client diff --git a/owl-bot-staging/google-container/v1/package.json b/owl-bot-staging/google-container/v1/package.json deleted file mode 100644 index 6b69752dd23..00000000000 --- a/owl-bot-staging/google-container/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/container", - "version": "0.1.0", - "description": "Container client for Node.js", - "repository": "googleapis/nodejs-container", - "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 container", - "container", - "cluster manager" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto b/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto deleted file mode 100644 index 2013c15fe8c..00000000000 --- a/owl-bot-staging/google-container/v1/protos/google/container/v1/cluster_service.proto +++ /dev/null @@ -1,6061 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.container.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/code.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.Container.V1"; -option go_package = "cloud.google.com/go/container/apiv1/containerpb;containerpb"; -option java_multiple_files = true; -option java_outer_classname = "ClusterServiceProto"; -option java_package = "com.google.container.v1"; -option php_namespace = "Google\\Cloud\\Container\\V1"; -option ruby_package = "Google::Cloud::Container::V1"; -option (google.api.resource_definition) = { - type: "pubsub.googleapis.com/Topic" - pattern: "projects/{project}/topics/{topic}" -}; -option (google.api.resource_definition) = { - type: "privateca.googleapis.com/CaPool" - pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" -}; -option (google.api.resource_definition) = { - type: "cloudkms.googleapis.com/CryptoKeyVersion" - pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" -}; - -// Google Kubernetes Engine Cluster Manager v1 -service ClusterManager { - option (google.api.default_host) = "container.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all clusters owned by a project in either the specified zone or all - // zones. - rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/clusters" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/clusters" - } - }; - option (google.api.method_signature) = "project_id,zone"; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific cluster. - rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/clusters/*}" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - option (google.api.method_signature) = "name"; - } - - // Creates a cluster, consisting of the specified number and type of Google - // Compute Engine instances. - // - // By default, the cluster is created in the project's - // [default - // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - // - // One firewall is added for the cluster. After cluster creation, - // the Kubelet creates routes for each node to allow the containers - // on that node to communicate with all other instances in the - // cluster. - // - // Finally, an entry is added to the project's global metadata indicating - // which CIDR range the cluster is using. - rpc CreateCluster(CreateClusterRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/clusters" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster"; - option (google.api.method_signature) = "parent,cluster"; - } - - // Updates the settings of a specific cluster. - rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { - option (google.api.http) = { - put: "/v1/{name=projects/*/locations/*/clusters/*}" - body: "*" - additional_bindings { - put: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id,update"; - option (google.api.method_signature) = "name,update"; - } - - // Updates the version and/or image type for the specified node pool. - rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { - option (google.api.http) = { - put: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" - body: "*" - } - }; - } - - // Sets the autoscaling settings for the specified node pool. - rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) - returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" - body: "*" - } - }; - } - - // Sets the logging service for a specific cluster. - rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setLogging" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,logging_service"; - option (google.api.method_signature) = "name,logging_service"; - } - - // Sets the monitoring service for a specific cluster. - rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,monitoring_service"; - option (google.api.method_signature) = "name,monitoring_service"; - } - - // Sets the addons for a specific cluster. - rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setAddons" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,addons_config"; - option (google.api.method_signature) = "name,addons_config"; - } - - // Sets the locations for a specific cluster. - // Deprecated. Use - // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) - // instead. - rpc SetLocations(SetLocationsRequest) returns (Operation) { - option deprecated = true; - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setLocations" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,locations"; - option (google.api.method_signature) = "name,locations"; - } - - // Updates the master for a specific cluster. - rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,master_version"; - option (google.api.method_signature) = "name,master_version"; - } - - // Sets master auth materials. Currently supports changing the admin password - // or a specific cluster, either via password generation or explicitly setting - // the password. - rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" - body: "*" - } - }; - } - - // Deletes the cluster, including the Kubernetes endpoint and all worker - // nodes. - // - // Firewalls and routes that were configured during cluster creation - // are also deleted. - // - // Other Google Compute Engine resources that might be in use by the cluster, - // such as load balancer resources, are not deleted if they weren't present - // when the cluster was initially created. - rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/clusters/*}" - additional_bindings { - delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - option (google.api.method_signature) = "name"; - } - - // Lists all operations in a project in a specific zone or all zones. - rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/operations" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/operations" - } - }; - option (google.api.method_signature) = "project_id,zone"; - option (google.api.method_signature) = "parent"; - } - - // Gets the specified operation. - rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/operations/*}" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,operation_id"; - option (google.api.method_signature) = "name"; - } - - // Cancels the specified operation. - rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/operations/*}:cancel" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,operation_id"; - option (google.api.method_signature) = "name"; - } - - // Returns configuration info about the Google Kubernetes Engine service. - rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*}/serverConfig" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/serverconfig" - } - }; - option (google.api.method_signature) = "project_id,zone"; - option (google.api.method_signature) = "name"; - } - - // Gets the public component of the cluster signing keys in - // JSON Web Key format. - rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" - }; - } - - // Lists the node pools for a cluster. - rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - option (google.api.method_signature) = "parent"; - } - - // Retrieves the requested node pool. - rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - additional_bindings { - get: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - option (google.api.method_signature) = "name"; - } - - // Creates a node pool for a cluster. - rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool"; - option (google.api.method_signature) = "parent,node_pool"; - } - - // Deletes a node pool from a cluster. - rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - additional_bindings { - delete: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - option (google.api.method_signature) = "name"; - } - - // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - // complete. - rpc CompleteNodePoolUpgrade(CompleteNodePoolUpgradeRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade" - body: "*" - }; - } - - // Rolls back a previously Aborted or Failed NodePool upgrade. - // This makes no changes if the last upgrade successfully completed. - rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) - returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - option (google.api.method_signature) = "name"; - } - - // Sets the NodeManagement options for a node pool. - rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" - body: "*" - } - }; - } - - // Sets labels on a cluster. - rpc SetLabels(SetLabelsRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" - body: "*" - } - }; - } - - // Enables or disables the ABAC authorization mechanism on a cluster. - rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; - option (google.api.method_signature) = "name,enabled"; - } - - // Starts master IP rotation. - rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - option (google.api.method_signature) = "name"; - } - - // Completes master IP rotation. - rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - option (google.api.method_signature) = "name"; - } - - // Sets the size for a specific node pool. The new size will be used for all - // replicas, including future replicas created by modifying - // [NodePool.locations][google.container.v1.NodePool.locations]. - rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" - body: "*" - } - }; - } - - // Enables or disables Network Policy for a cluster. - rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,network_policy"; - option (google.api.method_signature) = "name,network_policy"; - } - - // Sets the maintenance policy for a cluster. - rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" - body: "*" - additional_bindings { - post: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,maintenance_policy"; - option (google.api.method_signature) = "name,maintenance_policy"; - } - - // Lists subnetworks that are usable for creating clusters in a project. - rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) - returns (ListUsableSubnetworksResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/aggregated/usableSubnetworks" - }; - } - - // Checks the cluster compatibility with Autopilot mode, and returns a list of - // compatibility issues. - rpc CheckAutopilotCompatibility(CheckAutopilotCompatibilityRequest) - returns (CheckAutopilotCompatibilityResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - }; - } -} - -// Parameters that can be configured on Linux nodes. -message LinuxNodeConfig { - // Possible cgroup modes that can be used. - enum CgroupMode { - // CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. - // The default for the GKE node OS image will be used. - CGROUP_MODE_UNSPECIFIED = 0; - - // CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on - // the node image. - CGROUP_MODE_V1 = 1; - - // CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on - // the node image. - CGROUP_MODE_V2 = 2; - } - - // Hugepages amount in both 2m and 1g size - message HugepagesConfig { - // Optional. Amount of 2M hugepages - optional int32 hugepage_size2m = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Amount of 1G hugepages - optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The Linux kernel parameters to be applied to the nodes and all pods running - // on the nodes. - // - // The following parameters are supported. - // - // net.core.busy_poll - // net.core.busy_read - // net.core.netdev_max_backlog - // net.core.rmem_max - // net.core.wmem_default - // net.core.wmem_max - // net.core.optmem_max - // net.core.somaxconn - // net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem - // net.ipv4.tcp_tw_reuse - // kernel.shmmni - // kernel.shmmax - // kernel.shmall - map sysctls = 1; - - // cgroup_mode specifies the cgroup mode to be used on the node. - CgroupMode cgroup_mode = 2; - - // Optional. Amounts for 2M and 1G hugepages - optional HugepagesConfig hugepages = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Parameters that can be configured on Windows nodes. -// Windows Node Config that define the parameters that will be used to -// configure the Windows node pool settings -message WindowsNodeConfig { - // Possible OS version that can be used. - enum OSVersion { - // When OSVersion is not specified - OS_VERSION_UNSPECIFIED = 0; - - // LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image - OS_VERSION_LTSC2019 = 1; - - // LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image - OS_VERSION_LTSC2022 = 2; - } - - // OSVersion specifies the Windows node config to be used on the node - OSVersion os_version = 1; -} - -// Node kubelet configs. -message NodeKubeletConfig { - // Control the CPU management policy on the node. - // See - // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - // - // The following values are allowed. - // * "none": the default, which represents the existing scheduling behavior. - // * "static": allows pods with certain resource characteristics to be granted - // increased CPU affinity and exclusivity on the node. - // The default value is 'none' if unspecified. - string cpu_manager_policy = 1; - - // Enable CPU CFS quota enforcement for containers that specify CPU limits. - // - // This option is enabled by default which makes kubelet use CFS quota - // (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - // enforce container CPU limits. Otherwise, CPU limits will not be enforced at - // all. - // - // Disable this option to mitigate CPU throttling problems while still having - // your pods to be in Guaranteed QoS class by specifying the CPU limits. - // - // The default value is 'true' if unspecified. - google.protobuf.BoolValue cpu_cfs_quota = 2; - - // Set the CPU CFS quota period value 'cpu.cfs_period_us'. - // - // The string must be a sequence of decimal numbers, each with optional - // fraction and a unit suffix, such as "300ms". - // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // The value must be a positive duration. - string cpu_cfs_quota_period = 3; - - // Set the Pod PID limits. See - // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - // - // Controls the maximum number of processes allowed to run in a pod. The value - // must be greater than or equal to 1024 and less than 4194304. - int64 pod_pids_limit = 4; - - // Enable or disable Kubelet read only port. - optional bool insecure_kubelet_readonly_port_enabled = 7; -} - -// Parameters that describe the nodes in a cluster. -// -// GKE Autopilot clusters do not -// recognize parameters in `NodeConfig`. Use -// [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] -// instead. -message NodeConfig { - // LocalSsdEncryptionMode specifies the method used for encrypting the Local - // SSDs attached to the node. - enum LocalSsdEncryptionMode { - // The given node will be encrypted using keys managed by Google - // infrastructure and the keys will be deleted when the node is - // deleted. - LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0; - - // The given node will be encrypted using keys managed by Google - // infrastructure and the keys will be deleted when the node is - // deleted. - STANDARD_ENCRYPTION = 1; - - // The given node will opt-in for using ephemeral key for - // encryption of Local SSDs. - // The Local SSDs will not be able to recover data in case of node - // crash. - EPHEMERAL_KEY_ENCRYPTION = 2; - } - - // Possible effective cgroup modes for the node. - enum EffectiveCgroupMode { - // EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the - // node pool is unspecified, i.e. the node pool is a Windows node pool. - EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0; - - // CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the - // cgroup configuration. - EFFECTIVE_CGROUP_MODE_V1 = 1; - - // CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the - // cgroup configuration. - EFFECTIVE_CGROUP_MODE_V2 = 2; - } - - // The name of a Google Compute Engine [machine - // type](https://cloud.google.com/compute/docs/machine-types) - // - // If unspecified, the default machine type is `e2-medium`. - string machine_type = 1; - - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - int32 disk_size_gb = 2; - - // The set of Google API scopes to be made available on all of the - // node VMs under the "default" service account. - // - // The following scopes are recommended, but not required, and by default are - // not included: - // - // * `https://www.googleapis.com/auth/compute` is required for mounting - // persistent storage on your nodes. - // * `https://www.googleapis.com/auth/devstorage.read_only` is required for - // communicating with **gcr.io** - // (the [Google Container - // Registry](https://cloud.google.com/container-registry/)). - // - // If unspecified, no scopes are added, unless Cloud Logging or Cloud - // Monitoring are enabled, in which case their required scopes will be added. - repeated string oauth_scopes = 3; - - // The Google Cloud Platform Service Account to be used by the node VMs. - // Specify the email address of the Service Account; otherwise, if no Service - // Account is specified, the "default" service account is used. - string service_account = 9; - - // The metadata key/value pairs assigned to instances in the cluster. - // - // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes - // in length. These are reflected as part of a URL in the metadata server. - // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the reserved keys: - // - // - "cluster-location" - // - "cluster-name" - // - "cluster-uid" - // - "configure-sh" - // - "containerd-configure-sh" - // - "enable-os-login" - // - "gci-ensure-gke-docker" - // - "gci-metrics-enabled" - // - "gci-update-strategy" - // - "instance-template" - // - "kube-env" - // - "startup-script" - // - "user-data" - // - "disable-address-manager" - // - "windows-startup-script-ps1" - // - "common-psm1" - // - "k8s-node-setup-psm1" - // - "install-ssh-psm1" - // - "user-profile-psm1" - // - // Values are free-form strings, and only have meaning as interpreted by - // the image running in the instance. The only restriction placed on them is - // that each value's size must be less than or equal to 32 KB. - // - // The total size of all keys and values must be less than 512 KB. - map metadata = 4; - - // The image type to use for this node. Note that for a given image type, - // the latest version of it will be used. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 5; - - // The map of Kubernetes labels (key/value pairs) to be applied to each node. - // These will added in addition to any default label(s) that - // Kubernetes may apply to the node. - // In case of conflict in label keys, the applied set may differ depending on - // the Kubernetes version -- it's best to assume the behavior is undefined - // and conflicts should be avoided. - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - map labels = 6; - - // The number of local SSD disks to be attached to the node. - // - // The limit for this value is dependent upon the maximum number of - // disks available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - int32 local_ssd_count = 7; - - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster or node pool creation. Each tag within the list - // must comply with RFC1035. - repeated string tags = 8; - - // Whether the nodes are created as preemptible VM instances. See: - // https://cloud.google.com/compute/docs/instances/preemptible for more - // information about preemptible VM instances. - bool preemptible = 10; - - // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - repeated AcceleratorConfig accelerators = 11; - - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - string disk_type = 12; - - // Minimum CPU platform to be used by this instance. The instance may be - // scheduled on the specified or newer CPU platform. Applicable values are the - // friendly names of CPU platforms, such as - // `minCpuPlatform: "Intel Haswell"` or - // `minCpuPlatform: "Intel Sandy Bridge"`. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - string min_cpu_platform = 13; - - // The workload metadata configuration for this node. - WorkloadMetadataConfig workload_metadata_config = 14; - - // List of kubernetes taints to be applied to each node. - // - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - repeated NodeTaint taints = 15; - - // Sandbox configuration for this node. - SandboxConfig sandbox_config = 17; - - // Setting this field will assign instances of this - // pool to run on the specified node group. This is useful for running - // workloads on [sole tenant - // nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). - string node_group = 18; - - // The optional reservation affinity. Setting this field will apply - // the specified [Zonal Compute - // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - // to this node pool. - ReservationAffinity reservation_affinity = 19; - - // Shielded Instance options. - ShieldedInstanceConfig shielded_instance_config = 20; - - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig linux_node_config = 21; - - // Node kubelet configs. - NodeKubeletConfig kubelet_config = 22; - - // - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - string boot_disk_kms_key = 23; - - // Google Container File System (image streaming) configs. - GcfsConfig gcfs_config = 25; - - // Advanced features for the Compute Engine VM. - AdvancedMachineFeatures advanced_machine_features = 26; - - // Enable or disable gvnic in the node pool. - VirtualNIC gvnic = 29; - - // Spot flag for enabling Spot VM, which is a rebrand of - // the existing preemptible flag. - bool spot = 32; - - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 35; - - // Enable or disable NCCL fast socket for the node pool. - optional FastSocket fast_socket = 36; - - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - map resource_labels = 37; - - // Logging configuration. - NodePoolLoggingConfig logging_config = 38; - - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig windows_node_config = 39; - - // Parameters for using raw-block Local NVMe SSDs. - LocalNvmeSsdBlockConfig local_nvme_ssd_block_config = 40; - - // Parameters for the node ephemeral storage using Local SSDs. - // If unspecified, ephemeral storage is backed by the boot disk. - EphemeralStorageLocalSsdConfig ephemeral_storage_local_ssd_config = 41; - - // Parameters for node pools to be backed by shared sole tenant node groups. - SoleTenantConfig sole_tenant_config = 42; - - // Parameters for containerd customization. - ContainerdConfig containerd_config = 43; - - // A map of resource manager tag keys and values to be attached to the nodes. - ResourceManagerTags resource_manager_tags = 45; - - // Optional. Reserved for future use. - bool enable_confidential_storage = 46 - [(google.api.field_behavior) = OPTIONAL]; - - // List of secondary boot disks attached to the nodes. - repeated SecondaryBootDisk secondary_boot_disks = 48; - - // List of Storage Pools where boot disks are provisioned. - repeated string storage_pools = 49; - - // Secondary boot disk update strategy. - optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = - 50; - - // Specifies which method should be used for encrypting the - // Local SSDs attahced to the node. - optional LocalSsdEncryptionMode local_ssd_encryption_mode = 54; - - // Output only. effective_cgroup_mode is the cgroup mode actually used by the - // node pool. It is determined by the cgroup mode specified in the - // LinuxNodeConfig or the default cgroup mode based on the cluster creation - // version. - EffectiveCgroupMode effective_cgroup_mode = 55 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifies options for controlling advanced machine features. -message AdvancedMachineFeatures { - // The number of threads per physical core. To disable simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number of threads - // supported per core by the underlying processor is assumed. - optional int64 threads_per_core = 1; - - // Whether or not to enable nested virtualization (defaults to false). - optional bool enable_nested_virtualization = 2; -} - -// Parameters for node pool-level network config. -message NodeNetworkConfig { - // Configuration of all network bandwidth tiers - message NetworkPerformanceConfig { - // Node network tier - enum Tier { - // Default value - TIER_UNSPECIFIED = 0; - - // Higher bandwidth, actual values based on VM size. - TIER_1 = 1; - } - - // Specifies the total network bandwidth tier for the NodePool. - optional Tier total_egress_bandwidth_tier = 1; - } - - // Input only. Whether to create a new range for pod IPs in this node pool. - // Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they - // are not specified. - // - // If neither `create_pod_range` or `pod_range` are specified, the - // cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is - // used. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - bool create_pod_range = 4 [(google.api.field_behavior) = INPUT_ONLY]; - - // The ID of the secondary range for pod IPs. - // If `create_pod_range` is true, this ID is used for the new range. - // If `create_pod_range` is false, uses an existing secondary range with this - // ID. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - string pod_range = 5; - - // The IP address range for pod IPs in this node pool. - // - // Only applicable if `create_pod_range` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) to pick a specific range to use. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - string pod_ipv4_cidr_block = 6; - - // Whether nodes have internal IP addresses only. - // If enable_private_nodes is not specified, then the value is derived from - // [Cluster.NetworkConfig.default_enable_private_nodes][] - optional bool enable_private_nodes = 9; - - // Network bandwidth tier configuration. - optional NetworkPerformanceConfig network_performance_config = 11; - - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the nodepool. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is rounded off to next power of 2 and we then double - // that to get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13; - - // We specify the additional node networks for this node pool using this list. - // Each node network corresponds to an additional interface - repeated AdditionalNodeNetworkConfig additional_node_network_configs = 14; - - // We specify the additional pod networks for this node pool using this list. - // Each pod network corresponds to an additional alias IP range for the node - repeated AdditionalPodNetworkConfig additional_pod_network_configs = 15; - - // Output only. The utilization of the IPv4 range for the pod. - // The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - double pod_ipv4_range_utilization = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// AdditionalNodeNetworkConfig is the configuration for additional node networks -// within the NodeNetworkConfig message -message AdditionalNodeNetworkConfig { - // Name of the VPC where the additional interface belongs - string network = 1; - - // Name of the subnetwork where the additional interface belongs - string subnetwork = 2; -} - -// AdditionalPodNetworkConfig is the configuration for additional pod networks -// within the NodeNetworkConfig message -message AdditionalPodNetworkConfig { - // Name of the subnetwork where the additional pod network belongs. - string subnetwork = 1; - - // The name of the secondary range on the subnet which provides IP address for - // this pod range. - string secondary_pod_range = 2; - - // The maximum number of pods per node which use this pod network. - optional MaxPodsConstraint max_pods_per_node = 3; -} - -// A set of Shielded Instance options. -message ShieldedInstanceConfig { - // Defines whether the instance has Secure Boot enabled. - // - // Secure Boot helps ensure that the system only runs authentic software by - // verifying the digital signature of all boot components, and halting the - // boot process if signature verification fails. - bool enable_secure_boot = 1; - - // Defines whether the instance has integrity monitoring enabled. - // - // Enables monitoring and attestation of the boot integrity of the instance. - // The attestation is performed against the integrity policy baseline. This - // baseline is initially derived from the implicitly trusted boot image when - // the instance is created. - bool enable_integrity_monitoring = 2; -} - -// SandboxConfig contains configurations of the sandbox to use for the node. -message SandboxConfig { - // Possible types of sandboxes. - enum Type { - // Default value. This should not be used. - UNSPECIFIED = 0; - - // Run sandbox using gvisor. - GVISOR = 1; - } - - // Type of the sandbox to use for the node. - Type type = 2; -} - -// GcfsConfig contains configurations of Google Container File System -// (image streaming). -message GcfsConfig { - // Whether to use GCFS. - bool enabled = 1; -} - -// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) -// is the configuration of desired reservation which instances could take -// capacity from. -message ReservationAffinity { - // Indicates whether to consume capacity from a reservation or not. - enum Type { - // Default value. This should not be used. - UNSPECIFIED = 0; - - // Do not consume from any reserved capacity. - NO_RESERVATION = 1; - - // Consume any reservation available. - ANY_RESERVATION = 2; - - // Must consume from a specific reservation. Must specify key value fields - // for specifying the reservations. - SPECIFIC_RESERVATION = 3; - } - - // Corresponds to the type of reservation consumption. - Type consume_reservation_type = 1; - - // Corresponds to the label key of a reservation resource. To target a - // SPECIFIC_RESERVATION by name, specify - // "compute.googleapis.com/reservation-name" as the key and specify the name - // of your reservation as its value. - string key = 2; - - // Corresponds to the label value(s) of reservation resource(s). - repeated string values = 3; -} - -// SoleTenantConfig contains the NodeAffinities to specify what shared sole -// tenant node groups should back the node pool. -message SoleTenantConfig { - // Specifies the NodeAffinity key, values, and affinity operator according to - // [shared sole tenant node group - // affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). - message NodeAffinity { - // Operator allows user to specify affinity or anti-affinity for the - // given key values. - enum Operator { - // Invalid or unspecified affinity operator. - OPERATOR_UNSPECIFIED = 0; - - // Affinity operator. - IN = 1; - - // Anti-affinity operator. - NOT_IN = 2; - } - - // Key for NodeAffinity. - string key = 1; - - // Operator for NodeAffinity. - Operator operator = 2; - - // Values for NodeAffinity. - repeated string values = 3; - } - - // NodeAffinities used to match to a shared sole tenant node group. - repeated NodeAffinity node_affinities = 1; -} - -// ContainerdConfig contains configuration to customize containerd. -message ContainerdConfig { - // PrivateRegistryAccessConfig contains access configuration for - // private container registries. - message PrivateRegistryAccessConfig { - // CertificateAuthorityDomainConfig configures one or more fully qualified - // domain names (FQDN) to a specific certificate. - message CertificateAuthorityDomainConfig { - // GCPSecretManagerCertificateConfig configures a secret from - // [Google Secret Manager](https://cloud.google.com/secret-manager). - message GCPSecretManagerCertificateConfig { - // Secret URI, in the form - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". - // Version can be fixed (e.g. "2") or "latest" - string secret_uri = 1; - } - - // List of fully qualified domain names (FQDN). - // Specifying port is supported. - // Wilcards are NOT supported. - // Examples: - // - my.customdomain.com - // - 10.0.1.2:5000 - repeated string fqdns = 1; - - // Certificate access config. The following are supported: - // - GCPSecretManagerCertificateConfig - oneof certificate_config { - // Google Secret Manager (GCP) certificate configuration. - GCPSecretManagerCertificateConfig - gcp_secret_manager_certificate_config = 2; - } - } - - // Private registry access is enabled. - bool enabled = 1; - - // Private registry access configuration. - repeated CertificateAuthorityDomainConfig - certificate_authority_domain_config = 2; - } - - // PrivateRegistryAccessConfig is used to configure access configuration - // for private container registries. - PrivateRegistryAccessConfig private_registry_access_config = 1; -} - -// Kubernetes taint is composed of three fields: key, value, and effect. Effect -// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. -// -// See -// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) -// for more information, including usage and the valid values. -message NodeTaint { - // Possible values for Effect in taint. - enum Effect { - // Not set - EFFECT_UNSPECIFIED = 0; - - // NoSchedule - NO_SCHEDULE = 1; - - // PreferNoSchedule - PREFER_NO_SCHEDULE = 2; - - // NoExecute - NO_EXECUTE = 3; - } - - // Key for taint. - string key = 1; - - // Value for taint. - string value = 2; - - // Effect for taint. - Effect effect = 3; -} - -// Collection of Kubernetes [node -// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). -message NodeTaints { - // List of node taints. - repeated NodeTaint taints = 1; -} - -// Collection of node-level [Kubernetes -// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). -message NodeLabels { - // Map of node label keys and node label values. - map labels = 1; -} - -// Collection of [GCP -// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). -message ResourceLabels { - // Map of node label keys and node label values. - map labels = 1; -} - -// Collection of Compute Engine network tags that can be applied to a node's -// underlying VM instance. -message NetworkTags { - // List of network tags. - repeated string tags = 1; -} - -// The authentication information for accessing the master endpoint. -// Authentication can be done using HTTP basic auth or using client -// certificates. -message MasterAuth { - // The username to use for HTTP basic authentication to the master endpoint. - // For clusters v1.6.0 and later, basic authentication can be disabled by - // leaving username unspecified (or setting it to the empty string). - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - string username = 1 [deprecated = true]; - - // The password to use for HTTP basic authentication to the master endpoint. - // Because the master endpoint is open to the Internet, you should create a - // strong password. If a password is provided for cluster creation, username - // must be non-empty. - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - string password = 2 [deprecated = true]; - - // Configuration for client certificate authentication on the cluster. For - // clusters before v1.12, if no configuration is specified, a client - // certificate is issued. - ClientCertificateConfig client_certificate_config = 3; - - // Output only. Base64-encoded public certificate that is the root of - // trust for the cluster. - string cluster_ca_certificate = 100 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Base64-encoded public certificate used by clients to - // authenticate to the cluster endpoint. Issued only if - // client_certificate_config is set. - string client_certificate = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Base64-encoded private key used by clients to authenticate - // to the cluster endpoint. - string client_key = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration for client certificates on the cluster. -message ClientCertificateConfig { - // Issue a client certificate. - bool issue_client_certificate = 1; -} - -// Configuration for the addons that can be automatically spun up in the -// cluster, enabling additional functionality. -message AddonsConfig { - // Configuration for the HTTP (L7) load balancing controller addon, which - // makes it easy to set up HTTP load balancers for services in a cluster. - HttpLoadBalancing http_load_balancing = 1; - - // Configuration for the horizontal pod autoscaling feature, which - // increases or decreases the number of replica pods a replication controller - // has based on the resource usage of the existing pods. - HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; - - // Configuration for the Kubernetes Dashboard. - // This addon is deprecated, and will be disabled in 1.15. It is recommended - // to use the Cloud Console to manage and monitor your Kubernetes clusters, - // workloads and applications. For more information, see: - // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards - KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; - - // Configuration for NetworkPolicy. This only tracks whether the addon - // is enabled or not on the Master, it does not track whether network policy - // is enabled for the nodes. - NetworkPolicyConfig network_policy_config = 4; - - // Configuration for the Cloud Run addon, which allows the user to use a - // managed Knative service. - CloudRunConfig cloud_run_config = 7; - - // Configuration for NodeLocalDNS, a dns cache running on cluster nodes - DnsCacheConfig dns_cache_config = 8; - - // Configuration for the ConfigConnector add-on, a Kubernetes - // extension to manage hosted GCP services through the Kubernetes API - ConfigConnectorConfig config_connector_config = 10; - - // Configuration for the Compute Engine Persistent Disk CSI driver. - GcePersistentDiskCsiDriverConfig gce_persistent_disk_csi_driver_config = 11; - - // Configuration for the GCP Filestore CSI driver. - GcpFilestoreCsiDriverConfig gcp_filestore_csi_driver_config = 14; - - // Configuration for the Backup for GKE agent addon. - GkeBackupAgentConfig gke_backup_agent_config = 16; - - // Configuration for the Cloud Storage Fuse CSI driver. - GcsFuseCsiDriverConfig gcs_fuse_csi_driver_config = 17; - - // Optional. Configuration for the StatefulHA add-on. - StatefulHAConfig stateful_ha_config = 18 - [(google.api.field_behavior) = OPTIONAL]; - - // Configuration for the Cloud Storage Parallelstore CSI driver. - ParallelstoreCsiDriverConfig parallelstore_csi_driver_config = 19; - - // Optional. Configuration for Ray Operator addon. - RayOperatorConfig ray_operator_config = 21 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the HTTP (L7) load balancing controller addon, -// which makes it easy to set up HTTP load balancers for services in a cluster. -message HttpLoadBalancing { - // Whether the HTTP Load Balancing controller is enabled in the cluster. - // When enabled, it runs a small pod in the cluster that manages the load - // balancers. - bool disabled = 1; -} - -// Configuration options for the horizontal pod autoscaling feature, which -// increases or decreases the number of replica pods a replication controller -// has based on the resource usage of the existing pods. -message HorizontalPodAutoscaling { - // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. - // When enabled, it ensures that metrics are collected into Stackdriver - // Monitoring. - bool disabled = 1; -} - -// Configuration for the Kubernetes Dashboard. -message KubernetesDashboard { - // Whether the Kubernetes Dashboard is enabled for this cluster. - bool disabled = 1; -} - -// Configuration for NetworkPolicy. This only tracks whether the addon -// is enabled or not on the Master, it does not track whether network policy -// is enabled for the nodes. -message NetworkPolicyConfig { - // Whether NetworkPolicy is enabled for this cluster. - bool disabled = 1; -} - -// Configuration for NodeLocal DNSCache -message DnsCacheConfig { - // Whether NodeLocal DNSCache is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for controlling master global access settings. -message PrivateClusterMasterGlobalAccessConfig { - // Whenever master is accessible globally or not. - bool enabled = 1; -} - -// Configuration options for private clusters. -message PrivateClusterConfig { - // Whether nodes have internal IP addresses only. If enabled, all nodes are - // given only RFC 1918 private addresses and communicate with the master via - // private networking. - // - // Deprecated: Use - // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] - // instead. - bool enable_private_nodes = 1 [deprecated = true]; - - // Whether the master's internal IP address is used as the cluster endpoint. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint] - // instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - bool enable_private_endpoint = 2 [deprecated = true]; - - // The IP range in CIDR notation to use for the hosted master network. This - // range will be used for assigning internal IP addresses to the master or - // set of masters, as well as the ILB VIP. This range must not overlap with - // any other ranges in use within the cluster's network. - string master_ipv4_cidr_block = 3; - - // Output only. The internal IP address of this cluster's master endpoint. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint] - // instead. - string private_endpoint = 4 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The external IP address of this cluster's master endpoint. - // - // Deprecated:Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint] - // instead. - string public_endpoint = 5 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The peering name in the customer VPC used by this cluster. - string peering_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Controls master global access settings. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][] - // instead. - PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8 - [deprecated = true]; - - // Subnet to provision the master's private endpoint during cluster creation. - // Specified in projects/*/regions/*/subnetworks/* format. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork] - // instead. - string private_endpoint_subnetwork = 10 [deprecated = true]; -} - -// Configuration for returning group information from authenticators. -message AuthenticatorGroupsConfig { - // Whether this cluster should return group membership lookups - // during authentication using a group of security groups. - bool enabled = 1; - - // The name of the security group-of-groups to be used. Only relevant - // if enabled = true. - string security_group = 2; -} - -// Configuration options for the Cloud Run feature. -message CloudRunConfig { - // Load balancer type of ingress service of Cloud Run. - enum LoadBalancerType { - // Load balancer type for Cloud Run is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Install external load balancer for Cloud Run. - LOAD_BALANCER_TYPE_EXTERNAL = 1; - - // Install internal load balancer for Cloud Run. - LOAD_BALANCER_TYPE_INTERNAL = 2; - } - - // Whether Cloud Run addon is enabled for this cluster. - bool disabled = 1; - - // Which load balancer type is installed for Cloud Run. - LoadBalancerType load_balancer_type = 3; -} - -// Configuration options for the Config Connector add-on. -message ConfigConnectorConfig { - // Whether Cloud Connector is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Compute Engine PD CSI driver. -message GcePersistentDiskCsiDriverConfig { - // Whether the Compute Engine PD CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the GCP Filestore CSI driver. -message GcpFilestoreCsiDriverConfig { - // Whether the GCP Filestore CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Cloud Storage Fuse CSI driver. -message GcsFuseCsiDriverConfig { - // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Cloud Storage Parallelstore CSI driver. -message ParallelstoreCsiDriverConfig { - // Whether the Cloud Storage Parallelstore CSI driver is enabled for this - // cluster. - bool enabled = 1; -} - -// Configuration options for the Ray Operator add-on. -message RayOperatorConfig { - // Whether the Ray Operator addon is enabled for this cluster. - bool enabled = 1; - - // Optional. Logging configuration for Ray clusters. - RayClusterLoggingConfig ray_cluster_logging_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Monitoring configuration for Ray clusters. - RayClusterMonitoringConfig ray_cluster_monitoring_config = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for the Backup for GKE Agent. -message GkeBackupAgentConfig { - // Whether the Backup for GKE agent is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Stateful HA add-on. -message StatefulHAConfig { - // Whether the Stateful HA add-on is enabled for this cluster. - bool enabled = 1; -} - -// Configuration options for the master authorized networks feature. Enabled -// master authorized networks will disallow all external traffic to access -// Kubernetes master through HTTPS except traffic from the given CIDR blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -message MasterAuthorizedNetworksConfig { - // CidrBlock contains an optional name and one CIDR block. - message CidrBlock { - // display_name is an optional field for users to identify CIDR blocks. - string display_name = 1; - - // cidr_block must be specified in CIDR notation. - string cidr_block = 2; - } - - // Whether or not master authorized networks is enabled. - bool enabled = 1; - - // cidr_blocks define up to 50 external networks that could access - // Kubernetes master through HTTPS. - repeated CidrBlock cidr_blocks = 2; - - // Whether master is accessbile via Google Compute Engine Public IP addresses. - optional bool gcp_public_cidrs_access_enabled = 3; - - // Whether master authorized networks is enforced on private endpoint or not. - optional bool private_endpoint_enforcement_enabled = 5; -} - -// Configuration for the legacy Attribute Based Access Control authorization -// mode. -message LegacyAbac { - // Whether the ABAC authorizer is enabled for this cluster. When enabled, - // identities in the system, including service accounts, nodes, and - // controllers, will have statically granted permissions beyond those - // provided by the RBAC configuration or IAM. - bool enabled = 1; -} - -// Configuration options for the NetworkPolicy feature. -// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ -message NetworkPolicy { - // Allowed Network Policy providers. - enum Provider { - // Not set - PROVIDER_UNSPECIFIED = 0; - - // Tigera (Calico Felix). - CALICO = 1; - } - - // The selected network policy provider. - Provider provider = 1; - - // Whether network policy is enabled on the cluster. - bool enabled = 2; -} - -// Configuration for Binary Authorization. -message BinaryAuthorization { - // Binary Authorization mode of operation. - enum EvaluationMode { - // Default value - EVALUATION_MODE_UNSPECIFIED = 0; - - // Disable BinaryAuthorization - DISABLED = 1; - - // Enforce Kubernetes admission requests with BinaryAuthorization using the - // project's singleton policy. This is equivalent to setting the - // enabled boolean to true. - PROJECT_SINGLETON_POLICY_ENFORCE = 2; - } - - // This field is deprecated. Leave this unset and instead configure - // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to - // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. - bool enabled = 1 [deprecated = true]; - - // Mode of operation for binauthz policy evaluation. If unspecified, defaults - // to DISABLED. - EvaluationMode evaluation_mode = 2; -} - -// [PRIVATE FIELD] -// Config for pod CIDR size overprovisioning. -message PodCIDROverprovisionConfig { - // Whether Pod CIDR overprovisioning is disabled. - // Note: Pod CIDR overprovisioning is enabled by default. - bool disable = 1; -} - -// Configuration for controlling how IPs are allocated in the cluster. -message IPAllocationPolicy { - // Whether alias IPs will be used for pod IPs in the cluster. - // This is used in conjunction with use_routes. It cannot - // be true if use_routes is true. If both use_ip_aliases and use_routes are - // false, then the server picks the default IP allocation mode - bool use_ip_aliases = 1; - - // Whether a new subnetwork will be created automatically for the cluster. - // - // This field is only applicable when `use_ip_aliases` is true. - bool create_subnetwork = 2; - - // A custom subnetwork name to be used if `create_subnetwork` is true. If - // this field is empty, then an automatic name will be chosen for the new - // subnetwork. - string subnetwork_name = 3; - - // This field is deprecated, use cluster_ipv4_cidr_block. - string cluster_ipv4_cidr = 4 [deprecated = true]; - - // This field is deprecated, use node_ipv4_cidr_block. - string node_ipv4_cidr = 5 [deprecated = true]; - - // This field is deprecated, use services_ipv4_cidr_block. - string services_ipv4_cidr = 6 [deprecated = true]; - - // The name of the secondary range to be used for the cluster CIDR - // block. The secondary range will be used for pod IP - // addresses. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases is true and - // create_subnetwork is false. - string cluster_secondary_range_name = 7; - - // The name of the secondary range to be used as for the services - // CIDR block. The secondary range will be used for service - // ClusterIPs. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases is true and - // create_subnetwork is false. - string services_secondary_range_name = 8; - - // The IP address range for the cluster pod IPs. If this field is set, then - // `cluster.cluster_ipv4_cidr` must be left blank. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string cluster_ipv4_cidr_block = 9; - - // The IP address range of the instance IPs in this cluster. - // - // This is applicable only if `create_subnetwork` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string node_ipv4_cidr_block = 10; - - // The IP address range of the services IPs in this cluster. If blank, a range - // will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string services_ipv4_cidr_block = 11; - - // The IP address range of the Cloud TPUs in this cluster. If unspecified, a - // range will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // If unspecified, the range will use the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string tpu_ipv4_cidr_block = 13; - - // Whether routes will be used for pod IPs in the cluster. - // This is used in conjunction with use_ip_aliases. It cannot be true if - // use_ip_aliases is true. If both use_ip_aliases and use_routes are false, - // then the server picks the default IP allocation mode - bool use_routes = 15; - - // The IP stack type of the cluster - StackType stack_type = 16; - - // The ipv6 access type (internal or external) when create_subnetwork is true - IPv6AccessType ipv6_access_type = 17; - - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the cluster. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is doubled and then rounded off to next power of 2 to - // get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21; - - // Output only. The subnet's IPv6 CIDR block used by nodes and pods. - string subnet_ipv6_cidr_block = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The services IPv6 CIDR block for the cluster. - string services_ipv6_cidr_block = 23 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The additional pod ranges that are added to the cluster. - // These pod ranges can be used by new node pools to allocate pod IPs - // automatically. Once the range is removed it will not show up in - // IPAllocationPolicy. - AdditionalPodRangesConfig additional_pod_ranges_config = 24 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The utilization of the cluster default IPv4 range for the - // pod. The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - double default_pod_ipv4_range_utilization = 25 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A Google Kubernetes Engine cluster. -message Cluster { - // The current status of the cluster. - enum Status { - // Not set. - STATUS_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 master or node software. Details can - // be found in the `statusMessage` field. - RECONCILING = 3; - - // The STOPPING state indicates the cluster is being deleted. - STOPPING = 4; - - // The ERROR state indicates the cluster is unusable. It will be - // automatically deleted. Details can be found in the `statusMessage` field. - ERROR = 5; - - // The DEGRADED state indicates the cluster requires user action to restore - // full functionality. Details can be found in the `statusMessage` field. - DEGRADED = 6; - } - - // The name of this cluster. The name must be unique within this project - // and location (e.g. zone or region), and can be up to 40 characters with - // the following restrictions: - // - // * Lowercase letters, numbers, and hyphens only. - // * Must start with a letter. - // * Must end with a number or a letter. - string name = 1; - - // An optional description of this cluster. - string description = 2; - - // The number of nodes to create in this cluster. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "node_config") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // - // This field is deprecated, use node_pool.initial_node_count instead. - int32 initial_node_count = 3 [deprecated = true]; - - // Parameters used in creating the cluster's nodes. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "initial_node_count") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // For responses, this field will be populated with the node configuration of - // the first node pool. (For configuration of each node pool, see - // `node_pool.config`) - // - // If unspecified, the defaults are used. - // This field is deprecated, use node_pool.config instead. - NodeConfig node_config = 4 [deprecated = true]; - - // The authentication information for accessing the master endpoint. - // If unspecified, the defaults are used: - // For clusters before v1.12, if master_auth is unspecified, `username` will - // be set to "admin", a random password will be generated, and a client - // certificate will be issued. - MasterAuth master_auth = 5; - - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string logging_service = 6; - - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string monitoring_service = 7; - - // The name of the Google Compute Engine - // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. If left unspecified, the `default` - // network will be used. - string network = 8; - - // The IP address range of the container pods in this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`). Leave blank to have - // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. - string cluster_ipv4_cidr = 9; - - // Configurations for the various addons available to run in the cluster. - AddonsConfig addons_config = 10; - - // The name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which - // the cluster is connected. - string subnetwork = 11; - - // The node pools associated with this cluster. - // This field should not be set if "node_config" or "initial_node_count" are - // specified. - repeated NodePool node_pools = 12; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. - // - // This field provides a default value if - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // are not specified during node pool creation. - // - // Warning: changing cluster locations will update the - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // of all node pools and will result in nodes being added and/or removed. - repeated string locations = 13; - - // Kubernetes alpha features are enabled on this cluster. This includes alpha - // API groups (e.g. v1alpha1) and features that may not be production ready in - // the kubernetes version of the master and nodes. - // The cluster has no SLA for uptime and master/node upgrades are disabled. - // Alpha enabled clusters are automatically deleted thirty days after - // creation. - bool enable_kubernetes_alpha = 14; - - // The resource labels for the cluster to use to annotate any related - // Google Compute Engine resources. - map resource_labels = 15; - - // The fingerprint of the set of labels for this cluster. - string label_fingerprint = 16; - - // Configuration for the legacy ABAC authorization mode. - LegacyAbac legacy_abac = 18; - - // Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 19; - - // Configuration for cluster IP allocation. - IPAllocationPolicy ip_allocation_policy = 20; - - // The configuration options for master authorized networks feature. - // - // Deprecated: Use - // [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config] - // instead. - MasterAuthorizedNetworksConfig master_authorized_networks_config = 22 - [deprecated = true]; - - // Configure the maintenance policy for this cluster. - MaintenancePolicy maintenance_policy = 23; - - // Configuration for Binary Authorization. - BinaryAuthorization binary_authorization = 24; - - // Cluster-level autoscaling configuration. - ClusterAutoscaling autoscaling = 26; - - // Configuration for cluster networking. - NetworkConfig network_config = 27; - - // The default constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool of this cluster. Only honored - // if cluster created with IP Alias support. - MaxPodsConstraint default_max_pods_constraint = 30; - - // Configuration for exporting resource usages. Resource usage export is - // disabled when this config is unspecified. - ResourceUsageExportConfig resource_usage_export_config = 33; - - // Configuration controlling RBAC group membership information. - AuthenticatorGroupsConfig authenticator_groups_config = 34; - - // Configuration for private cluster. - PrivateClusterConfig private_cluster_config = 37; - - // Configuration of etcd encryption. - DatabaseEncryption database_encryption = 38; - - // Cluster-level Vertical Pod Autoscaling configuration. - VerticalPodAutoscaling vertical_pod_autoscaling = 39; - - // Shielded Nodes configuration. - ShieldedNodes shielded_nodes = 40; - - // Release channel configuration. If left unspecified on cluster creation and - // a version is specified, the cluster is enrolled in the most mature release - // channel where the version is available (first checking STABLE, then - // REGULAR, and finally RAPID). Otherwise, if no release channel - // configuration and no version is specified, the cluster is enrolled in the - // REGULAR channel with its default version. - ReleaseChannel release_channel = 41; - - // Configuration for the use of Kubernetes Service Accounts in GCP IAM - // policies. - WorkloadIdentityConfig workload_identity_config = 43; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - MeshCertificates mesh_certificates = 67; - - // Configuration for the fine-grained cost management feature. - CostManagementConfig cost_management_config = 45; - - // Notification configuration of the cluster. - NotificationConfig notification_config = 49; - - // Configuration of Confidential Nodes. - // All the nodes in the cluster will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 50; - - // Configuration for Identity Service component. - IdentityServiceConfig identity_service_config = 54; - - // Output only. Server-defined URL for the resource. - string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field is deprecated, use location instead. - string zone = 101 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IP address of this cluster's master endpoint. - // The endpoint can be accessed from the internet at - // `https://username:password@endpoint/`. - // - // See the `masterAuth` property of this resource for username and - // password information. - string endpoint = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The initial Kubernetes version for this cluster. Valid versions are those - // found in validMasterVersions returned by getServerConfig. The version can - // be upgraded over time; such upgrades are reflected in - // currentMasterVersion and currentNodeVersion. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "","-": picks the default Kubernetes version - string initial_cluster_version = 103; - - // Output only. The current software version of the master endpoint. - string current_master_version = 104 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated, use - // [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) - // instead. The current version of the node software components. If they are - // currently at multiple versions because they're in the process of being - // upgraded, this reflects the minimum version of all nodes. - string current_node_version = 105 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the cluster was created, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string create_time = 106 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current status of this cluster. - Status status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // cluster, if available. - string status_message = 108 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the address space on each node for hosting - // containers. This is provisioned from within the `container_ipv4_cidr` - // range. This field will only be set when cluster is in route-based network - // mode. - int32 node_ipv4_cidr_size = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IP address range of the Kubernetes services in - // this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). Service addresses are - // typically put in the last `/16` from the container CIDR. - string services_ipv4_cidr = 110 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use node_pools.instance_group_urls. - repeated string instance_group_urls = 111 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of nodes currently in the cluster. Deprecated. - // Call Kubernetes API directly to retrieve node information. - int32 current_node_count = 112 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the cluster will be automatically - // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string expire_time = 113 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - string location = 114 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Enable the ability to use Cloud TPUs in this cluster. - bool enable_tpu = 115; - - // Output only. The IP address range of the Cloud TPUs in this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). - string tpu_ipv4_cidr_block = 116 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Which conditions caused the current cluster state. - repeated StatusCondition conditions = 118; - - // Autopilot configuration for the cluster. - Autopilot autopilot = 128; - - // Output only. Unique id for the cluster. - string id = 129 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Default NodePool settings for the entire cluster. These settings are - // overridden if specified on the specific NodePool object. - optional NodePoolDefaults node_pool_defaults = 131; - - // Logging configuration for the cluster. - LoggingConfig logging_config = 132; - - // Monitoring configuration for the cluster. - MonitoringConfig monitoring_config = 133; - - // Node pool configs that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NodePoolAutoConfig node_pool_auto_config = 136; - - // This checksum is computed by the server based on the value of cluster - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - string etag = 139; - - // Fleet information for the cluster. - Fleet fleet = 140; - - // Enable/Disable Security Posture API features for the cluster. - SecurityPostureConfig security_posture_config = 145; - - // Configuration for all cluster's control plane endpoints. - ControlPlaneEndpointsConfig control_plane_endpoints_config = 146; - - // Beta APIs Config - K8sBetaAPIConfig enable_k8s_beta_apis = 143; - - // GKE Enterprise Configuration. - EnterpriseConfig enterprise_config = 149; - - // Secret CSI driver configuration. - SecretManagerConfig secret_manager_config = 150; - - // Enable/Disable Compliance Posture features for the cluster. - CompliancePostureConfig compliance_posture_config = 151; - - // Output only. Reserved for future use. - optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The Custom keys configuration for the cluster. - optional UserManagedKeysConfig user_managed_keys_config = 154; - - // RBACBindingConfig allows user to restrict ClusterRoleBindings an - // RoleBindings that can be created. - optional RBACBindingConfig rbac_binding_config = 156; -} - -// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings -// that can be created. -message RBACBindingConfig { - // Setting this to true will allow any ClusterRoleBinding and RoleBinding - // with subjets system:anonymous or system:unauthenticated. - optional bool enable_insecure_binding_system_unauthenticated = 1; - - // Setting this to true will allow any ClusterRoleBinding and RoleBinding - // with subjects system:authenticated. - optional bool enable_insecure_binding_system_authenticated = 2; -} - -// UserManagedKeysConfig holds the resource address to Keys which are used -// for signing certs and token that are used for communication within cluster. -message UserManagedKeysConfig { - // The Certificate Authority Service caPool to use for the cluster CA in this - // cluster. - string cluster_ca = 10 [(google.api.resource_reference) = { - type: "privateca.googleapis.com/CaPool" - }]; - - // Resource path of the Certificate Authority Service caPool to use for the - // etcd API CA in this cluster. - string etcd_api_ca = 11 [(google.api.resource_reference) = { - type: "privateca.googleapis.com/CaPool" - }]; - - // Resource path of the Certificate Authority Service caPool to use for the - // etcd peer CA in this cluster. - string etcd_peer_ca = 12 [(google.api.resource_reference) = { - type: "privateca.googleapis.com/CaPool" - }]; - - // The Cloud KMS cryptoKeyVersions to use for signing service account JWTs - // issued by this cluster. - // - // Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` - repeated string service_account_signing_keys = 13 - [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKeyVersion" - }]; - - // The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs - // issued by this cluster. - // - // Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` - repeated string service_account_verification_keys = 14 - [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKeyVersion" - }]; - - // The Certificate Authority Service caPool to use for the aggregation CA in - // this cluster. - string aggregation_ca = 15 [(google.api.resource_reference) = { - type: "privateca.googleapis.com/CaPool" - }]; - - // The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control - // plane nodes. - string control_plane_disk_encryption_key = 16 - [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKeyVersion" - }]; - - // Resource path of the Cloud KMS cryptoKey to use for encryption of internal - // etcd backups. - string gkeops_etcd_backup_encryption_key = 17 - [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKeyVersion" - }]; -} - -// CompliancePostureConfig defines the settings needed to enable/disable -// features for the Compliance Posture. -message CompliancePostureConfig { - // Mode defines enablement mode for Compliance Posture. - enum Mode { - // Default value not specified. - MODE_UNSPECIFIED = 0; - - // Disables Compliance Posture features on the cluster. - DISABLED = 1; - - // Enables Compliance Posture features on the cluster. - ENABLED = 2; - } - - // Defines the details of a compliance standard. - message ComplianceStandard { - // Name of the compliance standard. - optional string standard = 1; - } - - // Defines the enablement mode for Compliance Posture. - optional Mode mode = 1; - - // List of enabled compliance standards. - repeated ComplianceStandard compliance_standards = 2; -} - -// K8sBetaAPIConfig , configuration for beta APIs -message K8sBetaAPIConfig { - // Enabled k8s beta APIs. - repeated string enabled_apis = 1; -} - -// SecurityPostureConfig defines the flags needed to enable/disable features for -// the Security Posture API. -message SecurityPostureConfig { - // Mode defines enablement mode for GKE Security posture features. - enum Mode { - // Default value not specified. - MODE_UNSPECIFIED = 0; - - // Disables Security Posture features on the cluster. - DISABLED = 1; - - // Applies Security Posture features on the cluster. - BASIC = 2; - - // Applies the Security Posture off cluster Enterprise level features. - ENTERPRISE = 3; - } - - // VulnerabilityMode defines enablement mode for vulnerability scanning. - enum VulnerabilityMode { - // Default value not specified. - VULNERABILITY_MODE_UNSPECIFIED = 0; - - // Disables vulnerability scanning on the cluster. - VULNERABILITY_DISABLED = 1; - - // Applies basic vulnerability scanning on the cluster. - VULNERABILITY_BASIC = 2; - - // Applies the Security Posture's vulnerability on cluster Enterprise level - // features. - VULNERABILITY_ENTERPRISE = 3; - } - - // Sets which mode to use for Security Posture features. - optional Mode mode = 1; - - // Sets which mode to use for vulnerability scanning. - optional VulnerabilityMode vulnerability_mode = 2; -} - -// Node pool configs that apply to all auto-provisioned node pools -// in autopilot clusters and node auto-provisioning enabled clusters. -message NodePoolAutoConfig { - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster creation. Each tag within the list - // must comply with RFC1035. - NetworkTags network_tags = 1; - - // Resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - ResourceManagerTags resource_manager_tags = 2; - - // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig node_kubelet_config = 3; - - // Output only. Configuration options for Linux nodes. - LinuxNodeConfig linux_node_config = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Subset of Nodepool message that has defaults. -message NodePoolDefaults { - // Subset of NodeConfig message that has defaults. - NodeConfigDefaults node_config_defaults = 1; -} - -// Subset of NodeConfig message that has defaults. -message NodeConfigDefaults { - // GCFS (Google Container File System, also known as Riptide) options. - GcfsConfig gcfs_config = 1; - - // Logging configuration for node pools. - NodePoolLoggingConfig logging_config = 3; - - // Parameters for containerd customization. - ContainerdConfig containerd_config = 4; - - // NodeKubeletConfig controls the defaults for new node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig node_kubelet_config = 6; -} - -// ClusterUpdate describes an update to the cluster. Exactly one update can -// be applied to a cluster with each request, so at most one field can be -// provided. -message ClusterUpdate { - // The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - string desired_node_version = 4; - - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string desired_monitoring_service = 5; - - // Configurations for the various addons available to run in the cluster. - AddonsConfig desired_addons_config = 6; - - // The node pool to be upgraded. This field is mandatory if - // "desired_node_version", "desired_image_family" or - // "desired_node_pool_autoscaling" is specified and there is more than one - // node pool on the cluster. - string desired_node_pool_id = 7; - - // The desired image type for the node pool. - // NOTE: Set the "desired_node_pool" field as well. - string desired_image_type = 8; - - // Configuration of etcd encryption. - DatabaseEncryption desired_database_encryption = 46; - - // Configuration for Workload Identity. - WorkloadIdentityConfig desired_workload_identity_config = 47; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - MeshCertificates desired_mesh_certificates = 67; - - // Configuration for Shielded Nodes. - ShieldedNodes desired_shielded_nodes = 48; - - // The desired configuration for the fine-grained cost management feature. - CostManagementConfig desired_cost_management_config = 49; - - // DNSConfig contains clusterDNS config for this cluster. - DNSConfig desired_dns_config = 53; - - // Autoscaler configuration for the node pool specified in - // desired_node_pool_id. If there is only one pool in the - // cluster and desired_node_pool_id is not provided then - // the change applies to that single node pool. - NodePoolAutoscaling desired_node_pool_autoscaling = 9; - - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. - // - // This list must always include the cluster's primary zone. - // - // Warning: changing cluster locations will update the locations of all node - // pools and will result in nodes being added and/or removed. - repeated string desired_locations = 10; - - // The desired configuration options for master authorized networks feature. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config - // instead. - MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12 - [deprecated = true]; - - // Cluster-level autoscaling configuration. - ClusterAutoscaling desired_cluster_autoscaling = 15; - - // The desired configuration options for the Binary Authorization feature. - BinaryAuthorization desired_binary_authorization = 16; - - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string desired_logging_service = 19; - - // The desired configuration for exporting resource usage. - ResourceUsageExportConfig desired_resource_usage_export_config = 21; - - // Cluster-level Vertical Pod Autoscaling configuration. - VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; - - // The desired private cluster configuration. master_global_access_config is - // the only field that can be changed via this field. - // See also - // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] - // for modifying other fields within - // [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.global_access - // instead. - PrivateClusterConfig desired_private_cluster_config = 25 [deprecated = true]; - - // The desired config of Intra-node visibility. - IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; - - // The desired status of whether to disable default sNAT for this cluster. - DefaultSnatStatus desired_default_snat_status = 28; - - // The desired release channel configuration. - ReleaseChannel desired_release_channel = 31; - - // The desired L4 Internal Load Balancer Subsetting configuration. - ILBSubsettingConfig desired_l4ilb_subsetting_config = 39; - - // The desired datapath provider for the cluster. - DatapathProvider desired_datapath_provider = 50; - - // The desired state of IPv6 connectivity to Google Services. - PrivateIPv6GoogleAccess desired_private_ipv6_google_access = 51; - - // The desired notification configuration. - NotificationConfig desired_notification_config = 55; - - // The desired authenticator groups config for the cluster. - AuthenticatorGroupsConfig desired_authenticator_groups_config = 63; - - // The desired logging configuration. - LoggingConfig desired_logging_config = 64; - - // The desired monitoring configuration. - MonitoringConfig desired_monitoring_config = 65; - - // The desired Identity Service component configuration. - IdentityServiceConfig desired_identity_service_config = 66; - - // ServiceExternalIPsConfig specifies the config for the use of Services with - // ExternalIPs field. - ServiceExternalIPsConfig desired_service_external_ips_config = 60; - - // Enable/Disable private endpoint for the cluster's master. - // - // Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint - // instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - optional bool desired_enable_private_endpoint = 71 [deprecated = true]; - - // Override the default setting of whether future created - // nodes have private IP addresses only, namely - // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] - optional bool desired_default_enable_private_nodes = 72; - - // [Control plane - // endpoints][google.container.v1.Cluster.control_plane_endpoints_config] - // configuration. - ControlPlaneEndpointsConfig desired_control_plane_endpoints_config = 73; - - // The Kubernetes version to change the master to. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - string desired_master_version = 100; - - // The desired GCFS config for the cluster - GcfsConfig desired_gcfs_config = 109; - - // The desired network tags that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NetworkTags desired_node_pool_auto_config_network_tags = 110; - - // The desired config of Gateway API on this cluster. - GatewayAPIConfig desired_gateway_api_config = 114; - - // The current etag of the cluster. - // If an etag is provided and does not match the current etag of the cluster, - // update will be blocked and an ABORTED error will be returned. - string etag = 115; - - // The desired node pool logging configuration defaults for the cluster. - NodePoolLoggingConfig desired_node_pool_logging_config = 116; - - // The desired fleet configuration for the cluster. - Fleet desired_fleet = 117; - - // The desired stack type of the cluster. - // If a stack type is provided and does not match the current stack type of - // the cluster, update will attempt to change the stack type to the new type. - StackType desired_stack_type = 119; - - // The additional pod ranges to be added to the cluster. These pod ranges - // can be used by node pools to allocate pod IPs. - AdditionalPodRangesConfig additional_pod_ranges_config = 120; - - // The additional pod ranges that are to be removed from the cluster. - // The pod ranges specified here must have been specified earlier in the - // 'additional_pod_ranges_config' argument. - AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121; - - // Kubernetes open source beta apis enabled on the cluster. Only beta apis - K8sBetaAPIConfig enable_k8s_beta_apis = 122; - - // Enable/Disable Security Posture API features for the cluster. - SecurityPostureConfig desired_security_posture_config = 124; - - // The desired network performance config. - NetworkConfig.ClusterNetworkPerformanceConfig - desired_network_performance_config = 125; - - // Enable/Disable FQDN Network Policy for the cluster. - optional bool desired_enable_fqdn_network_policy = 126; - - // The desired workload policy configuration for the autopilot cluster. - WorkloadPolicyConfig desired_autopilot_workload_policy_config = 128; - - // Desired Beta APIs to be enabled for cluster. - K8sBetaAPIConfig desired_k8s_beta_apis = 131; - - // The desired containerd config for the cluster. - ContainerdConfig desired_containerd_config = 134; - - // Enable/Disable Multi-Networking for the cluster - optional bool desired_enable_multi_networking = 135; - - // The desired resource manager tags that apply to all auto-provisioned node - // pools in autopilot clusters and node auto-provisioning enabled clusters. - ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; - - // Specify the details of in-transit encryption. - optional InTransitEncryptionConfig desired_in_transit_encryption_config = 137; - - // Enable/Disable Cilium Clusterwide Network Policy for the cluster. - optional bool desired_enable_cilium_clusterwide_network_policy = 138; - - // Enable/Disable Secret Manager Config. - optional SecretManagerConfig desired_secret_manager_config = 139; - - // Enable/Disable Compliance Posture features for the cluster. - optional CompliancePostureConfig desired_compliance_posture_config = 140; - - // The desired node kubelet config for the cluster. - NodeKubeletConfig desired_node_kubelet_config = 141; - - // The desired node kubelet config for all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; - - // The Custom keys configuration for the cluster. - UserManagedKeysConfig user_managed_keys_config = 143; - - // RBACBindingConfig allows user to restrict ClusterRoleBindings an - // RoleBindings that can be created. - optional RBACBindingConfig desired_rbac_binding_config = 144; - - // The desired enterprise configuration for the cluster. - DesiredEnterpriseConfig desired_enterprise_config = 147; - - // The desired Linux node config for all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - // - // Currently only `cgroup_mode` can be set here. - LinuxNodeConfig desired_node_pool_auto_config_linux_node_config = 150; -} - -// AdditionalPodRangesConfig is the configuration for additional pod secondary -// ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig { - // Name for pod secondary ipv4 range which has the actual range defined ahead. - repeated string pod_range_names = 1; - - // Output only. Information for additional pod range. - repeated RangeInfo pod_range_info = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// RangeInfo contains the range name and the range utilization by this cluster. -message RangeInfo { - // Output only. Name of a range. - string range_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The utilization of the range. - double utilization = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. -message DesiredEnterpriseConfig { - // desired_tier specifies the desired tier of the cluster. - EnterpriseConfig.ClusterTier desired_tier = 1; -} - -// This operation resource represents operations that may have happened or are -// happening on the cluster. All fields are output only. -message Operation { - // Current status of the operation. - enum Status { - // Not set. - STATUS_UNSPECIFIED = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is currently running. - RUNNING = 2; - - // The operation is done, either cancelled or completed. - DONE = 3; - - // The operation is aborting. - ABORTING = 4; - } - - // Operation type categorizes the operation. - enum Type { - // Not set. - TYPE_UNSPECIFIED = 0; - - // The cluster is being created. The cluster should be assumed to be - // unusable until the operation finishes. - // - // In the event of the operation failing, the cluster will enter the [ERROR - // state][Cluster.Status.ERROR] and eventually be deleted. - CREATE_CLUSTER = 1; - - // The cluster is being deleted. The cluster should be assumed to be - // unusable as soon as this operation starts. - // - // In the event of the operation failing, the cluster will enter the [ERROR - // state][Cluster.Status.ERROR] and the deletion will be automatically - // retried until completed. - DELETE_CLUSTER = 2; - - // The [cluster - // version][google.container.v1.ClusterUpdate.desired_master_version] is - // being updated. Note that this includes "upgrades" to the same version, - // which are simply a recreation. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). - // For more details, see [documentation on cluster - // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). - UPGRADE_MASTER = 3; - - // A node pool is being updated. Despite calling this an "upgrade", this - // includes most forms of updates to node pools. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). - // - // This operation sets the - // [progress][google.container.v1.Operation.progress] field and may be - // [canceled][google.container.v1.ClusterManager.CancelOperation]. - // - // The upgrade strategy depends on [node pool - // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). - // The nodes are generally still usable during this operation. - UPGRADE_NODES = 4; - - // A problem has been detected with the control plane and is being repaired. - // This operation type is initiated by GKE. For more details, see - // [documentation on - // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - REPAIR_CLUSTER = 5; - - // The cluster is being updated. This is a broad category of operations and - // includes operations that only change metadata as well as those that must - // recreate the entire cluster. If the control plane must be recreated, this - // will cause temporary downtime for zonal clusters. - // - // Some features require recreating the nodes as well. Those will be - // recreated as separate operations and the update may not be completely - // functional until the node pools recreations finish. Node recreations will - // generally follow [maintenance - // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). - // - // Some GKE-initiated operations use this type. This includes certain types - // of auto-upgrades and incident mitigations. - UPDATE_CLUSTER = 6; - - // A node pool is being created. The node pool should be assumed to be - // unusable until this operation finishes. In the event of an error, the - // node pool may be partially created. - // - // If enabled, [node - // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) - // may have automatically initiated such operations. - CREATE_NODE_POOL = 7; - - // The node pool is being deleted. The node pool should be assumed to be - // unusable as soon as this operation starts. - DELETE_NODE_POOL = 8; - - // The node pool's [manamagent][google.container.v1.NodePool.management] - // field is being updated. These operations only update metadata and may be - // concurrent with most other operations. - SET_NODE_POOL_MANAGEMENT = 9; - - // A problem has been detected with nodes and [they are being - // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). - // This operation type is initiated by GKE, typically automatically. This - // operation may be concurrent with other operations and there may be - // multiple repairs occurring on the same node pool. - AUTO_REPAIR_NODES = 10; - - // Unused. Automatic node upgrade uses - // [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES]. - AUTO_UPGRADE_NODES = 11 [deprecated = true]; - - // Unused. Updating labels uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - SET_LABELS = 12 [deprecated = true]; - - // Unused. Updating master auth uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - SET_MASTER_AUTH = 13 [deprecated = true]; - - // The node pool is being resized. With the exception of resizing to or from - // size zero, the node pool is generally usable during this operation. - SET_NODE_POOL_SIZE = 14; - - // Unused. Updating network policy uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - SET_NETWORK_POLICY = 15 [deprecated = true]; - - // Unused. Updating maintenance policy uses - // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. - SET_MAINTENANCE_POLICY = 16 [deprecated = true]; - - // The control plane is being resized. This operation type is initiated by - // GKE. These operations are often performed preemptively to ensure that the - // control plane has sufficient resources and is not typically an indication - // of issues. For more details, see - // [documentation on - // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - RESIZE_CLUSTER = 18; - - // Fleet features of GKE Enterprise are being upgraded. The cluster should - // be assumed to be blocked for other upgrades until the operation finishes. - FLEET_FEATURE_UPGRADE = 19; - } - - // Output only. The server-assigned ID for the operation. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation is taking place. This field is deprecated, use location instead. - string zone = 2 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The operation type. - Type operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current status of the operation. - Status status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detailed operation progress, if available. - string detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If an error has occurred, a textual description of the error. - // Deprecated. Use the field error instead. - string status_message = 5 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined URI for the operation. Example: - // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. - string self_link = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined URI for the target of the operation. The format - // of this is a URI to the resource being modified (such as a cluster, node - // pool, or node). For node pool repairs, there may be multiple nodes being - // repaired, but only one will be the target. - // - // Examples: - // - // - - // ## - // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` - // - // ## - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` - // - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` - string target_link = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - string location = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation started, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string start_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation completed, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string end_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Progress information for an operation. - OperationProgress progress = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Which conditions caused the current cluster state. - // Deprecated. Use field error instead. - repeated StatusCondition cluster_conditions = 13 [deprecated = true]; - - // Which conditions caused the current node pool state. - // Deprecated. Use field error instead. - repeated StatusCondition nodepool_conditions = 14 [deprecated = true]; - - // The error result of the operation in case of failure. - google.rpc.Status error = 15; -} - -// Information about operation (or operation stage) progress. -message OperationProgress { - // Progress metric is (string, int|float|string) pair. - message Metric { - // Required. Metric name, e.g., "nodes total", "percent done". - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Strictly one of the values is required. - oneof value { - // For metrics with integer value. - int64 int_value = 2; - - // For metrics with floating point value. - double double_value = 3; - - // For metrics with custom values (ratios, visual progress, etc.). - string string_value = 4; - } - } - - // A non-parameterized string describing an operation stage. - // Unset for single-stage operations. - string name = 1; - - // Status of an operation stage. - // Unset for single-stage operations. - Operation.Status status = 2; - - // Progress metric bundle, for example: - // metrics: [{name: "nodes done", int_value: 15}, - // {name: "nodes total", int_value: 32}] - // or - // metrics: [{name: "progress", double_value: 0.56}, - // {name: "progress scale", double_value: 1.0}] - repeated Metric metrics = 3; - - // Substages of an operation or a stage. - repeated OperationProgress stages = 4; -} - -// CreateClusterRequest creates a cluster. -message CreateClusterRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true]; - - // Required. A [cluster - // resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) - Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; - - // The parent (project and location) where the cluster will be created. - // Specified in the format `projects/*/locations/*`. - string parent = 5; -} - -// GetClusterRequest gets the settings of a cluster. -message GetClusterRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to retrieve. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// UpdateClusterRequest updates the settings of a cluster. -message UpdateClusterRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. A description of the update. - ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// UpdateNodePoolRequests update a node pool's image and/or version. -message UpdateNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // Required. The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - string node_version = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The desired image type for the node pool. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 6 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool) of the node pool to - // update. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 8; - - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // node pool's nodes should be located. Changing the locations for a node pool - // will result in nodes being either created or removed from the node pool, - // depending on whether locations are being added or removed. - repeated string locations = 13; - - // The desired workload metadata config for the node pool. - WorkloadMetadataConfig workload_metadata_config = 14; - - // Upgrade settings control disruption and speed of the upgrade. - NodePool.UpgradeSettings upgrade_settings = 15; - - // The desired network tags to be applied to all nodes in the node pool. - // If this field is not present, the tags will not be changed. Otherwise, - // the existing network tags will be *replaced* with the provided tags. - NetworkTags tags = 16; - - // The desired node taints to be applied to all nodes in the node pool. - // If this field is not present, the taints will not be changed. Otherwise, - // the existing node taints will be *replaced* with the provided taints. - NodeTaints taints = 17; - - // The desired node labels to be applied to all nodes in the node pool. - // If this field is not present, the labels will not be changed. Otherwise, - // the existing node labels will be *replaced* with the provided labels. - NodeLabels labels = 18; - - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig linux_node_config = 19; - - // Node kubelet configs. - NodeKubeletConfig kubelet_config = 20; - - // Node network config. - NodeNetworkConfig node_network_config = 21; - - // GCFS config. - GcfsConfig gcfs_config = 22; - - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 23; - - // Enable or disable gvnic on the node pool. - VirtualNIC gvnic = 29; - - // The current etag of the node pool. - // If an etag is provided and does not match the current etag of the node - // pool, update will be blocked and an ABORTED error will be returned. - string etag = 30; - - // Enable or disable NCCL fast socket for the node pool. - FastSocket fast_socket = 31; - - // Logging configuration. - NodePoolLoggingConfig logging_config = 32; - - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - ResourceLabels resource_labels = 33; - - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig windows_node_config = 34; - - // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - repeated AcceleratorConfig accelerators = 35; - - // Optional. The desired [Google Compute Engine machine - // type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - // node pool. Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified machine type. - string machine_type = 36 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk type. - string disk_type = 37 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The desired disk size for nodes in the node pool specified in GB. - // The smallest allowed disk size is 10GB. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk size. - int64 disk_size_gb = 38 [(google.api.field_behavior) = OPTIONAL]; - - // Desired resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - // Existing tags will be replaced with new values. - ResourceManagerTags resource_manager_tags = 39; - - // The desired containerd config for nodes in the node pool. - // Initiates an upgrade operation that recreates the nodes with the new - // config. - ContainerdConfig containerd_config = 40; - - // Specifies the configuration of queued provisioning. - NodePool.QueuedProvisioning queued_provisioning = 42; - - // List of Storage Pools where boot disks are provisioned. - // Existing Storage Pools will be replaced with storage-pools. - repeated string storage_pools = 43; -} - -// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. -message SetNodePoolAutoscalingRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // Required. Autoscaling configuration for the node pool. - NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool) of the node pool to set - // autoscaler settings. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// SetLoggingServiceRequest sets the logging service of a cluster. -message SetLoggingServiceRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set logging. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// SetMonitoringServiceRequest sets the monitoring service of a cluster. -message SetMonitoringServiceRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set monitoring. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetAddonsConfigRequest sets the addons associated with the cluster. -message SetAddonsConfigRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The desired configurations for the various addons available to - // run in the cluster. - AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set addons. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetLocationsRequest sets the locations of the cluster. -message SetLocationsRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. Changing the locations a cluster is in - // will result in nodes being either created or removed from the cluster, - // depending on whether locations are being added or removed. - // - // This list must always include the cluster's primary zone. - repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set locations. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// UpdateMasterRequest updates the master of the cluster. -message UpdateMasterRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The Kubernetes version to change the master to. - // - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - string master_version = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// SetMasterAuthRequest updates the admin password of a cluster. -message SetMasterAuthRequest { - // Operation type: what type update to perform. - enum Action { - // Operation is unknown and will error out. - UNKNOWN = 0; - - // Set the password to a user generated value. - SET_PASSWORD = 1; - - // Generate a new password and set it to that. - GENERATE_PASSWORD = 2; - - // Set the username. If an empty username is provided, basic authentication - // is disabled for the cluster. If a non-empty username is provided, basic - // authentication is enabled, with either a provided password or a generated - // one. - SET_USERNAME = 3; - } - - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The exact form of action to be taken on the master auth. - Action action = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. A description of the update. - MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set auth. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// DeleteClusterRequest deletes a cluster. -message DeleteClusterRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to delete. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // The name (project, location, cluster) of the cluster to delete. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 4; -} - -// ListClustersRequest lists clusters. -message ListClustersRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides, or "-" for all zones. This field has been deprecated and - // replaced by the parent field. - string zone = 2 [deprecated = true]; - - // The parent (project and location) where the clusters will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - string parent = 4; -} - -// ListClustersResponse is the result of ListClustersRequest. -message ListClustersResponse { - // A list of clusters in the project in the specified zone, or - // across all ones. - repeated Cluster clusters = 1; - - // If any zones are listed here, the list of clusters returned - // may be missing those zones. - repeated string missing_zones = 2; -} - -// GetOperationRequest gets a single operation. -message GetOperationRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - string operation_id = 3 [deprecated = true]; - - // The name (project, location, operation id) of the operation to get. - // Specified in the format `projects/*/locations/*/operations/*`. - string name = 5; -} - -// ListOperationsRequest lists operations. -message ListOperationsRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for, or `-` for all zones. This field has been deprecated and - // replaced by the parent field. - string zone = 2 [deprecated = true]; - - // The parent (project and location) where the operations will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - string parent = 4; -} - -// CancelOperationRequest cancels a single operation. -message CancelOperationRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - string operation_id = 3 [deprecated = true]; - - // The name (project, location, operation id) of the operation to cancel. - // Specified in the format `projects/*/locations/*/operations/*`. - string name = 4; -} - -// ListOperationsResponse is the result of ListOperationsRequest. -message ListOperationsResponse { - // A list of operations in the project in the specified zone. - repeated Operation operations = 1; - - // If any zones are listed here, the list of operations returned - // may be missing the operations from those zones. - repeated string missing_zones = 2; -} - -// Gets the current Kubernetes Engine service configuration. -message GetServerConfigRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // The name (project and location) of the server config to get, - // specified in the format `projects/*/locations/*`. - string name = 4; -} - -// Kubernetes Engine service configuration. -message ServerConfig { - // ReleaseChannelConfig exposes configuration for a release channel. - message ReleaseChannelConfig { - // The release channel this configuration applies to. - ReleaseChannel.Channel channel = 1; - - // The default version for newly created clusters on the channel. - string default_version = 2; - - // List of valid versions for the channel. - repeated string valid_versions = 4; - - // The auto upgrade target version for clusters on the channel. - string upgrade_target_version = 5; - } - - // Version of Kubernetes the service deploys by default. - string default_cluster_version = 1; - - // List of valid node upgrade target versions, in descending order. - repeated string valid_node_versions = 3; - - // Default image type. - string default_image_type = 4; - - // List of valid image types. - repeated string valid_image_types = 5; - - // List of valid master versions, in descending order. - repeated string valid_master_versions = 6; - - // List of release channel configurations. - repeated ReleaseChannelConfig channels = 9; -} - -// CreateNodePoolRequest creates a node pool for a cluster. -message CreateNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 [deprecated = true]; - - // Required. The node pool to create. - NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; - - // The parent (project, location, cluster name) where the node pool will be - // created. Specified in the format - // `projects/*/locations/*/clusters/*`. - string parent = 6; -} - -// DeleteNodePoolRequest deletes a node pool for a cluster. -message DeleteNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to delete. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // The name (project, location, cluster, node pool id) of the node pool to - // delete. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// ListNodePoolsRequest lists the node pool(s) for a cluster. -message ListNodePoolsRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 [deprecated = true]; - - // The parent (project, location, cluster name) where the node pools will be - // listed. Specified in the format `projects/*/locations/*/clusters/*`. - string parent = 5; -} - -// GetNodePoolRequest retrieves a node pool for a cluster. -message GetNodePoolRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // The name (project, location, cluster, node pool id) of the node pool to - // get. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// Settings for blue-green upgrade. -message BlueGreenSettings { - // Standard rollout policy is the default policy for blue-green. - message StandardRolloutPolicy { - // Blue pool size to drain in a batch. - oneof update_batch_size { - // Percentage of the blue pool nodes to drain in a batch. - // The range of this field should be (0.0, 1.0]. - float batch_percentage = 1; - - // Number of blue nodes to drain in a batch. - int32 batch_node_count = 2; - } - - // Soak time after each batch gets drained. Default to zero. - optional google.protobuf.Duration batch_soak_duration = 3; - } - - // The rollout policy controls the general rollout progress of blue-green. - oneof rollout_policy { - // Standard policy for the blue-green upgrade. - StandardRolloutPolicy standard_rollout_policy = 1; - } - - // Time needed after draining entire blue pool. After this period, blue pool - // will be cleaned up. - optional google.protobuf.Duration node_pool_soak_duration = 2; -} - -// NodePool contains the name and configuration for a cluster's node pool. -// Node pools are a set of nodes (i.e. VM's), with a common configuration and -// specification, under the control of the cluster master. They may have a set -// of Kubernetes labels applied to them, which may be used to reference them -// during pod scheduling. They may also be resized up or down, to accommodate -// the workload. -message NodePool { - // These upgrade settings control the level of parallelism and the level of - // disruption caused by an upgrade. - // - // maxUnavailable controls the number of nodes that can be simultaneously - // unavailable. - // - // maxSurge controls the number of additional nodes that can be added to the - // node pool temporarily for the time of the upgrade to increase the number of - // available nodes. - // - // (maxUnavailable + maxSurge) determines the level of parallelism (how many - // nodes are being upgraded at the same time). - // - // Note: upgrades inevitably introduce some disruption since workloads need to - // be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, - // this holds true. (Disruption stays within the limits of - // PodDisruptionBudget, if it is configured.) - // - // Consider a hypothetical node pool with 5 nodes having maxSurge=2, - // maxUnavailable=1. This means the upgrade process upgrades 3 nodes - // simultaneously. It creates 2 additional (upgraded) nodes, then it brings - // down 3 old (not yet upgraded) nodes at the same time. This ensures that - // there are always at least 4 nodes available. - // - // These upgrade settings configure the upgrade strategy for the node pool. - // Use strategy to switch between the strategies applied to the node pool. - // - // If the strategy is ROLLING, use max_surge and max_unavailable to control - // the level of parallelism and the level of disruption caused by upgrade. - // 1. maxSurge controls the number of additional nodes that can be added to - // the node pool temporarily for the time of the upgrade to increase the - // number of available nodes. - // 2. maxUnavailable controls the number of nodes that can be simultaneously - // unavailable. - // 3. (maxUnavailable + maxSurge) determines the level of parallelism (how - // many nodes are being upgraded at the same time). - // - // If the strategy is BLUE_GREEN, use blue_green_settings to configure the - // blue-green upgrade related settings. - // 1. standard_rollout_policy is the default policy. The policy is used to - // control the way blue pool gets drained. The draining is executed in the - // batch mode. The batch size could be specified as either percentage of the - // node pool size or the number of nodes. batch_soak_duration is the soak - // time after each batch gets drained. - // 2. node_pool_soak_duration is the soak time after all blue nodes are - // drained. After this period, the blue pool nodes will be deleted. - message UpgradeSettings { - // The maximum number of nodes that can be created beyond the current size - // of the node pool during the upgrade process. - int32 max_surge = 1; - - // The maximum number of nodes that can be simultaneously unavailable during - // the upgrade process. A node is considered available if its status is - // Ready. - int32 max_unavailable = 2; - - // Update strategy of the node pool. - optional NodePoolUpdateStrategy strategy = 3; - - // Settings for blue-green upgrade strategy. - optional BlueGreenSettings blue_green_settings = 4; - } - - // UpdateInfo contains resource (instance groups, etc), status and other - // intermediate information relevant to a node pool upgrade. - message UpdateInfo { - // Information relevant to blue-green upgrade. - message BlueGreenInfo { - // Phase represents the different stages blue-green upgrade is running in. - enum Phase { - // Unspecified phase. - PHASE_UNSPECIFIED = 0; - - // blue-green upgrade has been initiated. - UPDATE_STARTED = 1; - - // Start creating green pool nodes. - CREATING_GREEN_POOL = 2; - - // Start cordoning blue pool nodes. - CORDONING_BLUE_POOL = 3; - - // Start draining blue pool nodes. - DRAINING_BLUE_POOL = 4; - - // Start soaking time after draining entire blue pool. - NODE_POOL_SOAKING = 5; - - // Start deleting blue nodes. - DELETING_BLUE_POOL = 6; - - // Rollback has been initiated. - ROLLBACK_STARTED = 7; - } - - // Current blue-green upgrade phase. - Phase phase = 1; - - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with blue pool. - repeated string blue_instance_group_urls = 2; - - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with green pool. - repeated string green_instance_group_urls = 3; - - // Time to start deleting blue pool to complete blue-green upgrade, - // in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string blue_pool_deletion_start_time = 4; - - // Version of green pool. - string green_pool_version = 5; - } - - // Information of a blue-green upgrade. - BlueGreenInfo blue_green_info = 1; - } - - // The current status of the node pool instance. - enum Status { - // Not set. - STATUS_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 RUNNING_WITH_ERROR state indicates the node pool has been created - // and is partially usable. Some error state has occurred and some - // functionality may be impaired. Customer may need to reissue a request - // or trigger a new update. - RUNNING_WITH_ERROR = 3; - - // The RECONCILING state indicates that some work is actively being done on - // the node pool, such as upgrading node software. Details can - // be found in the `statusMessage` field. - RECONCILING = 4; - - // The STOPPING state indicates the node pool is being deleted. - STOPPING = 5; - - // The ERROR state indicates the node pool may be unusable. Details - // can be found in the `statusMessage` field. - ERROR = 6; - } - - // PlacementPolicy defines the placement policy used by the node pool. - message PlacementPolicy { - // Type defines the type of placement policy. - enum Type { - // TYPE_UNSPECIFIED specifies no requirements on nodes - // placement. - TYPE_UNSPECIFIED = 0; - - // COMPACT specifies node placement in the same availability domain to - // ensure low communication latency. - COMPACT = 1; - } - - // The type of placement. - Type type = 1; - - // Optional. TPU placement topology for pod slice node pool. - // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies - string tpu_topology = 2 [(google.api.field_behavior) = OPTIONAL]; - - // If set, refers to the name of a custom resource policy supplied by the - // user. The resource policy must be in the same project and region as the - // node pool. If not found, InvalidArgument error is returned. - string policy_name = 3; - } - - // QueuedProvisioning defines the queued provisioning used by the node pool. - message QueuedProvisioning { - // Denotes that this nodepool is QRM specific, meaning nodes can be only - // obtained through queuing via the Cluster Autoscaler ProvisioningRequest - // API. - bool enabled = 1; - } - - // The name of the node pool. - string name = 1; - - // The node configuration of the pool. - NodeConfig config = 2; - - // The initial node count for the pool. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - int32 initial_node_count = 3; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes should be located. - // - // If this value is unspecified during node pool creation, the - // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) - // value will be used, instead. - // - // Warning: changing node pool locations will result in nodes being added - // and/or removed. - repeated string locations = 13; - - // Networking configuration for this NodePool. If specified, it overrides the - // cluster-level defaults. - NodeNetworkConfig network_config = 14; - - // Output only. Server-defined URL for the resource. - string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The version of Kubernetes running on this NodePool's nodes. If unspecified, - // it defaults as described - // [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). - string version = 101; - - // Output only. The resource URLs of the [managed instance - // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with this node pool. - // During the node pool blue-green upgrade operation, the URLs contain both - // blue and green resources. - repeated string instance_group_urls = 102 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The status of the nodes in this pool instance. - Status status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // node pool instance, if available. - string status_message = 104 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Autoscaler configuration for this NodePool. Autoscaler is enabled - // only if a valid configuration is present. - NodePoolAutoscaling autoscaling = 4; - - // NodeManagement configuration for this NodePool. - NodeManagement management = 5; - - // The constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 6; - - // Which conditions caused the current node pool state. - repeated StatusCondition conditions = 105; - - // Output only. The pod CIDR block size per node in this node pool. - int32 pod_ipv4_cidr_size = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Upgrade settings control disruption and speed of the upgrade. - UpgradeSettings upgrade_settings = 107; - - // Specifies the node placement policy. - PlacementPolicy placement_policy = 108; - - // Output only. Update info contains relevant information during a node - // pool update. - UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of node pool - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - string etag = 110; - - // Specifies the configuration of queued provisioning. - QueuedProvisioning queued_provisioning = 112; - - // Enable best effort provisioning for nodes - BestEffortProvisioning best_effort_provisioning = 113; -} - -// NodeManagement defines the set of node management services turned on for the -// node pool. -message NodeManagement { - // A flag that specifies whether node auto-upgrade is enabled for the node - // pool. If enabled, node auto-upgrade helps keep the nodes in your node pool - // up to date with the latest release version of Kubernetes. - bool auto_upgrade = 1; - - // A flag that specifies whether the node auto-repair is enabled for the node - // pool. If enabled, the nodes in this node pool will be monitored and, if - // they fail health checks too many times, an automatic repair action will be - // triggered. - bool auto_repair = 2; - - // Specifies the Auto Upgrade knobs for the node pool. - AutoUpgradeOptions upgrade_options = 10; -} - -// Best effort provisioning. -message BestEffortProvisioning { - // When this is enabled, cluster/node pool creations will ignore non-fatal - // errors like stockout to best provision as many nodes as possible right now - // and eventually bring up all target number of nodes - bool enabled = 1; - - // Minimum number of nodes to be provisioned to be considered as succeeded, - // and the rest of nodes will be provisioned gradually and eventually when - // stockout issue has been resolved. - int32 min_provision_nodes = 2; -} - -// AutoUpgradeOptions defines the set of options for the user to control how -// the Auto Upgrades will proceed. -message AutoUpgradeOptions { - // Output only. This field is set when upgrades are about to commence - // with the approximate start time for the upgrades, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string auto_upgrade_start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. This field is set when upgrades are about to commence - // with the description of the upgrade. - string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// MaintenancePolicy defines the maintenance policy to be used for the cluster. -message MaintenancePolicy { - // Specifies the maintenance window in which maintenance may be performed. - MaintenanceWindow window = 1; - - // A hash identifying the version of this policy, so that updates to fields of - // the policy won't accidentally undo intermediate changes (and so that users - // of the API unaware of some fields won't accidentally remove other fields). - // Make a `get()` request to the cluster to get the current - // resource version and include it with requests to set the policy. - string resource_version = 3; -} - -// MaintenanceWindow defines the maintenance window to be used for the cluster. -message MaintenanceWindow { - oneof policy { - // DailyMaintenanceWindow specifies a daily maintenance operation window. - DailyMaintenanceWindow daily_maintenance_window = 2; - - // RecurringWindow specifies some number of recurring time periods for - // maintenance to occur. The time windows may be overlapping. If no - // maintenance windows are set, maintenance can occur at any time. - RecurringTimeWindow recurring_window = 3; - } - - // Exceptions to maintenance window. Non-emergency maintenance should not - // occur in these windows. - map maintenance_exclusions = 4; -} - -// Represents an arbitrary window of time. -message TimeWindow { - oneof options { - // MaintenanceExclusionOptions provides maintenance exclusion related - // options. - MaintenanceExclusionOptions maintenance_exclusion_options = 3; - } - - // The time that the window first starts. - google.protobuf.Timestamp start_time = 1; - - // The time that the window ends. The end time should take place after the - // start time. - google.protobuf.Timestamp end_time = 2; -} - -// Represents the Maintenance exclusion option. -message MaintenanceExclusionOptions { - // Scope of exclusion. - enum Scope { - // NO_UPGRADES excludes all upgrades, including patch upgrades and minor - // upgrades across control planes and nodes. This is the default exclusion - // behavior. - NO_UPGRADES = 0; - - // NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only - // patches are allowed. - NO_MINOR_UPGRADES = 1; - - // NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, - // and also exclude all node pool upgrades. Only control - // plane patches are allowed. - NO_MINOR_OR_NODE_UPGRADES = 2; - } - - // Scope specifies the upgrade scope which upgrades are blocked by the - // exclusion. - Scope scope = 1; -} - -// Represents an arbitrary window of time that recurs. -message RecurringTimeWindow { - // The window of the first recurrence. - TimeWindow window = 1; - - // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how - // this window reccurs. They go on for the span of time between the start and - // end time. - // - // For example, to have something repeat every weekday, you'd use: - // `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` - // - // To repeat some window daily (equivalent to the DailyMaintenanceWindow): - // `FREQ=DAILY` - // - // For the first weekend of every month: - // `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` - // - // This specifies how frequently the window starts. Eg, if you wanted to have - // a 9-5 UTC-4 window every weekday, you'd use something like: - // ``` - // start time = 2019-01-01T09:00:00-0400 - // end time = 2019-01-01T17:00:00-0400 - // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR - // ``` - // - // Windows can span multiple days. Eg, to make the window encompass every - // weekend from midnight Saturday till the last minute of Sunday UTC: - // ``` - // start time = 2019-01-05T00:00:00Z - // end time = 2019-01-07T23:59:00Z - // recurrence = FREQ=WEEKLY;BYDAY=SA - // ``` - // - // Note the start and end time's specific dates are largely arbitrary except - // to specify duration of the window and when it first starts. - // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. - string recurrence = 2; -} - -// Time window specified for daily maintenance operations. -message DailyMaintenanceWindow { - // Time within the maintenance window to start the maintenance operations. - // Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) - // format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. - string start_time = 2; - - // Output only. Duration of the time window, automatically chosen to be - // smallest possible in the given scenario. - // Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) - // format "PTnHnMnS". - string duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// SetNodePoolManagementRequest sets the node management properties of a node -// pool. -message SetNodePoolManagementRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // Required. NodeManagement configuration for the node pool. - NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to set - // management properties. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 7; -} - -// SetNodePoolSizeRequest sets the size of a node pool. -message SetNodePoolSizeRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // Required. The desired node count for the pool. - int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to set - // size. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 7; -} - -// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete -// upgrade. -message CompleteNodePoolUpgradeRequest { - // The name (project, location, cluster, node pool id) of the node pool to - // complete upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 1; -} - -// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed -// NodePool upgrade. This will be an no-op if the last upgrade successfully -// completed. -message RollbackNodePoolUpgradeRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to rollback. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Deprecated. The name of the node pool to rollback. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 [deprecated = true]; - - // The name (project, location, cluster, node pool id) of the node poll to - // rollback upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; - - // Option for rollback to ignore the PodDisruptionBudget. - // Default value is false. - bool respect_pdb = 7; -} - -// ListNodePoolsResponse is the result of ListNodePoolsRequest. -message ListNodePoolsResponse { - // A list of node pools for a cluster. - repeated NodePool node_pools = 1; -} - -// ClusterAutoscaling contains global, per-cluster information -// required by Cluster Autoscaler to automatically adjust -// the size of the cluster and create/delete -// node pools based on the current needs. -message ClusterAutoscaling { - // Defines possible options for autoscaling_profile field. - enum AutoscalingProfile { - // No change to autoscaling configuration. - PROFILE_UNSPECIFIED = 0; - - // Prioritize optimizing utilization of resources. - OPTIMIZE_UTILIZATION = 1; - - // Use default (balanced) autoscaling configuration. - BALANCED = 2; - } - - // Enables automatic node pool creation and deletion. - bool enable_node_autoprovisioning = 1; - - // Contains global constraints regarding minimum and maximum - // amount of resources in the cluster. - repeated ResourceLimit resource_limits = 2; - - // Defines autoscaling behaviour. - AutoscalingProfile autoscaling_profile = 3; - - // AutoprovisioningNodePoolDefaults contains defaults for a node pool - // created by NAP. - AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes can be created by NAP. - repeated string autoprovisioning_locations = 5; -} - -// AutoprovisioningNodePoolDefaults contains defaults for a node pool created -// by NAP. -message AutoprovisioningNodePoolDefaults { - // Scopes that are used by NAP when creating node pools. - repeated string oauth_scopes = 1; - - // The Google Cloud Platform Service Account to be used by the node VMs. - string service_account = 2; - - // Specifies the upgrade settings for NAP created node pools - NodePool.UpgradeSettings upgrade_settings = 3; - - // Specifies the node management options for NAP created node-pools. - NodeManagement management = 4; - - // Deprecated. Minimum CPU platform to be used for NAP created node pools. - // The instance may be scheduled on the specified or newer CPU platform. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: Intel Haswell or - // minCpuPlatform: Intel Sandy Bridge. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). - // This field is deprecated, min_cpu_platform should be specified using - // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. - // To unset the min cpu platform field pass "automatic" - // as field value. - string min_cpu_platform = 5 [deprecated = true]; - - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - int32 disk_size_gb = 6; - - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - string disk_type = 7; - - // Shielded Instance options. - ShieldedInstanceConfig shielded_instance_config = 8; - - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - string boot_disk_kms_key = 9; - - // The image type to use for NAP created node. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 10; - - // Enable or disable Kubelet read only port. - optional bool insecure_kubelet_readonly_port_enabled = 13; -} - -// Contains information about amount of some resource in the cluster. -// For memory, value should be in GB. -message ResourceLimit { - // Resource name "cpu", "memory" or gpu-specific string. - string resource_type = 1; - - // Minimum amount of the resource in the cluster. - int64 minimum = 2; - - // Maximum amount of the resource in the cluster. - int64 maximum = 3; -} - -// NodePoolAutoscaling contains information required by cluster autoscaler to -// adjust the size of the node pool to the current cluster usage. -message NodePoolAutoscaling { - // Location policy specifies how zones are picked when scaling up the - // nodepool. - enum LocationPolicy { - // Not set. - LOCATION_POLICY_UNSPECIFIED = 0; - - // BALANCED is a best effort policy that aims to balance the sizes of - // different zones. - BALANCED = 1; - - // ANY policy picks zones that have the highest capacity available. - ANY = 2; - } - - // Is autoscaling enabled for this node pool. - bool enabled = 1; - - // Minimum number of nodes for one location in the node pool. Must be greater - // than or equal to 0 and less than or equal to max_node_count. - int32 min_node_count = 2; - - // Maximum number of nodes for one location in the node pool. Must be >= - // min_node_count. There has to be enough quota to scale up the cluster. - int32 max_node_count = 3; - - // Can this node pool be deleted automatically. - bool autoprovisioned = 4; - - // Location policy used when scaling up a nodepool. - LocationPolicy location_policy = 5; - - // Minimum number of nodes in the node pool. Must be greater than or equal - // to 0 and less than or equal to total_max_node_count. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - int32 total_min_node_count = 6; - - // Maximum number of nodes in the node pool. Must be greater than or equal to - // total_min_node_count. There has to be enough quota to scale up the cluster. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - int32 total_max_node_count = 7; -} - -// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container -// Engine cluster, which will in turn set them for Google Compute Engine -// resources used by that cluster -message SetLabelsRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. The labels to set for that cluster. - map resource_labels = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The fingerprint of the previous set of labels for this resource, - // used to detect conflicts. The fingerprint is initially generated by - // Kubernetes Engine and changes after every request to modify or update - // labels. You must always provide an up-to-date fingerprint hash when - // updating or changing labels. Make a `get()` request to the - // resource to get the latest fingerprint. - string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set labels. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for -// a cluster. -message SetLegacyAbacRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. Whether ABAC authorization will be enabled in the cluster. - bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set legacy - // abac. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// StartIPRotationRequest creates a new IP for the cluster and then performs -// a node upgrade on each node pool to point to the new IP. -message StartIPRotationRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // The name (project, location, cluster name) of the cluster to start IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; - - // Whether to rotate credentials during IP rotation. - bool rotate_credentials = 7; -} - -// CompleteIPRotationRequest moves the cluster master back into single-IP mode. -message CompleteIPRotationRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // The name (project, location, cluster name) of the cluster to complete IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// AcceleratorConfig represents a Hardware Accelerator request. -message AcceleratorConfig { - // The number of the accelerator cards exposed to an instance. - int64 accelerator_count = 1; - - // The accelerator type resource name. List of supported accelerators - // [here](https://cloud.google.com/compute/docs/gpus) - string accelerator_type = 2; - - // Size of partitions to create on the GPU. Valid values are described in the - // NVIDIA [mig user - // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - string gpu_partition_size = 3; - - // The configuration for GPU sharing options. - optional GPUSharingConfig gpu_sharing_config = 5; - - // The configuration for auto installation of GPU driver. - optional GPUDriverInstallationConfig gpu_driver_installation_config = 6; -} - -// GPUSharingConfig represents the GPU sharing configuration for Hardware -// Accelerators. -message GPUSharingConfig { - // The type of GPU sharing strategy currently provided. - enum GPUSharingStrategy { - // Default value. - GPU_SHARING_STRATEGY_UNSPECIFIED = 0; - - // GPUs are time-shared between containers. - TIME_SHARING = 1; - - // GPUs are shared between containers with NVIDIA MPS. - MPS = 2; - } - - // The max number of containers that can share a physical GPU. - int64 max_shared_clients_per_gpu = 1; - - // The type of GPU sharing strategy to enable on the GPU node. - optional GPUSharingStrategy gpu_sharing_strategy = 2; -} - -// GPUDriverInstallationConfig specifies the version of GPU driver to be auto -// installed. -message GPUDriverInstallationConfig { - // The GPU driver version to install. - enum GPUDriverVersion { - // Default value is to not install any GPU driver. - GPU_DRIVER_VERSION_UNSPECIFIED = 0; - - // Disable GPU driver auto installation and needs manual installation - INSTALLATION_DISABLED = 1; - - // "Default" GPU driver in COS and Ubuntu. - DEFAULT = 2; - - // "Latest" GPU driver in COS. - LATEST = 3; - } - - // Mode for how the GPU driver is installed. - optional GPUDriverVersion gpu_driver_version = 1; -} - -// WorkloadMetadataConfig defines the metadata configuration to expose to -// workloads on the node pool. -message WorkloadMetadataConfig { - // Mode is the configuration for how to expose metadata to workloads running - // on the node. - enum Mode { - // Not set. - MODE_UNSPECIFIED = 0; - - // Expose all Compute Engine metadata to pods. - GCE_METADATA = 1; - - // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes - // a metadata API to workloads that is compatible with the V1 Compute - // Metadata APIs exposed by the Compute Engine and App Engine Metadata - // Servers. This feature can only be enabled if Workload Identity is enabled - // at the cluster level. - GKE_METADATA = 2; - } - - // Mode is the configuration for how to expose metadata to workloads running - // on the node pool. - Mode mode = 2; -} - -// SetNetworkPolicyRequest enables/disables network policy for a cluster. -message SetNetworkPolicyRequest { - // Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 [deprecated = true]; - - // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true]; - - // Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 [deprecated = true]; - - // Required. Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set networking - // policy. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. -message SetMaintenancePolicyRequest { - // Required. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. - string zone = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the cluster to update. - string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The maintenance policy to be set for the cluster. An empty field - // clears the existing maintenance policy. - MaintenancePolicy maintenance_policy = 4 - [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set - // maintenance policy. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// StatusCondition describes why a cluster or a node pool has a certain status -// (e.g., ERROR or DEGRADED). -message StatusCondition { - // Code for each condition - enum Code { - // UNKNOWN indicates a generic condition. - UNKNOWN = 0; - - // GCE_STOCKOUT indicates that Google Compute Engine resources are - // temporarily unavailable. - GCE_STOCKOUT = 1; - - // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot - // service account. - GKE_SERVICE_ACCOUNT_DELETED = 2; - - // Google Compute Engine quota was exceeded. - GCE_QUOTA_EXCEEDED = 3; - - // Cluster state was manually changed by an SRE due to a system logic error. - SET_BY_OPERATOR = 4; - - // Unable to perform an encrypt operation against the CloudKMS key used for - // etcd level encryption. - CLOUD_KMS_KEY_ERROR = 7; - - // Cluster CA is expiring soon. - CA_EXPIRING = 9; - } - - // Machine-friendly representation of the condition - // Deprecated. Use canonical_code instead. - Code code = 1 [deprecated = true]; - - // Human-friendly representation of the condition - string message = 2; - - // Canonical code of the condition. - google.rpc.Code canonical_code = 3; -} - -// NetworkConfig reports the relative names of network & subnetwork. -message NetworkConfig { - // Configuration of network bandwidth tiers - message ClusterNetworkPerformanceConfig { - // Node network tier - enum Tier { - // Default value - TIER_UNSPECIFIED = 0; - - // Higher bandwidth, actual values based on VM size. - TIER_1 = 1; - } - - // Specifies the total network bandwidth tier for NodePools in the cluster. - optional Tier total_egress_bandwidth_tier = 1; - } - - // Output only. The relative name of the Google Compute Engine - // [network][google.container.v1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. Example: - // projects/my-project/global/networks/my-network - string network = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The relative name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the - // cluster is connected. Example: - // projects/my-project/regions/us-central1/subnetworks/my-subnet - string subnetwork = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether Intra-node visibility is enabled for this cluster. - // This makes same node pod to pod traffic visible for VPC network. - bool enable_intra_node_visibility = 5; - - // Whether the cluster disables default in-node sNAT rules. In-node sNAT rules - // will be disabled when default_snat_status is disabled. When disabled is set - // to false, default IP masquerade rules will be applied to the nodes to - // prevent sNAT on cluster internal traffic. - DefaultSnatStatus default_snat_status = 7; - - // Whether L4ILB Subsetting is enabled for this cluster. - bool enable_l4ilb_subsetting = 10; - - // The desired datapath provider for this cluster. By default, uses the - // IPTables-based kube-proxy implementation. - DatapathProvider datapath_provider = 11; - - // The desired state of IPv6 connectivity to Google Services. - // By default, no private IPv6 access to or from Google Services (all access - // will be via IPv4) - PrivateIPv6GoogleAccess private_ipv6_google_access = 12; - - // DNSConfig contains clusterDNS config for this cluster. - DNSConfig dns_config = 13; - - // ServiceExternalIPsConfig specifies if services with externalIPs field are - // blocked or not. - ServiceExternalIPsConfig service_external_ips_config = 15; - - // GatewayAPIConfig contains the desired config of Gateway API on this - // cluster. - GatewayAPIConfig gateway_api_config = 16; - - // Whether multi-networking is enabled for this cluster. - bool enable_multi_networking = 17; - - // Network bandwidth tier configuration. - ClusterNetworkPerformanceConfig network_performance_config = 18; - - // Whether FQDN Network Policy is enabled on this cluster. - optional bool enable_fqdn_network_policy = 19; - - // Specify the details of in-transit encryption. - // Now named inter-node transparent encryption. - optional InTransitEncryptionConfig in_transit_encryption_config = 20; - - // Whether CiliumClusterwideNetworkPolicy is enabled on this cluster. - optional bool enable_cilium_clusterwide_network_policy = 21; - - // Controls whether by default nodes have private IP addresses only. - // It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][] - // and this field at the same time. - // To update the default setting, use - // [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes] - optional bool default_enable_private_nodes = 22; -} - -// GatewayAPIConfig contains the desired config of Gateway API on this cluster. -message GatewayAPIConfig { - // Channel describes if/how Gateway API should be installed and implemented in - // a cluster. - enum Channel { - // Default value. - CHANNEL_UNSPECIFIED = 0; - - // Gateway API support is disabled - CHANNEL_DISABLED = 1; - - // Deprecated: use CHANNEL_STANDARD instead. - // Gateway API support is enabled, experimental CRDs are installed - CHANNEL_EXPERIMENTAL = 3 [deprecated = true]; - - // Gateway API support is enabled, standard CRDs are installed - CHANNEL_STANDARD = 4; - } - - // The Gateway API release channel to use for Gateway API. - Channel channel = 1; -} - -// Config to block services with externalIPs field. -message ServiceExternalIPsConfig { - // Whether Services with ExternalIPs field are allowed or not. - bool enabled = 1; -} - -// GetOpenIDConfigRequest gets the OIDC discovery document for the -// cluster. See the OpenID Connect Discovery 1.0 specification for details. -message GetOpenIDConfigRequest { - // The cluster (project, location, cluster name) to get the discovery document - // for. Specified in the format `projects/*/locations/*/clusters/*`. - string parent = 1; -} - -// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. -// See the OpenID Connect Discovery 1.0 specification for details. -message GetOpenIDConfigResponse { - // OIDC Issuer. - string issuer = 1; - - // JSON Web Key uri. - string jwks_uri = 2; - - // Supported response types. - repeated string response_types_supported = 3; - - // Supported subject types. - repeated string subject_types_supported = 4; - - // supported ID Token signing Algorithms. - repeated string id_token_signing_alg_values_supported = 5; - - // Supported claims. - repeated string claims_supported = 6; - - // Supported grant types. - repeated string grant_types = 7; -} - -// GetJSONWebKeysRequest gets the public component of the keys used by the -// cluster to sign token requests. This will be the jwks_uri for the discover -// document returned by getOpenIDConfig. See the OpenID Connect -// Discovery 1.0 specification for details. -message GetJSONWebKeysRequest { - // The cluster (project, location, cluster name) to get keys for. Specified in - // the format `projects/*/locations/*/clusters/*`. - string parent = 1; -} - -// Jwk is a JSON Web Key as specified in RFC 7517 -message Jwk { - // Key Type. - string kty = 1; - - // Algorithm. - string alg = 2; - - // Permitted uses for the public keys. - string use = 3; - - // Key ID. - string kid = 4; - - // Used for RSA keys. - string n = 5; - - // Used for RSA keys. - string e = 6; - - // Used for ECDSA keys. - string x = 7; - - // Used for ECDSA keys. - string y = 8; - - // Used for ECDSA keys. - string crv = 9; -} - -// GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 -message GetJSONWebKeysResponse { - // The public component of the keys used by the cluster to sign token - // requests. - repeated Jwk keys = 1; -} - -// CheckAutopilotCompatibilityRequest requests getting the blockers for the -// given operation in the cluster. -message CheckAutopilotCompatibilityRequest { - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 1; -} - -// AutopilotCompatibilityIssue contains information about a specific -// compatibility issue with Autopilot mode. -message AutopilotCompatibilityIssue { - // The type of the reported issue. - enum IssueType { - // Default value, should not be used. - UNSPECIFIED = 0; - - // Indicates that the issue is a known incompatibility between the - // cluster and Autopilot mode. - INCOMPATIBILITY = 1; - - // Indicates the issue is an incompatibility if customers take no further - // action to resolve. - ADDITIONAL_CONFIG_REQUIRED = 2; - - // Indicates the issue is not an incompatibility, but depending on the - // workloads business logic, there is a potential that they won't work on - // Autopilot. - PASSED_WITH_OPTIONAL_CONFIG = 3; - } - - // The last time when this issue was observed. - google.protobuf.Timestamp last_observation = 1; - - // The constraint type of the issue. - string constraint_type = 2; - - // The incompatibility type of this issue. - IssueType incompatibility_type = 3; - - // The name of the resources which are subject to this issue. - repeated string subjects = 4; - - // A URL to a public documnetation, which addresses resolving this issue. - string documentation_url = 5; - - // The description of the issue. - string description = 6; -} - -// CheckAutopilotCompatibilityResponse has a list of compatibility issues. -message CheckAutopilotCompatibilityResponse { - // The list of issues for the given operation. - repeated AutopilotCompatibilityIssue issues = 1; - - // The summary of the autopilot compatibility response. - string summary = 2; -} - -// ReleaseChannel indicates which release channel a cluster is -// subscribed to. Release channels are arranged in order of risk. -// -// When a cluster is subscribed to a release channel, Google maintains -// both the master version and the node version. Node auto-upgrade -// defaults to true and cannot be disabled. -message ReleaseChannel { - // Possible values for 'channel'. - enum Channel { - // No channel specified. - UNSPECIFIED = 0; - - // RAPID channel is offered on an early access basis for customers who want - // to test new releases. - // - // WARNING: Versions available in the RAPID Channel may be subject to - // unresolved issues with no known workaround and are not subject to any - // SLAs. - RAPID = 1; - - // Clusters subscribed to REGULAR receive versions that are considered GA - // quality. REGULAR is intended for production users who want to take - // advantage of new features. - REGULAR = 2; - - // Clusters subscribed to STABLE receive versions that are known to be - // stable and reliable in production. - STABLE = 3; - - // Clusters subscribed to EXTENDED receive extended support and availability - // for versions which are known to be stable and reliable in production. - EXTENDED = 4; - } - - // channel specifies which release channel the cluster is subscribed to. - Channel channel = 1; -} - -// Configuration for fine-grained cost management feature. -message CostManagementConfig { - // Whether the feature is enabled or not. - bool enabled = 1; -} - -// IntraNodeVisibilityConfig contains the desired config of the intra-node -// visibility on this cluster. -message IntraNodeVisibilityConfig { - // Enables intra node visibility for this cluster. - bool enabled = 1; -} - -// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer -// subsetting on this cluster. -message ILBSubsettingConfig { - // Enables l4 ILB subsetting for this cluster. - bool enabled = 1; -} - -// DNSConfig contains the desired set of options for configuring clusterDNS. -message DNSConfig { - // Provider lists the various in-cluster DNS providers. - enum Provider { - // Default value - PROVIDER_UNSPECIFIED = 0; - - // Use GKE default DNS provider(kube-dns) for DNS resolution. - PLATFORM_DEFAULT = 1; - - // Use CloudDNS for DNS resolution. - CLOUD_DNS = 2; - - // Use KubeDNS for DNS resolution. - KUBE_DNS = 3; - } - - // DNSScope lists the various scopes of access to cluster DNS records. - enum DNSScope { - // Default value, will be inferred as cluster scope. - DNS_SCOPE_UNSPECIFIED = 0; - - // DNS records are accessible from within the cluster. - CLUSTER_SCOPE = 1; - - // DNS records are accessible from within the VPC. - VPC_SCOPE = 2; - } - - // cluster_dns indicates which in-cluster DNS provider should be used. - Provider cluster_dns = 1; - - // cluster_dns_scope indicates the scope of access to cluster DNS records. - DNSScope cluster_dns_scope = 2; - - // cluster_dns_domain is the suffix used for all cluster service records. - string cluster_dns_domain = 3; - - // Optional. The domain used in Additive VPC scope. - string additive_vpc_scope_dns_domain = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Constraints applied to pods. -message MaxPodsConstraint { - // Constraint enforced on the max num of pods per node. - int64 max_pods_per_node = 1; -} - -// Configuration for the use of Kubernetes Service Accounts in GCP IAM -// policies. -message WorkloadIdentityConfig { - // The workload pool to attach all Kubernetes service accounts to. - string workload_pool = 2; -} - -// IdentityServiceConfig is configuration for Identity Service which allows -// customers to use external identity providers with the K8S API -message IdentityServiceConfig { - // Whether to enable the Identity Service component - bool enabled = 1; -} - -// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. -message MeshCertificates { - // enable_certificates controls issuance of workload mTLS certificates. - // - // If set, the GKE Workload Identity Certificates controller and node agent - // will be deployed in the cluster, which can then be configured by creating a - // WorkloadCertificateConfig Custom Resource. - // - // Requires Workload Identity - // ([workload_pool][google.container.v1.WorkloadIdentityConfig.workload_pool] - // must be non-empty). - google.protobuf.BoolValue enable_certificates = 1; -} - -// Configuration of etcd encryption. -message DatabaseEncryption { - // State of etcd encryption. - enum State { - // Should never be set - UNKNOWN = 0; - - // Secrets in etcd are encrypted. - ENCRYPTED = 1; - - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - DECRYPTED = 2; - } - - // Current State of etcd encryption. - enum CurrentState { - // Should never be set - CURRENT_STATE_UNSPECIFIED = 0; - - // Secrets in etcd are encrypted. - CURRENT_STATE_ENCRYPTED = 7; - - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - CURRENT_STATE_DECRYPTED = 2; - - // Encryption (or re-encryption with a different CloudKMS key) - // of Secrets is in progress. - CURRENT_STATE_ENCRYPTION_PENDING = 3; - - // Encryption (or re-encryption with a different CloudKMS key) of Secrets in - // etcd encountered an error. - CURRENT_STATE_ENCRYPTION_ERROR = 4; - - // De-crypting Secrets to plain text in etcd is in progress. - CURRENT_STATE_DECRYPTION_PENDING = 5; - - // De-crypting Secrets to plain text in etcd encountered an error. - CURRENT_STATE_DECRYPTION_ERROR = 6; - } - - // OperationError records errors seen from CloudKMS keys - // encountered during updates to DatabaseEncryption configuration. - message OperationError { - // CloudKMS key resource that had the error. - string key_name = 1; - - // Description of the error seen during the operation. - string error_message = 2; - - // Time when the CloudKMS error was seen. - google.protobuf.Timestamp timestamp = 3; - } - - // Name of CloudKMS key to use for the encryption of secrets in etcd. - // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key - string key_name = 1; - - // The desired state of etcd encryption. - State state = 2; - - // Output only. The current state of etcd encryption. - optional CurrentState current_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Keys in use by the cluster for decrypting - // existing objects, in addition to the key in `key_name`. - // - // Each item is a CloudKMS key resource. - repeated string decryption_keys = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Records errors seen during DatabaseEncryption update - // operations. - repeated OperationError last_operation_errors = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ListUsableSubnetworksRequest requests the list of usable subnetworks -// available to a user for creating clusters. -message ListUsableSubnetworksRequest { - // The parent project where subnetworks are usable. - // Specified in the format `projects/*`. - string parent = 1; - - // Filtering currently only supports equality on the networkProjectId and must - // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - // is the project which owns the listed subnetworks. This defaults to the - // parent project ID. - string filter = 2; - - // The max number of results per page that should be returned. If the number - // of available results is larger than `page_size`, a `next_page_token` is - // returned which can be used to get the next page of results in subsequent - // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - int32 page_size = 3; - - // Specifies a page token to use. Set this to the nextPageToken returned by - // previous list requests to get the next page of results. - string page_token = 4; -} - -// ListUsableSubnetworksResponse is the response of -// ListUsableSubnetworksRequest. -message ListUsableSubnetworksResponse { - // A list of usable subnetworks in the specified network project. - repeated UsableSubnetwork subnetworks = 1; - - // This token allows you to get the next page of results for list requests. - // If the number of results is larger than `page_size`, use the - // `next_page_token` as a value for the query parameter `page_token` in the - // next request. The value will become empty when there are no more pages. - string next_page_token = 2; -} - -// Secondary IP range of a usable subnetwork. -message UsableSubnetworkSecondaryRange { - // Status shows the current usage of a secondary IP range. - enum Status { - // UNKNOWN is the zero value of the Status enum. It's not a valid status. - UNKNOWN = 0; - - // UNUSED denotes that this range is unclaimed by any cluster. - UNUSED = 1; - - // IN_USE_SERVICE denotes that this range is claimed by cluster(s) for - // services. User-managed services range can be shared between clusters - // within the same subnetwork. - IN_USE_SERVICE = 2; - - // IN_USE_SHAREABLE_POD denotes this range was created by the network admin - // and is currently claimed by a cluster for pods. It can only be used by - // other clusters as a pod range. - IN_USE_SHAREABLE_POD = 3; - - // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed - // for pods. It cannot be used for other clusters. - IN_USE_MANAGED_POD = 4; - } - - // The name associated with this subnetwork secondary range, used when adding - // an alias IP range to a VM instance. - string range_name = 1; - - // The range of IP addresses belonging to this subnetwork secondary range. - string ip_cidr_range = 2; - - // This field is to determine the status of the secondary range programmably. - Status status = 3; -} - -// UsableSubnetwork resource returns the subnetwork name, its associated network -// and the primary CIDR range. -message UsableSubnetwork { - // Subnetwork Name. - // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet - string subnetwork = 1; - - // Network Name. - // Example: projects/my-project/global/networks/my-network - string network = 2; - - // The range of internal addresses that are owned by this subnetwork. - string ip_cidr_range = 3; - - // Secondary IP ranges. - repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4; - - // A human readable status message representing the reasons for cases where - // the caller cannot use the secondary ranges under the subnet. For example if - // the secondary_ip_ranges is empty due to a permission issue, an insufficient - // permission message will be given by status_message. - string status_message = 5; -} - -// Configuration for exporting cluster resource usages. -message ResourceUsageExportConfig { - // Parameters for using BigQuery as the destination of resource usage export. - message BigQueryDestination { - // The ID of a BigQuery Dataset. - string dataset_id = 1; - } - - // Parameters for controlling consumption metering. - message ConsumptionMeteringConfig { - // Whether to enable consumption metering for this cluster. If enabled, a - // second BigQuery table will be created to hold resource consumption - // records. - bool enabled = 1; - } - - // Configuration to use BigQuery as usage export destination. - BigQueryDestination bigquery_destination = 1; - - // Whether to enable network egress metering for this cluster. If enabled, a - // daemonset will be created in the cluster to meter network egress traffic. - bool enable_network_egress_metering = 2; - - // Configuration to enable resource consumption metering. - ConsumptionMeteringConfig consumption_metering_config = 3; -} - -// VerticalPodAutoscaling contains global, per-cluster information -// required by Vertical Pod Autoscaler to automatically adjust -// the resources of pods controlled by it. -message VerticalPodAutoscaling { - // Enables vertical pod autoscaling. - bool enabled = 1; -} - -// DefaultSnatStatus contains the desired state of whether default sNAT should -// be disabled on the cluster. -message DefaultSnatStatus { - // Disables cluster default sNAT rules. - bool disabled = 1; -} - -// Configuration of Shielded Nodes feature. -message ShieldedNodes { - // Whether Shielded Nodes features are enabled on all nodes in this cluster. - bool enabled = 1; -} - -// Configuration of gVNIC feature. -message VirtualNIC { - // Whether gVNIC features are enabled in the node pool. - bool enabled = 1; -} - -// Configuration of Fast Socket feature. -message FastSocket { - // Whether Fast Socket features are enabled in the node pool. - bool enabled = 1; -} - -// PrivateIPv6GoogleAccess controls whether and how the pods can communicate -// with Google Services through gRPC over IPv6. -enum PrivateIPv6GoogleAccess { - // Default value. Same as DISABLED - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - - // No private access to or from Google Services - PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1; - - // Enables private IPv6 access to Google Services from GKE - PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; - - // Enables private IPv6 access to and from Google Services - PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; -} - -// NotificationConfig is the configuration of notifications. -message NotificationConfig { - // Types of notifications currently supported. Can be used to filter what - // notifications are sent. - enum EventType { - // Not set, will be ignored. - EVENT_TYPE_UNSPECIFIED = 0; - - // Corresponds with UpgradeAvailableEvent. - UPGRADE_AVAILABLE_EVENT = 1; - - // Corresponds with UpgradeEvent. - UPGRADE_EVENT = 2; - - // Corresponds with SecurityBulletinEvent. - SECURITY_BULLETIN_EVENT = 3; - } - - // Pub/Sub specific notification config. - message PubSub { - // Enable notifications for Pub/Sub. - bool enabled = 1; - - // The desired Pub/Sub topic to which notifications will be - // sent by GKE. Format is `projects/{project}/topics/{topic}`. - string topic = 2 [ - (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } - ]; - - // Allows filtering to one or more specific event types. If no filter is - // specified, or if a filter is specified with no event types, all event - // types will be sent - Filter filter = 3; - } - - // Allows filtering to one or more specific event types. If event types are - // present, those and only those event types will be transmitted to the - // cluster. Other types will be skipped. If no filter is specified, or no - // event types are present, all event types will be sent - message Filter { - // Event types to allowlist. - repeated EventType event_type = 1; - } - - // Notification config for Pub/Sub. - PubSub pubsub = 1; -} - -// ConfidentialNodes is configuration for the confidential nodes feature, which -// makes nodes run on confidential VMs. -message ConfidentialNodes { - // Whether Confidential Nodes feature is enabled. - bool enabled = 1; -} - -// UpgradeResourceType is the resource type that is upgrading. It is used -// in upgrade notifications. -enum UpgradeResourceType { - // Default value. This shouldn't be used. - UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0; - - // Master / control plane - MASTER = 1; - - // Node pool - NODE_POOL = 2; -} - -// UpgradeEvent is a notification sent to customers by the cluster server when -// a resource is upgrading. -message UpgradeEvent { - // The resource type that is upgrading. - UpgradeResourceType resource_type = 1; - - // The operation associated with this upgrade. - string operation = 2; - - // The time when the operation was started. - google.protobuf.Timestamp operation_start_time = 3; - - // The current version before the upgrade. - string current_version = 4; - - // The target version for the upgrade. - string target_version = 5; - - // Optional relative path to the resource. For example in node pool upgrades, - // the relative path of the node pool. - string resource = 6; -} - -// UpgradeInfoEvent is a notification sent to customers about the upgrade -// information of a resource. -message UpgradeInfoEvent { - // The state of the upgrade. - enum State { - // STATE_UNSPECIFIED indicates the state is unspecified. - STATE_UNSPECIFIED = 0; - - // STARTED indicates the upgrade has started. - STARTED = 3; - - // SUCCEEDED indicates the upgrade has completed successfully. - SUCCEEDED = 4; - - // FAILED indicates the upgrade has failed. - FAILED = 5; - - // CANCELED indicates the upgrade has canceled. - CANCELED = 6; - } - - // The resource type associated with the upgrade. - UpgradeResourceType resource_type = 1; - - // The operation associated with this upgrade. - string operation = 2; - - // The time when the operation was started. - google.protobuf.Timestamp start_time = 3; - - // The time when the operation ended. - google.protobuf.Timestamp end_time = 4; - - // The current version before the upgrade. - string current_version = 5; - - // The target version for the upgrade. - string target_version = 6; - - // Optional relative path to the resource. For example in node pool upgrades, - // the relative path of the node pool. - string resource = 7; - - // Output only. The state of the upgrade. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A brief description of the event. - string description = 11; -} - -// UpgradeAvailableEvent is a notification sent to customers when a new -// available version is released. -message UpgradeAvailableEvent { - // The release version available for upgrade. - string version = 1; - - // The resource type of the release version. - UpgradeResourceType resource_type = 2; - - // The release channel of the version. If empty, it means a non-channel - // release. - ReleaseChannel release_channel = 3; - - // Optional relative path to the resource. For example, the relative path of - // the node pool. - string resource = 4; -} - -// SecurityBulletinEvent is a notification sent to customers when a security -// bulletin has been posted that they are vulnerable to. -message SecurityBulletinEvent { - // The resource type (node/control plane) that has the vulnerability. Multiple - // notifications (1 notification per resource type) will be sent for a - // vulnerability that affects > 1 resource type. - string resource_type_affected = 1; - - // The ID of the bulletin corresponding to the vulnerability. - string bulletin_id = 2; - - // The CVEs associated with this bulletin. - repeated string cve_ids = 3; - - // The severity of this bulletin as it relates to GKE. - string severity = 4; - - // The URI link to the bulletin on the website for more information. - string bulletin_uri = 5; - - // A brief description of the bulletin. See the bulletin pointed to by the - // bulletin_uri field for an expanded description. - string brief_description = 6; - - // The GKE minor versions affected by this vulnerability. - repeated string affected_supported_minors = 7; - - // The GKE versions where this vulnerability is patched. - repeated string patched_versions = 8; - - // This represents a version selected from the patched_versions field that - // the cluster receiving this notification should most likely want to upgrade - // to based on its current version. Note that if this notification is being - // received by a given cluster, it means that this version is currently - // available as an upgrade target in that cluster's location. - string suggested_upgrade_target = 9; - - // If this field is specified, it means there are manual steps that the user - // must take to make their clusters safe. - bool manual_steps_required = 10; -} - -// Autopilot is the configuration for Autopilot settings on the cluster. -message Autopilot { - // Enable Autopilot - bool enabled = 1; - - // Workload policy configuration for Autopilot. - WorkloadPolicyConfig workload_policy_config = 2; -} - -// WorkloadPolicyConfig is the configuration of workload policy for autopilot -// clusters. -message WorkloadPolicyConfig { - // If true, workloads can use NET_ADMIN capability. - optional bool allow_net_admin = 1; -} - -// LoggingConfig is cluster logging configuration. -message LoggingConfig { - // Logging components configuration - LoggingComponentConfig component_config = 1; -} - -// LoggingComponentConfig is cluster logging component configuration. -message LoggingComponentConfig { - // GKE components exposing logs - enum Component { - // Default value. This shouldn't be used. - COMPONENT_UNSPECIFIED = 0; - - // system components - SYSTEM_COMPONENTS = 1; - - // workloads - WORKLOADS = 2; - - // kube-apiserver - APISERVER = 3; - - // kube-scheduler - SCHEDULER = 4; - - // kube-controller-manager - CONTROLLER_MANAGER = 5; - - // kcp-sshd - KCP_SSHD = 7; - - // kcp connection logs - KCP_CONNECTION = 8; - } - - // Select components to collect logs. An empty set would disable all logging. - repeated Component enable_components = 1; -} - -// RayClusterLoggingConfig specifies configuration of Ray logging. -message RayClusterLoggingConfig { - // Enable log collection for Ray clusters. - bool enabled = 1; -} - -// MonitoringConfig is cluster monitoring configuration. -message MonitoringConfig { - // Monitoring components configuration - MonitoringComponentConfig component_config = 1; - - // Enable Google Cloud Managed Service for Prometheus - // in the cluster. - ManagedPrometheusConfig managed_prometheus_config = 2; - - // Configuration of Advanced Datapath Observability features. - AdvancedDatapathObservabilityConfig advanced_datapath_observability_config = - 3; -} - -// AdvancedDatapathObservabilityConfig specifies configuration of observability -// features of advanced datapath. -message AdvancedDatapathObservabilityConfig { - // Supported Relay modes - enum RelayMode { - // Default value. This shouldn't be used. - RELAY_MODE_UNSPECIFIED = 0; - - // disabled - DISABLED = 1; - - // exposed via internal load balancer - INTERNAL_VPC_LB = 3; - - // exposed via external load balancer - EXTERNAL_LB = 4; - } - - // Expose flow metrics on nodes - bool enable_metrics = 1; - - // Method used to make Relay available - RelayMode relay_mode = 2; - - // Enable Relay component - optional bool enable_relay = 3; -} - -// RayClusterMonitoringConfig specifies monitoring configuration for Ray -// clusters. -message RayClusterMonitoringConfig { - // Enable metrics collection for Ray clusters. - bool enabled = 1; -} - -// NodePoolLoggingConfig specifies logging configuration for nodepools. -message NodePoolLoggingConfig { - // Logging variant configuration. - LoggingVariantConfig variant_config = 1; -} - -// LoggingVariantConfig specifies the behaviour of the logging component. -message LoggingVariantConfig { - // Logging component variants. - enum Variant { - // Default value. This shouldn't be used. - VARIANT_UNSPECIFIED = 0; - - // default logging variant. - DEFAULT = 1; - - // maximum logging throughput variant. - MAX_THROUGHPUT = 2; - } - - // Logging variant deployed on nodes. - Variant variant = 1; -} - -// MonitoringComponentConfig is cluster monitoring component configuration. -message MonitoringComponentConfig { - // GKE components exposing metrics - enum Component { - // Default value. This shouldn't be used. - COMPONENT_UNSPECIFIED = 0; - - // system components - SYSTEM_COMPONENTS = 1; - - // kube-apiserver - APISERVER = 3; - - // kube-scheduler - SCHEDULER = 4; - - // kube-controller-manager - CONTROLLER_MANAGER = 5; - - // Storage - STORAGE = 7; - - // Horizontal Pod Autoscaling - HPA = 8; - - // Pod - POD = 9; - - // DaemonSet - DAEMONSET = 10; - - // Deployment - DEPLOYMENT = 11; - - // Statefulset - STATEFULSET = 12; - - // CADVISOR - CADVISOR = 13; - - // KUBELET - KUBELET = 14; - - // NVIDIA Data Center GPU Manager (DCGM) - DCGM = 15; - } - - // Select components to collect metrics. An empty set would disable all - // monitoring. - repeated Component enable_components = 1; -} - -// The datapath provider selects the implementation of the Kubernetes networking -// model for service resolution and network policy enforcement. -enum DatapathProvider { - // Default value. - DATAPATH_PROVIDER_UNSPECIFIED = 0; - - // Use the IPTables implementation based on kube-proxy. - LEGACY_DATAPATH = 1; - - // Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE - // Dataplane V2 - // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) - // for more. - ADVANCED_DATAPATH = 2; -} - -// Strategy used for node pool update. -enum NodePoolUpdateStrategy { - // Default value if unset. GKE internally defaults the update strategy to - // SURGE for unspecified strategies. - NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0; - - // blue-green upgrade. - BLUE_GREEN = 2; - - // SURGE is the traditional way of upgrade a node pool. - // max_surge and max_unavailable determines the level of upgrade parallelism. - SURGE = 3; -} - -// ManagedPrometheusConfig defines the configuration for -// Google Cloud Managed Service for Prometheus. -message ManagedPrometheusConfig { - // Enable Managed Collection. - bool enabled = 1; -} - -// Fleet is the fleet configuration for the cluster. -message Fleet { - // The Fleet host project(project ID or project number) where this cluster - // will be registered to. This field cannot be changed after the cluster has - // been registered. - string project = 1; - - // Output only. The full resource name of the registered fleet membership of - // the cluster, in the format - // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. - string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether the cluster has been registered through the fleet - // API. - bool pre_registered = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Possible values for IP stack type -enum StackType { - // Default value, will be defaulted as IPV4 only - STACK_TYPE_UNSPECIFIED = 0; - - // Cluster is IPV4 only - IPV4 = 1; - - // Cluster can use both IPv4 and IPv6 - IPV4_IPV6 = 2; -} - -// Configuration for all of the cluster's control plane endpoints. -message ControlPlaneEndpointsConfig { - // Describes the configuration of a DNS endpoint. - message DNSEndpointConfig { - // Output only. The cluster's DNS endpoint configuration. - // A DNS format address. This is accessible from the public internet. - // Ex: uid.us-central1.gke.goog. - // Always present, but the behavior may change according to the value of - // [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]. - string endpoint = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Controls whether user traffic is allowed over this endpoint. Note that - // GCP-managed services may still use the endpoint even if this is false. - optional bool allow_external_traffic = 3; - } - - // IP endpoints configuration. - message IPEndpointsConfig { - // Controls whether to allow direct IP access. - optional bool enabled = 1; - - // Controls whether the control plane allows access through a public IP. - // It is invalid to specify both - // [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same - // time. - optional bool enable_public_endpoint = 2; - - // Controls whether the control plane's private endpoint is accessible from - // sources in other regions. - // It is invalid to specify both - // [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled] - // and this field at the same time. - optional bool global_access = 3; - - // Configuration of authorized networks. If enabled, restricts access to the - // control plane based on source IP. - // It is invalid to specify both - // [Cluster.masterAuthorizedNetworksConfig][] and this field at the same - // time. - MasterAuthorizedNetworksConfig authorized_networks_config = 4; - - // Output only. The external IP address of this cluster's control plane. - // Only populated if enabled. - string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The internal IP address of this cluster's control plane. - // Only populated if enabled. - string private_endpoint = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Subnet to provision the master's private endpoint during cluster - // creation. Specified in projects/*/regions/*/subnetworks/* format. It is - // invalid to specify both - // [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the - // same time. - string private_endpoint_subnetwork = 7; - } - - // DNS endpoint configuration. - DNSEndpointConfig dns_endpoint_config = 1; - - // IP endpoints configuration. - IPEndpointsConfig ip_endpoints_config = 3; -} - -// Possible values for IPv6 access type -enum IPv6AccessType { - // Default value, will be defaulted as type external. - IPV6_ACCESS_TYPE_UNSPECIFIED = 0; - - // Access type internal (all v6 addresses are internal IPs) - INTERNAL = 1; - - // Access type external (all v6 addresses are external IPs) - EXTERNAL = 2; -} - -// LocalNvmeSsdBlockConfig contains configuration for using raw-block local -// NVMe SSDs -message LocalNvmeSsdBlockConfig { - // Number of local NVMe SSDs to use. The limit for this value is dependent - // upon the maximum number of disk available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - int32 local_ssd_count = 1; -} - -// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral -// storage using Local SSDs. -message EphemeralStorageLocalSsdConfig { - // Number of local SSDs to use to back ephemeral storage. Uses NVMe - // interfaces. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. The - // limit for this value is dependent upon the maximum number of disk - // available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - int32 local_ssd_count = 1; -} - -// A map of resource manager tag keys and values to be attached to the nodes -// for managing Compute Engine firewalls using Network Firewall Policies. -// Tags must be according to specifications in -// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. -// A maximum of 5 tag key-value pairs can be specified. -// Existing tags will be replaced with new values. -message ResourceManagerTags { - // TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) - // 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` - // 2. `{org_id}/{tag_key_name}={tag_value_name}` - // 3. `{project_id}/{tag_key_name}={tag_value_name}` - map tags = 1; -} - -// EnterpriseConfig is the cluster enterprise configuration. -message EnterpriseConfig { - // Premium tiers for GKE Cluster. - enum ClusterTier { - // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. - CLUSTER_TIER_UNSPECIFIED = 0; - - // STANDARD indicates a standard GKE cluster. - STANDARD = 1; - - // ENTERPRISE indicates a GKE Enterprise cluster. - ENTERPRISE = 2; - } - - // Output only. cluster_tier indicates the effective tier of the cluster. - ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // desired_tier specifies the desired tier of the cluster. - ClusterTier desired_tier = 2; -} - -// SecretManagerConfig is config for secret manager enablement. -message SecretManagerConfig { - // Enable/Disable Secret Manager Config. - optional bool enabled = 1; -} - -// SecondaryBootDisk represents a persistent disk attached to a node -// with special configurations based on its mode. -message SecondaryBootDisk { - // Mode specifies how the secondary boot disk will be used. - // This triggers mode-specified logic in the control plane. - enum Mode { - // MODE_UNSPECIFIED is when mode is not set. - MODE_UNSPECIFIED = 0; - - // CONTAINER_IMAGE_CACHE is for using the secondary boot disk as - // a container image cache. - CONTAINER_IMAGE_CACHE = 1; - } - - // Disk mode (container image cache, etc.) - Mode mode = 1; - - // Fully-qualified resource ID for an existing disk image. - string disk_image = 2; -} - -// Options for in-transit encryption. -enum InTransitEncryptionConfig { - // Unspecified, will be inferred as default - - // IN_TRANSIT_ENCRYPTION_UNSPECIFIED. - IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0; - - // In-transit encryption is disabled. - IN_TRANSIT_ENCRYPTION_DISABLED = 1; - - // Data in-transit is encrypted using inter-node transparent encryption. - IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2; -} - -// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended -// in the future to define different options for updating secondary boot disks. -message SecondaryBootDiskUpdateStrategy {} diff --git a/owl-bot-staging/google-container/v1/protos/protos.d.ts b/owl-bot-staging/google-container/v1/protos/protos.d.ts deleted file mode 100644 index 022106ec937..00000000000 --- a/owl-bot-staging/google-container/v1/protos/protos.d.ts +++ /dev/null @@ -1,32009 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace container. */ - namespace container { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a ClusterManager */ - class ClusterManager extends $protobuf.rpc.Service { - - /** - * Constructs a new ClusterManager 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 ClusterManager 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): ClusterManager; - - /** - * Calls ListClusters. - * @param request ListClustersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListClustersResponse - */ - public listClusters(request: google.container.v1.IListClustersRequest, callback: google.container.v1.ClusterManager.ListClustersCallback): void; - - /** - * Calls ListClusters. - * @param request ListClustersRequest message or plain object - * @returns Promise - */ - public listClusters(request: google.container.v1.IListClustersRequest): Promise; - - /** - * Calls GetCluster. - * @param request GetClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Cluster - */ - public getCluster(request: google.container.v1.IGetClusterRequest, callback: google.container.v1.ClusterManager.GetClusterCallback): void; - - /** - * Calls GetCluster. - * @param request GetClusterRequest message or plain object - * @returns Promise - */ - public getCluster(request: google.container.v1.IGetClusterRequest): Promise; - - /** - * Calls CreateCluster. - * @param request CreateClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createCluster(request: google.container.v1.ICreateClusterRequest, callback: google.container.v1.ClusterManager.CreateClusterCallback): void; - - /** - * Calls CreateCluster. - * @param request CreateClusterRequest message or plain object - * @returns Promise - */ - public createCluster(request: google.container.v1.ICreateClusterRequest): Promise; - - /** - * Calls UpdateCluster. - * @param request UpdateClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateCluster(request: google.container.v1.IUpdateClusterRequest, callback: google.container.v1.ClusterManager.UpdateClusterCallback): void; - - /** - * Calls UpdateCluster. - * @param request UpdateClusterRequest message or plain object - * @returns Promise - */ - public updateCluster(request: google.container.v1.IUpdateClusterRequest): Promise; - - /** - * Calls UpdateNodePool. - * @param request UpdateNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateNodePool(request: google.container.v1.IUpdateNodePoolRequest, callback: google.container.v1.ClusterManager.UpdateNodePoolCallback): void; - - /** - * Calls UpdateNodePool. - * @param request UpdateNodePoolRequest message or plain object - * @returns Promise - */ - public updateNodePool(request: google.container.v1.IUpdateNodePoolRequest): Promise; - - /** - * Calls SetNodePoolAutoscaling. - * @param request SetNodePoolAutoscalingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolAutoscaling(request: google.container.v1.ISetNodePoolAutoscalingRequest, callback: google.container.v1.ClusterManager.SetNodePoolAutoscalingCallback): void; - - /** - * Calls SetNodePoolAutoscaling. - * @param request SetNodePoolAutoscalingRequest message or plain object - * @returns Promise - */ - public setNodePoolAutoscaling(request: google.container.v1.ISetNodePoolAutoscalingRequest): Promise; - - /** - * Calls SetLoggingService. - * @param request SetLoggingServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLoggingService(request: google.container.v1.ISetLoggingServiceRequest, callback: google.container.v1.ClusterManager.SetLoggingServiceCallback): void; - - /** - * Calls SetLoggingService. - * @param request SetLoggingServiceRequest message or plain object - * @returns Promise - */ - public setLoggingService(request: google.container.v1.ISetLoggingServiceRequest): Promise; - - /** - * Calls SetMonitoringService. - * @param request SetMonitoringServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMonitoringService(request: google.container.v1.ISetMonitoringServiceRequest, callback: google.container.v1.ClusterManager.SetMonitoringServiceCallback): void; - - /** - * Calls SetMonitoringService. - * @param request SetMonitoringServiceRequest message or plain object - * @returns Promise - */ - public setMonitoringService(request: google.container.v1.ISetMonitoringServiceRequest): Promise; - - /** - * Calls SetAddonsConfig. - * @param request SetAddonsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setAddonsConfig(request: google.container.v1.ISetAddonsConfigRequest, callback: google.container.v1.ClusterManager.SetAddonsConfigCallback): void; - - /** - * Calls SetAddonsConfig. - * @param request SetAddonsConfigRequest message or plain object - * @returns Promise - */ - public setAddonsConfig(request: google.container.v1.ISetAddonsConfigRequest): Promise; - - /** - * Calls SetLocations. - * @param request SetLocationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLocations(request: google.container.v1.ISetLocationsRequest, callback: google.container.v1.ClusterManager.SetLocationsCallback): void; - - /** - * Calls SetLocations. - * @param request SetLocationsRequest message or plain object - * @returns Promise - */ - public setLocations(request: google.container.v1.ISetLocationsRequest): Promise; - - /** - * Calls UpdateMaster. - * @param request UpdateMasterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateMaster(request: google.container.v1.IUpdateMasterRequest, callback: google.container.v1.ClusterManager.UpdateMasterCallback): void; - - /** - * Calls UpdateMaster. - * @param request UpdateMasterRequest message or plain object - * @returns Promise - */ - public updateMaster(request: google.container.v1.IUpdateMasterRequest): Promise; - - /** - * Calls SetMasterAuth. - * @param request SetMasterAuthRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMasterAuth(request: google.container.v1.ISetMasterAuthRequest, callback: google.container.v1.ClusterManager.SetMasterAuthCallback): void; - - /** - * Calls SetMasterAuth. - * @param request SetMasterAuthRequest message or plain object - * @returns Promise - */ - public setMasterAuth(request: google.container.v1.ISetMasterAuthRequest): Promise; - - /** - * Calls DeleteCluster. - * @param request DeleteClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteCluster(request: google.container.v1.IDeleteClusterRequest, callback: google.container.v1.ClusterManager.DeleteClusterCallback): void; - - /** - * Calls DeleteCluster. - * @param request DeleteClusterRequest message or plain object - * @returns Promise - */ - public deleteCluster(request: google.container.v1.IDeleteClusterRequest): Promise; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.container.v1.IListOperationsRequest, callback: google.container.v1.ClusterManager.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.container.v1.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.container.v1.IGetOperationRequest, callback: google.container.v1.ClusterManager.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.container.v1.IGetOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.container.v1.ICancelOperationRequest, callback: google.container.v1.ClusterManager.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.container.v1.ICancelOperationRequest): Promise; - - /** - * Calls GetServerConfig. - * @param request GetServerConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ServerConfig - */ - public getServerConfig(request: google.container.v1.IGetServerConfigRequest, callback: google.container.v1.ClusterManager.GetServerConfigCallback): void; - - /** - * Calls GetServerConfig. - * @param request GetServerConfigRequest message or plain object - * @returns Promise - */ - public getServerConfig(request: google.container.v1.IGetServerConfigRequest): Promise; - - /** - * Calls GetJSONWebKeys. - * @param request GetJSONWebKeysRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse - */ - public getJSONWebKeys(request: google.container.v1.IGetJSONWebKeysRequest, callback: google.container.v1.ClusterManager.GetJSONWebKeysCallback): void; - - /** - * Calls GetJSONWebKeys. - * @param request GetJSONWebKeysRequest message or plain object - * @returns Promise - */ - public getJSONWebKeys(request: google.container.v1.IGetJSONWebKeysRequest): Promise; - - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse - */ - public listNodePools(request: google.container.v1.IListNodePoolsRequest, callback: google.container.v1.ClusterManager.ListNodePoolsCallback): void; - - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @returns Promise - */ - public listNodePools(request: google.container.v1.IListNodePoolsRequest): Promise; - - /** - * Calls GetNodePool. - * @param request GetNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NodePool - */ - public getNodePool(request: google.container.v1.IGetNodePoolRequest, callback: google.container.v1.ClusterManager.GetNodePoolCallback): void; - - /** - * Calls GetNodePool. - * @param request GetNodePoolRequest message or plain object - * @returns Promise - */ - public getNodePool(request: google.container.v1.IGetNodePoolRequest): Promise; - - /** - * Calls CreateNodePool. - * @param request CreateNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createNodePool(request: google.container.v1.ICreateNodePoolRequest, callback: google.container.v1.ClusterManager.CreateNodePoolCallback): void; - - /** - * Calls CreateNodePool. - * @param request CreateNodePoolRequest message or plain object - * @returns Promise - */ - public createNodePool(request: google.container.v1.ICreateNodePoolRequest): Promise; - - /** - * Calls DeleteNodePool. - * @param request DeleteNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteNodePool(request: google.container.v1.IDeleteNodePoolRequest, callback: google.container.v1.ClusterManager.DeleteNodePoolCallback): void; - - /** - * Calls DeleteNodePool. - * @param request DeleteNodePoolRequest message or plain object - * @returns Promise - */ - public deleteNodePool(request: google.container.v1.IDeleteNodePoolRequest): Promise; - - /** - * Calls CompleteNodePoolUpgrade. - * @param request CompleteNodePoolUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public completeNodePoolUpgrade(request: google.container.v1.ICompleteNodePoolUpgradeRequest, callback: google.container.v1.ClusterManager.CompleteNodePoolUpgradeCallback): void; - - /** - * Calls CompleteNodePoolUpgrade. - * @param request CompleteNodePoolUpgradeRequest message or plain object - * @returns Promise - */ - public completeNodePoolUpgrade(request: google.container.v1.ICompleteNodePoolUpgradeRequest): Promise; - - /** - * Calls RollbackNodePoolUpgrade. - * @param request RollbackNodePoolUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rollbackNodePoolUpgrade(request: google.container.v1.IRollbackNodePoolUpgradeRequest, callback: google.container.v1.ClusterManager.RollbackNodePoolUpgradeCallback): void; - - /** - * Calls RollbackNodePoolUpgrade. - * @param request RollbackNodePoolUpgradeRequest message or plain object - * @returns Promise - */ - public rollbackNodePoolUpgrade(request: google.container.v1.IRollbackNodePoolUpgradeRequest): Promise; - - /** - * Calls SetNodePoolManagement. - * @param request SetNodePoolManagementRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolManagement(request: google.container.v1.ISetNodePoolManagementRequest, callback: google.container.v1.ClusterManager.SetNodePoolManagementCallback): void; - - /** - * Calls SetNodePoolManagement. - * @param request SetNodePoolManagementRequest message or plain object - * @returns Promise - */ - public setNodePoolManagement(request: google.container.v1.ISetNodePoolManagementRequest): Promise; - - /** - * Calls SetLabels. - * @param request SetLabelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLabels(request: google.container.v1.ISetLabelsRequest, callback: google.container.v1.ClusterManager.SetLabelsCallback): void; - - /** - * Calls SetLabels. - * @param request SetLabelsRequest message or plain object - * @returns Promise - */ - public setLabels(request: google.container.v1.ISetLabelsRequest): Promise; - - /** - * Calls SetLegacyAbac. - * @param request SetLegacyAbacRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLegacyAbac(request: google.container.v1.ISetLegacyAbacRequest, callback: google.container.v1.ClusterManager.SetLegacyAbacCallback): void; - - /** - * Calls SetLegacyAbac. - * @param request SetLegacyAbacRequest message or plain object - * @returns Promise - */ - public setLegacyAbac(request: google.container.v1.ISetLegacyAbacRequest): Promise; - - /** - * Calls StartIPRotation. - * @param request StartIPRotationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public startIPRotation(request: google.container.v1.IStartIPRotationRequest, callback: google.container.v1.ClusterManager.StartIPRotationCallback): void; - - /** - * Calls StartIPRotation. - * @param request StartIPRotationRequest message or plain object - * @returns Promise - */ - public startIPRotation(request: google.container.v1.IStartIPRotationRequest): Promise; - - /** - * Calls CompleteIPRotation. - * @param request CompleteIPRotationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public completeIPRotation(request: google.container.v1.ICompleteIPRotationRequest, callback: google.container.v1.ClusterManager.CompleteIPRotationCallback): void; - - /** - * Calls CompleteIPRotation. - * @param request CompleteIPRotationRequest message or plain object - * @returns Promise - */ - public completeIPRotation(request: google.container.v1.ICompleteIPRotationRequest): Promise; - - /** - * Calls SetNodePoolSize. - * @param request SetNodePoolSizeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolSize(request: google.container.v1.ISetNodePoolSizeRequest, callback: google.container.v1.ClusterManager.SetNodePoolSizeCallback): void; - - /** - * Calls SetNodePoolSize. - * @param request SetNodePoolSizeRequest message or plain object - * @returns Promise - */ - public setNodePoolSize(request: google.container.v1.ISetNodePoolSizeRequest): Promise; - - /** - * Calls SetNetworkPolicy. - * @param request SetNetworkPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNetworkPolicy(request: google.container.v1.ISetNetworkPolicyRequest, callback: google.container.v1.ClusterManager.SetNetworkPolicyCallback): void; - - /** - * Calls SetNetworkPolicy. - * @param request SetNetworkPolicyRequest message or plain object - * @returns Promise - */ - public setNetworkPolicy(request: google.container.v1.ISetNetworkPolicyRequest): Promise; - - /** - * Calls SetMaintenancePolicy. - * @param request SetMaintenancePolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMaintenancePolicy(request: google.container.v1.ISetMaintenancePolicyRequest, callback: google.container.v1.ClusterManager.SetMaintenancePolicyCallback): void; - - /** - * Calls SetMaintenancePolicy. - * @param request SetMaintenancePolicyRequest message or plain object - * @returns Promise - */ - public setMaintenancePolicy(request: google.container.v1.ISetMaintenancePolicyRequest): Promise; - - /** - * Calls ListUsableSubnetworks. - * @param request ListUsableSubnetworksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse - */ - public listUsableSubnetworks(request: google.container.v1.IListUsableSubnetworksRequest, callback: google.container.v1.ClusterManager.ListUsableSubnetworksCallback): void; - - /** - * Calls ListUsableSubnetworks. - * @param request ListUsableSubnetworksRequest message or plain object - * @returns Promise - */ - public listUsableSubnetworks(request: google.container.v1.IListUsableSubnetworksRequest): Promise; - - /** - * Calls CheckAutopilotCompatibility. - * @param request CheckAutopilotCompatibilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse - */ - public checkAutopilotCompatibility(request: google.container.v1.ICheckAutopilotCompatibilityRequest, callback: google.container.v1.ClusterManager.CheckAutopilotCompatibilityCallback): void; - - /** - * Calls CheckAutopilotCompatibility. - * @param request CheckAutopilotCompatibilityRequest message or plain object - * @returns Promise - */ - public checkAutopilotCompatibility(request: google.container.v1.ICheckAutopilotCompatibilityRequest): Promise; - } - - namespace ClusterManager { - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listClusters}. - * @param error Error, if any - * @param [response] ListClustersResponse - */ - type ListClustersCallback = (error: (Error|null), response?: google.container.v1.ListClustersResponse) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getCluster}. - * @param error Error, if any - * @param [response] Cluster - */ - type GetClusterCallback = (error: (Error|null), response?: google.container.v1.Cluster) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|createCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolAutoscaling}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolAutoscalingCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLoggingService}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLoggingServiceCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMonitoringService}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMonitoringServiceCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setAddonsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type SetAddonsConfigCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLocations}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLocationsCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateMaster}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateMasterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMasterAuth}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMasterAuthCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|deleteCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteClusterCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.container.v1.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getServerConfig}. - * @param error Error, if any - * @param [response] ServerConfig - */ - type GetServerConfigCallback = (error: (Error|null), response?: google.container.v1.ServerConfig) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getJSONWebKeys}. - * @param error Error, if any - * @param [response] GetJSONWebKeysResponse - */ - type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1.GetJSONWebKeysResponse) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listNodePools}. - * @param error Error, if any - * @param [response] ListNodePoolsResponse - */ - type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1.ListNodePoolsResponse) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getNodePool}. - * @param error Error, if any - * @param [response] NodePool - */ - type GetNodePoolCallback = (error: (Error|null), response?: google.container.v1.NodePool) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|createNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|deleteNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteNodePoolCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|completeNodePoolUpgrade}. - * @param error Error, if any - * @param [response] Empty - */ - type CompleteNodePoolUpgradeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|rollbackNodePoolUpgrade}. - * @param error Error, if any - * @param [response] Operation - */ - type RollbackNodePoolUpgradeCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolManagement}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolManagementCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLabels}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLabelsCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLegacyAbac}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLegacyAbacCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|startIPRotation}. - * @param error Error, if any - * @param [response] Operation - */ - type StartIPRotationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|completeIPRotation}. - * @param error Error, if any - * @param [response] Operation - */ - type CompleteIPRotationCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolSize}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolSizeCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNetworkPolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNetworkPolicyCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMaintenancePolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMaintenancePolicyCallback = (error: (Error|null), response?: google.container.v1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listUsableSubnetworks}. - * @param error Error, if any - * @param [response] ListUsableSubnetworksResponse - */ - type ListUsableSubnetworksCallback = (error: (Error|null), response?: google.container.v1.ListUsableSubnetworksResponse) => void; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|checkAutopilotCompatibility}. - * @param error Error, if any - * @param [response] CheckAutopilotCompatibilityResponse - */ - type CheckAutopilotCompatibilityCallback = (error: (Error|null), response?: google.container.v1.CheckAutopilotCompatibilityResponse) => void; - } - - /** Properties of a LinuxNodeConfig. */ - interface ILinuxNodeConfig { - - /** LinuxNodeConfig sysctls */ - sysctls?: ({ [k: string]: string }|null); - - /** LinuxNodeConfig cgroupMode */ - cgroupMode?: (google.container.v1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1.LinuxNodeConfig.CgroupMode|null); - - /** LinuxNodeConfig hugepages */ - hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); - } - - /** Represents a LinuxNodeConfig. */ - class LinuxNodeConfig implements ILinuxNodeConfig { - - /** - * Constructs a new LinuxNodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILinuxNodeConfig); - - /** LinuxNodeConfig sysctls. */ - public sysctls: { [k: string]: string }; - - /** LinuxNodeConfig cgroupMode. */ - public cgroupMode: (google.container.v1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1.LinuxNodeConfig.CgroupMode); - - /** LinuxNodeConfig hugepages. */ - public hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); - - /** LinuxNodeConfig _hugepages. */ - public _hugepages?: "hugepages"; - - /** - * Creates a new LinuxNodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LinuxNodeConfig instance - */ - public static create(properties?: google.container.v1.ILinuxNodeConfig): google.container.v1.LinuxNodeConfig; - - /** - * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. - * @param message LinuxNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. - * @param message LinuxNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LinuxNodeConfig; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LinuxNodeConfig; - - /** - * Verifies a LinuxNodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LinuxNodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.LinuxNodeConfig; - - /** - * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. - * @param message LinuxNodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.LinuxNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LinuxNodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LinuxNodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LinuxNodeConfig { - - /** CgroupMode enum. */ - enum CgroupMode { - CGROUP_MODE_UNSPECIFIED = 0, - CGROUP_MODE_V1 = 1, - CGROUP_MODE_V2 = 2 - } - - /** Properties of a HugepagesConfig. */ - interface IHugepagesConfig { - - /** HugepagesConfig hugepageSize2m */ - hugepageSize2m?: (number|null); - - /** HugepagesConfig hugepageSize1g */ - hugepageSize1g?: (number|null); - } - - /** Represents a HugepagesConfig. */ - class HugepagesConfig implements IHugepagesConfig { - - /** - * Constructs a new HugepagesConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.LinuxNodeConfig.IHugepagesConfig); - - /** HugepagesConfig hugepageSize2m. */ - public hugepageSize2m?: (number|null); - - /** HugepagesConfig hugepageSize1g. */ - public hugepageSize1g?: (number|null); - - /** HugepagesConfig _hugepageSize2m. */ - public _hugepageSize2m?: "hugepageSize2m"; - - /** HugepagesConfig _hugepageSize1g. */ - public _hugepageSize1g?: "hugepageSize1g"; - - /** - * Creates a new HugepagesConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns HugepagesConfig instance - */ - public static create(properties?: google.container.v1.LinuxNodeConfig.IHugepagesConfig): google.container.v1.LinuxNodeConfig.HugepagesConfig; - - /** - * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @param message HugepagesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @param message HugepagesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LinuxNodeConfig.HugepagesConfig; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LinuxNodeConfig.HugepagesConfig; - - /** - * Verifies a HugepagesConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HugepagesConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.LinuxNodeConfig.HugepagesConfig; - - /** - * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. - * @param message HugepagesConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.LinuxNodeConfig.HugepagesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HugepagesConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HugepagesConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WindowsNodeConfig. */ - interface IWindowsNodeConfig { - - /** WindowsNodeConfig osVersion */ - osVersion?: (google.container.v1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1.WindowsNodeConfig.OSVersion|null); - } - - /** Represents a WindowsNodeConfig. */ - class WindowsNodeConfig implements IWindowsNodeConfig { - - /** - * Constructs a new WindowsNodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IWindowsNodeConfig); - - /** WindowsNodeConfig osVersion. */ - public osVersion: (google.container.v1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1.WindowsNodeConfig.OSVersion); - - /** - * Creates a new WindowsNodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsNodeConfig instance - */ - public static create(properties?: google.container.v1.IWindowsNodeConfig): google.container.v1.WindowsNodeConfig; - - /** - * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. - * @param message WindowsNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. - * @param message WindowsNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WindowsNodeConfig; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WindowsNodeConfig; - - /** - * Verifies a WindowsNodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsNodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.WindowsNodeConfig; - - /** - * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. - * @param message WindowsNodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.WindowsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WindowsNodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WindowsNodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WindowsNodeConfig { - - /** OSVersion enum. */ - enum OSVersion { - OS_VERSION_UNSPECIFIED = 0, - OS_VERSION_LTSC2019 = 1, - OS_VERSION_LTSC2022 = 2 - } - } - - /** Properties of a NodeKubeletConfig. */ - interface INodeKubeletConfig { - - /** NodeKubeletConfig cpuManagerPolicy */ - cpuManagerPolicy?: (string|null); - - /** NodeKubeletConfig cpuCfsQuota */ - cpuCfsQuota?: (google.protobuf.IBoolValue|null); - - /** NodeKubeletConfig cpuCfsQuotaPeriod */ - cpuCfsQuotaPeriod?: (string|null); - - /** NodeKubeletConfig podPidsLimit */ - podPidsLimit?: (number|Long|string|null); - - /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled */ - insecureKubeletReadonlyPortEnabled?: (boolean|null); - } - - /** Represents a NodeKubeletConfig. */ - class NodeKubeletConfig implements INodeKubeletConfig { - - /** - * Constructs a new NodeKubeletConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeKubeletConfig); - - /** NodeKubeletConfig cpuManagerPolicy. */ - public cpuManagerPolicy: string; - - /** NodeKubeletConfig cpuCfsQuota. */ - public cpuCfsQuota?: (google.protobuf.IBoolValue|null); - - /** NodeKubeletConfig cpuCfsQuotaPeriod. */ - public cpuCfsQuotaPeriod: string; - - /** NodeKubeletConfig podPidsLimit. */ - public podPidsLimit: (number|Long|string); - - /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled. */ - public insecureKubeletReadonlyPortEnabled?: (boolean|null); - - /** NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. */ - public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; - - /** - * Creates a new NodeKubeletConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeKubeletConfig instance - */ - public static create(properties?: google.container.v1.INodeKubeletConfig): google.container.v1.NodeKubeletConfig; - - /** - * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. - * @param message NodeKubeletConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. - * @param message NodeKubeletConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeKubeletConfig; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeKubeletConfig; - - /** - * Verifies a NodeKubeletConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeKubeletConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeKubeletConfig; - - /** - * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. - * @param message NodeKubeletConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeKubeletConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeKubeletConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeKubeletConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfig. */ - interface INodeConfig { - - /** NodeConfig machineType */ - machineType?: (string|null); - - /** NodeConfig diskSizeGb */ - diskSizeGb?: (number|null); - - /** NodeConfig oauthScopes */ - oauthScopes?: (string[]|null); - - /** NodeConfig serviceAccount */ - serviceAccount?: (string|null); - - /** NodeConfig metadata */ - metadata?: ({ [k: string]: string }|null); - - /** NodeConfig imageType */ - imageType?: (string|null); - - /** NodeConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** NodeConfig localSsdCount */ - localSsdCount?: (number|null); - - /** NodeConfig tags */ - tags?: (string[]|null); - - /** NodeConfig preemptible */ - preemptible?: (boolean|null); - - /** NodeConfig accelerators */ - accelerators?: (google.container.v1.IAcceleratorConfig[]|null); - - /** NodeConfig diskType */ - diskType?: (string|null); - - /** NodeConfig minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** NodeConfig workloadMetadataConfig */ - workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); - - /** NodeConfig taints */ - taints?: (google.container.v1.INodeTaint[]|null); - - /** NodeConfig sandboxConfig */ - sandboxConfig?: (google.container.v1.ISandboxConfig|null); - - /** NodeConfig nodeGroup */ - nodeGroup?: (string|null); - - /** NodeConfig reservationAffinity */ - reservationAffinity?: (google.container.v1.IReservationAffinity|null); - - /** NodeConfig shieldedInstanceConfig */ - shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); - - /** NodeConfig linuxNodeConfig */ - linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** NodeConfig kubeletConfig */ - kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** NodeConfig bootDiskKmsKey */ - bootDiskKmsKey?: (string|null); - - /** NodeConfig gcfsConfig */ - gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** NodeConfig advancedMachineFeatures */ - advancedMachineFeatures?: (google.container.v1.IAdvancedMachineFeatures|null); - - /** NodeConfig gvnic */ - gvnic?: (google.container.v1.IVirtualNIC|null); - - /** NodeConfig spot */ - spot?: (boolean|null); - - /** NodeConfig confidentialNodes */ - confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** NodeConfig fastSocket */ - fastSocket?: (google.container.v1.IFastSocket|null); - - /** NodeConfig resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** NodeConfig loggingConfig */ - loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** NodeConfig windowsNodeConfig */ - windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); - - /** NodeConfig localNvmeSsdBlockConfig */ - localNvmeSsdBlockConfig?: (google.container.v1.ILocalNvmeSsdBlockConfig|null); - - /** NodeConfig ephemeralStorageLocalSsdConfig */ - ephemeralStorageLocalSsdConfig?: (google.container.v1.IEphemeralStorageLocalSsdConfig|null); - - /** NodeConfig soleTenantConfig */ - soleTenantConfig?: (google.container.v1.ISoleTenantConfig|null); - - /** NodeConfig containerdConfig */ - containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** NodeConfig resourceManagerTags */ - resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** NodeConfig enableConfidentialStorage */ - enableConfidentialStorage?: (boolean|null); - - /** NodeConfig secondaryBootDisks */ - secondaryBootDisks?: (google.container.v1.ISecondaryBootDisk[]|null); - - /** NodeConfig storagePools */ - storagePools?: (string[]|null); - - /** NodeConfig secondaryBootDiskUpdateStrategy */ - secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); - - /** NodeConfig localSsdEncryptionMode */ - localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); - - /** NodeConfig effectiveCgroupMode */ - effectiveCgroupMode?: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode|null); - } - - /** Represents a NodeConfig. */ - class NodeConfig implements INodeConfig { - - /** - * Constructs a new NodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeConfig); - - /** NodeConfig machineType. */ - public machineType: string; - - /** NodeConfig diskSizeGb. */ - public diskSizeGb: number; - - /** NodeConfig oauthScopes. */ - public oauthScopes: string[]; - - /** NodeConfig serviceAccount. */ - public serviceAccount: string; - - /** NodeConfig metadata. */ - public metadata: { [k: string]: string }; - - /** NodeConfig imageType. */ - public imageType: string; - - /** NodeConfig labels. */ - public labels: { [k: string]: string }; - - /** NodeConfig localSsdCount. */ - public localSsdCount: number; - - /** NodeConfig tags. */ - public tags: string[]; - - /** NodeConfig preemptible. */ - public preemptible: boolean; - - /** NodeConfig accelerators. */ - public accelerators: google.container.v1.IAcceleratorConfig[]; - - /** NodeConfig diskType. */ - public diskType: string; - - /** NodeConfig minCpuPlatform. */ - public minCpuPlatform: string; - - /** NodeConfig workloadMetadataConfig. */ - public workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); - - /** NodeConfig taints. */ - public taints: google.container.v1.INodeTaint[]; - - /** NodeConfig sandboxConfig. */ - public sandboxConfig?: (google.container.v1.ISandboxConfig|null); - - /** NodeConfig nodeGroup. */ - public nodeGroup: string; - - /** NodeConfig reservationAffinity. */ - public reservationAffinity?: (google.container.v1.IReservationAffinity|null); - - /** NodeConfig shieldedInstanceConfig. */ - public shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); - - /** NodeConfig linuxNodeConfig. */ - public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** NodeConfig kubeletConfig. */ - public kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** NodeConfig bootDiskKmsKey. */ - public bootDiskKmsKey: string; - - /** NodeConfig gcfsConfig. */ - public gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** NodeConfig advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.container.v1.IAdvancedMachineFeatures|null); - - /** NodeConfig gvnic. */ - public gvnic?: (google.container.v1.IVirtualNIC|null); - - /** NodeConfig spot. */ - public spot: boolean; - - /** NodeConfig confidentialNodes. */ - public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** NodeConfig fastSocket. */ - public fastSocket?: (google.container.v1.IFastSocket|null); - - /** NodeConfig resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** NodeConfig loggingConfig. */ - public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** NodeConfig windowsNodeConfig. */ - public windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); - - /** NodeConfig localNvmeSsdBlockConfig. */ - public localNvmeSsdBlockConfig?: (google.container.v1.ILocalNvmeSsdBlockConfig|null); - - /** NodeConfig ephemeralStorageLocalSsdConfig. */ - public ephemeralStorageLocalSsdConfig?: (google.container.v1.IEphemeralStorageLocalSsdConfig|null); - - /** NodeConfig soleTenantConfig. */ - public soleTenantConfig?: (google.container.v1.ISoleTenantConfig|null); - - /** NodeConfig containerdConfig. */ - public containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** NodeConfig resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** NodeConfig enableConfidentialStorage. */ - public enableConfidentialStorage: boolean; - - /** NodeConfig secondaryBootDisks. */ - public secondaryBootDisks: google.container.v1.ISecondaryBootDisk[]; - - /** NodeConfig storagePools. */ - public storagePools: string[]; - - /** NodeConfig secondaryBootDiskUpdateStrategy. */ - public secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); - - /** NodeConfig localSsdEncryptionMode. */ - public localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); - - /** NodeConfig effectiveCgroupMode. */ - public effectiveCgroupMode: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode); - - /** NodeConfig _fastSocket. */ - public _fastSocket?: "fastSocket"; - - /** NodeConfig _secondaryBootDiskUpdateStrategy. */ - public _secondaryBootDiskUpdateStrategy?: "secondaryBootDiskUpdateStrategy"; - - /** NodeConfig _localSsdEncryptionMode. */ - public _localSsdEncryptionMode?: "localSsdEncryptionMode"; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfig instance - */ - public static create(properties?: google.container.v1.INodeConfig): google.container.v1.NodeConfig; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeConfig; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeConfig; - - /** - * Verifies a NodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeConfig; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @param message NodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeConfig { - - /** LocalSsdEncryptionMode enum. */ - enum LocalSsdEncryptionMode { - LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0, - STANDARD_ENCRYPTION = 1, - EPHEMERAL_KEY_ENCRYPTION = 2 - } - - /** EffectiveCgroupMode enum. */ - enum EffectiveCgroupMode { - EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0, - EFFECTIVE_CGROUP_MODE_V1 = 1, - EFFECTIVE_CGROUP_MODE_V2 = 2 - } - } - - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { - - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|Long|string|null); - - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); - } - - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { - - /** - * Constructs a new AdvancedMachineFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|Long|string|null); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance - */ - public static create(properties?: google.container.v1.IAdvancedMachineFeatures): google.container.v1.AdvancedMachineFeatures; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdvancedMachineFeatures; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdvancedMachineFeatures; - - /** - * Verifies an AdvancedMachineFeatures message. - * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedMachineFeatures - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AdvancedMachineFeatures; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeNetworkConfig. */ - interface INodeNetworkConfig { - - /** NodeNetworkConfig createPodRange */ - createPodRange?: (boolean|null); - - /** NodeNetworkConfig podRange */ - podRange?: (string|null); - - /** NodeNetworkConfig podIpv4CidrBlock */ - podIpv4CidrBlock?: (string|null); - - /** NodeNetworkConfig enablePrivateNodes */ - enablePrivateNodes?: (boolean|null); - - /** NodeNetworkConfig networkPerformanceConfig */ - networkPerformanceConfig?: (google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null); - - /** NodeNetworkConfig podCidrOverprovisionConfig */ - podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); - - /** NodeNetworkConfig additionalNodeNetworkConfigs */ - additionalNodeNetworkConfigs?: (google.container.v1.IAdditionalNodeNetworkConfig[]|null); - - /** NodeNetworkConfig additionalPodNetworkConfigs */ - additionalPodNetworkConfigs?: (google.container.v1.IAdditionalPodNetworkConfig[]|null); - - /** NodeNetworkConfig podIpv4RangeUtilization */ - podIpv4RangeUtilization?: (number|null); - } - - /** Represents a NodeNetworkConfig. */ - class NodeNetworkConfig implements INodeNetworkConfig { - - /** - * Constructs a new NodeNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeNetworkConfig); - - /** NodeNetworkConfig createPodRange. */ - public createPodRange: boolean; - - /** NodeNetworkConfig podRange. */ - public podRange: string; - - /** NodeNetworkConfig podIpv4CidrBlock. */ - public podIpv4CidrBlock: string; - - /** NodeNetworkConfig enablePrivateNodes. */ - public enablePrivateNodes?: (boolean|null); - - /** NodeNetworkConfig networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null); - - /** NodeNetworkConfig podCidrOverprovisionConfig. */ - public podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); - - /** NodeNetworkConfig additionalNodeNetworkConfigs. */ - public additionalNodeNetworkConfigs: google.container.v1.IAdditionalNodeNetworkConfig[]; - - /** NodeNetworkConfig additionalPodNetworkConfigs. */ - public additionalPodNetworkConfigs: google.container.v1.IAdditionalPodNetworkConfig[]; - - /** NodeNetworkConfig podIpv4RangeUtilization. */ - public podIpv4RangeUtilization: number; - - /** NodeNetworkConfig _enablePrivateNodes. */ - public _enablePrivateNodes?: "enablePrivateNodes"; - - /** NodeNetworkConfig _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** - * Creates a new NodeNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeNetworkConfig instance - */ - public static create(properties?: google.container.v1.INodeNetworkConfig): google.container.v1.NodeNetworkConfig; - - /** - * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. - * @param message NodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. - * @param message NodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeNetworkConfig; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeNetworkConfig; - - /** - * Verifies a NodeNetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeNetworkConfig; - - /** - * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. - * @param message NodeNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeNetworkConfig { - - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { - - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - } - - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { - - /** - * Constructs a new NetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig); - - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance - */ - public static create(properties?: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Verifies a NetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - TIER_1 = 1 - } - } - } - - /** Properties of an AdditionalNodeNetworkConfig. */ - interface IAdditionalNodeNetworkConfig { - - /** AdditionalNodeNetworkConfig network */ - network?: (string|null); - - /** AdditionalNodeNetworkConfig subnetwork */ - subnetwork?: (string|null); - } - - /** Represents an AdditionalNodeNetworkConfig. */ - class AdditionalNodeNetworkConfig implements IAdditionalNodeNetworkConfig { - - /** - * Constructs a new AdditionalNodeNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAdditionalNodeNetworkConfig); - - /** AdditionalNodeNetworkConfig network. */ - public network: string; - - /** AdditionalNodeNetworkConfig subnetwork. */ - public subnetwork: string; - - /** - * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalNodeNetworkConfig instance - */ - public static create(properties?: google.container.v1.IAdditionalNodeNetworkConfig): google.container.v1.AdditionalNodeNetworkConfig; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @param message AdditionalNodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @param message AdditionalNodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalNodeNetworkConfig; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalNodeNetworkConfig; - - /** - * Verifies an AdditionalNodeNetworkConfig message. - * @param message Plain 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 AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalNodeNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalNodeNetworkConfig; - - /** - * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. - * @param message AdditionalNodeNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AdditionalNodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalNodeNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalNodeNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdditionalPodNetworkConfig. */ - interface IAdditionalPodNetworkConfig { - - /** AdditionalPodNetworkConfig subnetwork */ - subnetwork?: (string|null); - - /** AdditionalPodNetworkConfig secondaryPodRange */ - secondaryPodRange?: (string|null); - - /** AdditionalPodNetworkConfig maxPodsPerNode */ - maxPodsPerNode?: (google.container.v1.IMaxPodsConstraint|null); - } - - /** Represents an AdditionalPodNetworkConfig. */ - class AdditionalPodNetworkConfig implements IAdditionalPodNetworkConfig { - - /** - * Constructs a new AdditionalPodNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAdditionalPodNetworkConfig); - - /** AdditionalPodNetworkConfig subnetwork. */ - public subnetwork: string; - - /** AdditionalPodNetworkConfig secondaryPodRange. */ - public secondaryPodRange: string; - - /** AdditionalPodNetworkConfig maxPodsPerNode. */ - public maxPodsPerNode?: (google.container.v1.IMaxPodsConstraint|null); - - /** AdditionalPodNetworkConfig _maxPodsPerNode. */ - public _maxPodsPerNode?: "maxPodsPerNode"; - - /** - * Creates a new AdditionalPodNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalPodNetworkConfig instance - */ - public static create(properties?: google.container.v1.IAdditionalPodNetworkConfig): google.container.v1.AdditionalPodNetworkConfig; - - /** - * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. - * @param message AdditionalPodNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. - * @param message AdditionalPodNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalPodNetworkConfig; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalPodNetworkConfig; - - /** - * Verifies an AdditionalPodNetworkConfig message. - * @param message Plain 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 AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalPodNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalPodNetworkConfig; - - /** - * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. - * @param message AdditionalPodNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AdditionalPodNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalPodNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalPodNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShieldedInstanceConfig. */ - interface IShieldedInstanceConfig { - - /** ShieldedInstanceConfig enableSecureBoot */ - enableSecureBoot?: (boolean|null); - - /** ShieldedInstanceConfig enableIntegrityMonitoring */ - enableIntegrityMonitoring?: (boolean|null); - } - - /** Represents a ShieldedInstanceConfig. */ - class ShieldedInstanceConfig implements IShieldedInstanceConfig { - - /** - * Constructs a new ShieldedInstanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IShieldedInstanceConfig); - - /** ShieldedInstanceConfig enableSecureBoot. */ - public enableSecureBoot: boolean; - - /** ShieldedInstanceConfig enableIntegrityMonitoring. */ - public enableIntegrityMonitoring: boolean; - - /** - * Creates a new ShieldedInstanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ShieldedInstanceConfig instance - */ - public static create(properties?: google.container.v1.IShieldedInstanceConfig): google.container.v1.ShieldedInstanceConfig; - - /** - * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. - * @param message ShieldedInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. - * @param message ShieldedInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ShieldedInstanceConfig; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ShieldedInstanceConfig; - - /** - * Verifies a ShieldedInstanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShieldedInstanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ShieldedInstanceConfig; - - /** - * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. - * @param message ShieldedInstanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ShieldedInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShieldedInstanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShieldedInstanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SandboxConfig. */ - interface ISandboxConfig { - - /** SandboxConfig type */ - type?: (google.container.v1.SandboxConfig.Type|keyof typeof google.container.v1.SandboxConfig.Type|null); - } - - /** Represents a SandboxConfig. */ - class SandboxConfig implements ISandboxConfig { - - /** - * Constructs a new SandboxConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISandboxConfig); - - /** SandboxConfig type. */ - public type: (google.container.v1.SandboxConfig.Type|keyof typeof google.container.v1.SandboxConfig.Type); - - /** - * Creates a new SandboxConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SandboxConfig instance - */ - public static create(properties?: google.container.v1.ISandboxConfig): google.container.v1.SandboxConfig; - - /** - * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. - * @param message SandboxConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. - * @param message SandboxConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SandboxConfig; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SandboxConfig; - - /** - * Verifies a SandboxConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SandboxConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SandboxConfig; - - /** - * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. - * @param message SandboxConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SandboxConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SandboxConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SandboxConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SandboxConfig { - - /** Type enum. */ - enum Type { - UNSPECIFIED = 0, - GVISOR = 1 - } - } - - /** Properties of a GcfsConfig. */ - interface IGcfsConfig { - - /** GcfsConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcfsConfig. */ - class GcfsConfig implements IGcfsConfig { - - /** - * Constructs a new GcfsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGcfsConfig); - - /** GcfsConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcfsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcfsConfig instance - */ - public static create(properties?: google.container.v1.IGcfsConfig): google.container.v1.GcfsConfig; - - /** - * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. - * @param message GcfsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. - * @param message GcfsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcfsConfig; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcfsConfig; - - /** - * Verifies a GcfsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcfsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GcfsConfig; - - /** - * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. - * @param message GcfsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GcfsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcfsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcfsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservationAffinity. */ - interface IReservationAffinity { - - /** ReservationAffinity consumeReservationType */ - consumeReservationType?: (google.container.v1.ReservationAffinity.Type|keyof typeof google.container.v1.ReservationAffinity.Type|null); - - /** ReservationAffinity key */ - key?: (string|null); - - /** ReservationAffinity values */ - values?: (string[]|null); - } - - /** Represents a ReservationAffinity. */ - class ReservationAffinity implements IReservationAffinity { - - /** - * Constructs a new ReservationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IReservationAffinity); - - /** ReservationAffinity consumeReservationType. */ - public consumeReservationType: (google.container.v1.ReservationAffinity.Type|keyof typeof google.container.v1.ReservationAffinity.Type); - - /** ReservationAffinity key. */ - public key: string; - - /** ReservationAffinity values. */ - public values: string[]; - - /** - * Creates a new ReservationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservationAffinity instance - */ - public static create(properties?: google.container.v1.IReservationAffinity): google.container.v1.ReservationAffinity; - - /** - * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. - * @param message ReservationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. - * @param message ReservationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ReservationAffinity; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ReservationAffinity; - - /** - * Verifies a ReservationAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ReservationAffinity; - - /** - * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. - * @param message ReservationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ReservationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReservationAffinity { - - /** Type enum. */ - enum Type { - UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } - - /** Properties of a SoleTenantConfig. */ - interface ISoleTenantConfig { - - /** SoleTenantConfig nodeAffinities */ - nodeAffinities?: (google.container.v1.SoleTenantConfig.INodeAffinity[]|null); - } - - /** Represents a SoleTenantConfig. */ - class SoleTenantConfig implements ISoleTenantConfig { - - /** - * Constructs a new SoleTenantConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISoleTenantConfig); - - /** SoleTenantConfig nodeAffinities. */ - public nodeAffinities: google.container.v1.SoleTenantConfig.INodeAffinity[]; - - /** - * Creates a new SoleTenantConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SoleTenantConfig instance - */ - public static create(properties?: google.container.v1.ISoleTenantConfig): google.container.v1.SoleTenantConfig; - - /** - * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. - * @param message SoleTenantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. - * @param message SoleTenantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SoleTenantConfig; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SoleTenantConfig; - - /** - * Verifies a SoleTenantConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoleTenantConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SoleTenantConfig; - - /** - * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. - * @param message SoleTenantConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SoleTenantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SoleTenantConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SoleTenantConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SoleTenantConfig { - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.container.v1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1.SoleTenantConfig.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.SoleTenantConfig.INodeAffinity); - - /** NodeAffinity key. */ - public key: string; - - /** NodeAffinity operator. */ - public operator: (google.container.v1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1.SoleTenantConfig.NodeAffinity.Operator); - - /** NodeAffinity values. */ - public values: string[]; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.container.v1.SoleTenantConfig.INodeAffinity): google.container.v1.SoleTenantConfig.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SoleTenantConfig.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SoleTenantConfig.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SoleTenantConfig.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SoleTenantConfig.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - } - - /** Properties of a ContainerdConfig. */ - interface IContainerdConfig { - - /** ContainerdConfig privateRegistryAccessConfig */ - privateRegistryAccessConfig?: (google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null); - } - - /** Represents a ContainerdConfig. */ - class ContainerdConfig implements IContainerdConfig { - - /** - * Constructs a new ContainerdConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IContainerdConfig); - - /** ContainerdConfig privateRegistryAccessConfig. */ - public privateRegistryAccessConfig?: (google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null); - - /** - * Creates a new ContainerdConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ContainerdConfig instance - */ - public static create(properties?: google.container.v1.IContainerdConfig): google.container.v1.ContainerdConfig; - - /** - * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. - * @param message ContainerdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. - * @param message ContainerdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig; - - /** - * Verifies a ContainerdConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContainerdConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig; - - /** - * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. - * @param message ContainerdConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ContainerdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContainerdConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContainerdConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ContainerdConfig { - - /** Properties of a PrivateRegistryAccessConfig. */ - interface IPrivateRegistryAccessConfig { - - /** PrivateRegistryAccessConfig enabled */ - enabled?: (boolean|null); - - /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig */ - certificateAuthorityDomainConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]|null); - } - - /** Represents a PrivateRegistryAccessConfig. */ - class PrivateRegistryAccessConfig implements IPrivateRegistryAccessConfig { - - /** - * Constructs a new PrivateRegistryAccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig); - - /** PrivateRegistryAccessConfig enabled. */ - public enabled: boolean; - - /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig. */ - public certificateAuthorityDomainConfig: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]; - - /** - * Creates a new PrivateRegistryAccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateRegistryAccessConfig instance - */ - public static create(properties?: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @param message PrivateRegistryAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @param message PrivateRegistryAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Verifies a PrivateRegistryAccessConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateRegistryAccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. - * @param message PrivateRegistryAccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateRegistryAccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateRegistryAccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PrivateRegistryAccessConfig { - - /** Properties of a CertificateAuthorityDomainConfig. */ - interface ICertificateAuthorityDomainConfig { - - /** CertificateAuthorityDomainConfig fqdns */ - fqdns?: (string[]|null); - - /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig */ - gcpSecretManagerCertificateConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); - } - - /** Represents a CertificateAuthorityDomainConfig. */ - class CertificateAuthorityDomainConfig implements ICertificateAuthorityDomainConfig { - - /** - * Constructs a new CertificateAuthorityDomainConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig); - - /** CertificateAuthorityDomainConfig fqdns. */ - public fqdns: string[]; - - /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. */ - public gcpSecretManagerCertificateConfig?: (google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); - - /** CertificateAuthorityDomainConfig certificateConfig. */ - public certificateConfig?: "gcpSecretManagerCertificateConfig"; - - /** - * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CertificateAuthorityDomainConfig instance - */ - public static create(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @param message CertificateAuthorityDomainConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @param message CertificateAuthorityDomainConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Verifies a CertificateAuthorityDomainConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CertificateAuthorityDomainConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. - * @param message CertificateAuthorityDomainConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CertificateAuthorityDomainConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CertificateAuthorityDomainConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CertificateAuthorityDomainConfig { - - /** Properties of a GCPSecretManagerCertificateConfig. */ - interface IGCPSecretManagerCertificateConfig { - - /** GCPSecretManagerCertificateConfig secretUri */ - secretUri?: (string|null); - } - - /** Represents a GCPSecretManagerCertificateConfig. */ - class GCPSecretManagerCertificateConfig implements IGCPSecretManagerCertificateConfig { - - /** - * Constructs a new GCPSecretManagerCertificateConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig); - - /** GCPSecretManagerCertificateConfig secretUri. */ - public secretUri: string; - - /** - * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GCPSecretManagerCertificateConfig instance - */ - public static create(properties?: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @param message GCPSecretManagerCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @param message GCPSecretManagerCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Verifies a GCPSecretManagerCertificateConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCPSecretManagerCertificateConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. - * @param message GCPSecretManagerCertificateConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCPSecretManagerCertificateConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCPSecretManagerCertificateConfig - * @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.container.v1.NodeTaint.Effect|keyof typeof google.container.v1.NodeTaint.Effect|null); - } - - /** Represents a NodeTaint. */ - class NodeTaint implements INodeTaint { - - /** - * Constructs a new NodeTaint. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeTaint); - - /** NodeTaint key. */ - public key: string; - - /** NodeTaint value. */ - public value: string; - - /** NodeTaint effect. */ - public effect: (google.container.v1.NodeTaint.Effect|keyof typeof google.container.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.container.v1.INodeTaint): google.container.v1.NodeTaint; - - /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.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.container.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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 NodeTaints. */ - interface INodeTaints { - - /** NodeTaints taints */ - taints?: (google.container.v1.INodeTaint[]|null); - } - - /** Represents a NodeTaints. */ - class NodeTaints implements INodeTaints { - - /** - * Constructs a new NodeTaints. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeTaints); - - /** NodeTaints taints. */ - public taints: google.container.v1.INodeTaint[]; - - /** - * Creates a new NodeTaints instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeTaints instance - */ - public static create(properties?: google.container.v1.INodeTaints): google.container.v1.NodeTaints; - - /** - * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. - * @param message NodeTaints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. - * @param message NodeTaints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeTaints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeTaints; - - /** - * Decodes a NodeTaints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeTaints; - - /** - * Verifies a NodeTaints message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeTaints - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeTaints; - - /** - * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. - * @param message NodeTaints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeTaints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeTaints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeTaints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeLabels. */ - interface INodeLabels { - - /** NodeLabels labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a NodeLabels. */ - class NodeLabels implements INodeLabels { - - /** - * Constructs a new NodeLabels. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeLabels); - - /** NodeLabels labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new NodeLabels instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeLabels instance - */ - public static create(properties?: google.container.v1.INodeLabels): google.container.v1.NodeLabels; - - /** - * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. - * @param message NodeLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. - * @param message NodeLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeLabels message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeLabels; - - /** - * Decodes a NodeLabels message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeLabels; - - /** - * Verifies a NodeLabels message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeLabels - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeLabels; - - /** - * Creates a plain object from a NodeLabels message. Also converts values to other types if specified. - * @param message NodeLabels - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeLabels to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeLabels - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceLabels. */ - interface IResourceLabels { - - /** ResourceLabels labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a ResourceLabels. */ - class ResourceLabels implements IResourceLabels { - - /** - * Constructs a new ResourceLabels. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IResourceLabels); - - /** ResourceLabels labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new ResourceLabels instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceLabels instance - */ - public static create(properties?: google.container.v1.IResourceLabels): google.container.v1.ResourceLabels; - - /** - * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. - * @param message ResourceLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. - * @param message ResourceLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceLabels; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceLabels; - - /** - * Verifies a ResourceLabels message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceLabels - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceLabels; - - /** - * Creates a plain object from a ResourceLabels message. Also converts values to other types if specified. - * @param message ResourceLabels - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceLabels to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceLabels - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkTags. */ - interface INetworkTags { - - /** NetworkTags tags */ - tags?: (string[]|null); - } - - /** Represents a NetworkTags. */ - class NetworkTags implements INetworkTags { - - /** - * Constructs a new NetworkTags. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INetworkTags); - - /** NetworkTags tags. */ - public tags: string[]; - - /** - * Creates a new NetworkTags instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkTags instance - */ - public static create(properties?: google.container.v1.INetworkTags): google.container.v1.NetworkTags; - - /** - * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. - * @param message NetworkTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. - * @param message NetworkTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkTags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkTags; - - /** - * Decodes a NetworkTags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkTags; - - /** - * Verifies a NetworkTags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkTags - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkTags; - - /** - * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. - * @param message NetworkTags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NetworkTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkTags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkTags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MasterAuth. */ - interface IMasterAuth { - - /** MasterAuth username */ - username?: (string|null); - - /** MasterAuth password */ - password?: (string|null); - - /** MasterAuth clientCertificateConfig */ - clientCertificateConfig?: (google.container.v1.IClientCertificateConfig|null); - - /** MasterAuth clusterCaCertificate */ - clusterCaCertificate?: (string|null); - - /** MasterAuth clientCertificate */ - clientCertificate?: (string|null); - - /** MasterAuth clientKey */ - clientKey?: (string|null); - } - - /** Represents a MasterAuth. */ - class MasterAuth implements IMasterAuth { - - /** - * Constructs a new MasterAuth. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMasterAuth); - - /** MasterAuth username. */ - public username: string; - - /** MasterAuth password. */ - public password: string; - - /** MasterAuth clientCertificateConfig. */ - public clientCertificateConfig?: (google.container.v1.IClientCertificateConfig|null); - - /** MasterAuth clusterCaCertificate. */ - public clusterCaCertificate: string; - - /** MasterAuth clientCertificate. */ - public clientCertificate: string; - - /** MasterAuth clientKey. */ - public clientKey: string; - - /** - * Creates a new MasterAuth instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuth instance - */ - public static create(properties?: google.container.v1.IMasterAuth): google.container.v1.MasterAuth; - - /** - * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. - * @param message MasterAuth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. - * @param message MasterAuth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuth; - - /** - * Decodes a MasterAuth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuth; - - /** - * Verifies a MasterAuth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuth - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuth; - - /** - * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. - * @param message MasterAuth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MasterAuth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientCertificateConfig. */ - interface IClientCertificateConfig { - - /** ClientCertificateConfig issueClientCertificate */ - issueClientCertificate?: (boolean|null); - } - - /** Represents a ClientCertificateConfig. */ - class ClientCertificateConfig implements IClientCertificateConfig { - - /** - * Constructs a new ClientCertificateConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IClientCertificateConfig); - - /** ClientCertificateConfig issueClientCertificate. */ - public issueClientCertificate: boolean; - - /** - * Creates a new ClientCertificateConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientCertificateConfig instance - */ - public static create(properties?: google.container.v1.IClientCertificateConfig): google.container.v1.ClientCertificateConfig; - - /** - * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. - * @param message ClientCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. - * @param message ClientCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClientCertificateConfig; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClientCertificateConfig; - - /** - * Verifies a ClientCertificateConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientCertificateConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ClientCertificateConfig; - - /** - * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. - * @param message ClientCertificateConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ClientCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientCertificateConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientCertificateConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddonsConfig. */ - interface IAddonsConfig { - - /** AddonsConfig httpLoadBalancing */ - httpLoadBalancing?: (google.container.v1.IHttpLoadBalancing|null); - - /** AddonsConfig horizontalPodAutoscaling */ - horizontalPodAutoscaling?: (google.container.v1.IHorizontalPodAutoscaling|null); - - /** AddonsConfig kubernetesDashboard */ - kubernetesDashboard?: (google.container.v1.IKubernetesDashboard|null); - - /** AddonsConfig networkPolicyConfig */ - networkPolicyConfig?: (google.container.v1.INetworkPolicyConfig|null); - - /** AddonsConfig cloudRunConfig */ - cloudRunConfig?: (google.container.v1.ICloudRunConfig|null); - - /** AddonsConfig dnsCacheConfig */ - dnsCacheConfig?: (google.container.v1.IDnsCacheConfig|null); - - /** AddonsConfig configConnectorConfig */ - configConnectorConfig?: (google.container.v1.IConfigConnectorConfig|null); - - /** AddonsConfig gcePersistentDiskCsiDriverConfig */ - gcePersistentDiskCsiDriverConfig?: (google.container.v1.IGcePersistentDiskCsiDriverConfig|null); - - /** AddonsConfig gcpFilestoreCsiDriverConfig */ - gcpFilestoreCsiDriverConfig?: (google.container.v1.IGcpFilestoreCsiDriverConfig|null); - - /** AddonsConfig gkeBackupAgentConfig */ - gkeBackupAgentConfig?: (google.container.v1.IGkeBackupAgentConfig|null); - - /** AddonsConfig gcsFuseCsiDriverConfig */ - gcsFuseCsiDriverConfig?: (google.container.v1.IGcsFuseCsiDriverConfig|null); - - /** AddonsConfig statefulHaConfig */ - statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); - - /** AddonsConfig parallelstoreCsiDriverConfig */ - parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); - - /** AddonsConfig rayOperatorConfig */ - rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); - } - - /** Represents an AddonsConfig. */ - class AddonsConfig implements IAddonsConfig { - - /** - * Constructs a new AddonsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAddonsConfig); - - /** AddonsConfig httpLoadBalancing. */ - public httpLoadBalancing?: (google.container.v1.IHttpLoadBalancing|null); - - /** AddonsConfig horizontalPodAutoscaling. */ - public horizontalPodAutoscaling?: (google.container.v1.IHorizontalPodAutoscaling|null); - - /** AddonsConfig kubernetesDashboard. */ - public kubernetesDashboard?: (google.container.v1.IKubernetesDashboard|null); - - /** AddonsConfig networkPolicyConfig. */ - public networkPolicyConfig?: (google.container.v1.INetworkPolicyConfig|null); - - /** AddonsConfig cloudRunConfig. */ - public cloudRunConfig?: (google.container.v1.ICloudRunConfig|null); - - /** AddonsConfig dnsCacheConfig. */ - public dnsCacheConfig?: (google.container.v1.IDnsCacheConfig|null); - - /** AddonsConfig configConnectorConfig. */ - public configConnectorConfig?: (google.container.v1.IConfigConnectorConfig|null); - - /** AddonsConfig gcePersistentDiskCsiDriverConfig. */ - public gcePersistentDiskCsiDriverConfig?: (google.container.v1.IGcePersistentDiskCsiDriverConfig|null); - - /** AddonsConfig gcpFilestoreCsiDriverConfig. */ - public gcpFilestoreCsiDriverConfig?: (google.container.v1.IGcpFilestoreCsiDriverConfig|null); - - /** AddonsConfig gkeBackupAgentConfig. */ - public gkeBackupAgentConfig?: (google.container.v1.IGkeBackupAgentConfig|null); - - /** AddonsConfig gcsFuseCsiDriverConfig. */ - public gcsFuseCsiDriverConfig?: (google.container.v1.IGcsFuseCsiDriverConfig|null); - - /** AddonsConfig statefulHaConfig. */ - public statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); - - /** AddonsConfig parallelstoreCsiDriverConfig. */ - public parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); - - /** AddonsConfig rayOperatorConfig. */ - public rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); - - /** - * Creates a new AddonsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AddonsConfig instance - */ - public static create(properties?: google.container.v1.IAddonsConfig): google.container.v1.AddonsConfig; - - /** - * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. - * @param message AddonsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. - * @param message AddonsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AddonsConfig; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AddonsConfig; - - /** - * Verifies an AddonsConfig message. - * @param message Plain 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 AddonsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddonsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AddonsConfig; - - /** - * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. - * @param message AddonsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AddonsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddonsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddonsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpLoadBalancing. */ - interface IHttpLoadBalancing { - - /** HttpLoadBalancing disabled */ - disabled?: (boolean|null); - } - - /** Represents a HttpLoadBalancing. */ - class HttpLoadBalancing implements IHttpLoadBalancing { - - /** - * Constructs a new HttpLoadBalancing. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IHttpLoadBalancing); - - /** HttpLoadBalancing disabled. */ - public disabled: boolean; - - /** - * Creates a new HttpLoadBalancing instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpLoadBalancing instance - */ - public static create(properties?: google.container.v1.IHttpLoadBalancing): google.container.v1.HttpLoadBalancing; - - /** - * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. - * @param message HttpLoadBalancing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. - * @param message HttpLoadBalancing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.HttpLoadBalancing; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.HttpLoadBalancing; - - /** - * Verifies a HttpLoadBalancing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpLoadBalancing - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.HttpLoadBalancing; - - /** - * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. - * @param message HttpLoadBalancing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.HttpLoadBalancing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpLoadBalancing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpLoadBalancing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HorizontalPodAutoscaling. */ - interface IHorizontalPodAutoscaling { - - /** HorizontalPodAutoscaling disabled */ - disabled?: (boolean|null); - } - - /** Represents a HorizontalPodAutoscaling. */ - class HorizontalPodAutoscaling implements IHorizontalPodAutoscaling { - - /** - * Constructs a new HorizontalPodAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IHorizontalPodAutoscaling); - - /** HorizontalPodAutoscaling disabled. */ - public disabled: boolean; - - /** - * Creates a new HorizontalPodAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns HorizontalPodAutoscaling instance - */ - public static create(properties?: google.container.v1.IHorizontalPodAutoscaling): google.container.v1.HorizontalPodAutoscaling; - - /** - * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. - * @param message HorizontalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. - * @param message HorizontalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.HorizontalPodAutoscaling; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.HorizontalPodAutoscaling; - - /** - * Verifies a HorizontalPodAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HorizontalPodAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.HorizontalPodAutoscaling; - - /** - * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. - * @param message HorizontalPodAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.HorizontalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HorizontalPodAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HorizontalPodAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KubernetesDashboard. */ - interface IKubernetesDashboard { - - /** KubernetesDashboard disabled */ - disabled?: (boolean|null); - } - - /** Represents a KubernetesDashboard. */ - class KubernetesDashboard implements IKubernetesDashboard { - - /** - * Constructs a new KubernetesDashboard. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IKubernetesDashboard); - - /** KubernetesDashboard disabled. */ - public disabled: boolean; - - /** - * Creates a new KubernetesDashboard instance using the specified properties. - * @param [properties] Properties to set - * @returns KubernetesDashboard instance - */ - public static create(properties?: google.container.v1.IKubernetesDashboard): google.container.v1.KubernetesDashboard; - - /** - * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. - * @param message KubernetesDashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. - * @param message KubernetesDashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.KubernetesDashboard; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.KubernetesDashboard; - - /** - * Verifies a KubernetesDashboard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KubernetesDashboard - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.KubernetesDashboard; - - /** - * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. - * @param message KubernetesDashboard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.KubernetesDashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KubernetesDashboard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KubernetesDashboard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkPolicyConfig. */ - interface INetworkPolicyConfig { - - /** NetworkPolicyConfig disabled */ - disabled?: (boolean|null); - } - - /** Represents a NetworkPolicyConfig. */ - class NetworkPolicyConfig implements INetworkPolicyConfig { - - /** - * Constructs a new NetworkPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INetworkPolicyConfig); - - /** NetworkPolicyConfig disabled. */ - public disabled: boolean; - - /** - * Creates a new NetworkPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPolicyConfig instance - */ - public static create(properties?: google.container.v1.INetworkPolicyConfig): google.container.v1.NetworkPolicyConfig; - - /** - * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. - * @param message NetworkPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. - * @param message NetworkPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkPolicyConfig; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkPolicyConfig; - - /** - * Verifies a NetworkPolicyConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkPolicyConfig; - - /** - * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. - * @param message NetworkPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NetworkPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DnsCacheConfig. */ - interface IDnsCacheConfig { - - /** DnsCacheConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a DnsCacheConfig. */ - class DnsCacheConfig implements IDnsCacheConfig { - - /** - * Constructs a new DnsCacheConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDnsCacheConfig); - - /** DnsCacheConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new DnsCacheConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DnsCacheConfig instance - */ - public static create(properties?: google.container.v1.IDnsCacheConfig): google.container.v1.DnsCacheConfig; - - /** - * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. - * @param message DnsCacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. - * @param message DnsCacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DnsCacheConfig; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DnsCacheConfig; - - /** - * Verifies a DnsCacheConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DnsCacheConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DnsCacheConfig; - - /** - * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. - * @param message DnsCacheConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DnsCacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DnsCacheConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DnsCacheConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterMasterGlobalAccessConfig. */ - interface IPrivateClusterMasterGlobalAccessConfig { - - /** PrivateClusterMasterGlobalAccessConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a PrivateClusterMasterGlobalAccessConfig. */ - class PrivateClusterMasterGlobalAccessConfig implements IPrivateClusterMasterGlobalAccessConfig { - - /** - * Constructs a new PrivateClusterMasterGlobalAccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IPrivateClusterMasterGlobalAccessConfig); - - /** PrivateClusterMasterGlobalAccessConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterMasterGlobalAccessConfig instance - */ - public static create(properties?: google.container.v1.IPrivateClusterMasterGlobalAccessConfig): google.container.v1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Verifies a PrivateClusterMasterGlobalAccessConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterMasterGlobalAccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. - * @param message PrivateClusterMasterGlobalAccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.PrivateClusterMasterGlobalAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterMasterGlobalAccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterConfig. */ - interface IPrivateClusterConfig { - - /** PrivateClusterConfig enablePrivateNodes */ - enablePrivateNodes?: (boolean|null); - - /** PrivateClusterConfig enablePrivateEndpoint */ - enablePrivateEndpoint?: (boolean|null); - - /** PrivateClusterConfig masterIpv4CidrBlock */ - masterIpv4CidrBlock?: (string|null); - - /** PrivateClusterConfig privateEndpoint */ - privateEndpoint?: (string|null); - - /** PrivateClusterConfig publicEndpoint */ - publicEndpoint?: (string|null); - - /** PrivateClusterConfig peeringName */ - peeringName?: (string|null); - - /** PrivateClusterConfig masterGlobalAccessConfig */ - masterGlobalAccessConfig?: (google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null); - - /** PrivateClusterConfig privateEndpointSubnetwork */ - privateEndpointSubnetwork?: (string|null); - } - - /** Represents a PrivateClusterConfig. */ - class PrivateClusterConfig implements IPrivateClusterConfig { - - /** - * Constructs a new PrivateClusterConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IPrivateClusterConfig); - - /** PrivateClusterConfig enablePrivateNodes. */ - public enablePrivateNodes: boolean; - - /** PrivateClusterConfig enablePrivateEndpoint. */ - public enablePrivateEndpoint: boolean; - - /** PrivateClusterConfig masterIpv4CidrBlock. */ - public masterIpv4CidrBlock: string; - - /** PrivateClusterConfig privateEndpoint. */ - public privateEndpoint: string; - - /** PrivateClusterConfig publicEndpoint. */ - public publicEndpoint: string; - - /** PrivateClusterConfig peeringName. */ - public peeringName: string; - - /** PrivateClusterConfig masterGlobalAccessConfig. */ - public masterGlobalAccessConfig?: (google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null); - - /** PrivateClusterConfig privateEndpointSubnetwork. */ - public privateEndpointSubnetwork: string; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterConfig instance - */ - public static create(properties?: google.container.v1.IPrivateClusterConfig): google.container.v1.PrivateClusterConfig; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PrivateClusterConfig; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PrivateClusterConfig; - - /** - * Verifies a PrivateClusterConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.PrivateClusterConfig; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @param message PrivateClusterConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuthenticatorGroupsConfig. */ - interface IAuthenticatorGroupsConfig { - - /** AuthenticatorGroupsConfig enabled */ - enabled?: (boolean|null); - - /** AuthenticatorGroupsConfig securityGroup */ - securityGroup?: (string|null); - } - - /** Represents an AuthenticatorGroupsConfig. */ - class AuthenticatorGroupsConfig implements IAuthenticatorGroupsConfig { - - /** - * Constructs a new AuthenticatorGroupsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAuthenticatorGroupsConfig); - - /** AuthenticatorGroupsConfig enabled. */ - public enabled: boolean; - - /** AuthenticatorGroupsConfig securityGroup. */ - public securityGroup: string; - - /** - * Creates a new AuthenticatorGroupsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthenticatorGroupsConfig instance - */ - public static create(properties?: google.container.v1.IAuthenticatorGroupsConfig): google.container.v1.AuthenticatorGroupsConfig; - - /** - * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. - * @param message AuthenticatorGroupsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. - * @param message AuthenticatorGroupsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AuthenticatorGroupsConfig; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AuthenticatorGroupsConfig; - - /** - * Verifies an AuthenticatorGroupsConfig message. - * @param message Plain 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 AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthenticatorGroupsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AuthenticatorGroupsConfig; - - /** - * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. - * @param message AuthenticatorGroupsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AuthenticatorGroupsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthenticatorGroupsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuthenticatorGroupsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunConfig. */ - interface ICloudRunConfig { - - /** CloudRunConfig disabled */ - disabled?: (boolean|null); - - /** CloudRunConfig loadBalancerType */ - loadBalancerType?: (google.container.v1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1.CloudRunConfig.LoadBalancerType|null); - } - - /** Represents a CloudRunConfig. */ - class CloudRunConfig implements ICloudRunConfig { - - /** - * Constructs a new CloudRunConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICloudRunConfig); - - /** CloudRunConfig disabled. */ - public disabled: boolean; - - /** CloudRunConfig loadBalancerType. */ - public loadBalancerType: (google.container.v1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1.CloudRunConfig.LoadBalancerType); - - /** - * Creates a new CloudRunConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunConfig instance - */ - public static create(properties?: google.container.v1.ICloudRunConfig): google.container.v1.CloudRunConfig; - - /** - * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. - * @param message CloudRunConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. - * @param message CloudRunConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CloudRunConfig; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CloudRunConfig; - - /** - * Verifies a CloudRunConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CloudRunConfig; - - /** - * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. - * @param message CloudRunConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CloudRunConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudRunConfig { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - LOAD_BALANCER_TYPE_EXTERNAL = 1, - LOAD_BALANCER_TYPE_INTERNAL = 2 - } - } - - /** Properties of a ConfigConnectorConfig. */ - interface IConfigConnectorConfig { - - /** ConfigConnectorConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConfigConnectorConfig. */ - class ConfigConnectorConfig implements IConfigConnectorConfig { - - /** - * Constructs a new ConfigConnectorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IConfigConnectorConfig); - - /** ConfigConnectorConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ConfigConnectorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfigConnectorConfig instance - */ - public static create(properties?: google.container.v1.IConfigConnectorConfig): google.container.v1.ConfigConnectorConfig; - - /** - * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. - * @param message ConfigConnectorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. - * @param message ConfigConnectorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ConfigConnectorConfig; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ConfigConnectorConfig; - - /** - * Verifies a ConfigConnectorConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfigConnectorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ConfigConnectorConfig; - - /** - * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. - * @param message ConfigConnectorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ConfigConnectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfigConnectorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfigConnectorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcePersistentDiskCsiDriverConfig. */ - interface IGcePersistentDiskCsiDriverConfig { - - /** GcePersistentDiskCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcePersistentDiskCsiDriverConfig. */ - class GcePersistentDiskCsiDriverConfig implements IGcePersistentDiskCsiDriverConfig { - - /** - * Constructs a new GcePersistentDiskCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGcePersistentDiskCsiDriverConfig); - - /** GcePersistentDiskCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcePersistentDiskCsiDriverConfig instance - */ - public static create(properties?: google.container.v1.IGcePersistentDiskCsiDriverConfig): google.container.v1.GcePersistentDiskCsiDriverConfig; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcePersistentDiskCsiDriverConfig; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcePersistentDiskCsiDriverConfig; - - /** - * Verifies a GcePersistentDiskCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcePersistentDiskCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GcePersistentDiskCsiDriverConfig; - - /** - * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcePersistentDiskCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GcePersistentDiskCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcePersistentDiskCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcePersistentDiskCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcpFilestoreCsiDriverConfig. */ - interface IGcpFilestoreCsiDriverConfig { - - /** GcpFilestoreCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcpFilestoreCsiDriverConfig. */ - class GcpFilestoreCsiDriverConfig implements IGcpFilestoreCsiDriverConfig { - - /** - * Constructs a new GcpFilestoreCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGcpFilestoreCsiDriverConfig); - - /** GcpFilestoreCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpFilestoreCsiDriverConfig instance - */ - public static create(properties?: google.container.v1.IGcpFilestoreCsiDriverConfig): google.container.v1.GcpFilestoreCsiDriverConfig; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @param message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @param message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcpFilestoreCsiDriverConfig; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcpFilestoreCsiDriverConfig; - - /** - * Verifies a GcpFilestoreCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpFilestoreCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GcpFilestoreCsiDriverConfig; - - /** - * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcpFilestoreCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GcpFilestoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpFilestoreCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpFilestoreCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsFuseCsiDriverConfig. */ - interface IGcsFuseCsiDriverConfig { - - /** GcsFuseCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcsFuseCsiDriverConfig. */ - class GcsFuseCsiDriverConfig implements IGcsFuseCsiDriverConfig { - - /** - * Constructs a new GcsFuseCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGcsFuseCsiDriverConfig); - - /** GcsFuseCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFuseCsiDriverConfig instance - */ - public static create(properties?: google.container.v1.IGcsFuseCsiDriverConfig): google.container.v1.GcsFuseCsiDriverConfig; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @param message GcsFuseCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @param message GcsFuseCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GcsFuseCsiDriverConfig; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GcsFuseCsiDriverConfig; - - /** - * Verifies a GcsFuseCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFuseCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GcsFuseCsiDriverConfig; - - /** - * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcsFuseCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GcsFuseCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFuseCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFuseCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ParallelstoreCsiDriverConfig. */ - interface IParallelstoreCsiDriverConfig { - - /** ParallelstoreCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ParallelstoreCsiDriverConfig. */ - class ParallelstoreCsiDriverConfig implements IParallelstoreCsiDriverConfig { - - /** - * Constructs a new ParallelstoreCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IParallelstoreCsiDriverConfig); - - /** ParallelstoreCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ParallelstoreCsiDriverConfig instance - */ - public static create(properties?: google.container.v1.IParallelstoreCsiDriverConfig): google.container.v1.ParallelstoreCsiDriverConfig; - - /** - * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. - * @param message ParallelstoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. - * @param message ParallelstoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParallelstoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ParallelstoreCsiDriverConfig; - - /** - * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParallelstoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ParallelstoreCsiDriverConfig; - - /** - * Verifies a ParallelstoreCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParallelstoreCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ParallelstoreCsiDriverConfig; - - /** - * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. - * @param message ParallelstoreCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ParallelstoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParallelstoreCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParallelstoreCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RayOperatorConfig. */ - interface IRayOperatorConfig { - - /** RayOperatorConfig enabled */ - enabled?: (boolean|null); - - /** RayOperatorConfig rayClusterLoggingConfig */ - rayClusterLoggingConfig?: (google.container.v1.IRayClusterLoggingConfig|null); - - /** RayOperatorConfig rayClusterMonitoringConfig */ - rayClusterMonitoringConfig?: (google.container.v1.IRayClusterMonitoringConfig|null); - } - - /** Represents a RayOperatorConfig. */ - class RayOperatorConfig implements IRayOperatorConfig { - - /** - * Constructs a new RayOperatorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRayOperatorConfig); - - /** RayOperatorConfig enabled. */ - public enabled: boolean; - - /** RayOperatorConfig rayClusterLoggingConfig. */ - public rayClusterLoggingConfig?: (google.container.v1.IRayClusterLoggingConfig|null); - - /** RayOperatorConfig rayClusterMonitoringConfig. */ - public rayClusterMonitoringConfig?: (google.container.v1.IRayClusterMonitoringConfig|null); - - /** - * Creates a new RayOperatorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayOperatorConfig instance - */ - public static create(properties?: google.container.v1.IRayOperatorConfig): google.container.v1.RayOperatorConfig; - - /** - * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. - * @param message RayOperatorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. - * @param message RayOperatorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayOperatorConfig; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayOperatorConfig; - - /** - * Verifies a RayOperatorConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayOperatorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RayOperatorConfig; - - /** - * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. - * @param message RayOperatorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RayOperatorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayOperatorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayOperatorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GkeBackupAgentConfig. */ - interface IGkeBackupAgentConfig { - - /** GkeBackupAgentConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GkeBackupAgentConfig. */ - class GkeBackupAgentConfig implements IGkeBackupAgentConfig { - - /** - * Constructs a new GkeBackupAgentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGkeBackupAgentConfig); - - /** GkeBackupAgentConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GkeBackupAgentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GkeBackupAgentConfig instance - */ - public static create(properties?: google.container.v1.IGkeBackupAgentConfig): google.container.v1.GkeBackupAgentConfig; - - /** - * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. - * @param message GkeBackupAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. - * @param message GkeBackupAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GkeBackupAgentConfig; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GkeBackupAgentConfig; - - /** - * Verifies a GkeBackupAgentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GkeBackupAgentConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GkeBackupAgentConfig; - - /** - * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. - * @param message GkeBackupAgentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GkeBackupAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GkeBackupAgentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GkeBackupAgentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StatefulHAConfig. */ - interface IStatefulHAConfig { - - /** StatefulHAConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a StatefulHAConfig. */ - class StatefulHAConfig implements IStatefulHAConfig { - - /** - * Constructs a new StatefulHAConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IStatefulHAConfig); - - /** StatefulHAConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new StatefulHAConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StatefulHAConfig instance - */ - public static create(properties?: google.container.v1.IStatefulHAConfig): google.container.v1.StatefulHAConfig; - - /** - * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. - * @param message StatefulHAConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. - * @param message StatefulHAConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StatefulHAConfig; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StatefulHAConfig; - - /** - * Verifies a StatefulHAConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatefulHAConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.StatefulHAConfig; - - /** - * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. - * @param message StatefulHAConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.StatefulHAConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatefulHAConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatefulHAConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MasterAuthorizedNetworksConfig. */ - interface IMasterAuthorizedNetworksConfig { - - /** MasterAuthorizedNetworksConfig enabled */ - enabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig cidrBlocks */ - cidrBlocks?: (google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); - - /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled */ - gcpPublicCidrsAccessEnabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled */ - privateEndpointEnforcementEnabled?: (boolean|null); - } - - /** Represents a MasterAuthorizedNetworksConfig. */ - class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMasterAuthorizedNetworksConfig); - - /** MasterAuthorizedNetworksConfig enabled. */ - public enabled: boolean; - - /** MasterAuthorizedNetworksConfig cidrBlocks. */ - public cidrBlocks: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]; - - /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. */ - public gcpPublicCidrsAccessEnabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. */ - public privateEndpointEnforcementEnabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. */ - public _gcpPublicCidrsAccessEnabled?: "gcpPublicCidrsAccessEnabled"; - - /** MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. */ - public _privateEndpointEnforcementEnabled?: "privateEndpointEnforcementEnabled"; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuthorizedNetworksConfig instance - */ - public static create(properties?: google.container.v1.IMasterAuthorizedNetworksConfig): google.container.v1.MasterAuthorizedNetworksConfig; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuthorizedNetworksConfig; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuthorizedNetworksConfig; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuthorizedNetworksConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuthorizedNetworksConfig; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @param message MasterAuthorizedNetworksConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MasterAuthorizedNetworksConfig { - - /** Properties of a CidrBlock. */ - interface ICidrBlock { - - /** CidrBlock displayName */ - displayName?: (string|null); - - /** CidrBlock cidrBlock */ - cidrBlock?: (string|null); - } - - /** Represents a CidrBlock. */ - class CidrBlock implements ICidrBlock { - - /** - * Constructs a new CidrBlock. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock); - - /** CidrBlock displayName. */ - public displayName: string; - - /** CidrBlock cidrBlock. */ - public cidrBlock: string; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns CidrBlock instance - */ - public static create(properties?: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Verifies a CidrBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CidrBlock - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @param message CidrBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CidrBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CidrBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a LegacyAbac. */ - interface ILegacyAbac { - - /** LegacyAbac enabled */ - enabled?: (boolean|null); - } - - /** Represents a LegacyAbac. */ - class LegacyAbac implements ILegacyAbac { - - /** - * Constructs a new LegacyAbac. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILegacyAbac); - - /** LegacyAbac enabled. */ - public enabled: boolean; - - /** - * Creates a new LegacyAbac instance using the specified properties. - * @param [properties] Properties to set - * @returns LegacyAbac instance - */ - public static create(properties?: google.container.v1.ILegacyAbac): google.container.v1.LegacyAbac; - - /** - * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. - * @param message LegacyAbac message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. - * @param message LegacyAbac message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LegacyAbac; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LegacyAbac; - - /** - * Verifies a LegacyAbac message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LegacyAbac - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.LegacyAbac; - - /** - * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. - * @param message LegacyAbac - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.LegacyAbac, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LegacyAbac to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LegacyAbac - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkPolicy. */ - interface INetworkPolicy { - - /** NetworkPolicy provider */ - provider?: (google.container.v1.NetworkPolicy.Provider|keyof typeof google.container.v1.NetworkPolicy.Provider|null); - - /** NetworkPolicy enabled */ - enabled?: (boolean|null); - } - - /** Represents a NetworkPolicy. */ - class NetworkPolicy implements INetworkPolicy { - - /** - * Constructs a new NetworkPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INetworkPolicy); - - /** NetworkPolicy provider. */ - public provider: (google.container.v1.NetworkPolicy.Provider|keyof typeof google.container.v1.NetworkPolicy.Provider); - - /** NetworkPolicy enabled. */ - public enabled: boolean; - - /** - * Creates a new NetworkPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPolicy instance - */ - public static create(properties?: google.container.v1.INetworkPolicy): google.container.v1.NetworkPolicy; - - /** - * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. - * @param message NetworkPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. - * @param message NetworkPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkPolicy; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkPolicy; - - /** - * Verifies a NetworkPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkPolicy; - - /** - * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. - * @param message NetworkPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NetworkPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPolicy { - - /** Provider enum. */ - enum Provider { - PROVIDER_UNSPECIFIED = 0, - CALICO = 1 - } - } - - /** Properties of a BinaryAuthorization. */ - interface IBinaryAuthorization { - - /** BinaryAuthorization enabled */ - enabled?: (boolean|null); - - /** BinaryAuthorization evaluationMode */ - evaluationMode?: (google.container.v1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1.BinaryAuthorization.EvaluationMode|null); - } - - /** Represents a BinaryAuthorization. */ - class BinaryAuthorization implements IBinaryAuthorization { - - /** - * Constructs a new BinaryAuthorization. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IBinaryAuthorization); - - /** BinaryAuthorization enabled. */ - public enabled: boolean; - - /** BinaryAuthorization evaluationMode. */ - public evaluationMode: (google.container.v1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1.BinaryAuthorization.EvaluationMode); - - /** - * Creates a new BinaryAuthorization instance using the specified properties. - * @param [properties] Properties to set - * @returns BinaryAuthorization instance - */ - public static create(properties?: google.container.v1.IBinaryAuthorization): google.container.v1.BinaryAuthorization; - - /** - * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. - * @param message BinaryAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. - * @param message BinaryAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BinaryAuthorization; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BinaryAuthorization; - - /** - * Verifies a BinaryAuthorization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinaryAuthorization - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.BinaryAuthorization; - - /** - * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. - * @param message BinaryAuthorization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.BinaryAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinaryAuthorization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BinaryAuthorization - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BinaryAuthorization { - - /** EvaluationMode enum. */ - enum EvaluationMode { - EVALUATION_MODE_UNSPECIFIED = 0, - DISABLED = 1, - PROJECT_SINGLETON_POLICY_ENFORCE = 2 - } - } - - /** Properties of a PodCIDROverprovisionConfig. */ - interface IPodCIDROverprovisionConfig { - - /** PodCIDROverprovisionConfig disable */ - disable?: (boolean|null); - } - - /** Represents a PodCIDROverprovisionConfig. */ - class PodCIDROverprovisionConfig implements IPodCIDROverprovisionConfig { - - /** - * Constructs a new PodCIDROverprovisionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IPodCIDROverprovisionConfig); - - /** PodCIDROverprovisionConfig disable. */ - public disable: boolean; - - /** - * Creates a new PodCIDROverprovisionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PodCIDROverprovisionConfig instance - */ - public static create(properties?: google.container.v1.IPodCIDROverprovisionConfig): google.container.v1.PodCIDROverprovisionConfig; - - /** - * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. - * @param message PodCIDROverprovisionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. - * @param message PodCIDROverprovisionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.PodCIDROverprovisionConfig; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.PodCIDROverprovisionConfig; - - /** - * Verifies a PodCIDROverprovisionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PodCIDROverprovisionConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.PodCIDROverprovisionConfig; - - /** - * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. - * @param message PodCIDROverprovisionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.PodCIDROverprovisionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PodCIDROverprovisionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PodCIDROverprovisionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a IPAllocationPolicy. */ - interface IIPAllocationPolicy { - - /** IPAllocationPolicy useIpAliases */ - useIpAliases?: (boolean|null); - - /** IPAllocationPolicy createSubnetwork */ - createSubnetwork?: (boolean|null); - - /** IPAllocationPolicy subnetworkName */ - subnetworkName?: (string|null); - - /** IPAllocationPolicy clusterIpv4Cidr */ - clusterIpv4Cidr?: (string|null); - - /** IPAllocationPolicy nodeIpv4Cidr */ - nodeIpv4Cidr?: (string|null); - - /** IPAllocationPolicy servicesIpv4Cidr */ - servicesIpv4Cidr?: (string|null); - - /** IPAllocationPolicy clusterSecondaryRangeName */ - clusterSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy servicesSecondaryRangeName */ - servicesSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy clusterIpv4CidrBlock */ - clusterIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy nodeIpv4CidrBlock */ - nodeIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesIpv4CidrBlock */ - servicesIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy tpuIpv4CidrBlock */ - tpuIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy useRoutes */ - useRoutes?: (boolean|null); - - /** IPAllocationPolicy stackType */ - stackType?: (google.container.v1.StackType|keyof typeof google.container.v1.StackType|null); - - /** IPAllocationPolicy ipv6AccessType */ - ipv6AccessType?: (google.container.v1.IPv6AccessType|keyof typeof google.container.v1.IPv6AccessType|null); - - /** IPAllocationPolicy podCidrOverprovisionConfig */ - podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); - - /** IPAllocationPolicy subnetIpv6CidrBlock */ - subnetIpv6CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesIpv6CidrBlock */ - servicesIpv6CidrBlock?: (string|null); - - /** IPAllocationPolicy additionalPodRangesConfig */ - additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** IPAllocationPolicy defaultPodIpv4RangeUtilization */ - defaultPodIpv4RangeUtilization?: (number|null); - } - - /** Represents a IPAllocationPolicy. */ - class IPAllocationPolicy implements IIPAllocationPolicy { - - /** - * Constructs a new IPAllocationPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IIPAllocationPolicy); - - /** IPAllocationPolicy useIpAliases. */ - public useIpAliases: boolean; - - /** IPAllocationPolicy createSubnetwork. */ - public createSubnetwork: boolean; - - /** IPAllocationPolicy subnetworkName. */ - public subnetworkName: string; - - /** IPAllocationPolicy clusterIpv4Cidr. */ - public clusterIpv4Cidr: string; - - /** IPAllocationPolicy nodeIpv4Cidr. */ - public nodeIpv4Cidr: string; - - /** IPAllocationPolicy servicesIpv4Cidr. */ - public servicesIpv4Cidr: string; - - /** IPAllocationPolicy clusterSecondaryRangeName. */ - public clusterSecondaryRangeName: string; - - /** IPAllocationPolicy servicesSecondaryRangeName. */ - public servicesSecondaryRangeName: string; - - /** IPAllocationPolicy clusterIpv4CidrBlock. */ - public clusterIpv4CidrBlock: string; - - /** IPAllocationPolicy nodeIpv4CidrBlock. */ - public nodeIpv4CidrBlock: string; - - /** IPAllocationPolicy servicesIpv4CidrBlock. */ - public servicesIpv4CidrBlock: string; - - /** IPAllocationPolicy tpuIpv4CidrBlock. */ - public tpuIpv4CidrBlock: string; - - /** IPAllocationPolicy useRoutes. */ - public useRoutes: boolean; - - /** IPAllocationPolicy stackType. */ - public stackType: (google.container.v1.StackType|keyof typeof google.container.v1.StackType); - - /** IPAllocationPolicy ipv6AccessType. */ - public ipv6AccessType: (google.container.v1.IPv6AccessType|keyof typeof google.container.v1.IPv6AccessType); - - /** IPAllocationPolicy podCidrOverprovisionConfig. */ - public podCidrOverprovisionConfig?: (google.container.v1.IPodCIDROverprovisionConfig|null); - - /** IPAllocationPolicy subnetIpv6CidrBlock. */ - public subnetIpv6CidrBlock: string; - - /** IPAllocationPolicy servicesIpv6CidrBlock. */ - public servicesIpv6CidrBlock: string; - - /** IPAllocationPolicy additionalPodRangesConfig. */ - public additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** IPAllocationPolicy defaultPodIpv4RangeUtilization. */ - public defaultPodIpv4RangeUtilization: number; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns IPAllocationPolicy instance - */ - public static create(properties?: google.container.v1.IIPAllocationPolicy): google.container.v1.IPAllocationPolicy; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IPAllocationPolicy; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IPAllocationPolicy; - - /** - * Verifies a IPAllocationPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IPAllocationPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.IPAllocationPolicy; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @param message IPAllocationPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IPAllocationPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cluster. */ - interface ICluster { - - /** Cluster name */ - name?: (string|null); - - /** Cluster description */ - description?: (string|null); - - /** Cluster initialNodeCount */ - initialNodeCount?: (number|null); - - /** Cluster nodeConfig */ - nodeConfig?: (google.container.v1.INodeConfig|null); - - /** Cluster masterAuth */ - masterAuth?: (google.container.v1.IMasterAuth|null); - - /** Cluster loggingService */ - loggingService?: (string|null); - - /** Cluster monitoringService */ - monitoringService?: (string|null); - - /** Cluster network */ - network?: (string|null); - - /** Cluster clusterIpv4Cidr */ - clusterIpv4Cidr?: (string|null); - - /** Cluster addonsConfig */ - addonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** Cluster subnetwork */ - subnetwork?: (string|null); - - /** Cluster nodePools */ - nodePools?: (google.container.v1.INodePool[]|null); - - /** Cluster locations */ - locations?: (string[]|null); - - /** Cluster enableKubernetesAlpha */ - enableKubernetesAlpha?: (boolean|null); - - /** Cluster resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** Cluster labelFingerprint */ - labelFingerprint?: (string|null); - - /** Cluster legacyAbac */ - legacyAbac?: (google.container.v1.ILegacyAbac|null); - - /** Cluster networkPolicy */ - networkPolicy?: (google.container.v1.INetworkPolicy|null); - - /** Cluster ipAllocationPolicy */ - ipAllocationPolicy?: (google.container.v1.IIPAllocationPolicy|null); - - /** Cluster masterAuthorizedNetworksConfig */ - masterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** Cluster maintenancePolicy */ - maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); - - /** Cluster binaryAuthorization */ - binaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); - - /** Cluster autoscaling */ - autoscaling?: (google.container.v1.IClusterAutoscaling|null); - - /** Cluster networkConfig */ - networkConfig?: (google.container.v1.INetworkConfig|null); - - /** Cluster defaultMaxPodsConstraint */ - defaultMaxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); - - /** Cluster resourceUsageExportConfig */ - resourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); - - /** Cluster authenticatorGroupsConfig */ - authenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); - - /** Cluster privateClusterConfig */ - privateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); - - /** Cluster databaseEncryption */ - databaseEncryption?: (google.container.v1.IDatabaseEncryption|null); - - /** Cluster verticalPodAutoscaling */ - verticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); - - /** Cluster shieldedNodes */ - shieldedNodes?: (google.container.v1.IShieldedNodes|null); - - /** Cluster releaseChannel */ - releaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** Cluster workloadIdentityConfig */ - workloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); - - /** Cluster meshCertificates */ - meshCertificates?: (google.container.v1.IMeshCertificates|null); - - /** Cluster costManagementConfig */ - costManagementConfig?: (google.container.v1.ICostManagementConfig|null); - - /** Cluster notificationConfig */ - notificationConfig?: (google.container.v1.INotificationConfig|null); - - /** Cluster confidentialNodes */ - confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** Cluster identityServiceConfig */ - identityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); - - /** Cluster selfLink */ - selfLink?: (string|null); - - /** Cluster zone */ - zone?: (string|null); - - /** Cluster endpoint */ - endpoint?: (string|null); - - /** Cluster initialClusterVersion */ - initialClusterVersion?: (string|null); - - /** Cluster currentMasterVersion */ - currentMasterVersion?: (string|null); - - /** Cluster currentNodeVersion */ - currentNodeVersion?: (string|null); - - /** Cluster createTime */ - createTime?: (string|null); - - /** Cluster status */ - status?: (google.container.v1.Cluster.Status|keyof typeof google.container.v1.Cluster.Status|null); - - /** Cluster statusMessage */ - statusMessage?: (string|null); - - /** Cluster nodeIpv4CidrSize */ - nodeIpv4CidrSize?: (number|null); - - /** Cluster servicesIpv4Cidr */ - servicesIpv4Cidr?: (string|null); - - /** Cluster instanceGroupUrls */ - instanceGroupUrls?: (string[]|null); - - /** Cluster currentNodeCount */ - currentNodeCount?: (number|null); - - /** Cluster expireTime */ - expireTime?: (string|null); - - /** Cluster location */ - location?: (string|null); - - /** Cluster enableTpu */ - enableTpu?: (boolean|null); - - /** Cluster tpuIpv4CidrBlock */ - tpuIpv4CidrBlock?: (string|null); - - /** Cluster conditions */ - conditions?: (google.container.v1.IStatusCondition[]|null); - - /** Cluster autopilot */ - autopilot?: (google.container.v1.IAutopilot|null); - - /** Cluster id */ - id?: (string|null); - - /** Cluster nodePoolDefaults */ - nodePoolDefaults?: (google.container.v1.INodePoolDefaults|null); - - /** Cluster loggingConfig */ - loggingConfig?: (google.container.v1.ILoggingConfig|null); - - /** Cluster monitoringConfig */ - monitoringConfig?: (google.container.v1.IMonitoringConfig|null); - - /** Cluster nodePoolAutoConfig */ - nodePoolAutoConfig?: (google.container.v1.INodePoolAutoConfig|null); - - /** Cluster etag */ - etag?: (string|null); - - /** Cluster fleet */ - fleet?: (google.container.v1.IFleet|null); - - /** Cluster securityPostureConfig */ - securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); - - /** Cluster controlPlaneEndpointsConfig */ - controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); - - /** Cluster enableK8sBetaApis */ - enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** Cluster enterpriseConfig */ - enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); - - /** Cluster secretManagerConfig */ - secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); - - /** Cluster compliancePostureConfig */ - compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); - - /** Cluster satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Cluster satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** Cluster userManagedKeysConfig */ - userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); - - /** Cluster rbacBindingConfig */ - rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); - } - - /** Represents a Cluster. */ - class Cluster implements ICluster { - - /** - * Constructs a new Cluster. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICluster); - - /** Cluster name. */ - public name: string; - - /** Cluster description. */ - public description: string; - - /** Cluster initialNodeCount. */ - public initialNodeCount: number; - - /** Cluster nodeConfig. */ - public nodeConfig?: (google.container.v1.INodeConfig|null); - - /** Cluster masterAuth. */ - public masterAuth?: (google.container.v1.IMasterAuth|null); - - /** Cluster loggingService. */ - public loggingService: string; - - /** Cluster monitoringService. */ - public monitoringService: string; - - /** Cluster network. */ - public network: string; - - /** Cluster clusterIpv4Cidr. */ - public clusterIpv4Cidr: string; - - /** Cluster addonsConfig. */ - public addonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** Cluster subnetwork. */ - public subnetwork: string; - - /** Cluster nodePools. */ - public nodePools: google.container.v1.INodePool[]; - - /** Cluster locations. */ - public locations: string[]; - - /** Cluster enableKubernetesAlpha. */ - public enableKubernetesAlpha: boolean; - - /** Cluster resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** Cluster labelFingerprint. */ - public labelFingerprint: string; - - /** Cluster legacyAbac. */ - public legacyAbac?: (google.container.v1.ILegacyAbac|null); - - /** Cluster networkPolicy. */ - public networkPolicy?: (google.container.v1.INetworkPolicy|null); - - /** Cluster ipAllocationPolicy. */ - public ipAllocationPolicy?: (google.container.v1.IIPAllocationPolicy|null); - - /** Cluster masterAuthorizedNetworksConfig. */ - public masterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** Cluster maintenancePolicy. */ - public maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); - - /** Cluster binaryAuthorization. */ - public binaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); - - /** Cluster autoscaling. */ - public autoscaling?: (google.container.v1.IClusterAutoscaling|null); - - /** Cluster networkConfig. */ - public networkConfig?: (google.container.v1.INetworkConfig|null); - - /** Cluster defaultMaxPodsConstraint. */ - public defaultMaxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); - - /** Cluster resourceUsageExportConfig. */ - public resourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); - - /** Cluster authenticatorGroupsConfig. */ - public authenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); - - /** Cluster privateClusterConfig. */ - public privateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); - - /** Cluster databaseEncryption. */ - public databaseEncryption?: (google.container.v1.IDatabaseEncryption|null); - - /** Cluster verticalPodAutoscaling. */ - public verticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); - - /** Cluster shieldedNodes. */ - public shieldedNodes?: (google.container.v1.IShieldedNodes|null); - - /** Cluster releaseChannel. */ - public releaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** Cluster workloadIdentityConfig. */ - public workloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); - - /** Cluster meshCertificates. */ - public meshCertificates?: (google.container.v1.IMeshCertificates|null); - - /** Cluster costManagementConfig. */ - public costManagementConfig?: (google.container.v1.ICostManagementConfig|null); - - /** Cluster notificationConfig. */ - public notificationConfig?: (google.container.v1.INotificationConfig|null); - - /** Cluster confidentialNodes. */ - public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** Cluster identityServiceConfig. */ - public identityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); - - /** Cluster selfLink. */ - public selfLink: string; - - /** Cluster zone. */ - public zone: string; - - /** Cluster endpoint. */ - public endpoint: string; - - /** Cluster initialClusterVersion. */ - public initialClusterVersion: string; - - /** Cluster currentMasterVersion. */ - public currentMasterVersion: string; - - /** Cluster currentNodeVersion. */ - public currentNodeVersion: string; - - /** Cluster createTime. */ - public createTime: string; - - /** Cluster status. */ - public status: (google.container.v1.Cluster.Status|keyof typeof google.container.v1.Cluster.Status); - - /** Cluster statusMessage. */ - public statusMessage: string; - - /** Cluster nodeIpv4CidrSize. */ - public nodeIpv4CidrSize: number; - - /** Cluster servicesIpv4Cidr. */ - public servicesIpv4Cidr: string; - - /** Cluster instanceGroupUrls. */ - public instanceGroupUrls: string[]; - - /** Cluster currentNodeCount. */ - public currentNodeCount: number; - - /** Cluster expireTime. */ - public expireTime: string; - - /** Cluster location. */ - public location: string; - - /** Cluster enableTpu. */ - public enableTpu: boolean; - - /** Cluster tpuIpv4CidrBlock. */ - public tpuIpv4CidrBlock: string; - - /** Cluster conditions. */ - public conditions: google.container.v1.IStatusCondition[]; - - /** Cluster autopilot. */ - public autopilot?: (google.container.v1.IAutopilot|null); - - /** Cluster id. */ - public id: string; - - /** Cluster nodePoolDefaults. */ - public nodePoolDefaults?: (google.container.v1.INodePoolDefaults|null); - - /** Cluster loggingConfig. */ - public loggingConfig?: (google.container.v1.ILoggingConfig|null); - - /** Cluster monitoringConfig. */ - public monitoringConfig?: (google.container.v1.IMonitoringConfig|null); - - /** Cluster nodePoolAutoConfig. */ - public nodePoolAutoConfig?: (google.container.v1.INodePoolAutoConfig|null); - - /** Cluster etag. */ - public etag: string; - - /** Cluster fleet. */ - public fleet?: (google.container.v1.IFleet|null); - - /** Cluster securityPostureConfig. */ - public securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); - - /** Cluster controlPlaneEndpointsConfig. */ - public controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); - - /** Cluster enableK8sBetaApis. */ - public enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** Cluster enterpriseConfig. */ - public enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); - - /** Cluster secretManagerConfig. */ - public secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); - - /** Cluster compliancePostureConfig. */ - public compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); - - /** Cluster satisfiesPzs. */ - public satisfiesPzs?: (boolean|null); - - /** Cluster satisfiesPzi. */ - public satisfiesPzi?: (boolean|null); - - /** Cluster userManagedKeysConfig. */ - public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); - - /** Cluster rbacBindingConfig. */ - public rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); - - /** Cluster _nodePoolDefaults. */ - public _nodePoolDefaults?: "nodePoolDefaults"; - - /** Cluster _satisfiesPzs. */ - public _satisfiesPzs?: "satisfiesPzs"; - - /** Cluster _satisfiesPzi. */ - public _satisfiesPzi?: "satisfiesPzi"; - - /** Cluster _userManagedKeysConfig. */ - public _userManagedKeysConfig?: "userManagedKeysConfig"; - - /** Cluster _rbacBindingConfig. */ - public _rbacBindingConfig?: "rbacBindingConfig"; - - /** - * Creates a new Cluster instance using the specified properties. - * @param [properties] Properties to set - * @returns Cluster instance - */ - public static create(properties?: google.container.v1.ICluster): google.container.v1.Cluster; - - /** - * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. - * @param message Cluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. - * @param message Cluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cluster message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Cluster; - - /** - * Decodes a Cluster message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Cluster; - - /** - * Verifies a Cluster message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Cluster message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cluster - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.Cluster; - - /** - * Creates a plain object from a Cluster message. Also converts values to other types if specified. - * @param message Cluster - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.Cluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cluster to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cluster - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Cluster { - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PROVISIONING = 1, - RUNNING = 2, - RECONCILING = 3, - STOPPING = 4, - ERROR = 5, - DEGRADED = 6 - } - } - - /** Properties of a RBACBindingConfig. */ - interface IRBACBindingConfig { - - /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated */ - enableInsecureBindingSystemUnauthenticated?: (boolean|null); - - /** RBACBindingConfig enableInsecureBindingSystemAuthenticated */ - enableInsecureBindingSystemAuthenticated?: (boolean|null); - } - - /** Represents a RBACBindingConfig. */ - class RBACBindingConfig implements IRBACBindingConfig { - - /** - * Constructs a new RBACBindingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRBACBindingConfig); - - /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated. */ - public enableInsecureBindingSystemUnauthenticated?: (boolean|null); - - /** RBACBindingConfig enableInsecureBindingSystemAuthenticated. */ - public enableInsecureBindingSystemAuthenticated?: (boolean|null); - - /** RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. */ - public _enableInsecureBindingSystemUnauthenticated?: "enableInsecureBindingSystemUnauthenticated"; - - /** RBACBindingConfig _enableInsecureBindingSystemAuthenticated. */ - public _enableInsecureBindingSystemAuthenticated?: "enableInsecureBindingSystemAuthenticated"; - - /** - * Creates a new RBACBindingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RBACBindingConfig instance - */ - public static create(properties?: google.container.v1.IRBACBindingConfig): google.container.v1.RBACBindingConfig; - - /** - * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. - * @param message RBACBindingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. - * @param message RBACBindingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RBACBindingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RBACBindingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RBACBindingConfig; - - /** - * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RBACBindingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RBACBindingConfig; - - /** - * Verifies a RBACBindingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RBACBindingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RBACBindingConfig; - - /** - * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. - * @param message RBACBindingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RBACBindingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RBACBindingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RBACBindingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserManagedKeysConfig. */ - interface IUserManagedKeysConfig { - - /** UserManagedKeysConfig clusterCa */ - clusterCa?: (string|null); - - /** UserManagedKeysConfig etcdApiCa */ - etcdApiCa?: (string|null); - - /** UserManagedKeysConfig etcdPeerCa */ - etcdPeerCa?: (string|null); - - /** UserManagedKeysConfig serviceAccountSigningKeys */ - serviceAccountSigningKeys?: (string[]|null); - - /** UserManagedKeysConfig serviceAccountVerificationKeys */ - serviceAccountVerificationKeys?: (string[]|null); - - /** UserManagedKeysConfig aggregationCa */ - aggregationCa?: (string|null); - - /** UserManagedKeysConfig controlPlaneDiskEncryptionKey */ - controlPlaneDiskEncryptionKey?: (string|null); - - /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey */ - gkeopsEtcdBackupEncryptionKey?: (string|null); - } - - /** Represents a UserManagedKeysConfig. */ - class UserManagedKeysConfig implements IUserManagedKeysConfig { - - /** - * Constructs a new UserManagedKeysConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUserManagedKeysConfig); - - /** UserManagedKeysConfig clusterCa. */ - public clusterCa: string; - - /** UserManagedKeysConfig etcdApiCa. */ - public etcdApiCa: string; - - /** UserManagedKeysConfig etcdPeerCa. */ - public etcdPeerCa: string; - - /** UserManagedKeysConfig serviceAccountSigningKeys. */ - public serviceAccountSigningKeys: string[]; - - /** UserManagedKeysConfig serviceAccountVerificationKeys. */ - public serviceAccountVerificationKeys: string[]; - - /** UserManagedKeysConfig aggregationCa. */ - public aggregationCa: string; - - /** UserManagedKeysConfig controlPlaneDiskEncryptionKey. */ - public controlPlaneDiskEncryptionKey: string; - - /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. */ - public gkeopsEtcdBackupEncryptionKey: string; - - /** - * Creates a new UserManagedKeysConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns UserManagedKeysConfig instance - */ - public static create(properties?: google.container.v1.IUserManagedKeysConfig): google.container.v1.UserManagedKeysConfig; - - /** - * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. - * @param message UserManagedKeysConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. - * @param message UserManagedKeysConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserManagedKeysConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserManagedKeysConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UserManagedKeysConfig; - - /** - * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserManagedKeysConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UserManagedKeysConfig; - - /** - * Verifies a UserManagedKeysConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserManagedKeysConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UserManagedKeysConfig; - - /** - * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. - * @param message UserManagedKeysConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UserManagedKeysConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserManagedKeysConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserManagedKeysConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompliancePostureConfig. */ - interface ICompliancePostureConfig { - - /** CompliancePostureConfig mode */ - mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); - - /** CompliancePostureConfig complianceStandards */ - complianceStandards?: (google.container.v1.CompliancePostureConfig.IComplianceStandard[]|null); - } - - /** Represents a CompliancePostureConfig. */ - class CompliancePostureConfig implements ICompliancePostureConfig { - - /** - * Constructs a new CompliancePostureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICompliancePostureConfig); - - /** CompliancePostureConfig mode. */ - public mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); - - /** CompliancePostureConfig complianceStandards. */ - public complianceStandards: google.container.v1.CompliancePostureConfig.IComplianceStandard[]; - - /** CompliancePostureConfig _mode. */ - public _mode?: "mode"; - - /** - * Creates a new CompliancePostureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CompliancePostureConfig instance - */ - public static create(properties?: google.container.v1.ICompliancePostureConfig): google.container.v1.CompliancePostureConfig; - - /** - * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. - * @param message CompliancePostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. - * @param message CompliancePostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig; - - /** - * Verifies a CompliancePostureConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompliancePostureConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig; - - /** - * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. - * @param message CompliancePostureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompliancePostureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompliancePostureConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CompliancePostureConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - ENABLED = 2 - } - - /** Properties of a ComplianceStandard. */ - interface IComplianceStandard { - - /** ComplianceStandard standard */ - standard?: (string|null); - } - - /** Represents a ComplianceStandard. */ - class ComplianceStandard implements IComplianceStandard { - - /** - * Constructs a new ComplianceStandard. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard); - - /** ComplianceStandard standard. */ - public standard?: (string|null); - - /** ComplianceStandard _standard. */ - public _standard?: "standard"; - - /** - * Creates a new ComplianceStandard instance using the specified properties. - * @param [properties] Properties to set - * @returns ComplianceStandard instance - */ - public static create(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard): google.container.v1.CompliancePostureConfig.ComplianceStandard; - - /** - * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @param message ComplianceStandard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @param message ComplianceStandard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig.ComplianceStandard; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig.ComplianceStandard; - - /** - * Verifies a ComplianceStandard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComplianceStandard - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig.ComplianceStandard; - - /** - * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. - * @param message ComplianceStandard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComplianceStandard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComplianceStandard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a K8sBetaAPIConfig. */ - interface IK8sBetaAPIConfig { - - /** K8sBetaAPIConfig enabledApis */ - enabledApis?: (string[]|null); - } - - /** Represents a K8sBetaAPIConfig. */ - class K8sBetaAPIConfig implements IK8sBetaAPIConfig { - - /** - * Constructs a new K8sBetaAPIConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IK8sBetaAPIConfig); - - /** K8sBetaAPIConfig enabledApis. */ - public enabledApis: string[]; - - /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns K8sBetaAPIConfig instance - */ - public static create(properties?: google.container.v1.IK8sBetaAPIConfig): google.container.v1.K8sBetaAPIConfig; - - /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.K8sBetaAPIConfig; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.K8sBetaAPIConfig; - - /** - * Verifies a K8sBetaAPIConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns K8sBetaAPIConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.K8sBetaAPIConfig; - - /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. - * @param message K8sBetaAPIConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this K8sBetaAPIConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for K8sBetaAPIConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecurityPostureConfig. */ - interface ISecurityPostureConfig { - - /** SecurityPostureConfig mode */ - mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); - - /** SecurityPostureConfig vulnerabilityMode */ - vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); - } - - /** Represents a SecurityPostureConfig. */ - class SecurityPostureConfig implements ISecurityPostureConfig { - - /** - * Constructs a new SecurityPostureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISecurityPostureConfig); - - /** SecurityPostureConfig mode. */ - public mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); - - /** SecurityPostureConfig vulnerabilityMode. */ - public vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); - - /** SecurityPostureConfig _mode. */ - public _mode?: "mode"; - - /** SecurityPostureConfig _vulnerabilityMode. */ - public _vulnerabilityMode?: "vulnerabilityMode"; - - /** - * Creates a new SecurityPostureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityPostureConfig instance - */ - public static create(properties?: google.container.v1.ISecurityPostureConfig): google.container.v1.SecurityPostureConfig; - - /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityPostureConfig; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityPostureConfig; - - /** - * Verifies a SecurityPostureConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityPostureConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityPostureConfig; - - /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. - * @param message SecurityPostureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityPostureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityPostureConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityPostureConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - BASIC = 2, - ENTERPRISE = 3 - } - - /** VulnerabilityMode enum. */ - enum VulnerabilityMode { - VULNERABILITY_MODE_UNSPECIFIED = 0, - VULNERABILITY_DISABLED = 1, - VULNERABILITY_BASIC = 2, - VULNERABILITY_ENTERPRISE = 3 - } - } - - /** Properties of a NodePoolAutoConfig. */ - interface INodePoolAutoConfig { - - /** NodePoolAutoConfig networkTags */ - networkTags?: (google.container.v1.INetworkTags|null); - - /** NodePoolAutoConfig resourceManagerTags */ - resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** NodePoolAutoConfig nodeKubeletConfig */ - nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** NodePoolAutoConfig linuxNodeConfig */ - linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - } - - /** Represents a NodePoolAutoConfig. */ - class NodePoolAutoConfig implements INodePoolAutoConfig { - - /** - * Constructs a new NodePoolAutoConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodePoolAutoConfig); - - /** NodePoolAutoConfig networkTags. */ - public networkTags?: (google.container.v1.INetworkTags|null); - - /** NodePoolAutoConfig resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** NodePoolAutoConfig nodeKubeletConfig. */ - public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** NodePoolAutoConfig linuxNodeConfig. */ - public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** - * Creates a new NodePoolAutoConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolAutoConfig instance - */ - public static create(properties?: google.container.v1.INodePoolAutoConfig): google.container.v1.NodePoolAutoConfig; - - /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoConfig; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoConfig; - - /** - * Verifies a NodePoolAutoConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolAutoConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolAutoConfig; - - /** - * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. - * @param message NodePoolAutoConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePoolAutoConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolAutoConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolAutoConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolDefaults. */ - interface INodePoolDefaults { - - /** NodePoolDefaults nodeConfigDefaults */ - nodeConfigDefaults?: (google.container.v1.INodeConfigDefaults|null); - } - - /** Represents a NodePoolDefaults. */ - class NodePoolDefaults implements INodePoolDefaults { - - /** - * Constructs a new NodePoolDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodePoolDefaults); - - /** NodePoolDefaults nodeConfigDefaults. */ - public nodeConfigDefaults?: (google.container.v1.INodeConfigDefaults|null); - - /** - * Creates a new NodePoolDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolDefaults instance - */ - public static create(properties?: google.container.v1.INodePoolDefaults): google.container.v1.NodePoolDefaults; - - /** - * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. - * @param message NodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. - * @param message NodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolDefaults; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolDefaults; - - /** - * Verifies a NodePoolDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolDefaults; - - /** - * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. - * @param message NodePoolDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfigDefaults. */ - interface INodeConfigDefaults { - - /** NodeConfigDefaults gcfsConfig */ - gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** NodeConfigDefaults loggingConfig */ - loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** NodeConfigDefaults containerdConfig */ - containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** NodeConfigDefaults nodeKubeletConfig */ - nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - } - - /** Represents a NodeConfigDefaults. */ - class NodeConfigDefaults implements INodeConfigDefaults { - - /** - * Constructs a new NodeConfigDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeConfigDefaults); - - /** NodeConfigDefaults gcfsConfig. */ - public gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** NodeConfigDefaults loggingConfig. */ - public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** NodeConfigDefaults containerdConfig. */ - public containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** NodeConfigDefaults nodeKubeletConfig. */ - public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** - * Creates a new NodeConfigDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfigDefaults instance - */ - public static create(properties?: google.container.v1.INodeConfigDefaults): google.container.v1.NodeConfigDefaults; - - /** - * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. - * @param message NodeConfigDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. - * @param message NodeConfigDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeConfigDefaults; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeConfigDefaults; - - /** - * Verifies a NodeConfigDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfigDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeConfigDefaults; - - /** - * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. - * @param message NodeConfigDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeConfigDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfigDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfigDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterUpdate. */ - interface IClusterUpdate { - - /** ClusterUpdate desiredNodeVersion */ - desiredNodeVersion?: (string|null); - - /** ClusterUpdate desiredMonitoringService */ - desiredMonitoringService?: (string|null); - - /** ClusterUpdate desiredAddonsConfig */ - desiredAddonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** ClusterUpdate desiredNodePoolId */ - desiredNodePoolId?: (string|null); - - /** ClusterUpdate desiredImageType */ - desiredImageType?: (string|null); - - /** ClusterUpdate desiredDatabaseEncryption */ - desiredDatabaseEncryption?: (google.container.v1.IDatabaseEncryption|null); - - /** ClusterUpdate desiredWorkloadIdentityConfig */ - desiredWorkloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); - - /** ClusterUpdate desiredMeshCertificates */ - desiredMeshCertificates?: (google.container.v1.IMeshCertificates|null); - - /** ClusterUpdate desiredShieldedNodes */ - desiredShieldedNodes?: (google.container.v1.IShieldedNodes|null); - - /** ClusterUpdate desiredCostManagementConfig */ - desiredCostManagementConfig?: (google.container.v1.ICostManagementConfig|null); - - /** ClusterUpdate desiredDnsConfig */ - desiredDnsConfig?: (google.container.v1.IDNSConfig|null); - - /** ClusterUpdate desiredNodePoolAutoscaling */ - desiredNodePoolAutoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** ClusterUpdate desiredLocations */ - desiredLocations?: (string[]|null); - - /** ClusterUpdate desiredMasterAuthorizedNetworksConfig */ - desiredMasterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** ClusterUpdate desiredClusterAutoscaling */ - desiredClusterAutoscaling?: (google.container.v1.IClusterAutoscaling|null); - - /** ClusterUpdate desiredBinaryAuthorization */ - desiredBinaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); - - /** ClusterUpdate desiredLoggingService */ - desiredLoggingService?: (string|null); - - /** ClusterUpdate desiredResourceUsageExportConfig */ - desiredResourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); - - /** ClusterUpdate desiredVerticalPodAutoscaling */ - desiredVerticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); - - /** ClusterUpdate desiredPrivateClusterConfig */ - desiredPrivateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredIntraNodeVisibilityConfig */ - desiredIntraNodeVisibilityConfig?: (google.container.v1.IIntraNodeVisibilityConfig|null); - - /** ClusterUpdate desiredDefaultSnatStatus */ - desiredDefaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); - - /** ClusterUpdate desiredReleaseChannel */ - desiredReleaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** ClusterUpdate desiredL4ilbSubsettingConfig */ - desiredL4ilbSubsettingConfig?: (google.container.v1.IILBSubsettingConfig|null); - - /** ClusterUpdate desiredDatapathProvider */ - desiredDatapathProvider?: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider|null); - - /** ClusterUpdate desiredPrivateIpv6GoogleAccess */ - desiredPrivateIpv6GoogleAccess?: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess|null); - - /** ClusterUpdate desiredNotificationConfig */ - desiredNotificationConfig?: (google.container.v1.INotificationConfig|null); - - /** ClusterUpdate desiredAuthenticatorGroupsConfig */ - desiredAuthenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); - - /** ClusterUpdate desiredLoggingConfig */ - desiredLoggingConfig?: (google.container.v1.ILoggingConfig|null); - - /** ClusterUpdate desiredMonitoringConfig */ - desiredMonitoringConfig?: (google.container.v1.IMonitoringConfig|null); - - /** ClusterUpdate desiredIdentityServiceConfig */ - desiredIdentityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); - - /** ClusterUpdate desiredServiceExternalIpsConfig */ - desiredServiceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); - - /** ClusterUpdate desiredEnablePrivateEndpoint */ - desiredEnablePrivateEndpoint?: (boolean|null); - - /** ClusterUpdate desiredDefaultEnablePrivateNodes */ - desiredDefaultEnablePrivateNodes?: (boolean|null); - - /** ClusterUpdate desiredControlPlaneEndpointsConfig */ - desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); - - /** ClusterUpdate desiredMasterVersion */ - desiredMasterVersion?: (string|null); - - /** ClusterUpdate desiredGcfsConfig */ - desiredGcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags */ - desiredNodePoolAutoConfigNetworkTags?: (google.container.v1.INetworkTags|null); - - /** ClusterUpdate desiredGatewayApiConfig */ - desiredGatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); - - /** ClusterUpdate etag */ - etag?: (string|null); - - /** ClusterUpdate desiredNodePoolLoggingConfig */ - desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** ClusterUpdate desiredFleet */ - desiredFleet?: (google.container.v1.IFleet|null); - - /** ClusterUpdate desiredStackType */ - desiredStackType?: (google.container.v1.StackType|keyof typeof google.container.v1.StackType|null); - - /** ClusterUpdate additionalPodRangesConfig */ - additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate removedAdditionalPodRangesConfig */ - removedAdditionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate enableK8sBetaApis */ - enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredSecurityPostureConfig */ - desiredSecurityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); - - /** ClusterUpdate desiredNetworkPerformanceConfig */ - desiredNetworkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** ClusterUpdate desiredEnableFqdnNetworkPolicy */ - desiredEnableFqdnNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig */ - desiredAutopilotWorkloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); - - /** ClusterUpdate desiredK8sBetaApis */ - desiredK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredContainerdConfig */ - desiredContainerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** ClusterUpdate desiredEnableMultiNetworking */ - desiredEnableMultiNetworking?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags */ - desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** ClusterUpdate desiredInTransitEncryptionConfig */ - desiredInTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); - - /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy */ - desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredSecretManagerConfig */ - desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); - - /** ClusterUpdate desiredCompliancePostureConfig */ - desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); - - /** ClusterUpdate desiredNodeKubeletConfig */ - desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig */ - desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** ClusterUpdate userManagedKeysConfig */ - userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); - - /** ClusterUpdate desiredRbacBindingConfig */ - desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); - - /** ClusterUpdate desiredEnterpriseConfig */ - desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig */ - desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - } - - /** Represents a ClusterUpdate. */ - class ClusterUpdate implements IClusterUpdate { - - /** - * Constructs a new ClusterUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IClusterUpdate); - - /** ClusterUpdate desiredNodeVersion. */ - public desiredNodeVersion: string; - - /** ClusterUpdate desiredMonitoringService. */ - public desiredMonitoringService: string; - - /** ClusterUpdate desiredAddonsConfig. */ - public desiredAddonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** ClusterUpdate desiredNodePoolId. */ - public desiredNodePoolId: string; - - /** ClusterUpdate desiredImageType. */ - public desiredImageType: string; - - /** ClusterUpdate desiredDatabaseEncryption. */ - public desiredDatabaseEncryption?: (google.container.v1.IDatabaseEncryption|null); - - /** ClusterUpdate desiredWorkloadIdentityConfig. */ - public desiredWorkloadIdentityConfig?: (google.container.v1.IWorkloadIdentityConfig|null); - - /** ClusterUpdate desiredMeshCertificates. */ - public desiredMeshCertificates?: (google.container.v1.IMeshCertificates|null); - - /** ClusterUpdate desiredShieldedNodes. */ - public desiredShieldedNodes?: (google.container.v1.IShieldedNodes|null); - - /** ClusterUpdate desiredCostManagementConfig. */ - public desiredCostManagementConfig?: (google.container.v1.ICostManagementConfig|null); - - /** ClusterUpdate desiredDnsConfig. */ - public desiredDnsConfig?: (google.container.v1.IDNSConfig|null); - - /** ClusterUpdate desiredNodePoolAutoscaling. */ - public desiredNodePoolAutoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** ClusterUpdate desiredLocations. */ - public desiredLocations: string[]; - - /** ClusterUpdate desiredMasterAuthorizedNetworksConfig. */ - public desiredMasterAuthorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** ClusterUpdate desiredClusterAutoscaling. */ - public desiredClusterAutoscaling?: (google.container.v1.IClusterAutoscaling|null); - - /** ClusterUpdate desiredBinaryAuthorization. */ - public desiredBinaryAuthorization?: (google.container.v1.IBinaryAuthorization|null); - - /** ClusterUpdate desiredLoggingService. */ - public desiredLoggingService: string; - - /** ClusterUpdate desiredResourceUsageExportConfig. */ - public desiredResourceUsageExportConfig?: (google.container.v1.IResourceUsageExportConfig|null); - - /** ClusterUpdate desiredVerticalPodAutoscaling. */ - public desiredVerticalPodAutoscaling?: (google.container.v1.IVerticalPodAutoscaling|null); - - /** ClusterUpdate desiredPrivateClusterConfig. */ - public desiredPrivateClusterConfig?: (google.container.v1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredIntraNodeVisibilityConfig. */ - public desiredIntraNodeVisibilityConfig?: (google.container.v1.IIntraNodeVisibilityConfig|null); - - /** ClusterUpdate desiredDefaultSnatStatus. */ - public desiredDefaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); - - /** ClusterUpdate desiredReleaseChannel. */ - public desiredReleaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** ClusterUpdate desiredL4ilbSubsettingConfig. */ - public desiredL4ilbSubsettingConfig?: (google.container.v1.IILBSubsettingConfig|null); - - /** ClusterUpdate desiredDatapathProvider. */ - public desiredDatapathProvider: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider); - - /** ClusterUpdate desiredPrivateIpv6GoogleAccess. */ - public desiredPrivateIpv6GoogleAccess: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess); - - /** ClusterUpdate desiredNotificationConfig. */ - public desiredNotificationConfig?: (google.container.v1.INotificationConfig|null); - - /** ClusterUpdate desiredAuthenticatorGroupsConfig. */ - public desiredAuthenticatorGroupsConfig?: (google.container.v1.IAuthenticatorGroupsConfig|null); - - /** ClusterUpdate desiredLoggingConfig. */ - public desiredLoggingConfig?: (google.container.v1.ILoggingConfig|null); - - /** ClusterUpdate desiredMonitoringConfig. */ - public desiredMonitoringConfig?: (google.container.v1.IMonitoringConfig|null); - - /** ClusterUpdate desiredIdentityServiceConfig. */ - public desiredIdentityServiceConfig?: (google.container.v1.IIdentityServiceConfig|null); - - /** ClusterUpdate desiredServiceExternalIpsConfig. */ - public desiredServiceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); - - /** ClusterUpdate desiredEnablePrivateEndpoint. */ - public desiredEnablePrivateEndpoint?: (boolean|null); - - /** ClusterUpdate desiredDefaultEnablePrivateNodes. */ - public desiredDefaultEnablePrivateNodes?: (boolean|null); - - /** ClusterUpdate desiredControlPlaneEndpointsConfig. */ - public desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); - - /** ClusterUpdate desiredMasterVersion. */ - public desiredMasterVersion: string; - - /** ClusterUpdate desiredGcfsConfig. */ - public desiredGcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags. */ - public desiredNodePoolAutoConfigNetworkTags?: (google.container.v1.INetworkTags|null); - - /** ClusterUpdate desiredGatewayApiConfig. */ - public desiredGatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); - - /** ClusterUpdate etag. */ - public etag: string; - - /** ClusterUpdate desiredNodePoolLoggingConfig. */ - public desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** ClusterUpdate desiredFleet. */ - public desiredFleet?: (google.container.v1.IFleet|null); - - /** ClusterUpdate desiredStackType. */ - public desiredStackType: (google.container.v1.StackType|keyof typeof google.container.v1.StackType); - - /** ClusterUpdate additionalPodRangesConfig. */ - public additionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate removedAdditionalPodRangesConfig. */ - public removedAdditionalPodRangesConfig?: (google.container.v1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate enableK8sBetaApis. */ - public enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredSecurityPostureConfig. */ - public desiredSecurityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); - - /** ClusterUpdate desiredNetworkPerformanceConfig. */ - public desiredNetworkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** ClusterUpdate desiredEnableFqdnNetworkPolicy. */ - public desiredEnableFqdnNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig. */ - public desiredAutopilotWorkloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); - - /** ClusterUpdate desiredK8sBetaApis. */ - public desiredK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredContainerdConfig. */ - public desiredContainerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** ClusterUpdate desiredEnableMultiNetworking. */ - public desiredEnableMultiNetworking?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. */ - public desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** ClusterUpdate desiredInTransitEncryptionConfig. */ - public desiredInTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); - - /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. */ - public desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredSecretManagerConfig. */ - public desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); - - /** ClusterUpdate desiredCompliancePostureConfig. */ - public desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); - - /** ClusterUpdate desiredNodeKubeletConfig. */ - public desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. */ - public desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** ClusterUpdate userManagedKeysConfig. */ - public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); - - /** ClusterUpdate desiredRbacBindingConfig. */ - public desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); - - /** ClusterUpdate desiredEnterpriseConfig. */ - public desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. */ - public desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** ClusterUpdate _desiredEnablePrivateEndpoint. */ - public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; - - /** ClusterUpdate _desiredDefaultEnablePrivateNodes. */ - public _desiredDefaultEnablePrivateNodes?: "desiredDefaultEnablePrivateNodes"; - - /** ClusterUpdate _desiredEnableFqdnNetworkPolicy. */ - public _desiredEnableFqdnNetworkPolicy?: "desiredEnableFqdnNetworkPolicy"; - - /** ClusterUpdate _desiredEnableMultiNetworking. */ - public _desiredEnableMultiNetworking?: "desiredEnableMultiNetworking"; - - /** ClusterUpdate _desiredInTransitEncryptionConfig. */ - public _desiredInTransitEncryptionConfig?: "desiredInTransitEncryptionConfig"; - - /** ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. */ - public _desiredEnableCiliumClusterwideNetworkPolicy?: "desiredEnableCiliumClusterwideNetworkPolicy"; - - /** ClusterUpdate _desiredSecretManagerConfig. */ - public _desiredSecretManagerConfig?: "desiredSecretManagerConfig"; - - /** ClusterUpdate _desiredCompliancePostureConfig. */ - public _desiredCompliancePostureConfig?: "desiredCompliancePostureConfig"; - - /** ClusterUpdate _desiredRbacBindingConfig. */ - public _desiredRbacBindingConfig?: "desiredRbacBindingConfig"; - - /** - * Creates a new ClusterUpdate instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterUpdate instance - */ - public static create(properties?: google.container.v1.IClusterUpdate): google.container.v1.ClusterUpdate; - - /** - * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. - * @param message ClusterUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. - * @param message ClusterUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClusterUpdate; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClusterUpdate; - - /** - * Verifies a ClusterUpdate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterUpdate - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ClusterUpdate; - - /** - * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. - * @param message ClusterUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ClusterUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterUpdate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdditionalPodRangesConfig. */ - interface IAdditionalPodRangesConfig { - - /** AdditionalPodRangesConfig podRangeNames */ - podRangeNames?: (string[]|null); - - /** AdditionalPodRangesConfig podRangeInfo */ - podRangeInfo?: (google.container.v1.IRangeInfo[]|null); - } - - /** Represents an AdditionalPodRangesConfig. */ - class AdditionalPodRangesConfig implements IAdditionalPodRangesConfig { - - /** - * Constructs a new AdditionalPodRangesConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAdditionalPodRangesConfig); - - /** AdditionalPodRangesConfig podRangeNames. */ - public podRangeNames: string[]; - - /** AdditionalPodRangesConfig podRangeInfo. */ - public podRangeInfo: google.container.v1.IRangeInfo[]; - - /** - * Creates a new AdditionalPodRangesConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalPodRangesConfig instance - */ - public static create(properties?: google.container.v1.IAdditionalPodRangesConfig): google.container.v1.AdditionalPodRangesConfig; - - /** - * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. - * @param message AdditionalPodRangesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. - * @param message AdditionalPodRangesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdditionalPodRangesConfig; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdditionalPodRangesConfig; - - /** - * Verifies an AdditionalPodRangesConfig message. - * @param message Plain 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 AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalPodRangesConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalPodRangesConfig; - - /** - * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. - * @param message AdditionalPodRangesConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AdditionalPodRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalPodRangesConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalPodRangesConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RangeInfo. */ - interface IRangeInfo { - - /** RangeInfo rangeName */ - rangeName?: (string|null); - - /** RangeInfo utilization */ - utilization?: (number|null); - } - - /** Represents a RangeInfo. */ - class RangeInfo implements IRangeInfo { - - /** - * Constructs a new RangeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRangeInfo); - - /** RangeInfo rangeName. */ - public rangeName: string; - - /** RangeInfo utilization. */ - public utilization: number; - - /** - * Creates a new RangeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RangeInfo instance - */ - public static create(properties?: google.container.v1.IRangeInfo): google.container.v1.RangeInfo; - - /** - * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. - * @param message RangeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. - * @param message RangeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RangeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RangeInfo; - - /** - * Decodes a RangeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RangeInfo; - - /** - * Verifies a RangeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RangeInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RangeInfo; - - /** - * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. - * @param message RangeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RangeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RangeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RangeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DesiredEnterpriseConfig. */ - interface IDesiredEnterpriseConfig { - - /** DesiredEnterpriseConfig desiredTier */ - desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); - } - - /** Represents a DesiredEnterpriseConfig. */ - class DesiredEnterpriseConfig implements IDesiredEnterpriseConfig { - - /** - * Constructs a new DesiredEnterpriseConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDesiredEnterpriseConfig); - - /** DesiredEnterpriseConfig desiredTier. */ - public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); - - /** - * Creates a new DesiredEnterpriseConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DesiredEnterpriseConfig instance - */ - public static create(properties?: google.container.v1.IDesiredEnterpriseConfig): google.container.v1.DesiredEnterpriseConfig; - - /** - * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. - * @param message DesiredEnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. - * @param message DesiredEnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DesiredEnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DesiredEnterpriseConfig; - - /** - * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DesiredEnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DesiredEnterpriseConfig; - - /** - * Verifies a DesiredEnterpriseConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DesiredEnterpriseConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DesiredEnterpriseConfig; - - /** - * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. - * @param message DesiredEnterpriseConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DesiredEnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DesiredEnterpriseConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DesiredEnterpriseConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation zone */ - zone?: (string|null); - - /** Operation operationType */ - operationType?: (google.container.v1.Operation.Type|keyof typeof google.container.v1.Operation.Type|null); - - /** Operation status */ - status?: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status|null); - - /** Operation detail */ - detail?: (string|null); - - /** Operation statusMessage */ - statusMessage?: (string|null); - - /** Operation selfLink */ - selfLink?: (string|null); - - /** Operation targetLink */ - targetLink?: (string|null); - - /** Operation location */ - location?: (string|null); - - /** Operation startTime */ - startTime?: (string|null); - - /** Operation endTime */ - endTime?: (string|null); - - /** Operation progress */ - progress?: (google.container.v1.IOperationProgress|null); - - /** Operation clusterConditions */ - clusterConditions?: (google.container.v1.IStatusCondition[]|null); - - /** Operation nodepoolConditions */ - nodepoolConditions?: (google.container.v1.IStatusCondition[]|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation zone. */ - public zone: string; - - /** Operation operationType. */ - public operationType: (google.container.v1.Operation.Type|keyof typeof google.container.v1.Operation.Type); - - /** Operation status. */ - public status: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status); - - /** Operation detail. */ - public detail: string; - - /** Operation statusMessage. */ - public statusMessage: string; - - /** Operation selfLink. */ - public selfLink: string; - - /** Operation targetLink. */ - public targetLink: string; - - /** Operation location. */ - public location: string; - - /** Operation startTime. */ - public startTime: string; - - /** Operation endTime. */ - public endTime: string; - - /** Operation progress. */ - public progress?: (google.container.v1.IOperationProgress|null); - - /** Operation clusterConditions. */ - public clusterConditions: google.container.v1.IStatusCondition[]; - - /** Operation nodepoolConditions. */ - public nodepoolConditions: google.container.v1.IStatusCondition[]; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.container.v1.IOperation): google.container.v1.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Operation { - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - DONE = 3, - ABORTING = 4 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CREATE_CLUSTER = 1, - DELETE_CLUSTER = 2, - UPGRADE_MASTER = 3, - UPGRADE_NODES = 4, - REPAIR_CLUSTER = 5, - UPDATE_CLUSTER = 6, - CREATE_NODE_POOL = 7, - DELETE_NODE_POOL = 8, - SET_NODE_POOL_MANAGEMENT = 9, - AUTO_REPAIR_NODES = 10, - AUTO_UPGRADE_NODES = 11, - SET_LABELS = 12, - SET_MASTER_AUTH = 13, - SET_NODE_POOL_SIZE = 14, - SET_NETWORK_POLICY = 15, - SET_MAINTENANCE_POLICY = 16, - RESIZE_CLUSTER = 18, - FLEET_FEATURE_UPGRADE = 19 - } - } - - /** Properties of an OperationProgress. */ - interface IOperationProgress { - - /** OperationProgress name */ - name?: (string|null); - - /** OperationProgress status */ - status?: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status|null); - - /** OperationProgress metrics */ - metrics?: (google.container.v1.OperationProgress.IMetric[]|null); - - /** OperationProgress stages */ - stages?: (google.container.v1.IOperationProgress[]|null); - } - - /** Represents an OperationProgress. */ - class OperationProgress implements IOperationProgress { - - /** - * Constructs a new OperationProgress. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IOperationProgress); - - /** OperationProgress name. */ - public name: string; - - /** OperationProgress status. */ - public status: (google.container.v1.Operation.Status|keyof typeof google.container.v1.Operation.Status); - - /** OperationProgress metrics. */ - public metrics: google.container.v1.OperationProgress.IMetric[]; - - /** OperationProgress stages. */ - public stages: google.container.v1.IOperationProgress[]; - - /** - * Creates a new OperationProgress instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationProgress instance - */ - public static create(properties?: google.container.v1.IOperationProgress): google.container.v1.OperationProgress; - - /** - * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. - * @param message OperationProgress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. - * @param message OperationProgress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationProgress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.OperationProgress; - - /** - * Decodes an OperationProgress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.OperationProgress; - - /** - * Verifies an OperationProgress message. - * @param message Plain 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 OperationProgress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationProgress - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.OperationProgress; - - /** - * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. - * @param message OperationProgress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.OperationProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationProgress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationProgress - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OperationProgress { - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric intValue */ - intValue?: (number|Long|string|null); - - /** Metric doubleValue */ - doubleValue?: (number|null); - - /** Metric stringValue */ - stringValue?: (string|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.OperationProgress.IMetric); - - /** Metric name. */ - public name: string; - - /** Metric intValue. */ - public intValue?: (number|Long|string|null); - - /** Metric doubleValue. */ - public doubleValue?: (number|null); - - /** Metric stringValue. */ - public stringValue?: (string|null); - - /** Metric value. */ - public value?: ("intValue"|"doubleValue"|"stringValue"); - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.container.v1.OperationProgress.IMetric): google.container.v1.OperationProgress.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.OperationProgress.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.OperationProgress.Metric; - - /** - * Verifies a Metric message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.OperationProgress.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.OperationProgress.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateClusterRequest. */ - interface ICreateClusterRequest { - - /** CreateClusterRequest projectId */ - projectId?: (string|null); - - /** CreateClusterRequest zone */ - zone?: (string|null); - - /** CreateClusterRequest cluster */ - cluster?: (google.container.v1.ICluster|null); - - /** CreateClusterRequest parent */ - parent?: (string|null); - } - - /** Represents a CreateClusterRequest. */ - class CreateClusterRequest implements ICreateClusterRequest { - - /** - * Constructs a new CreateClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICreateClusterRequest); - - /** CreateClusterRequest projectId. */ - public projectId: string; - - /** CreateClusterRequest zone. */ - public zone: string; - - /** CreateClusterRequest cluster. */ - public cluster?: (google.container.v1.ICluster|null); - - /** CreateClusterRequest parent. */ - public parent: string; - - /** - * Creates a new CreateClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateClusterRequest instance - */ - public static create(properties?: google.container.v1.ICreateClusterRequest): google.container.v1.CreateClusterRequest; - - /** - * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. - * @param message CreateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. - * @param message CreateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CreateClusterRequest; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CreateClusterRequest; - - /** - * Verifies a CreateClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CreateClusterRequest; - - /** - * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. - * @param message CreateClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CreateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetClusterRequest. */ - interface IGetClusterRequest { - - /** GetClusterRequest projectId */ - projectId?: (string|null); - - /** GetClusterRequest zone */ - zone?: (string|null); - - /** GetClusterRequest clusterId */ - clusterId?: (string|null); - - /** GetClusterRequest name */ - name?: (string|null); - } - - /** Represents a GetClusterRequest. */ - class GetClusterRequest implements IGetClusterRequest { - - /** - * Constructs a new GetClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetClusterRequest); - - /** GetClusterRequest projectId. */ - public projectId: string; - - /** GetClusterRequest zone. */ - public zone: string; - - /** GetClusterRequest clusterId. */ - public clusterId: string; - - /** GetClusterRequest name. */ - public name: string; - - /** - * Creates a new GetClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetClusterRequest instance - */ - public static create(properties?: google.container.v1.IGetClusterRequest): google.container.v1.GetClusterRequest; - - /** - * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. - * @param message GetClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. - * @param message GetClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetClusterRequest; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetClusterRequest; - - /** - * Verifies a GetClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetClusterRequest; - - /** - * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. - * @param message GetClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateClusterRequest. */ - interface IUpdateClusterRequest { - - /** UpdateClusterRequest projectId */ - projectId?: (string|null); - - /** UpdateClusterRequest zone */ - zone?: (string|null); - - /** UpdateClusterRequest clusterId */ - clusterId?: (string|null); - - /** UpdateClusterRequest update */ - update?: (google.container.v1.IClusterUpdate|null); - - /** UpdateClusterRequest name */ - name?: (string|null); - } - - /** Represents an UpdateClusterRequest. */ - class UpdateClusterRequest implements IUpdateClusterRequest { - - /** - * Constructs a new UpdateClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpdateClusterRequest); - - /** UpdateClusterRequest projectId. */ - public projectId: string; - - /** UpdateClusterRequest zone. */ - public zone: string; - - /** UpdateClusterRequest clusterId. */ - public clusterId: string; - - /** UpdateClusterRequest update. */ - public update?: (google.container.v1.IClusterUpdate|null); - - /** UpdateClusterRequest name. */ - public name: string; - - /** - * Creates a new UpdateClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateClusterRequest instance - */ - public static create(properties?: google.container.v1.IUpdateClusterRequest): google.container.v1.UpdateClusterRequest; - - /** - * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. - * @param message UpdateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. - * @param message UpdateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateClusterRequest; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateClusterRequest; - - /** - * Verifies an UpdateClusterRequest message. - * @param message Plain 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 UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateClusterRequest; - - /** - * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. - * @param message UpdateClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNodePoolRequest. */ - interface IUpdateNodePoolRequest { - - /** UpdateNodePoolRequest projectId */ - projectId?: (string|null); - - /** UpdateNodePoolRequest zone */ - zone?: (string|null); - - /** UpdateNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** UpdateNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** UpdateNodePoolRequest nodeVersion */ - nodeVersion?: (string|null); - - /** UpdateNodePoolRequest imageType */ - imageType?: (string|null); - - /** UpdateNodePoolRequest name */ - name?: (string|null); - - /** UpdateNodePoolRequest locations */ - locations?: (string[]|null); - - /** UpdateNodePoolRequest workloadMetadataConfig */ - workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); - - /** UpdateNodePoolRequest upgradeSettings */ - upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** UpdateNodePoolRequest tags */ - tags?: (google.container.v1.INetworkTags|null); - - /** UpdateNodePoolRequest taints */ - taints?: (google.container.v1.INodeTaints|null); - - /** UpdateNodePoolRequest labels */ - labels?: (google.container.v1.INodeLabels|null); - - /** UpdateNodePoolRequest linuxNodeConfig */ - linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** UpdateNodePoolRequest kubeletConfig */ - kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** UpdateNodePoolRequest nodeNetworkConfig */ - nodeNetworkConfig?: (google.container.v1.INodeNetworkConfig|null); - - /** UpdateNodePoolRequest gcfsConfig */ - gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** UpdateNodePoolRequest confidentialNodes */ - confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** UpdateNodePoolRequest gvnic */ - gvnic?: (google.container.v1.IVirtualNIC|null); - - /** UpdateNodePoolRequest etag */ - etag?: (string|null); - - /** UpdateNodePoolRequest fastSocket */ - fastSocket?: (google.container.v1.IFastSocket|null); - - /** UpdateNodePoolRequest loggingConfig */ - loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** UpdateNodePoolRequest resourceLabels */ - resourceLabels?: (google.container.v1.IResourceLabels|null); - - /** UpdateNodePoolRequest windowsNodeConfig */ - windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); - - /** UpdateNodePoolRequest accelerators */ - accelerators?: (google.container.v1.IAcceleratorConfig[]|null); - - /** UpdateNodePoolRequest machineType */ - machineType?: (string|null); - - /** UpdateNodePoolRequest diskType */ - diskType?: (string|null); - - /** UpdateNodePoolRequest diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** UpdateNodePoolRequest resourceManagerTags */ - resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** UpdateNodePoolRequest containerdConfig */ - containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** UpdateNodePoolRequest queuedProvisioning */ - queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); - - /** UpdateNodePoolRequest storagePools */ - storagePools?: (string[]|null); - } - - /** Represents an UpdateNodePoolRequest. */ - class UpdateNodePoolRequest implements IUpdateNodePoolRequest { - - /** - * Constructs a new UpdateNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpdateNodePoolRequest); - - /** UpdateNodePoolRequest projectId. */ - public projectId: string; - - /** UpdateNodePoolRequest zone. */ - public zone: string; - - /** UpdateNodePoolRequest clusterId. */ - public clusterId: string; - - /** UpdateNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** UpdateNodePoolRequest nodeVersion. */ - public nodeVersion: string; - - /** UpdateNodePoolRequest imageType. */ - public imageType: string; - - /** UpdateNodePoolRequest name. */ - public name: string; - - /** UpdateNodePoolRequest locations. */ - public locations: string[]; - - /** UpdateNodePoolRequest workloadMetadataConfig. */ - public workloadMetadataConfig?: (google.container.v1.IWorkloadMetadataConfig|null); - - /** UpdateNodePoolRequest upgradeSettings. */ - public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** UpdateNodePoolRequest tags. */ - public tags?: (google.container.v1.INetworkTags|null); - - /** UpdateNodePoolRequest taints. */ - public taints?: (google.container.v1.INodeTaints|null); - - /** UpdateNodePoolRequest labels. */ - public labels?: (google.container.v1.INodeLabels|null); - - /** UpdateNodePoolRequest linuxNodeConfig. */ - public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); - - /** UpdateNodePoolRequest kubeletConfig. */ - public kubeletConfig?: (google.container.v1.INodeKubeletConfig|null); - - /** UpdateNodePoolRequest nodeNetworkConfig. */ - public nodeNetworkConfig?: (google.container.v1.INodeNetworkConfig|null); - - /** UpdateNodePoolRequest gcfsConfig. */ - public gcfsConfig?: (google.container.v1.IGcfsConfig|null); - - /** UpdateNodePoolRequest confidentialNodes. */ - public confidentialNodes?: (google.container.v1.IConfidentialNodes|null); - - /** UpdateNodePoolRequest gvnic. */ - public gvnic?: (google.container.v1.IVirtualNIC|null); - - /** UpdateNodePoolRequest etag. */ - public etag: string; - - /** UpdateNodePoolRequest fastSocket. */ - public fastSocket?: (google.container.v1.IFastSocket|null); - - /** UpdateNodePoolRequest loggingConfig. */ - public loggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); - - /** UpdateNodePoolRequest resourceLabels. */ - public resourceLabels?: (google.container.v1.IResourceLabels|null); - - /** UpdateNodePoolRequest windowsNodeConfig. */ - public windowsNodeConfig?: (google.container.v1.IWindowsNodeConfig|null); - - /** UpdateNodePoolRequest accelerators. */ - public accelerators: google.container.v1.IAcceleratorConfig[]; - - /** UpdateNodePoolRequest machineType. */ - public machineType: string; - - /** UpdateNodePoolRequest diskType. */ - public diskType: string; - - /** UpdateNodePoolRequest diskSizeGb. */ - public diskSizeGb: (number|Long|string); - - /** UpdateNodePoolRequest resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); - - /** UpdateNodePoolRequest containerdConfig. */ - public containerdConfig?: (google.container.v1.IContainerdConfig|null); - - /** UpdateNodePoolRequest queuedProvisioning. */ - public queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); - - /** UpdateNodePoolRequest storagePools. */ - public storagePools: string[]; - - /** - * Creates a new UpdateNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNodePoolRequest instance - */ - public static create(properties?: google.container.v1.IUpdateNodePoolRequest): google.container.v1.UpdateNodePoolRequest; - - /** - * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. - * @param message UpdateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. - * @param message UpdateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateNodePoolRequest; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateNodePoolRequest; - - /** - * Verifies an UpdateNodePoolRequest message. - * @param message Plain 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 UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateNodePoolRequest; - - /** - * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. - * @param message UpdateNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpdateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolAutoscalingRequest. */ - interface ISetNodePoolAutoscalingRequest { - - /** SetNodePoolAutoscalingRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolAutoscalingRequest zone */ - zone?: (string|null); - - /** SetNodePoolAutoscalingRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolAutoscalingRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolAutoscalingRequest autoscaling */ - autoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** SetNodePoolAutoscalingRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolAutoscalingRequest. */ - class SetNodePoolAutoscalingRequest implements ISetNodePoolAutoscalingRequest { - - /** - * Constructs a new SetNodePoolAutoscalingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetNodePoolAutoscalingRequest); - - /** SetNodePoolAutoscalingRequest projectId. */ - public projectId: string; - - /** SetNodePoolAutoscalingRequest zone. */ - public zone: string; - - /** SetNodePoolAutoscalingRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolAutoscalingRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolAutoscalingRequest autoscaling. */ - public autoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** SetNodePoolAutoscalingRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolAutoscalingRequest instance - */ - public static create(properties?: google.container.v1.ISetNodePoolAutoscalingRequest): google.container.v1.SetNodePoolAutoscalingRequest; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @param message SetNodePoolAutoscalingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @param message SetNodePoolAutoscalingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolAutoscalingRequest; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolAutoscalingRequest; - - /** - * Verifies a SetNodePoolAutoscalingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolAutoscalingRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolAutoscalingRequest; - - /** - * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. - * @param message SetNodePoolAutoscalingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetNodePoolAutoscalingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolAutoscalingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolAutoscalingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLoggingServiceRequest. */ - interface ISetLoggingServiceRequest { - - /** SetLoggingServiceRequest projectId */ - projectId?: (string|null); - - /** SetLoggingServiceRequest zone */ - zone?: (string|null); - - /** SetLoggingServiceRequest clusterId */ - clusterId?: (string|null); - - /** SetLoggingServiceRequest loggingService */ - loggingService?: (string|null); - - /** SetLoggingServiceRequest name */ - name?: (string|null); - } - - /** Represents a SetLoggingServiceRequest. */ - class SetLoggingServiceRequest implements ISetLoggingServiceRequest { - - /** - * Constructs a new SetLoggingServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetLoggingServiceRequest); - - /** SetLoggingServiceRequest projectId. */ - public projectId: string; - - /** SetLoggingServiceRequest zone. */ - public zone: string; - - /** SetLoggingServiceRequest clusterId. */ - public clusterId: string; - - /** SetLoggingServiceRequest loggingService. */ - public loggingService: string; - - /** SetLoggingServiceRequest name. */ - public name: string; - - /** - * Creates a new SetLoggingServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLoggingServiceRequest instance - */ - public static create(properties?: google.container.v1.ISetLoggingServiceRequest): google.container.v1.SetLoggingServiceRequest; - - /** - * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. - * @param message SetLoggingServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. - * @param message SetLoggingServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLoggingServiceRequest; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLoggingServiceRequest; - - /** - * Verifies a SetLoggingServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLoggingServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetLoggingServiceRequest; - - /** - * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. - * @param message SetLoggingServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetLoggingServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLoggingServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLoggingServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMonitoringServiceRequest. */ - interface ISetMonitoringServiceRequest { - - /** SetMonitoringServiceRequest projectId */ - projectId?: (string|null); - - /** SetMonitoringServiceRequest zone */ - zone?: (string|null); - - /** SetMonitoringServiceRequest clusterId */ - clusterId?: (string|null); - - /** SetMonitoringServiceRequest monitoringService */ - monitoringService?: (string|null); - - /** SetMonitoringServiceRequest name */ - name?: (string|null); - } - - /** Represents a SetMonitoringServiceRequest. */ - class SetMonitoringServiceRequest implements ISetMonitoringServiceRequest { - - /** - * Constructs a new SetMonitoringServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetMonitoringServiceRequest); - - /** SetMonitoringServiceRequest projectId. */ - public projectId: string; - - /** SetMonitoringServiceRequest zone. */ - public zone: string; - - /** SetMonitoringServiceRequest clusterId. */ - public clusterId: string; - - /** SetMonitoringServiceRequest monitoringService. */ - public monitoringService: string; - - /** SetMonitoringServiceRequest name. */ - public name: string; - - /** - * Creates a new SetMonitoringServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMonitoringServiceRequest instance - */ - public static create(properties?: google.container.v1.ISetMonitoringServiceRequest): google.container.v1.SetMonitoringServiceRequest; - - /** - * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. - * @param message SetMonitoringServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. - * @param message SetMonitoringServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMonitoringServiceRequest; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMonitoringServiceRequest; - - /** - * Verifies a SetMonitoringServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMonitoringServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetMonitoringServiceRequest; - - /** - * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. - * @param message SetMonitoringServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetMonitoringServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMonitoringServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMonitoringServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetAddonsConfigRequest. */ - interface ISetAddonsConfigRequest { - - /** SetAddonsConfigRequest projectId */ - projectId?: (string|null); - - /** SetAddonsConfigRequest zone */ - zone?: (string|null); - - /** SetAddonsConfigRequest clusterId */ - clusterId?: (string|null); - - /** SetAddonsConfigRequest addonsConfig */ - addonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** SetAddonsConfigRequest name */ - name?: (string|null); - } - - /** Represents a SetAddonsConfigRequest. */ - class SetAddonsConfigRequest implements ISetAddonsConfigRequest { - - /** - * Constructs a new SetAddonsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetAddonsConfigRequest); - - /** SetAddonsConfigRequest projectId. */ - public projectId: string; - - /** SetAddonsConfigRequest zone. */ - public zone: string; - - /** SetAddonsConfigRequest clusterId. */ - public clusterId: string; - - /** SetAddonsConfigRequest addonsConfig. */ - public addonsConfig?: (google.container.v1.IAddonsConfig|null); - - /** SetAddonsConfigRequest name. */ - public name: string; - - /** - * Creates a new SetAddonsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetAddonsConfigRequest instance - */ - public static create(properties?: google.container.v1.ISetAddonsConfigRequest): google.container.v1.SetAddonsConfigRequest; - - /** - * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. - * @param message SetAddonsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. - * @param message SetAddonsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetAddonsConfigRequest; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetAddonsConfigRequest; - - /** - * Verifies a SetAddonsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetAddonsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetAddonsConfigRequest; - - /** - * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. - * @param message SetAddonsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetAddonsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetAddonsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetAddonsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLocationsRequest. */ - interface ISetLocationsRequest { - - /** SetLocationsRequest projectId */ - projectId?: (string|null); - - /** SetLocationsRequest zone */ - zone?: (string|null); - - /** SetLocationsRequest clusterId */ - clusterId?: (string|null); - - /** SetLocationsRequest locations */ - locations?: (string[]|null); - - /** SetLocationsRequest name */ - name?: (string|null); - } - - /** Represents a SetLocationsRequest. */ - class SetLocationsRequest implements ISetLocationsRequest { - - /** - * Constructs a new SetLocationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetLocationsRequest); - - /** SetLocationsRequest projectId. */ - public projectId: string; - - /** SetLocationsRequest zone. */ - public zone: string; - - /** SetLocationsRequest clusterId. */ - public clusterId: string; - - /** SetLocationsRequest locations. */ - public locations: string[]; - - /** SetLocationsRequest name. */ - public name: string; - - /** - * Creates a new SetLocationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLocationsRequest instance - */ - public static create(properties?: google.container.v1.ISetLocationsRequest): google.container.v1.SetLocationsRequest; - - /** - * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. - * @param message SetLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. - * @param message SetLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLocationsRequest; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLocationsRequest; - - /** - * Verifies a SetLocationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLocationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetLocationsRequest; - - /** - * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. - * @param message SetLocationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLocationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLocationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateMasterRequest. */ - interface IUpdateMasterRequest { - - /** UpdateMasterRequest projectId */ - projectId?: (string|null); - - /** UpdateMasterRequest zone */ - zone?: (string|null); - - /** UpdateMasterRequest clusterId */ - clusterId?: (string|null); - - /** UpdateMasterRequest masterVersion */ - masterVersion?: (string|null); - - /** UpdateMasterRequest name */ - name?: (string|null); - } - - /** Represents an UpdateMasterRequest. */ - class UpdateMasterRequest implements IUpdateMasterRequest { - - /** - * Constructs a new UpdateMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpdateMasterRequest); - - /** UpdateMasterRequest projectId. */ - public projectId: string; - - /** UpdateMasterRequest zone. */ - public zone: string; - - /** UpdateMasterRequest clusterId. */ - public clusterId: string; - - /** UpdateMasterRequest masterVersion. */ - public masterVersion: string; - - /** UpdateMasterRequest name. */ - public name: string; - - /** - * Creates a new UpdateMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateMasterRequest instance - */ - public static create(properties?: google.container.v1.IUpdateMasterRequest): google.container.v1.UpdateMasterRequest; - - /** - * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. - * @param message UpdateMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. - * @param message UpdateMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpdateMasterRequest; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpdateMasterRequest; - - /** - * Verifies an UpdateMasterRequest message. - * @param message Plain 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 UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateMasterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpdateMasterRequest; - - /** - * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. - * @param message UpdateMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpdateMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateMasterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMasterAuthRequest. */ - interface ISetMasterAuthRequest { - - /** SetMasterAuthRequest projectId */ - projectId?: (string|null); - - /** SetMasterAuthRequest zone */ - zone?: (string|null); - - /** SetMasterAuthRequest clusterId */ - clusterId?: (string|null); - - /** SetMasterAuthRequest action */ - action?: (google.container.v1.SetMasterAuthRequest.Action|keyof typeof google.container.v1.SetMasterAuthRequest.Action|null); - - /** SetMasterAuthRequest update */ - update?: (google.container.v1.IMasterAuth|null); - - /** SetMasterAuthRequest name */ - name?: (string|null); - } - - /** Represents a SetMasterAuthRequest. */ - class SetMasterAuthRequest implements ISetMasterAuthRequest { - - /** - * Constructs a new SetMasterAuthRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetMasterAuthRequest); - - /** SetMasterAuthRequest projectId. */ - public projectId: string; - - /** SetMasterAuthRequest zone. */ - public zone: string; - - /** SetMasterAuthRequest clusterId. */ - public clusterId: string; - - /** SetMasterAuthRequest action. */ - public action: (google.container.v1.SetMasterAuthRequest.Action|keyof typeof google.container.v1.SetMasterAuthRequest.Action); - - /** SetMasterAuthRequest update. */ - public update?: (google.container.v1.IMasterAuth|null); - - /** SetMasterAuthRequest name. */ - public name: string; - - /** - * Creates a new SetMasterAuthRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMasterAuthRequest instance - */ - public static create(properties?: google.container.v1.ISetMasterAuthRequest): google.container.v1.SetMasterAuthRequest; - - /** - * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. - * @param message SetMasterAuthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. - * @param message SetMasterAuthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMasterAuthRequest; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMasterAuthRequest; - - /** - * Verifies a SetMasterAuthRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMasterAuthRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetMasterAuthRequest; - - /** - * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. - * @param message SetMasterAuthRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetMasterAuthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMasterAuthRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMasterAuthRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SetMasterAuthRequest { - - /** Action enum. */ - enum Action { - UNKNOWN = 0, - SET_PASSWORD = 1, - GENERATE_PASSWORD = 2, - SET_USERNAME = 3 - } - } - - /** Properties of a DeleteClusterRequest. */ - interface IDeleteClusterRequest { - - /** DeleteClusterRequest projectId */ - projectId?: (string|null); - - /** DeleteClusterRequest zone */ - zone?: (string|null); - - /** DeleteClusterRequest clusterId */ - clusterId?: (string|null); - - /** DeleteClusterRequest name */ - name?: (string|null); - } - - /** Represents a DeleteClusterRequest. */ - class DeleteClusterRequest implements IDeleteClusterRequest { - - /** - * Constructs a new DeleteClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDeleteClusterRequest); - - /** DeleteClusterRequest projectId. */ - public projectId: string; - - /** DeleteClusterRequest zone. */ - public zone: string; - - /** DeleteClusterRequest clusterId. */ - public clusterId: string; - - /** DeleteClusterRequest name. */ - public name: string; - - /** - * Creates a new DeleteClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteClusterRequest instance - */ - public static create(properties?: google.container.v1.IDeleteClusterRequest): google.container.v1.DeleteClusterRequest; - - /** - * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. - * @param message DeleteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. - * @param message DeleteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DeleteClusterRequest; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DeleteClusterRequest; - - /** - * Verifies a DeleteClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DeleteClusterRequest; - - /** - * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. - * @param message DeleteClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DeleteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersRequest. */ - interface IListClustersRequest { - - /** ListClustersRequest projectId */ - projectId?: (string|null); - - /** ListClustersRequest zone */ - zone?: (string|null); - - /** ListClustersRequest parent */ - parent?: (string|null); - } - - /** Represents a ListClustersRequest. */ - class ListClustersRequest implements IListClustersRequest { - - /** - * Constructs a new ListClustersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListClustersRequest); - - /** ListClustersRequest projectId. */ - public projectId: string; - - /** ListClustersRequest zone. */ - public zone: string; - - /** ListClustersRequest parent. */ - public parent: string; - - /** - * Creates a new ListClustersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersRequest instance - */ - public static create(properties?: google.container.v1.IListClustersRequest): google.container.v1.ListClustersRequest; - - /** - * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListClustersRequest; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListClustersRequest; - - /** - * Verifies a ListClustersRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListClustersRequest; - - /** - * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. - * @param message ListClustersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersResponse. */ - interface IListClustersResponse { - - /** ListClustersResponse clusters */ - clusters?: (google.container.v1.ICluster[]|null); - - /** ListClustersResponse missingZones */ - missingZones?: (string[]|null); - } - - /** Represents a ListClustersResponse. */ - class ListClustersResponse implements IListClustersResponse { - - /** - * Constructs a new ListClustersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListClustersResponse); - - /** ListClustersResponse clusters. */ - public clusters: google.container.v1.ICluster[]; - - /** ListClustersResponse missingZones. */ - public missingZones: string[]; - - /** - * Creates a new ListClustersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersResponse instance - */ - public static create(properties?: google.container.v1.IListClustersResponse): google.container.v1.ListClustersResponse; - - /** - * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListClustersResponse; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListClustersResponse; - - /** - * Verifies a ListClustersResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListClustersResponse; - - /** - * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. - * @param message ListClustersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest projectId */ - projectId?: (string|null); - - /** GetOperationRequest zone */ - zone?: (string|null); - - /** GetOperationRequest operationId */ - operationId?: (string|null); - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetOperationRequest); - - /** GetOperationRequest projectId. */ - public projectId: string; - - /** GetOperationRequest zone. */ - public zone: string; - - /** GetOperationRequest operationId. */ - public operationId: string; - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.container.v1.IGetOperationRequest): google.container.v1.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest projectId */ - projectId?: (string|null); - - /** ListOperationsRequest zone */ - zone?: (string|null); - - /** ListOperationsRequest parent */ - parent?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListOperationsRequest); - - /** ListOperationsRequest projectId. */ - public projectId: string; - - /** ListOperationsRequest zone. */ - public zone: string; - - /** ListOperationsRequest parent. */ - public parent: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.container.v1.IListOperationsRequest): google.container.v1.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest projectId */ - projectId?: (string|null); - - /** CancelOperationRequest zone */ - zone?: (string|null); - - /** CancelOperationRequest operationId */ - operationId?: (string|null); - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICancelOperationRequest); - - /** CancelOperationRequest projectId. */ - public projectId: string; - - /** CancelOperationRequest zone. */ - public zone: string; - - /** CancelOperationRequest operationId. */ - public operationId: string; - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.container.v1.ICancelOperationRequest): google.container.v1.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.container.v1.IOperation[]|null); - - /** ListOperationsResponse missingZones */ - missingZones?: (string[]|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.container.v1.IOperation[]; - - /** ListOperationsResponse missingZones. */ - public missingZones: string[]; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.container.v1.IListOperationsResponse): google.container.v1.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServerConfigRequest. */ - interface IGetServerConfigRequest { - - /** GetServerConfigRequest projectId */ - projectId?: (string|null); - - /** GetServerConfigRequest zone */ - zone?: (string|null); - - /** GetServerConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetServerConfigRequest. */ - class GetServerConfigRequest implements IGetServerConfigRequest { - - /** - * Constructs a new GetServerConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetServerConfigRequest); - - /** GetServerConfigRequest projectId. */ - public projectId: string; - - /** GetServerConfigRequest zone. */ - public zone: string; - - /** GetServerConfigRequest name. */ - public name: string; - - /** - * Creates a new GetServerConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServerConfigRequest instance - */ - public static create(properties?: google.container.v1.IGetServerConfigRequest): google.container.v1.GetServerConfigRequest; - - /** - * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. - * @param message GetServerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. - * @param message GetServerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetServerConfigRequest; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetServerConfigRequest; - - /** - * Verifies a GetServerConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServerConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetServerConfigRequest; - - /** - * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. - * @param message GetServerConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetServerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServerConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServerConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerConfig. */ - interface IServerConfig { - - /** ServerConfig defaultClusterVersion */ - defaultClusterVersion?: (string|null); - - /** ServerConfig validNodeVersions */ - validNodeVersions?: (string[]|null); - - /** ServerConfig defaultImageType */ - defaultImageType?: (string|null); - - /** ServerConfig validImageTypes */ - validImageTypes?: (string[]|null); - - /** ServerConfig validMasterVersions */ - validMasterVersions?: (string[]|null); - - /** ServerConfig channels */ - channels?: (google.container.v1.ServerConfig.IReleaseChannelConfig[]|null); - } - - /** Represents a ServerConfig. */ - class ServerConfig implements IServerConfig { - - /** - * Constructs a new ServerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IServerConfig); - - /** ServerConfig defaultClusterVersion. */ - public defaultClusterVersion: string; - - /** ServerConfig validNodeVersions. */ - public validNodeVersions: string[]; - - /** ServerConfig defaultImageType. */ - public defaultImageType: string; - - /** ServerConfig validImageTypes. */ - public validImageTypes: string[]; - - /** ServerConfig validMasterVersions. */ - public validMasterVersions: string[]; - - /** ServerConfig channels. */ - public channels: google.container.v1.ServerConfig.IReleaseChannelConfig[]; - - /** - * Creates a new ServerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerConfig instance - */ - public static create(properties?: google.container.v1.IServerConfig): google.container.v1.ServerConfig; - - /** - * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. - * @param message ServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. - * @param message ServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServerConfig; - - /** - * Decodes a ServerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServerConfig; - - /** - * Verifies a ServerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ServerConfig; - - /** - * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. - * @param message ServerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ServerConfig { - - /** Properties of a ReleaseChannelConfig. */ - interface IReleaseChannelConfig { - - /** ReleaseChannelConfig channel */ - channel?: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel|null); - - /** ReleaseChannelConfig defaultVersion */ - defaultVersion?: (string|null); - - /** ReleaseChannelConfig validVersions */ - validVersions?: (string[]|null); - - /** ReleaseChannelConfig upgradeTargetVersion */ - upgradeTargetVersion?: (string|null); - } - - /** Represents a ReleaseChannelConfig. */ - class ReleaseChannelConfig implements IReleaseChannelConfig { - - /** - * Constructs a new ReleaseChannelConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ServerConfig.IReleaseChannelConfig); - - /** ReleaseChannelConfig channel. */ - public channel: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel); - - /** ReleaseChannelConfig defaultVersion. */ - public defaultVersion: string; - - /** ReleaseChannelConfig validVersions. */ - public validVersions: string[]; - - /** ReleaseChannelConfig upgradeTargetVersion. */ - public upgradeTargetVersion: string; - - /** - * Creates a new ReleaseChannelConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseChannelConfig instance - */ - public static create(properties?: google.container.v1.ServerConfig.IReleaseChannelConfig): google.container.v1.ServerConfig.ReleaseChannelConfig; - - /** - * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @param message ReleaseChannelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @param message ReleaseChannelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServerConfig.ReleaseChannelConfig; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServerConfig.ReleaseChannelConfig; - - /** - * Verifies a ReleaseChannelConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseChannelConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ServerConfig.ReleaseChannelConfig; - - /** - * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. - * @param message ReleaseChannelConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ServerConfig.ReleaseChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseChannelConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReleaseChannelConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateNodePoolRequest. */ - interface ICreateNodePoolRequest { - - /** CreateNodePoolRequest projectId */ - projectId?: (string|null); - - /** CreateNodePoolRequest zone */ - zone?: (string|null); - - /** CreateNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** CreateNodePoolRequest nodePool */ - nodePool?: (google.container.v1.INodePool|null); - - /** CreateNodePoolRequest parent */ - parent?: (string|null); - } - - /** Represents a CreateNodePoolRequest. */ - class CreateNodePoolRequest implements ICreateNodePoolRequest { - - /** - * Constructs a new CreateNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICreateNodePoolRequest); - - /** CreateNodePoolRequest projectId. */ - public projectId: string; - - /** CreateNodePoolRequest zone. */ - public zone: string; - - /** CreateNodePoolRequest clusterId. */ - public clusterId: string; - - /** CreateNodePoolRequest nodePool. */ - public nodePool?: (google.container.v1.INodePool|null); - - /** CreateNodePoolRequest parent. */ - public parent: string; - - /** - * Creates a new CreateNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNodePoolRequest instance - */ - public static create(properties?: google.container.v1.ICreateNodePoolRequest): google.container.v1.CreateNodePoolRequest; - - /** - * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. - * @param message CreateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. - * @param message CreateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CreateNodePoolRequest; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CreateNodePoolRequest; - - /** - * Verifies a CreateNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CreateNodePoolRequest; - - /** - * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. - * @param message CreateNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CreateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNodePoolRequest. */ - interface IDeleteNodePoolRequest { - - /** DeleteNodePoolRequest projectId */ - projectId?: (string|null); - - /** DeleteNodePoolRequest zone */ - zone?: (string|null); - - /** DeleteNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** DeleteNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** DeleteNodePoolRequest name */ - name?: (string|null); - } - - /** Represents a DeleteNodePoolRequest. */ - class DeleteNodePoolRequest implements IDeleteNodePoolRequest { - - /** - * Constructs a new DeleteNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDeleteNodePoolRequest); - - /** DeleteNodePoolRequest projectId. */ - public projectId: string; - - /** DeleteNodePoolRequest zone. */ - public zone: string; - - /** DeleteNodePoolRequest clusterId. */ - public clusterId: string; - - /** DeleteNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** DeleteNodePoolRequest name. */ - public name: string; - - /** - * Creates a new DeleteNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNodePoolRequest instance - */ - public static create(properties?: google.container.v1.IDeleteNodePoolRequest): google.container.v1.DeleteNodePoolRequest; - - /** - * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. - * @param message DeleteNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. - * @param message DeleteNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DeleteNodePoolRequest; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DeleteNodePoolRequest; - - /** - * Verifies a DeleteNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DeleteNodePoolRequest; - - /** - * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. - * @param message DeleteNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DeleteNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNodePoolsRequest. */ - interface IListNodePoolsRequest { - - /** ListNodePoolsRequest projectId */ - projectId?: (string|null); - - /** ListNodePoolsRequest zone */ - zone?: (string|null); - - /** ListNodePoolsRequest clusterId */ - clusterId?: (string|null); - - /** ListNodePoolsRequest parent */ - parent?: (string|null); - } - - /** Represents a ListNodePoolsRequest. */ - class ListNodePoolsRequest implements IListNodePoolsRequest { - - /** - * Constructs a new ListNodePoolsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListNodePoolsRequest); - - /** ListNodePoolsRequest projectId. */ - public projectId: string; - - /** ListNodePoolsRequest zone. */ - public zone: string; - - /** ListNodePoolsRequest clusterId. */ - public clusterId: string; - - /** ListNodePoolsRequest parent. */ - public parent: string; - - /** - * Creates a new ListNodePoolsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodePoolsRequest instance - */ - public static create(properties?: google.container.v1.IListNodePoolsRequest): google.container.v1.ListNodePoolsRequest; - - /** - * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. - * @param message ListNodePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. - * @param message ListNodePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListNodePoolsRequest; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListNodePoolsRequest; - - /** - * Verifies a ListNodePoolsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNodePoolsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListNodePoolsRequest; - - /** - * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. - * @param message ListNodePoolsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListNodePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNodePoolsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNodePoolsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNodePoolRequest. */ - interface IGetNodePoolRequest { - - /** GetNodePoolRequest projectId */ - projectId?: (string|null); - - /** GetNodePoolRequest zone */ - zone?: (string|null); - - /** GetNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** GetNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** GetNodePoolRequest name */ - name?: (string|null); - } - - /** Represents a GetNodePoolRequest. */ - class GetNodePoolRequest implements IGetNodePoolRequest { - - /** - * Constructs a new GetNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetNodePoolRequest); - - /** GetNodePoolRequest projectId. */ - public projectId: string; - - /** GetNodePoolRequest zone. */ - public zone: string; - - /** GetNodePoolRequest clusterId. */ - public clusterId: string; - - /** GetNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** GetNodePoolRequest name. */ - public name: string; - - /** - * Creates a new GetNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNodePoolRequest instance - */ - public static create(properties?: google.container.v1.IGetNodePoolRequest): google.container.v1.GetNodePoolRequest; - - /** - * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. - * @param message GetNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. - * @param message GetNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetNodePoolRequest; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetNodePoolRequest; - - /** - * Verifies a GetNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetNodePoolRequest; - - /** - * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. - * @param message GetNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BlueGreenSettings. */ - interface IBlueGreenSettings { - - /** BlueGreenSettings standardRolloutPolicy */ - standardRolloutPolicy?: (google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null); - - /** BlueGreenSettings nodePoolSoakDuration */ - nodePoolSoakDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a BlueGreenSettings. */ - class BlueGreenSettings implements IBlueGreenSettings { - - /** - * Constructs a new BlueGreenSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IBlueGreenSettings); - - /** BlueGreenSettings standardRolloutPolicy. */ - public standardRolloutPolicy?: (google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null); - - /** BlueGreenSettings nodePoolSoakDuration. */ - public nodePoolSoakDuration?: (google.protobuf.IDuration|null); - - /** BlueGreenSettings rolloutPolicy. */ - public rolloutPolicy?: "standardRolloutPolicy"; - - /** BlueGreenSettings _nodePoolSoakDuration. */ - public _nodePoolSoakDuration?: "nodePoolSoakDuration"; - - /** - * Creates a new BlueGreenSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns BlueGreenSettings instance - */ - public static create(properties?: google.container.v1.IBlueGreenSettings): google.container.v1.BlueGreenSettings; - - /** - * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. - * @param message BlueGreenSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. - * @param message BlueGreenSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BlueGreenSettings; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BlueGreenSettings; - - /** - * Verifies a BlueGreenSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlueGreenSettings - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.BlueGreenSettings; - - /** - * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. - * @param message BlueGreenSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.BlueGreenSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlueGreenSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlueGreenSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BlueGreenSettings { - - /** Properties of a StandardRolloutPolicy. */ - interface IStandardRolloutPolicy { - - /** StandardRolloutPolicy batchPercentage */ - batchPercentage?: (number|null); - - /** StandardRolloutPolicy batchNodeCount */ - batchNodeCount?: (number|null); - - /** StandardRolloutPolicy batchSoakDuration */ - batchSoakDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a StandardRolloutPolicy. */ - class StandardRolloutPolicy implements IStandardRolloutPolicy { - - /** - * Constructs a new StandardRolloutPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy); - - /** StandardRolloutPolicy batchPercentage. */ - public batchPercentage?: (number|null); - - /** StandardRolloutPolicy batchNodeCount. */ - public batchNodeCount?: (number|null); - - /** StandardRolloutPolicy batchSoakDuration. */ - public batchSoakDuration?: (google.protobuf.IDuration|null); - - /** StandardRolloutPolicy updateBatchSize. */ - public updateBatchSize?: ("batchPercentage"|"batchNodeCount"); - - /** StandardRolloutPolicy _batchSoakDuration. */ - public _batchSoakDuration?: "batchSoakDuration"; - - /** - * Creates a new StandardRolloutPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns StandardRolloutPolicy instance - */ - public static create(properties?: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @param message StandardRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @param message StandardRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Verifies a StandardRolloutPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StandardRolloutPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. - * @param message StandardRolloutPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.BlueGreenSettings.StandardRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StandardRolloutPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StandardRolloutPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodePool. */ - interface INodePool { - - /** NodePool name */ - name?: (string|null); - - /** NodePool config */ - config?: (google.container.v1.INodeConfig|null); - - /** NodePool initialNodeCount */ - initialNodeCount?: (number|null); - - /** NodePool locations */ - locations?: (string[]|null); - - /** NodePool networkConfig */ - networkConfig?: (google.container.v1.INodeNetworkConfig|null); - - /** NodePool selfLink */ - selfLink?: (string|null); - - /** NodePool version */ - version?: (string|null); - - /** NodePool instanceGroupUrls */ - instanceGroupUrls?: (string[]|null); - - /** NodePool status */ - status?: (google.container.v1.NodePool.Status|keyof typeof google.container.v1.NodePool.Status|null); - - /** NodePool statusMessage */ - statusMessage?: (string|null); - - /** NodePool autoscaling */ - autoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** NodePool management */ - management?: (google.container.v1.INodeManagement|null); - - /** NodePool maxPodsConstraint */ - maxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); - - /** NodePool conditions */ - conditions?: (google.container.v1.IStatusCondition[]|null); - - /** NodePool podIpv4CidrSize */ - podIpv4CidrSize?: (number|null); - - /** NodePool upgradeSettings */ - upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** NodePool placementPolicy */ - placementPolicy?: (google.container.v1.NodePool.IPlacementPolicy|null); - - /** NodePool updateInfo */ - updateInfo?: (google.container.v1.NodePool.IUpdateInfo|null); - - /** NodePool etag */ - etag?: (string|null); - - /** NodePool queuedProvisioning */ - queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); - - /** NodePool bestEffortProvisioning */ - bestEffortProvisioning?: (google.container.v1.IBestEffortProvisioning|null); - } - - /** Represents a NodePool. */ - class NodePool implements INodePool { - - /** - * Constructs a new NodePool. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodePool); - - /** NodePool name. */ - public name: string; - - /** NodePool config. */ - public config?: (google.container.v1.INodeConfig|null); - - /** NodePool initialNodeCount. */ - public initialNodeCount: number; - - /** NodePool locations. */ - public locations: string[]; - - /** NodePool networkConfig. */ - public networkConfig?: (google.container.v1.INodeNetworkConfig|null); - - /** NodePool selfLink. */ - public selfLink: string; - - /** NodePool version. */ - public version: string; - - /** NodePool instanceGroupUrls. */ - public instanceGroupUrls: string[]; - - /** NodePool status. */ - public status: (google.container.v1.NodePool.Status|keyof typeof google.container.v1.NodePool.Status); - - /** NodePool statusMessage. */ - public statusMessage: string; - - /** NodePool autoscaling. */ - public autoscaling?: (google.container.v1.INodePoolAutoscaling|null); - - /** NodePool management. */ - public management?: (google.container.v1.INodeManagement|null); - - /** NodePool maxPodsConstraint. */ - public maxPodsConstraint?: (google.container.v1.IMaxPodsConstraint|null); - - /** NodePool conditions. */ - public conditions: google.container.v1.IStatusCondition[]; - - /** NodePool podIpv4CidrSize. */ - public podIpv4CidrSize: number; - - /** NodePool upgradeSettings. */ - public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** NodePool placementPolicy. */ - public placementPolicy?: (google.container.v1.NodePool.IPlacementPolicy|null); - - /** NodePool updateInfo. */ - public updateInfo?: (google.container.v1.NodePool.IUpdateInfo|null); - - /** NodePool etag. */ - public etag: string; - - /** NodePool queuedProvisioning. */ - public queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); - - /** NodePool bestEffortProvisioning. */ - public bestEffortProvisioning?: (google.container.v1.IBestEffortProvisioning|null); - - /** - * Creates a new NodePool instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePool instance - */ - public static create(properties?: google.container.v1.INodePool): google.container.v1.NodePool; - - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool; - - /** - * Verifies a NodePool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePool - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @param message NodePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePool - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodePool { - - /** Properties of an UpgradeSettings. */ - interface IUpgradeSettings { - - /** UpgradeSettings maxSurge */ - maxSurge?: (number|null); - - /** UpgradeSettings maxUnavailable */ - maxUnavailable?: (number|null); - - /** UpgradeSettings strategy */ - strategy?: (google.container.v1.NodePoolUpdateStrategy|keyof typeof google.container.v1.NodePoolUpdateStrategy|null); - - /** UpgradeSettings blueGreenSettings */ - blueGreenSettings?: (google.container.v1.IBlueGreenSettings|null); - } - - /** Represents an UpgradeSettings. */ - class UpgradeSettings implements IUpgradeSettings { - - /** - * Constructs a new UpgradeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodePool.IUpgradeSettings); - - /** UpgradeSettings maxSurge. */ - public maxSurge: number; - - /** UpgradeSettings maxUnavailable. */ - public maxUnavailable: number; - - /** UpgradeSettings strategy. */ - public strategy?: (google.container.v1.NodePoolUpdateStrategy|keyof typeof google.container.v1.NodePoolUpdateStrategy|null); - - /** UpgradeSettings blueGreenSettings. */ - public blueGreenSettings?: (google.container.v1.IBlueGreenSettings|null); - - /** UpgradeSettings _strategy. */ - public _strategy?: "strategy"; - - /** UpgradeSettings _blueGreenSettings. */ - public _blueGreenSettings?: "blueGreenSettings"; - - /** - * Creates a new UpgradeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeSettings instance - */ - public static create(properties?: google.container.v1.NodePool.IUpgradeSettings): google.container.v1.NodePool.UpgradeSettings; - - /** - * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. - * @param message UpgradeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. - * @param message UpgradeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpgradeSettings; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpgradeSettings; - - /** - * Verifies an UpgradeSettings message. - * @param message Plain 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 UpgradeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeSettings - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpgradeSettings; - - /** - * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. - * @param message UpgradeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool.UpgradeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateInfo. */ - interface IUpdateInfo { - - /** UpdateInfo blueGreenInfo */ - blueGreenInfo?: (google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null); - } - - /** Represents an UpdateInfo. */ - class UpdateInfo implements IUpdateInfo { - - /** - * Constructs a new UpdateInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodePool.IUpdateInfo); - - /** UpdateInfo blueGreenInfo. */ - public blueGreenInfo?: (google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null); - - /** - * Creates a new UpdateInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateInfo instance - */ - public static create(properties?: google.container.v1.NodePool.IUpdateInfo): google.container.v1.NodePool.UpdateInfo; - - /** - * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. - * @param message UpdateInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. - * @param message UpdateInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpdateInfo; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpdateInfo; - - /** - * Verifies an UpdateInfo message. - * @param message Plain 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 UpdateInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpdateInfo; - - /** - * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. - * @param message UpdateInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool.UpdateInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpdateInfo { - - /** Properties of a BlueGreenInfo. */ - interface IBlueGreenInfo { - - /** BlueGreenInfo phase */ - phase?: (google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null); - - /** BlueGreenInfo blueInstanceGroupUrls */ - blueInstanceGroupUrls?: (string[]|null); - - /** BlueGreenInfo greenInstanceGroupUrls */ - greenInstanceGroupUrls?: (string[]|null); - - /** BlueGreenInfo bluePoolDeletionStartTime */ - bluePoolDeletionStartTime?: (string|null); - - /** BlueGreenInfo greenPoolVersion */ - greenPoolVersion?: (string|null); - } - - /** Represents a BlueGreenInfo. */ - class BlueGreenInfo implements IBlueGreenInfo { - - /** - * Constructs a new BlueGreenInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo); - - /** BlueGreenInfo phase. */ - public phase: (google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase); - - /** BlueGreenInfo blueInstanceGroupUrls. */ - public blueInstanceGroupUrls: string[]; - - /** BlueGreenInfo greenInstanceGroupUrls. */ - public greenInstanceGroupUrls: string[]; - - /** BlueGreenInfo bluePoolDeletionStartTime. */ - public bluePoolDeletionStartTime: string; - - /** BlueGreenInfo greenPoolVersion. */ - public greenPoolVersion: string; - - /** - * Creates a new BlueGreenInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BlueGreenInfo instance - */ - public static create(properties?: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @param message BlueGreenInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @param message BlueGreenInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Verifies a BlueGreenInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlueGreenInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. - * @param message BlueGreenInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool.UpdateInfo.BlueGreenInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlueGreenInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlueGreenInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BlueGreenInfo { - - /** Phase enum. */ - enum Phase { - PHASE_UNSPECIFIED = 0, - UPDATE_STARTED = 1, - CREATING_GREEN_POOL = 2, - CORDONING_BLUE_POOL = 3, - DRAINING_BLUE_POOL = 4, - NODE_POOL_SOAKING = 5, - DELETING_BLUE_POOL = 6, - ROLLBACK_STARTED = 7 - } - } - } - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PROVISIONING = 1, - RUNNING = 2, - RUNNING_WITH_ERROR = 3, - RECONCILING = 4, - STOPPING = 5, - ERROR = 6 - } - - /** Properties of a PlacementPolicy. */ - interface IPlacementPolicy { - - /** PlacementPolicy type */ - type?: (google.container.v1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1.NodePool.PlacementPolicy.Type|null); - - /** PlacementPolicy tpuTopology */ - tpuTopology?: (string|null); - - /** PlacementPolicy policyName */ - policyName?: (string|null); - } - - /** Represents a PlacementPolicy. */ - class PlacementPolicy implements IPlacementPolicy { - - /** - * Constructs a new PlacementPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodePool.IPlacementPolicy); - - /** PlacementPolicy type. */ - public type: (google.container.v1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1.NodePool.PlacementPolicy.Type); - - /** PlacementPolicy tpuTopology. */ - public tpuTopology: string; - - /** PlacementPolicy policyName. */ - public policyName: string; - - /** - * Creates a new PlacementPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns PlacementPolicy instance - */ - public static create(properties?: google.container.v1.NodePool.IPlacementPolicy): google.container.v1.NodePool.PlacementPolicy; - - /** - * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. - * @param message PlacementPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. - * @param message PlacementPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.PlacementPolicy; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.PlacementPolicy; - - /** - * Verifies a PlacementPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlacementPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.PlacementPolicy; - - /** - * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. - * @param message PlacementPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlacementPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlacementPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PlacementPolicy { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - COMPACT = 1 - } - } - - /** Properties of a QueuedProvisioning. */ - interface IQueuedProvisioning { - - /** QueuedProvisioning enabled */ - enabled?: (boolean|null); - } - - /** Represents a QueuedProvisioning. */ - class QueuedProvisioning implements IQueuedProvisioning { - - /** - * Constructs a new QueuedProvisioning. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NodePool.IQueuedProvisioning); - - /** QueuedProvisioning enabled. */ - public enabled: boolean; - - /** - * Creates a new QueuedProvisioning instance using the specified properties. - * @param [properties] Properties to set - * @returns QueuedProvisioning instance - */ - public static create(properties?: google.container.v1.NodePool.IQueuedProvisioning): google.container.v1.NodePool.QueuedProvisioning; - - /** - * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. - * @param message QueuedProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. - * @param message QueuedProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePool.QueuedProvisioning; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePool.QueuedProvisioning; - - /** - * Verifies a QueuedProvisioning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueuedProvisioning - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePool.QueuedProvisioning; - - /** - * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. - * @param message QueuedProvisioning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePool.QueuedProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueuedProvisioning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueuedProvisioning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodeManagement. */ - interface INodeManagement { - - /** NodeManagement autoUpgrade */ - autoUpgrade?: (boolean|null); - - /** NodeManagement autoRepair */ - autoRepair?: (boolean|null); - - /** NodeManagement upgradeOptions */ - upgradeOptions?: (google.container.v1.IAutoUpgradeOptions|null); - } - - /** Represents a NodeManagement. */ - class NodeManagement implements INodeManagement { - - /** - * Constructs a new NodeManagement. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodeManagement); - - /** NodeManagement autoUpgrade. */ - public autoUpgrade: boolean; - - /** NodeManagement autoRepair. */ - public autoRepair: boolean; - - /** NodeManagement upgradeOptions. */ - public upgradeOptions?: (google.container.v1.IAutoUpgradeOptions|null); - - /** - * Creates a new NodeManagement instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeManagement instance - */ - public static create(properties?: google.container.v1.INodeManagement): google.container.v1.NodeManagement; - - /** - * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. - * @param message NodeManagement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. - * @param message NodeManagement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeManagement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodeManagement; - - /** - * Decodes a NodeManagement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodeManagement; - - /** - * Verifies a NodeManagement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeManagement - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodeManagement; - - /** - * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. - * @param message NodeManagement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodeManagement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeManagement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeManagement - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BestEffortProvisioning. */ - interface IBestEffortProvisioning { - - /** BestEffortProvisioning enabled */ - enabled?: (boolean|null); - - /** BestEffortProvisioning minProvisionNodes */ - minProvisionNodes?: (number|null); - } - - /** Represents a BestEffortProvisioning. */ - class BestEffortProvisioning implements IBestEffortProvisioning { - - /** - * Constructs a new BestEffortProvisioning. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IBestEffortProvisioning); - - /** BestEffortProvisioning enabled. */ - public enabled: boolean; - - /** BestEffortProvisioning minProvisionNodes. */ - public minProvisionNodes: number; - - /** - * Creates a new BestEffortProvisioning instance using the specified properties. - * @param [properties] Properties to set - * @returns BestEffortProvisioning instance - */ - public static create(properties?: google.container.v1.IBestEffortProvisioning): google.container.v1.BestEffortProvisioning; - - /** - * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. - * @param message BestEffortProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. - * @param message BestEffortProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.BestEffortProvisioning; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.BestEffortProvisioning; - - /** - * Verifies a BestEffortProvisioning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BestEffortProvisioning - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.BestEffortProvisioning; - - /** - * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. - * @param message BestEffortProvisioning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.BestEffortProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BestEffortProvisioning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BestEffortProvisioning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutoUpgradeOptions. */ - interface IAutoUpgradeOptions { - - /** AutoUpgradeOptions autoUpgradeStartTime */ - autoUpgradeStartTime?: (string|null); - - /** AutoUpgradeOptions description */ - description?: (string|null); - } - - /** Represents an AutoUpgradeOptions. */ - class AutoUpgradeOptions implements IAutoUpgradeOptions { - - /** - * Constructs a new AutoUpgradeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAutoUpgradeOptions); - - /** AutoUpgradeOptions autoUpgradeStartTime. */ - public autoUpgradeStartTime: string; - - /** AutoUpgradeOptions description. */ - public description: string; - - /** - * Creates a new AutoUpgradeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoUpgradeOptions instance - */ - public static create(properties?: google.container.v1.IAutoUpgradeOptions): google.container.v1.AutoUpgradeOptions; - - /** - * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. - * @param message AutoUpgradeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. - * @param message AutoUpgradeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutoUpgradeOptions; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutoUpgradeOptions; - - /** - * Verifies an AutoUpgradeOptions message. - * @param message Plain 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 AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoUpgradeOptions - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AutoUpgradeOptions; - - /** - * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. - * @param message AutoUpgradeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AutoUpgradeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoUpgradeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoUpgradeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenancePolicy. */ - interface IMaintenancePolicy { - - /** MaintenancePolicy window */ - window?: (google.container.v1.IMaintenanceWindow|null); - - /** MaintenancePolicy resourceVersion */ - resourceVersion?: (string|null); - } - - /** Represents a MaintenancePolicy. */ - class MaintenancePolicy implements IMaintenancePolicy { - - /** - * Constructs a new MaintenancePolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMaintenancePolicy); - - /** MaintenancePolicy window. */ - public window?: (google.container.v1.IMaintenanceWindow|null); - - /** MaintenancePolicy resourceVersion. */ - public resourceVersion: string; - - /** - * Creates a new MaintenancePolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenancePolicy instance - */ - public static create(properties?: google.container.v1.IMaintenancePolicy): google.container.v1.MaintenancePolicy; - - /** - * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. - * @param message MaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. - * @param message MaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenancePolicy; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenancePolicy; - - /** - * Verifies a MaintenancePolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenancePolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenancePolicy; - - /** - * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. - * @param message MaintenancePolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenancePolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenancePolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { - - /** MaintenanceWindow dailyMaintenanceWindow */ - dailyMaintenanceWindow?: (google.container.v1.IDailyMaintenanceWindow|null); - - /** MaintenanceWindow recurringWindow */ - recurringWindow?: (google.container.v1.IRecurringTimeWindow|null); - - /** MaintenanceWindow maintenanceExclusions */ - maintenanceExclusions?: ({ [k: string]: google.container.v1.ITimeWindow }|null); - } - - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { - - /** - * Constructs a new MaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMaintenanceWindow); - - /** MaintenanceWindow dailyMaintenanceWindow. */ - public dailyMaintenanceWindow?: (google.container.v1.IDailyMaintenanceWindow|null); - - /** MaintenanceWindow recurringWindow. */ - public recurringWindow?: (google.container.v1.IRecurringTimeWindow|null); - - /** MaintenanceWindow maintenanceExclusions. */ - public maintenanceExclusions: { [k: string]: google.container.v1.ITimeWindow }; - - /** MaintenanceWindow policy. */ - public policy?: ("dailyMaintenanceWindow"|"recurringWindow"); - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceWindow instance - */ - public static create(properties?: google.container.v1.IMaintenanceWindow): google.container.v1.MaintenanceWindow; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenanceWindow; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenanceWindow; - - /** - * Verifies a MaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenanceWindow; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeWindow. */ - interface ITimeWindow { - - /** TimeWindow maintenanceExclusionOptions */ - maintenanceExclusionOptions?: (google.container.v1.IMaintenanceExclusionOptions|null); - - /** TimeWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimeWindow. */ - class TimeWindow implements ITimeWindow { - - /** - * Constructs a new TimeWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ITimeWindow); - - /** TimeWindow maintenanceExclusionOptions. */ - public maintenanceExclusionOptions?: (google.container.v1.IMaintenanceExclusionOptions|null); - - /** TimeWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow options. */ - public options?: "maintenanceExclusionOptions"; - - /** - * Creates a new TimeWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeWindow instance - */ - public static create(properties?: google.container.v1.ITimeWindow): google.container.v1.TimeWindow; - - /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.TimeWindow; - - /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.TimeWindow; - - /** - * Verifies a TimeWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.TimeWindow; - - /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @param message TimeWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceExclusionOptions. */ - interface IMaintenanceExclusionOptions { - - /** MaintenanceExclusionOptions scope */ - scope?: (google.container.v1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1.MaintenanceExclusionOptions.Scope|null); - } - - /** Represents a MaintenanceExclusionOptions. */ - class MaintenanceExclusionOptions implements IMaintenanceExclusionOptions { - - /** - * Constructs a new MaintenanceExclusionOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMaintenanceExclusionOptions); - - /** MaintenanceExclusionOptions scope. */ - public scope: (google.container.v1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1.MaintenanceExclusionOptions.Scope); - - /** - * Creates a new MaintenanceExclusionOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceExclusionOptions instance - */ - public static create(properties?: google.container.v1.IMaintenanceExclusionOptions): google.container.v1.MaintenanceExclusionOptions; - - /** - * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. - * @param message MaintenanceExclusionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. - * @param message MaintenanceExclusionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MaintenanceExclusionOptions; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MaintenanceExclusionOptions; - - /** - * Verifies a MaintenanceExclusionOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceExclusionOptions - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MaintenanceExclusionOptions; - - /** - * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. - * @param message MaintenanceExclusionOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MaintenanceExclusionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceExclusionOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceExclusionOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MaintenanceExclusionOptions { - - /** Scope enum. */ - enum Scope { - NO_UPGRADES = 0, - NO_MINOR_UPGRADES = 1, - NO_MINOR_OR_NODE_UPGRADES = 2 - } - } - - /** Properties of a RecurringTimeWindow. */ - interface IRecurringTimeWindow { - - /** RecurringTimeWindow window */ - window?: (google.container.v1.ITimeWindow|null); - - /** RecurringTimeWindow recurrence */ - recurrence?: (string|null); - } - - /** Represents a RecurringTimeWindow. */ - class RecurringTimeWindow implements IRecurringTimeWindow { - - /** - * Constructs a new RecurringTimeWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRecurringTimeWindow); - - /** RecurringTimeWindow window. */ - public window?: (google.container.v1.ITimeWindow|null); - - /** RecurringTimeWindow recurrence. */ - public recurrence: string; - - /** - * Creates a new RecurringTimeWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns RecurringTimeWindow instance - */ - public static create(properties?: google.container.v1.IRecurringTimeWindow): google.container.v1.RecurringTimeWindow; - - /** - * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. - * @param message RecurringTimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. - * @param message RecurringTimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RecurringTimeWindow; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RecurringTimeWindow; - - /** - * Verifies a RecurringTimeWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecurringTimeWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RecurringTimeWindow; - - /** - * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. - * @param message RecurringTimeWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RecurringTimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecurringTimeWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecurringTimeWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DailyMaintenanceWindow. */ - interface IDailyMaintenanceWindow { - - /** DailyMaintenanceWindow startTime */ - startTime?: (string|null); - - /** DailyMaintenanceWindow duration */ - duration?: (string|null); - } - - /** Represents a DailyMaintenanceWindow. */ - class DailyMaintenanceWindow implements IDailyMaintenanceWindow { - - /** - * Constructs a new DailyMaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDailyMaintenanceWindow); - - /** DailyMaintenanceWindow startTime. */ - public startTime: string; - - /** DailyMaintenanceWindow duration. */ - public duration: string; - - /** - * Creates a new DailyMaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns DailyMaintenanceWindow instance - */ - public static create(properties?: google.container.v1.IDailyMaintenanceWindow): google.container.v1.DailyMaintenanceWindow; - - /** - * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. - * @param message DailyMaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. - * @param message DailyMaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DailyMaintenanceWindow; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DailyMaintenanceWindow; - - /** - * Verifies a DailyMaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DailyMaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DailyMaintenanceWindow; - - /** - * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. - * @param message DailyMaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DailyMaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DailyMaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DailyMaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolManagementRequest. */ - interface ISetNodePoolManagementRequest { - - /** SetNodePoolManagementRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolManagementRequest zone */ - zone?: (string|null); - - /** SetNodePoolManagementRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolManagementRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolManagementRequest management */ - management?: (google.container.v1.INodeManagement|null); - - /** SetNodePoolManagementRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolManagementRequest. */ - class SetNodePoolManagementRequest implements ISetNodePoolManagementRequest { - - /** - * Constructs a new SetNodePoolManagementRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetNodePoolManagementRequest); - - /** SetNodePoolManagementRequest projectId. */ - public projectId: string; - - /** SetNodePoolManagementRequest zone. */ - public zone: string; - - /** SetNodePoolManagementRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolManagementRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolManagementRequest management. */ - public management?: (google.container.v1.INodeManagement|null); - - /** SetNodePoolManagementRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolManagementRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolManagementRequest instance - */ - public static create(properties?: google.container.v1.ISetNodePoolManagementRequest): google.container.v1.SetNodePoolManagementRequest; - - /** - * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. - * @param message SetNodePoolManagementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. - * @param message SetNodePoolManagementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolManagementRequest; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolManagementRequest; - - /** - * Verifies a SetNodePoolManagementRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolManagementRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolManagementRequest; - - /** - * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. - * @param message SetNodePoolManagementRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetNodePoolManagementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolManagementRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolManagementRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolSizeRequest. */ - interface ISetNodePoolSizeRequest { - - /** SetNodePoolSizeRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolSizeRequest zone */ - zone?: (string|null); - - /** SetNodePoolSizeRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolSizeRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolSizeRequest nodeCount */ - nodeCount?: (number|null); - - /** SetNodePoolSizeRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolSizeRequest. */ - class SetNodePoolSizeRequest implements ISetNodePoolSizeRequest { - - /** - * Constructs a new SetNodePoolSizeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetNodePoolSizeRequest); - - /** SetNodePoolSizeRequest projectId. */ - public projectId: string; - - /** SetNodePoolSizeRequest zone. */ - public zone: string; - - /** SetNodePoolSizeRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolSizeRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolSizeRequest nodeCount. */ - public nodeCount: number; - - /** SetNodePoolSizeRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolSizeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolSizeRequest instance - */ - public static create(properties?: google.container.v1.ISetNodePoolSizeRequest): google.container.v1.SetNodePoolSizeRequest; - - /** - * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. - * @param message SetNodePoolSizeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. - * @param message SetNodePoolSizeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNodePoolSizeRequest; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNodePoolSizeRequest; - - /** - * Verifies a SetNodePoolSizeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolSizeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetNodePoolSizeRequest; - - /** - * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. - * @param message SetNodePoolSizeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetNodePoolSizeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolSizeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolSizeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteNodePoolUpgradeRequest. */ - interface ICompleteNodePoolUpgradeRequest { - - /** CompleteNodePoolUpgradeRequest name */ - name?: (string|null); - } - - /** Represents a CompleteNodePoolUpgradeRequest. */ - class CompleteNodePoolUpgradeRequest implements ICompleteNodePoolUpgradeRequest { - - /** - * Constructs a new CompleteNodePoolUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICompleteNodePoolUpgradeRequest); - - /** CompleteNodePoolUpgradeRequest name. */ - public name: string; - - /** - * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteNodePoolUpgradeRequest instance - */ - public static create(properties?: google.container.v1.ICompleteNodePoolUpgradeRequest): google.container.v1.CompleteNodePoolUpgradeRequest; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @param message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @param message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompleteNodePoolUpgradeRequest; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompleteNodePoolUpgradeRequest; - - /** - * Verifies a CompleteNodePoolUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteNodePoolUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CompleteNodePoolUpgradeRequest; - - /** - * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @param message CompleteNodePoolUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CompleteNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteNodePoolUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteNodePoolUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RollbackNodePoolUpgradeRequest. */ - interface IRollbackNodePoolUpgradeRequest { - - /** RollbackNodePoolUpgradeRequest projectId */ - projectId?: (string|null); - - /** RollbackNodePoolUpgradeRequest zone */ - zone?: (string|null); - - /** RollbackNodePoolUpgradeRequest clusterId */ - clusterId?: (string|null); - - /** RollbackNodePoolUpgradeRequest nodePoolId */ - nodePoolId?: (string|null); - - /** RollbackNodePoolUpgradeRequest name */ - name?: (string|null); - - /** RollbackNodePoolUpgradeRequest respectPdb */ - respectPdb?: (boolean|null); - } - - /** Represents a RollbackNodePoolUpgradeRequest. */ - class RollbackNodePoolUpgradeRequest implements IRollbackNodePoolUpgradeRequest { - - /** - * Constructs a new RollbackNodePoolUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRollbackNodePoolUpgradeRequest); - - /** RollbackNodePoolUpgradeRequest projectId. */ - public projectId: string; - - /** RollbackNodePoolUpgradeRequest zone. */ - public zone: string; - - /** RollbackNodePoolUpgradeRequest clusterId. */ - public clusterId: string; - - /** RollbackNodePoolUpgradeRequest nodePoolId. */ - public nodePoolId: string; - - /** RollbackNodePoolUpgradeRequest name. */ - public name: string; - - /** RollbackNodePoolUpgradeRequest respectPdb. */ - public respectPdb: boolean; - - /** - * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackNodePoolUpgradeRequest instance - */ - public static create(properties?: google.container.v1.IRollbackNodePoolUpgradeRequest): google.container.v1.RollbackNodePoolUpgradeRequest; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @param message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @param message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RollbackNodePoolUpgradeRequest; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RollbackNodePoolUpgradeRequest; - - /** - * Verifies a RollbackNodePoolUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackNodePoolUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RollbackNodePoolUpgradeRequest; - - /** - * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @param message RollbackNodePoolUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RollbackNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackNodePoolUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RollbackNodePoolUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNodePoolsResponse. */ - interface IListNodePoolsResponse { - - /** ListNodePoolsResponse nodePools */ - nodePools?: (google.container.v1.INodePool[]|null); - } - - /** Represents a ListNodePoolsResponse. */ - class ListNodePoolsResponse implements IListNodePoolsResponse { - - /** - * Constructs a new ListNodePoolsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListNodePoolsResponse); - - /** ListNodePoolsResponse nodePools. */ - public nodePools: google.container.v1.INodePool[]; - - /** - * Creates a new ListNodePoolsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodePoolsResponse instance - */ - public static create(properties?: google.container.v1.IListNodePoolsResponse): google.container.v1.ListNodePoolsResponse; - - /** - * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. - * @param message ListNodePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. - * @param message ListNodePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListNodePoolsResponse; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListNodePoolsResponse; - - /** - * Verifies a ListNodePoolsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNodePoolsResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListNodePoolsResponse; - - /** - * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. - * @param message ListNodePoolsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListNodePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNodePoolsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNodePoolsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterAutoscaling. */ - interface IClusterAutoscaling { - - /** ClusterAutoscaling enableNodeAutoprovisioning */ - enableNodeAutoprovisioning?: (boolean|null); - - /** ClusterAutoscaling resourceLimits */ - resourceLimits?: (google.container.v1.IResourceLimit[]|null); - - /** ClusterAutoscaling autoscalingProfile */ - autoscalingProfile?: (google.container.v1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1.ClusterAutoscaling.AutoscalingProfile|null); - - /** ClusterAutoscaling autoprovisioningNodePoolDefaults */ - autoprovisioningNodePoolDefaults?: (google.container.v1.IAutoprovisioningNodePoolDefaults|null); - - /** ClusterAutoscaling autoprovisioningLocations */ - autoprovisioningLocations?: (string[]|null); - } - - /** Represents a ClusterAutoscaling. */ - class ClusterAutoscaling implements IClusterAutoscaling { - - /** - * Constructs a new ClusterAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IClusterAutoscaling); - - /** ClusterAutoscaling enableNodeAutoprovisioning. */ - public enableNodeAutoprovisioning: boolean; - - /** ClusterAutoscaling resourceLimits. */ - public resourceLimits: google.container.v1.IResourceLimit[]; - - /** ClusterAutoscaling autoscalingProfile. */ - public autoscalingProfile: (google.container.v1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1.ClusterAutoscaling.AutoscalingProfile); - - /** ClusterAutoscaling autoprovisioningNodePoolDefaults. */ - public autoprovisioningNodePoolDefaults?: (google.container.v1.IAutoprovisioningNodePoolDefaults|null); - - /** ClusterAutoscaling autoprovisioningLocations. */ - public autoprovisioningLocations: string[]; - - /** - * Creates a new ClusterAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterAutoscaling instance - */ - public static create(properties?: google.container.v1.IClusterAutoscaling): google.container.v1.ClusterAutoscaling; - - /** - * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. - * @param message ClusterAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. - * @param message ClusterAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ClusterAutoscaling; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ClusterAutoscaling; - - /** - * Verifies a ClusterAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ClusterAutoscaling; - - /** - * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. - * @param message ClusterAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ClusterAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ClusterAutoscaling { - - /** AutoscalingProfile enum. */ - enum AutoscalingProfile { - PROFILE_UNSPECIFIED = 0, - OPTIMIZE_UTILIZATION = 1, - BALANCED = 2 - } - } - - /** Properties of an AutoprovisioningNodePoolDefaults. */ - interface IAutoprovisioningNodePoolDefaults { - - /** AutoprovisioningNodePoolDefaults oauthScopes */ - oauthScopes?: (string[]|null); - - /** AutoprovisioningNodePoolDefaults serviceAccount */ - serviceAccount?: (string|null); - - /** AutoprovisioningNodePoolDefaults upgradeSettings */ - upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** AutoprovisioningNodePoolDefaults management */ - management?: (google.container.v1.INodeManagement|null); - - /** AutoprovisioningNodePoolDefaults minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** AutoprovisioningNodePoolDefaults diskSizeGb */ - diskSizeGb?: (number|null); - - /** AutoprovisioningNodePoolDefaults diskType */ - diskType?: (string|null); - - /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig */ - shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); - - /** AutoprovisioningNodePoolDefaults bootDiskKmsKey */ - bootDiskKmsKey?: (string|null); - - /** AutoprovisioningNodePoolDefaults imageType */ - imageType?: (string|null); - - /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled */ - insecureKubeletReadonlyPortEnabled?: (boolean|null); - } - - /** Represents an AutoprovisioningNodePoolDefaults. */ - class AutoprovisioningNodePoolDefaults implements IAutoprovisioningNodePoolDefaults { - - /** - * Constructs a new AutoprovisioningNodePoolDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAutoprovisioningNodePoolDefaults); - - /** AutoprovisioningNodePoolDefaults oauthScopes. */ - public oauthScopes: string[]; - - /** AutoprovisioningNodePoolDefaults serviceAccount. */ - public serviceAccount: string; - - /** AutoprovisioningNodePoolDefaults upgradeSettings. */ - public upgradeSettings?: (google.container.v1.NodePool.IUpgradeSettings|null); - - /** AutoprovisioningNodePoolDefaults management. */ - public management?: (google.container.v1.INodeManagement|null); - - /** AutoprovisioningNodePoolDefaults minCpuPlatform. */ - public minCpuPlatform: string; - - /** AutoprovisioningNodePoolDefaults diskSizeGb. */ - public diskSizeGb: number; - - /** AutoprovisioningNodePoolDefaults diskType. */ - public diskType: string; - - /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig. */ - public shieldedInstanceConfig?: (google.container.v1.IShieldedInstanceConfig|null); - - /** AutoprovisioningNodePoolDefaults bootDiskKmsKey. */ - public bootDiskKmsKey: string; - - /** AutoprovisioningNodePoolDefaults imageType. */ - public imageType: string; - - /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. */ - public insecureKubeletReadonlyPortEnabled?: (boolean|null); - - /** AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. */ - public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; - - /** - * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoprovisioningNodePoolDefaults instance - */ - public static create(properties?: google.container.v1.IAutoprovisioningNodePoolDefaults): google.container.v1.AutoprovisioningNodePoolDefaults; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @param message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @param message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutoprovisioningNodePoolDefaults; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutoprovisioningNodePoolDefaults; - - /** - * Verifies an AutoprovisioningNodePoolDefaults message. - * @param message Plain 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 AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoprovisioningNodePoolDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AutoprovisioningNodePoolDefaults; - - /** - * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. - * @param message AutoprovisioningNodePoolDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AutoprovisioningNodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoprovisioningNodePoolDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoprovisioningNodePoolDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceLimit. */ - interface IResourceLimit { - - /** ResourceLimit resourceType */ - resourceType?: (string|null); - - /** ResourceLimit minimum */ - minimum?: (number|Long|string|null); - - /** ResourceLimit maximum */ - maximum?: (number|Long|string|null); - } - - /** Represents a ResourceLimit. */ - class ResourceLimit implements IResourceLimit { - - /** - * Constructs a new ResourceLimit. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IResourceLimit); - - /** ResourceLimit resourceType. */ - public resourceType: string; - - /** ResourceLimit minimum. */ - public minimum: (number|Long|string); - - /** ResourceLimit maximum. */ - public maximum: (number|Long|string); - - /** - * Creates a new ResourceLimit instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceLimit instance - */ - public static create(properties?: google.container.v1.IResourceLimit): google.container.v1.ResourceLimit; - - /** - * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. - * @param message ResourceLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. - * @param message ResourceLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceLimit; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceLimit; - - /** - * Verifies a ResourceLimit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceLimit - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceLimit; - - /** - * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. - * @param message ResourceLimit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceLimit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceLimit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolAutoscaling. */ - interface INodePoolAutoscaling { - - /** NodePoolAutoscaling enabled */ - enabled?: (boolean|null); - - /** NodePoolAutoscaling minNodeCount */ - minNodeCount?: (number|null); - - /** NodePoolAutoscaling maxNodeCount */ - maxNodeCount?: (number|null); - - /** NodePoolAutoscaling autoprovisioned */ - autoprovisioned?: (boolean|null); - - /** NodePoolAutoscaling locationPolicy */ - locationPolicy?: (google.container.v1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1.NodePoolAutoscaling.LocationPolicy|null); - - /** NodePoolAutoscaling totalMinNodeCount */ - totalMinNodeCount?: (number|null); - - /** NodePoolAutoscaling totalMaxNodeCount */ - totalMaxNodeCount?: (number|null); - } - - /** Represents a NodePoolAutoscaling. */ - class NodePoolAutoscaling implements INodePoolAutoscaling { - - /** - * Constructs a new NodePoolAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodePoolAutoscaling); - - /** NodePoolAutoscaling enabled. */ - public enabled: boolean; - - /** NodePoolAutoscaling minNodeCount. */ - public minNodeCount: number; - - /** NodePoolAutoscaling maxNodeCount. */ - public maxNodeCount: number; - - /** NodePoolAutoscaling autoprovisioned. */ - public autoprovisioned: boolean; - - /** NodePoolAutoscaling locationPolicy. */ - public locationPolicy: (google.container.v1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1.NodePoolAutoscaling.LocationPolicy); - - /** NodePoolAutoscaling totalMinNodeCount. */ - public totalMinNodeCount: number; - - /** NodePoolAutoscaling totalMaxNodeCount. */ - public totalMaxNodeCount: number; - - /** - * Creates a new NodePoolAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolAutoscaling instance - */ - public static create(properties?: google.container.v1.INodePoolAutoscaling): google.container.v1.NodePoolAutoscaling; - - /** - * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. - * @param message NodePoolAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. - * @param message NodePoolAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoscaling; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoscaling; - - /** - * Verifies a NodePoolAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolAutoscaling; - - /** - * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. - * @param message NodePoolAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodePoolAutoscaling { - - /** LocationPolicy enum. */ - enum LocationPolicy { - LOCATION_POLICY_UNSPECIFIED = 0, - BALANCED = 1, - ANY = 2 - } - } - - /** Properties of a SetLabelsRequest. */ - interface ISetLabelsRequest { - - /** SetLabelsRequest projectId */ - projectId?: (string|null); - - /** SetLabelsRequest zone */ - zone?: (string|null); - - /** SetLabelsRequest clusterId */ - clusterId?: (string|null); - - /** SetLabelsRequest resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** SetLabelsRequest labelFingerprint */ - labelFingerprint?: (string|null); - - /** SetLabelsRequest name */ - name?: (string|null); - } - - /** Represents a SetLabelsRequest. */ - class SetLabelsRequest implements ISetLabelsRequest { - - /** - * Constructs a new SetLabelsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetLabelsRequest); - - /** SetLabelsRequest projectId. */ - public projectId: string; - - /** SetLabelsRequest zone. */ - public zone: string; - - /** SetLabelsRequest clusterId. */ - public clusterId: string; - - /** SetLabelsRequest resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** SetLabelsRequest labelFingerprint. */ - public labelFingerprint: string; - - /** SetLabelsRequest name. */ - public name: string; - - /** - * Creates a new SetLabelsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLabelsRequest instance - */ - public static create(properties?: google.container.v1.ISetLabelsRequest): google.container.v1.SetLabelsRequest; - - /** - * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. - * @param message SetLabelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. - * @param message SetLabelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLabelsRequest; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLabelsRequest; - - /** - * Verifies a SetLabelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLabelsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetLabelsRequest; - - /** - * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. - * @param message SetLabelsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLabelsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLabelsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLegacyAbacRequest. */ - interface ISetLegacyAbacRequest { - - /** SetLegacyAbacRequest projectId */ - projectId?: (string|null); - - /** SetLegacyAbacRequest zone */ - zone?: (string|null); - - /** SetLegacyAbacRequest clusterId */ - clusterId?: (string|null); - - /** SetLegacyAbacRequest enabled */ - enabled?: (boolean|null); - - /** SetLegacyAbacRequest name */ - name?: (string|null); - } - - /** Represents a SetLegacyAbacRequest. */ - class SetLegacyAbacRequest implements ISetLegacyAbacRequest { - - /** - * Constructs a new SetLegacyAbacRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetLegacyAbacRequest); - - /** SetLegacyAbacRequest projectId. */ - public projectId: string; - - /** SetLegacyAbacRequest zone. */ - public zone: string; - - /** SetLegacyAbacRequest clusterId. */ - public clusterId: string; - - /** SetLegacyAbacRequest enabled. */ - public enabled: boolean; - - /** SetLegacyAbacRequest name. */ - public name: string; - - /** - * Creates a new SetLegacyAbacRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLegacyAbacRequest instance - */ - public static create(properties?: google.container.v1.ISetLegacyAbacRequest): google.container.v1.SetLegacyAbacRequest; - - /** - * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. - * @param message SetLegacyAbacRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. - * @param message SetLegacyAbacRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetLegacyAbacRequest; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetLegacyAbacRequest; - - /** - * Verifies a SetLegacyAbacRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLegacyAbacRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetLegacyAbacRequest; - - /** - * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. - * @param message SetLegacyAbacRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetLegacyAbacRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLegacyAbacRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLegacyAbacRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartIPRotationRequest. */ - interface IStartIPRotationRequest { - - /** StartIPRotationRequest projectId */ - projectId?: (string|null); - - /** StartIPRotationRequest zone */ - zone?: (string|null); - - /** StartIPRotationRequest clusterId */ - clusterId?: (string|null); - - /** StartIPRotationRequest name */ - name?: (string|null); - - /** StartIPRotationRequest rotateCredentials */ - rotateCredentials?: (boolean|null); - } - - /** Represents a StartIPRotationRequest. */ - class StartIPRotationRequest implements IStartIPRotationRequest { - - /** - * Constructs a new StartIPRotationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IStartIPRotationRequest); - - /** StartIPRotationRequest projectId. */ - public projectId: string; - - /** StartIPRotationRequest zone. */ - public zone: string; - - /** StartIPRotationRequest clusterId. */ - public clusterId: string; - - /** StartIPRotationRequest name. */ - public name: string; - - /** StartIPRotationRequest rotateCredentials. */ - public rotateCredentials: boolean; - - /** - * Creates a new StartIPRotationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartIPRotationRequest instance - */ - public static create(properties?: google.container.v1.IStartIPRotationRequest): google.container.v1.StartIPRotationRequest; - - /** - * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. - * @param message StartIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. - * @param message StartIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StartIPRotationRequest; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StartIPRotationRequest; - - /** - * Verifies a StartIPRotationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartIPRotationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.StartIPRotationRequest; - - /** - * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. - * @param message StartIPRotationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.StartIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartIPRotationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartIPRotationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteIPRotationRequest. */ - interface ICompleteIPRotationRequest { - - /** CompleteIPRotationRequest projectId */ - projectId?: (string|null); - - /** CompleteIPRotationRequest zone */ - zone?: (string|null); - - /** CompleteIPRotationRequest clusterId */ - clusterId?: (string|null); - - /** CompleteIPRotationRequest name */ - name?: (string|null); - } - - /** Represents a CompleteIPRotationRequest. */ - class CompleteIPRotationRequest implements ICompleteIPRotationRequest { - - /** - * Constructs a new CompleteIPRotationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICompleteIPRotationRequest); - - /** CompleteIPRotationRequest projectId. */ - public projectId: string; - - /** CompleteIPRotationRequest zone. */ - public zone: string; - - /** CompleteIPRotationRequest clusterId. */ - public clusterId: string; - - /** CompleteIPRotationRequest name. */ - public name: string; - - /** - * Creates a new CompleteIPRotationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteIPRotationRequest instance - */ - public static create(properties?: google.container.v1.ICompleteIPRotationRequest): google.container.v1.CompleteIPRotationRequest; - - /** - * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. - * @param message CompleteIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. - * @param message CompleteIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompleteIPRotationRequest; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompleteIPRotationRequest; - - /** - * Verifies a CompleteIPRotationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteIPRotationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CompleteIPRotationRequest; - - /** - * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. - * @param message CompleteIPRotationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CompleteIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteIPRotationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteIPRotationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|Long|string|null); - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); - - /** AcceleratorConfig gpuPartitionSize */ - gpuPartitionSize?: (string|null); - - /** AcceleratorConfig gpuSharingConfig */ - gpuSharingConfig?: (google.container.v1.IGPUSharingConfig|null); - - /** AcceleratorConfig gpuDriverInstallationConfig */ - gpuDriverInstallationConfig?: (google.container.v1.IGPUDriverInstallationConfig|null); - } - - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { - - /** - * Constructs a new AcceleratorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount: (number|Long|string); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType: string; - - /** AcceleratorConfig gpuPartitionSize. */ - public gpuPartitionSize: string; - - /** AcceleratorConfig gpuSharingConfig. */ - public gpuSharingConfig?: (google.container.v1.IGPUSharingConfig|null); - - /** AcceleratorConfig gpuDriverInstallationConfig. */ - public gpuDriverInstallationConfig?: (google.container.v1.IGPUDriverInstallationConfig|null); - - /** AcceleratorConfig _gpuSharingConfig. */ - public _gpuSharingConfig?: "gpuSharingConfig"; - - /** AcceleratorConfig _gpuDriverInstallationConfig. */ - public _gpuDriverInstallationConfig?: "gpuDriverInstallationConfig"; - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AcceleratorConfig instance - */ - public static create(properties?: google.container.v1.IAcceleratorConfig): google.container.v1.AcceleratorConfig; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AcceleratorConfig; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AcceleratorConfig; - - /** - * Verifies an AcceleratorConfig message. - * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcceleratorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AcceleratorConfig; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcceleratorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcceleratorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GPUSharingConfig. */ - interface IGPUSharingConfig { - - /** GPUSharingConfig maxSharedClientsPerGpu */ - maxSharedClientsPerGpu?: (number|Long|string|null); - - /** GPUSharingConfig gpuSharingStrategy */ - gpuSharingStrategy?: (google.container.v1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1.GPUSharingConfig.GPUSharingStrategy|null); - } - - /** Represents a GPUSharingConfig. */ - class GPUSharingConfig implements IGPUSharingConfig { - - /** - * Constructs a new GPUSharingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGPUSharingConfig); - - /** GPUSharingConfig maxSharedClientsPerGpu. */ - public maxSharedClientsPerGpu: (number|Long|string); - - /** GPUSharingConfig gpuSharingStrategy. */ - public gpuSharingStrategy?: (google.container.v1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1.GPUSharingConfig.GPUSharingStrategy|null); - - /** GPUSharingConfig _gpuSharingStrategy. */ - public _gpuSharingStrategy?: "gpuSharingStrategy"; - - /** - * Creates a new GPUSharingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GPUSharingConfig instance - */ - public static create(properties?: google.container.v1.IGPUSharingConfig): google.container.v1.GPUSharingConfig; - - /** - * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. - * @param message GPUSharingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. - * @param message GPUSharingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GPUSharingConfig; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GPUSharingConfig; - - /** - * Verifies a GPUSharingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GPUSharingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GPUSharingConfig; - - /** - * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. - * @param message GPUSharingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GPUSharingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GPUSharingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GPUSharingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GPUSharingConfig { - - /** GPUSharingStrategy enum. */ - enum GPUSharingStrategy { - GPU_SHARING_STRATEGY_UNSPECIFIED = 0, - TIME_SHARING = 1, - MPS = 2 - } - } - - /** Properties of a GPUDriverInstallationConfig. */ - interface IGPUDriverInstallationConfig { - - /** GPUDriverInstallationConfig gpuDriverVersion */ - gpuDriverVersion?: (google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null); - } - - /** Represents a GPUDriverInstallationConfig. */ - class GPUDriverInstallationConfig implements IGPUDriverInstallationConfig { - - /** - * Constructs a new GPUDriverInstallationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGPUDriverInstallationConfig); - - /** GPUDriverInstallationConfig gpuDriverVersion. */ - public gpuDriverVersion?: (google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null); - - /** GPUDriverInstallationConfig _gpuDriverVersion. */ - public _gpuDriverVersion?: "gpuDriverVersion"; - - /** - * Creates a new GPUDriverInstallationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GPUDriverInstallationConfig instance - */ - public static create(properties?: google.container.v1.IGPUDriverInstallationConfig): google.container.v1.GPUDriverInstallationConfig; - - /** - * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. - * @param message GPUDriverInstallationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. - * @param message GPUDriverInstallationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GPUDriverInstallationConfig; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GPUDriverInstallationConfig; - - /** - * Verifies a GPUDriverInstallationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GPUDriverInstallationConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GPUDriverInstallationConfig; - - /** - * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. - * @param message GPUDriverInstallationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GPUDriverInstallationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GPUDriverInstallationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GPUDriverInstallationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GPUDriverInstallationConfig { - - /** GPUDriverVersion enum. */ - enum GPUDriverVersion { - GPU_DRIVER_VERSION_UNSPECIFIED = 0, - INSTALLATION_DISABLED = 1, - DEFAULT = 2, - LATEST = 3 - } - } - - /** Properties of a WorkloadMetadataConfig. */ - interface IWorkloadMetadataConfig { - - /** WorkloadMetadataConfig mode */ - mode?: (google.container.v1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1.WorkloadMetadataConfig.Mode|null); - } - - /** Represents a WorkloadMetadataConfig. */ - class WorkloadMetadataConfig implements IWorkloadMetadataConfig { - - /** - * Constructs a new WorkloadMetadataConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IWorkloadMetadataConfig); - - /** WorkloadMetadataConfig mode. */ - public mode: (google.container.v1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1.WorkloadMetadataConfig.Mode); - - /** - * Creates a new WorkloadMetadataConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadMetadataConfig instance - */ - public static create(properties?: google.container.v1.IWorkloadMetadataConfig): google.container.v1.WorkloadMetadataConfig; - - /** - * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. - * @param message WorkloadMetadataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. - * @param message WorkloadMetadataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WorkloadMetadataConfig; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WorkloadMetadataConfig; - - /** - * Verifies a WorkloadMetadataConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadMetadataConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadMetadataConfig; - - /** - * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. - * @param message WorkloadMetadataConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.WorkloadMetadataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadMetadataConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadMetadataConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkloadMetadataConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - GCE_METADATA = 1, - GKE_METADATA = 2 - } - } - - /** Properties of a SetNetworkPolicyRequest. */ - interface ISetNetworkPolicyRequest { - - /** SetNetworkPolicyRequest projectId */ - projectId?: (string|null); - - /** SetNetworkPolicyRequest zone */ - zone?: (string|null); - - /** SetNetworkPolicyRequest clusterId */ - clusterId?: (string|null); - - /** SetNetworkPolicyRequest networkPolicy */ - networkPolicy?: (google.container.v1.INetworkPolicy|null); - - /** SetNetworkPolicyRequest name */ - name?: (string|null); - } - - /** Represents a SetNetworkPolicyRequest. */ - class SetNetworkPolicyRequest implements ISetNetworkPolicyRequest { - - /** - * Constructs a new SetNetworkPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetNetworkPolicyRequest); - - /** SetNetworkPolicyRequest projectId. */ - public projectId: string; - - /** SetNetworkPolicyRequest zone. */ - public zone: string; - - /** SetNetworkPolicyRequest clusterId. */ - public clusterId: string; - - /** SetNetworkPolicyRequest networkPolicy. */ - public networkPolicy?: (google.container.v1.INetworkPolicy|null); - - /** SetNetworkPolicyRequest name. */ - public name: string; - - /** - * Creates a new SetNetworkPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNetworkPolicyRequest instance - */ - public static create(properties?: google.container.v1.ISetNetworkPolicyRequest): google.container.v1.SetNetworkPolicyRequest; - - /** - * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. - * @param message SetNetworkPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. - * @param message SetNetworkPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetNetworkPolicyRequest; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetNetworkPolicyRequest; - - /** - * Verifies a SetNetworkPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNetworkPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetNetworkPolicyRequest; - - /** - * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. - * @param message SetNetworkPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetNetworkPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNetworkPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNetworkPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMaintenancePolicyRequest. */ - interface ISetMaintenancePolicyRequest { - - /** SetMaintenancePolicyRequest projectId */ - projectId?: (string|null); - - /** SetMaintenancePolicyRequest zone */ - zone?: (string|null); - - /** SetMaintenancePolicyRequest clusterId */ - clusterId?: (string|null); - - /** SetMaintenancePolicyRequest maintenancePolicy */ - maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); - - /** SetMaintenancePolicyRequest name */ - name?: (string|null); - } - - /** Represents a SetMaintenancePolicyRequest. */ - class SetMaintenancePolicyRequest implements ISetMaintenancePolicyRequest { - - /** - * Constructs a new SetMaintenancePolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISetMaintenancePolicyRequest); - - /** SetMaintenancePolicyRequest projectId. */ - public projectId: string; - - /** SetMaintenancePolicyRequest zone. */ - public zone: string; - - /** SetMaintenancePolicyRequest clusterId. */ - public clusterId: string; - - /** SetMaintenancePolicyRequest maintenancePolicy. */ - public maintenancePolicy?: (google.container.v1.IMaintenancePolicy|null); - - /** SetMaintenancePolicyRequest name. */ - public name: string; - - /** - * Creates a new SetMaintenancePolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMaintenancePolicyRequest instance - */ - public static create(properties?: google.container.v1.ISetMaintenancePolicyRequest): google.container.v1.SetMaintenancePolicyRequest; - - /** - * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. - * @param message SetMaintenancePolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. - * @param message SetMaintenancePolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SetMaintenancePolicyRequest; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SetMaintenancePolicyRequest; - - /** - * Verifies a SetMaintenancePolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMaintenancePolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SetMaintenancePolicyRequest; - - /** - * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. - * @param message SetMaintenancePolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SetMaintenancePolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMaintenancePolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMaintenancePolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StatusCondition. */ - interface IStatusCondition { - - /** StatusCondition code */ - code?: (google.container.v1.StatusCondition.Code|keyof typeof google.container.v1.StatusCondition.Code|null); - - /** StatusCondition message */ - message?: (string|null); - - /** StatusCondition canonicalCode */ - canonicalCode?: (google.rpc.Code|keyof typeof google.rpc.Code|null); - } - - /** Represents a StatusCondition. */ - class StatusCondition implements IStatusCondition { - - /** - * Constructs a new StatusCondition. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IStatusCondition); - - /** StatusCondition code. */ - public code: (google.container.v1.StatusCondition.Code|keyof typeof google.container.v1.StatusCondition.Code); - - /** StatusCondition message. */ - public message: string; - - /** StatusCondition canonicalCode. */ - public canonicalCode: (google.rpc.Code|keyof typeof google.rpc.Code); - - /** - * Creates a new StatusCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns StatusCondition instance - */ - public static create(properties?: google.container.v1.IStatusCondition): google.container.v1.StatusCondition; - - /** - * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. - * @param message StatusCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. - * @param message StatusCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatusCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.StatusCondition; - - /** - * Decodes a StatusCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.StatusCondition; - - /** - * Verifies a StatusCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatusCondition - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.StatusCondition; - - /** - * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. - * @param message StatusCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.StatusCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatusCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatusCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StatusCondition { - - /** Code enum. */ - enum Code { - UNKNOWN = 0, - GCE_STOCKOUT = 1, - GKE_SERVICE_ACCOUNT_DELETED = 2, - GCE_QUOTA_EXCEEDED = 3, - SET_BY_OPERATOR = 4, - CLOUD_KMS_KEY_ERROR = 7, - CA_EXPIRING = 9 - } - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig subnetwork */ - subnetwork?: (string|null); - - /** NetworkConfig enableIntraNodeVisibility */ - enableIntraNodeVisibility?: (boolean|null); - - /** NetworkConfig defaultSnatStatus */ - defaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); - - /** NetworkConfig enableL4ilbSubsetting */ - enableL4ilbSubsetting?: (boolean|null); - - /** NetworkConfig datapathProvider */ - datapathProvider?: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider|null); - - /** NetworkConfig privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess|null); - - /** NetworkConfig dnsConfig */ - dnsConfig?: (google.container.v1.IDNSConfig|null); - - /** NetworkConfig serviceExternalIpsConfig */ - serviceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); - - /** NetworkConfig gatewayApiConfig */ - gatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); - - /** NetworkConfig enableMultiNetworking */ - enableMultiNetworking?: (boolean|null); - - /** NetworkConfig networkPerformanceConfig */ - networkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** NetworkConfig enableFqdnNetworkPolicy */ - enableFqdnNetworkPolicy?: (boolean|null); - - /** NetworkConfig inTransitEncryptionConfig */ - inTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); - - /** NetworkConfig enableCiliumClusterwideNetworkPolicy */ - enableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** NetworkConfig defaultEnablePrivateNodes */ - defaultEnablePrivateNodes?: (boolean|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INetworkConfig); - - /** NetworkConfig network. */ - public network: string; - - /** NetworkConfig subnetwork. */ - public subnetwork: string; - - /** NetworkConfig enableIntraNodeVisibility. */ - public enableIntraNodeVisibility: boolean; - - /** NetworkConfig defaultSnatStatus. */ - public defaultSnatStatus?: (google.container.v1.IDefaultSnatStatus|null); - - /** NetworkConfig enableL4ilbSubsetting. */ - public enableL4ilbSubsetting: boolean; - - /** NetworkConfig datapathProvider. */ - public datapathProvider: (google.container.v1.DatapathProvider|keyof typeof google.container.v1.DatapathProvider); - - /** NetworkConfig privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess: (google.container.v1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1.PrivateIPv6GoogleAccess); - - /** NetworkConfig dnsConfig. */ - public dnsConfig?: (google.container.v1.IDNSConfig|null); - - /** NetworkConfig serviceExternalIpsConfig. */ - public serviceExternalIpsConfig?: (google.container.v1.IServiceExternalIPsConfig|null); - - /** NetworkConfig gatewayApiConfig. */ - public gatewayApiConfig?: (google.container.v1.IGatewayAPIConfig|null); - - /** NetworkConfig enableMultiNetworking. */ - public enableMultiNetworking: boolean; - - /** NetworkConfig networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** NetworkConfig enableFqdnNetworkPolicy. */ - public enableFqdnNetworkPolicy?: (boolean|null); - - /** NetworkConfig inTransitEncryptionConfig. */ - public inTransitEncryptionConfig?: (google.container.v1.InTransitEncryptionConfig|keyof typeof google.container.v1.InTransitEncryptionConfig|null); - - /** NetworkConfig enableCiliumClusterwideNetworkPolicy. */ - public enableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** NetworkConfig defaultEnablePrivateNodes. */ - public defaultEnablePrivateNodes?: (boolean|null); - - /** NetworkConfig _enableFqdnNetworkPolicy. */ - public _enableFqdnNetworkPolicy?: "enableFqdnNetworkPolicy"; - - /** NetworkConfig _inTransitEncryptionConfig. */ - public _inTransitEncryptionConfig?: "inTransitEncryptionConfig"; - - /** NetworkConfig _enableCiliumClusterwideNetworkPolicy. */ - public _enableCiliumClusterwideNetworkPolicy?: "enableCiliumClusterwideNetworkPolicy"; - - /** NetworkConfig _defaultEnablePrivateNodes. */ - public _defaultEnablePrivateNodes?: "defaultEnablePrivateNodes"; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: google.container.v1.INetworkConfig): google.container.v1.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** Properties of a ClusterNetworkPerformanceConfig. */ - interface IClusterNetworkPerformanceConfig { - - /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); - } - - /** Represents a ClusterNetworkPerformanceConfig. */ - class ClusterNetworkPerformanceConfig implements IClusterNetworkPerformanceConfig { - - /** - * Constructs a new ClusterNetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig); - - /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); - - /** ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterNetworkPerformanceConfig instance - */ - public static create(properties?: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @param message ClusterNetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @param message ClusterNetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Verifies a ClusterNetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterNetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message ClusterNetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterNetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterNetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ClusterNetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - TIER_1 = 1 - } - } - } - - /** Properties of a GatewayAPIConfig. */ - interface IGatewayAPIConfig { - - /** GatewayAPIConfig channel */ - channel?: (google.container.v1.GatewayAPIConfig.Channel|keyof typeof google.container.v1.GatewayAPIConfig.Channel|null); - } - - /** Represents a GatewayAPIConfig. */ - class GatewayAPIConfig implements IGatewayAPIConfig { - - /** - * Constructs a new GatewayAPIConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGatewayAPIConfig); - - /** GatewayAPIConfig channel. */ - public channel: (google.container.v1.GatewayAPIConfig.Channel|keyof typeof google.container.v1.GatewayAPIConfig.Channel); - - /** - * Creates a new GatewayAPIConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GatewayAPIConfig instance - */ - public static create(properties?: google.container.v1.IGatewayAPIConfig): google.container.v1.GatewayAPIConfig; - - /** - * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. - * @param message GatewayAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. - * @param message GatewayAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GatewayAPIConfig; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GatewayAPIConfig; - - /** - * Verifies a GatewayAPIConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GatewayAPIConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GatewayAPIConfig; - - /** - * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. - * @param message GatewayAPIConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GatewayAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GatewayAPIConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GatewayAPIConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GatewayAPIConfig { - - /** Channel enum. */ - enum Channel { - CHANNEL_UNSPECIFIED = 0, - CHANNEL_DISABLED = 1, - CHANNEL_EXPERIMENTAL = 3, - CHANNEL_STANDARD = 4 - } - } - - /** Properties of a ServiceExternalIPsConfig. */ - interface IServiceExternalIPsConfig { - - /** ServiceExternalIPsConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ServiceExternalIPsConfig. */ - class ServiceExternalIPsConfig implements IServiceExternalIPsConfig { - - /** - * Constructs a new ServiceExternalIPsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IServiceExternalIPsConfig); - - /** ServiceExternalIPsConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ServiceExternalIPsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceExternalIPsConfig instance - */ - public static create(properties?: google.container.v1.IServiceExternalIPsConfig): google.container.v1.ServiceExternalIPsConfig; - - /** - * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. - * @param message ServiceExternalIPsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. - * @param message ServiceExternalIPsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ServiceExternalIPsConfig; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ServiceExternalIPsConfig; - - /** - * Verifies a ServiceExternalIPsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceExternalIPsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ServiceExternalIPsConfig; - - /** - * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. - * @param message ServiceExternalIPsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ServiceExternalIPsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceExternalIPsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceExternalIPsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOpenIDConfigRequest. */ - interface IGetOpenIDConfigRequest { - - /** GetOpenIDConfigRequest parent */ - parent?: (string|null); - } - - /** Represents a GetOpenIDConfigRequest. */ - class GetOpenIDConfigRequest implements IGetOpenIDConfigRequest { - - /** - * Constructs a new GetOpenIDConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetOpenIDConfigRequest); - - /** GetOpenIDConfigRequest parent. */ - public parent: string; - - /** - * Creates a new GetOpenIDConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOpenIDConfigRequest instance - */ - public static create(properties?: google.container.v1.IGetOpenIDConfigRequest): google.container.v1.GetOpenIDConfigRequest; - - /** - * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. - * @param message GetOpenIDConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. - * @param message GetOpenIDConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOpenIDConfigRequest; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOpenIDConfigRequest; - - /** - * Verifies a GetOpenIDConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOpenIDConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigRequest; - - /** - * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. - * @param message GetOpenIDConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetOpenIDConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOpenIDConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOpenIDConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOpenIDConfigResponse. */ - interface IGetOpenIDConfigResponse { - - /** GetOpenIDConfigResponse issuer */ - issuer?: (string|null); - - /** GetOpenIDConfigResponse jwksUri */ - jwksUri?: (string|null); - - /** GetOpenIDConfigResponse responseTypesSupported */ - responseTypesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse subjectTypesSupported */ - subjectTypesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported */ - idTokenSigningAlgValuesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse claimsSupported */ - claimsSupported?: (string[]|null); - - /** GetOpenIDConfigResponse grantTypes */ - grantTypes?: (string[]|null); - } - - /** Represents a GetOpenIDConfigResponse. */ - class GetOpenIDConfigResponse implements IGetOpenIDConfigResponse { - - /** - * Constructs a new GetOpenIDConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetOpenIDConfigResponse); - - /** GetOpenIDConfigResponse issuer. */ - public issuer: string; - - /** GetOpenIDConfigResponse jwksUri. */ - public jwksUri: string; - - /** GetOpenIDConfigResponse responseTypesSupported. */ - public responseTypesSupported: string[]; - - /** GetOpenIDConfigResponse subjectTypesSupported. */ - public subjectTypesSupported: string[]; - - /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. */ - public idTokenSigningAlgValuesSupported: string[]; - - /** GetOpenIDConfigResponse claimsSupported. */ - public claimsSupported: string[]; - - /** GetOpenIDConfigResponse grantTypes. */ - public grantTypes: string[]; - - /** - * Creates a new GetOpenIDConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOpenIDConfigResponse instance - */ - public static create(properties?: google.container.v1.IGetOpenIDConfigResponse): google.container.v1.GetOpenIDConfigResponse; - - /** - * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. - * @param message GetOpenIDConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. - * @param message GetOpenIDConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetOpenIDConfigResponse; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetOpenIDConfigResponse; - - /** - * Verifies a GetOpenIDConfigResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOpenIDConfigResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigResponse; - - /** - * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. - * @param message GetOpenIDConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetOpenIDConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOpenIDConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOpenIDConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJSONWebKeysRequest. */ - interface IGetJSONWebKeysRequest { - - /** GetJSONWebKeysRequest parent */ - parent?: (string|null); - } - - /** Represents a GetJSONWebKeysRequest. */ - class GetJSONWebKeysRequest implements IGetJSONWebKeysRequest { - - /** - * Constructs a new GetJSONWebKeysRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetJSONWebKeysRequest); - - /** GetJSONWebKeysRequest parent. */ - public parent: string; - - /** - * Creates a new GetJSONWebKeysRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJSONWebKeysRequest instance - */ - public static create(properties?: google.container.v1.IGetJSONWebKeysRequest): google.container.v1.GetJSONWebKeysRequest; - - /** - * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. - * @param message GetJSONWebKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. - * @param message GetJSONWebKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetJSONWebKeysRequest; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetJSONWebKeysRequest; - - /** - * Verifies a GetJSONWebKeysRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJSONWebKeysRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetJSONWebKeysRequest; - - /** - * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. - * @param message GetJSONWebKeysRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetJSONWebKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJSONWebKeysRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetJSONWebKeysRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Jwk. */ - interface IJwk { - - /** Jwk kty */ - kty?: (string|null); - - /** Jwk alg */ - alg?: (string|null); - - /** Jwk use */ - use?: (string|null); - - /** Jwk kid */ - kid?: (string|null); - - /** Jwk n */ - n?: (string|null); - - /** Jwk e */ - e?: (string|null); - - /** Jwk x */ - x?: (string|null); - - /** Jwk y */ - y?: (string|null); - - /** Jwk crv */ - crv?: (string|null); - } - - /** Represents a Jwk. */ - class Jwk implements IJwk { - - /** - * Constructs a new Jwk. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IJwk); - - /** Jwk kty. */ - public kty: string; - - /** Jwk alg. */ - public alg: string; - - /** Jwk use. */ - public use: string; - - /** Jwk kid. */ - public kid: string; - - /** Jwk n. */ - public n: string; - - /** Jwk e. */ - public e: string; - - /** Jwk x. */ - public x: string; - - /** Jwk y. */ - public y: string; - - /** Jwk crv. */ - public crv: string; - - /** - * Creates a new Jwk instance using the specified properties. - * @param [properties] Properties to set - * @returns Jwk instance - */ - public static create(properties?: google.container.v1.IJwk): google.container.v1.Jwk; - - /** - * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. - * @param message Jwk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. - * @param message Jwk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Jwk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Jwk; - - /** - * Decodes a Jwk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Jwk; - - /** - * Verifies a Jwk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Jwk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Jwk - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.Jwk; - - /** - * Creates a plain object from a Jwk message. Also converts values to other types if specified. - * @param message Jwk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.Jwk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Jwk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Jwk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJSONWebKeysResponse. */ - interface IGetJSONWebKeysResponse { - - /** GetJSONWebKeysResponse keys */ - keys?: (google.container.v1.IJwk[]|null); - } - - /** Represents a GetJSONWebKeysResponse. */ - class GetJSONWebKeysResponse implements IGetJSONWebKeysResponse { - - /** - * Constructs a new GetJSONWebKeysResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IGetJSONWebKeysResponse); - - /** GetJSONWebKeysResponse keys. */ - public keys: google.container.v1.IJwk[]; - - /** - * Creates a new GetJSONWebKeysResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJSONWebKeysResponse instance - */ - public static create(properties?: google.container.v1.IGetJSONWebKeysResponse): google.container.v1.GetJSONWebKeysResponse; - - /** - * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. - * @param message GetJSONWebKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. - * @param message GetJSONWebKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.GetJSONWebKeysResponse; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.GetJSONWebKeysResponse; - - /** - * Verifies a GetJSONWebKeysResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJSONWebKeysResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.GetJSONWebKeysResponse; - - /** - * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. - * @param message GetJSONWebKeysResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.GetJSONWebKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJSONWebKeysResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetJSONWebKeysResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CheckAutopilotCompatibilityRequest. */ - interface ICheckAutopilotCompatibilityRequest { - - /** CheckAutopilotCompatibilityRequest name */ - name?: (string|null); - } - - /** Represents a CheckAutopilotCompatibilityRequest. */ - class CheckAutopilotCompatibilityRequest implements ICheckAutopilotCompatibilityRequest { - - /** - * Constructs a new CheckAutopilotCompatibilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICheckAutopilotCompatibilityRequest); - - /** CheckAutopilotCompatibilityRequest name. */ - public name: string; - - /** - * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckAutopilotCompatibilityRequest instance - */ - public static create(properties?: google.container.v1.ICheckAutopilotCompatibilityRequest): google.container.v1.CheckAutopilotCompatibilityRequest; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @param message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @param message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CheckAutopilotCompatibilityRequest; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CheckAutopilotCompatibilityRequest; - - /** - * Verifies a CheckAutopilotCompatibilityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckAutopilotCompatibilityRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CheckAutopilotCompatibilityRequest; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. - * @param message CheckAutopilotCompatibilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CheckAutopilotCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckAutopilotCompatibilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutopilotCompatibilityIssue. */ - interface IAutopilotCompatibilityIssue { - - /** AutopilotCompatibilityIssue lastObservation */ - lastObservation?: (google.protobuf.ITimestamp|null); - - /** AutopilotCompatibilityIssue constraintType */ - constraintType?: (string|null); - - /** AutopilotCompatibilityIssue incompatibilityType */ - incompatibilityType?: (google.container.v1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1.AutopilotCompatibilityIssue.IssueType|null); - - /** AutopilotCompatibilityIssue subjects */ - subjects?: (string[]|null); - - /** AutopilotCompatibilityIssue documentationUrl */ - documentationUrl?: (string|null); - - /** AutopilotCompatibilityIssue description */ - description?: (string|null); - } - - /** Represents an AutopilotCompatibilityIssue. */ - class AutopilotCompatibilityIssue implements IAutopilotCompatibilityIssue { - - /** - * Constructs a new AutopilotCompatibilityIssue. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAutopilotCompatibilityIssue); - - /** AutopilotCompatibilityIssue lastObservation. */ - public lastObservation?: (google.protobuf.ITimestamp|null); - - /** AutopilotCompatibilityIssue constraintType. */ - public constraintType: string; - - /** AutopilotCompatibilityIssue incompatibilityType. */ - public incompatibilityType: (google.container.v1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1.AutopilotCompatibilityIssue.IssueType); - - /** AutopilotCompatibilityIssue subjects. */ - public subjects: string[]; - - /** AutopilotCompatibilityIssue documentationUrl. */ - public documentationUrl: string; - - /** AutopilotCompatibilityIssue description. */ - public description: string; - - /** - * Creates a new AutopilotCompatibilityIssue instance using the specified properties. - * @param [properties] Properties to set - * @returns AutopilotCompatibilityIssue instance - */ - public static create(properties?: google.container.v1.IAutopilotCompatibilityIssue): google.container.v1.AutopilotCompatibilityIssue; - - /** - * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. - * @param message AutopilotCompatibilityIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. - * @param message AutopilotCompatibilityIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AutopilotCompatibilityIssue; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AutopilotCompatibilityIssue; - - /** - * Verifies an AutopilotCompatibilityIssue message. - * @param message Plain 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 AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutopilotCompatibilityIssue - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AutopilotCompatibilityIssue; - - /** - * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. - * @param message AutopilotCompatibilityIssue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AutopilotCompatibilityIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutopilotCompatibilityIssue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutopilotCompatibilityIssue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AutopilotCompatibilityIssue { - - /** IssueType enum. */ - enum IssueType { - UNSPECIFIED = 0, - INCOMPATIBILITY = 1, - ADDITIONAL_CONFIG_REQUIRED = 2, - PASSED_WITH_OPTIONAL_CONFIG = 3 - } - } - - /** Properties of a CheckAutopilotCompatibilityResponse. */ - interface ICheckAutopilotCompatibilityResponse { - - /** CheckAutopilotCompatibilityResponse issues */ - issues?: (google.container.v1.IAutopilotCompatibilityIssue[]|null); - - /** CheckAutopilotCompatibilityResponse summary */ - summary?: (string|null); - } - - /** Represents a CheckAutopilotCompatibilityResponse. */ - class CheckAutopilotCompatibilityResponse implements ICheckAutopilotCompatibilityResponse { - - /** - * Constructs a new CheckAutopilotCompatibilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICheckAutopilotCompatibilityResponse); - - /** CheckAutopilotCompatibilityResponse issues. */ - public issues: google.container.v1.IAutopilotCompatibilityIssue[]; - - /** CheckAutopilotCompatibilityResponse summary. */ - public summary: string; - - /** - * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckAutopilotCompatibilityResponse instance - */ - public static create(properties?: google.container.v1.ICheckAutopilotCompatibilityResponse): google.container.v1.CheckAutopilotCompatibilityResponse; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @param message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @param message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CheckAutopilotCompatibilityResponse; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CheckAutopilotCompatibilityResponse; - - /** - * Verifies a CheckAutopilotCompatibilityResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckAutopilotCompatibilityResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CheckAutopilotCompatibilityResponse; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. - * @param message CheckAutopilotCompatibilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CheckAutopilotCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckAutopilotCompatibilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReleaseChannel. */ - interface IReleaseChannel { - - /** ReleaseChannel channel */ - channel?: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel|null); - } - - /** Represents a ReleaseChannel. */ - class ReleaseChannel implements IReleaseChannel { - - /** - * Constructs a new ReleaseChannel. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IReleaseChannel); - - /** ReleaseChannel channel. */ - public channel: (google.container.v1.ReleaseChannel.Channel|keyof typeof google.container.v1.ReleaseChannel.Channel); - - /** - * Creates a new ReleaseChannel instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseChannel instance - */ - public static create(properties?: google.container.v1.IReleaseChannel): google.container.v1.ReleaseChannel; - - /** - * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. - * @param message ReleaseChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. - * @param message ReleaseChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ReleaseChannel; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ReleaseChannel; - - /** - * Verifies a ReleaseChannel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseChannel - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ReleaseChannel; - - /** - * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. - * @param message ReleaseChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ReleaseChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseChannel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReleaseChannel - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReleaseChannel { - - /** Channel enum. */ - enum Channel { - UNSPECIFIED = 0, - RAPID = 1, - REGULAR = 2, - STABLE = 3, - EXTENDED = 4 - } - } - - /** Properties of a CostManagementConfig. */ - interface ICostManagementConfig { - - /** CostManagementConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a CostManagementConfig. */ - class CostManagementConfig implements ICostManagementConfig { - - /** - * Constructs a new CostManagementConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ICostManagementConfig); - - /** CostManagementConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new CostManagementConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CostManagementConfig instance - */ - public static create(properties?: google.container.v1.ICostManagementConfig): google.container.v1.CostManagementConfig; - - /** - * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. - * @param message CostManagementConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. - * @param message CostManagementConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CostManagementConfig; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CostManagementConfig; - - /** - * Verifies a CostManagementConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CostManagementConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.CostManagementConfig; - - /** - * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. - * @param message CostManagementConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.CostManagementConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CostManagementConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CostManagementConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IntraNodeVisibilityConfig. */ - interface IIntraNodeVisibilityConfig { - - /** IntraNodeVisibilityConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents an IntraNodeVisibilityConfig. */ - class IntraNodeVisibilityConfig implements IIntraNodeVisibilityConfig { - - /** - * Constructs a new IntraNodeVisibilityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IIntraNodeVisibilityConfig); - - /** IntraNodeVisibilityConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new IntraNodeVisibilityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IntraNodeVisibilityConfig instance - */ - public static create(properties?: google.container.v1.IIntraNodeVisibilityConfig): google.container.v1.IntraNodeVisibilityConfig; - - /** - * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. - * @param message IntraNodeVisibilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. - * @param message IntraNodeVisibilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IntraNodeVisibilityConfig; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IntraNodeVisibilityConfig; - - /** - * Verifies an IntraNodeVisibilityConfig message. - * @param message Plain 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 IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntraNodeVisibilityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.IntraNodeVisibilityConfig; - - /** - * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. - * @param message IntraNodeVisibilityConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.IntraNodeVisibilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntraNodeVisibilityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IntraNodeVisibilityConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ILBSubsettingConfig. */ - interface IILBSubsettingConfig { - - /** ILBSubsettingConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ILBSubsettingConfig. */ - class ILBSubsettingConfig implements IILBSubsettingConfig { - - /** - * Constructs a new ILBSubsettingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IILBSubsettingConfig); - - /** ILBSubsettingConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ILBSubsettingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ILBSubsettingConfig instance - */ - public static create(properties?: google.container.v1.IILBSubsettingConfig): google.container.v1.ILBSubsettingConfig; - - /** - * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. - * @param message ILBSubsettingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. - * @param message ILBSubsettingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ILBSubsettingConfig; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ILBSubsettingConfig; - - /** - * Verifies a ILBSubsettingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ILBSubsettingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ILBSubsettingConfig; - - /** - * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. - * @param message ILBSubsettingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ILBSubsettingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ILBSubsettingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ILBSubsettingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DNSConfig. */ - interface IDNSConfig { - - /** DNSConfig clusterDns */ - clusterDns?: (google.container.v1.DNSConfig.Provider|keyof typeof google.container.v1.DNSConfig.Provider|null); - - /** DNSConfig clusterDnsScope */ - clusterDnsScope?: (google.container.v1.DNSConfig.DNSScope|keyof typeof google.container.v1.DNSConfig.DNSScope|null); - - /** DNSConfig clusterDnsDomain */ - clusterDnsDomain?: (string|null); - - /** DNSConfig additiveVpcScopeDnsDomain */ - additiveVpcScopeDnsDomain?: (string|null); - } - - /** Represents a DNSConfig. */ - class DNSConfig implements IDNSConfig { - - /** - * Constructs a new DNSConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDNSConfig); - - /** DNSConfig clusterDns. */ - public clusterDns: (google.container.v1.DNSConfig.Provider|keyof typeof google.container.v1.DNSConfig.Provider); - - /** DNSConfig clusterDnsScope. */ - public clusterDnsScope: (google.container.v1.DNSConfig.DNSScope|keyof typeof google.container.v1.DNSConfig.DNSScope); - - /** DNSConfig clusterDnsDomain. */ - public clusterDnsDomain: string; - - /** DNSConfig additiveVpcScopeDnsDomain. */ - public additiveVpcScopeDnsDomain: string; - - /** - * Creates a new DNSConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DNSConfig instance - */ - public static create(properties?: google.container.v1.IDNSConfig): google.container.v1.DNSConfig; - - /** - * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. - * @param message DNSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. - * @param message DNSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DNSConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DNSConfig; - - /** - * Decodes a DNSConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DNSConfig; - - /** - * Verifies a DNSConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DNSConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DNSConfig; - - /** - * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. - * @param message DNSConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DNSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DNSConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DNSConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DNSConfig { - - /** Provider enum. */ - enum Provider { - PROVIDER_UNSPECIFIED = 0, - PLATFORM_DEFAULT = 1, - CLOUD_DNS = 2, - KUBE_DNS = 3 - } - - /** DNSScope enum. */ - enum DNSScope { - DNS_SCOPE_UNSPECIFIED = 0, - CLUSTER_SCOPE = 1, - VPC_SCOPE = 2 - } - } - - /** Properties of a MaxPodsConstraint. */ - interface IMaxPodsConstraint { - - /** MaxPodsConstraint maxPodsPerNode */ - maxPodsPerNode?: (number|Long|string|null); - } - - /** Represents a MaxPodsConstraint. */ - class MaxPodsConstraint implements IMaxPodsConstraint { - - /** - * Constructs a new MaxPodsConstraint. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMaxPodsConstraint); - - /** MaxPodsConstraint maxPodsPerNode. */ - public maxPodsPerNode: (number|Long|string); - - /** - * Creates a new MaxPodsConstraint instance using the specified properties. - * @param [properties] Properties to set - * @returns MaxPodsConstraint instance - */ - public static create(properties?: google.container.v1.IMaxPodsConstraint): google.container.v1.MaxPodsConstraint; - - /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.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.container.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.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.container.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.container.v1.MaxPodsConstraint; - - /** - * 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.container.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.container.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.container.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 a WorkloadIdentityConfig. */ - interface IWorkloadIdentityConfig { - - /** WorkloadIdentityConfig workloadPool */ - workloadPool?: (string|null); - } - - /** Represents a WorkloadIdentityConfig. */ - class WorkloadIdentityConfig implements IWorkloadIdentityConfig { - - /** - * Constructs a new WorkloadIdentityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IWorkloadIdentityConfig); - - /** WorkloadIdentityConfig workloadPool. */ - public workloadPool: string; - - /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadIdentityConfig instance - */ - public static create(properties?: google.container.v1.IWorkloadIdentityConfig): google.container.v1.WorkloadIdentityConfig; - - /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.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.container.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.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.container.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.container.v1.WorkloadIdentityConfig; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.container.v1.WorkloadIdentityConfig; - - /** - * 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadIdentityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadIdentityConfig; - - /** - * 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.container.v1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadIdentityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 IdentityServiceConfig. */ - interface IIdentityServiceConfig { - - /** IdentityServiceConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents an IdentityServiceConfig. */ - class IdentityServiceConfig implements IIdentityServiceConfig { - - /** - * Constructs a new IdentityServiceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IIdentityServiceConfig); - - /** IdentityServiceConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new IdentityServiceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IdentityServiceConfig instance - */ - public static create(properties?: google.container.v1.IIdentityServiceConfig): google.container.v1.IdentityServiceConfig; - - /** - * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. - * @param message IdentityServiceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. - * @param message IdentityServiceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.IdentityServiceConfig; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.IdentityServiceConfig; - - /** - * Verifies an IdentityServiceConfig message. - * @param message Plain 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 IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentityServiceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.IdentityServiceConfig; - - /** - * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. - * @param message IdentityServiceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.IdentityServiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentityServiceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IdentityServiceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MeshCertificates. */ - interface IMeshCertificates { - - /** MeshCertificates enableCertificates */ - enableCertificates?: (google.protobuf.IBoolValue|null); - } - - /** Represents a MeshCertificates. */ - class MeshCertificates implements IMeshCertificates { - - /** - * Constructs a new MeshCertificates. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMeshCertificates); - - /** MeshCertificates enableCertificates. */ - public enableCertificates?: (google.protobuf.IBoolValue|null); - - /** - * Creates a new MeshCertificates instance using the specified properties. - * @param [properties] Properties to set - * @returns MeshCertificates instance - */ - public static create(properties?: google.container.v1.IMeshCertificates): google.container.v1.MeshCertificates; - - /** - * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. - * @param message MeshCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. - * @param message MeshCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MeshCertificates; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MeshCertificates; - - /** - * Verifies a MeshCertificates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MeshCertificates - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MeshCertificates; - - /** - * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. - * @param message MeshCertificates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MeshCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MeshCertificates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MeshCertificates - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseEncryption. */ - interface IDatabaseEncryption { - - /** DatabaseEncryption keyName */ - keyName?: (string|null); - - /** DatabaseEncryption state */ - state?: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State|null); - - /** DatabaseEncryption currentState */ - currentState?: (google.container.v1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1.DatabaseEncryption.CurrentState|null); - - /** DatabaseEncryption decryptionKeys */ - decryptionKeys?: (string[]|null); - - /** DatabaseEncryption lastOperationErrors */ - lastOperationErrors?: (google.container.v1.DatabaseEncryption.IOperationError[]|null); - } - - /** Represents a DatabaseEncryption. */ - class DatabaseEncryption implements IDatabaseEncryption { - - /** - * Constructs a new DatabaseEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDatabaseEncryption); - - /** DatabaseEncryption keyName. */ - public keyName: string; - - /** DatabaseEncryption state. */ - public state: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State); - - /** DatabaseEncryption currentState. */ - public currentState?: (google.container.v1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1.DatabaseEncryption.CurrentState|null); - - /** DatabaseEncryption decryptionKeys. */ - public decryptionKeys: string[]; - - /** DatabaseEncryption lastOperationErrors. */ - public lastOperationErrors: google.container.v1.DatabaseEncryption.IOperationError[]; - - /** DatabaseEncryption _currentState. */ - public _currentState?: "currentState"; - - /** - * Creates a new DatabaseEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseEncryption instance - */ - public static create(properties?: google.container.v1.IDatabaseEncryption): google.container.v1.DatabaseEncryption; - - /** - * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. - * @param message DatabaseEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. - * @param message DatabaseEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DatabaseEncryption; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DatabaseEncryption; - - /** - * Verifies a DatabaseEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseEncryption - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DatabaseEncryption; - - /** - * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. - * @param message DatabaseEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseEncryption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DatabaseEncryption { - - /** State enum. */ - enum State { - UNKNOWN = 0, - ENCRYPTED = 1, - DECRYPTED = 2 - } - - /** CurrentState enum. */ - enum CurrentState { - CURRENT_STATE_UNSPECIFIED = 0, - CURRENT_STATE_ENCRYPTED = 7, - CURRENT_STATE_DECRYPTED = 2, - CURRENT_STATE_ENCRYPTION_PENDING = 3, - CURRENT_STATE_ENCRYPTION_ERROR = 4, - CURRENT_STATE_DECRYPTION_PENDING = 5, - CURRENT_STATE_DECRYPTION_ERROR = 6 - } - - /** Properties of an OperationError. */ - interface IOperationError { - - /** OperationError keyName */ - keyName?: (string|null); - - /** OperationError errorMessage */ - errorMessage?: (string|null); - - /** OperationError timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents an OperationError. */ - class OperationError implements IOperationError { - - /** - * Constructs a new OperationError. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.DatabaseEncryption.IOperationError); - - /** OperationError keyName. */ - public keyName: string; - - /** OperationError errorMessage. */ - public errorMessage: string; - - /** OperationError timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new OperationError instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationError instance - */ - public static create(properties?: google.container.v1.DatabaseEncryption.IOperationError): google.container.v1.DatabaseEncryption.OperationError; - - /** - * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. - * @param message OperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. - * @param message OperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DatabaseEncryption.OperationError; - - /** - * Decodes an OperationError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DatabaseEncryption.OperationError; - - /** - * Verifies an OperationError message. - * @param message Plain 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 OperationError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationError - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DatabaseEncryption.OperationError; - - /** - * Creates a plain object from an OperationError message. Also converts values to other types if specified. - * @param message OperationError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DatabaseEncryption.OperationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ListUsableSubnetworksRequest. */ - interface IListUsableSubnetworksRequest { - - /** ListUsableSubnetworksRequest parent */ - parent?: (string|null); - - /** ListUsableSubnetworksRequest filter */ - filter?: (string|null); - - /** ListUsableSubnetworksRequest pageSize */ - pageSize?: (number|null); - - /** ListUsableSubnetworksRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUsableSubnetworksRequest. */ - class ListUsableSubnetworksRequest implements IListUsableSubnetworksRequest { - - /** - * Constructs a new ListUsableSubnetworksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListUsableSubnetworksRequest); - - /** ListUsableSubnetworksRequest parent. */ - public parent: string; - - /** ListUsableSubnetworksRequest filter. */ - public filter: string; - - /** ListUsableSubnetworksRequest pageSize. */ - public pageSize: number; - - /** ListUsableSubnetworksRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUsableSubnetworksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUsableSubnetworksRequest instance - */ - public static create(properties?: google.container.v1.IListUsableSubnetworksRequest): google.container.v1.ListUsableSubnetworksRequest; - - /** - * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. - * @param message ListUsableSubnetworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. - * @param message ListUsableSubnetworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListUsableSubnetworksRequest; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListUsableSubnetworksRequest; - - /** - * Verifies a ListUsableSubnetworksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUsableSubnetworksRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListUsableSubnetworksRequest; - - /** - * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. - * @param message ListUsableSubnetworksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListUsableSubnetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUsableSubnetworksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUsableSubnetworksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUsableSubnetworksResponse. */ - interface IListUsableSubnetworksResponse { - - /** ListUsableSubnetworksResponse subnetworks */ - subnetworks?: (google.container.v1.IUsableSubnetwork[]|null); - - /** ListUsableSubnetworksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUsableSubnetworksResponse. */ - class ListUsableSubnetworksResponse implements IListUsableSubnetworksResponse { - - /** - * Constructs a new ListUsableSubnetworksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IListUsableSubnetworksResponse); - - /** ListUsableSubnetworksResponse subnetworks. */ - public subnetworks: google.container.v1.IUsableSubnetwork[]; - - /** ListUsableSubnetworksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUsableSubnetworksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUsableSubnetworksResponse instance - */ - public static create(properties?: google.container.v1.IListUsableSubnetworksResponse): google.container.v1.ListUsableSubnetworksResponse; - - /** - * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. - * @param message ListUsableSubnetworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. - * @param message ListUsableSubnetworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ListUsableSubnetworksResponse; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ListUsableSubnetworksResponse; - - /** - * Verifies a ListUsableSubnetworksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUsableSubnetworksResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ListUsableSubnetworksResponse; - - /** - * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. - * @param message ListUsableSubnetworksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ListUsableSubnetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUsableSubnetworksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUsableSubnetworksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UsableSubnetworkSecondaryRange. */ - interface IUsableSubnetworkSecondaryRange { - - /** UsableSubnetworkSecondaryRange rangeName */ - rangeName?: (string|null); - - /** UsableSubnetworkSecondaryRange ipCidrRange */ - ipCidrRange?: (string|null); - - /** UsableSubnetworkSecondaryRange status */ - status?: (google.container.v1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1.UsableSubnetworkSecondaryRange.Status|null); - } - - /** Represents a UsableSubnetworkSecondaryRange. */ - class UsableSubnetworkSecondaryRange implements IUsableSubnetworkSecondaryRange { - - /** - * Constructs a new UsableSubnetworkSecondaryRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUsableSubnetworkSecondaryRange); - - /** UsableSubnetworkSecondaryRange rangeName. */ - public rangeName: string; - - /** UsableSubnetworkSecondaryRange ipCidrRange. */ - public ipCidrRange: string; - - /** UsableSubnetworkSecondaryRange status. */ - public status: (google.container.v1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1.UsableSubnetworkSecondaryRange.Status); - - /** - * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. - * @param [properties] Properties to set - * @returns UsableSubnetworkSecondaryRange instance - */ - public static create(properties?: google.container.v1.IUsableSubnetworkSecondaryRange): google.container.v1.UsableSubnetworkSecondaryRange; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @param message UsableSubnetworkSecondaryRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @param message UsableSubnetworkSecondaryRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UsableSubnetworkSecondaryRange; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UsableSubnetworkSecondaryRange; - - /** - * Verifies a UsableSubnetworkSecondaryRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsableSubnetworkSecondaryRange - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UsableSubnetworkSecondaryRange; - - /** - * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. - * @param message UsableSubnetworkSecondaryRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UsableSubnetworkSecondaryRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsableSubnetworkSecondaryRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsableSubnetworkSecondaryRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UsableSubnetworkSecondaryRange { - - /** Status enum. */ - enum Status { - UNKNOWN = 0, - UNUSED = 1, - IN_USE_SERVICE = 2, - IN_USE_SHAREABLE_POD = 3, - IN_USE_MANAGED_POD = 4 - } - } - - /** Properties of a UsableSubnetwork. */ - interface IUsableSubnetwork { - - /** UsableSubnetwork subnetwork */ - subnetwork?: (string|null); - - /** UsableSubnetwork network */ - network?: (string|null); - - /** UsableSubnetwork ipCidrRange */ - ipCidrRange?: (string|null); - - /** UsableSubnetwork secondaryIpRanges */ - secondaryIpRanges?: (google.container.v1.IUsableSubnetworkSecondaryRange[]|null); - - /** UsableSubnetwork statusMessage */ - statusMessage?: (string|null); - } - - /** Represents a UsableSubnetwork. */ - class UsableSubnetwork implements IUsableSubnetwork { - - /** - * Constructs a new UsableSubnetwork. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUsableSubnetwork); - - /** UsableSubnetwork subnetwork. */ - public subnetwork: string; - - /** UsableSubnetwork network. */ - public network: string; - - /** UsableSubnetwork ipCidrRange. */ - public ipCidrRange: string; - - /** UsableSubnetwork secondaryIpRanges. */ - public secondaryIpRanges: google.container.v1.IUsableSubnetworkSecondaryRange[]; - - /** UsableSubnetwork statusMessage. */ - public statusMessage: string; - - /** - * Creates a new UsableSubnetwork instance using the specified properties. - * @param [properties] Properties to set - * @returns UsableSubnetwork instance - */ - public static create(properties?: google.container.v1.IUsableSubnetwork): google.container.v1.UsableSubnetwork; - - /** - * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. - * @param message UsableSubnetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. - * @param message UsableSubnetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UsableSubnetwork; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UsableSubnetwork; - - /** - * Verifies a UsableSubnetwork message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsableSubnetwork - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UsableSubnetwork; - - /** - * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. - * @param message UsableSubnetwork - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UsableSubnetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsableSubnetwork to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsableSubnetwork - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceUsageExportConfig. */ - interface IResourceUsageExportConfig { - - /** ResourceUsageExportConfig bigqueryDestination */ - bigqueryDestination?: (google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null); - - /** ResourceUsageExportConfig enableNetworkEgressMetering */ - enableNetworkEgressMetering?: (boolean|null); - - /** ResourceUsageExportConfig consumptionMeteringConfig */ - consumptionMeteringConfig?: (google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); - } - - /** Represents a ResourceUsageExportConfig. */ - class ResourceUsageExportConfig implements IResourceUsageExportConfig { - - /** - * Constructs a new ResourceUsageExportConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IResourceUsageExportConfig); - - /** ResourceUsageExportConfig bigqueryDestination. */ - public bigqueryDestination?: (google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null); - - /** ResourceUsageExportConfig enableNetworkEgressMetering. */ - public enableNetworkEgressMetering: boolean; - - /** ResourceUsageExportConfig consumptionMeteringConfig. */ - public consumptionMeteringConfig?: (google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); - - /** - * Creates a new ResourceUsageExportConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceUsageExportConfig instance - */ - public static create(properties?: google.container.v1.IResourceUsageExportConfig): google.container.v1.ResourceUsageExportConfig; - - /** - * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. - * @param message ResourceUsageExportConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. - * @param message ResourceUsageExportConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig; - - /** - * Verifies a ResourceUsageExportConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceUsageExportConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig; - - /** - * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. - * @param message ResourceUsageExportConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceUsageExportConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceUsageExportConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceUsageExportConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceUsageExportConfig { - - /** Properties of a BigQueryDestination. */ - interface IBigQueryDestination { - - /** BigQueryDestination datasetId */ - datasetId?: (string|null); - } - - /** Represents a BigQueryDestination. */ - class BigQueryDestination implements IBigQueryDestination { - - /** - * Constructs a new BigQueryDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination); - - /** BigQueryDestination datasetId. */ - public datasetId: string; - - /** - * Creates a new BigQueryDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDestination instance - */ - public static create(properties?: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Verifies a BigQueryDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDestination - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @param message BigQueryDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceUsageExportConfig.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConsumptionMeteringConfig. */ - interface IConsumptionMeteringConfig { - - /** ConsumptionMeteringConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConsumptionMeteringConfig. */ - class ConsumptionMeteringConfig implements IConsumptionMeteringConfig { - - /** - * Constructs a new ConsumptionMeteringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig); - - /** ConsumptionMeteringConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ConsumptionMeteringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConsumptionMeteringConfig instance - */ - public static create(properties?: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @param message ConsumptionMeteringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @param message ConsumptionMeteringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Verifies a ConsumptionMeteringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsumptionMeteringConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. - * @param message ConsumptionMeteringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsumptionMeteringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConsumptionMeteringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a VerticalPodAutoscaling. */ - interface IVerticalPodAutoscaling { - - /** VerticalPodAutoscaling enabled */ - enabled?: (boolean|null); - } - - /** Represents a VerticalPodAutoscaling. */ - class VerticalPodAutoscaling implements IVerticalPodAutoscaling { - - /** - * Constructs a new VerticalPodAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IVerticalPodAutoscaling); - - /** VerticalPodAutoscaling enabled. */ - public enabled: boolean; - - /** - * Creates a new VerticalPodAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns VerticalPodAutoscaling instance - */ - public static create(properties?: google.container.v1.IVerticalPodAutoscaling): google.container.v1.VerticalPodAutoscaling; - - /** - * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. - * @param message VerticalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. - * @param message VerticalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.VerticalPodAutoscaling; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.VerticalPodAutoscaling; - - /** - * Verifies a VerticalPodAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerticalPodAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.VerticalPodAutoscaling; - - /** - * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. - * @param message VerticalPodAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.VerticalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerticalPodAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VerticalPodAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DefaultSnatStatus. */ - interface IDefaultSnatStatus { - - /** DefaultSnatStatus disabled */ - disabled?: (boolean|null); - } - - /** Represents a DefaultSnatStatus. */ - class DefaultSnatStatus implements IDefaultSnatStatus { - - /** - * Constructs a new DefaultSnatStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IDefaultSnatStatus); - - /** DefaultSnatStatus disabled. */ - public disabled: boolean; - - /** - * Creates a new DefaultSnatStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns DefaultSnatStatus instance - */ - public static create(properties?: google.container.v1.IDefaultSnatStatus): google.container.v1.DefaultSnatStatus; - - /** - * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. - * @param message DefaultSnatStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. - * @param message DefaultSnatStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DefaultSnatStatus; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DefaultSnatStatus; - - /** - * Verifies a DefaultSnatStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DefaultSnatStatus - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.DefaultSnatStatus; - - /** - * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. - * @param message DefaultSnatStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.DefaultSnatStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DefaultSnatStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DefaultSnatStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShieldedNodes. */ - interface IShieldedNodes { - - /** ShieldedNodes enabled */ - enabled?: (boolean|null); - } - - /** Represents a ShieldedNodes. */ - class ShieldedNodes implements IShieldedNodes { - - /** - * Constructs a new ShieldedNodes. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IShieldedNodes); - - /** ShieldedNodes enabled. */ - public enabled: boolean; - - /** - * Creates a new ShieldedNodes instance using the specified properties. - * @param [properties] Properties to set - * @returns ShieldedNodes instance - */ - public static create(properties?: google.container.v1.IShieldedNodes): google.container.v1.ShieldedNodes; - - /** - * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. - * @param message ShieldedNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. - * @param message ShieldedNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ShieldedNodes; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ShieldedNodes; - - /** - * Verifies a ShieldedNodes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShieldedNodes - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ShieldedNodes; - - /** - * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. - * @param message ShieldedNodes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ShieldedNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShieldedNodes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShieldedNodes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VirtualNIC. */ - interface IVirtualNIC { - - /** VirtualNIC enabled */ - enabled?: (boolean|null); - } - - /** Represents a VirtualNIC. */ - class VirtualNIC implements IVirtualNIC { - - /** - * Constructs a new VirtualNIC. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IVirtualNIC); - - /** VirtualNIC enabled. */ - public enabled: boolean; - - /** - * Creates a new VirtualNIC instance using the specified properties. - * @param [properties] Properties to set - * @returns VirtualNIC instance - */ - public static create(properties?: google.container.v1.IVirtualNIC): google.container.v1.VirtualNIC; - - /** - * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. - * @param message VirtualNIC message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. - * @param message VirtualNIC message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.VirtualNIC; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.VirtualNIC; - - /** - * Verifies a VirtualNIC message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VirtualNIC - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.VirtualNIC; - - /** - * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. - * @param message VirtualNIC - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.VirtualNIC, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VirtualNIC to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VirtualNIC - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FastSocket. */ - interface IFastSocket { - - /** FastSocket enabled */ - enabled?: (boolean|null); - } - - /** Represents a FastSocket. */ - class FastSocket implements IFastSocket { - - /** - * Constructs a new FastSocket. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IFastSocket); - - /** FastSocket enabled. */ - public enabled: boolean; - - /** - * Creates a new FastSocket instance using the specified properties. - * @param [properties] Properties to set - * @returns FastSocket instance - */ - public static create(properties?: google.container.v1.IFastSocket): google.container.v1.FastSocket; - - /** - * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. - * @param message FastSocket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. - * @param message FastSocket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FastSocket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.FastSocket; - - /** - * Decodes a FastSocket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.FastSocket; - - /** - * Verifies a FastSocket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FastSocket - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.FastSocket; - - /** - * Creates a plain object from a FastSocket message. Also converts values to other types if specified. - * @param message FastSocket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.FastSocket, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FastSocket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FastSocket - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PrivateIPv6GoogleAccess enum. */ - enum PrivateIPv6GoogleAccess { - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1, - PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2, - PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3 - } - - /** Properties of a NotificationConfig. */ - interface INotificationConfig { - - /** NotificationConfig pubsub */ - pubsub?: (google.container.v1.NotificationConfig.IPubSub|null); - } - - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { - - /** - * Constructs a new NotificationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INotificationConfig); - - /** NotificationConfig pubsub. */ - public pubsub?: (google.container.v1.NotificationConfig.IPubSub|null); - - /** - * Creates a new NotificationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NotificationConfig instance - */ - public static create(properties?: google.container.v1.INotificationConfig): google.container.v1.NotificationConfig; - - /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig; - - /** - * Verifies a NotificationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotificationConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig; - - /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotificationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotificationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NotificationConfig { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - UPGRADE_AVAILABLE_EVENT = 1, - UPGRADE_EVENT = 2, - SECURITY_BULLETIN_EVENT = 3 - } - - /** Properties of a PubSub. */ - interface IPubSub { - - /** PubSub enabled */ - enabled?: (boolean|null); - - /** PubSub topic */ - topic?: (string|null); - - /** PubSub filter */ - filter?: (google.container.v1.NotificationConfig.IFilter|null); - } - - /** Represents a PubSub. */ - class PubSub implements IPubSub { - - /** - * Constructs a new PubSub. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NotificationConfig.IPubSub); - - /** PubSub enabled. */ - public enabled: boolean; - - /** PubSub topic. */ - public topic: string; - - /** PubSub filter. */ - public filter?: (google.container.v1.NotificationConfig.IFilter|null); - - /** - * Creates a new PubSub instance using the specified properties. - * @param [properties] Properties to set - * @returns PubSub instance - */ - public static create(properties?: google.container.v1.NotificationConfig.IPubSub): google.container.v1.NotificationConfig.PubSub; - - /** - * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. - * @param message PubSub message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. - * @param message PubSub message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubSub message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig.PubSub; - - /** - * Decodes a PubSub message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig.PubSub; - - /** - * Verifies a PubSub message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubSub message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubSub - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig.PubSub; - - /** - * Creates a plain object from a PubSub message. Also converts values to other types if specified. - * @param message PubSub - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NotificationConfig.PubSub, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubSub to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubSub - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter eventType */ - eventType?: (google.container.v1.NotificationConfig.EventType[]|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.NotificationConfig.IFilter); - - /** Filter eventType. */ - public eventType: google.container.v1.NotificationConfig.EventType[]; - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.container.v1.NotificationConfig.IFilter): google.container.v1.NotificationConfig.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NotificationConfig.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NotificationConfig.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NotificationConfig.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NotificationConfig.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ConfidentialNodes. */ - interface IConfidentialNodes { - - /** ConfidentialNodes enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConfidentialNodes. */ - class ConfidentialNodes implements IConfidentialNodes { - - /** - * Constructs a new ConfidentialNodes. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IConfidentialNodes); - - /** ConfidentialNodes enabled. */ - public enabled: boolean; - - /** - * Creates a new ConfidentialNodes instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidentialNodes instance - */ - public static create(properties?: google.container.v1.IConfidentialNodes): google.container.v1.ConfidentialNodes; - - /** - * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. - * @param message ConfidentialNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. - * @param message ConfidentialNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ConfidentialNodes; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ConfidentialNodes; - - /** - * Verifies a ConfidentialNodes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidentialNodes - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ConfidentialNodes; - - /** - * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. - * @param message ConfidentialNodes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ConfidentialNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidentialNodes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidentialNodes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UpgradeResourceType enum. */ - enum UpgradeResourceType { - UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0, - MASTER = 1, - NODE_POOL = 2 - } - - /** Properties of an UpgradeEvent. */ - interface IUpgradeEvent { - - /** UpgradeEvent resourceType */ - resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); - - /** UpgradeEvent operation */ - operation?: (string|null); - - /** UpgradeEvent operationStartTime */ - operationStartTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeEvent currentVersion */ - currentVersion?: (string|null); - - /** UpgradeEvent targetVersion */ - targetVersion?: (string|null); - - /** UpgradeEvent resource */ - resource?: (string|null); - } - - /** Represents an UpgradeEvent. */ - class UpgradeEvent implements IUpgradeEvent { - - /** - * Constructs a new UpgradeEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpgradeEvent); - - /** UpgradeEvent resourceType. */ - public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); - - /** UpgradeEvent operation. */ - public operation: string; - - /** UpgradeEvent operationStartTime. */ - public operationStartTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeEvent currentVersion. */ - public currentVersion: string; - - /** UpgradeEvent targetVersion. */ - public targetVersion: string; - - /** UpgradeEvent resource. */ - public resource: string; - - /** - * Creates a new UpgradeEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeEvent instance - */ - public static create(properties?: google.container.v1.IUpgradeEvent): google.container.v1.UpgradeEvent; - - /** - * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. - * @param message UpgradeEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. - * @param message UpgradeEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeEvent; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeEvent; - - /** - * Verifies an UpgradeEvent message. - * @param message Plain 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 UpgradeEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeEvent; - - /** - * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. - * @param message UpgradeEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpgradeEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpgradeInfoEvent. */ - interface IUpgradeInfoEvent { - - /** UpgradeInfoEvent resourceType */ - resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); - - /** UpgradeInfoEvent operation */ - operation?: (string|null); - - /** UpgradeInfoEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeInfoEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeInfoEvent currentVersion */ - currentVersion?: (string|null); - - /** UpgradeInfoEvent targetVersion */ - targetVersion?: (string|null); - - /** UpgradeInfoEvent resource */ - resource?: (string|null); - - /** UpgradeInfoEvent state */ - state?: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State|null); - - /** UpgradeInfoEvent description */ - description?: (string|null); - } - - /** Represents an UpgradeInfoEvent. */ - class UpgradeInfoEvent implements IUpgradeInfoEvent { - - /** - * Constructs a new UpgradeInfoEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpgradeInfoEvent); - - /** UpgradeInfoEvent resourceType. */ - public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); - - /** UpgradeInfoEvent operation. */ - public operation: string; - - /** UpgradeInfoEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeInfoEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeInfoEvent currentVersion. */ - public currentVersion: string; - - /** UpgradeInfoEvent targetVersion. */ - public targetVersion: string; - - /** UpgradeInfoEvent resource. */ - public resource: string; - - /** UpgradeInfoEvent state. */ - public state: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State); - - /** UpgradeInfoEvent description. */ - public description: string; - - /** - * Creates a new UpgradeInfoEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeInfoEvent instance - */ - public static create(properties?: google.container.v1.IUpgradeInfoEvent): google.container.v1.UpgradeInfoEvent; - - /** - * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. - * @param message UpgradeInfoEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. - * @param message UpgradeInfoEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeInfoEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeInfoEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeInfoEvent; - - /** - * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeInfoEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeInfoEvent; - - /** - * Verifies an UpgradeInfoEvent message. - * @param message Plain 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 UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeInfoEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeInfoEvent; - - /** - * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. - * @param message UpgradeInfoEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpgradeInfoEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeInfoEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeInfoEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpgradeInfoEvent { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 3, - SUCCEEDED = 4, - FAILED = 5, - CANCELED = 6 - } - } - - /** Properties of an UpgradeAvailableEvent. */ - interface IUpgradeAvailableEvent { - - /** UpgradeAvailableEvent version */ - version?: (string|null); - - /** UpgradeAvailableEvent resourceType */ - resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); - - /** UpgradeAvailableEvent releaseChannel */ - releaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** UpgradeAvailableEvent resource */ - resource?: (string|null); - } - - /** Represents an UpgradeAvailableEvent. */ - class UpgradeAvailableEvent implements IUpgradeAvailableEvent { - - /** - * Constructs a new UpgradeAvailableEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IUpgradeAvailableEvent); - - /** UpgradeAvailableEvent version. */ - public version: string; - - /** UpgradeAvailableEvent resourceType. */ - public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); - - /** UpgradeAvailableEvent releaseChannel. */ - public releaseChannel?: (google.container.v1.IReleaseChannel|null); - - /** UpgradeAvailableEvent resource. */ - public resource: string; - - /** - * Creates a new UpgradeAvailableEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeAvailableEvent instance - */ - public static create(properties?: google.container.v1.IUpgradeAvailableEvent): google.container.v1.UpgradeAvailableEvent; - - /** - * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. - * @param message UpgradeAvailableEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. - * @param message UpgradeAvailableEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeAvailableEvent; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeAvailableEvent; - - /** - * Verifies an UpgradeAvailableEvent message. - * @param message Plain 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 UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeAvailableEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeAvailableEvent; - - /** - * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. - * @param message UpgradeAvailableEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.UpgradeAvailableEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeAvailableEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeAvailableEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecurityBulletinEvent. */ - interface ISecurityBulletinEvent { - - /** SecurityBulletinEvent resourceTypeAffected */ - resourceTypeAffected?: (string|null); - - /** SecurityBulletinEvent bulletinId */ - bulletinId?: (string|null); - - /** SecurityBulletinEvent cveIds */ - cveIds?: (string[]|null); - - /** SecurityBulletinEvent severity */ - severity?: (string|null); - - /** SecurityBulletinEvent bulletinUri */ - bulletinUri?: (string|null); - - /** SecurityBulletinEvent briefDescription */ - briefDescription?: (string|null); - - /** SecurityBulletinEvent affectedSupportedMinors */ - affectedSupportedMinors?: (string[]|null); - - /** SecurityBulletinEvent patchedVersions */ - patchedVersions?: (string[]|null); - - /** SecurityBulletinEvent suggestedUpgradeTarget */ - suggestedUpgradeTarget?: (string|null); - - /** SecurityBulletinEvent manualStepsRequired */ - manualStepsRequired?: (boolean|null); - } - - /** Represents a SecurityBulletinEvent. */ - class SecurityBulletinEvent implements ISecurityBulletinEvent { - - /** - * Constructs a new SecurityBulletinEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISecurityBulletinEvent); - - /** SecurityBulletinEvent resourceTypeAffected. */ - public resourceTypeAffected: string; - - /** SecurityBulletinEvent bulletinId. */ - public bulletinId: string; - - /** SecurityBulletinEvent cveIds. */ - public cveIds: string[]; - - /** SecurityBulletinEvent severity. */ - public severity: string; - - /** SecurityBulletinEvent bulletinUri. */ - public bulletinUri: string; - - /** SecurityBulletinEvent briefDescription. */ - public briefDescription: string; - - /** SecurityBulletinEvent affectedSupportedMinors. */ - public affectedSupportedMinors: string[]; - - /** SecurityBulletinEvent patchedVersions. */ - public patchedVersions: string[]; - - /** SecurityBulletinEvent suggestedUpgradeTarget. */ - public suggestedUpgradeTarget: string; - - /** SecurityBulletinEvent manualStepsRequired. */ - public manualStepsRequired: boolean; - - /** - * Creates a new SecurityBulletinEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityBulletinEvent instance - */ - public static create(properties?: google.container.v1.ISecurityBulletinEvent): google.container.v1.SecurityBulletinEvent; - - /** - * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. - * @param message SecurityBulletinEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. - * @param message SecurityBulletinEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityBulletinEvent; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityBulletinEvent; - - /** - * Verifies a SecurityBulletinEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityBulletinEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityBulletinEvent; - - /** - * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. - * @param message SecurityBulletinEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SecurityBulletinEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityBulletinEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityBulletinEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Autopilot. */ - interface IAutopilot { - - /** Autopilot enabled */ - enabled?: (boolean|null); - - /** Autopilot workloadPolicyConfig */ - workloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); - } - - /** Represents an Autopilot. */ - class Autopilot implements IAutopilot { - - /** - * Constructs a new Autopilot. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAutopilot); - - /** Autopilot enabled. */ - public enabled: boolean; - - /** Autopilot workloadPolicyConfig. */ - public workloadPolicyConfig?: (google.container.v1.IWorkloadPolicyConfig|null); - - /** - * Creates a new Autopilot instance using the specified properties. - * @param [properties] Properties to set - * @returns Autopilot instance - */ - public static create(properties?: google.container.v1.IAutopilot): google.container.v1.Autopilot; - - /** - * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. - * @param message Autopilot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. - * @param message Autopilot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Autopilot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Autopilot; - - /** - * Decodes an Autopilot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Autopilot; - - /** - * Verifies an Autopilot message. - * @param message Plain 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 Autopilot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Autopilot - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.Autopilot; - - /** - * Creates a plain object from an Autopilot message. Also converts values to other types if specified. - * @param message Autopilot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.Autopilot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Autopilot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Autopilot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadPolicyConfig. */ - interface IWorkloadPolicyConfig { - - /** WorkloadPolicyConfig allowNetAdmin */ - allowNetAdmin?: (boolean|null); - } - - /** Represents a WorkloadPolicyConfig. */ - class WorkloadPolicyConfig implements IWorkloadPolicyConfig { - - /** - * Constructs a new WorkloadPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IWorkloadPolicyConfig); - - /** WorkloadPolicyConfig allowNetAdmin. */ - public allowNetAdmin?: (boolean|null); - - /** WorkloadPolicyConfig _allowNetAdmin. */ - public _allowNetAdmin?: "allowNetAdmin"; - - /** - * Creates a new WorkloadPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadPolicyConfig instance - */ - public static create(properties?: google.container.v1.IWorkloadPolicyConfig): google.container.v1.WorkloadPolicyConfig; - - /** - * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. - * @param message WorkloadPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. - * @param message WorkloadPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.WorkloadPolicyConfig; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.WorkloadPolicyConfig; - - /** - * Verifies a WorkloadPolicyConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.WorkloadPolicyConfig; - - /** - * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. - * @param message WorkloadPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.WorkloadPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadPolicyConfig - * @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.container.v1.ILoggingComponentConfig|null); - } - - /** Represents a LoggingConfig. */ - class LoggingConfig implements ILoggingConfig { - - /** - * Constructs a new LoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILoggingConfig); - - /** LoggingConfig componentConfig. */ - public componentConfig?: (google.container.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.container.v1.ILoggingConfig): google.container.v1.LoggingConfig; - - /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.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.container.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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.container.v1.LoggingComponentConfig.Component[]|null); - } - - /** Represents a LoggingComponentConfig. */ - class LoggingComponentConfig implements ILoggingComponentConfig { - - /** - * Constructs a new LoggingComponentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILoggingComponentConfig); - - /** LoggingComponentConfig enableComponents. */ - public enableComponents: google.container.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.container.v1.ILoggingComponentConfig): google.container.v1.LoggingComponentConfig; - - /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.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.container.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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, - APISERVER = 3, - SCHEDULER = 4, - CONTROLLER_MANAGER = 5, - KCP_SSHD = 7, - KCP_CONNECTION = 8 - } - } - - /** Properties of a RayClusterLoggingConfig. */ - interface IRayClusterLoggingConfig { - - /** RayClusterLoggingConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a RayClusterLoggingConfig. */ - class RayClusterLoggingConfig implements IRayClusterLoggingConfig { - - /** - * Constructs a new RayClusterLoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRayClusterLoggingConfig); - - /** RayClusterLoggingConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new RayClusterLoggingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayClusterLoggingConfig instance - */ - public static create(properties?: google.container.v1.IRayClusterLoggingConfig): google.container.v1.RayClusterLoggingConfig; - - /** - * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. - * @param message RayClusterLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. - * @param message RayClusterLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayClusterLoggingConfig; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayClusterLoggingConfig; - - /** - * Verifies a RayClusterLoggingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayClusterLoggingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RayClusterLoggingConfig; - - /** - * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. - * @param message RayClusterLoggingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RayClusterLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayClusterLoggingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayClusterLoggingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MonitoringConfig. */ - interface IMonitoringConfig { - - /** MonitoringConfig componentConfig */ - componentConfig?: (google.container.v1.IMonitoringComponentConfig|null); - - /** MonitoringConfig managedPrometheusConfig */ - managedPrometheusConfig?: (google.container.v1.IManagedPrometheusConfig|null); - - /** MonitoringConfig advancedDatapathObservabilityConfig */ - advancedDatapathObservabilityConfig?: (google.container.v1.IAdvancedDatapathObservabilityConfig|null); - } - - /** Represents a MonitoringConfig. */ - class MonitoringConfig implements IMonitoringConfig { - - /** - * Constructs a new MonitoringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMonitoringConfig); - - /** MonitoringConfig componentConfig. */ - public componentConfig?: (google.container.v1.IMonitoringComponentConfig|null); - - /** MonitoringConfig managedPrometheusConfig. */ - public managedPrometheusConfig?: (google.container.v1.IManagedPrometheusConfig|null); - - /** MonitoringConfig advancedDatapathObservabilityConfig. */ - public advancedDatapathObservabilityConfig?: (google.container.v1.IAdvancedDatapathObservabilityConfig|null); - - /** - * Creates a new MonitoringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoringConfig instance - */ - public static create(properties?: google.container.v1.IMonitoringConfig): google.container.v1.MonitoringConfig; - - /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.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.container.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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 an AdvancedDatapathObservabilityConfig. */ - interface IAdvancedDatapathObservabilityConfig { - - /** AdvancedDatapathObservabilityConfig enableMetrics */ - enableMetrics?: (boolean|null); - - /** AdvancedDatapathObservabilityConfig relayMode */ - relayMode?: (google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|null); - - /** AdvancedDatapathObservabilityConfig enableRelay */ - enableRelay?: (boolean|null); - } - - /** Represents an AdvancedDatapathObservabilityConfig. */ - class AdvancedDatapathObservabilityConfig implements IAdvancedDatapathObservabilityConfig { - - /** - * Constructs a new AdvancedDatapathObservabilityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IAdvancedDatapathObservabilityConfig); - - /** AdvancedDatapathObservabilityConfig enableMetrics. */ - public enableMetrics: boolean; - - /** AdvancedDatapathObservabilityConfig relayMode. */ - public relayMode: (google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode); - - /** AdvancedDatapathObservabilityConfig enableRelay. */ - public enableRelay?: (boolean|null); - - /** AdvancedDatapathObservabilityConfig _enableRelay. */ - public _enableRelay?: "enableRelay"; - - /** - * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedDatapathObservabilityConfig instance - */ - public static create(properties?: google.container.v1.IAdvancedDatapathObservabilityConfig): google.container.v1.AdvancedDatapathObservabilityConfig; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @param message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @param message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.AdvancedDatapathObservabilityConfig; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.AdvancedDatapathObservabilityConfig; - - /** - * Verifies an AdvancedDatapathObservabilityConfig message. - * @param message Plain 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 AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedDatapathObservabilityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.AdvancedDatapathObservabilityConfig; - - /** - * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. - * @param message AdvancedDatapathObservabilityConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.AdvancedDatapathObservabilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedDatapathObservabilityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedDatapathObservabilityConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AdvancedDatapathObservabilityConfig { - - /** RelayMode enum. */ - enum RelayMode { - RELAY_MODE_UNSPECIFIED = 0, - DISABLED = 1, - INTERNAL_VPC_LB = 3, - EXTERNAL_LB = 4 - } - } - - /** Properties of a RayClusterMonitoringConfig. */ - interface IRayClusterMonitoringConfig { - - /** RayClusterMonitoringConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a RayClusterMonitoringConfig. */ - class RayClusterMonitoringConfig implements IRayClusterMonitoringConfig { - - /** - * Constructs a new RayClusterMonitoringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IRayClusterMonitoringConfig); - - /** RayClusterMonitoringConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new RayClusterMonitoringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayClusterMonitoringConfig instance - */ - public static create(properties?: google.container.v1.IRayClusterMonitoringConfig): google.container.v1.RayClusterMonitoringConfig; - - /** - * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. - * @param message RayClusterMonitoringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. - * @param message RayClusterMonitoringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RayClusterMonitoringConfig; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RayClusterMonitoringConfig; - - /** - * Verifies a RayClusterMonitoringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayClusterMonitoringConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.RayClusterMonitoringConfig; - - /** - * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. - * @param message RayClusterMonitoringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.RayClusterMonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayClusterMonitoringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayClusterMonitoringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolLoggingConfig. */ - interface INodePoolLoggingConfig { - - /** NodePoolLoggingConfig variantConfig */ - variantConfig?: (google.container.v1.ILoggingVariantConfig|null); - } - - /** Represents a NodePoolLoggingConfig. */ - class NodePoolLoggingConfig implements INodePoolLoggingConfig { - - /** - * Constructs a new NodePoolLoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.INodePoolLoggingConfig); - - /** NodePoolLoggingConfig variantConfig. */ - public variantConfig?: (google.container.v1.ILoggingVariantConfig|null); - - /** - * Creates a new NodePoolLoggingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolLoggingConfig instance - */ - public static create(properties?: google.container.v1.INodePoolLoggingConfig): google.container.v1.NodePoolLoggingConfig; - - /** - * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. - * @param message NodePoolLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. - * @param message NodePoolLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolLoggingConfig; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolLoggingConfig; - - /** - * Verifies a NodePoolLoggingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolLoggingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.NodePoolLoggingConfig; - - /** - * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. - * @param message NodePoolLoggingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.NodePoolLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolLoggingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolLoggingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoggingVariantConfig. */ - interface ILoggingVariantConfig { - - /** LoggingVariantConfig variant */ - variant?: (google.container.v1.LoggingVariantConfig.Variant|keyof typeof google.container.v1.LoggingVariantConfig.Variant|null); - } - - /** Represents a LoggingVariantConfig. */ - class LoggingVariantConfig implements ILoggingVariantConfig { - - /** - * Constructs a new LoggingVariantConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILoggingVariantConfig); - - /** LoggingVariantConfig variant. */ - public variant: (google.container.v1.LoggingVariantConfig.Variant|keyof typeof google.container.v1.LoggingVariantConfig.Variant); - - /** - * Creates a new LoggingVariantConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LoggingVariantConfig instance - */ - public static create(properties?: google.container.v1.ILoggingVariantConfig): google.container.v1.LoggingVariantConfig; - - /** - * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. - * @param message LoggingVariantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. - * @param message LoggingVariantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LoggingVariantConfig; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LoggingVariantConfig; - - /** - * Verifies a LoggingVariantConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoggingVariantConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.LoggingVariantConfig; - - /** - * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. - * @param message LoggingVariantConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.LoggingVariantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoggingVariantConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoggingVariantConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoggingVariantConfig { - - /** Variant enum. */ - enum Variant { - VARIANT_UNSPECIFIED = 0, - DEFAULT = 1, - MAX_THROUGHPUT = 2 - } - } - - /** Properties of a MonitoringComponentConfig. */ - interface IMonitoringComponentConfig { - - /** MonitoringComponentConfig enableComponents */ - enableComponents?: (google.container.v1.MonitoringComponentConfig.Component[]|null); - } - - /** Represents a MonitoringComponentConfig. */ - class MonitoringComponentConfig implements IMonitoringComponentConfig { - - /** - * Constructs a new MonitoringComponentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IMonitoringComponentConfig); - - /** MonitoringComponentConfig enableComponents. */ - public enableComponents: google.container.v1.MonitoringComponentConfig.Component[]; - - /** - * Creates a new MonitoringComponentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoringComponentConfig instance - */ - public static create(properties?: google.container.v1.IMonitoringComponentConfig): google.container.v1.MonitoringComponentConfig; - - /** - * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. - * @param message MonitoringComponentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. - * @param message MonitoringComponentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.MonitoringComponentConfig; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.MonitoringComponentConfig; - - /** - * Verifies a MonitoringComponentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoringComponentConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.MonitoringComponentConfig; - - /** - * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. - * @param message MonitoringComponentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.MonitoringComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoringComponentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MonitoringComponentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MonitoringComponentConfig { - - /** Component enum. */ - enum Component { - COMPONENT_UNSPECIFIED = 0, - SYSTEM_COMPONENTS = 1, - APISERVER = 3, - SCHEDULER = 4, - CONTROLLER_MANAGER = 5, - STORAGE = 7, - HPA = 8, - POD = 9, - DAEMONSET = 10, - DEPLOYMENT = 11, - STATEFULSET = 12, - CADVISOR = 13, - KUBELET = 14, - DCGM = 15 - } - } - - /** DatapathProvider enum. */ - enum DatapathProvider { - DATAPATH_PROVIDER_UNSPECIFIED = 0, - LEGACY_DATAPATH = 1, - ADVANCED_DATAPATH = 2 - } - - /** NodePoolUpdateStrategy enum. */ - enum NodePoolUpdateStrategy { - NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0, - BLUE_GREEN = 2, - SURGE = 3 - } - - /** 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.container.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.container.v1.IManagedPrometheusConfig): google.container.v1.ManagedPrometheusConfig; - - /** - * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.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.container.v1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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; - } - - /** Properties of a Fleet. */ - interface IFleet { - - /** Fleet project */ - project?: (string|null); - - /** Fleet membership */ - membership?: (string|null); - - /** Fleet preRegistered */ - preRegistered?: (boolean|null); - } - - /** Represents a Fleet. */ - class Fleet implements IFleet { - - /** - * Constructs a new Fleet. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IFleet); - - /** Fleet project. */ - public project: string; - - /** Fleet membership. */ - public membership: string; - - /** Fleet preRegistered. */ - public preRegistered: boolean; - - /** - * Creates a new Fleet instance using the specified properties. - * @param [properties] Properties to set - * @returns Fleet instance - */ - public static create(properties?: google.container.v1.IFleet): google.container.v1.Fleet; - - /** - * Encodes the specified Fleet message. Does not implicitly {@link google.container.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.container.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.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.container.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.container.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.container.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.container.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.container.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; - } - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4 = 1, - IPV4_IPV6 = 2 - } - - /** Properties of a ControlPlaneEndpointsConfig. */ - interface IControlPlaneEndpointsConfig { - - /** ControlPlaneEndpointsConfig dnsEndpointConfig */ - dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); - - /** ControlPlaneEndpointsConfig ipEndpointsConfig */ - ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); - } - - /** Represents a ControlPlaneEndpointsConfig. */ - class ControlPlaneEndpointsConfig implements IControlPlaneEndpointsConfig { - - /** - * Constructs a new ControlPlaneEndpointsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IControlPlaneEndpointsConfig); - - /** ControlPlaneEndpointsConfig dnsEndpointConfig. */ - public dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); - - /** ControlPlaneEndpointsConfig ipEndpointsConfig. */ - public ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); - - /** - * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ControlPlaneEndpointsConfig instance - */ - public static create(properties?: google.container.v1.IControlPlaneEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig; - - /** - * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. - * @param message ControlPlaneEndpointsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. - * @param message ControlPlaneEndpointsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ControlPlaneEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig; - - /** - * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ControlPlaneEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig; - - /** - * Verifies a ControlPlaneEndpointsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ControlPlaneEndpointsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig; - - /** - * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. - * @param message ControlPlaneEndpointsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ControlPlaneEndpointsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ControlPlaneEndpointsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ControlPlaneEndpointsConfig { - - /** Properties of a DNSEndpointConfig. */ - interface IDNSEndpointConfig { - - /** DNSEndpointConfig endpoint */ - endpoint?: (string|null); - - /** DNSEndpointConfig allowExternalTraffic */ - allowExternalTraffic?: (boolean|null); - } - - /** Represents a DNSEndpointConfig. */ - class DNSEndpointConfig implements IDNSEndpointConfig { - - /** - * Constructs a new DNSEndpointConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig); - - /** DNSEndpointConfig endpoint. */ - public endpoint: string; - - /** DNSEndpointConfig allowExternalTraffic. */ - public allowExternalTraffic?: (boolean|null); - - /** DNSEndpointConfig _allowExternalTraffic. */ - public _allowExternalTraffic?: "allowExternalTraffic"; - - /** - * Creates a new DNSEndpointConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DNSEndpointConfig instance - */ - public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; - - /** - * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. - * @param message DNSEndpointConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. - * @param message DNSEndpointConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DNSEndpointConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DNSEndpointConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; - - /** - * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DNSEndpointConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; - - /** - * Verifies a DNSEndpointConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DNSEndpointConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; - - /** - * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. - * @param message DNSEndpointConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DNSEndpointConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DNSEndpointConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a IPEndpointsConfig. */ - interface IIPEndpointsConfig { - - /** IPEndpointsConfig enabled */ - enabled?: (boolean|null); - - /** IPEndpointsConfig enablePublicEndpoint */ - enablePublicEndpoint?: (boolean|null); - - /** IPEndpointsConfig globalAccess */ - globalAccess?: (boolean|null); - - /** IPEndpointsConfig authorizedNetworksConfig */ - authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** IPEndpointsConfig publicEndpoint */ - publicEndpoint?: (string|null); - - /** IPEndpointsConfig privateEndpoint */ - privateEndpoint?: (string|null); - - /** IPEndpointsConfig privateEndpointSubnetwork */ - privateEndpointSubnetwork?: (string|null); - } - - /** Represents a IPEndpointsConfig. */ - class IPEndpointsConfig implements IIPEndpointsConfig { - - /** - * Constructs a new IPEndpointsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig); - - /** IPEndpointsConfig enabled. */ - public enabled?: (boolean|null); - - /** IPEndpointsConfig enablePublicEndpoint. */ - public enablePublicEndpoint?: (boolean|null); - - /** IPEndpointsConfig globalAccess. */ - public globalAccess?: (boolean|null); - - /** IPEndpointsConfig authorizedNetworksConfig. */ - public authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); - - /** IPEndpointsConfig publicEndpoint. */ - public publicEndpoint: string; - - /** IPEndpointsConfig privateEndpoint. */ - public privateEndpoint: string; - - /** IPEndpointsConfig privateEndpointSubnetwork. */ - public privateEndpointSubnetwork: string; - - /** IPEndpointsConfig _enabled. */ - public _enabled?: "enabled"; - - /** IPEndpointsConfig _enablePublicEndpoint. */ - public _enablePublicEndpoint?: "enablePublicEndpoint"; - - /** IPEndpointsConfig _globalAccess. */ - public _globalAccess?: "globalAccess"; - - /** - * Creates a new IPEndpointsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IPEndpointsConfig instance - */ - public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; - - /** - * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. - * @param message IPEndpointsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. - * @param message IPEndpointsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a IPEndpointsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IPEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; - - /** - * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IPEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; - - /** - * Verifies a IPEndpointsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IPEndpointsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; - - /** - * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. - * @param message IPEndpointsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IPEndpointsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IPEndpointsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** IPv6AccessType enum. */ - enum IPv6AccessType { - IPV6_ACCESS_TYPE_UNSPECIFIED = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - - /** Properties of a LocalNvmeSsdBlockConfig. */ - interface ILocalNvmeSsdBlockConfig { - - /** LocalNvmeSsdBlockConfig localSsdCount */ - localSsdCount?: (number|null); - } - - /** Represents a LocalNvmeSsdBlockConfig. */ - class LocalNvmeSsdBlockConfig implements ILocalNvmeSsdBlockConfig { - - /** - * Constructs a new LocalNvmeSsdBlockConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ILocalNvmeSsdBlockConfig); - - /** LocalNvmeSsdBlockConfig localSsdCount. */ - public localSsdCount: number; - - /** - * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalNvmeSsdBlockConfig instance - */ - public static create(properties?: google.container.v1.ILocalNvmeSsdBlockConfig): google.container.v1.LocalNvmeSsdBlockConfig; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @param message LocalNvmeSsdBlockConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @param message LocalNvmeSsdBlockConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.LocalNvmeSsdBlockConfig; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.LocalNvmeSsdBlockConfig; - - /** - * Verifies a LocalNvmeSsdBlockConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalNvmeSsdBlockConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.LocalNvmeSsdBlockConfig; - - /** - * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. - * @param message LocalNvmeSsdBlockConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.LocalNvmeSsdBlockConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalNvmeSsdBlockConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalNvmeSsdBlockConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EphemeralStorageLocalSsdConfig. */ - interface IEphemeralStorageLocalSsdConfig { - - /** EphemeralStorageLocalSsdConfig localSsdCount */ - localSsdCount?: (number|null); - } - - /** Represents an EphemeralStorageLocalSsdConfig. */ - class EphemeralStorageLocalSsdConfig implements IEphemeralStorageLocalSsdConfig { - - /** - * Constructs a new EphemeralStorageLocalSsdConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IEphemeralStorageLocalSsdConfig); - - /** EphemeralStorageLocalSsdConfig localSsdCount. */ - public localSsdCount: number; - - /** - * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EphemeralStorageLocalSsdConfig instance - */ - public static create(properties?: google.container.v1.IEphemeralStorageLocalSsdConfig): google.container.v1.EphemeralStorageLocalSsdConfig; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @param message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @param message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.EphemeralStorageLocalSsdConfig; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.EphemeralStorageLocalSsdConfig; - - /** - * Verifies an EphemeralStorageLocalSsdConfig message. - * @param message Plain 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 EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EphemeralStorageLocalSsdConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.EphemeralStorageLocalSsdConfig; - - /** - * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. - * @param message EphemeralStorageLocalSsdConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.EphemeralStorageLocalSsdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EphemeralStorageLocalSsdConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EphemeralStorageLocalSsdConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceManagerTags. */ - interface IResourceManagerTags { - - /** ResourceManagerTags tags */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a ResourceManagerTags. */ - class ResourceManagerTags implements IResourceManagerTags { - - /** - * Constructs a new ResourceManagerTags. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IResourceManagerTags); - - /** ResourceManagerTags tags. */ - public tags: { [k: string]: string }; - - /** - * Creates a new ResourceManagerTags instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceManagerTags instance - */ - public static create(properties?: google.container.v1.IResourceManagerTags): google.container.v1.ResourceManagerTags; - - /** - * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. - * @param message ResourceManagerTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. - * @param message ResourceManagerTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ResourceManagerTags; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ResourceManagerTags; - - /** - * Verifies a ResourceManagerTags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceManagerTags - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.ResourceManagerTags; - - /** - * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. - * @param message ResourceManagerTags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.ResourceManagerTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceManagerTags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceManagerTags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnterpriseConfig. */ - interface IEnterpriseConfig { - - /** EnterpriseConfig clusterTier */ - clusterTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); - - /** EnterpriseConfig desiredTier */ - desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); - } - - /** Represents an EnterpriseConfig. */ - class EnterpriseConfig implements IEnterpriseConfig { - - /** - * Constructs a new EnterpriseConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.IEnterpriseConfig); - - /** EnterpriseConfig clusterTier. */ - public clusterTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); - - /** EnterpriseConfig desiredTier. */ - public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); - - /** - * Creates a new EnterpriseConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EnterpriseConfig instance - */ - public static create(properties?: google.container.v1.IEnterpriseConfig): google.container.v1.EnterpriseConfig; - - /** - * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. - * @param message EnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. - * @param message EnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.EnterpriseConfig; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.EnterpriseConfig; - - /** - * Verifies an EnterpriseConfig message. - * @param message Plain 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 EnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnterpriseConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.EnterpriseConfig; - - /** - * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. - * @param message EnterpriseConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.EnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnterpriseConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnterpriseConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnterpriseConfig { - - /** ClusterTier enum. */ - enum ClusterTier { - CLUSTER_TIER_UNSPECIFIED = 0, - STANDARD = 1, - ENTERPRISE = 2 - } - } - - /** Properties of a SecretManagerConfig. */ - interface ISecretManagerConfig { - - /** SecretManagerConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a SecretManagerConfig. */ - class SecretManagerConfig implements ISecretManagerConfig { - - /** - * Constructs a new SecretManagerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISecretManagerConfig); - - /** SecretManagerConfig enabled. */ - public enabled?: (boolean|null); - - /** SecretManagerConfig _enabled. */ - public _enabled?: "enabled"; - - /** - * Creates a new SecretManagerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SecretManagerConfig instance - */ - public static create(properties?: google.container.v1.ISecretManagerConfig): google.container.v1.SecretManagerConfig; - - /** - * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. - * @param message SecretManagerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. - * @param message SecretManagerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecretManagerConfig; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecretManagerConfig; - - /** - * Verifies a SecretManagerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecretManagerConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecretManagerConfig; - - /** - * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. - * @param message SecretManagerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SecretManagerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecretManagerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecretManagerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecondaryBootDisk. */ - interface ISecondaryBootDisk { - - /** SecondaryBootDisk mode */ - mode?: (google.container.v1.SecondaryBootDisk.Mode|keyof typeof google.container.v1.SecondaryBootDisk.Mode|null); - - /** SecondaryBootDisk diskImage */ - diskImage?: (string|null); - } - - /** Represents a SecondaryBootDisk. */ - class SecondaryBootDisk implements ISecondaryBootDisk { - - /** - * Constructs a new SecondaryBootDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISecondaryBootDisk); - - /** SecondaryBootDisk mode. */ - public mode: (google.container.v1.SecondaryBootDisk.Mode|keyof typeof google.container.v1.SecondaryBootDisk.Mode); - - /** SecondaryBootDisk diskImage. */ - public diskImage: string; - - /** - * Creates a new SecondaryBootDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns SecondaryBootDisk instance - */ - public static create(properties?: google.container.v1.ISecondaryBootDisk): google.container.v1.SecondaryBootDisk; - - /** - * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. - * @param message SecondaryBootDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. - * @param message SecondaryBootDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecondaryBootDisk; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecondaryBootDisk; - - /** - * Verifies a SecondaryBootDisk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecondaryBootDisk - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecondaryBootDisk; - - /** - * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. - * @param message SecondaryBootDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SecondaryBootDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecondaryBootDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecondaryBootDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecondaryBootDisk { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - CONTAINER_IMAGE_CACHE = 1 - } - } - - /** InTransitEncryptionConfig enum. */ - enum InTransitEncryptionConfig { - IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0, - IN_TRANSIT_ENCRYPTION_DISABLED = 1, - IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2 - } - - /** Properties of a SecondaryBootDiskUpdateStrategy. */ - interface ISecondaryBootDiskUpdateStrategy { - } - - /** Represents a SecondaryBootDiskUpdateStrategy. */ - class SecondaryBootDiskUpdateStrategy implements ISecondaryBootDiskUpdateStrategy { - - /** - * Constructs a new SecondaryBootDiskUpdateStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1.ISecondaryBootDiskUpdateStrategy); - - /** - * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns SecondaryBootDiskUpdateStrategy instance - */ - public static create(properties?: google.container.v1.ISecondaryBootDiskUpdateStrategy): google.container.v1.SecondaryBootDiskUpdateStrategy; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecondaryBootDiskUpdateStrategy; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecondaryBootDiskUpdateStrategy; - - /** - * Verifies a SecondaryBootDiskUpdateStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecondaryBootDiskUpdateStrategy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecondaryBootDiskUpdateStrategy; - - /** - * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. - * @param message SecondaryBootDiskUpdateStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1.SecondaryBootDiskUpdateStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecondaryBootDiskUpdateStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecondaryBootDiskUpdateStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Code enum. */ - enum Code { - OK = 0, - CANCELLED = 1, - UNKNOWN = 2, - INVALID_ARGUMENT = 3, - DEADLINE_EXCEEDED = 4, - NOT_FOUND = 5, - ALREADY_EXISTS = 6, - PERMISSION_DENIED = 7, - UNAUTHENTICATED = 16, - RESOURCE_EXHAUSTED = 8, - FAILED_PRECONDITION = 9, - ABORTED = 10, - OUT_OF_RANGE = 11, - UNIMPLEMENTED = 12, - INTERNAL = 13, - UNAVAILABLE = 14, - DATA_LOSS = 15 - } - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-container/v1/protos/protos.js b/owl-bot-staging/google-container/v1/protos/protos.js deleted file mode 100644 index bb9374d52da..00000000000 --- a/owl-bot-staging/google-container/v1/protos/protos.js +++ /dev/null @@ -1,83279 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_container_protos || ($protobuf.roots._google_cloud_container_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.container = (function() { - - /** - * Namespace container. - * @memberof google - * @namespace - */ - var container = {}; - - container.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.container - * @namespace - */ - var v1 = {}; - - v1.ClusterManager = (function() { - - /** - * Constructs a new ClusterManager service. - * @memberof google.container.v1 - * @classdesc Represents a ClusterManager - * @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 ClusterManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ClusterManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ClusterManager; - - /** - * Creates new ClusterManager service using the specified rpc implementation. - * @function create - * @memberof google.container.v1.ClusterManager - * @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 {ClusterManager} RPC service. Useful where requests and/or responses are streamed. - */ - ClusterManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listClusters}. - * @memberof google.container.v1.ClusterManager - * @typedef ListClustersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.ListClustersResponse} [response] ListClustersResponse - */ - - /** - * Calls ListClusters. - * @function listClusters - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListClustersRequest} request ListClustersRequest message or plain object - * @param {google.container.v1.ClusterManager.ListClustersCallback} callback Node-style callback called with the error, if any, and ListClustersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listClusters = function listClusters(request, callback) { - return this.rpcCall(listClusters, $root.google.container.v1.ListClustersRequest, $root.google.container.v1.ListClustersResponse, request, callback); - }, "name", { value: "ListClusters" }); - - /** - * Calls ListClusters. - * @function listClusters - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListClustersRequest} request ListClustersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getCluster}. - * @memberof google.container.v1.ClusterManager - * @typedef GetClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Cluster} [response] Cluster - */ - - /** - * Calls GetCluster. - * @function getCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetClusterRequest} request GetClusterRequest message or plain object - * @param {google.container.v1.ClusterManager.GetClusterCallback} callback Node-style callback called with the error, if any, and Cluster - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getCluster = function getCluster(request, callback) { - return this.rpcCall(getCluster, $root.google.container.v1.GetClusterRequest, $root.google.container.v1.Cluster, request, callback); - }, "name", { value: "GetCluster" }); - - /** - * Calls GetCluster. - * @function getCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetClusterRequest} request GetClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|createCluster}. - * @memberof google.container.v1.ClusterManager - * @typedef CreateClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls CreateCluster. - * @function createCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICreateClusterRequest} request CreateClusterRequest message or plain object - * @param {google.container.v1.ClusterManager.CreateClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.createCluster = function createCluster(request, callback) { - return this.rpcCall(createCluster, $root.google.container.v1.CreateClusterRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "CreateCluster" }); - - /** - * Calls CreateCluster. - * @function createCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICreateClusterRequest} request CreateClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateCluster}. - * @memberof google.container.v1.ClusterManager - * @typedef UpdateClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls UpdateCluster. - * @function updateCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object - * @param {google.container.v1.ClusterManager.UpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateCluster = function updateCluster(request, callback) { - return this.rpcCall(updateCluster, $root.google.container.v1.UpdateClusterRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "UpdateCluster" }); - - /** - * Calls UpdateCluster. - * @function updateCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateNodePool}. - * @memberof google.container.v1.ClusterManager - * @typedef UpdateNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls UpdateNodePool. - * @function updateNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object - * @param {google.container.v1.ClusterManager.UpdateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateNodePool = function updateNodePool(request, callback) { - return this.rpcCall(updateNodePool, $root.google.container.v1.UpdateNodePoolRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "UpdateNodePool" }); - - /** - * Calls UpdateNodePool. - * @function updateNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolAutoscaling}. - * @memberof google.container.v1.ClusterManager - * @typedef SetNodePoolAutoscalingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolAutoscaling. - * @function setNodePoolAutoscaling - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object - * @param {google.container.v1.ClusterManager.SetNodePoolAutoscalingCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolAutoscaling = function setNodePoolAutoscaling(request, callback) { - return this.rpcCall(setNodePoolAutoscaling, $root.google.container.v1.SetNodePoolAutoscalingRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetNodePoolAutoscaling" }); - - /** - * Calls SetNodePoolAutoscaling. - * @function setNodePoolAutoscaling - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLoggingService}. - * @memberof google.container.v1.ClusterManager - * @typedef SetLoggingServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetLoggingService. - * @function setLoggingService - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object - * @param {google.container.v1.ClusterManager.SetLoggingServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLoggingService = function setLoggingService(request, callback) { - return this.rpcCall(setLoggingService, $root.google.container.v1.SetLoggingServiceRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetLoggingService" }); - - /** - * Calls SetLoggingService. - * @function setLoggingService - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMonitoringService}. - * @memberof google.container.v1.ClusterManager - * @typedef SetMonitoringServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetMonitoringService. - * @function setMonitoringService - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object - * @param {google.container.v1.ClusterManager.SetMonitoringServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMonitoringService = function setMonitoringService(request, callback) { - return this.rpcCall(setMonitoringService, $root.google.container.v1.SetMonitoringServiceRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetMonitoringService" }); - - /** - * Calls SetMonitoringService. - * @function setMonitoringService - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setAddonsConfig}. - * @memberof google.container.v1.ClusterManager - * @typedef SetAddonsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetAddonsConfig. - * @function setAddonsConfig - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object - * @param {google.container.v1.ClusterManager.SetAddonsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setAddonsConfig = function setAddonsConfig(request, callback) { - return this.rpcCall(setAddonsConfig, $root.google.container.v1.SetAddonsConfigRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetAddonsConfig" }); - - /** - * Calls SetAddonsConfig. - * @function setAddonsConfig - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLocations}. - * @memberof google.container.v1.ClusterManager - * @typedef SetLocationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetLocations. - * @function setLocations - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLocationsRequest} request SetLocationsRequest message or plain object - * @param {google.container.v1.ClusterManager.SetLocationsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLocations = function setLocations(request, callback) { - return this.rpcCall(setLocations, $root.google.container.v1.SetLocationsRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetLocations" }); - - /** - * Calls SetLocations. - * @function setLocations - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLocationsRequest} request SetLocationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|updateMaster}. - * @memberof google.container.v1.ClusterManager - * @typedef UpdateMasterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls UpdateMaster. - * @function updateMaster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object - * @param {google.container.v1.ClusterManager.UpdateMasterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateMaster = function updateMaster(request, callback) { - return this.rpcCall(updateMaster, $root.google.container.v1.UpdateMasterRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "UpdateMaster" }); - - /** - * Calls UpdateMaster. - * @function updateMaster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMasterAuth}. - * @memberof google.container.v1.ClusterManager - * @typedef SetMasterAuthCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetMasterAuth. - * @function setMasterAuth - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object - * @param {google.container.v1.ClusterManager.SetMasterAuthCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMasterAuth = function setMasterAuth(request, callback) { - return this.rpcCall(setMasterAuth, $root.google.container.v1.SetMasterAuthRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetMasterAuth" }); - - /** - * Calls SetMasterAuth. - * @function setMasterAuth - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|deleteCluster}. - * @memberof google.container.v1.ClusterManager - * @typedef DeleteClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls DeleteCluster. - * @function deleteCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object - * @param {google.container.v1.ClusterManager.DeleteClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.deleteCluster = function deleteCluster(request, callback) { - return this.rpcCall(deleteCluster, $root.google.container.v1.DeleteClusterRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "DeleteCluster" }); - - /** - * Calls DeleteCluster. - * @function deleteCluster - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listOperations}. - * @memberof google.container.v1.ClusterManager - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.container.v1.ClusterManager.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.container.v1.ListOperationsRequest, $root.google.container.v1.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getOperation}. - * @memberof google.container.v1.ClusterManager - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.container.v1.ClusterManager.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.container.v1.GetOperationRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|cancelOperation}. - * @memberof google.container.v1.ClusterManager - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.container.v1.ClusterManager.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.container.v1.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getServerConfig}. - * @memberof google.container.v1.ClusterManager - * @typedef GetServerConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.ServerConfig} [response] ServerConfig - */ - - /** - * Calls GetServerConfig. - * @function getServerConfig - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object - * @param {google.container.v1.ClusterManager.GetServerConfigCallback} callback Node-style callback called with the error, if any, and ServerConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getServerConfig = function getServerConfig(request, callback) { - return this.rpcCall(getServerConfig, $root.google.container.v1.GetServerConfigRequest, $root.google.container.v1.ServerConfig, request, callback); - }, "name", { value: "GetServerConfig" }); - - /** - * Calls GetServerConfig. - * @function getServerConfig - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getJSONWebKeys}. - * @memberof google.container.v1.ClusterManager - * @typedef GetJSONWebKeysCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse - */ - - /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @param {google.container.v1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { - return this.rpcCall(getJSONWebKeys, $root.google.container.v1.GetJSONWebKeysRequest, $root.google.container.v1.GetJSONWebKeysResponse, request, callback); - }, "name", { value: "GetJSONWebKeys" }); - - /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listNodePools}. - * @memberof google.container.v1.ClusterManager - * @typedef ListNodePoolsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.ListNodePoolsResponse} [response] ListNodePoolsResponse - */ - - /** - * Calls ListNodePools. - * @function listNodePools - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @param {google.container.v1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { - return this.rpcCall(listNodePools, $root.google.container.v1.ListNodePoolsRequest, $root.google.container.v1.ListNodePoolsResponse, request, callback); - }, "name", { value: "ListNodePools" }); - - /** - * Calls ListNodePools. - * @function listNodePools - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|getNodePool}. - * @memberof google.container.v1.ClusterManager - * @typedef GetNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.NodePool} [response] NodePool - */ - - /** - * Calls GetNodePool. - * @function getNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object - * @param {google.container.v1.ClusterManager.GetNodePoolCallback} callback Node-style callback called with the error, if any, and NodePool - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getNodePool = function getNodePool(request, callback) { - return this.rpcCall(getNodePool, $root.google.container.v1.GetNodePoolRequest, $root.google.container.v1.NodePool, request, callback); - }, "name", { value: "GetNodePool" }); - - /** - * Calls GetNodePool. - * @function getNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|createNodePool}. - * @memberof google.container.v1.ClusterManager - * @typedef CreateNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls CreateNodePool. - * @function createNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object - * @param {google.container.v1.ClusterManager.CreateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.createNodePool = function createNodePool(request, callback) { - return this.rpcCall(createNodePool, $root.google.container.v1.CreateNodePoolRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "CreateNodePool" }); - - /** - * Calls CreateNodePool. - * @function createNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|deleteNodePool}. - * @memberof google.container.v1.ClusterManager - * @typedef DeleteNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls DeleteNodePool. - * @function deleteNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object - * @param {google.container.v1.ClusterManager.DeleteNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.deleteNodePool = function deleteNodePool(request, callback) { - return this.rpcCall(deleteNodePool, $root.google.container.v1.DeleteNodePoolRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "DeleteNodePool" }); - - /** - * Calls DeleteNodePool. - * @function deleteNodePool - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|completeNodePoolUpgrade}. - * @memberof google.container.v1.ClusterManager - * @typedef CompleteNodePoolUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CompleteNodePoolUpgrade. - * @function completeNodePoolUpgrade - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object - * @param {google.container.v1.ClusterManager.CompleteNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.completeNodePoolUpgrade = function completeNodePoolUpgrade(request, callback) { - return this.rpcCall(completeNodePoolUpgrade, $root.google.container.v1.CompleteNodePoolUpgradeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CompleteNodePoolUpgrade" }); - - /** - * Calls CompleteNodePoolUpgrade. - * @function completeNodePoolUpgrade - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|rollbackNodePoolUpgrade}. - * @memberof google.container.v1.ClusterManager - * @typedef RollbackNodePoolUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls RollbackNodePoolUpgrade. - * @function rollbackNodePoolUpgrade - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object - * @param {google.container.v1.ClusterManager.RollbackNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.rollbackNodePoolUpgrade = function rollbackNodePoolUpgrade(request, callback) { - return this.rpcCall(rollbackNodePoolUpgrade, $root.google.container.v1.RollbackNodePoolUpgradeRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "RollbackNodePoolUpgrade" }); - - /** - * Calls RollbackNodePoolUpgrade. - * @function rollbackNodePoolUpgrade - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolManagement}. - * @memberof google.container.v1.ClusterManager - * @typedef SetNodePoolManagementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolManagement. - * @function setNodePoolManagement - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object - * @param {google.container.v1.ClusterManager.SetNodePoolManagementCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolManagement = function setNodePoolManagement(request, callback) { - return this.rpcCall(setNodePoolManagement, $root.google.container.v1.SetNodePoolManagementRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetNodePoolManagement" }); - - /** - * Calls SetNodePoolManagement. - * @function setNodePoolManagement - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLabels}. - * @memberof google.container.v1.ClusterManager - * @typedef SetLabelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetLabels. - * @function setLabels - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLabelsRequest} request SetLabelsRequest message or plain object - * @param {google.container.v1.ClusterManager.SetLabelsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLabels = function setLabels(request, callback) { - return this.rpcCall(setLabels, $root.google.container.v1.SetLabelsRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetLabels" }); - - /** - * Calls SetLabels. - * @function setLabels - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLabelsRequest} request SetLabelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setLegacyAbac}. - * @memberof google.container.v1.ClusterManager - * @typedef SetLegacyAbacCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetLegacyAbac. - * @function setLegacyAbac - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object - * @param {google.container.v1.ClusterManager.SetLegacyAbacCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLegacyAbac = function setLegacyAbac(request, callback) { - return this.rpcCall(setLegacyAbac, $root.google.container.v1.SetLegacyAbacRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetLegacyAbac" }); - - /** - * Calls SetLegacyAbac. - * @function setLegacyAbac - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|startIPRotation}. - * @memberof google.container.v1.ClusterManager - * @typedef StartIPRotationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls StartIPRotation. - * @function startIPRotation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object - * @param {google.container.v1.ClusterManager.StartIPRotationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.startIPRotation = function startIPRotation(request, callback) { - return this.rpcCall(startIPRotation, $root.google.container.v1.StartIPRotationRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "StartIPRotation" }); - - /** - * Calls StartIPRotation. - * @function startIPRotation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|completeIPRotation}. - * @memberof google.container.v1.ClusterManager - * @typedef CompleteIPRotationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls CompleteIPRotation. - * @function completeIPRotation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object - * @param {google.container.v1.ClusterManager.CompleteIPRotationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.completeIPRotation = function completeIPRotation(request, callback) { - return this.rpcCall(completeIPRotation, $root.google.container.v1.CompleteIPRotationRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "CompleteIPRotation" }); - - /** - * Calls CompleteIPRotation. - * @function completeIPRotation - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNodePoolSize}. - * @memberof google.container.v1.ClusterManager - * @typedef SetNodePoolSizeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolSize. - * @function setNodePoolSize - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object - * @param {google.container.v1.ClusterManager.SetNodePoolSizeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolSize = function setNodePoolSize(request, callback) { - return this.rpcCall(setNodePoolSize, $root.google.container.v1.SetNodePoolSizeRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetNodePoolSize" }); - - /** - * Calls SetNodePoolSize. - * @function setNodePoolSize - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setNetworkPolicy}. - * @memberof google.container.v1.ClusterManager - * @typedef SetNetworkPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetNetworkPolicy. - * @function setNetworkPolicy - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object - * @param {google.container.v1.ClusterManager.SetNetworkPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNetworkPolicy = function setNetworkPolicy(request, callback) { - return this.rpcCall(setNetworkPolicy, $root.google.container.v1.SetNetworkPolicyRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetNetworkPolicy" }); - - /** - * Calls SetNetworkPolicy. - * @function setNetworkPolicy - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|setMaintenancePolicy}. - * @memberof google.container.v1.ClusterManager - * @typedef SetMaintenancePolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.Operation} [response] Operation - */ - - /** - * Calls SetMaintenancePolicy. - * @function setMaintenancePolicy - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object - * @param {google.container.v1.ClusterManager.SetMaintenancePolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMaintenancePolicy = function setMaintenancePolicy(request, callback) { - return this.rpcCall(setMaintenancePolicy, $root.google.container.v1.SetMaintenancePolicyRequest, $root.google.container.v1.Operation, request, callback); - }, "name", { value: "SetMaintenancePolicy" }); - - /** - * Calls SetMaintenancePolicy. - * @function setMaintenancePolicy - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|listUsableSubnetworks}. - * @memberof google.container.v1.ClusterManager - * @typedef ListUsableSubnetworksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.ListUsableSubnetworksResponse} [response] ListUsableSubnetworksResponse - */ - - /** - * Calls ListUsableSubnetworks. - * @function listUsableSubnetworks - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object - * @param {google.container.v1.ClusterManager.ListUsableSubnetworksCallback} callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listUsableSubnetworks = function listUsableSubnetworks(request, callback) { - return this.rpcCall(listUsableSubnetworks, $root.google.container.v1.ListUsableSubnetworksRequest, $root.google.container.v1.ListUsableSubnetworksResponse, request, callback); - }, "name", { value: "ListUsableSubnetworks" }); - - /** - * Calls ListUsableSubnetworks. - * @function listUsableSubnetworks - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1.ClusterManager|checkAutopilotCompatibility}. - * @memberof google.container.v1.ClusterManager - * @typedef CheckAutopilotCompatibilityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1.CheckAutopilotCompatibilityResponse} [response] CheckAutopilotCompatibilityResponse - */ - - /** - * Calls CheckAutopilotCompatibility. - * @function checkAutopilotCompatibility - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object - * @param {google.container.v1.ClusterManager.CheckAutopilotCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.checkAutopilotCompatibility = function checkAutopilotCompatibility(request, callback) { - return this.rpcCall(checkAutopilotCompatibility, $root.google.container.v1.CheckAutopilotCompatibilityRequest, $root.google.container.v1.CheckAutopilotCompatibilityResponse, request, callback); - }, "name", { value: "CheckAutopilotCompatibility" }); - - /** - * Calls CheckAutopilotCompatibility. - * @function checkAutopilotCompatibility - * @memberof google.container.v1.ClusterManager - * @instance - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ClusterManager; - })(); - - v1.LinuxNodeConfig = (function() { - - /** - * Properties of a LinuxNodeConfig. - * @memberof google.container.v1 - * @interface ILinuxNodeConfig - * @property {Object.|null} [sysctls] LinuxNodeConfig sysctls - * @property {google.container.v1.LinuxNodeConfig.CgroupMode|null} [cgroupMode] LinuxNodeConfig cgroupMode - * @property {google.container.v1.LinuxNodeConfig.IHugepagesConfig|null} [hugepages] LinuxNodeConfig hugepages - */ - - /** - * Constructs a new LinuxNodeConfig. - * @memberof google.container.v1 - * @classdesc Represents a LinuxNodeConfig. - * @implements ILinuxNodeConfig - * @constructor - * @param {google.container.v1.ILinuxNodeConfig=} [properties] Properties to set - */ - function LinuxNodeConfig(properties) { - this.sysctls = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LinuxNodeConfig sysctls. - * @member {Object.} sysctls - * @memberof google.container.v1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.sysctls = $util.emptyObject; - - /** - * LinuxNodeConfig cgroupMode. - * @member {google.container.v1.LinuxNodeConfig.CgroupMode} cgroupMode - * @memberof google.container.v1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.cgroupMode = 0; - - /** - * LinuxNodeConfig hugepages. - * @member {google.container.v1.LinuxNodeConfig.IHugepagesConfig|null|undefined} hugepages - * @memberof google.container.v1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.hugepages = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LinuxNodeConfig _hugepages. - * @member {"hugepages"|undefined} _hugepages - * @memberof google.container.v1.LinuxNodeConfig - * @instance - */ - Object.defineProperty(LinuxNodeConfig.prototype, "_hugepages", { - get: $util.oneOfGetter($oneOfFields = ["hugepages"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LinuxNodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {google.container.v1.ILinuxNodeConfig=} [properties] Properties to set - * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig instance - */ - LinuxNodeConfig.create = function create(properties) { - return new LinuxNodeConfig(properties); - }; - - /** - * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {google.container.v1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinuxNodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sysctls != null && Object.hasOwnProperty.call(message, "sysctls")) - for (var keys = Object.keys(message.sysctls), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.sysctls[keys[i]]).ldelim(); - if (message.cgroupMode != null && Object.hasOwnProperty.call(message, "cgroupMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cgroupMode); - if (message.hugepages != null && Object.hasOwnProperty.call(message, "hugepages")) - $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.encode(message.hugepages, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {google.container.v1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinuxNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinuxNodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LinuxNodeConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.sysctls === $util.emptyObject) - message.sysctls = {}; - 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.sysctls[key] = value; - break; - } - case 2: { - message.cgroupMode = reader.int32(); - break; - } - case 3: { - message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinuxNodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LinuxNodeConfig message. - * @function verify - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LinuxNodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sysctls != null && message.hasOwnProperty("sysctls")) { - if (!$util.isObject(message.sysctls)) - return "sysctls: object expected"; - var key = Object.keys(message.sysctls); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.sysctls[key[i]])) - return "sysctls: string{k:string} expected"; - } - if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) - switch (message.cgroupMode) { - default: - return "cgroupMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.hugepages != null && message.hasOwnProperty("hugepages")) { - properties._hugepages = 1; - { - var error = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.verify(message.hugepages); - if (error) - return "hugepages." + error; - } - } - return null; - }; - - /** - * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LinuxNodeConfig} LinuxNodeConfig - */ - LinuxNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LinuxNodeConfig) - return object; - var message = new $root.google.container.v1.LinuxNodeConfig(); - if (object.sysctls) { - if (typeof object.sysctls !== "object") - throw TypeError(".google.container.v1.LinuxNodeConfig.sysctls: object expected"); - message.sysctls = {}; - for (var keys = Object.keys(object.sysctls), i = 0; i < keys.length; ++i) - message.sysctls[keys[i]] = String(object.sysctls[keys[i]]); - } - switch (object.cgroupMode) { - default: - if (typeof object.cgroupMode === "number") { - message.cgroupMode = object.cgroupMode; - break; - } - break; - case "CGROUP_MODE_UNSPECIFIED": - case 0: - message.cgroupMode = 0; - break; - case "CGROUP_MODE_V1": - case 1: - message.cgroupMode = 1; - break; - case "CGROUP_MODE_V2": - case 2: - message.cgroupMode = 2; - break; - } - if (object.hugepages != null) { - if (typeof object.hugepages !== "object") - throw TypeError(".google.container.v1.LinuxNodeConfig.hugepages: object expected"); - message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.fromObject(object.hugepages); - } - return message; - }; - - /** - * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {google.container.v1.LinuxNodeConfig} message LinuxNodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LinuxNodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.sysctls = {}; - if (options.defaults) - object.cgroupMode = options.enums === String ? "CGROUP_MODE_UNSPECIFIED" : 0; - var keys2; - if (message.sysctls && (keys2 = Object.keys(message.sysctls)).length) { - object.sysctls = {}; - for (var j = 0; j < keys2.length; ++j) - object.sysctls[keys2[j]] = message.sysctls[keys2[j]]; - } - if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) - object.cgroupMode = options.enums === String ? $root.google.container.v1.LinuxNodeConfig.CgroupMode[message.cgroupMode] === undefined ? message.cgroupMode : $root.google.container.v1.LinuxNodeConfig.CgroupMode[message.cgroupMode] : message.cgroupMode; - if (message.hugepages != null && message.hasOwnProperty("hugepages")) { - object.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.toObject(message.hugepages, options); - if (options.oneofs) - object._hugepages = "hugepages"; - } - return object; - }; - - /** - * Converts this LinuxNodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LinuxNodeConfig - * @instance - * @returns {Object.} JSON object - */ - LinuxNodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LinuxNodeConfig - * @function getTypeUrl - * @memberof google.container.v1.LinuxNodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LinuxNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LinuxNodeConfig"; - }; - - /** - * CgroupMode enum. - * @name google.container.v1.LinuxNodeConfig.CgroupMode - * @enum {number} - * @property {number} CGROUP_MODE_UNSPECIFIED=0 CGROUP_MODE_UNSPECIFIED value - * @property {number} CGROUP_MODE_V1=1 CGROUP_MODE_V1 value - * @property {number} CGROUP_MODE_V2=2 CGROUP_MODE_V2 value - */ - LinuxNodeConfig.CgroupMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CGROUP_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CGROUP_MODE_V1"] = 1; - values[valuesById[2] = "CGROUP_MODE_V2"] = 2; - return values; - })(); - - LinuxNodeConfig.HugepagesConfig = (function() { - - /** - * Properties of a HugepagesConfig. - * @memberof google.container.v1.LinuxNodeConfig - * @interface IHugepagesConfig - * @property {number|null} [hugepageSize2m] HugepagesConfig hugepageSize2m - * @property {number|null} [hugepageSize1g] HugepagesConfig hugepageSize1g - */ - - /** - * Constructs a new HugepagesConfig. - * @memberof google.container.v1.LinuxNodeConfig - * @classdesc Represents a HugepagesConfig. - * @implements IHugepagesConfig - * @constructor - * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set - */ - function HugepagesConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HugepagesConfig hugepageSize2m. - * @member {number|null|undefined} hugepageSize2m - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - HugepagesConfig.prototype.hugepageSize2m = null; - - /** - * HugepagesConfig hugepageSize1g. - * @member {number|null|undefined} hugepageSize1g - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - HugepagesConfig.prototype.hugepageSize1g = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HugepagesConfig _hugepageSize2m. - * @member {"hugepageSize2m"|undefined} _hugepageSize2m - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize2m", { - get: $util.oneOfGetter($oneOfFields = ["hugepageSize2m"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * HugepagesConfig _hugepageSize1g. - * @member {"hugepageSize1g"|undefined} _hugepageSize1g - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize1g", { - get: $util.oneOfGetter($oneOfFields = ["hugepageSize1g"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HugepagesConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set - * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig instance - */ - HugepagesConfig.create = function create(properties) { - return new HugepagesConfig(properties); - }; - - /** - * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HugepagesConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hugepageSize2m != null && Object.hasOwnProperty.call(message, "hugepageSize2m")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hugepageSize2m); - if (message.hugepageSize1g != null && Object.hasOwnProperty.call(message, "hugepageSize1g")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hugepageSize1g); - return writer; - }; - - /** - * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HugepagesConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HugepagesConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LinuxNodeConfig.HugepagesConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hugepageSize2m = reader.int32(); - break; - } - case 2: { - message.hugepageSize1g = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HugepagesConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HugepagesConfig message. - * @function verify - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HugepagesConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { - properties._hugepageSize2m = 1; - if (!$util.isInteger(message.hugepageSize2m)) - return "hugepageSize2m: integer expected"; - } - if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { - properties._hugepageSize1g = 1; - if (!$util.isInteger(message.hugepageSize1g)) - return "hugepageSize1g: integer expected"; - } - return null; - }; - - /** - * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - */ - HugepagesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LinuxNodeConfig.HugepagesConfig) - return object; - var message = new $root.google.container.v1.LinuxNodeConfig.HugepagesConfig(); - if (object.hugepageSize2m != null) - message.hugepageSize2m = object.hugepageSize2m | 0; - if (object.hugepageSize1g != null) - message.hugepageSize1g = object.hugepageSize1g | 0; - return message; - }; - - /** - * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1.LinuxNodeConfig.HugepagesConfig} message HugepagesConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HugepagesConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { - object.hugepageSize2m = message.hugepageSize2m; - if (options.oneofs) - object._hugepageSize2m = "hugepageSize2m"; - } - if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { - object.hugepageSize1g = message.hugepageSize1g; - if (options.oneofs) - object._hugepageSize1g = "hugepageSize1g"; - } - return object; - }; - - /** - * Converts this HugepagesConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @instance - * @returns {Object.} JSON object - */ - HugepagesConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HugepagesConfig - * @function getTypeUrl - * @memberof google.container.v1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HugepagesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LinuxNodeConfig.HugepagesConfig"; - }; - - return HugepagesConfig; - })(); - - return LinuxNodeConfig; - })(); - - v1.WindowsNodeConfig = (function() { - - /** - * Properties of a WindowsNodeConfig. - * @memberof google.container.v1 - * @interface IWindowsNodeConfig - * @property {google.container.v1.WindowsNodeConfig.OSVersion|null} [osVersion] WindowsNodeConfig osVersion - */ - - /** - * Constructs a new WindowsNodeConfig. - * @memberof google.container.v1 - * @classdesc Represents a WindowsNodeConfig. - * @implements IWindowsNodeConfig - * @constructor - * @param {google.container.v1.IWindowsNodeConfig=} [properties] Properties to set - */ - function WindowsNodeConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsNodeConfig osVersion. - * @member {google.container.v1.WindowsNodeConfig.OSVersion} osVersion - * @memberof google.container.v1.WindowsNodeConfig - * @instance - */ - WindowsNodeConfig.prototype.osVersion = 0; - - /** - * Creates a new WindowsNodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {google.container.v1.IWindowsNodeConfig=} [properties] Properties to set - * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig instance - */ - WindowsNodeConfig.create = function create(properties) { - return new WindowsNodeConfig(properties); - }; - - /** - * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {google.container.v1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsNodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.osVersion); - return writer; - }; - - /** - * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1.WindowsNodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {google.container.v1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsNodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WindowsNodeConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.osVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsNodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsNodeConfig message. - * @function verify - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsNodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - switch (message.osVersion) { - default: - return "osVersion: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.WindowsNodeConfig} WindowsNodeConfig - */ - WindowsNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.WindowsNodeConfig) - return object; - var message = new $root.google.container.v1.WindowsNodeConfig(); - switch (object.osVersion) { - default: - if (typeof object.osVersion === "number") { - message.osVersion = object.osVersion; - break; - } - break; - case "OS_VERSION_UNSPECIFIED": - case 0: - message.osVersion = 0; - break; - case "OS_VERSION_LTSC2019": - case 1: - message.osVersion = 1; - break; - case "OS_VERSION_LTSC2022": - case 2: - message.osVersion = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {google.container.v1.WindowsNodeConfig} message WindowsNodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsNodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.osVersion = options.enums === String ? "OS_VERSION_UNSPECIFIED" : 0; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = options.enums === String ? $root.google.container.v1.WindowsNodeConfig.OSVersion[message.osVersion] === undefined ? message.osVersion : $root.google.container.v1.WindowsNodeConfig.OSVersion[message.osVersion] : message.osVersion; - return object; - }; - - /** - * Converts this WindowsNodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1.WindowsNodeConfig - * @instance - * @returns {Object.} JSON object - */ - WindowsNodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WindowsNodeConfig - * @function getTypeUrl - * @memberof google.container.v1.WindowsNodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WindowsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.WindowsNodeConfig"; - }; - - /** - * OSVersion enum. - * @name google.container.v1.WindowsNodeConfig.OSVersion - * @enum {number} - * @property {number} OS_VERSION_UNSPECIFIED=0 OS_VERSION_UNSPECIFIED value - * @property {number} OS_VERSION_LTSC2019=1 OS_VERSION_LTSC2019 value - * @property {number} OS_VERSION_LTSC2022=2 OS_VERSION_LTSC2022 value - */ - WindowsNodeConfig.OSVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OS_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "OS_VERSION_LTSC2019"] = 1; - values[valuesById[2] = "OS_VERSION_LTSC2022"] = 2; - return values; - })(); - - return WindowsNodeConfig; - })(); - - v1.NodeKubeletConfig = (function() { - - /** - * Properties of a NodeKubeletConfig. - * @memberof google.container.v1 - * @interface INodeKubeletConfig - * @property {string|null} [cpuManagerPolicy] NodeKubeletConfig cpuManagerPolicy - * @property {google.protobuf.IBoolValue|null} [cpuCfsQuota] NodeKubeletConfig cpuCfsQuota - * @property {string|null} [cpuCfsQuotaPeriod] NodeKubeletConfig cpuCfsQuotaPeriod - * @property {number|Long|null} [podPidsLimit] NodeKubeletConfig podPidsLimit - * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] NodeKubeletConfig insecureKubeletReadonlyPortEnabled - */ - - /** - * Constructs a new NodeKubeletConfig. - * @memberof google.container.v1 - * @classdesc Represents a NodeKubeletConfig. - * @implements INodeKubeletConfig - * @constructor - * @param {google.container.v1.INodeKubeletConfig=} [properties] Properties to set - */ - function NodeKubeletConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeKubeletConfig cpuManagerPolicy. - * @member {string} cpuManagerPolicy - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuManagerPolicy = ""; - - /** - * NodeKubeletConfig cpuCfsQuota. - * @member {google.protobuf.IBoolValue|null|undefined} cpuCfsQuota - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuCfsQuota = null; - - /** - * NodeKubeletConfig cpuCfsQuotaPeriod. - * @member {string} cpuCfsQuotaPeriod - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuCfsQuotaPeriod = ""; - - /** - * NodeKubeletConfig podPidsLimit. - * @member {number|Long} podPidsLimit - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.podPidsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * NodeKubeletConfig insecureKubeletReadonlyPortEnabled. - * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.insecureKubeletReadonlyPortEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. - * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1.NodeKubeletConfig - * @instance - */ - Object.defineProperty(NodeKubeletConfig.prototype, "_insecureKubeletReadonlyPortEnabled", { - get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeKubeletConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {google.container.v1.INodeKubeletConfig=} [properties] Properties to set - * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig instance - */ - NodeKubeletConfig.create = function create(properties) { - return new NodeKubeletConfig(properties); - }; - - /** - * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {google.container.v1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeKubeletConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpuManagerPolicy != null && Object.hasOwnProperty.call(message, "cpuManagerPolicy")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpuManagerPolicy); - if (message.cpuCfsQuota != null && Object.hasOwnProperty.call(message, "cpuCfsQuota")) - $root.google.protobuf.BoolValue.encode(message.cpuCfsQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cpuCfsQuotaPeriod != null && Object.hasOwnProperty.call(message, "cpuCfsQuotaPeriod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cpuCfsQuotaPeriod); - if (message.podPidsLimit != null && Object.hasOwnProperty.call(message, "podPidsLimit")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.podPidsLimit); - if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.insecureKubeletReadonlyPortEnabled); - return writer; - }; - - /** - * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeKubeletConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {google.container.v1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeKubeletConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeKubeletConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeKubeletConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpuManagerPolicy = reader.string(); - break; - } - case 2: { - message.cpuCfsQuota = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cpuCfsQuotaPeriod = reader.string(); - break; - } - case 4: { - message.podPidsLimit = reader.int64(); - break; - } - case 7: { - message.insecureKubeletReadonlyPortEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeKubeletConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeKubeletConfig message. - * @function verify - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeKubeletConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) - if (!$util.isString(message.cpuManagerPolicy)) - return "cpuManagerPolicy: string expected"; - if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) { - var error = $root.google.protobuf.BoolValue.verify(message.cpuCfsQuota); - if (error) - return "cpuCfsQuota." + error; - } - if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) - if (!$util.isString(message.cpuCfsQuotaPeriod)) - return "cpuCfsQuotaPeriod: string expected"; - if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) - if (!$util.isInteger(message.podPidsLimit) && !(message.podPidsLimit && $util.isInteger(message.podPidsLimit.low) && $util.isInteger(message.podPidsLimit.high))) - return "podPidsLimit: integer|Long expected"; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - properties._insecureKubeletReadonlyPortEnabled = 1; - if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") - return "insecureKubeletReadonlyPortEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeKubeletConfig} NodeKubeletConfig - */ - NodeKubeletConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeKubeletConfig) - return object; - var message = new $root.google.container.v1.NodeKubeletConfig(); - if (object.cpuManagerPolicy != null) - message.cpuManagerPolicy = String(object.cpuManagerPolicy); - if (object.cpuCfsQuota != null) { - if (typeof object.cpuCfsQuota !== "object") - throw TypeError(".google.container.v1.NodeKubeletConfig.cpuCfsQuota: object expected"); - message.cpuCfsQuota = $root.google.protobuf.BoolValue.fromObject(object.cpuCfsQuota); - } - if (object.cpuCfsQuotaPeriod != null) - message.cpuCfsQuotaPeriod = String(object.cpuCfsQuotaPeriod); - if (object.podPidsLimit != null) - if ($util.Long) - (message.podPidsLimit = $util.Long.fromValue(object.podPidsLimit)).unsigned = false; - else if (typeof object.podPidsLimit === "string") - message.podPidsLimit = parseInt(object.podPidsLimit, 10); - else if (typeof object.podPidsLimit === "number") - message.podPidsLimit = object.podPidsLimit; - else if (typeof object.podPidsLimit === "object") - message.podPidsLimit = new $util.LongBits(object.podPidsLimit.low >>> 0, object.podPidsLimit.high >>> 0).toNumber(); - if (object.insecureKubeletReadonlyPortEnabled != null) - message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); - return message; - }; - - /** - * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {google.container.v1.NodeKubeletConfig} message NodeKubeletConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeKubeletConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpuManagerPolicy = ""; - object.cpuCfsQuota = null; - object.cpuCfsQuotaPeriod = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.podPidsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.podPidsLimit = options.longs === String ? "0" : 0; - } - if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) - object.cpuManagerPolicy = message.cpuManagerPolicy; - if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) - object.cpuCfsQuota = $root.google.protobuf.BoolValue.toObject(message.cpuCfsQuota, options); - if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) - object.cpuCfsQuotaPeriod = message.cpuCfsQuotaPeriod; - if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) - if (typeof message.podPidsLimit === "number") - object.podPidsLimit = options.longs === String ? String(message.podPidsLimit) : message.podPidsLimit; - else - object.podPidsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.podPidsLimit) : options.longs === Number ? new $util.LongBits(message.podPidsLimit.low >>> 0, message.podPidsLimit.high >>> 0).toNumber() : message.podPidsLimit; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; - if (options.oneofs) - object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; - } - return object; - }; - - /** - * Converts this NodeKubeletConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodeKubeletConfig - * @instance - * @returns {Object.} JSON object - */ - NodeKubeletConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeKubeletConfig - * @function getTypeUrl - * @memberof google.container.v1.NodeKubeletConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeKubeletConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeKubeletConfig"; - }; - - return NodeKubeletConfig; - })(); - - v1.NodeConfig = (function() { - - /** - * Properties of a NodeConfig. - * @memberof google.container.v1 - * @interface INodeConfig - * @property {string|null} [machineType] NodeConfig machineType - * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb - * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes - * @property {string|null} [serviceAccount] NodeConfig serviceAccount - * @property {Object.|null} [metadata] NodeConfig metadata - * @property {string|null} [imageType] NodeConfig imageType - * @property {Object.|null} [labels] NodeConfig labels - * @property {number|null} [localSsdCount] NodeConfig localSsdCount - * @property {Array.|null} [tags] NodeConfig tags - * @property {boolean|null} [preemptible] NodeConfig preemptible - * @property {Array.|null} [accelerators] NodeConfig accelerators - * @property {string|null} [diskType] NodeConfig diskType - * @property {string|null} [minCpuPlatform] NodeConfig minCpuPlatform - * @property {google.container.v1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] NodeConfig workloadMetadataConfig - * @property {Array.|null} [taints] NodeConfig taints - * @property {google.container.v1.ISandboxConfig|null} [sandboxConfig] NodeConfig sandboxConfig - * @property {string|null} [nodeGroup] NodeConfig nodeGroup - * @property {google.container.v1.IReservationAffinity|null} [reservationAffinity] NodeConfig reservationAffinity - * @property {google.container.v1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] NodeConfig shieldedInstanceConfig - * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] NodeConfig linuxNodeConfig - * @property {google.container.v1.INodeKubeletConfig|null} [kubeletConfig] NodeConfig kubeletConfig - * @property {string|null} [bootDiskKmsKey] NodeConfig bootDiskKmsKey - * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfig gcfsConfig - * @property {google.container.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] NodeConfig advancedMachineFeatures - * @property {google.container.v1.IVirtualNIC|null} [gvnic] NodeConfig gvnic - * @property {boolean|null} [spot] NodeConfig spot - * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] NodeConfig confidentialNodes - * @property {google.container.v1.IFastSocket|null} [fastSocket] NodeConfig fastSocket - * @property {Object.|null} [resourceLabels] NodeConfig resourceLabels - * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfig loggingConfig - * @property {google.container.v1.IWindowsNodeConfig|null} [windowsNodeConfig] NodeConfig windowsNodeConfig - * @property {google.container.v1.ILocalNvmeSsdBlockConfig|null} [localNvmeSsdBlockConfig] NodeConfig localNvmeSsdBlockConfig - * @property {google.container.v1.IEphemeralStorageLocalSsdConfig|null} [ephemeralStorageLocalSsdConfig] NodeConfig ephemeralStorageLocalSsdConfig - * @property {google.container.v1.ISoleTenantConfig|null} [soleTenantConfig] NodeConfig soleTenantConfig - * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfig containerdConfig - * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodeConfig resourceManagerTags - * @property {boolean|null} [enableConfidentialStorage] NodeConfig enableConfidentialStorage - * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks - * @property {Array.|null} [storagePools] NodeConfig storagePools - * @property {google.container.v1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy - * @property {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null} [localSsdEncryptionMode] NodeConfig localSsdEncryptionMode - * @property {google.container.v1.NodeConfig.EffectiveCgroupMode|null} [effectiveCgroupMode] NodeConfig effectiveCgroupMode - */ - - /** - * Constructs a new NodeConfig. - * @memberof google.container.v1 - * @classdesc Represents a NodeConfig. - * @implements INodeConfig - * @constructor - * @param {google.container.v1.INodeConfig=} [properties] Properties to set - */ - function NodeConfig(properties) { - this.oauthScopes = []; - this.metadata = {}; - this.labels = {}; - this.tags = []; - this.accelerators = []; - this.taints = []; - this.resourceLabels = {}; - this.secondaryBootDisks = []; - this.storagePools = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfig machineType. - * @member {string} machineType - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.machineType = ""; - - /** - * NodeConfig diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskSizeGb = 0; - - /** - * NodeConfig oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.oauthScopes = $util.emptyArray; - - /** - * NodeConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.serviceAccount = ""; - - /** - * NodeConfig metadata. - * @member {Object.} metadata - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.metadata = $util.emptyObject; - - /** - * NodeConfig imageType. - * @member {string} imageType - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.imageType = ""; - - /** - * NodeConfig labels. - * @member {Object.} labels - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.labels = $util.emptyObject; - - /** - * NodeConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.localSsdCount = 0; - - /** - * NodeConfig tags. - * @member {Array.} tags - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.tags = $util.emptyArray; - - /** - * NodeConfig preemptible. - * @member {boolean} preemptible - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.preemptible = false; - - /** - * NodeConfig accelerators. - * @member {Array.} accelerators - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.accelerators = $util.emptyArray; - - /** - * NodeConfig diskType. - * @member {string} diskType - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskType = ""; - - /** - * NodeConfig minCpuPlatform. - * @member {string} minCpuPlatform - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.minCpuPlatform = ""; - - /** - * NodeConfig workloadMetadataConfig. - * @member {google.container.v1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.workloadMetadataConfig = null; - - /** - * NodeConfig taints. - * @member {Array.} taints - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.taints = $util.emptyArray; - - /** - * NodeConfig sandboxConfig. - * @member {google.container.v1.ISandboxConfig|null|undefined} sandboxConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.sandboxConfig = null; - - /** - * NodeConfig nodeGroup. - * @member {string} nodeGroup - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.nodeGroup = ""; - - /** - * NodeConfig reservationAffinity. - * @member {google.container.v1.IReservationAffinity|null|undefined} reservationAffinity - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.reservationAffinity = null; - - /** - * NodeConfig shieldedInstanceConfig. - * @member {google.container.v1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.shieldedInstanceConfig = null; - - /** - * NodeConfig linuxNodeConfig. - * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.linuxNodeConfig = null; - - /** - * NodeConfig kubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} kubeletConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.kubeletConfig = null; - - /** - * NodeConfig bootDiskKmsKey. - * @member {string} bootDiskKmsKey - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.bootDiskKmsKey = ""; - - /** - * NodeConfig gcfsConfig. - * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.gcfsConfig = null; - - /** - * NodeConfig advancedMachineFeatures. - * @member {google.container.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.advancedMachineFeatures = null; - - /** - * NodeConfig gvnic. - * @member {google.container.v1.IVirtualNIC|null|undefined} gvnic - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.gvnic = null; - - /** - * NodeConfig spot. - * @member {boolean} spot - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.spot = false; - - /** - * NodeConfig confidentialNodes. - * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.confidentialNodes = null; - - /** - * NodeConfig fastSocket. - * @member {google.container.v1.IFastSocket|null|undefined} fastSocket - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.fastSocket = null; - - /** - * NodeConfig resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.resourceLabels = $util.emptyObject; - - /** - * NodeConfig loggingConfig. - * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.loggingConfig = null; - - /** - * NodeConfig windowsNodeConfig. - * @member {google.container.v1.IWindowsNodeConfig|null|undefined} windowsNodeConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.windowsNodeConfig = null; - - /** - * NodeConfig localNvmeSsdBlockConfig. - * @member {google.container.v1.ILocalNvmeSsdBlockConfig|null|undefined} localNvmeSsdBlockConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.localNvmeSsdBlockConfig = null; - - /** - * NodeConfig ephemeralStorageLocalSsdConfig. - * @member {google.container.v1.IEphemeralStorageLocalSsdConfig|null|undefined} ephemeralStorageLocalSsdConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.ephemeralStorageLocalSsdConfig = null; - - /** - * NodeConfig soleTenantConfig. - * @member {google.container.v1.ISoleTenantConfig|null|undefined} soleTenantConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.soleTenantConfig = null; - - /** - * NodeConfig containerdConfig. - * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.containerdConfig = null; - - /** - * NodeConfig resourceManagerTags. - * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.resourceManagerTags = null; - - /** - * NodeConfig enableConfidentialStorage. - * @member {boolean} enableConfidentialStorage - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.enableConfidentialStorage = false; - - /** - * NodeConfig secondaryBootDisks. - * @member {Array.} secondaryBootDisks - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.secondaryBootDisks = $util.emptyArray; - - /** - * NodeConfig storagePools. - * @member {Array.} storagePools - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.storagePools = $util.emptyArray; - - /** - * NodeConfig secondaryBootDiskUpdateStrategy. - * @member {google.container.v1.ISecondaryBootDiskUpdateStrategy|null|undefined} secondaryBootDiskUpdateStrategy - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; - - /** - * NodeConfig localSsdEncryptionMode. - * @member {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null|undefined} localSsdEncryptionMode - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.localSsdEncryptionMode = null; - - /** - * NodeConfig effectiveCgroupMode. - * @member {google.container.v1.NodeConfig.EffectiveCgroupMode} effectiveCgroupMode - * @memberof google.container.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.effectiveCgroupMode = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeConfig _fastSocket. - * @member {"fastSocket"|undefined} _fastSocket - * @memberof google.container.v1.NodeConfig - * @instance - */ - Object.defineProperty(NodeConfig.prototype, "_fastSocket", { - get: $util.oneOfGetter($oneOfFields = ["fastSocket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeConfig _secondaryBootDiskUpdateStrategy. - * @member {"secondaryBootDiskUpdateStrategy"|undefined} _secondaryBootDiskUpdateStrategy - * @memberof google.container.v1.NodeConfig - * @instance - */ - Object.defineProperty(NodeConfig.prototype, "_secondaryBootDiskUpdateStrategy", { - get: $util.oneOfGetter($oneOfFields = ["secondaryBootDiskUpdateStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeConfig _localSsdEncryptionMode. - * @member {"localSsdEncryptionMode"|undefined} _localSsdEncryptionMode - * @memberof google.container.v1.NodeConfig - * @instance - */ - Object.defineProperty(NodeConfig.prototype, "_localSsdEncryptionMode", { - get: $util.oneOfGetter($oneOfFields = ["localSsdEncryptionMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeConfig - * @static - * @param {google.container.v1.INodeConfig=} [properties] Properties to set - * @returns {google.container.v1.NodeConfig} NodeConfig instance - */ - NodeConfig.create = function create(properties) { - return new NodeConfig(properties); - }; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeConfig - * @static - * @param {google.container.v1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.diskSizeGb); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.oauthScopes[i]); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageType); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.localSsdCount); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.preemptible); - if (message.accelerators != null && message.accelerators.length) - for (var i = 0; i < message.accelerators.length; ++i) - $root.google.container.v1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.diskType); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.minCpuPlatform); - if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) - $root.google.container.v1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.container.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.sandboxConfig != null && Object.hasOwnProperty.call(message, "sandboxConfig")) - $root.google.container.v1.SandboxConfig.encode(message.sandboxConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.nodeGroup != null && Object.hasOwnProperty.call(message, "nodeGroup")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.nodeGroup); - if (message.reservationAffinity != null && Object.hasOwnProperty.call(message, "reservationAffinity")) - $root.google.container.v1.ReservationAffinity.encode(message.reservationAffinity, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) - $root.google.container.v1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) - $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.bootDiskKmsKey); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.container.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) - $root.google.container.v1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.spot != null && Object.hasOwnProperty.call(message, "spot")) - writer.uint32(/* id 32, wireType 0 =*/256).bool(message.spot); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) - $root.google.container.v1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 37, wireType 2 =*/298).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) - $root.google.container.v1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.localNvmeSsdBlockConfig != null && Object.hasOwnProperty.call(message, "localNvmeSsdBlockConfig")) - $root.google.container.v1.LocalNvmeSsdBlockConfig.encode(message.localNvmeSsdBlockConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.ephemeralStorageLocalSsdConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageLocalSsdConfig")) - $root.google.container.v1.EphemeralStorageLocalSsdConfig.encode(message.ephemeralStorageLocalSsdConfig, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.soleTenantConfig != null && Object.hasOwnProperty.call(message, "soleTenantConfig")) - $root.google.container.v1.SoleTenantConfig.encode(message.soleTenantConfig, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.enableConfidentialStorage != null && Object.hasOwnProperty.call(message, "enableConfidentialStorage")) - writer.uint32(/* id 46, wireType 0 =*/368).bool(message.enableConfidentialStorage); - if (message.secondaryBootDisks != null && message.secondaryBootDisks.length) - for (var i = 0; i < message.secondaryBootDisks.length; ++i) - $root.google.container.v1.SecondaryBootDisk.encode(message.secondaryBootDisks[i], writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.storagePools != null && message.storagePools.length) - for (var i = 0; i < message.storagePools.length; ++i) - writer.uint32(/* id 49, wireType 2 =*/394).string(message.storagePools[i]); - if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) - $root.google.container.v1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.localSsdEncryptionMode != null && Object.hasOwnProperty.call(message, "localSsdEncryptionMode")) - writer.uint32(/* id 54, wireType 0 =*/432).int32(message.localSsdEncryptionMode); - if (message.effectiveCgroupMode != null && Object.hasOwnProperty.call(message, "effectiveCgroupMode")) - writer.uint32(/* id 55, wireType 0 =*/440).int32(message.effectiveCgroupMode); - return writer; - }; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeConfig - * @static - * @param {google.container.v1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - case 2: { - message.diskSizeGb = reader.int32(); - break; - } - case 3: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 9: { - message.serviceAccount = reader.string(); - break; - } - case 4: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; - break; - } - case 5: { - message.imageType = reader.string(); - break; - } - case 6: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 7: { - message.localSsdCount = reader.int32(); - break; - } - case 8: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 10: { - message.preemptible = reader.bool(); - break; - } - case 11: { - if (!(message.accelerators && message.accelerators.length)) - message.accelerators = []; - message.accelerators.push($root.google.container.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 12: { - message.diskType = reader.string(); - break; - } - case 13: { - message.minCpuPlatform = reader.string(); - break; - } - case 14: { - message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.container.v1.NodeTaint.decode(reader, reader.uint32())); - break; - } - case 17: { - message.sandboxConfig = $root.google.container.v1.SandboxConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.nodeGroup = reader.string(); - break; - } - case 19: { - message.reservationAffinity = $root.google.container.v1.ReservationAffinity.decode(reader, reader.uint32()); - break; - } - case 20: { - message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 23: { - message.bootDiskKmsKey = reader.string(); - break; - } - case 25: { - message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 26: { - message.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 29: { - message.gvnic = $root.google.container.v1.VirtualNIC.decode(reader, reader.uint32()); - break; - } - case 32: { - message.spot = reader.bool(); - break; - } - case 35: { - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 36: { - message.fastSocket = $root.google.container.v1.FastSocket.decode(reader, reader.uint32()); - break; - } - case 37: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 38: { - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 39: { - message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.decode(reader, reader.uint32()); - break; - } - case 40: { - message.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.decode(reader, reader.uint32()); - break; - } - case 41: { - message.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.decode(reader, reader.uint32()); - break; - } - case 42: { - message.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.decode(reader, reader.uint32()); - break; - } - case 43: { - message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 45: { - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 46: { - message.enableConfidentialStorage = reader.bool(); - break; - } - case 48: { - if (!(message.secondaryBootDisks && message.secondaryBootDisks.length)) - message.secondaryBootDisks = []; - message.secondaryBootDisks.push($root.google.container.v1.SecondaryBootDisk.decode(reader, reader.uint32())); - break; - } - case 49: { - if (!(message.storagePools && message.storagePools.length)) - message.storagePools = []; - message.storagePools.push(reader.string()); - break; - } - case 50: { - message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); - break; - } - case 54: { - message.localSsdEncryptionMode = reader.int32(); - break; - } - case 55: { - message.effectiveCgroupMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfig message. - * @function verify - * @memberof google.container.v1.NodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - if (message.accelerators != null && message.hasOwnProperty("accelerators")) { - if (!Array.isArray(message.accelerators)) - return "accelerators: array expected"; - for (var i = 0; i < message.accelerators.length; ++i) { - var error = $root.google.container.v1.AcceleratorConfig.verify(message.accelerators[i]); - if (error) - return "accelerators." + error; - } - } - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { - var error = $root.google.container.v1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); - if (error) - return "workloadMetadataConfig." + 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.container.v1.NodeTaint.verify(message.taints[i]); - if (error) - return "taints." + error; - } - } - if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) { - var error = $root.google.container.v1.SandboxConfig.verify(message.sandboxConfig); - if (error) - return "sandboxConfig." + error; - } - if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) - if (!$util.isString(message.nodeGroup)) - return "nodeGroup: string expected"; - if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) { - var error = $root.google.container.v1.ReservationAffinity.verify(message.reservationAffinity); - if (error) - return "reservationAffinity." + error; - } - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { - var error = $root.google.container.v1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); - if (error) - return "shieldedInstanceConfig." + error; - } - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { - var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); - if (error) - return "linuxNodeConfig." + error; - } - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.kubeletConfig); - if (error) - return "kubeletConfig." + error; - } - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - if (!$util.isString(message.bootDiskKmsKey)) - return "bootDiskKmsKey: string expected"; - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - var error = $root.google.container.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); - if (error) - return "advancedMachineFeatures." + error; - } - if (message.gvnic != null && message.hasOwnProperty("gvnic")) { - var error = $root.google.container.v1.VirtualNIC.verify(message.gvnic); - if (error) - return "gvnic." + error; - } - if (message.spot != null && message.hasOwnProperty("spot")) - if (typeof message.spot !== "boolean") - return "spot: boolean expected"; - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - properties._fastSocket = 1; - { - var error = $root.google.container.v1.FastSocket.verify(message.fastSocket); - if (error) - return "fastSocket." + error; - } - } - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { - var error = $root.google.container.v1.WindowsNodeConfig.verify(message.windowsNodeConfig); - if (error) - return "windowsNodeConfig." + error; - } - if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) { - var error = $root.google.container.v1.LocalNvmeSsdBlockConfig.verify(message.localNvmeSsdBlockConfig); - if (error) - return "localNvmeSsdBlockConfig." + error; - } - if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) { - var error = $root.google.container.v1.EphemeralStorageLocalSsdConfig.verify(message.ephemeralStorageLocalSsdConfig); - if (error) - return "ephemeralStorageLocalSsdConfig." + error; - } - if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) { - var error = $root.google.container.v1.SoleTenantConfig.verify(message.soleTenantConfig); - if (error) - return "soleTenantConfig." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) - if (typeof message.enableConfidentialStorage !== "boolean") - return "enableConfidentialStorage: boolean expected"; - if (message.secondaryBootDisks != null && message.hasOwnProperty("secondaryBootDisks")) { - if (!Array.isArray(message.secondaryBootDisks)) - return "secondaryBootDisks: array expected"; - for (var i = 0; i < message.secondaryBootDisks.length; ++i) { - var error = $root.google.container.v1.SecondaryBootDisk.verify(message.secondaryBootDisks[i]); - if (error) - return "secondaryBootDisks." + error; - } - } - if (message.storagePools != null && message.hasOwnProperty("storagePools")) { - if (!Array.isArray(message.storagePools)) - return "storagePools: array expected"; - for (var i = 0; i < message.storagePools.length; ++i) - if (!$util.isString(message.storagePools[i])) - return "storagePools: string[] expected"; - } - if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { - properties._secondaryBootDiskUpdateStrategy = 1; - { - var error = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.verify(message.secondaryBootDiskUpdateStrategy); - if (error) - return "secondaryBootDiskUpdateStrategy." + error; - } - } - if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { - properties._localSsdEncryptionMode = 1; - switch (message.localSsdEncryptionMode) { - default: - return "localSsdEncryptionMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) - switch (message.effectiveCgroupMode) { - default: - return "effectiveCgroupMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeConfig} NodeConfig - */ - NodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeConfig) - return object; - var message = new $root.google.container.v1.NodeConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.container.v1.NodeConfig.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.container.v1.NodeConfig.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1.NodeConfig.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.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.container.v1.NodeConfig.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.accelerators) { - if (!Array.isArray(object.accelerators)) - throw TypeError(".google.container.v1.NodeConfig.accelerators: array expected"); - message.accelerators = []; - for (var i = 0; i < object.accelerators.length; ++i) { - if (typeof object.accelerators[i] !== "object") - throw TypeError(".google.container.v1.NodeConfig.accelerators: object expected"); - message.accelerators[i] = $root.google.container.v1.AcceleratorConfig.fromObject(object.accelerators[i]); - } - } - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.workloadMetadataConfig != null) { - if (typeof object.workloadMetadataConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.workloadMetadataConfig: object expected"); - message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); - } - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.container.v1.NodeConfig.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.container.v1.NodeConfig.taints: object expected"); - message.taints[i] = $root.google.container.v1.NodeTaint.fromObject(object.taints[i]); - } - } - if (object.sandboxConfig != null) { - if (typeof object.sandboxConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.sandboxConfig: object expected"); - message.sandboxConfig = $root.google.container.v1.SandboxConfig.fromObject(object.sandboxConfig); - } - if (object.nodeGroup != null) - message.nodeGroup = String(object.nodeGroup); - if (object.reservationAffinity != null) { - if (typeof object.reservationAffinity !== "object") - throw TypeError(".google.container.v1.NodeConfig.reservationAffinity: object expected"); - message.reservationAffinity = $root.google.container.v1.ReservationAffinity.fromObject(object.reservationAffinity); - } - if (object.shieldedInstanceConfig != null) { - if (typeof object.shieldedInstanceConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.shieldedInstanceConfig: object expected"); - message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); - } - if (object.linuxNodeConfig != null) { - if (typeof object.linuxNodeConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.linuxNodeConfig: object expected"); - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); - } - if (object.kubeletConfig != null) { - if (typeof object.kubeletConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.kubeletConfig: object expected"); - message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.kubeletConfig); - } - if (object.bootDiskKmsKey != null) - message.bootDiskKmsKey = String(object.bootDiskKmsKey); - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.container.v1.NodeConfig.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.gvnic != null) { - if (typeof object.gvnic !== "object") - throw TypeError(".google.container.v1.NodeConfig.gvnic: object expected"); - message.gvnic = $root.google.container.v1.VirtualNIC.fromObject(object.gvnic); - } - if (object.spot != null) - message.spot = Boolean(object.spot); - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1.NodeConfig.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.fastSocket != null) { - if (typeof object.fastSocket !== "object") - throw TypeError(".google.container.v1.NodeConfig.fastSocket: object expected"); - message.fastSocket = $root.google.container.v1.FastSocket.fromObject(object.fastSocket); - } - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1.NodeConfig.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.windowsNodeConfig != null) { - if (typeof object.windowsNodeConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.windowsNodeConfig: object expected"); - message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); - } - if (object.localNvmeSsdBlockConfig != null) { - if (typeof object.localNvmeSsdBlockConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.localNvmeSsdBlockConfig: object expected"); - message.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.fromObject(object.localNvmeSsdBlockConfig); - } - if (object.ephemeralStorageLocalSsdConfig != null) { - if (typeof object.ephemeralStorageLocalSsdConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.ephemeralStorageLocalSsdConfig: object expected"); - message.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.fromObject(object.ephemeralStorageLocalSsdConfig); - } - if (object.soleTenantConfig != null) { - if (typeof object.soleTenantConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.soleTenantConfig: object expected"); - message.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.fromObject(object.soleTenantConfig); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1.NodeConfig.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1.NodeConfig.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.enableConfidentialStorage != null) - message.enableConfidentialStorage = Boolean(object.enableConfidentialStorage); - if (object.secondaryBootDisks) { - if (!Array.isArray(object.secondaryBootDisks)) - throw TypeError(".google.container.v1.NodeConfig.secondaryBootDisks: array expected"); - message.secondaryBootDisks = []; - for (var i = 0; i < object.secondaryBootDisks.length; ++i) { - if (typeof object.secondaryBootDisks[i] !== "object") - throw TypeError(".google.container.v1.NodeConfig.secondaryBootDisks: object expected"); - message.secondaryBootDisks[i] = $root.google.container.v1.SecondaryBootDisk.fromObject(object.secondaryBootDisks[i]); - } - } - if (object.storagePools) { - if (!Array.isArray(object.storagePools)) - throw TypeError(".google.container.v1.NodeConfig.storagePools: array expected"); - message.storagePools = []; - for (var i = 0; i < object.storagePools.length; ++i) - message.storagePools[i] = String(object.storagePools[i]); - } - if (object.secondaryBootDiskUpdateStrategy != null) { - if (typeof object.secondaryBootDiskUpdateStrategy !== "object") - throw TypeError(".google.container.v1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); - message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); - } - switch (object.localSsdEncryptionMode) { - default: - if (typeof object.localSsdEncryptionMode === "number") { - message.localSsdEncryptionMode = object.localSsdEncryptionMode; - break; - } - break; - case "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": - case 0: - message.localSsdEncryptionMode = 0; - break; - case "STANDARD_ENCRYPTION": - case 1: - message.localSsdEncryptionMode = 1; - break; - case "EPHEMERAL_KEY_ENCRYPTION": - case 2: - message.localSsdEncryptionMode = 2; - break; - } - switch (object.effectiveCgroupMode) { - default: - if (typeof object.effectiveCgroupMode === "number") { - message.effectiveCgroupMode = object.effectiveCgroupMode; - break; - } - break; - case "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": - case 0: - message.effectiveCgroupMode = 0; - break; - case "EFFECTIVE_CGROUP_MODE_V1": - case 1: - message.effectiveCgroupMode = 1; - break; - case "EFFECTIVE_CGROUP_MODE_V2": - case 2: - message.effectiveCgroupMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeConfig - * @static - * @param {google.container.v1.NodeConfig} message NodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.oauthScopes = []; - object.tags = []; - object.accelerators = []; - object.taints = []; - object.secondaryBootDisks = []; - object.storagePools = []; - } - if (options.objects || options.defaults) { - object.metadata = {}; - object.labels = {}; - object.resourceLabels = {}; - } - if (options.defaults) { - object.machineType = ""; - object.diskSizeGb = 0; - object.imageType = ""; - object.localSsdCount = 0; - object.serviceAccount = ""; - object.preemptible = false; - object.diskType = ""; - object.minCpuPlatform = ""; - object.workloadMetadataConfig = null; - object.sandboxConfig = null; - object.nodeGroup = ""; - object.reservationAffinity = null; - object.shieldedInstanceConfig = null; - object.linuxNodeConfig = null; - object.kubeletConfig = null; - object.bootDiskKmsKey = ""; - object.gcfsConfig = null; - object.advancedMachineFeatures = null; - object.gvnic = null; - object.spot = false; - object.confidentialNodes = null; - object.loggingConfig = null; - object.windowsNodeConfig = null; - object.localNvmeSsdBlockConfig = null; - object.ephemeralStorageLocalSsdConfig = null; - object.soleTenantConfig = null; - object.containerdConfig = null; - object.resourceManagerTags = null; - object.enableConfidentialStorage = false; - object.effectiveCgroupMode = options.enums === String ? "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" : 0; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - 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.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.preemptible != null && message.hasOwnProperty("preemptible")) - object.preemptible = message.preemptible; - if (message.accelerators && message.accelerators.length) { - object.accelerators = []; - for (var j = 0; j < message.accelerators.length; ++j) - object.accelerators[j] = $root.google.container.v1.AcceleratorConfig.toObject(message.accelerators[j], options); - } - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - object.minCpuPlatform = message.minCpuPlatform; - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) - object.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.container.v1.NodeTaint.toObject(message.taints[j], options); - } - if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) - object.sandboxConfig = $root.google.container.v1.SandboxConfig.toObject(message.sandboxConfig, options); - if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) - object.nodeGroup = message.nodeGroup; - if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) - object.reservationAffinity = $root.google.container.v1.ReservationAffinity.toObject(message.reservationAffinity, options); - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) - object.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) - object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) - object.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.kubeletConfig, options); - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - object.bootDiskKmsKey = message.bootDiskKmsKey; - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) - object.advancedMachineFeatures = $root.google.container.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (message.gvnic != null && message.hasOwnProperty("gvnic")) - object.gvnic = $root.google.container.v1.VirtualNIC.toObject(message.gvnic, options); - if (message.spot != null && message.hasOwnProperty("spot")) - object.spot = message.spot; - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - object.fastSocket = $root.google.container.v1.FastSocket.toObject(message.fastSocket, options); - if (options.oneofs) - object._fastSocket = "fastSocket"; - } - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) - object.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); - if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) - object.localNvmeSsdBlockConfig = $root.google.container.v1.LocalNvmeSsdBlockConfig.toObject(message.localNvmeSsdBlockConfig, options); - if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) - object.ephemeralStorageLocalSsdConfig = $root.google.container.v1.EphemeralStorageLocalSsdConfig.toObject(message.ephemeralStorageLocalSsdConfig, options); - if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) - object.soleTenantConfig = $root.google.container.v1.SoleTenantConfig.toObject(message.soleTenantConfig, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) - object.enableConfidentialStorage = message.enableConfidentialStorage; - if (message.secondaryBootDisks && message.secondaryBootDisks.length) { - object.secondaryBootDisks = []; - for (var j = 0; j < message.secondaryBootDisks.length; ++j) - object.secondaryBootDisks[j] = $root.google.container.v1.SecondaryBootDisk.toObject(message.secondaryBootDisks[j], options); - } - if (message.storagePools && message.storagePools.length) { - object.storagePools = []; - for (var j = 0; j < message.storagePools.length; ++j) - object.storagePools[j] = message.storagePools[j]; - } - if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { - object.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.toObject(message.secondaryBootDiskUpdateStrategy, options); - if (options.oneofs) - object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; - } - if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { - object.localSsdEncryptionMode = options.enums === String ? $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] === undefined ? message.localSsdEncryptionMode : $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] : message.localSsdEncryptionMode; - if (options.oneofs) - object._localSsdEncryptionMode = "localSsdEncryptionMode"; - } - if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) - object.effectiveCgroupMode = options.enums === String ? $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] === undefined ? message.effectiveCgroupMode : $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] : message.effectiveCgroupMode; - return object; - }; - - /** - * Converts this NodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodeConfig - * @instance - * @returns {Object.} JSON object - */ - NodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfig - * @function getTypeUrl - * @memberof google.container.v1.NodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeConfig"; - }; - - /** - * LocalSsdEncryptionMode enum. - * @name google.container.v1.NodeConfig.LocalSsdEncryptionMode - * @enum {number} - * @property {number} LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED=0 LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED value - * @property {number} STANDARD_ENCRYPTION=1 STANDARD_ENCRYPTION value - * @property {number} EPHEMERAL_KEY_ENCRYPTION=2 EPHEMERAL_KEY_ENCRYPTION value - */ - NodeConfig.LocalSsdEncryptionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD_ENCRYPTION"] = 1; - values[valuesById[2] = "EPHEMERAL_KEY_ENCRYPTION"] = 2; - return values; - })(); - - /** - * EffectiveCgroupMode enum. - * @name google.container.v1.NodeConfig.EffectiveCgroupMode - * @enum {number} - * @property {number} EFFECTIVE_CGROUP_MODE_UNSPECIFIED=0 EFFECTIVE_CGROUP_MODE_UNSPECIFIED value - * @property {number} EFFECTIVE_CGROUP_MODE_V1=1 EFFECTIVE_CGROUP_MODE_V1 value - * @property {number} EFFECTIVE_CGROUP_MODE_V2=2 EFFECTIVE_CGROUP_MODE_V2 value - */ - NodeConfig.EffectiveCgroupMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EFFECTIVE_CGROUP_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EFFECTIVE_CGROUP_MODE_V1"] = 1; - values[valuesById[2] = "EFFECTIVE_CGROUP_MODE_V2"] = 2; - return values; - })(); - - return NodeConfig; - })(); - - v1.AdvancedMachineFeatures = (function() { - - /** - * Properties of an AdvancedMachineFeatures. - * @memberof google.container.v1 - * @interface IAdvancedMachineFeatures - * @property {number|Long|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - */ - - /** - * Constructs a new AdvancedMachineFeatures. - * @memberof google.container.v1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures - * @constructor - * @param {google.container.v1.IAdvancedMachineFeatures=} [properties] Properties to set - */ - function AdvancedMachineFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|Long|null|undefined} threadsPerCore - * @memberof google.container.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.container.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.container.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.container.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @function create - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {google.container.v1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance - */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); - }; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {google.container.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.threadsPerCore); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNestedVirtualization); - return writer; - }; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {google.container.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdvancedMachineFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.threadsPerCore = reader.int64(); - break; - } - case 2: { - message.enableNestedVirtualization = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedMachineFeatures message. - * @function verify - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedMachineFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore) && !(message.threadsPerCore && $util.isInteger(message.threadsPerCore.low) && $util.isInteger(message.threadsPerCore.high))) - return "threadsPerCore: integer|Long expected"; - } - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AdvancedMachineFeatures) - return object; - var message = new $root.google.container.v1.AdvancedMachineFeatures(); - if (object.threadsPerCore != null) - if ($util.Long) - (message.threadsPerCore = $util.Long.fromValue(object.threadsPerCore)).unsigned = false; - else if (typeof object.threadsPerCore === "string") - message.threadsPerCore = parseInt(object.threadsPerCore, 10); - else if (typeof object.threadsPerCore === "number") - message.threadsPerCore = object.threadsPerCore; - else if (typeof object.threadsPerCore === "object") - message.threadsPerCore = new $util.LongBits(object.threadsPerCore.low >>> 0, object.threadsPerCore.high >>> 0).toNumber(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - return message; - }; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {google.container.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - if (typeof message.threadsPerCore === "number") - object.threadsPerCore = options.longs === String ? String(message.threadsPerCore) : message.threadsPerCore; - else - object.threadsPerCore = options.longs === String ? $util.Long.prototype.toString.call(message.threadsPerCore) : options.longs === Number ? new $util.LongBits(message.threadsPerCore.low >>> 0, message.threadsPerCore.high >>> 0).toNumber() : message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - return object; - }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @function toJSON - * @memberof google.container.v1.AdvancedMachineFeatures - * @instance - * @returns {Object.} JSON object - */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @function getTypeUrl - * @memberof google.container.v1.AdvancedMachineFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AdvancedMachineFeatures"; - }; - - return AdvancedMachineFeatures; - })(); - - v1.NodeNetworkConfig = (function() { - - /** - * Properties of a NodeNetworkConfig. - * @memberof google.container.v1 - * @interface INodeNetworkConfig - * @property {boolean|null} [createPodRange] NodeNetworkConfig createPodRange - * @property {string|null} [podRange] NodeNetworkConfig podRange - * @property {string|null} [podIpv4CidrBlock] NodeNetworkConfig podIpv4CidrBlock - * @property {boolean|null} [enablePrivateNodes] NodeNetworkConfig enablePrivateNodes - * @property {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null} [networkPerformanceConfig] NodeNetworkConfig networkPerformanceConfig - * @property {google.container.v1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] NodeNetworkConfig podCidrOverprovisionConfig - * @property {Array.|null} [additionalNodeNetworkConfigs] NodeNetworkConfig additionalNodeNetworkConfigs - * @property {Array.|null} [additionalPodNetworkConfigs] NodeNetworkConfig additionalPodNetworkConfigs - * @property {number|null} [podIpv4RangeUtilization] NodeNetworkConfig podIpv4RangeUtilization - */ - - /** - * Constructs a new NodeNetworkConfig. - * @memberof google.container.v1 - * @classdesc Represents a NodeNetworkConfig. - * @implements INodeNetworkConfig - * @constructor - * @param {google.container.v1.INodeNetworkConfig=} [properties] Properties to set - */ - function NodeNetworkConfig(properties) { - this.additionalNodeNetworkConfigs = []; - this.additionalPodNetworkConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeNetworkConfig createPodRange. - * @member {boolean} createPodRange - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.createPodRange = false; - - /** - * NodeNetworkConfig podRange. - * @member {string} podRange - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podRange = ""; - - /** - * NodeNetworkConfig podIpv4CidrBlock. - * @member {string} podIpv4CidrBlock - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podIpv4CidrBlock = ""; - - /** - * NodeNetworkConfig enablePrivateNodes. - * @member {boolean|null|undefined} enablePrivateNodes - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.enablePrivateNodes = null; - - /** - * NodeNetworkConfig networkPerformanceConfig. - * @member {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.networkPerformanceConfig = null; - - /** - * NodeNetworkConfig podCidrOverprovisionConfig. - * @member {google.container.v1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podCidrOverprovisionConfig = null; - - /** - * NodeNetworkConfig additionalNodeNetworkConfigs. - * @member {Array.} additionalNodeNetworkConfigs - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.additionalNodeNetworkConfigs = $util.emptyArray; - - /** - * NodeNetworkConfig additionalPodNetworkConfigs. - * @member {Array.} additionalPodNetworkConfigs - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.additionalPodNetworkConfigs = $util.emptyArray; - - /** - * NodeNetworkConfig podIpv4RangeUtilization. - * @member {number} podIpv4RangeUtilization - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podIpv4RangeUtilization = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeNetworkConfig _enablePrivateNodes. - * @member {"enablePrivateNodes"|undefined} _enablePrivateNodes - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - Object.defineProperty(NodeNetworkConfig.prototype, "_enablePrivateNodes", { - get: $util.oneOfGetter($oneOfFields = ["enablePrivateNodes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeNetworkConfig _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.container.v1.NodeNetworkConfig - * @instance - */ - Object.defineProperty(NodeNetworkConfig.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {google.container.v1.INodeNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig instance - */ - NodeNetworkConfig.create = function create(properties) { - return new NodeNetworkConfig(properties); - }; - - /** - * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {google.container.v1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createPodRange != null && Object.hasOwnProperty.call(message, "createPodRange")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.createPodRange); - if (message.podRange != null && Object.hasOwnProperty.call(message, "podRange")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.podRange); - if (message.podIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "podIpv4CidrBlock")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.podIpv4CidrBlock); - if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enablePrivateNodes); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) - $root.google.container.v1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.additionalNodeNetworkConfigs != null && message.additionalNodeNetworkConfigs.length) - for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) - $root.google.container.v1.AdditionalNodeNetworkConfig.encode(message.additionalNodeNetworkConfigs[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.additionalPodNetworkConfigs != null && message.additionalPodNetworkConfigs.length) - for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) - $root.google.container.v1.AdditionalPodNetworkConfig.encode(message.additionalPodNetworkConfigs[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.podIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "podIpv4RangeUtilization")) - writer.uint32(/* id 16, wireType 1 =*/129).double(message.podIpv4RangeUtilization); - return writer; - }; - - /** - * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {google.container.v1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.createPodRange = reader.bool(); - break; - } - case 5: { - message.podRange = reader.string(); - break; - } - case 6: { - message.podIpv4CidrBlock = reader.string(); - break; - } - case 9: { - message.enablePrivateNodes = reader.bool(); - break; - } - case 11: { - message.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 13: { - message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - if (!(message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length)) - message.additionalNodeNetworkConfigs = []; - message.additionalNodeNetworkConfigs.push($root.google.container.v1.AdditionalNodeNetworkConfig.decode(reader, reader.uint32())); - break; - } - case 15: { - if (!(message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length)) - message.additionalPodNetworkConfigs = []; - message.additionalPodNetworkConfigs.push($root.google.container.v1.AdditionalPodNetworkConfig.decode(reader, reader.uint32())); - break; - } - case 16: { - message.podIpv4RangeUtilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeNetworkConfig message. - * @function verify - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) - if (typeof message.createPodRange !== "boolean") - return "createPodRange: boolean expected"; - if (message.podRange != null && message.hasOwnProperty("podRange")) - if (!$util.isString(message.podRange)) - return "podRange: string expected"; - if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) - if (!$util.isString(message.podIpv4CidrBlock)) - return "podIpv4CidrBlock: string expected"; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { - properties._enablePrivateNodes = 1; - if (typeof message.enablePrivateNodes !== "boolean") - return "enablePrivateNodes: boolean expected"; - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { - var error = $root.google.container.v1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); - if (error) - return "podCidrOverprovisionConfig." + error; - } - if (message.additionalNodeNetworkConfigs != null && message.hasOwnProperty("additionalNodeNetworkConfigs")) { - if (!Array.isArray(message.additionalNodeNetworkConfigs)) - return "additionalNodeNetworkConfigs: array expected"; - for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) { - var error = $root.google.container.v1.AdditionalNodeNetworkConfig.verify(message.additionalNodeNetworkConfigs[i]); - if (error) - return "additionalNodeNetworkConfigs." + error; - } - } - if (message.additionalPodNetworkConfigs != null && message.hasOwnProperty("additionalPodNetworkConfigs")) { - if (!Array.isArray(message.additionalPodNetworkConfigs)) - return "additionalPodNetworkConfigs: array expected"; - for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) { - var error = $root.google.container.v1.AdditionalPodNetworkConfig.verify(message.additionalPodNetworkConfigs[i]); - if (error) - return "additionalPodNetworkConfigs." + error; - } - } - if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) - if (typeof message.podIpv4RangeUtilization !== "number") - return "podIpv4RangeUtilization: number expected"; - return null; - }; - - /** - * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeNetworkConfig} NodeNetworkConfig - */ - NodeNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeNetworkConfig) - return object; - var message = new $root.google.container.v1.NodeNetworkConfig(); - if (object.createPodRange != null) - message.createPodRange = Boolean(object.createPodRange); - if (object.podRange != null) - message.podRange = String(object.podRange); - if (object.podIpv4CidrBlock != null) - message.podIpv4CidrBlock = String(object.podIpv4CidrBlock); - if (object.enablePrivateNodes != null) - message.enablePrivateNodes = Boolean(object.enablePrivateNodes); - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.container.v1.NodeNetworkConfig.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.podCidrOverprovisionConfig != null) { - if (typeof object.podCidrOverprovisionConfig !== "object") - throw TypeError(".google.container.v1.NodeNetworkConfig.podCidrOverprovisionConfig: object expected"); - message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); - } - if (object.additionalNodeNetworkConfigs) { - if (!Array.isArray(object.additionalNodeNetworkConfigs)) - throw TypeError(".google.container.v1.NodeNetworkConfig.additionalNodeNetworkConfigs: array expected"); - message.additionalNodeNetworkConfigs = []; - for (var i = 0; i < object.additionalNodeNetworkConfigs.length; ++i) { - if (typeof object.additionalNodeNetworkConfigs[i] !== "object") - throw TypeError(".google.container.v1.NodeNetworkConfig.additionalNodeNetworkConfigs: object expected"); - message.additionalNodeNetworkConfigs[i] = $root.google.container.v1.AdditionalNodeNetworkConfig.fromObject(object.additionalNodeNetworkConfigs[i]); - } - } - if (object.additionalPodNetworkConfigs) { - if (!Array.isArray(object.additionalPodNetworkConfigs)) - throw TypeError(".google.container.v1.NodeNetworkConfig.additionalPodNetworkConfigs: array expected"); - message.additionalPodNetworkConfigs = []; - for (var i = 0; i < object.additionalPodNetworkConfigs.length; ++i) { - if (typeof object.additionalPodNetworkConfigs[i] !== "object") - throw TypeError(".google.container.v1.NodeNetworkConfig.additionalPodNetworkConfigs: object expected"); - message.additionalPodNetworkConfigs[i] = $root.google.container.v1.AdditionalPodNetworkConfig.fromObject(object.additionalPodNetworkConfigs[i]); - } - } - if (object.podIpv4RangeUtilization != null) - message.podIpv4RangeUtilization = Number(object.podIpv4RangeUtilization); - return message; - }; - - /** - * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {google.container.v1.NodeNetworkConfig} message NodeNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.additionalNodeNetworkConfigs = []; - object.additionalPodNetworkConfigs = []; - } - if (options.defaults) { - object.createPodRange = false; - object.podRange = ""; - object.podIpv4CidrBlock = ""; - object.podCidrOverprovisionConfig = null; - object.podIpv4RangeUtilization = 0; - } - if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) - object.createPodRange = message.createPodRange; - if (message.podRange != null && message.hasOwnProperty("podRange")) - object.podRange = message.podRange; - if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) - object.podIpv4CidrBlock = message.podIpv4CidrBlock; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { - object.enablePrivateNodes = message.enablePrivateNodes; - if (options.oneofs) - object._enablePrivateNodes = "enablePrivateNodes"; - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) - object.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); - if (message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length) { - object.additionalNodeNetworkConfigs = []; - for (var j = 0; j < message.additionalNodeNetworkConfigs.length; ++j) - object.additionalNodeNetworkConfigs[j] = $root.google.container.v1.AdditionalNodeNetworkConfig.toObject(message.additionalNodeNetworkConfigs[j], options); - } - if (message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length) { - object.additionalPodNetworkConfigs = []; - for (var j = 0; j < message.additionalPodNetworkConfigs.length; ++j) - object.additionalPodNetworkConfigs[j] = $root.google.container.v1.AdditionalPodNetworkConfig.toObject(message.additionalPodNetworkConfigs[j], options); - } - if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) - object.podIpv4RangeUtilization = options.json && !isFinite(message.podIpv4RangeUtilization) ? String(message.podIpv4RangeUtilization) : message.podIpv4RangeUtilization; - return object; - }; - - /** - * Converts this NodeNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodeNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NodeNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1.NodeNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeNetworkConfig"; - }; - - NodeNetworkConfig.NetworkPerformanceConfig = (function() { - - /** - * Properties of a NetworkPerformanceConfig. - * @memberof google.container.v1.NodeNetworkConfig - * @interface INetworkPerformanceConfig - * @property {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new NetworkPerformanceConfig. - * @memberof google.container.v1.NodeNetworkConfig - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig - * @constructor - * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set - */ - function NetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig instance - */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPerformanceConfig message. - * @function verify - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig) - return object; - var message = new $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "TIER_1": - case 1: - message.totalEgressBandwidthTier = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig} message NetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} TIER_1=1 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIER_1"] = 1; - return values; - })(); - - return NetworkPerformanceConfig; - })(); - - return NodeNetworkConfig; - })(); - - v1.AdditionalNodeNetworkConfig = (function() { - - /** - * Properties of an AdditionalNodeNetworkConfig. - * @memberof google.container.v1 - * @interface IAdditionalNodeNetworkConfig - * @property {string|null} [network] AdditionalNodeNetworkConfig network - * @property {string|null} [subnetwork] AdditionalNodeNetworkConfig subnetwork - */ - - /** - * Constructs a new AdditionalNodeNetworkConfig. - * @memberof google.container.v1 - * @classdesc Represents an AdditionalNodeNetworkConfig. - * @implements IAdditionalNodeNetworkConfig - * @constructor - * @param {google.container.v1.IAdditionalNodeNetworkConfig=} [properties] Properties to set - */ - function AdditionalNodeNetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalNodeNetworkConfig network. - * @member {string} network - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @instance - */ - AdditionalNodeNetworkConfig.prototype.network = ""; - - /** - * AdditionalNodeNetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @instance - */ - AdditionalNodeNetworkConfig.prototype.subnetwork = ""; - - /** - * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1.IAdditionalNodeNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig instance - */ - AdditionalNodeNetworkConfig.create = function create(properties) { - return new AdditionalNodeNetworkConfig(properties); - }; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalNodeNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - return writer; - }; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalNodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalNodeNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalNodeNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalNodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalNodeNetworkConfig message. - * @function verify - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalNodeNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - return null; - }; - - /** - * Creates an AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - */ - AdditionalNodeNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AdditionalNodeNetworkConfig) - return object; - var message = new $root.google.container.v1.AdditionalNodeNetworkConfig(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - return message; - }; - - /** - * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1.AdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalNodeNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.subnetwork = ""; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - return object; - }; - - /** - * Converts this AdditionalNodeNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalNodeNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalNodeNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1.AdditionalNodeNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalNodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AdditionalNodeNetworkConfig"; - }; - - return AdditionalNodeNetworkConfig; - })(); - - v1.AdditionalPodNetworkConfig = (function() { - - /** - * Properties of an AdditionalPodNetworkConfig. - * @memberof google.container.v1 - * @interface IAdditionalPodNetworkConfig - * @property {string|null} [subnetwork] AdditionalPodNetworkConfig subnetwork - * @property {string|null} [secondaryPodRange] AdditionalPodNetworkConfig secondaryPodRange - * @property {google.container.v1.IMaxPodsConstraint|null} [maxPodsPerNode] AdditionalPodNetworkConfig maxPodsPerNode - */ - - /** - * Constructs a new AdditionalPodNetworkConfig. - * @memberof google.container.v1 - * @classdesc Represents an AdditionalPodNetworkConfig. - * @implements IAdditionalPodNetworkConfig - * @constructor - * @param {google.container.v1.IAdditionalPodNetworkConfig=} [properties] Properties to set - */ - function AdditionalPodNetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalPodNetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.subnetwork = ""; - - /** - * AdditionalPodNetworkConfig secondaryPodRange. - * @member {string} secondaryPodRange - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.secondaryPodRange = ""; - - /** - * AdditionalPodNetworkConfig maxPodsPerNode. - * @member {google.container.v1.IMaxPodsConstraint|null|undefined} maxPodsPerNode - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.maxPodsPerNode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdditionalPodNetworkConfig _maxPodsPerNode. - * @member {"maxPodsPerNode"|undefined} _maxPodsPerNode - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @instance - */ - Object.defineProperty(AdditionalPodNetworkConfig.prototype, "_maxPodsPerNode", { - get: $util.oneOfGetter($oneOfFields = ["maxPodsPerNode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdditionalPodNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1.IAdditionalPodNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig instance - */ - AdditionalPodNetworkConfig.create = function create(properties) { - return new AdditionalPodNetworkConfig(properties); - }; - - /** - * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); - if (message.secondaryPodRange != null && Object.hasOwnProperty.call(message, "secondaryPodRange")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryPodRange); - if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) - $root.google.container.v1.MaxPodsConstraint.encode(message.maxPodsPerNode, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalPodNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.subnetwork = reader.string(); - break; - } - case 2: { - message.secondaryPodRange = reader.string(); - break; - } - case 3: { - message.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalPodNetworkConfig message. - * @function verify - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalPodNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) - if (!$util.isString(message.secondaryPodRange)) - return "secondaryPodRange: string expected"; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { - properties._maxPodsPerNode = 1; - { - var error = $root.google.container.v1.MaxPodsConstraint.verify(message.maxPodsPerNode); - if (error) - return "maxPodsPerNode." + error; - } - } - return null; - }; - - /** - * Creates an AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - */ - AdditionalPodNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AdditionalPodNetworkConfig) - return object; - var message = new $root.google.container.v1.AdditionalPodNetworkConfig(); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.secondaryPodRange != null) - message.secondaryPodRange = String(object.secondaryPodRange); - if (object.maxPodsPerNode != null) { - if (typeof object.maxPodsPerNode !== "object") - throw TypeError(".google.container.v1.AdditionalPodNetworkConfig.maxPodsPerNode: object expected"); - message.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.fromObject(object.maxPodsPerNode); - } - return message; - }; - - /** - * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1.AdditionalPodNetworkConfig} message AdditionalPodNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalPodNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.subnetwork = ""; - object.secondaryPodRange = ""; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) - object.secondaryPodRange = message.secondaryPodRange; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { - object.maxPodsPerNode = $root.google.container.v1.MaxPodsConstraint.toObject(message.maxPodsPerNode, options); - if (options.oneofs) - object._maxPodsPerNode = "maxPodsPerNode"; - } - return object; - }; - - /** - * Converts this AdditionalPodNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalPodNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalPodNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1.AdditionalPodNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalPodNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AdditionalPodNetworkConfig"; - }; - - return AdditionalPodNetworkConfig; - })(); - - v1.ShieldedInstanceConfig = (function() { - - /** - * Properties of a ShieldedInstanceConfig. - * @memberof google.container.v1 - * @interface IShieldedInstanceConfig - * @property {boolean|null} [enableSecureBoot] ShieldedInstanceConfig enableSecureBoot - * @property {boolean|null} [enableIntegrityMonitoring] ShieldedInstanceConfig enableIntegrityMonitoring - */ - - /** - * Constructs a new ShieldedInstanceConfig. - * @memberof google.container.v1 - * @classdesc Represents a ShieldedInstanceConfig. - * @implements IShieldedInstanceConfig - * @constructor - * @param {google.container.v1.IShieldedInstanceConfig=} [properties] Properties to set - */ - function ShieldedInstanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShieldedInstanceConfig enableSecureBoot. - * @member {boolean} enableSecureBoot - * @memberof google.container.v1.ShieldedInstanceConfig - * @instance - */ - ShieldedInstanceConfig.prototype.enableSecureBoot = false; - - /** - * ShieldedInstanceConfig enableIntegrityMonitoring. - * @member {boolean} enableIntegrityMonitoring - * @memberof google.container.v1.ShieldedInstanceConfig - * @instance - */ - ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = false; - - /** - * Creates a new ShieldedInstanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {google.container.v1.IShieldedInstanceConfig=} [properties] Properties to set - * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig instance - */ - ShieldedInstanceConfig.create = function create(properties) { - return new ShieldedInstanceConfig(properties); - }; - - /** - * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {google.container.v1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedInstanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableSecureBoot != null && Object.hasOwnProperty.call(message, "enableSecureBoot")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSecureBoot); - if (message.enableIntegrityMonitoring != null && Object.hasOwnProperty.call(message, "enableIntegrityMonitoring")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableIntegrityMonitoring); - return writer; - }; - - /** - * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1.ShieldedInstanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {google.container.v1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedInstanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ShieldedInstanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableSecureBoot = reader.bool(); - break; - } - case 2: { - message.enableIntegrityMonitoring = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedInstanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShieldedInstanceConfig message. - * @function verify - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShieldedInstanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) - if (typeof message.enableSecureBoot !== "boolean") - return "enableSecureBoot: boolean expected"; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) - if (typeof message.enableIntegrityMonitoring !== "boolean") - return "enableIntegrityMonitoring: boolean expected"; - return null; - }; - - /** - * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ShieldedInstanceConfig} ShieldedInstanceConfig - */ - ShieldedInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ShieldedInstanceConfig) - return object; - var message = new $root.google.container.v1.ShieldedInstanceConfig(); - if (object.enableSecureBoot != null) - message.enableSecureBoot = Boolean(object.enableSecureBoot); - if (object.enableIntegrityMonitoring != null) - message.enableIntegrityMonitoring = Boolean(object.enableIntegrityMonitoring); - return message; - }; - - /** - * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {google.container.v1.ShieldedInstanceConfig} message ShieldedInstanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShieldedInstanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableSecureBoot = false; - object.enableIntegrityMonitoring = false; - } - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) - object.enableSecureBoot = message.enableSecureBoot; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) - object.enableIntegrityMonitoring = message.enableIntegrityMonitoring; - return object; - }; - - /** - * Converts this ShieldedInstanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ShieldedInstanceConfig - * @instance - * @returns {Object.} JSON object - */ - ShieldedInstanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShieldedInstanceConfig - * @function getTypeUrl - * @memberof google.container.v1.ShieldedInstanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShieldedInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ShieldedInstanceConfig"; - }; - - return ShieldedInstanceConfig; - })(); - - v1.SandboxConfig = (function() { - - /** - * Properties of a SandboxConfig. - * @memberof google.container.v1 - * @interface ISandboxConfig - * @property {google.container.v1.SandboxConfig.Type|null} [type] SandboxConfig type - */ - - /** - * Constructs a new SandboxConfig. - * @memberof google.container.v1 - * @classdesc Represents a SandboxConfig. - * @implements ISandboxConfig - * @constructor - * @param {google.container.v1.ISandboxConfig=} [properties] Properties to set - */ - function SandboxConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SandboxConfig type. - * @member {google.container.v1.SandboxConfig.Type} type - * @memberof google.container.v1.SandboxConfig - * @instance - */ - SandboxConfig.prototype.type = 0; - - /** - * Creates a new SandboxConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.SandboxConfig - * @static - * @param {google.container.v1.ISandboxConfig=} [properties] Properties to set - * @returns {google.container.v1.SandboxConfig} SandboxConfig instance - */ - SandboxConfig.create = function create(properties) { - return new SandboxConfig(properties); - }; - - /** - * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SandboxConfig - * @static - * @param {google.container.v1.ISandboxConfig} message SandboxConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SandboxConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1.SandboxConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SandboxConfig - * @static - * @param {google.container.v1.ISandboxConfig} message SandboxConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SandboxConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SandboxConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SandboxConfig} SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SandboxConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SandboxConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SandboxConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SandboxConfig} SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SandboxConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SandboxConfig message. - * @function verify - * @memberof google.container.v1.SandboxConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SandboxConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SandboxConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SandboxConfig} SandboxConfig - */ - SandboxConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SandboxConfig) - return object; - var message = new $root.google.container.v1.SandboxConfig(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.type = 0; - break; - case "GVISOR": - case 1: - message.type = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SandboxConfig - * @static - * @param {google.container.v1.SandboxConfig} message SandboxConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SandboxConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = options.enums === String ? "UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1.SandboxConfig.Type[message.type] === undefined ? message.type : $root.google.container.v1.SandboxConfig.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this SandboxConfig to JSON. - * @function toJSON - * @memberof google.container.v1.SandboxConfig - * @instance - * @returns {Object.} JSON object - */ - SandboxConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SandboxConfig - * @function getTypeUrl - * @memberof google.container.v1.SandboxConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SandboxConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SandboxConfig"; - }; - - /** - * Type enum. - * @name google.container.v1.SandboxConfig.Type - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} GVISOR=1 GVISOR value - */ - SandboxConfig.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "GVISOR"] = 1; - return values; - })(); - - return SandboxConfig; - })(); - - v1.GcfsConfig = (function() { - - /** - * Properties of a GcfsConfig. - * @memberof google.container.v1 - * @interface IGcfsConfig - * @property {boolean|null} [enabled] GcfsConfig enabled - */ - - /** - * Constructs a new GcfsConfig. - * @memberof google.container.v1 - * @classdesc Represents a GcfsConfig. - * @implements IGcfsConfig - * @constructor - * @param {google.container.v1.IGcfsConfig=} [properties] Properties to set - */ - function GcfsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcfsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.GcfsConfig - * @instance - */ - GcfsConfig.prototype.enabled = false; - - /** - * Creates a new GcfsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GcfsConfig - * @static - * @param {google.container.v1.IGcfsConfig=} [properties] Properties to set - * @returns {google.container.v1.GcfsConfig} GcfsConfig instance - */ - GcfsConfig.create = function create(properties) { - return new GcfsConfig(properties); - }; - - /** - * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GcfsConfig - * @static - * @param {google.container.v1.IGcfsConfig} message GcfsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcfsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1.GcfsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GcfsConfig - * @static - * @param {google.container.v1.IGcfsConfig} message GcfsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcfsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GcfsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GcfsConfig} GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcfsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcfsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GcfsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GcfsConfig} GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcfsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcfsConfig message. - * @function verify - * @memberof google.container.v1.GcfsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcfsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GcfsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GcfsConfig} GcfsConfig - */ - GcfsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GcfsConfig) - return object; - var message = new $root.google.container.v1.GcfsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GcfsConfig - * @static - * @param {google.container.v1.GcfsConfig} message GcfsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcfsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcfsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GcfsConfig - * @instance - * @returns {Object.} JSON object - */ - GcfsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcfsConfig - * @function getTypeUrl - * @memberof google.container.v1.GcfsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcfsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GcfsConfig"; - }; - - return GcfsConfig; - })(); - - v1.ReservationAffinity = (function() { - - /** - * Properties of a ReservationAffinity. - * @memberof google.container.v1 - * @interface IReservationAffinity - * @property {google.container.v1.ReservationAffinity.Type|null} [consumeReservationType] ReservationAffinity consumeReservationType - * @property {string|null} [key] ReservationAffinity key - * @property {Array.|null} [values] ReservationAffinity values - */ - - /** - * Constructs a new ReservationAffinity. - * @memberof google.container.v1 - * @classdesc Represents a ReservationAffinity. - * @implements IReservationAffinity - * @constructor - * @param {google.container.v1.IReservationAffinity=} [properties] Properties to set - */ - function ReservationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservationAffinity consumeReservationType. - * @member {google.container.v1.ReservationAffinity.Type} consumeReservationType - * @memberof google.container.v1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.consumeReservationType = 0; - - /** - * ReservationAffinity key. - * @member {string} key - * @memberof google.container.v1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.key = ""; - - /** - * ReservationAffinity values. - * @member {Array.} values - * @memberof google.container.v1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.values = $util.emptyArray; - - /** - * Creates a new ReservationAffinity instance using the specified properties. - * @function create - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {google.container.v1.IReservationAffinity=} [properties] Properties to set - * @returns {google.container.v1.ReservationAffinity} ReservationAffinity instance - */ - ReservationAffinity.create = function create(properties) { - return new ReservationAffinity(properties); - }; - - /** - * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {google.container.v1.IReservationAffinity} message ReservationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeReservationType != null && Object.hasOwnProperty.call(message, "consumeReservationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeReservationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1.ReservationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {google.container.v1.IReservationAffinity} message ReservationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ReservationAffinity} ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservationAffinity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ReservationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeReservationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ReservationAffinity} ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservationAffinity message. - * @function verify - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) - switch (message.consumeReservationType) { - default: - return "consumeReservationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ReservationAffinity} ReservationAffinity - */ - ReservationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ReservationAffinity) - return object; - var message = new $root.google.container.v1.ReservationAffinity(); - switch (object.consumeReservationType) { - default: - if (typeof object.consumeReservationType === "number") { - message.consumeReservationType = object.consumeReservationType; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.consumeReservationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeReservationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeReservationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeReservationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.container.v1.ReservationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {google.container.v1.ReservationAffinity} message ReservationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.consumeReservationType = options.enums === String ? "UNSPECIFIED" : 0; - object.key = ""; - } - if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) - object.consumeReservationType = options.enums === String ? $root.google.container.v1.ReservationAffinity.Type[message.consumeReservationType] === undefined ? message.consumeReservationType : $root.google.container.v1.ReservationAffinity.Type[message.consumeReservationType] : message.consumeReservationType; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this ReservationAffinity to JSON. - * @function toJSON - * @memberof google.container.v1.ReservationAffinity - * @instance - * @returns {Object.} JSON object - */ - ReservationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservationAffinity - * @function getTypeUrl - * @memberof google.container.v1.ReservationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ReservationAffinity"; - }; - - /** - * Type enum. - * @name google.container.v1.ReservationAffinity.Type - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - ReservationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return ReservationAffinity; - })(); - - v1.SoleTenantConfig = (function() { - - /** - * Properties of a SoleTenantConfig. - * @memberof google.container.v1 - * @interface ISoleTenantConfig - * @property {Array.|null} [nodeAffinities] SoleTenantConfig nodeAffinities - */ - - /** - * Constructs a new SoleTenantConfig. - * @memberof google.container.v1 - * @classdesc Represents a SoleTenantConfig. - * @implements ISoleTenantConfig - * @constructor - * @param {google.container.v1.ISoleTenantConfig=} [properties] Properties to set - */ - function SoleTenantConfig(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SoleTenantConfig nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.container.v1.SoleTenantConfig - * @instance - */ - SoleTenantConfig.prototype.nodeAffinities = $util.emptyArray; - - /** - * Creates a new SoleTenantConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {google.container.v1.ISoleTenantConfig=} [properties] Properties to set - * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig instance - */ - SoleTenantConfig.create = function create(properties) { - return new SoleTenantConfig(properties); - }; - - /** - * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {google.container.v1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoleTenantConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.container.v1.SoleTenantConfig.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {google.container.v1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoleTenantConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoleTenantConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SoleTenantConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.container.v1.SoleTenantConfig.NodeAffinity.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoleTenantConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SoleTenantConfig message. - * @function verify - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoleTenantConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.container.v1.SoleTenantConfig.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - return null; - }; - - /** - * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SoleTenantConfig} SoleTenantConfig - */ - SoleTenantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SoleTenantConfig) - return object; - var message = new $root.google.container.v1.SoleTenantConfig(); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.container.v1.SoleTenantConfig.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.container.v1.SoleTenantConfig.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {google.container.v1.SoleTenantConfig} message SoleTenantConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoleTenantConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - return object; - }; - - /** - * Converts this SoleTenantConfig to JSON. - * @function toJSON - * @memberof google.container.v1.SoleTenantConfig - * @instance - * @returns {Object.} JSON object - */ - SoleTenantConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SoleTenantConfig - * @function getTypeUrl - * @memberof google.container.v1.SoleTenantConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SoleTenantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SoleTenantConfig"; - }; - - SoleTenantConfig.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.container.v1.SoleTenantConfig - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.container.v1.SoleTenantConfig.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.container.v1.SoleTenantConfig - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.container.v1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string} key - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = ""; - - /** - * NodeAffinity operator. - * @member {google.container.v1.SoleTenantConfig.NodeAffinity.Operator} operator - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = 0; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set - * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.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.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SoleTenantConfig.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.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.operator != null && message.hasOwnProperty("operator")) - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SoleTenantConfig.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SoleTenantConfig.NodeAffinity) - return object; - var message = new $root.google.container.v1.SoleTenantConfig.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.container.v1.SoleTenantConfig.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1.SoleTenantConfig.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.key = ""; - object.operator = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.operator != null && message.hasOwnProperty("operator")) - object.operator = options.enums === String ? $root.google.container.v1.SoleTenantConfig.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.container.v1.SoleTenantConfig.NodeAffinity.Operator[message.operator] : message.operator; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.container.v1.SoleTenantConfig.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SoleTenantConfig.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.container.v1.SoleTenantConfig.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - return SoleTenantConfig; - })(); - - v1.ContainerdConfig = (function() { - - /** - * Properties of a ContainerdConfig. - * @memberof google.container.v1 - * @interface IContainerdConfig - * @property {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null} [privateRegistryAccessConfig] ContainerdConfig privateRegistryAccessConfig - */ - - /** - * Constructs a new ContainerdConfig. - * @memberof google.container.v1 - * @classdesc Represents a ContainerdConfig. - * @implements IContainerdConfig - * @constructor - * @param {google.container.v1.IContainerdConfig=} [properties] Properties to set - */ - function ContainerdConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContainerdConfig privateRegistryAccessConfig. - * @member {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig|null|undefined} privateRegistryAccessConfig - * @memberof google.container.v1.ContainerdConfig - * @instance - */ - ContainerdConfig.prototype.privateRegistryAccessConfig = null; - - /** - * Creates a new ContainerdConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {google.container.v1.IContainerdConfig=} [properties] Properties to set - * @returns {google.container.v1.ContainerdConfig} ContainerdConfig instance - */ - ContainerdConfig.create = function create(properties) { - return new ContainerdConfig(properties); - }; - - /** - * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {google.container.v1.IContainerdConfig} message ContainerdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerdConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateRegistryAccessConfig != null && Object.hasOwnProperty.call(message, "privateRegistryAccessConfig")) - $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.encode(message.privateRegistryAccessConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {google.container.v1.IContainerdConfig} message ContainerdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerdConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ContainerdConfig} ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerdConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ContainerdConfig} ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerdConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContainerdConfig message. - * @function verify - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContainerdConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) { - var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify(message.privateRegistryAccessConfig); - if (error) - return "privateRegistryAccessConfig." + error; - } - return null; - }; - - /** - * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ContainerdConfig} ContainerdConfig - */ - ContainerdConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ContainerdConfig) - return object; - var message = new $root.google.container.v1.ContainerdConfig(); - if (object.privateRegistryAccessConfig != null) { - if (typeof object.privateRegistryAccessConfig !== "object") - throw TypeError(".google.container.v1.ContainerdConfig.privateRegistryAccessConfig: object expected"); - message.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.fromObject(object.privateRegistryAccessConfig); - } - return message; - }; - - /** - * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {google.container.v1.ContainerdConfig} message ContainerdConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContainerdConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.privateRegistryAccessConfig = null; - if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) - object.privateRegistryAccessConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.toObject(message.privateRegistryAccessConfig, options); - return object; - }; - - /** - * Converts this ContainerdConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ContainerdConfig - * @instance - * @returns {Object.} JSON object - */ - ContainerdConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContainerdConfig - * @function getTypeUrl - * @memberof google.container.v1.ContainerdConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContainerdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ContainerdConfig"; - }; - - ContainerdConfig.PrivateRegistryAccessConfig = (function() { - - /** - * Properties of a PrivateRegistryAccessConfig. - * @memberof google.container.v1.ContainerdConfig - * @interface IPrivateRegistryAccessConfig - * @property {boolean|null} [enabled] PrivateRegistryAccessConfig enabled - * @property {Array.|null} [certificateAuthorityDomainConfig] PrivateRegistryAccessConfig certificateAuthorityDomainConfig - */ - - /** - * Constructs a new PrivateRegistryAccessConfig. - * @memberof google.container.v1.ContainerdConfig - * @classdesc Represents a PrivateRegistryAccessConfig. - * @implements IPrivateRegistryAccessConfig - * @constructor - * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set - */ - function PrivateRegistryAccessConfig(properties) { - this.certificateAuthorityDomainConfig = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateRegistryAccessConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - */ - PrivateRegistryAccessConfig.prototype.enabled = false; - - /** - * PrivateRegistryAccessConfig certificateAuthorityDomainConfig. - * @member {Array.} certificateAuthorityDomainConfig - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - */ - PrivateRegistryAccessConfig.prototype.certificateAuthorityDomainConfig = $util.emptyArray; - - /** - * Creates a new PrivateRegistryAccessConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig instance - */ - PrivateRegistryAccessConfig.create = function create(properties) { - return new PrivateRegistryAccessConfig(properties); - }; - - /** - * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateRegistryAccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.certificateAuthorityDomainConfig != null && message.certificateAuthorityDomainConfig.length) - for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) - $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.encode(message.certificateAuthorityDomainConfig[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateRegistryAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateRegistryAccessConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length)) - message.certificateAuthorityDomainConfig = []; - message.certificateAuthorityDomainConfig.push($root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateRegistryAccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateRegistryAccessConfig message. - * @function verify - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateRegistryAccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.certificateAuthorityDomainConfig != null && message.hasOwnProperty("certificateAuthorityDomainConfig")) { - if (!Array.isArray(message.certificateAuthorityDomainConfig)) - return "certificateAuthorityDomainConfig: array expected"; - for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) { - var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify(message.certificateAuthorityDomainConfig[i]); - if (error) - return "certificateAuthorityDomainConfig." + error; - } - } - return null; - }; - - /** - * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - */ - PrivateRegistryAccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig) - return object; - var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.certificateAuthorityDomainConfig) { - if (!Array.isArray(object.certificateAuthorityDomainConfig)) - throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: array expected"); - message.certificateAuthorityDomainConfig = []; - for (var i = 0; i < object.certificateAuthorityDomainConfig.length; ++i) { - if (typeof object.certificateAuthorityDomainConfig[i] !== "object") - throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: object expected"); - message.certificateAuthorityDomainConfig[i] = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fromObject(object.certificateAuthorityDomainConfig[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig} message PrivateRegistryAccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateRegistryAccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.certificateAuthorityDomainConfig = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length) { - object.certificateAuthorityDomainConfig = []; - for (var j = 0; j < message.certificateAuthorityDomainConfig.length; ++j) - object.certificateAuthorityDomainConfig[j] = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.toObject(message.certificateAuthorityDomainConfig[j], options); - } - return object; - }; - - /** - * Converts this PrivateRegistryAccessConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateRegistryAccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateRegistryAccessConfig - * @function getTypeUrl - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateRegistryAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig"; - }; - - PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig = (function() { - - /** - * Properties of a CertificateAuthorityDomainConfig. - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @interface ICertificateAuthorityDomainConfig - * @property {Array.|null} [fqdns] CertificateAuthorityDomainConfig fqdns - * @property {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null} [gcpSecretManagerCertificateConfig] CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig - */ - - /** - * Constructs a new CertificateAuthorityDomainConfig. - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig - * @classdesc Represents a CertificateAuthorityDomainConfig. - * @implements ICertificateAuthorityDomainConfig - * @constructor - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set - */ - function CertificateAuthorityDomainConfig(properties) { - this.fqdns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CertificateAuthorityDomainConfig fqdns. - * @member {Array.} fqdns - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - CertificateAuthorityDomainConfig.prototype.fqdns = $util.emptyArray; - - /** - * CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. - * @member {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null|undefined} gcpSecretManagerCertificateConfig - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - CertificateAuthorityDomainConfig.prototype.gcpSecretManagerCertificateConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CertificateAuthorityDomainConfig certificateConfig. - * @member {"gcpSecretManagerCertificateConfig"|undefined} certificateConfig - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - Object.defineProperty(CertificateAuthorityDomainConfig.prototype, "certificateConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpSecretManagerCertificateConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig instance - */ - CertificateAuthorityDomainConfig.create = function create(properties) { - return new CertificateAuthorityDomainConfig(properties); - }; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertificateAuthorityDomainConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fqdns != null && message.fqdns.length) - for (var i = 0; i < message.fqdns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fqdns[i]); - if (message.gcpSecretManagerCertificateConfig != null && Object.hasOwnProperty.call(message, "gcpSecretManagerCertificateConfig")) - $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.encode(message.gcpSecretManagerCertificateConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertificateAuthorityDomainConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertificateAuthorityDomainConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fqdns && message.fqdns.length)) - message.fqdns = []; - message.fqdns.push(reader.string()); - break; - } - case 2: { - message.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertificateAuthorityDomainConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CertificateAuthorityDomainConfig message. - * @function verify - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CertificateAuthorityDomainConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fqdns != null && message.hasOwnProperty("fqdns")) { - if (!Array.isArray(message.fqdns)) - return "fqdns: array expected"; - for (var i = 0; i < message.fqdns.length; ++i) - if (!$util.isString(message.fqdns[i])) - return "fqdns: string[] expected"; - } - if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { - properties.certificateConfig = 1; - { - var error = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify(message.gcpSecretManagerCertificateConfig); - if (error) - return "gcpSecretManagerCertificateConfig." + error; - } - } - return null; - }; - - /** - * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - */ - CertificateAuthorityDomainConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) - return object; - var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); - if (object.fqdns) { - if (!Array.isArray(object.fqdns)) - throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fqdns: array expected"); - message.fqdns = []; - for (var i = 0; i < object.fqdns.length; ++i) - message.fqdns[i] = String(object.fqdns[i]); - } - if (object.gcpSecretManagerCertificateConfig != null) { - if (typeof object.gcpSecretManagerCertificateConfig !== "object") - throw TypeError(".google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig: object expected"); - message.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.fromObject(object.gcpSecretManagerCertificateConfig); - } - return message; - }; - - /** - * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CertificateAuthorityDomainConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fqdns = []; - if (message.fqdns && message.fqdns.length) { - object.fqdns = []; - for (var j = 0; j < message.fqdns.length; ++j) - object.fqdns[j] = message.fqdns[j]; - } - if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { - object.gcpSecretManagerCertificateConfig = $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.toObject(message.gcpSecretManagerCertificateConfig, options); - if (options.oneofs) - object.certificateConfig = "gcpSecretManagerCertificateConfig"; - } - return object; - }; - - /** - * Converts this CertificateAuthorityDomainConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - * @returns {Object.} JSON object - */ - CertificateAuthorityDomainConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CertificateAuthorityDomainConfig - * @function getTypeUrl - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CertificateAuthorityDomainConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"; - }; - - CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig = (function() { - - /** - * Properties of a GCPSecretManagerCertificateConfig. - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @interface IGCPSecretManagerCertificateConfig - * @property {string|null} [secretUri] GCPSecretManagerCertificateConfig secretUri - */ - - /** - * Constructs a new GCPSecretManagerCertificateConfig. - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @classdesc Represents a GCPSecretManagerCertificateConfig. - * @implements IGCPSecretManagerCertificateConfig - * @constructor - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set - */ - function GCPSecretManagerCertificateConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GCPSecretManagerCertificateConfig secretUri. - * @member {string} secretUri - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @instance - */ - GCPSecretManagerCertificateConfig.prototype.secretUri = ""; - - /** - * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig instance - */ - GCPSecretManagerCertificateConfig.create = function create(properties) { - return new GCPSecretManagerCertificateConfig(properties); - }; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPSecretManagerCertificateConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.secretUri != null && Object.hasOwnProperty.call(message, "secretUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretUri); - return writer; - }; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPSecretManagerCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPSecretManagerCertificateConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.secretUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPSecretManagerCertificateConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GCPSecretManagerCertificateConfig message. - * @function verify - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPSecretManagerCertificateConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.secretUri != null && message.hasOwnProperty("secretUri")) - if (!$util.isString(message.secretUri)) - return "secretUri: string expected"; - return null; - }; - - /** - * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - */ - GCPSecretManagerCertificateConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) - return object; - var message = new $root.google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); - if (object.secretUri != null) - message.secretUri = String(object.secretUri); - return message; - }; - - /** - * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPSecretManagerCertificateConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.secretUri = ""; - if (message.secretUri != null && message.hasOwnProperty("secretUri")) - object.secretUri = message.secretUri; - return object; - }; - - /** - * Converts this GCPSecretManagerCertificateConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @instance - * @returns {Object.} JSON object - */ - GCPSecretManagerCertificateConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GCPSecretManagerCertificateConfig - * @function getTypeUrl - * @memberof google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPSecretManagerCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"; - }; - - return GCPSecretManagerCertificateConfig; - })(); - - return CertificateAuthorityDomainConfig; - })(); - - return PrivateRegistryAccessConfig; - })(); - - return ContainerdConfig; - })(); - - v1.NodeTaint = (function() { - - /** - * Properties of a NodeTaint. - * @memberof google.container.v1 - * @interface INodeTaint - * @property {string|null} [key] NodeTaint key - * @property {string|null} [value] NodeTaint value - * @property {google.container.v1.NodeTaint.Effect|null} [effect] NodeTaint effect - */ - - /** - * Constructs a new NodeTaint. - * @memberof google.container.v1 - * @classdesc Represents a NodeTaint. - * @implements INodeTaint - * @constructor - * @param {google.container.v1.INodeTaint=} [properties] Properties to set - */ - function NodeTaint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeTaint key. - * @member {string} key - * @memberof google.container.v1.NodeTaint - * @instance - */ - NodeTaint.prototype.key = ""; - - /** - * NodeTaint value. - * @member {string} value - * @memberof google.container.v1.NodeTaint - * @instance - */ - NodeTaint.prototype.value = ""; - - /** - * NodeTaint effect. - * @member {google.container.v1.NodeTaint.Effect} effect - * @memberof google.container.v1.NodeTaint - * @instance - */ - NodeTaint.prototype.effect = 0; - - /** - * Creates a new NodeTaint instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeTaint - * @static - * @param {google.container.v1.INodeTaint=} [properties] Properties to set - * @returns {google.container.v1.NodeTaint} NodeTaint instance - */ - NodeTaint.create = function create(properties) { - return new NodeTaint(properties); - }; - - /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1.NodeTaint.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeTaint - * @static - * @param {google.container.v1.INodeTaint} message NodeTaint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaint.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); - return writer; - }; - - /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1.NodeTaint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeTaint - * @static - * @param {google.container.v1.INodeTaint} message NodeTaint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeTaint message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeTaint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeTaint} NodeTaint - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeTaint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.effect = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeTaint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeTaint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeTaint} NodeTaint - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeTaint message. - * @function verify - * @memberof google.container.v1.NodeTaint - * @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) { - 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; - } - return null; - }; - - /** - * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeTaint - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeTaint} NodeTaint - */ - NodeTaint.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeTaint) - return object; - var message = new $root.google.container.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; - } - return message; - }; - - /** - * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeTaint - * @static - * @param {google.container.v1.NodeTaint} message NodeTaint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeTaint.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; - } - 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.container.v1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.container.v1.NodeTaint.Effect[message.effect] : message.effect; - return object; - }; - - /** - * Converts this NodeTaint to JSON. - * @function toJSON - * @memberof google.container.v1.NodeTaint - * @instance - * @returns {Object.} JSON object - */ - NodeTaint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeTaint - * @function getTypeUrl - * @memberof google.container.v1.NodeTaint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeTaint"; - }; - - /** - * Effect enum. - * @name google.container.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.NodeTaints = (function() { - - /** - * Properties of a NodeTaints. - * @memberof google.container.v1 - * @interface INodeTaints - * @property {Array.|null} [taints] NodeTaints taints - */ - - /** - * Constructs a new NodeTaints. - * @memberof google.container.v1 - * @classdesc Represents a NodeTaints. - * @implements INodeTaints - * @constructor - * @param {google.container.v1.INodeTaints=} [properties] Properties to set - */ - function NodeTaints(properties) { - this.taints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeTaints taints. - * @member {Array.} taints - * @memberof google.container.v1.NodeTaints - * @instance - */ - NodeTaints.prototype.taints = $util.emptyArray; - - /** - * Creates a new NodeTaints instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeTaints - * @static - * @param {google.container.v1.INodeTaints=} [properties] Properties to set - * @returns {google.container.v1.NodeTaints} NodeTaints instance - */ - NodeTaints.create = function create(properties) { - return new NodeTaints(properties); - }; - - /** - * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeTaints - * @static - * @param {google.container.v1.INodeTaints} message NodeTaints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.container.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1.NodeTaints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeTaints - * @static - * @param {google.container.v1.INodeTaints} message NodeTaints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeTaints message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeTaints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeTaints} NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeTaints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeTaints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.container.v1.NodeTaint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeTaints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeTaints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeTaints} NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeTaints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeTaints message. - * @function verify - * @memberof google.container.v1.NodeTaints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeTaints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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.container.v1.NodeTaint.verify(message.taints[i]); - if (error) - return "taints." + error; - } - } - return null; - }; - - /** - * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeTaints - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeTaints} NodeTaints - */ - NodeTaints.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeTaints) - return object; - var message = new $root.google.container.v1.NodeTaints(); - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.container.v1.NodeTaints.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.container.v1.NodeTaints.taints: object expected"); - message.taints[i] = $root.google.container.v1.NodeTaint.fromObject(object.taints[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeTaints - * @static - * @param {google.container.v1.NodeTaints} message NodeTaints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeTaints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taints = []; - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.container.v1.NodeTaint.toObject(message.taints[j], options); - } - return object; - }; - - /** - * Converts this NodeTaints to JSON. - * @function toJSON - * @memberof google.container.v1.NodeTaints - * @instance - * @returns {Object.} JSON object - */ - NodeTaints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeTaints - * @function getTypeUrl - * @memberof google.container.v1.NodeTaints - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeTaints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeTaints"; - }; - - return NodeTaints; - })(); - - v1.NodeLabels = (function() { - - /** - * Properties of a NodeLabels. - * @memberof google.container.v1 - * @interface INodeLabels - * @property {Object.|null} [labels] NodeLabels labels - */ - - /** - * Constructs a new NodeLabels. - * @memberof google.container.v1 - * @classdesc Represents a NodeLabels. - * @implements INodeLabels - * @constructor - * @param {google.container.v1.INodeLabels=} [properties] Properties to set - */ - function NodeLabels(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeLabels labels. - * @member {Object.} labels - * @memberof google.container.v1.NodeLabels - * @instance - */ - NodeLabels.prototype.labels = $util.emptyObject; - - /** - * Creates a new NodeLabels instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeLabels - * @static - * @param {google.container.v1.INodeLabels=} [properties] Properties to set - * @returns {google.container.v1.NodeLabels} NodeLabels instance - */ - NodeLabels.create = function create(properties) { - return new NodeLabels(properties); - }; - - /** - * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeLabels - * @static - * @param {google.container.v1.INodeLabels} message NodeLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeLabels.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1.NodeLabels.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeLabels - * @static - * @param {google.container.v1.INodeLabels} message NodeLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeLabels.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeLabels message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeLabels} NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeLabels.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeLabels(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeLabels message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeLabels} NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeLabels.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeLabels message. - * @function verify - * @memberof google.container.v1.NodeLabels - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeLabels.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeLabels - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeLabels} NodeLabels - */ - NodeLabels.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeLabels) - return object; - var message = new $root.google.container.v1.NodeLabels(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1.NodeLabels.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 a NodeLabels message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeLabels - * @static - * @param {google.container.v1.NodeLabels} message NodeLabels - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeLabels.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this NodeLabels to JSON. - * @function toJSON - * @memberof google.container.v1.NodeLabels - * @instance - * @returns {Object.} JSON object - */ - NodeLabels.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeLabels - * @function getTypeUrl - * @memberof google.container.v1.NodeLabels - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeLabels"; - }; - - return NodeLabels; - })(); - - v1.ResourceLabels = (function() { - - /** - * Properties of a ResourceLabels. - * @memberof google.container.v1 - * @interface IResourceLabels - * @property {Object.|null} [labels] ResourceLabels labels - */ - - /** - * Constructs a new ResourceLabels. - * @memberof google.container.v1 - * @classdesc Represents a ResourceLabels. - * @implements IResourceLabels - * @constructor - * @param {google.container.v1.IResourceLabels=} [properties] Properties to set - */ - function ResourceLabels(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceLabels labels. - * @member {Object.} labels - * @memberof google.container.v1.ResourceLabels - * @instance - */ - ResourceLabels.prototype.labels = $util.emptyObject; - - /** - * Creates a new ResourceLabels instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceLabels - * @static - * @param {google.container.v1.IResourceLabels=} [properties] Properties to set - * @returns {google.container.v1.ResourceLabels} ResourceLabels instance - */ - ResourceLabels.create = function create(properties) { - return new ResourceLabels(properties); - }; - - /** - * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceLabels - * @static - * @param {google.container.v1.IResourceLabels} message ResourceLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLabels.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1.ResourceLabels.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceLabels - * @static - * @param {google.container.v1.IResourceLabels} message ResourceLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLabels.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceLabels} ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLabels.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceLabels(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceLabels} ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLabels.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceLabels message. - * @function verify - * @memberof google.container.v1.ResourceLabels - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceLabels.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceLabels - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceLabels} ResourceLabels - */ - ResourceLabels.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceLabels) - return object; - var message = new $root.google.container.v1.ResourceLabels(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1.ResourceLabels.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 a ResourceLabels message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceLabels - * @static - * @param {google.container.v1.ResourceLabels} message ResourceLabels - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceLabels.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this ResourceLabels to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceLabels - * @instance - * @returns {Object.} JSON object - */ - ResourceLabels.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceLabels - * @function getTypeUrl - * @memberof google.container.v1.ResourceLabels - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceLabels"; - }; - - return ResourceLabels; - })(); - - v1.NetworkTags = (function() { - - /** - * Properties of a NetworkTags. - * @memberof google.container.v1 - * @interface INetworkTags - * @property {Array.|null} [tags] NetworkTags tags - */ - - /** - * Constructs a new NetworkTags. - * @memberof google.container.v1 - * @classdesc Represents a NetworkTags. - * @implements INetworkTags - * @constructor - * @param {google.container.v1.INetworkTags=} [properties] Properties to set - */ - function NetworkTags(properties) { - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkTags tags. - * @member {Array.} tags - * @memberof google.container.v1.NetworkTags - * @instance - */ - NetworkTags.prototype.tags = $util.emptyArray; - - /** - * Creates a new NetworkTags instance using the specified properties. - * @function create - * @memberof google.container.v1.NetworkTags - * @static - * @param {google.container.v1.INetworkTags=} [properties] Properties to set - * @returns {google.container.v1.NetworkTags} NetworkTags instance - */ - NetworkTags.create = function create(properties) { - return new NetworkTags(properties); - }; - - /** - * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NetworkTags - * @static - * @param {google.container.v1.INetworkTags} message NetworkTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkTags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tags[i]); - return writer; - }; - - /** - * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1.NetworkTags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NetworkTags - * @static - * @param {google.container.v1.INetworkTags} message NetworkTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkTags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkTags message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NetworkTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NetworkTags} NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkTags.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkTags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkTags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NetworkTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NetworkTags} NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkTags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkTags message. - * @function verify - * @memberof google.container.v1.NetworkTags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkTags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - return null; - }; - - /** - * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NetworkTags - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NetworkTags} NetworkTags - */ - NetworkTags.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NetworkTags) - return object; - var message = new $root.google.container.v1.NetworkTags(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.container.v1.NetworkTags.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - return message; - }; - - /** - * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NetworkTags - * @static - * @param {google.container.v1.NetworkTags} message NetworkTags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkTags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - return object; - }; - - /** - * Converts this NetworkTags to JSON. - * @function toJSON - * @memberof google.container.v1.NetworkTags - * @instance - * @returns {Object.} JSON object - */ - NetworkTags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkTags - * @function getTypeUrl - * @memberof google.container.v1.NetworkTags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NetworkTags"; - }; - - return NetworkTags; - })(); - - v1.MasterAuth = (function() { - - /** - * Properties of a MasterAuth. - * @memberof google.container.v1 - * @interface IMasterAuth - * @property {string|null} [username] MasterAuth username - * @property {string|null} [password] MasterAuth password - * @property {google.container.v1.IClientCertificateConfig|null} [clientCertificateConfig] MasterAuth clientCertificateConfig - * @property {string|null} [clusterCaCertificate] MasterAuth clusterCaCertificate - * @property {string|null} [clientCertificate] MasterAuth clientCertificate - * @property {string|null} [clientKey] MasterAuth clientKey - */ - - /** - * Constructs a new MasterAuth. - * @memberof google.container.v1 - * @classdesc Represents a MasterAuth. - * @implements IMasterAuth - * @constructor - * @param {google.container.v1.IMasterAuth=} [properties] Properties to set - */ - function MasterAuth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuth username. - * @member {string} username - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.username = ""; - - /** - * MasterAuth password. - * @member {string} password - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.password = ""; - - /** - * MasterAuth clientCertificateConfig. - * @member {google.container.v1.IClientCertificateConfig|null|undefined} clientCertificateConfig - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientCertificateConfig = null; - - /** - * MasterAuth clusterCaCertificate. - * @member {string} clusterCaCertificate - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.clusterCaCertificate = ""; - - /** - * MasterAuth clientCertificate. - * @member {string} clientCertificate - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientCertificate = ""; - - /** - * MasterAuth clientKey. - * @member {string} clientKey - * @memberof google.container.v1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientKey = ""; - - /** - * Creates a new MasterAuth instance using the specified properties. - * @function create - * @memberof google.container.v1.MasterAuth - * @static - * @param {google.container.v1.IMasterAuth=} [properties] Properties to set - * @returns {google.container.v1.MasterAuth} MasterAuth instance - */ - MasterAuth.create = function create(properties) { - return new MasterAuth(properties); - }; - - /** - * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MasterAuth - * @static - * @param {google.container.v1.IMasterAuth} message MasterAuth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuth.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.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); - if (message.clientCertificateConfig != null && Object.hasOwnProperty.call(message, "clientCertificateConfig")) - $root.google.container.v1.ClientCertificateConfig.encode(message.clientCertificateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.clusterCaCertificate); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.clientCertificate); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.clientKey); - return writer; - }; - - /** - * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1.MasterAuth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MasterAuth - * @static - * @param {google.container.v1.IMasterAuth} message MasterAuth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuth message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MasterAuth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MasterAuth} MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuth.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.username = reader.string(); - break; - } - case 2: { - message.password = reader.string(); - break; - } - case 3: { - message.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.clusterCaCertificate = reader.string(); - break; - } - case 101: { - message.clientCertificate = reader.string(); - break; - } - case 102: { - message.clientKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MasterAuth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MasterAuth} MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuth message. - * @function verify - * @memberof google.container.v1.MasterAuth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuth.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.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) { - var error = $root.google.container.v1.ClientCertificateConfig.verify(message.clientCertificateConfig); - if (error) - return "clientCertificateConfig." + error; - } - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - if (!$util.isString(message.clusterCaCertificate)) - return "clusterCaCertificate: string expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - return null; - }; - - /** - * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MasterAuth - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MasterAuth} MasterAuth - */ - MasterAuth.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MasterAuth) - return object; - var message = new $root.google.container.v1.MasterAuth(); - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.clientCertificateConfig != null) { - if (typeof object.clientCertificateConfig !== "object") - throw TypeError(".google.container.v1.MasterAuth.clientCertificateConfig: object expected"); - message.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.fromObject(object.clientCertificateConfig); - } - if (object.clusterCaCertificate != null) - message.clusterCaCertificate = String(object.clusterCaCertificate); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - return message; - }; - - /** - * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MasterAuth - * @static - * @param {google.container.v1.MasterAuth} message MasterAuth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.username = ""; - object.password = ""; - object.clientCertificateConfig = null; - object.clusterCaCertificate = ""; - object.clientCertificate = ""; - object.clientKey = ""; - } - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) - object.clientCertificateConfig = $root.google.container.v1.ClientCertificateConfig.toObject(message.clientCertificateConfig, options); - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - object.clusterCaCertificate = message.clusterCaCertificate; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - return object; - }; - - /** - * Converts this MasterAuth to JSON. - * @function toJSON - * @memberof google.container.v1.MasterAuth - * @instance - * @returns {Object.} JSON object - */ - MasterAuth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuth - * @function getTypeUrl - * @memberof google.container.v1.MasterAuth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MasterAuth"; - }; - - return MasterAuth; - })(); - - v1.ClientCertificateConfig = (function() { - - /** - * Properties of a ClientCertificateConfig. - * @memberof google.container.v1 - * @interface IClientCertificateConfig - * @property {boolean|null} [issueClientCertificate] ClientCertificateConfig issueClientCertificate - */ - - /** - * Constructs a new ClientCertificateConfig. - * @memberof google.container.v1 - * @classdesc Represents a ClientCertificateConfig. - * @implements IClientCertificateConfig - * @constructor - * @param {google.container.v1.IClientCertificateConfig=} [properties] Properties to set - */ - function ClientCertificateConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientCertificateConfig issueClientCertificate. - * @member {boolean} issueClientCertificate - * @memberof google.container.v1.ClientCertificateConfig - * @instance - */ - ClientCertificateConfig.prototype.issueClientCertificate = false; - - /** - * Creates a new ClientCertificateConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {google.container.v1.IClientCertificateConfig=} [properties] Properties to set - * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig instance - */ - ClientCertificateConfig.create = function create(properties) { - return new ClientCertificateConfig(properties); - }; - - /** - * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {google.container.v1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientCertificateConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issueClientCertificate != null && Object.hasOwnProperty.call(message, "issueClientCertificate")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.issueClientCertificate); - return writer; - }; - - /** - * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1.ClientCertificateConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {google.container.v1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientCertificateConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClientCertificateConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issueClientCertificate = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientCertificateConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientCertificateConfig message. - * @function verify - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientCertificateConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) - if (typeof message.issueClientCertificate !== "boolean") - return "issueClientCertificate: boolean expected"; - return null; - }; - - /** - * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ClientCertificateConfig} ClientCertificateConfig - */ - ClientCertificateConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ClientCertificateConfig) - return object; - var message = new $root.google.container.v1.ClientCertificateConfig(); - if (object.issueClientCertificate != null) - message.issueClientCertificate = Boolean(object.issueClientCertificate); - return message; - }; - - /** - * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {google.container.v1.ClientCertificateConfig} message ClientCertificateConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientCertificateConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.issueClientCertificate = false; - if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) - object.issueClientCertificate = message.issueClientCertificate; - return object; - }; - - /** - * Converts this ClientCertificateConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ClientCertificateConfig - * @instance - * @returns {Object.} JSON object - */ - ClientCertificateConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientCertificateConfig - * @function getTypeUrl - * @memberof google.container.v1.ClientCertificateConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ClientCertificateConfig"; - }; - - return ClientCertificateConfig; - })(); - - v1.AddonsConfig = (function() { - - /** - * Properties of an AddonsConfig. - * @memberof google.container.v1 - * @interface IAddonsConfig - * @property {google.container.v1.IHttpLoadBalancing|null} [httpLoadBalancing] AddonsConfig httpLoadBalancing - * @property {google.container.v1.IHorizontalPodAutoscaling|null} [horizontalPodAutoscaling] AddonsConfig horizontalPodAutoscaling - * @property {google.container.v1.IKubernetesDashboard|null} [kubernetesDashboard] AddonsConfig kubernetesDashboard - * @property {google.container.v1.INetworkPolicyConfig|null} [networkPolicyConfig] AddonsConfig networkPolicyConfig - * @property {google.container.v1.ICloudRunConfig|null} [cloudRunConfig] AddonsConfig cloudRunConfig - * @property {google.container.v1.IDnsCacheConfig|null} [dnsCacheConfig] AddonsConfig dnsCacheConfig - * @property {google.container.v1.IConfigConnectorConfig|null} [configConnectorConfig] AddonsConfig configConnectorConfig - * @property {google.container.v1.IGcePersistentDiskCsiDriverConfig|null} [gcePersistentDiskCsiDriverConfig] AddonsConfig gcePersistentDiskCsiDriverConfig - * @property {google.container.v1.IGcpFilestoreCsiDriverConfig|null} [gcpFilestoreCsiDriverConfig] AddonsConfig gcpFilestoreCsiDriverConfig - * @property {google.container.v1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig - * @property {google.container.v1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig - * @property {google.container.v1.IStatefulHAConfig|null} [statefulHaConfig] AddonsConfig statefulHaConfig - * @property {google.container.v1.IParallelstoreCsiDriverConfig|null} [parallelstoreCsiDriverConfig] AddonsConfig parallelstoreCsiDriverConfig - * @property {google.container.v1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig - */ - - /** - * Constructs a new AddonsConfig. - * @memberof google.container.v1 - * @classdesc Represents an AddonsConfig. - * @implements IAddonsConfig - * @constructor - * @param {google.container.v1.IAddonsConfig=} [properties] Properties to set - */ - function AddonsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AddonsConfig httpLoadBalancing. - * @member {google.container.v1.IHttpLoadBalancing|null|undefined} httpLoadBalancing - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.httpLoadBalancing = null; - - /** - * AddonsConfig horizontalPodAutoscaling. - * @member {google.container.v1.IHorizontalPodAutoscaling|null|undefined} horizontalPodAutoscaling - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.horizontalPodAutoscaling = null; - - /** - * AddonsConfig kubernetesDashboard. - * @member {google.container.v1.IKubernetesDashboard|null|undefined} kubernetesDashboard - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.kubernetesDashboard = null; - - /** - * AddonsConfig networkPolicyConfig. - * @member {google.container.v1.INetworkPolicyConfig|null|undefined} networkPolicyConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.networkPolicyConfig = null; - - /** - * AddonsConfig cloudRunConfig. - * @member {google.container.v1.ICloudRunConfig|null|undefined} cloudRunConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.cloudRunConfig = null; - - /** - * AddonsConfig dnsCacheConfig. - * @member {google.container.v1.IDnsCacheConfig|null|undefined} dnsCacheConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.dnsCacheConfig = null; - - /** - * AddonsConfig configConnectorConfig. - * @member {google.container.v1.IConfigConnectorConfig|null|undefined} configConnectorConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.configConnectorConfig = null; - - /** - * AddonsConfig gcePersistentDiskCsiDriverConfig. - * @member {google.container.v1.IGcePersistentDiskCsiDriverConfig|null|undefined} gcePersistentDiskCsiDriverConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcePersistentDiskCsiDriverConfig = null; - - /** - * AddonsConfig gcpFilestoreCsiDriverConfig. - * @member {google.container.v1.IGcpFilestoreCsiDriverConfig|null|undefined} gcpFilestoreCsiDriverConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcpFilestoreCsiDriverConfig = null; - - /** - * AddonsConfig gkeBackupAgentConfig. - * @member {google.container.v1.IGkeBackupAgentConfig|null|undefined} gkeBackupAgentConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gkeBackupAgentConfig = null; - - /** - * AddonsConfig gcsFuseCsiDriverConfig. - * @member {google.container.v1.IGcsFuseCsiDriverConfig|null|undefined} gcsFuseCsiDriverConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcsFuseCsiDriverConfig = null; - - /** - * AddonsConfig statefulHaConfig. - * @member {google.container.v1.IStatefulHAConfig|null|undefined} statefulHaConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.statefulHaConfig = null; - - /** - * AddonsConfig parallelstoreCsiDriverConfig. - * @member {google.container.v1.IParallelstoreCsiDriverConfig|null|undefined} parallelstoreCsiDriverConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.parallelstoreCsiDriverConfig = null; - - /** - * AddonsConfig rayOperatorConfig. - * @member {google.container.v1.IRayOperatorConfig|null|undefined} rayOperatorConfig - * @memberof google.container.v1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.rayOperatorConfig = null; - - /** - * Creates a new AddonsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AddonsConfig - * @static - * @param {google.container.v1.IAddonsConfig=} [properties] Properties to set - * @returns {google.container.v1.AddonsConfig} AddonsConfig instance - */ - AddonsConfig.create = function create(properties) { - return new AddonsConfig(properties); - }; - - /** - * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AddonsConfig - * @static - * @param {google.container.v1.IAddonsConfig} message AddonsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddonsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.httpLoadBalancing != null && Object.hasOwnProperty.call(message, "httpLoadBalancing")) - $root.google.container.v1.HttpLoadBalancing.encode(message.httpLoadBalancing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.horizontalPodAutoscaling != null && Object.hasOwnProperty.call(message, "horizontalPodAutoscaling")) - $root.google.container.v1.HorizontalPodAutoscaling.encode(message.horizontalPodAutoscaling, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.kubernetesDashboard != null && Object.hasOwnProperty.call(message, "kubernetesDashboard")) - $root.google.container.v1.KubernetesDashboard.encode(message.kubernetesDashboard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.networkPolicyConfig != null && Object.hasOwnProperty.call(message, "networkPolicyConfig")) - $root.google.container.v1.NetworkPolicyConfig.encode(message.networkPolicyConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.cloudRunConfig != null && Object.hasOwnProperty.call(message, "cloudRunConfig")) - $root.google.container.v1.CloudRunConfig.encode(message.cloudRunConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.dnsCacheConfig != null && Object.hasOwnProperty.call(message, "dnsCacheConfig")) - $root.google.container.v1.DnsCacheConfig.encode(message.dnsCacheConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.configConnectorConfig != null && Object.hasOwnProperty.call(message, "configConnectorConfig")) - $root.google.container.v1.ConfigConnectorConfig.encode(message.configConnectorConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.gcePersistentDiskCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcePersistentDiskCsiDriverConfig")) - $root.google.container.v1.GcePersistentDiskCsiDriverConfig.encode(message.gcePersistentDiskCsiDriverConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.gcpFilestoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcpFilestoreCsiDriverConfig")) - $root.google.container.v1.GcpFilestoreCsiDriverConfig.encode(message.gcpFilestoreCsiDriverConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.gkeBackupAgentConfig != null && Object.hasOwnProperty.call(message, "gkeBackupAgentConfig")) - $root.google.container.v1.GkeBackupAgentConfig.encode(message.gkeBackupAgentConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.gcsFuseCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcsFuseCsiDriverConfig")) - $root.google.container.v1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.statefulHaConfig != null && Object.hasOwnProperty.call(message, "statefulHaConfig")) - $root.google.container.v1.StatefulHAConfig.encode(message.statefulHaConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.parallelstoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "parallelstoreCsiDriverConfig")) - $root.google.container.v1.ParallelstoreCsiDriverConfig.encode(message.parallelstoreCsiDriverConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.rayOperatorConfig != null && Object.hasOwnProperty.call(message, "rayOperatorConfig")) - $root.google.container.v1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1.AddonsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AddonsConfig - * @static - * @param {google.container.v1.IAddonsConfig} message AddonsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddonsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AddonsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AddonsConfig} AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddonsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AddonsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.decode(reader, reader.uint32()); - break; - } - case 2: { - message.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 3: { - message.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.decode(reader, reader.uint32()); - break; - } - case 4: { - message.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.cloudRunConfig = $root.google.container.v1.CloudRunConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - message.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AddonsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AddonsConfig} AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddonsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddonsConfig message. - * @function verify - * @memberof google.container.v1.AddonsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddonsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) { - var error = $root.google.container.v1.HttpLoadBalancing.verify(message.httpLoadBalancing); - if (error) - return "httpLoadBalancing." + error; - } - if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) { - var error = $root.google.container.v1.HorizontalPodAutoscaling.verify(message.horizontalPodAutoscaling); - if (error) - return "horizontalPodAutoscaling." + error; - } - if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) { - var error = $root.google.container.v1.KubernetesDashboard.verify(message.kubernetesDashboard); - if (error) - return "kubernetesDashboard." + error; - } - if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) { - var error = $root.google.container.v1.NetworkPolicyConfig.verify(message.networkPolicyConfig); - if (error) - return "networkPolicyConfig." + error; - } - if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) { - var error = $root.google.container.v1.CloudRunConfig.verify(message.cloudRunConfig); - if (error) - return "cloudRunConfig." + error; - } - if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) { - var error = $root.google.container.v1.DnsCacheConfig.verify(message.dnsCacheConfig); - if (error) - return "dnsCacheConfig." + error; - } - if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) { - var error = $root.google.container.v1.ConfigConnectorConfig.verify(message.configConnectorConfig); - if (error) - return "configConnectorConfig." + error; - } - if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) { - var error = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.verify(message.gcePersistentDiskCsiDriverConfig); - if (error) - return "gcePersistentDiskCsiDriverConfig." + error; - } - if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) { - var error = $root.google.container.v1.GcpFilestoreCsiDriverConfig.verify(message.gcpFilestoreCsiDriverConfig); - if (error) - return "gcpFilestoreCsiDriverConfig." + error; - } - if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) { - var error = $root.google.container.v1.GkeBackupAgentConfig.verify(message.gkeBackupAgentConfig); - if (error) - return "gkeBackupAgentConfig." + error; - } - if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) { - var error = $root.google.container.v1.GcsFuseCsiDriverConfig.verify(message.gcsFuseCsiDriverConfig); - if (error) - return "gcsFuseCsiDriverConfig." + error; - } - if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) { - var error = $root.google.container.v1.StatefulHAConfig.verify(message.statefulHaConfig); - if (error) - return "statefulHaConfig." + error; - } - if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) { - var error = $root.google.container.v1.ParallelstoreCsiDriverConfig.verify(message.parallelstoreCsiDriverConfig); - if (error) - return "parallelstoreCsiDriverConfig." + error; - } - if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) { - var error = $root.google.container.v1.RayOperatorConfig.verify(message.rayOperatorConfig); - if (error) - return "rayOperatorConfig." + error; - } - return null; - }; - - /** - * Creates an AddonsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AddonsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AddonsConfig} AddonsConfig - */ - AddonsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AddonsConfig) - return object; - var message = new $root.google.container.v1.AddonsConfig(); - if (object.httpLoadBalancing != null) { - if (typeof object.httpLoadBalancing !== "object") - throw TypeError(".google.container.v1.AddonsConfig.httpLoadBalancing: object expected"); - message.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.fromObject(object.httpLoadBalancing); - } - if (object.horizontalPodAutoscaling != null) { - if (typeof object.horizontalPodAutoscaling !== "object") - throw TypeError(".google.container.v1.AddonsConfig.horizontalPodAutoscaling: object expected"); - message.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.fromObject(object.horizontalPodAutoscaling); - } - if (object.kubernetesDashboard != null) { - if (typeof object.kubernetesDashboard !== "object") - throw TypeError(".google.container.v1.AddonsConfig.kubernetesDashboard: object expected"); - message.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.fromObject(object.kubernetesDashboard); - } - if (object.networkPolicyConfig != null) { - if (typeof object.networkPolicyConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.networkPolicyConfig: object expected"); - message.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.fromObject(object.networkPolicyConfig); - } - if (object.cloudRunConfig != null) { - if (typeof object.cloudRunConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.cloudRunConfig: object expected"); - message.cloudRunConfig = $root.google.container.v1.CloudRunConfig.fromObject(object.cloudRunConfig); - } - if (object.dnsCacheConfig != null) { - if (typeof object.dnsCacheConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.dnsCacheConfig: object expected"); - message.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.fromObject(object.dnsCacheConfig); - } - if (object.configConnectorConfig != null) { - if (typeof object.configConnectorConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.configConnectorConfig: object expected"); - message.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.fromObject(object.configConnectorConfig); - } - if (object.gcePersistentDiskCsiDriverConfig != null) { - if (typeof object.gcePersistentDiskCsiDriverConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.gcePersistentDiskCsiDriverConfig: object expected"); - message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.fromObject(object.gcePersistentDiskCsiDriverConfig); - } - if (object.gcpFilestoreCsiDriverConfig != null) { - if (typeof object.gcpFilestoreCsiDriverConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.gcpFilestoreCsiDriverConfig: object expected"); - message.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.fromObject(object.gcpFilestoreCsiDriverConfig); - } - if (object.gkeBackupAgentConfig != null) { - if (typeof object.gkeBackupAgentConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.gkeBackupAgentConfig: object expected"); - message.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.fromObject(object.gkeBackupAgentConfig); - } - if (object.gcsFuseCsiDriverConfig != null) { - if (typeof object.gcsFuseCsiDriverConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.gcsFuseCsiDriverConfig: object expected"); - message.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.fromObject(object.gcsFuseCsiDriverConfig); - } - if (object.statefulHaConfig != null) { - if (typeof object.statefulHaConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.statefulHaConfig: object expected"); - message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.fromObject(object.statefulHaConfig); - } - if (object.parallelstoreCsiDriverConfig != null) { - if (typeof object.parallelstoreCsiDriverConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.parallelstoreCsiDriverConfig: object expected"); - message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.fromObject(object.parallelstoreCsiDriverConfig); - } - if (object.rayOperatorConfig != null) { - if (typeof object.rayOperatorConfig !== "object") - throw TypeError(".google.container.v1.AddonsConfig.rayOperatorConfig: object expected"); - message.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.fromObject(object.rayOperatorConfig); - } - return message; - }; - - /** - * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AddonsConfig - * @static - * @param {google.container.v1.AddonsConfig} message AddonsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddonsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.httpLoadBalancing = null; - object.horizontalPodAutoscaling = null; - object.kubernetesDashboard = null; - object.networkPolicyConfig = null; - object.cloudRunConfig = null; - object.dnsCacheConfig = null; - object.configConnectorConfig = null; - object.gcePersistentDiskCsiDriverConfig = null; - object.gcpFilestoreCsiDriverConfig = null; - object.gkeBackupAgentConfig = null; - object.gcsFuseCsiDriverConfig = null; - object.statefulHaConfig = null; - object.parallelstoreCsiDriverConfig = null; - object.rayOperatorConfig = null; - } - if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) - object.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); - if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) - object.horizontalPodAutoscaling = $root.google.container.v1.HorizontalPodAutoscaling.toObject(message.horizontalPodAutoscaling, options); - if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) - object.kubernetesDashboard = $root.google.container.v1.KubernetesDashboard.toObject(message.kubernetesDashboard, options); - if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) - object.networkPolicyConfig = $root.google.container.v1.NetworkPolicyConfig.toObject(message.networkPolicyConfig, options); - if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) - object.cloudRunConfig = $root.google.container.v1.CloudRunConfig.toObject(message.cloudRunConfig, options); - if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) - object.dnsCacheConfig = $root.google.container.v1.DnsCacheConfig.toObject(message.dnsCacheConfig, options); - if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) - object.configConnectorConfig = $root.google.container.v1.ConfigConnectorConfig.toObject(message.configConnectorConfig, options); - if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) - object.gcePersistentDiskCsiDriverConfig = $root.google.container.v1.GcePersistentDiskCsiDriverConfig.toObject(message.gcePersistentDiskCsiDriverConfig, options); - if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) - object.gcpFilestoreCsiDriverConfig = $root.google.container.v1.GcpFilestoreCsiDriverConfig.toObject(message.gcpFilestoreCsiDriverConfig, options); - if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) - object.gkeBackupAgentConfig = $root.google.container.v1.GkeBackupAgentConfig.toObject(message.gkeBackupAgentConfig, options); - if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) - object.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); - if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) - object.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.toObject(message.statefulHaConfig, options); - if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) - object.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.toObject(message.parallelstoreCsiDriverConfig, options); - if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) - object.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); - return object; - }; - - /** - * Converts this AddonsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AddonsConfig - * @instance - * @returns {Object.} JSON object - */ - AddonsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddonsConfig - * @function getTypeUrl - * @memberof google.container.v1.AddonsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddonsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AddonsConfig"; - }; - - return AddonsConfig; - })(); - - v1.HttpLoadBalancing = (function() { - - /** - * Properties of a HttpLoadBalancing. - * @memberof google.container.v1 - * @interface IHttpLoadBalancing - * @property {boolean|null} [disabled] HttpLoadBalancing disabled - */ - - /** - * Constructs a new HttpLoadBalancing. - * @memberof google.container.v1 - * @classdesc Represents a HttpLoadBalancing. - * @implements IHttpLoadBalancing - * @constructor - * @param {google.container.v1.IHttpLoadBalancing=} [properties] Properties to set - */ - function HttpLoadBalancing(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpLoadBalancing disabled. - * @member {boolean} disabled - * @memberof google.container.v1.HttpLoadBalancing - * @instance - */ - HttpLoadBalancing.prototype.disabled = false; - - /** - * Creates a new HttpLoadBalancing instance using the specified properties. - * @function create - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {google.container.v1.IHttpLoadBalancing=} [properties] Properties to set - * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing instance - */ - HttpLoadBalancing.create = function create(properties) { - return new HttpLoadBalancing(properties); - }; - - /** - * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. - * @function encode - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {google.container.v1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpLoadBalancing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1.HttpLoadBalancing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {google.container.v1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpLoadBalancing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpLoadBalancing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.HttpLoadBalancing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpLoadBalancing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpLoadBalancing message. - * @function verify - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpLoadBalancing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.HttpLoadBalancing} HttpLoadBalancing - */ - HttpLoadBalancing.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.HttpLoadBalancing) - return object; - var message = new $root.google.container.v1.HttpLoadBalancing(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {google.container.v1.HttpLoadBalancing} message HttpLoadBalancing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpLoadBalancing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this HttpLoadBalancing to JSON. - * @function toJSON - * @memberof google.container.v1.HttpLoadBalancing - * @instance - * @returns {Object.} JSON object - */ - HttpLoadBalancing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpLoadBalancing - * @function getTypeUrl - * @memberof google.container.v1.HttpLoadBalancing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpLoadBalancing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.HttpLoadBalancing"; - }; - - return HttpLoadBalancing; - })(); - - v1.HorizontalPodAutoscaling = (function() { - - /** - * Properties of a HorizontalPodAutoscaling. - * @memberof google.container.v1 - * @interface IHorizontalPodAutoscaling - * @property {boolean|null} [disabled] HorizontalPodAutoscaling disabled - */ - - /** - * Constructs a new HorizontalPodAutoscaling. - * @memberof google.container.v1 - * @classdesc Represents a HorizontalPodAutoscaling. - * @implements IHorizontalPodAutoscaling - * @constructor - * @param {google.container.v1.IHorizontalPodAutoscaling=} [properties] Properties to set - */ - function HorizontalPodAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HorizontalPodAutoscaling disabled. - * @member {boolean} disabled - * @memberof google.container.v1.HorizontalPodAutoscaling - * @instance - */ - HorizontalPodAutoscaling.prototype.disabled = false; - - /** - * Creates a new HorizontalPodAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1.IHorizontalPodAutoscaling=} [properties] Properties to set - * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling instance - */ - HorizontalPodAutoscaling.create = function create(properties) { - return new HorizontalPodAutoscaling(properties); - }; - - /** - * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HorizontalPodAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.HorizontalPodAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HorizontalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HorizontalPodAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.HorizontalPodAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HorizontalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HorizontalPodAutoscaling message. - * @function verify - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HorizontalPodAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - */ - HorizontalPodAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.HorizontalPodAutoscaling) - return object; - var message = new $root.google.container.v1.HorizontalPodAutoscaling(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1.HorizontalPodAutoscaling} message HorizontalPodAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HorizontalPodAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this HorizontalPodAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1.HorizontalPodAutoscaling - * @instance - * @returns {Object.} JSON object - */ - HorizontalPodAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HorizontalPodAutoscaling - * @function getTypeUrl - * @memberof google.container.v1.HorizontalPodAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HorizontalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.HorizontalPodAutoscaling"; - }; - - return HorizontalPodAutoscaling; - })(); - - v1.KubernetesDashboard = (function() { - - /** - * Properties of a KubernetesDashboard. - * @memberof google.container.v1 - * @interface IKubernetesDashboard - * @property {boolean|null} [disabled] KubernetesDashboard disabled - */ - - /** - * Constructs a new KubernetesDashboard. - * @memberof google.container.v1 - * @classdesc Represents a KubernetesDashboard. - * @implements IKubernetesDashboard - * @constructor - * @param {google.container.v1.IKubernetesDashboard=} [properties] Properties to set - */ - function KubernetesDashboard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KubernetesDashboard disabled. - * @member {boolean} disabled - * @memberof google.container.v1.KubernetesDashboard - * @instance - */ - KubernetesDashboard.prototype.disabled = false; - - /** - * Creates a new KubernetesDashboard instance using the specified properties. - * @function create - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {google.container.v1.IKubernetesDashboard=} [properties] Properties to set - * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard instance - */ - KubernetesDashboard.create = function create(properties) { - return new KubernetesDashboard(properties); - }; - - /** - * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. - * @function encode - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {google.container.v1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KubernetesDashboard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1.KubernetesDashboard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {google.container.v1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KubernetesDashboard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KubernetesDashboard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.KubernetesDashboard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KubernetesDashboard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KubernetesDashboard message. - * @function verify - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KubernetesDashboard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.KubernetesDashboard} KubernetesDashboard - */ - KubernetesDashboard.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.KubernetesDashboard) - return object; - var message = new $root.google.container.v1.KubernetesDashboard(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {google.container.v1.KubernetesDashboard} message KubernetesDashboard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KubernetesDashboard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this KubernetesDashboard to JSON. - * @function toJSON - * @memberof google.container.v1.KubernetesDashboard - * @instance - * @returns {Object.} JSON object - */ - KubernetesDashboard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KubernetesDashboard - * @function getTypeUrl - * @memberof google.container.v1.KubernetesDashboard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KubernetesDashboard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.KubernetesDashboard"; - }; - - return KubernetesDashboard; - })(); - - v1.NetworkPolicyConfig = (function() { - - /** - * Properties of a NetworkPolicyConfig. - * @memberof google.container.v1 - * @interface INetworkPolicyConfig - * @property {boolean|null} [disabled] NetworkPolicyConfig disabled - */ - - /** - * Constructs a new NetworkPolicyConfig. - * @memberof google.container.v1 - * @classdesc Represents a NetworkPolicyConfig. - * @implements INetworkPolicyConfig - * @constructor - * @param {google.container.v1.INetworkPolicyConfig=} [properties] Properties to set - */ - function NetworkPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPolicyConfig disabled. - * @member {boolean} disabled - * @memberof google.container.v1.NetworkPolicyConfig - * @instance - */ - NetworkPolicyConfig.prototype.disabled = false; - - /** - * Creates a new NetworkPolicyConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {google.container.v1.INetworkPolicyConfig=} [properties] Properties to set - * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig instance - */ - NetworkPolicyConfig.create = function create(properties) { - return new NetworkPolicyConfig(properties); - }; - - /** - * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {google.container.v1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {google.container.v1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPolicyConfig message. - * @function verify - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NetworkPolicyConfig} NetworkPolicyConfig - */ - NetworkPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NetworkPolicyConfig) - return object; - var message = new $root.google.container.v1.NetworkPolicyConfig(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {google.container.v1.NetworkPolicyConfig} message NetworkPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this NetworkPolicyConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NetworkPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPolicyConfig - * @function getTypeUrl - * @memberof google.container.v1.NetworkPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NetworkPolicyConfig"; - }; - - return NetworkPolicyConfig; - })(); - - v1.DnsCacheConfig = (function() { - - /** - * Properties of a DnsCacheConfig. - * @memberof google.container.v1 - * @interface IDnsCacheConfig - * @property {boolean|null} [enabled] DnsCacheConfig enabled - */ - - /** - * Constructs a new DnsCacheConfig. - * @memberof google.container.v1 - * @classdesc Represents a DnsCacheConfig. - * @implements IDnsCacheConfig - * @constructor - * @param {google.container.v1.IDnsCacheConfig=} [properties] Properties to set - */ - function DnsCacheConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DnsCacheConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.DnsCacheConfig - * @instance - */ - DnsCacheConfig.prototype.enabled = false; - - /** - * Creates a new DnsCacheConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {google.container.v1.IDnsCacheConfig=} [properties] Properties to set - * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig instance - */ - DnsCacheConfig.create = function create(properties) { - return new DnsCacheConfig(properties); - }; - - /** - * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {google.container.v1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DnsCacheConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1.DnsCacheConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {google.container.v1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DnsCacheConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DnsCacheConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DnsCacheConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DnsCacheConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DnsCacheConfig message. - * @function verify - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DnsCacheConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DnsCacheConfig} DnsCacheConfig - */ - DnsCacheConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DnsCacheConfig) - return object; - var message = new $root.google.container.v1.DnsCacheConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {google.container.v1.DnsCacheConfig} message DnsCacheConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DnsCacheConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this DnsCacheConfig to JSON. - * @function toJSON - * @memberof google.container.v1.DnsCacheConfig - * @instance - * @returns {Object.} JSON object - */ - DnsCacheConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DnsCacheConfig - * @function getTypeUrl - * @memberof google.container.v1.DnsCacheConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DnsCacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DnsCacheConfig"; - }; - - return DnsCacheConfig; - })(); - - v1.PrivateClusterMasterGlobalAccessConfig = (function() { - - /** - * Properties of a PrivateClusterMasterGlobalAccessConfig. - * @memberof google.container.v1 - * @interface IPrivateClusterMasterGlobalAccessConfig - * @property {boolean|null} [enabled] PrivateClusterMasterGlobalAccessConfig enabled - */ - - /** - * Constructs a new PrivateClusterMasterGlobalAccessConfig. - * @memberof google.container.v1 - * @classdesc Represents a PrivateClusterMasterGlobalAccessConfig. - * @implements IPrivateClusterMasterGlobalAccessConfig - * @constructor - * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set - */ - function PrivateClusterMasterGlobalAccessConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterMasterGlobalAccessConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @instance - */ - PrivateClusterMasterGlobalAccessConfig.prototype.enabled = false; - - /** - * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set - * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig instance - */ - PrivateClusterMasterGlobalAccessConfig.create = function create(properties) { - return new PrivateClusterMasterGlobalAccessConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterMasterGlobalAccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterMasterGlobalAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterMasterGlobalAccessConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterMasterGlobalAccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterMasterGlobalAccessConfig message. - * @function verify - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterMasterGlobalAccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - */ - PrivateClusterMasterGlobalAccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig) - return object; - var message = new $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1.PrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterMasterGlobalAccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. - * @function toJSON - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterMasterGlobalAccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterMasterGlobalAccessConfig - * @function getTypeUrl - * @memberof google.container.v1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterMasterGlobalAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.PrivateClusterMasterGlobalAccessConfig"; - }; - - return PrivateClusterMasterGlobalAccessConfig; - })(); - - v1.PrivateClusterConfig = (function() { - - /** - * Properties of a PrivateClusterConfig. - * @memberof google.container.v1 - * @interface IPrivateClusterConfig - * @property {boolean|null} [enablePrivateNodes] PrivateClusterConfig enablePrivateNodes - * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint - * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock - * @property {string|null} [privateEndpoint] PrivateClusterConfig privateEndpoint - * @property {string|null} [publicEndpoint] PrivateClusterConfig publicEndpoint - * @property {string|null} [peeringName] PrivateClusterConfig peeringName - * @property {google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null} [masterGlobalAccessConfig] PrivateClusterConfig masterGlobalAccessConfig - * @property {string|null} [privateEndpointSubnetwork] PrivateClusterConfig privateEndpointSubnetwork - */ - - /** - * Constructs a new PrivateClusterConfig. - * @memberof google.container.v1 - * @classdesc Represents a PrivateClusterConfig. - * @implements IPrivateClusterConfig - * @constructor - * @param {google.container.v1.IPrivateClusterConfig=} [properties] Properties to set - */ - function PrivateClusterConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterConfig enablePrivateNodes. - * @member {boolean} enablePrivateNodes - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateNodes = false; - - /** - * PrivateClusterConfig enablePrivateEndpoint. - * @member {boolean} enablePrivateEndpoint - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateEndpoint = false; - - /** - * PrivateClusterConfig masterIpv4CidrBlock. - * @member {string} masterIpv4CidrBlock - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; - - /** - * PrivateClusterConfig privateEndpoint. - * @member {string} privateEndpoint - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.privateEndpoint = ""; - - /** - * PrivateClusterConfig publicEndpoint. - * @member {string} publicEndpoint - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.publicEndpoint = ""; - - /** - * PrivateClusterConfig peeringName. - * @member {string} peeringName - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.peeringName = ""; - - /** - * PrivateClusterConfig masterGlobalAccessConfig. - * @member {google.container.v1.IPrivateClusterMasterGlobalAccessConfig|null|undefined} masterGlobalAccessConfig - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterGlobalAccessConfig = null; - - /** - * PrivateClusterConfig privateEndpointSubnetwork. - * @member {string} privateEndpointSubnetwork - * @memberof google.container.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.privateEndpointSubnetwork = ""; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {google.container.v1.IPrivateClusterConfig=} [properties] Properties to set - * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig instance - */ - PrivateClusterConfig.create = function create(properties) { - return new PrivateClusterConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {google.container.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateNodes); - if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePrivateEndpoint); - if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4CidrBlock); - if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.privateEndpoint); - if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); - if (message.peeringName != null && Object.hasOwnProperty.call(message, "peeringName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.peeringName); - if (message.masterGlobalAccessConfig != null && Object.hasOwnProperty.call(message, "masterGlobalAccessConfig")) - $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.encode(message.masterGlobalAccessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.privateEndpointSubnetwork); - return writer; - }; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1.PrivateClusterConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {google.container.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PrivateClusterConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateNodes = reader.bool(); - break; - } - case 2: { - message.enablePrivateEndpoint = reader.bool(); - break; - } - case 3: { - message.masterIpv4CidrBlock = reader.string(); - break; - } - case 4: { - message.privateEndpoint = reader.string(); - break; - } - case 5: { - message.publicEndpoint = reader.string(); - break; - } - case 7: { - message.peeringName = reader.string(); - break; - } - case 8: { - message.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.privateEndpointSubnetwork = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterConfig message. - * @function verify - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) - if (typeof message.enablePrivateNodes !== "boolean") - return "enablePrivateNodes: boolean expected"; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - if (typeof message.enablePrivateEndpoint !== "boolean") - return "enablePrivateEndpoint: boolean expected"; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - if (!$util.isString(message.masterIpv4CidrBlock)) - return "masterIpv4CidrBlock: string expected"; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - if (!$util.isString(message.privateEndpoint)) - return "privateEndpoint: string expected"; - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - if (!$util.isString(message.publicEndpoint)) - return "publicEndpoint: string expected"; - if (message.peeringName != null && message.hasOwnProperty("peeringName")) - if (!$util.isString(message.peeringName)) - return "peeringName: string expected"; - if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) { - var error = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.verify(message.masterGlobalAccessConfig); - if (error) - return "masterGlobalAccessConfig." + error; - } - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - if (!$util.isString(message.privateEndpointSubnetwork)) - return "privateEndpointSubnetwork: string expected"; - return null; - }; - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.PrivateClusterConfig} PrivateClusterConfig - */ - PrivateClusterConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.PrivateClusterConfig) - return object; - var message = new $root.google.container.v1.PrivateClusterConfig(); - if (object.enablePrivateNodes != null) - message.enablePrivateNodes = Boolean(object.enablePrivateNodes); - if (object.enablePrivateEndpoint != null) - message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); - if (object.masterIpv4CidrBlock != null) - message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); - if (object.privateEndpoint != null) - message.privateEndpoint = String(object.privateEndpoint); - if (object.publicEndpoint != null) - message.publicEndpoint = String(object.publicEndpoint); - if (object.peeringName != null) - message.peeringName = String(object.peeringName); - if (object.masterGlobalAccessConfig != null) { - if (typeof object.masterGlobalAccessConfig !== "object") - throw TypeError(".google.container.v1.PrivateClusterConfig.masterGlobalAccessConfig: object expected"); - message.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.fromObject(object.masterGlobalAccessConfig); - } - if (object.privateEndpointSubnetwork != null) - message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {google.container.v1.PrivateClusterConfig} message PrivateClusterConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateNodes = false; - object.enablePrivateEndpoint = false; - object.masterIpv4CidrBlock = ""; - object.privateEndpoint = ""; - object.publicEndpoint = ""; - object.peeringName = ""; - object.masterGlobalAccessConfig = null; - object.privateEndpointSubnetwork = ""; - } - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) - object.enablePrivateNodes = message.enablePrivateNodes; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - object.enablePrivateEndpoint = message.enablePrivateEndpoint; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - object.privateEndpoint = message.privateEndpoint; - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - object.publicEndpoint = message.publicEndpoint; - if (message.peeringName != null && message.hasOwnProperty("peeringName")) - object.peeringName = message.peeringName; - if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) - object.masterGlobalAccessConfig = $root.google.container.v1.PrivateClusterMasterGlobalAccessConfig.toObject(message.masterGlobalAccessConfig, options); - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; - return object; - }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @function toJSON - * @memberof google.container.v1.PrivateClusterConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterConfig - * @function getTypeUrl - * @memberof google.container.v1.PrivateClusterConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.PrivateClusterConfig"; - }; - - return PrivateClusterConfig; - })(); - - v1.AuthenticatorGroupsConfig = (function() { - - /** - * Properties of an AuthenticatorGroupsConfig. - * @memberof google.container.v1 - * @interface IAuthenticatorGroupsConfig - * @property {boolean|null} [enabled] AuthenticatorGroupsConfig enabled - * @property {string|null} [securityGroup] AuthenticatorGroupsConfig securityGroup - */ - - /** - * Constructs a new AuthenticatorGroupsConfig. - * @memberof google.container.v1 - * @classdesc Represents an AuthenticatorGroupsConfig. - * @implements IAuthenticatorGroupsConfig - * @constructor - * @param {google.container.v1.IAuthenticatorGroupsConfig=} [properties] Properties to set - */ - function AuthenticatorGroupsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuthenticatorGroupsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @instance - */ - AuthenticatorGroupsConfig.prototype.enabled = false; - - /** - * AuthenticatorGroupsConfig securityGroup. - * @member {string} securityGroup - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @instance - */ - AuthenticatorGroupsConfig.prototype.securityGroup = ""; - - /** - * Creates a new AuthenticatorGroupsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1.IAuthenticatorGroupsConfig=} [properties] Properties to set - * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig instance - */ - AuthenticatorGroupsConfig.create = function create(properties) { - return new AuthenticatorGroupsConfig(properties); - }; - - /** - * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthenticatorGroupsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.securityGroup != null && Object.hasOwnProperty.call(message, "securityGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.securityGroup); - return writer; - }; - - /** - * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1.AuthenticatorGroupsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthenticatorGroupsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthenticatorGroupsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AuthenticatorGroupsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.securityGroup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthenticatorGroupsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuthenticatorGroupsConfig message. - * @function verify - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuthenticatorGroupsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) - if (!$util.isString(message.securityGroup)) - return "securityGroup: string expected"; - return null; - }; - - /** - * Creates an AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - */ - AuthenticatorGroupsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AuthenticatorGroupsConfig) - return object; - var message = new $root.google.container.v1.AuthenticatorGroupsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.securityGroup != null) - message.securityGroup = String(object.securityGroup); - return message; - }; - - /** - * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1.AuthenticatorGroupsConfig} message AuthenticatorGroupsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuthenticatorGroupsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.securityGroup = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) - object.securityGroup = message.securityGroup; - return object; - }; - - /** - * Converts this AuthenticatorGroupsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @instance - * @returns {Object.} JSON object - */ - AuthenticatorGroupsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuthenticatorGroupsConfig - * @function getTypeUrl - * @memberof google.container.v1.AuthenticatorGroupsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuthenticatorGroupsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AuthenticatorGroupsConfig"; - }; - - return AuthenticatorGroupsConfig; - })(); - - v1.CloudRunConfig = (function() { - - /** - * Properties of a CloudRunConfig. - * @memberof google.container.v1 - * @interface ICloudRunConfig - * @property {boolean|null} [disabled] CloudRunConfig disabled - * @property {google.container.v1.CloudRunConfig.LoadBalancerType|null} [loadBalancerType] CloudRunConfig loadBalancerType - */ - - /** - * Constructs a new CloudRunConfig. - * @memberof google.container.v1 - * @classdesc Represents a CloudRunConfig. - * @implements ICloudRunConfig - * @constructor - * @param {google.container.v1.ICloudRunConfig=} [properties] Properties to set - */ - function CloudRunConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunConfig disabled. - * @member {boolean} disabled - * @memberof google.container.v1.CloudRunConfig - * @instance - */ - CloudRunConfig.prototype.disabled = false; - - /** - * CloudRunConfig loadBalancerType. - * @member {google.container.v1.CloudRunConfig.LoadBalancerType} loadBalancerType - * @memberof google.container.v1.CloudRunConfig - * @instance - */ - CloudRunConfig.prototype.loadBalancerType = 0; - - /** - * Creates a new CloudRunConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {google.container.v1.ICloudRunConfig=} [properties] Properties to set - * @returns {google.container.v1.CloudRunConfig} CloudRunConfig instance - */ - CloudRunConfig.create = function create(properties) { - return new CloudRunConfig(properties); - }; - - /** - * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {google.container.v1.ICloudRunConfig} message CloudRunConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadBalancerType); - return writer; - }; - - /** - * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1.CloudRunConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {google.container.v1.ICloudRunConfig} message CloudRunConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CloudRunConfig} CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CloudRunConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - case 3: { - message.loadBalancerType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CloudRunConfig} CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunConfig message. - * @function verify - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CloudRunConfig} CloudRunConfig - */ - CloudRunConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CloudRunConfig) - return object; - var message = new $root.google.container.v1.CloudRunConfig(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "LOAD_BALANCER_TYPE_EXTERNAL": - case 1: - message.loadBalancerType = 1; - break; - case "LOAD_BALANCER_TYPE_INTERNAL": - case 2: - message.loadBalancerType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {google.container.v1.CloudRunConfig} message CloudRunConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disabled = false; - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.container.v1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.container.v1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - return object; - }; - - /** - * Converts this CloudRunConfig to JSON. - * @function toJSON - * @memberof google.container.v1.CloudRunConfig - * @instance - * @returns {Object.} JSON object - */ - CloudRunConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunConfig - * @function getTypeUrl - * @memberof google.container.v1.CloudRunConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CloudRunConfig"; - }; - - /** - * LoadBalancerType enum. - * @name google.container.v1.CloudRunConfig.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} LOAD_BALANCER_TYPE_EXTERNAL=1 LOAD_BALANCER_TYPE_EXTERNAL value - * @property {number} LOAD_BALANCER_TYPE_INTERNAL=2 LOAD_BALANCER_TYPE_INTERNAL value - */ - CloudRunConfig.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOAD_BALANCER_TYPE_EXTERNAL"] = 1; - values[valuesById[2] = "LOAD_BALANCER_TYPE_INTERNAL"] = 2; - return values; - })(); - - return CloudRunConfig; - })(); - - v1.ConfigConnectorConfig = (function() { - - /** - * Properties of a ConfigConnectorConfig. - * @memberof google.container.v1 - * @interface IConfigConnectorConfig - * @property {boolean|null} [enabled] ConfigConnectorConfig enabled - */ - - /** - * Constructs a new ConfigConnectorConfig. - * @memberof google.container.v1 - * @classdesc Represents a ConfigConnectorConfig. - * @implements IConfigConnectorConfig - * @constructor - * @param {google.container.v1.IConfigConnectorConfig=} [properties] Properties to set - */ - function ConfigConnectorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfigConnectorConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ConfigConnectorConfig - * @instance - */ - ConfigConnectorConfig.prototype.enabled = false; - - /** - * Creates a new ConfigConnectorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {google.container.v1.IConfigConnectorConfig=} [properties] Properties to set - * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig instance - */ - ConfigConnectorConfig.create = function create(properties) { - return new ConfigConnectorConfig(properties); - }; - - /** - * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {google.container.v1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigConnectorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1.ConfigConnectorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {google.container.v1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigConnectorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigConnectorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ConfigConnectorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigConnectorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfigConnectorConfig message. - * @function verify - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfigConnectorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ConfigConnectorConfig} ConfigConnectorConfig - */ - ConfigConnectorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ConfigConnectorConfig) - return object; - var message = new $root.google.container.v1.ConfigConnectorConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {google.container.v1.ConfigConnectorConfig} message ConfigConnectorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfigConnectorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConfigConnectorConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ConfigConnectorConfig - * @instance - * @returns {Object.} JSON object - */ - ConfigConnectorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfigConnectorConfig - * @function getTypeUrl - * @memberof google.container.v1.ConfigConnectorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfigConnectorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ConfigConnectorConfig"; - }; - - return ConfigConnectorConfig; - })(); - - v1.GcePersistentDiskCsiDriverConfig = (function() { - - /** - * Properties of a GcePersistentDiskCsiDriverConfig. - * @memberof google.container.v1 - * @interface IGcePersistentDiskCsiDriverConfig - * @property {boolean|null} [enabled] GcePersistentDiskCsiDriverConfig enabled - */ - - /** - * Constructs a new GcePersistentDiskCsiDriverConfig. - * @memberof google.container.v1 - * @classdesc Represents a GcePersistentDiskCsiDriverConfig. - * @implements IGcePersistentDiskCsiDriverConfig - * @constructor - * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set - */ - function GcePersistentDiskCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcePersistentDiskCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @instance - */ - GcePersistentDiskCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig instance - */ - GcePersistentDiskCsiDriverConfig.create = function create(properties) { - return new GcePersistentDiskCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcePersistentDiskCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcePersistentDiskCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcePersistentDiskCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcePersistentDiskCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcePersistentDiskCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcePersistentDiskCsiDriverConfig message. - * @function verify - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcePersistentDiskCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - */ - GcePersistentDiskCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GcePersistentDiskCsiDriverConfig) - return object; - var message = new $root.google.container.v1.GcePersistentDiskCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1.GcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcePersistentDiskCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcePersistentDiskCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcePersistentDiskCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcePersistentDiskCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1.GcePersistentDiskCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcePersistentDiskCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GcePersistentDiskCsiDriverConfig"; - }; - - return GcePersistentDiskCsiDriverConfig; - })(); - - v1.GcpFilestoreCsiDriverConfig = (function() { - - /** - * Properties of a GcpFilestoreCsiDriverConfig. - * @memberof google.container.v1 - * @interface IGcpFilestoreCsiDriverConfig - * @property {boolean|null} [enabled] GcpFilestoreCsiDriverConfig enabled - */ - - /** - * Constructs a new GcpFilestoreCsiDriverConfig. - * @memberof google.container.v1 - * @classdesc Represents a GcpFilestoreCsiDriverConfig. - * @implements IGcpFilestoreCsiDriverConfig - * @constructor - * @param {google.container.v1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set - */ - function GcpFilestoreCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpFilestoreCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @instance - */ - GcpFilestoreCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig instance - */ - GcpFilestoreCsiDriverConfig.create = function create(properties) { - return new GcpFilestoreCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpFilestoreCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpFilestoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpFilestoreCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcpFilestoreCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpFilestoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpFilestoreCsiDriverConfig message. - * @function verify - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpFilestoreCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - */ - GcpFilestoreCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GcpFilestoreCsiDriverConfig) - return object; - var message = new $root.google.container.v1.GcpFilestoreCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1.GcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpFilestoreCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcpFilestoreCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcpFilestoreCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpFilestoreCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1.GcpFilestoreCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpFilestoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GcpFilestoreCsiDriverConfig"; - }; - - return GcpFilestoreCsiDriverConfig; - })(); - - v1.GcsFuseCsiDriverConfig = (function() { - - /** - * Properties of a GcsFuseCsiDriverConfig. - * @memberof google.container.v1 - * @interface IGcsFuseCsiDriverConfig - * @property {boolean|null} [enabled] GcsFuseCsiDriverConfig enabled - */ - - /** - * Constructs a new GcsFuseCsiDriverConfig. - * @memberof google.container.v1 - * @classdesc Represents a GcsFuseCsiDriverConfig. - * @implements IGcsFuseCsiDriverConfig - * @constructor - * @param {google.container.v1.IGcsFuseCsiDriverConfig=} [properties] Properties to set - */ - function GcsFuseCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFuseCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @instance - */ - GcsFuseCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1.IGcsFuseCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig instance - */ - GcsFuseCsiDriverConfig.create = function create(properties) { - return new GcsFuseCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFuseCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFuseCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFuseCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GcsFuseCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFuseCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFuseCsiDriverConfig message. - * @function verify - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFuseCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - */ - GcsFuseCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GcsFuseCsiDriverConfig) - return object; - var message = new $root.google.container.v1.GcsFuseCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1.GcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFuseCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcsFuseCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcsFuseCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFuseCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1.GcsFuseCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFuseCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GcsFuseCsiDriverConfig"; - }; - - return GcsFuseCsiDriverConfig; - })(); - - v1.ParallelstoreCsiDriverConfig = (function() { - - /** - * Properties of a ParallelstoreCsiDriverConfig. - * @memberof google.container.v1 - * @interface IParallelstoreCsiDriverConfig - * @property {boolean|null} [enabled] ParallelstoreCsiDriverConfig enabled - */ - - /** - * Constructs a new ParallelstoreCsiDriverConfig. - * @memberof google.container.v1 - * @classdesc Represents a ParallelstoreCsiDriverConfig. - * @implements IParallelstoreCsiDriverConfig - * @constructor - * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set - */ - function ParallelstoreCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ParallelstoreCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @instance - */ - ParallelstoreCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig instance - */ - ParallelstoreCsiDriverConfig.create = function create(properties) { - return new ParallelstoreCsiDriverConfig(properties); - }; - - /** - * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParallelstoreCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParallelstoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParallelstoreCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParallelstoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParallelstoreCsiDriverConfig message. - * @function verify - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParallelstoreCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig - */ - ParallelstoreCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ParallelstoreCsiDriverConfig) - return object; - var message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {google.container.v1.ParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParallelstoreCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ParallelstoreCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - ParallelstoreCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParallelstoreCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1.ParallelstoreCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParallelstoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ParallelstoreCsiDriverConfig"; - }; - - return ParallelstoreCsiDriverConfig; - })(); - - v1.RayOperatorConfig = (function() { - - /** - * Properties of a RayOperatorConfig. - * @memberof google.container.v1 - * @interface IRayOperatorConfig - * @property {boolean|null} [enabled] RayOperatorConfig enabled - * @property {google.container.v1.IRayClusterLoggingConfig|null} [rayClusterLoggingConfig] RayOperatorConfig rayClusterLoggingConfig - * @property {google.container.v1.IRayClusterMonitoringConfig|null} [rayClusterMonitoringConfig] RayOperatorConfig rayClusterMonitoringConfig - */ - - /** - * Constructs a new RayOperatorConfig. - * @memberof google.container.v1 - * @classdesc Represents a RayOperatorConfig. - * @implements IRayOperatorConfig - * @constructor - * @param {google.container.v1.IRayOperatorConfig=} [properties] Properties to set - */ - function RayOperatorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayOperatorConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.enabled = false; - - /** - * RayOperatorConfig rayClusterLoggingConfig. - * @member {google.container.v1.IRayClusterLoggingConfig|null|undefined} rayClusterLoggingConfig - * @memberof google.container.v1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.rayClusterLoggingConfig = null; - - /** - * RayOperatorConfig rayClusterMonitoringConfig. - * @member {google.container.v1.IRayClusterMonitoringConfig|null|undefined} rayClusterMonitoringConfig - * @memberof google.container.v1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.rayClusterMonitoringConfig = null; - - /** - * Creates a new RayOperatorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {google.container.v1.IRayOperatorConfig=} [properties] Properties to set - * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig instance - */ - RayOperatorConfig.create = function create(properties) { - return new RayOperatorConfig(properties); - }; - - /** - * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {google.container.v1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayOperatorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.rayClusterLoggingConfig != null && Object.hasOwnProperty.call(message, "rayClusterLoggingConfig")) - $root.google.container.v1.RayClusterLoggingConfig.encode(message.rayClusterLoggingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rayClusterMonitoringConfig != null && Object.hasOwnProperty.call(message, "rayClusterMonitoringConfig")) - $root.google.container.v1.RayClusterMonitoringConfig.encode(message.rayClusterMonitoringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1.RayOperatorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {google.container.v1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayOperatorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayOperatorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayOperatorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayOperatorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayOperatorConfig message. - * @function verify - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayOperatorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) { - var error = $root.google.container.v1.RayClusterLoggingConfig.verify(message.rayClusterLoggingConfig); - if (error) - return "rayClusterLoggingConfig." + error; - } - if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) { - var error = $root.google.container.v1.RayClusterMonitoringConfig.verify(message.rayClusterMonitoringConfig); - if (error) - return "rayClusterMonitoringConfig." + error; - } - return null; - }; - - /** - * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RayOperatorConfig} RayOperatorConfig - */ - RayOperatorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RayOperatorConfig) - return object; - var message = new $root.google.container.v1.RayOperatorConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.rayClusterLoggingConfig != null) { - if (typeof object.rayClusterLoggingConfig !== "object") - throw TypeError(".google.container.v1.RayOperatorConfig.rayClusterLoggingConfig: object expected"); - message.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.fromObject(object.rayClusterLoggingConfig); - } - if (object.rayClusterMonitoringConfig != null) { - if (typeof object.rayClusterMonitoringConfig !== "object") - throw TypeError(".google.container.v1.RayOperatorConfig.rayClusterMonitoringConfig: object expected"); - message.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.fromObject(object.rayClusterMonitoringConfig); - } - return message; - }; - - /** - * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {google.container.v1.RayOperatorConfig} message RayOperatorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayOperatorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.rayClusterLoggingConfig = null; - object.rayClusterMonitoringConfig = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) - object.rayClusterLoggingConfig = $root.google.container.v1.RayClusterLoggingConfig.toObject(message.rayClusterLoggingConfig, options); - if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) - object.rayClusterMonitoringConfig = $root.google.container.v1.RayClusterMonitoringConfig.toObject(message.rayClusterMonitoringConfig, options); - return object; - }; - - /** - * Converts this RayOperatorConfig to JSON. - * @function toJSON - * @memberof google.container.v1.RayOperatorConfig - * @instance - * @returns {Object.} JSON object - */ - RayOperatorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayOperatorConfig - * @function getTypeUrl - * @memberof google.container.v1.RayOperatorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayOperatorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RayOperatorConfig"; - }; - - return RayOperatorConfig; - })(); - - v1.GkeBackupAgentConfig = (function() { - - /** - * Properties of a GkeBackupAgentConfig. - * @memberof google.container.v1 - * @interface IGkeBackupAgentConfig - * @property {boolean|null} [enabled] GkeBackupAgentConfig enabled - */ - - /** - * Constructs a new GkeBackupAgentConfig. - * @memberof google.container.v1 - * @classdesc Represents a GkeBackupAgentConfig. - * @implements IGkeBackupAgentConfig - * @constructor - * @param {google.container.v1.IGkeBackupAgentConfig=} [properties] Properties to set - */ - function GkeBackupAgentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GkeBackupAgentConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.GkeBackupAgentConfig - * @instance - */ - GkeBackupAgentConfig.prototype.enabled = false; - - /** - * Creates a new GkeBackupAgentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {google.container.v1.IGkeBackupAgentConfig=} [properties] Properties to set - * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig instance - */ - GkeBackupAgentConfig.create = function create(properties) { - return new GkeBackupAgentConfig(properties); - }; - - /** - * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {google.container.v1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GkeBackupAgentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeBackupAgentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {google.container.v1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GkeBackupAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GkeBackupAgentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GkeBackupAgentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GkeBackupAgentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GkeBackupAgentConfig message. - * @function verify - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GkeBackupAgentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GkeBackupAgentConfig} GkeBackupAgentConfig - */ - GkeBackupAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GkeBackupAgentConfig) - return object; - var message = new $root.google.container.v1.GkeBackupAgentConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {google.container.v1.GkeBackupAgentConfig} message GkeBackupAgentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GkeBackupAgentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GkeBackupAgentConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GkeBackupAgentConfig - * @instance - * @returns {Object.} JSON object - */ - GkeBackupAgentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GkeBackupAgentConfig - * @function getTypeUrl - * @memberof google.container.v1.GkeBackupAgentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GkeBackupAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GkeBackupAgentConfig"; - }; - - return GkeBackupAgentConfig; - })(); - - v1.StatefulHAConfig = (function() { - - /** - * Properties of a StatefulHAConfig. - * @memberof google.container.v1 - * @interface IStatefulHAConfig - * @property {boolean|null} [enabled] StatefulHAConfig enabled - */ - - /** - * Constructs a new StatefulHAConfig. - * @memberof google.container.v1 - * @classdesc Represents a StatefulHAConfig. - * @implements IStatefulHAConfig - * @constructor - * @param {google.container.v1.IStatefulHAConfig=} [properties] Properties to set - */ - function StatefulHAConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatefulHAConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.StatefulHAConfig - * @instance - */ - StatefulHAConfig.prototype.enabled = false; - - /** - * Creates a new StatefulHAConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {google.container.v1.IStatefulHAConfig=} [properties] Properties to set - * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig instance - */ - StatefulHAConfig.create = function create(properties) { - return new StatefulHAConfig(properties); - }; - - /** - * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {google.container.v1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatefulHAConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1.StatefulHAConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {google.container.v1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatefulHAConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatefulHAConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StatefulHAConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatefulHAConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatefulHAConfig message. - * @function verify - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatefulHAConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.StatefulHAConfig} StatefulHAConfig - */ - StatefulHAConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.StatefulHAConfig) - return object; - var message = new $root.google.container.v1.StatefulHAConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {google.container.v1.StatefulHAConfig} message StatefulHAConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatefulHAConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this StatefulHAConfig to JSON. - * @function toJSON - * @memberof google.container.v1.StatefulHAConfig - * @instance - * @returns {Object.} JSON object - */ - StatefulHAConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StatefulHAConfig - * @function getTypeUrl - * @memberof google.container.v1.StatefulHAConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StatefulHAConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.StatefulHAConfig"; - }; - - return StatefulHAConfig; - })(); - - v1.MasterAuthorizedNetworksConfig = (function() { - - /** - * Properties of a MasterAuthorizedNetworksConfig. - * @memberof google.container.v1 - * @interface IMasterAuthorizedNetworksConfig - * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled - * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks - * @property {boolean|null} [gcpPublicCidrsAccessEnabled] MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled - * @property {boolean|null} [privateEndpointEnforcementEnabled] MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled - */ - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @memberof google.container.v1 - * @classdesc Represents a MasterAuthorizedNetworksConfig. - * @implements IMasterAuthorizedNetworksConfig - * @constructor - * @param {google.container.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - */ - function MasterAuthorizedNetworksConfig(properties) { - this.cidrBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuthorizedNetworksConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.enabled = false; - - /** - * MasterAuthorizedNetworksConfig cidrBlocks. - * @member {Array.} cidrBlocks - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; - - /** - * MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. - * @member {boolean|null|undefined} gcpPublicCidrsAccessEnabled - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.gcpPublicCidrsAccessEnabled = null; - - /** - * MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. - * @member {boolean|null|undefined} privateEndpointEnforcementEnabled - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.privateEndpointEnforcementEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. - * @member {"gcpPublicCidrsAccessEnabled"|undefined} _gcpPublicCidrsAccessEnabled - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_gcpPublicCidrsAccessEnabled", { - get: $util.oneOfGetter($oneOfFields = ["gcpPublicCidrsAccessEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. - * @member {"privateEndpointEnforcementEnabled"|undefined} _privateEndpointEnforcementEnabled - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - */ - Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_privateEndpointEnforcementEnabled", { - get: $util.oneOfGetter($oneOfFields = ["privateEndpointEnforcementEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance - */ - MasterAuthorizedNetworksConfig.create = function create(properties) { - return new MasterAuthorizedNetworksConfig(properties); - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.cidrBlocks != null && message.cidrBlocks.length) - for (var i = 0; i < message.cidrBlocks.length; ++i) - $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcpPublicCidrsAccessEnabled != null && Object.hasOwnProperty.call(message, "gcpPublicCidrsAccessEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.gcpPublicCidrsAccessEnabled); - if (message.privateEndpointEnforcementEnabled != null && Object.hasOwnProperty.call(message, "privateEndpointEnforcementEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.privateEndpointEnforcementEnabled); - return writer; - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuthorizedNetworksConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.cidrBlocks && message.cidrBlocks.length)) - message.cidrBlocks = []; - message.cidrBlocks.push($root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); - break; - } - case 3: { - message.gcpPublicCidrsAccessEnabled = reader.bool(); - break; - } - case 5: { - message.privateEndpointEnforcementEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @function verify - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuthorizedNetworksConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { - if (!Array.isArray(message.cidrBlocks)) - return "cidrBlocks: array expected"; - for (var i = 0; i < message.cidrBlocks.length; ++i) { - var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); - if (error) - return "cidrBlocks." + error; - } - } - if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { - properties._gcpPublicCidrsAccessEnabled = 1; - if (typeof message.gcpPublicCidrsAccessEnabled !== "boolean") - return "gcpPublicCidrsAccessEnabled: boolean expected"; - } - if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { - properties._privateEndpointEnforcementEnabled = 1; - if (typeof message.privateEndpointEnforcementEnabled !== "boolean") - return "privateEndpointEnforcementEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - */ - MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MasterAuthorizedNetworksConfig) - return object; - var message = new $root.google.container.v1.MasterAuthorizedNetworksConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.cidrBlocks) { - if (!Array.isArray(object.cidrBlocks)) - throw TypeError(".google.container.v1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); - message.cidrBlocks = []; - for (var i = 0; i < object.cidrBlocks.length; ++i) { - if (typeof object.cidrBlocks[i] !== "object") - throw TypeError(".google.container.v1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); - message.cidrBlocks[i] = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); - } - } - if (object.gcpPublicCidrsAccessEnabled != null) - message.gcpPublicCidrsAccessEnabled = Boolean(object.gcpPublicCidrsAccessEnabled); - if (object.privateEndpointEnforcementEnabled != null) - message.privateEndpointEnforcementEnabled = Boolean(object.privateEndpointEnforcementEnabled); - return message; - }; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cidrBlocks = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.cidrBlocks && message.cidrBlocks.length) { - object.cidrBlocks = []; - for (var j = 0; j < message.cidrBlocks.length; ++j) - object.cidrBlocks[j] = $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); - } - if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { - object.gcpPublicCidrsAccessEnabled = message.gcpPublicCidrsAccessEnabled; - if (options.oneofs) - object._gcpPublicCidrsAccessEnabled = "gcpPublicCidrsAccessEnabled"; - } - if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { - object.privateEndpointEnforcementEnabled = message.privateEndpointEnforcementEnabled; - if (options.oneofs) - object._privateEndpointEnforcementEnabled = "privateEndpointEnforcementEnabled"; - } - return object; - }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @function toJSON - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @instance - * @returns {Object.} JSON object - */ - MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @function getTypeUrl - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MasterAuthorizedNetworksConfig"; - }; - - MasterAuthorizedNetworksConfig.CidrBlock = (function() { - - /** - * Properties of a CidrBlock. - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @interface ICidrBlock - * @property {string|null} [displayName] CidrBlock displayName - * @property {string|null} [cidrBlock] CidrBlock cidrBlock - */ - - /** - * Constructs a new CidrBlock. - * @memberof google.container.v1.MasterAuthorizedNetworksConfig - * @classdesc Represents a CidrBlock. - * @implements ICidrBlock - * @constructor - * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - */ - function CidrBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CidrBlock displayName. - * @member {string} displayName - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.displayName = ""; - - /** - * CidrBlock cidrBlock. - * @member {string} cidrBlock - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.cidrBlock = ""; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @function create - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance - */ - CidrBlock.create = function create(properties) { - return new CidrBlock(properties); - }; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); - return writer; - }; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.cidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CidrBlock message. - * @function verify - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CidrBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - if (!$util.isString(message.cidrBlock)) - return "cidrBlock: string expected"; - return null; - }; - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - */ - CidrBlock.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock) - return object; - var message = new $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.cidrBlock != null) - message.cidrBlock = String(object.cidrBlock); - return message; - }; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CidrBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.cidrBlock = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - object.cidrBlock = message.cidrBlock; - return object; - }; - - /** - * Converts this CidrBlock to JSON. - * @function toJSON - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - * @returns {Object.} JSON object - */ - CidrBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CidrBlock - * @function getTypeUrl - * @memberof google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock"; - }; - - return CidrBlock; - })(); - - return MasterAuthorizedNetworksConfig; - })(); - - v1.LegacyAbac = (function() { - - /** - * Properties of a LegacyAbac. - * @memberof google.container.v1 - * @interface ILegacyAbac - * @property {boolean|null} [enabled] LegacyAbac enabled - */ - - /** - * Constructs a new LegacyAbac. - * @memberof google.container.v1 - * @classdesc Represents a LegacyAbac. - * @implements ILegacyAbac - * @constructor - * @param {google.container.v1.ILegacyAbac=} [properties] Properties to set - */ - function LegacyAbac(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LegacyAbac enabled. - * @member {boolean} enabled - * @memberof google.container.v1.LegacyAbac - * @instance - */ - LegacyAbac.prototype.enabled = false; - - /** - * Creates a new LegacyAbac instance using the specified properties. - * @function create - * @memberof google.container.v1.LegacyAbac - * @static - * @param {google.container.v1.ILegacyAbac=} [properties] Properties to set - * @returns {google.container.v1.LegacyAbac} LegacyAbac instance - */ - LegacyAbac.create = function create(properties) { - return new LegacyAbac(properties); - }; - - /** - * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LegacyAbac - * @static - * @param {google.container.v1.ILegacyAbac} message LegacyAbac message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LegacyAbac.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1.LegacyAbac.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LegacyAbac - * @static - * @param {google.container.v1.ILegacyAbac} message LegacyAbac message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LegacyAbac.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LegacyAbac - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LegacyAbac} LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LegacyAbac.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LegacyAbac(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LegacyAbac - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LegacyAbac} LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LegacyAbac.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LegacyAbac message. - * @function verify - * @memberof google.container.v1.LegacyAbac - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LegacyAbac.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LegacyAbac - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LegacyAbac} LegacyAbac - */ - LegacyAbac.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LegacyAbac) - return object; - var message = new $root.google.container.v1.LegacyAbac(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LegacyAbac - * @static - * @param {google.container.v1.LegacyAbac} message LegacyAbac - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LegacyAbac.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this LegacyAbac to JSON. - * @function toJSON - * @memberof google.container.v1.LegacyAbac - * @instance - * @returns {Object.} JSON object - */ - LegacyAbac.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LegacyAbac - * @function getTypeUrl - * @memberof google.container.v1.LegacyAbac - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LegacyAbac.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LegacyAbac"; - }; - - return LegacyAbac; - })(); - - v1.NetworkPolicy = (function() { - - /** - * Properties of a NetworkPolicy. - * @memberof google.container.v1 - * @interface INetworkPolicy - * @property {google.container.v1.NetworkPolicy.Provider|null} [provider] NetworkPolicy provider - * @property {boolean|null} [enabled] NetworkPolicy enabled - */ - - /** - * Constructs a new NetworkPolicy. - * @memberof google.container.v1 - * @classdesc Represents a NetworkPolicy. - * @implements INetworkPolicy - * @constructor - * @param {google.container.v1.INetworkPolicy=} [properties] Properties to set - */ - function NetworkPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPolicy provider. - * @member {google.container.v1.NetworkPolicy.Provider} provider - * @memberof google.container.v1.NetworkPolicy - * @instance - */ - NetworkPolicy.prototype.provider = 0; - - /** - * NetworkPolicy enabled. - * @member {boolean} enabled - * @memberof google.container.v1.NetworkPolicy - * @instance - */ - NetworkPolicy.prototype.enabled = false; - - /** - * Creates a new NetworkPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {google.container.v1.INetworkPolicy=} [properties] Properties to set - * @returns {google.container.v1.NetworkPolicy} NetworkPolicy instance - */ - NetworkPolicy.create = function create(properties) { - return new NetworkPolicy(properties); - }; - - /** - * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {google.container.v1.INetworkPolicy} message NetworkPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1.NetworkPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {google.container.v1.INetworkPolicy} message NetworkPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NetworkPolicy} NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.provider = reader.int32(); - break; - } - case 2: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NetworkPolicy} NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPolicy message. - * @function verify - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - switch (message.provider) { - default: - return "provider: enum value expected"; - case 0: - case 1: - break; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NetworkPolicy} NetworkPolicy - */ - NetworkPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NetworkPolicy) - return object; - var message = new $root.google.container.v1.NetworkPolicy(); - switch (object.provider) { - default: - if (typeof object.provider === "number") { - message.provider = object.provider; - break; - } - break; - case "PROVIDER_UNSPECIFIED": - case 0: - message.provider = 0; - break; - case "CALICO": - case 1: - message.provider = 1; - break; - } - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {google.container.v1.NetworkPolicy} message NetworkPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.provider = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; - object.enabled = false; - } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = options.enums === String ? $root.google.container.v1.NetworkPolicy.Provider[message.provider] === undefined ? message.provider : $root.google.container.v1.NetworkPolicy.Provider[message.provider] : message.provider; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this NetworkPolicy to JSON. - * @function toJSON - * @memberof google.container.v1.NetworkPolicy - * @instance - * @returns {Object.} JSON object - */ - NetworkPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPolicy - * @function getTypeUrl - * @memberof google.container.v1.NetworkPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NetworkPolicy"; - }; - - /** - * Provider enum. - * @name google.container.v1.NetworkPolicy.Provider - * @enum {number} - * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value - * @property {number} CALICO=1 CALICO value - */ - NetworkPolicy.Provider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "CALICO"] = 1; - return values; - })(); - - return NetworkPolicy; - })(); - - v1.BinaryAuthorization = (function() { - - /** - * Properties of a BinaryAuthorization. - * @memberof google.container.v1 - * @interface IBinaryAuthorization - * @property {boolean|null} [enabled] BinaryAuthorization enabled - * @property {google.container.v1.BinaryAuthorization.EvaluationMode|null} [evaluationMode] BinaryAuthorization evaluationMode - */ - - /** - * Constructs a new BinaryAuthorization. - * @memberof google.container.v1 - * @classdesc Represents a BinaryAuthorization. - * @implements IBinaryAuthorization - * @constructor - * @param {google.container.v1.IBinaryAuthorization=} [properties] Properties to set - */ - function BinaryAuthorization(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BinaryAuthorization enabled. - * @member {boolean} enabled - * @memberof google.container.v1.BinaryAuthorization - * @instance - */ - BinaryAuthorization.prototype.enabled = false; - - /** - * BinaryAuthorization evaluationMode. - * @member {google.container.v1.BinaryAuthorization.EvaluationMode} evaluationMode - * @memberof google.container.v1.BinaryAuthorization - * @instance - */ - BinaryAuthorization.prototype.evaluationMode = 0; - - /** - * Creates a new BinaryAuthorization instance using the specified properties. - * @function create - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {google.container.v1.IBinaryAuthorization=} [properties] Properties to set - * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization instance - */ - BinaryAuthorization.create = function create(properties) { - return new BinaryAuthorization(properties); - }; - - /** - * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. - * @function encode - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {google.container.v1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryAuthorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.evaluationMode != null && Object.hasOwnProperty.call(message, "evaluationMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationMode); - return writer; - }; - - /** - * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1.BinaryAuthorization.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {google.container.v1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryAuthorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryAuthorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BinaryAuthorization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.evaluationMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryAuthorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinaryAuthorization message. - * @function verify - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinaryAuthorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) - switch (message.evaluationMode) { - default: - return "evaluationMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.BinaryAuthorization} BinaryAuthorization - */ - BinaryAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.BinaryAuthorization) - return object; - var message = new $root.google.container.v1.BinaryAuthorization(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - switch (object.evaluationMode) { - default: - if (typeof object.evaluationMode === "number") { - message.evaluationMode = object.evaluationMode; - break; - } - break; - case "EVALUATION_MODE_UNSPECIFIED": - case 0: - message.evaluationMode = 0; - break; - case "DISABLED": - case 1: - message.evaluationMode = 1; - break; - case "PROJECT_SINGLETON_POLICY_ENFORCE": - case 2: - message.evaluationMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {google.container.v1.BinaryAuthorization} message BinaryAuthorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinaryAuthorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.evaluationMode = options.enums === String ? "EVALUATION_MODE_UNSPECIFIED" : 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) - object.evaluationMode = options.enums === String ? $root.google.container.v1.BinaryAuthorization.EvaluationMode[message.evaluationMode] === undefined ? message.evaluationMode : $root.google.container.v1.BinaryAuthorization.EvaluationMode[message.evaluationMode] : message.evaluationMode; - return object; - }; - - /** - * Converts this BinaryAuthorization to JSON. - * @function toJSON - * @memberof google.container.v1.BinaryAuthorization - * @instance - * @returns {Object.} JSON object - */ - BinaryAuthorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BinaryAuthorization - * @function getTypeUrl - * @memberof google.container.v1.BinaryAuthorization - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BinaryAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.BinaryAuthorization"; - }; - - /** - * EvaluationMode enum. - * @name google.container.v1.BinaryAuthorization.EvaluationMode - * @enum {number} - * @property {number} EVALUATION_MODE_UNSPECIFIED=0 EVALUATION_MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} PROJECT_SINGLETON_POLICY_ENFORCE=2 PROJECT_SINGLETON_POLICY_ENFORCE value - */ - BinaryAuthorization.EvaluationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVALUATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "PROJECT_SINGLETON_POLICY_ENFORCE"] = 2; - return values; - })(); - - return BinaryAuthorization; - })(); - - v1.PodCIDROverprovisionConfig = (function() { - - /** - * Properties of a PodCIDROverprovisionConfig. - * @memberof google.container.v1 - * @interface IPodCIDROverprovisionConfig - * @property {boolean|null} [disable] PodCIDROverprovisionConfig disable - */ - - /** - * Constructs a new PodCIDROverprovisionConfig. - * @memberof google.container.v1 - * @classdesc Represents a PodCIDROverprovisionConfig. - * @implements IPodCIDROverprovisionConfig - * @constructor - * @param {google.container.v1.IPodCIDROverprovisionConfig=} [properties] Properties to set - */ - function PodCIDROverprovisionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PodCIDROverprovisionConfig disable. - * @member {boolean} disable - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @instance - */ - PodCIDROverprovisionConfig.prototype.disable = false; - - /** - * Creates a new PodCIDROverprovisionConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1.IPodCIDROverprovisionConfig=} [properties] Properties to set - * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig instance - */ - PodCIDROverprovisionConfig.create = function create(properties) { - return new PodCIDROverprovisionConfig(properties); - }; - - /** - * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodCIDROverprovisionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); - return writer; - }; - - /** - * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1.PodCIDROverprovisionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodCIDROverprovisionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodCIDROverprovisionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.PodCIDROverprovisionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disable = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodCIDROverprovisionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PodCIDROverprovisionConfig message. - * @function verify - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PodCIDROverprovisionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disable != null && message.hasOwnProperty("disable")) - if (typeof message.disable !== "boolean") - return "disable: boolean expected"; - return null; - }; - - /** - * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - */ - PodCIDROverprovisionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.PodCIDROverprovisionConfig) - return object; - var message = new $root.google.container.v1.PodCIDROverprovisionConfig(); - if (object.disable != null) - message.disable = Boolean(object.disable); - return message; - }; - - /** - * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1.PodCIDROverprovisionConfig} message PodCIDROverprovisionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PodCIDROverprovisionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disable = false; - if (message.disable != null && message.hasOwnProperty("disable")) - object.disable = message.disable; - return object; - }; - - /** - * Converts this PodCIDROverprovisionConfig to JSON. - * @function toJSON - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @instance - * @returns {Object.} JSON object - */ - PodCIDROverprovisionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PodCIDROverprovisionConfig - * @function getTypeUrl - * @memberof google.container.v1.PodCIDROverprovisionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PodCIDROverprovisionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.PodCIDROverprovisionConfig"; - }; - - return PodCIDROverprovisionConfig; - })(); - - v1.IPAllocationPolicy = (function() { - - /** - * Properties of a IPAllocationPolicy. - * @memberof google.container.v1 - * @interface IIPAllocationPolicy - * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases - * @property {boolean|null} [createSubnetwork] IPAllocationPolicy createSubnetwork - * @property {string|null} [subnetworkName] IPAllocationPolicy subnetworkName - * @property {string|null} [clusterIpv4Cidr] IPAllocationPolicy clusterIpv4Cidr - * @property {string|null} [nodeIpv4Cidr] IPAllocationPolicy nodeIpv4Cidr - * @property {string|null} [servicesIpv4Cidr] IPAllocationPolicy servicesIpv4Cidr - * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName - * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName - * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock - * @property {string|null} [nodeIpv4CidrBlock] IPAllocationPolicy nodeIpv4CidrBlock - * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock - * @property {string|null} [tpuIpv4CidrBlock] IPAllocationPolicy tpuIpv4CidrBlock - * @property {boolean|null} [useRoutes] IPAllocationPolicy useRoutes - * @property {google.container.v1.StackType|null} [stackType] IPAllocationPolicy stackType - * @property {google.container.v1.IPv6AccessType|null} [ipv6AccessType] IPAllocationPolicy ipv6AccessType - * @property {google.container.v1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] IPAllocationPolicy podCidrOverprovisionConfig - * @property {string|null} [subnetIpv6CidrBlock] IPAllocationPolicy subnetIpv6CidrBlock - * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock - * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] IPAllocationPolicy additionalPodRangesConfig - * @property {number|null} [defaultPodIpv4RangeUtilization] IPAllocationPolicy defaultPodIpv4RangeUtilization - */ - - /** - * Constructs a new IPAllocationPolicy. - * @memberof google.container.v1 - * @classdesc Represents a IPAllocationPolicy. - * @implements IIPAllocationPolicy - * @constructor - * @param {google.container.v1.IIPAllocationPolicy=} [properties] Properties to set - */ - function IPAllocationPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IPAllocationPolicy useIpAliases. - * @member {boolean} useIpAliases - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useIpAliases = false; - - /** - * IPAllocationPolicy createSubnetwork. - * @member {boolean} createSubnetwork - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.createSubnetwork = false; - - /** - * IPAllocationPolicy subnetworkName. - * @member {string} subnetworkName - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.subnetworkName = ""; - - /** - * IPAllocationPolicy clusterIpv4Cidr. - * @member {string} clusterIpv4Cidr - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4Cidr = ""; - - /** - * IPAllocationPolicy nodeIpv4Cidr. - * @member {string} nodeIpv4Cidr - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.nodeIpv4Cidr = ""; - - /** - * IPAllocationPolicy servicesIpv4Cidr. - * @member {string} servicesIpv4Cidr - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4Cidr = ""; - - /** - * IPAllocationPolicy clusterSecondaryRangeName. - * @member {string} clusterSecondaryRangeName - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; - - /** - * IPAllocationPolicy servicesSecondaryRangeName. - * @member {string} servicesSecondaryRangeName - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; - - /** - * IPAllocationPolicy clusterIpv4CidrBlock. - * @member {string} clusterIpv4CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy nodeIpv4CidrBlock. - * @member {string} nodeIpv4CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.nodeIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy servicesIpv4CidrBlock. - * @member {string} servicesIpv4CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy tpuIpv4CidrBlock. - * @member {string} tpuIpv4CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.tpuIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy useRoutes. - * @member {boolean} useRoutes - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useRoutes = false; - - /** - * IPAllocationPolicy stackType. - * @member {google.container.v1.StackType} stackType - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.stackType = 0; - - /** - * IPAllocationPolicy ipv6AccessType. - * @member {google.container.v1.IPv6AccessType} ipv6AccessType - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.ipv6AccessType = 0; - - /** - * IPAllocationPolicy podCidrOverprovisionConfig. - * @member {google.container.v1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.podCidrOverprovisionConfig = null; - - /** - * IPAllocationPolicy subnetIpv6CidrBlock. - * @member {string} subnetIpv6CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.subnetIpv6CidrBlock = ""; - - /** - * IPAllocationPolicy servicesIpv6CidrBlock. - * @member {string} servicesIpv6CidrBlock - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv6CidrBlock = ""; - - /** - * IPAllocationPolicy additionalPodRangesConfig. - * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.additionalPodRangesConfig = null; - - /** - * IPAllocationPolicy defaultPodIpv4RangeUtilization. - * @member {number} defaultPodIpv4RangeUtilization - * @memberof google.container.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.defaultPodIpv4RangeUtilization = 0; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {google.container.v1.IIPAllocationPolicy=} [properties] Properties to set - * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy instance - */ - IPAllocationPolicy.create = function create(properties) { - return new IPAllocationPolicy(properties); - }; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {google.container.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); - if (message.createSubnetwork != null && Object.hasOwnProperty.call(message, "createSubnetwork")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.createSubnetwork); - if (message.subnetworkName != null && Object.hasOwnProperty.call(message, "subnetworkName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetworkName); - if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4Cidr); - if (message.nodeIpv4Cidr != null && Object.hasOwnProperty.call(message, "nodeIpv4Cidr")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeIpv4Cidr); - if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.servicesIpv4Cidr); - if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.clusterSecondaryRangeName); - if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.servicesSecondaryRangeName); - if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4CidrBlock); - if (message.nodeIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrBlock")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.nodeIpv4CidrBlock); - if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.servicesIpv4CidrBlock); - if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.tpuIpv4CidrBlock); - if (message.useRoutes != null && Object.hasOwnProperty.call(message, "useRoutes")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.useRoutes); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ipv6AccessType); - if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) - $root.google.container.v1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.subnetIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "subnetIpv6CidrBlock")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.subnetIpv6CidrBlock); - if (message.servicesIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv6CidrBlock")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.servicesIpv6CidrBlock); - if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) - $root.google.container.v1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.defaultPodIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "defaultPodIpv4RangeUtilization")) - writer.uint32(/* id 25, wireType 1 =*/201).double(message.defaultPodIpv4RangeUtilization); - return writer; - }; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1.IPAllocationPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {google.container.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IPAllocationPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.useIpAliases = reader.bool(); - break; - } - case 2: { - message.createSubnetwork = reader.bool(); - break; - } - case 3: { - message.subnetworkName = reader.string(); - break; - } - case 4: { - message.clusterIpv4Cidr = reader.string(); - break; - } - case 5: { - message.nodeIpv4Cidr = reader.string(); - break; - } - case 6: { - message.servicesIpv4Cidr = reader.string(); - break; - } - case 7: { - message.clusterSecondaryRangeName = reader.string(); - break; - } - case 8: { - message.servicesSecondaryRangeName = reader.string(); - break; - } - case 9: { - message.clusterIpv4CidrBlock = reader.string(); - break; - } - case 10: { - message.nodeIpv4CidrBlock = reader.string(); - break; - } - case 11: { - message.servicesIpv4CidrBlock = reader.string(); - break; - } - case 13: { - message.tpuIpv4CidrBlock = reader.string(); - break; - } - case 15: { - message.useRoutes = reader.bool(); - break; - } - case 16: { - message.stackType = reader.int32(); - break; - } - case 17: { - message.ipv6AccessType = reader.int32(); - break; - } - case 21: { - message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.subnetIpv6CidrBlock = reader.string(); - break; - } - case 23: { - message.servicesIpv6CidrBlock = reader.string(); - break; - } - case 24: { - message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 25: { - message.defaultPodIpv4RangeUtilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a IPAllocationPolicy message. - * @function verify - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IPAllocationPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - if (typeof message.useIpAliases !== "boolean") - return "useIpAliases: boolean expected"; - if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) - if (typeof message.createSubnetwork !== "boolean") - return "createSubnetwork: boolean expected"; - if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) - if (!$util.isString(message.subnetworkName)) - return "subnetworkName: string expected"; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - if (!$util.isString(message.clusterIpv4Cidr)) - return "clusterIpv4Cidr: string expected"; - if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) - if (!$util.isString(message.nodeIpv4Cidr)) - return "nodeIpv4Cidr: string expected"; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - if (!$util.isString(message.servicesIpv4Cidr)) - return "servicesIpv4Cidr: string expected"; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - if (!$util.isString(message.clusterSecondaryRangeName)) - return "clusterSecondaryRangeName: string expected"; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - if (!$util.isString(message.servicesSecondaryRangeName)) - return "servicesSecondaryRangeName: string expected"; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - if (!$util.isString(message.clusterIpv4CidrBlock)) - return "clusterIpv4CidrBlock: string expected"; - if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) - if (!$util.isString(message.nodeIpv4CidrBlock)) - return "nodeIpv4CidrBlock: string expected"; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - if (!$util.isString(message.servicesIpv4CidrBlock)) - return "servicesIpv4CidrBlock: string expected"; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - if (!$util.isString(message.tpuIpv4CidrBlock)) - return "tpuIpv4CidrBlock: string expected"; - if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) - if (typeof message.useRoutes !== "boolean") - return "useRoutes: boolean expected"; - if (message.stackType != null && message.hasOwnProperty("stackType")) - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { - var error = $root.google.container.v1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); - if (error) - return "podCidrOverprovisionConfig." + error; - } - if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) - if (!$util.isString(message.subnetIpv6CidrBlock)) - return "subnetIpv6CidrBlock: string expected"; - if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) - if (!$util.isString(message.servicesIpv6CidrBlock)) - return "servicesIpv6CidrBlock: string expected"; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { - var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); - if (error) - return "additionalPodRangesConfig." + error; - } - if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) - if (typeof message.defaultPodIpv4RangeUtilization !== "number") - return "defaultPodIpv4RangeUtilization: number expected"; - return null; - }; - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.IPAllocationPolicy} IPAllocationPolicy - */ - IPAllocationPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.IPAllocationPolicy) - return object; - var message = new $root.google.container.v1.IPAllocationPolicy(); - if (object.useIpAliases != null) - message.useIpAliases = Boolean(object.useIpAliases); - if (object.createSubnetwork != null) - message.createSubnetwork = Boolean(object.createSubnetwork); - if (object.subnetworkName != null) - message.subnetworkName = String(object.subnetworkName); - if (object.clusterIpv4Cidr != null) - message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); - if (object.nodeIpv4Cidr != null) - message.nodeIpv4Cidr = String(object.nodeIpv4Cidr); - if (object.servicesIpv4Cidr != null) - message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); - if (object.clusterSecondaryRangeName != null) - message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); - if (object.servicesSecondaryRangeName != null) - message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); - if (object.clusterIpv4CidrBlock != null) - message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); - if (object.nodeIpv4CidrBlock != null) - message.nodeIpv4CidrBlock = String(object.nodeIpv4CidrBlock); - if (object.servicesIpv4CidrBlock != null) - message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); - if (object.tpuIpv4CidrBlock != null) - message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); - if (object.useRoutes != null) - message.useRoutes = Boolean(object.useRoutes); - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "IPV6_ACCESS_TYPE_UNSPECIFIED": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.podCidrOverprovisionConfig != null) { - if (typeof object.podCidrOverprovisionConfig !== "object") - throw TypeError(".google.container.v1.IPAllocationPolicy.podCidrOverprovisionConfig: object expected"); - message.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); - } - if (object.subnetIpv6CidrBlock != null) - message.subnetIpv6CidrBlock = String(object.subnetIpv6CidrBlock); - if (object.servicesIpv6CidrBlock != null) - message.servicesIpv6CidrBlock = String(object.servicesIpv6CidrBlock); - if (object.additionalPodRangesConfig != null) { - if (typeof object.additionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1.IPAllocationPolicy.additionalPodRangesConfig: object expected"); - message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); - } - if (object.defaultPodIpv4RangeUtilization != null) - message.defaultPodIpv4RangeUtilization = Number(object.defaultPodIpv4RangeUtilization); - return message; - }; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {google.container.v1.IPAllocationPolicy} message IPAllocationPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IPAllocationPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.useIpAliases = false; - object.createSubnetwork = false; - object.subnetworkName = ""; - object.clusterIpv4Cidr = ""; - object.nodeIpv4Cidr = ""; - object.servicesIpv4Cidr = ""; - object.clusterSecondaryRangeName = ""; - object.servicesSecondaryRangeName = ""; - object.clusterIpv4CidrBlock = ""; - object.nodeIpv4CidrBlock = ""; - object.servicesIpv4CidrBlock = ""; - object.tpuIpv4CidrBlock = ""; - object.useRoutes = false; - object.stackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; - object.ipv6AccessType = options.enums === String ? "IPV6_ACCESS_TYPE_UNSPECIFIED" : 0; - object.podCidrOverprovisionConfig = null; - object.subnetIpv6CidrBlock = ""; - object.servicesIpv6CidrBlock = ""; - object.additionalPodRangesConfig = null; - object.defaultPodIpv4RangeUtilization = 0; - } - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - object.useIpAliases = message.useIpAliases; - if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) - object.createSubnetwork = message.createSubnetwork; - if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) - object.subnetworkName = message.subnetworkName; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - object.clusterIpv4Cidr = message.clusterIpv4Cidr; - if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) - object.nodeIpv4Cidr = message.nodeIpv4Cidr; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - object.servicesIpv4Cidr = message.servicesIpv4Cidr; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; - if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) - object.nodeIpv4CidrBlock = message.nodeIpv4CidrBlock; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; - if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) - object.useRoutes = message.useRoutes; - if (message.stackType != null && message.hasOwnProperty("stackType")) - object.stackType = options.enums === String ? $root.google.container.v1.StackType[message.stackType] === undefined ? message.stackType : $root.google.container.v1.StackType[message.stackType] : message.stackType; - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) - object.ipv6AccessType = options.enums === String ? $root.google.container.v1.IPv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.container.v1.IPv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) - object.podCidrOverprovisionConfig = $root.google.container.v1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); - if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) - object.subnetIpv6CidrBlock = message.subnetIpv6CidrBlock; - if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) - object.servicesIpv6CidrBlock = message.servicesIpv6CidrBlock; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) - object.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); - if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) - object.defaultPodIpv4RangeUtilization = options.json && !isFinite(message.defaultPodIpv4RangeUtilization) ? String(message.defaultPodIpv4RangeUtilization) : message.defaultPodIpv4RangeUtilization; - return object; - }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @function toJSON - * @memberof google.container.v1.IPAllocationPolicy - * @instance - * @returns {Object.} JSON object - */ - IPAllocationPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IPAllocationPolicy - * @function getTypeUrl - * @memberof google.container.v1.IPAllocationPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.IPAllocationPolicy"; - }; - - return IPAllocationPolicy; - })(); - - v1.Cluster = (function() { - - /** - * Properties of a Cluster. - * @memberof google.container.v1 - * @interface ICluster - * @property {string|null} [name] Cluster name - * @property {string|null} [description] Cluster description - * @property {number|null} [initialNodeCount] Cluster initialNodeCount - * @property {google.container.v1.INodeConfig|null} [nodeConfig] Cluster nodeConfig - * @property {google.container.v1.IMasterAuth|null} [masterAuth] Cluster masterAuth - * @property {string|null} [loggingService] Cluster loggingService - * @property {string|null} [monitoringService] Cluster monitoringService - * @property {string|null} [network] Cluster network - * @property {string|null} [clusterIpv4Cidr] Cluster clusterIpv4Cidr - * @property {google.container.v1.IAddonsConfig|null} [addonsConfig] Cluster addonsConfig - * @property {string|null} [subnetwork] Cluster subnetwork - * @property {Array.|null} [nodePools] Cluster nodePools - * @property {Array.|null} [locations] Cluster locations - * @property {boolean|null} [enableKubernetesAlpha] Cluster enableKubernetesAlpha - * @property {Object.|null} [resourceLabels] Cluster resourceLabels - * @property {string|null} [labelFingerprint] Cluster labelFingerprint - * @property {google.container.v1.ILegacyAbac|null} [legacyAbac] Cluster legacyAbac - * @property {google.container.v1.INetworkPolicy|null} [networkPolicy] Cluster networkPolicy - * @property {google.container.v1.IIPAllocationPolicy|null} [ipAllocationPolicy] Cluster ipAllocationPolicy - * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] Cluster masterAuthorizedNetworksConfig - * @property {google.container.v1.IMaintenancePolicy|null} [maintenancePolicy] Cluster maintenancePolicy - * @property {google.container.v1.IBinaryAuthorization|null} [binaryAuthorization] Cluster binaryAuthorization - * @property {google.container.v1.IClusterAutoscaling|null} [autoscaling] Cluster autoscaling - * @property {google.container.v1.INetworkConfig|null} [networkConfig] Cluster networkConfig - * @property {google.container.v1.IMaxPodsConstraint|null} [defaultMaxPodsConstraint] Cluster defaultMaxPodsConstraint - * @property {google.container.v1.IResourceUsageExportConfig|null} [resourceUsageExportConfig] Cluster resourceUsageExportConfig - * @property {google.container.v1.IAuthenticatorGroupsConfig|null} [authenticatorGroupsConfig] Cluster authenticatorGroupsConfig - * @property {google.container.v1.IPrivateClusterConfig|null} [privateClusterConfig] Cluster privateClusterConfig - * @property {google.container.v1.IDatabaseEncryption|null} [databaseEncryption] Cluster databaseEncryption - * @property {google.container.v1.IVerticalPodAutoscaling|null} [verticalPodAutoscaling] Cluster verticalPodAutoscaling - * @property {google.container.v1.IShieldedNodes|null} [shieldedNodes] Cluster shieldedNodes - * @property {google.container.v1.IReleaseChannel|null} [releaseChannel] Cluster releaseChannel - * @property {google.container.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] Cluster workloadIdentityConfig - * @property {google.container.v1.IMeshCertificates|null} [meshCertificates] Cluster meshCertificates - * @property {google.container.v1.ICostManagementConfig|null} [costManagementConfig] Cluster costManagementConfig - * @property {google.container.v1.INotificationConfig|null} [notificationConfig] Cluster notificationConfig - * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] Cluster confidentialNodes - * @property {google.container.v1.IIdentityServiceConfig|null} [identityServiceConfig] Cluster identityServiceConfig - * @property {string|null} [selfLink] Cluster selfLink - * @property {string|null} [zone] Cluster zone - * @property {string|null} [endpoint] Cluster endpoint - * @property {string|null} [initialClusterVersion] Cluster initialClusterVersion - * @property {string|null} [currentMasterVersion] Cluster currentMasterVersion - * @property {string|null} [currentNodeVersion] Cluster currentNodeVersion - * @property {string|null} [createTime] Cluster createTime - * @property {google.container.v1.Cluster.Status|null} [status] Cluster status - * @property {string|null} [statusMessage] Cluster statusMessage - * @property {number|null} [nodeIpv4CidrSize] Cluster nodeIpv4CidrSize - * @property {string|null} [servicesIpv4Cidr] Cluster servicesIpv4Cidr - * @property {Array.|null} [instanceGroupUrls] Cluster instanceGroupUrls - * @property {number|null} [currentNodeCount] Cluster currentNodeCount - * @property {string|null} [expireTime] Cluster expireTime - * @property {string|null} [location] Cluster location - * @property {boolean|null} [enableTpu] Cluster enableTpu - * @property {string|null} [tpuIpv4CidrBlock] Cluster tpuIpv4CidrBlock - * @property {Array.|null} [conditions] Cluster conditions - * @property {google.container.v1.IAutopilot|null} [autopilot] Cluster autopilot - * @property {string|null} [id] Cluster id - * @property {google.container.v1.INodePoolDefaults|null} [nodePoolDefaults] Cluster nodePoolDefaults - * @property {google.container.v1.ILoggingConfig|null} [loggingConfig] Cluster loggingConfig - * @property {google.container.v1.IMonitoringConfig|null} [monitoringConfig] Cluster monitoringConfig - * @property {google.container.v1.INodePoolAutoConfig|null} [nodePoolAutoConfig] Cluster nodePoolAutoConfig - * @property {string|null} [etag] Cluster etag - * @property {google.container.v1.IFleet|null} [fleet] Cluster fleet - * @property {google.container.v1.ISecurityPostureConfig|null} [securityPostureConfig] Cluster securityPostureConfig - * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [controlPlaneEndpointsConfig] Cluster controlPlaneEndpointsConfig - * @property {google.container.v1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] Cluster enableK8sBetaApis - * @property {google.container.v1.IEnterpriseConfig|null} [enterpriseConfig] Cluster enterpriseConfig - * @property {google.container.v1.ISecretManagerConfig|null} [secretManagerConfig] Cluster secretManagerConfig - * @property {google.container.v1.ICompliancePostureConfig|null} [compliancePostureConfig] Cluster compliancePostureConfig - * @property {boolean|null} [satisfiesPzs] Cluster satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi - * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] Cluster userManagedKeysConfig - * @property {google.container.v1.IRBACBindingConfig|null} [rbacBindingConfig] Cluster rbacBindingConfig - */ - - /** - * Constructs a new Cluster. - * @memberof google.container.v1 - * @classdesc Represents a Cluster. - * @implements ICluster - * @constructor - * @param {google.container.v1.ICluster=} [properties] Properties to set - */ - function Cluster(properties) { - this.nodePools = []; - this.locations = []; - this.resourceLabels = {}; - this.instanceGroupUrls = []; - this.conditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Cluster name. - * @member {string} name - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.name = ""; - - /** - * Cluster description. - * @member {string} description - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.description = ""; - - /** - * Cluster initialNodeCount. - * @member {number} initialNodeCount - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.initialNodeCount = 0; - - /** - * Cluster nodeConfig. - * @member {google.container.v1.INodeConfig|null|undefined} nodeConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.nodeConfig = null; - - /** - * Cluster masterAuth. - * @member {google.container.v1.IMasterAuth|null|undefined} masterAuth - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.masterAuth = null; - - /** - * Cluster loggingService. - * @member {string} loggingService - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.loggingService = ""; - - /** - * Cluster monitoringService. - * @member {string} monitoringService - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.monitoringService = ""; - - /** - * Cluster network. - * @member {string} network - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.network = ""; - - /** - * Cluster clusterIpv4Cidr. - * @member {string} clusterIpv4Cidr - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.clusterIpv4Cidr = ""; - - /** - * Cluster addonsConfig. - * @member {google.container.v1.IAddonsConfig|null|undefined} addonsConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.addonsConfig = null; - - /** - * Cluster subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.subnetwork = ""; - - /** - * Cluster nodePools. - * @member {Array.} nodePools - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.nodePools = $util.emptyArray; - - /** - * Cluster locations. - * @member {Array.} locations - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.locations = $util.emptyArray; - - /** - * Cluster enableKubernetesAlpha. - * @member {boolean} enableKubernetesAlpha - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.enableKubernetesAlpha = false; - - /** - * Cluster resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.resourceLabels = $util.emptyObject; - - /** - * Cluster labelFingerprint. - * @member {string} labelFingerprint - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.labelFingerprint = ""; - - /** - * Cluster legacyAbac. - * @member {google.container.v1.ILegacyAbac|null|undefined} legacyAbac - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.legacyAbac = null; - - /** - * Cluster networkPolicy. - * @member {google.container.v1.INetworkPolicy|null|undefined} networkPolicy - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.networkPolicy = null; - - /** - * Cluster ipAllocationPolicy. - * @member {google.container.v1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.ipAllocationPolicy = null; - - /** - * Cluster masterAuthorizedNetworksConfig. - * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.masterAuthorizedNetworksConfig = null; - - /** - * Cluster maintenancePolicy. - * @member {google.container.v1.IMaintenancePolicy|null|undefined} maintenancePolicy - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.maintenancePolicy = null; - - /** - * Cluster binaryAuthorization. - * @member {google.container.v1.IBinaryAuthorization|null|undefined} binaryAuthorization - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.binaryAuthorization = null; - - /** - * Cluster autoscaling. - * @member {google.container.v1.IClusterAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.autoscaling = null; - - /** - * Cluster networkConfig. - * @member {google.container.v1.INetworkConfig|null|undefined} networkConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.networkConfig = null; - - /** - * Cluster defaultMaxPodsConstraint. - * @member {google.container.v1.IMaxPodsConstraint|null|undefined} defaultMaxPodsConstraint - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.defaultMaxPodsConstraint = null; - - /** - * Cluster resourceUsageExportConfig. - * @member {google.container.v1.IResourceUsageExportConfig|null|undefined} resourceUsageExportConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.resourceUsageExportConfig = null; - - /** - * Cluster authenticatorGroupsConfig. - * @member {google.container.v1.IAuthenticatorGroupsConfig|null|undefined} authenticatorGroupsConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.authenticatorGroupsConfig = null; - - /** - * Cluster privateClusterConfig. - * @member {google.container.v1.IPrivateClusterConfig|null|undefined} privateClusterConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.privateClusterConfig = null; - - /** - * Cluster databaseEncryption. - * @member {google.container.v1.IDatabaseEncryption|null|undefined} databaseEncryption - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.databaseEncryption = null; - - /** - * Cluster verticalPodAutoscaling. - * @member {google.container.v1.IVerticalPodAutoscaling|null|undefined} verticalPodAutoscaling - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.verticalPodAutoscaling = null; - - /** - * Cluster shieldedNodes. - * @member {google.container.v1.IShieldedNodes|null|undefined} shieldedNodes - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.shieldedNodes = null; - - /** - * Cluster releaseChannel. - * @member {google.container.v1.IReleaseChannel|null|undefined} releaseChannel - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.releaseChannel = null; - - /** - * Cluster workloadIdentityConfig. - * @member {google.container.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.workloadIdentityConfig = null; - - /** - * Cluster meshCertificates. - * @member {google.container.v1.IMeshCertificates|null|undefined} meshCertificates - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.meshCertificates = null; - - /** - * Cluster costManagementConfig. - * @member {google.container.v1.ICostManagementConfig|null|undefined} costManagementConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.costManagementConfig = null; - - /** - * Cluster notificationConfig. - * @member {google.container.v1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.notificationConfig = null; - - /** - * Cluster confidentialNodes. - * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.confidentialNodes = null; - - /** - * Cluster identityServiceConfig. - * @member {google.container.v1.IIdentityServiceConfig|null|undefined} identityServiceConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.identityServiceConfig = null; - - /** - * Cluster selfLink. - * @member {string} selfLink - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.selfLink = ""; - - /** - * Cluster zone. - * @member {string} zone - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.zone = ""; - - /** - * Cluster endpoint. - * @member {string} endpoint - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.endpoint = ""; - - /** - * Cluster initialClusterVersion. - * @member {string} initialClusterVersion - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.initialClusterVersion = ""; - - /** - * Cluster currentMasterVersion. - * @member {string} currentMasterVersion - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.currentMasterVersion = ""; - - /** - * Cluster currentNodeVersion. - * @member {string} currentNodeVersion - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.currentNodeVersion = ""; - - /** - * Cluster createTime. - * @member {string} createTime - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.createTime = ""; - - /** - * Cluster status. - * @member {google.container.v1.Cluster.Status} status - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.status = 0; - - /** - * Cluster statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.statusMessage = ""; - - /** - * Cluster nodeIpv4CidrSize. - * @member {number} nodeIpv4CidrSize - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.nodeIpv4CidrSize = 0; - - /** - * Cluster servicesIpv4Cidr. - * @member {string} servicesIpv4Cidr - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.servicesIpv4Cidr = ""; - - /** - * Cluster instanceGroupUrls. - * @member {Array.} instanceGroupUrls - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.instanceGroupUrls = $util.emptyArray; - - /** - * Cluster currentNodeCount. - * @member {number} currentNodeCount - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.currentNodeCount = 0; - - /** - * Cluster expireTime. - * @member {string} expireTime - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.expireTime = ""; - - /** - * Cluster location. - * @member {string} location - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.location = ""; - - /** - * Cluster enableTpu. - * @member {boolean} enableTpu - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.enableTpu = false; - - /** - * Cluster tpuIpv4CidrBlock. - * @member {string} tpuIpv4CidrBlock - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.tpuIpv4CidrBlock = ""; - - /** - * Cluster conditions. - * @member {Array.} conditions - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.conditions = $util.emptyArray; - - /** - * Cluster autopilot. - * @member {google.container.v1.IAutopilot|null|undefined} autopilot - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.autopilot = null; - - /** - * Cluster id. - * @member {string} id - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.id = ""; - - /** - * Cluster nodePoolDefaults. - * @member {google.container.v1.INodePoolDefaults|null|undefined} nodePoolDefaults - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.nodePoolDefaults = null; - - /** - * Cluster loggingConfig. - * @member {google.container.v1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.loggingConfig = null; - - /** - * Cluster monitoringConfig. - * @member {google.container.v1.IMonitoringConfig|null|undefined} monitoringConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.monitoringConfig = null; - - /** - * Cluster nodePoolAutoConfig. - * @member {google.container.v1.INodePoolAutoConfig|null|undefined} nodePoolAutoConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.nodePoolAutoConfig = null; - - /** - * Cluster etag. - * @member {string} etag - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.etag = ""; - - /** - * Cluster fleet. - * @member {google.container.v1.IFleet|null|undefined} fleet - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.fleet = null; - - /** - * Cluster securityPostureConfig. - * @member {google.container.v1.ISecurityPostureConfig|null|undefined} securityPostureConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.securityPostureConfig = null; - - /** - * Cluster controlPlaneEndpointsConfig. - * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} controlPlaneEndpointsConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.controlPlaneEndpointsConfig = null; - - /** - * Cluster enableK8sBetaApis. - * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.enableK8sBetaApis = null; - - /** - * Cluster enterpriseConfig. - * @member {google.container.v1.IEnterpriseConfig|null|undefined} enterpriseConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.enterpriseConfig = null; - - /** - * Cluster secretManagerConfig. - * @member {google.container.v1.ISecretManagerConfig|null|undefined} secretManagerConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.secretManagerConfig = null; - - /** - * Cluster compliancePostureConfig. - * @member {google.container.v1.ICompliancePostureConfig|null|undefined} compliancePostureConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.compliancePostureConfig = null; - - /** - * Cluster satisfiesPzs. - * @member {boolean|null|undefined} satisfiesPzs - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.satisfiesPzs = null; - - /** - * Cluster satisfiesPzi. - * @member {boolean|null|undefined} satisfiesPzi - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.satisfiesPzi = null; - - /** - * Cluster userManagedKeysConfig. - * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.userManagedKeysConfig = null; - - /** - * Cluster rbacBindingConfig. - * @member {google.container.v1.IRBACBindingConfig|null|undefined} rbacBindingConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Cluster.prototype.rbacBindingConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Cluster _nodePoolDefaults. - * @member {"nodePoolDefaults"|undefined} _nodePoolDefaults - * @memberof google.container.v1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_nodePoolDefaults", { - get: $util.oneOfGetter($oneOfFields = ["nodePoolDefaults"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _satisfiesPzs. - * @member {"satisfiesPzs"|undefined} _satisfiesPzs - * @memberof google.container.v1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_satisfiesPzs", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _satisfiesPzi. - * @member {"satisfiesPzi"|undefined} _satisfiesPzi - * @memberof google.container.v1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_satisfiesPzi", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _userManagedKeysConfig. - * @member {"userManagedKeysConfig"|undefined} _userManagedKeysConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_userManagedKeysConfig", { - get: $util.oneOfGetter($oneOfFields = ["userManagedKeysConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _rbacBindingConfig. - * @member {"rbacBindingConfig"|undefined} _rbacBindingConfig - * @memberof google.container.v1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_rbacBindingConfig", { - get: $util.oneOfGetter($oneOfFields = ["rbacBindingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Cluster instance using the specified properties. - * @function create - * @memberof google.container.v1.Cluster - * @static - * @param {google.container.v1.ICluster=} [properties] Properties to set - * @returns {google.container.v1.Cluster} Cluster instance - */ - Cluster.create = function create(properties) { - return new Cluster(properties); - }; - - /** - * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Cluster - * @static - * @param {google.container.v1.ICluster} message Cluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cluster.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.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); - if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) - $root.google.container.v1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.masterAuth != null && Object.hasOwnProperty.call(message, "masterAuth")) - $root.google.container.v1.MasterAuth.encode(message.masterAuth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.loggingService); - if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.monitoringService); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); - if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4Cidr); - if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) - $root.google.container.v1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.subnetwork); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.container.v1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.enableKubernetesAlpha != null && Object.hasOwnProperty.call(message, "enableKubernetesAlpha")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableKubernetesAlpha); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); - if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.labelFingerprint); - if (message.legacyAbac != null && Object.hasOwnProperty.call(message, "legacyAbac")) - $root.google.container.v1.LegacyAbac.encode(message.legacyAbac, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) - $root.google.container.v1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) - $root.google.container.v1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) - $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) - $root.google.container.v1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.binaryAuthorization != null && Object.hasOwnProperty.call(message, "binaryAuthorization")) - $root.google.container.v1.BinaryAuthorization.encode(message.binaryAuthorization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1.ClusterAutoscaling.encode(message.autoscaling, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.container.v1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.defaultMaxPodsConstraint != null && Object.hasOwnProperty.call(message, "defaultMaxPodsConstraint")) - $root.google.container.v1.MaxPodsConstraint.encode(message.defaultMaxPodsConstraint, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.resourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "resourceUsageExportConfig")) - $root.google.container.v1.ResourceUsageExportConfig.encode(message.resourceUsageExportConfig, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.authenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "authenticatorGroupsConfig")) - $root.google.container.v1.AuthenticatorGroupsConfig.encode(message.authenticatorGroupsConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) - $root.google.container.v1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) - $root.google.container.v1.DatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.verticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "verticalPodAutoscaling")) - $root.google.container.v1.VerticalPodAutoscaling.encode(message.verticalPodAutoscaling, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.shieldedNodes != null && Object.hasOwnProperty.call(message, "shieldedNodes")) - $root.google.container.v1.ShieldedNodes.encode(message.shieldedNodes, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - $root.google.container.v1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) - $root.google.container.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.costManagementConfig != null && Object.hasOwnProperty.call(message, "costManagementConfig")) - $root.google.container.v1.CostManagementConfig.encode(message.costManagementConfig, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.container.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.identityServiceConfig != null && Object.hasOwnProperty.call(message, "identityServiceConfig")) - $root.google.container.v1.IdentityServiceConfig.encode(message.identityServiceConfig, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); - if (message.meshCertificates != null && Object.hasOwnProperty.call(message, "meshCertificates")) - $root.google.container.v1.MeshCertificates.encode(message.meshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.zone); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.endpoint); - if (message.initialClusterVersion != null && Object.hasOwnProperty.call(message, "initialClusterVersion")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.initialClusterVersion); - if (message.currentMasterVersion != null && Object.hasOwnProperty.call(message, "currentMasterVersion")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.currentMasterVersion); - if (message.currentNodeVersion != null && Object.hasOwnProperty.call(message, "currentNodeVersion")) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.currentNodeVersion); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.createTime); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 108, wireType 2 =*/866).string(message.statusMessage); - if (message.nodeIpv4CidrSize != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrSize")) - writer.uint32(/* id 109, wireType 0 =*/872).int32(message.nodeIpv4CidrSize); - if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.servicesIpv4Cidr); - if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.instanceGroupUrls[i]); - if (message.currentNodeCount != null && Object.hasOwnProperty.call(message, "currentNodeCount")) - writer.uint32(/* id 112, wireType 0 =*/896).int32(message.currentNodeCount); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - writer.uint32(/* id 113, wireType 2 =*/906).string(message.expireTime); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 114, wireType 2 =*/914).string(message.location); - if (message.enableTpu != null && Object.hasOwnProperty.call(message, "enableTpu")) - writer.uint32(/* id 115, wireType 0 =*/920).bool(message.enableTpu); - if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) - writer.uint32(/* id 116, wireType 2 =*/930).string(message.tpuIpv4CidrBlock); - if (message.conditions != null && message.conditions.length) - for (var i = 0; i < message.conditions.length; ++i) - $root.google.container.v1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 118, wireType 2 =*/946).fork()).ldelim(); - if (message.autopilot != null && Object.hasOwnProperty.call(message, "autopilot")) - $root.google.container.v1.Autopilot.encode(message.autopilot, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 129, wireType 2 =*/1034).string(message.id); - if (message.nodePoolDefaults != null && Object.hasOwnProperty.call(message, "nodePoolDefaults")) - $root.google.container.v1.NodePoolDefaults.encode(message.nodePoolDefaults, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); - if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) - $root.google.container.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 133, wireType 2 =*/1066).fork()).ldelim(); - if (message.nodePoolAutoConfig != null && Object.hasOwnProperty.call(message, "nodePoolAutoConfig")) - $root.google.container.v1.NodePoolAutoConfig.encode(message.nodePoolAutoConfig, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 139, wireType 2 =*/1114).string(message.etag); - if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) - $root.google.container.v1.Fleet.encode(message.fleet, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); - if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) - $root.google.container.v1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); - if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) - $root.google.container.v1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); - if (message.controlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "controlPlaneEndpointsConfig")) - $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.controlPlaneEndpointsConfig, writer.uint32(/* id 146, wireType 2 =*/1170).fork()).ldelim(); - if (message.enterpriseConfig != null && Object.hasOwnProperty.call(message, "enterpriseConfig")) - $root.google.container.v1.EnterpriseConfig.encode(message.enterpriseConfig, writer.uint32(/* id 149, wireType 2 =*/1194).fork()).ldelim(); - if (message.secretManagerConfig != null && Object.hasOwnProperty.call(message, "secretManagerConfig")) - $root.google.container.v1.SecretManagerConfig.encode(message.secretManagerConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) - $root.google.container.v1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 151, wireType 2 =*/1210).fork()).ldelim(); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 152, wireType 0 =*/1216).bool(message.satisfiesPzs); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 153, wireType 0 =*/1224).bool(message.satisfiesPzi); - if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) - $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 154, wireType 2 =*/1234).fork()).ldelim(); - if (message.rbacBindingConfig != null && Object.hasOwnProperty.call(message, "rbacBindingConfig")) - $root.google.container.v1.RBACBindingConfig.encode(message.rbacBindingConfig, writer.uint32(/* id 156, wireType 2 =*/1250).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1.Cluster.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Cluster - * @static - * @param {google.container.v1.ICluster} message Cluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Cluster message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Cluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Cluster} Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cluster.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Cluster(), 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.initialNodeCount = reader.int32(); - break; - } - case 4: { - message.nodeConfig = $root.google.container.v1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.masterAuth = $root.google.container.v1.MasterAuth.decode(reader, reader.uint32()); - break; - } - case 6: { - message.loggingService = reader.string(); - break; - } - case 7: { - message.monitoringService = reader.string(); - break; - } - case 8: { - message.network = reader.string(); - break; - } - case 9: { - message.clusterIpv4Cidr = reader.string(); - break; - } - case 10: { - message.addonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.subnetwork = reader.string(); - break; - } - case 12: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.container.v1.NodePool.decode(reader, reader.uint32())); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.enableKubernetesAlpha = reader.bool(); - break; - } - case 15: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 16: { - message.labelFingerprint = reader.string(); - break; - } - case 18: { - message.legacyAbac = $root.google.container.v1.LegacyAbac.decode(reader, reader.uint32()); - break; - } - case 19: { - message.networkPolicy = $root.google.container.v1.NetworkPolicy.decode(reader, reader.uint32()); - break; - } - case 20: { - message.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; - } - case 22: { - message.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 23: { - message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 24: { - message.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.decode(reader, reader.uint32()); - break; - } - case 26: { - message.autoscaling = $root.google.container.v1.ClusterAutoscaling.decode(reader, reader.uint32()); - break; - } - case 27: { - message.networkConfig = $root.google.container.v1.NetworkConfig.decode(reader, reader.uint32()); - break; - } - case 30: { - message.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - case 33: { - message.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.decode(reader, reader.uint32()); - break; - } - case 34: { - message.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); - break; - } - case 37: { - message.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 38: { - message.databaseEncryption = $root.google.container.v1.DatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 39: { - message.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 40: { - message.shieldedNodes = $root.google.container.v1.ShieldedNodes.decode(reader, reader.uint32()); - break; - } - case 41: { - message.releaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 43: { - message.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); - break; - } - case 67: { - message.meshCertificates = $root.google.container.v1.MeshCertificates.decode(reader, reader.uint32()); - break; - } - case 45: { - message.costManagementConfig = $root.google.container.v1.CostManagementConfig.decode(reader, reader.uint32()); - break; - } - case 49: { - message.notificationConfig = $root.google.container.v1.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 50: { - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 54: { - message.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.selfLink = reader.string(); - break; - } - case 101: { - message.zone = reader.string(); - break; - } - case 102: { - message.endpoint = reader.string(); - break; - } - case 103: { - message.initialClusterVersion = reader.string(); - break; - } - case 104: { - message.currentMasterVersion = reader.string(); - break; - } - case 105: { - message.currentNodeVersion = reader.string(); - break; - } - case 106: { - message.createTime = reader.string(); - break; - } - case 107: { - message.status = reader.int32(); - break; - } - case 108: { - message.statusMessage = reader.string(); - break; - } - case 109: { - message.nodeIpv4CidrSize = reader.int32(); - break; - } - case 110: { - message.servicesIpv4Cidr = reader.string(); - break; - } - case 111: { - if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) - message.instanceGroupUrls = []; - message.instanceGroupUrls.push(reader.string()); - break; - } - case 112: { - message.currentNodeCount = reader.int32(); - break; - } - case 113: { - message.expireTime = reader.string(); - break; - } - case 114: { - message.location = reader.string(); - break; - } - case 115: { - message.enableTpu = reader.bool(); - break; - } - case 116: { - message.tpuIpv4CidrBlock = reader.string(); - break; - } - case 118: { - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 128: { - message.autopilot = $root.google.container.v1.Autopilot.decode(reader, reader.uint32()); - break; - } - case 129: { - message.id = reader.string(); - break; - } - case 131: { - message.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.decode(reader, reader.uint32()); - break; - } - case 132: { - message.loggingConfig = $root.google.container.v1.LoggingConfig.decode(reader, reader.uint32()); - break; - } - case 133: { - message.monitoringConfig = $root.google.container.v1.MonitoringConfig.decode(reader, reader.uint32()); - break; - } - case 136: { - message.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.decode(reader, reader.uint32()); - break; - } - case 139: { - message.etag = reader.string(); - break; - } - case 140: { - message.fleet = $root.google.container.v1.Fleet.decode(reader, reader.uint32()); - break; - } - case 145: { - message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.decode(reader, reader.uint32()); - break; - } - case 146: { - message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); - break; - } - case 143: { - message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 149: { - message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.decode(reader, reader.uint32()); - break; - } - case 150: { - message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); - break; - } - case 151: { - message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); - break; - } - case 152: { - message.satisfiesPzs = reader.bool(); - break; - } - case 153: { - message.satisfiesPzi = reader.bool(); - break; - } - case 154: { - message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); - break; - } - case 156: { - message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Cluster message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Cluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Cluster} Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cluster.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cluster message. - * @function verify - * @memberof google.container.v1.Cluster - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cluster.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - if (!$util.isInteger(message.initialNodeCount)) - return "initialNodeCount: integer expected"; - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { - var error = $root.google.container.v1.NodeConfig.verify(message.nodeConfig); - if (error) - return "nodeConfig." + error; - } - if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) { - var error = $root.google.container.v1.MasterAuth.verify(message.masterAuth); - if (error) - return "masterAuth." + error; - } - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - if (!$util.isString(message.loggingService)) - return "loggingService: string expected"; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - if (!$util.isString(message.monitoringService)) - return "monitoringService: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - if (!$util.isString(message.clusterIpv4Cidr)) - return "clusterIpv4Cidr: string expected"; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { - var error = $root.google.container.v1.AddonsConfig.verify(message.addonsConfig); - if (error) - return "addonsConfig." + error; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.container.v1.NodePool.verify(message.nodePools[i]); - if (error) - return "nodePools." + error; - } - } - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) - if (typeof message.enableKubernetesAlpha !== "boolean") - return "enableKubernetesAlpha: boolean expected"; - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - if (!$util.isString(message.labelFingerprint)) - return "labelFingerprint: string expected"; - if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) { - var error = $root.google.container.v1.LegacyAbac.verify(message.legacyAbac); - if (error) - return "legacyAbac." + error; - } - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { - var error = $root.google.container.v1.NetworkPolicy.verify(message.networkPolicy); - if (error) - return "networkPolicy." + error; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { - var error = $root.google.container.v1.IPAllocationPolicy.verify(message.ipAllocationPolicy); - if (error) - return "ipAllocationPolicy." + error; - } - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { - var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); - if (error) - return "masterAuthorizedNetworksConfig." + error; - } - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { - var error = $root.google.container.v1.MaintenancePolicy.verify(message.maintenancePolicy); - if (error) - return "maintenancePolicy." + error; - } - if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) { - var error = $root.google.container.v1.BinaryAuthorization.verify(message.binaryAuthorization); - if (error) - return "binaryAuthorization." + error; - } - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1.ClusterAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.container.v1.NetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) { - var error = $root.google.container.v1.MaxPodsConstraint.verify(message.defaultMaxPodsConstraint); - if (error) - return "defaultMaxPodsConstraint." + error; - } - if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) { - var error = $root.google.container.v1.ResourceUsageExportConfig.verify(message.resourceUsageExportConfig); - if (error) - return "resourceUsageExportConfig." + error; - } - if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) { - var error = $root.google.container.v1.AuthenticatorGroupsConfig.verify(message.authenticatorGroupsConfig); - if (error) - return "authenticatorGroupsConfig." + error; - } - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { - var error = $root.google.container.v1.PrivateClusterConfig.verify(message.privateClusterConfig); - if (error) - return "privateClusterConfig." + error; - } - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { - var error = $root.google.container.v1.DatabaseEncryption.verify(message.databaseEncryption); - if (error) - return "databaseEncryption." + error; - } - if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) { - var error = $root.google.container.v1.VerticalPodAutoscaling.verify(message.verticalPodAutoscaling); - if (error) - return "verticalPodAutoscaling." + error; - } - if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) { - var error = $root.google.container.v1.ShieldedNodes.verify(message.shieldedNodes); - if (error) - return "shieldedNodes." + error; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { - var error = $root.google.container.v1.ReleaseChannel.verify(message.releaseChannel); - if (error) - return "releaseChannel." + error; - } - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { - var error = $root.google.container.v1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); - if (error) - return "workloadIdentityConfig." + error; - } - if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) { - var error = $root.google.container.v1.MeshCertificates.verify(message.meshCertificates); - if (error) - return "meshCertificates." + error; - } - if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) { - var error = $root.google.container.v1.CostManagementConfig.verify(message.costManagementConfig); - if (error) - return "costManagementConfig." + error; - } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.container.v1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) { - var error = $root.google.container.v1.IdentityServiceConfig.verify(message.identityServiceConfig); - if (error) - return "identityServiceConfig." + error; - } - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) - if (!$util.isString(message.initialClusterVersion)) - return "initialClusterVersion: string expected"; - if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) - if (!$util.isString(message.currentMasterVersion)) - return "currentMasterVersion: string expected"; - if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) - if (!$util.isString(message.currentNodeVersion)) - return "currentNodeVersion: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) - if (!$util.isString(message.createTime)) - return "createTime: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) - if (!$util.isInteger(message.nodeIpv4CidrSize)) - return "nodeIpv4CidrSize: integer expected"; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - if (!$util.isString(message.servicesIpv4Cidr)) - return "servicesIpv4Cidr: string expected"; - if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { - if (!Array.isArray(message.instanceGroupUrls)) - return "instanceGroupUrls: array expected"; - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - if (!$util.isString(message.instanceGroupUrls[i])) - return "instanceGroupUrls: string[] expected"; - } - if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) - if (!$util.isInteger(message.currentNodeCount)) - return "currentNodeCount: integer expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - if (!$util.isString(message.expireTime)) - return "expireTime: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) - if (typeof message.enableTpu !== "boolean") - return "enableTpu: boolean expected"; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - if (!$util.isString(message.tpuIpv4CidrBlock)) - return "tpuIpv4CidrBlock: string expected"; - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) - return "conditions: array expected"; - for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.google.container.v1.StatusCondition.verify(message.conditions[i]); - if (error) - return "conditions." + error; - } - } - if (message.autopilot != null && message.hasOwnProperty("autopilot")) { - var error = $root.google.container.v1.Autopilot.verify(message.autopilot); - if (error) - return "autopilot." + error; - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { - properties._nodePoolDefaults = 1; - { - var error = $root.google.container.v1.NodePoolDefaults.verify(message.nodePoolDefaults); - if (error) - return "nodePoolDefaults." + error; - } - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1.LoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { - var error = $root.google.container.v1.MonitoringConfig.verify(message.monitoringConfig); - if (error) - return "monitoringConfig." + error; - } - if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) { - var error = $root.google.container.v1.NodePoolAutoConfig.verify(message.nodePoolAutoConfig); - if (error) - return "nodePoolAutoConfig." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.fleet != null && message.hasOwnProperty("fleet")) { - var error = $root.google.container.v1.Fleet.verify(message.fleet); - if (error) - return "fleet." + error; - } - if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) { - var error = $root.google.container.v1.SecurityPostureConfig.verify(message.securityPostureConfig); - if (error) - return "securityPostureConfig." + error; - } - if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) { - var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.controlPlaneEndpointsConfig); - if (error) - return "controlPlaneEndpointsConfig." + error; - } - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { - var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); - if (error) - return "enableK8sBetaApis." + error; - } - if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) { - var error = $root.google.container.v1.EnterpriseConfig.verify(message.enterpriseConfig); - if (error) - return "enterpriseConfig." + error; - } - if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) { - var error = $root.google.container.v1.SecretManagerConfig.verify(message.secretManagerConfig); - if (error) - return "secretManagerConfig." + error; - } - if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { - var error = $root.google.container.v1.CompliancePostureConfig.verify(message.compliancePostureConfig); - if (error) - return "compliancePostureConfig." + error; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - properties._satisfiesPzs = 1; - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - properties._satisfiesPzi = 1; - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - } - if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { - properties._userManagedKeysConfig = 1; - { - var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); - if (error) - return "userManagedKeysConfig." + error; - } - } - if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { - properties._rbacBindingConfig = 1; - { - var error = $root.google.container.v1.RBACBindingConfig.verify(message.rbacBindingConfig); - if (error) - return "rbacBindingConfig." + error; - } - } - return null; - }; - - /** - * Creates a Cluster message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Cluster - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Cluster} Cluster - */ - Cluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Cluster) - return object; - var message = new $root.google.container.v1.Cluster(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.initialNodeCount != null) - message.initialNodeCount = object.initialNodeCount | 0; - if (object.nodeConfig != null) { - if (typeof object.nodeConfig !== "object") - throw TypeError(".google.container.v1.Cluster.nodeConfig: object expected"); - message.nodeConfig = $root.google.container.v1.NodeConfig.fromObject(object.nodeConfig); - } - if (object.masterAuth != null) { - if (typeof object.masterAuth !== "object") - throw TypeError(".google.container.v1.Cluster.masterAuth: object expected"); - message.masterAuth = $root.google.container.v1.MasterAuth.fromObject(object.masterAuth); - } - if (object.loggingService != null) - message.loggingService = String(object.loggingService); - if (object.monitoringService != null) - message.monitoringService = String(object.monitoringService); - if (object.network != null) - message.network = String(object.network); - if (object.clusterIpv4Cidr != null) - message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); - if (object.addonsConfig != null) { - if (typeof object.addonsConfig !== "object") - throw TypeError(".google.container.v1.Cluster.addonsConfig: object expected"); - message.addonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.addonsConfig); - } - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.container.v1.Cluster.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.container.v1.Cluster.nodePools: object expected"); - message.nodePools[i] = $root.google.container.v1.NodePool.fromObject(object.nodePools[i]); - } - } - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1.Cluster.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.enableKubernetesAlpha != null) - message.enableKubernetesAlpha = Boolean(object.enableKubernetesAlpha); - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1.Cluster.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.labelFingerprint != null) - message.labelFingerprint = String(object.labelFingerprint); - if (object.legacyAbac != null) { - if (typeof object.legacyAbac !== "object") - throw TypeError(".google.container.v1.Cluster.legacyAbac: object expected"); - message.legacyAbac = $root.google.container.v1.LegacyAbac.fromObject(object.legacyAbac); - } - if (object.networkPolicy != null) { - if (typeof object.networkPolicy !== "object") - throw TypeError(".google.container.v1.Cluster.networkPolicy: object expected"); - message.networkPolicy = $root.google.container.v1.NetworkPolicy.fromObject(object.networkPolicy); - } - if (object.ipAllocationPolicy != null) { - if (typeof object.ipAllocationPolicy !== "object") - throw TypeError(".google.container.v1.Cluster.ipAllocationPolicy: object expected"); - message.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); - } - if (object.masterAuthorizedNetworksConfig != null) { - if (typeof object.masterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.container.v1.Cluster.masterAuthorizedNetworksConfig: object expected"); - message.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); - } - if (object.maintenancePolicy != null) { - if (typeof object.maintenancePolicy !== "object") - throw TypeError(".google.container.v1.Cluster.maintenancePolicy: object expected"); - message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.fromObject(object.maintenancePolicy); - } - if (object.binaryAuthorization != null) { - if (typeof object.binaryAuthorization !== "object") - throw TypeError(".google.container.v1.Cluster.binaryAuthorization: object expected"); - message.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.fromObject(object.binaryAuthorization); - } - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1.Cluster.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1.ClusterAutoscaling.fromObject(object.autoscaling); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.container.v1.Cluster.networkConfig: object expected"); - message.networkConfig = $root.google.container.v1.NetworkConfig.fromObject(object.networkConfig); - } - if (object.defaultMaxPodsConstraint != null) { - if (typeof object.defaultMaxPodsConstraint !== "object") - throw TypeError(".google.container.v1.Cluster.defaultMaxPodsConstraint: object expected"); - message.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.fromObject(object.defaultMaxPodsConstraint); - } - if (object.resourceUsageExportConfig != null) { - if (typeof object.resourceUsageExportConfig !== "object") - throw TypeError(".google.container.v1.Cluster.resourceUsageExportConfig: object expected"); - message.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.fromObject(object.resourceUsageExportConfig); - } - if (object.authenticatorGroupsConfig != null) { - if (typeof object.authenticatorGroupsConfig !== "object") - throw TypeError(".google.container.v1.Cluster.authenticatorGroupsConfig: object expected"); - message.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.fromObject(object.authenticatorGroupsConfig); - } - if (object.privateClusterConfig != null) { - if (typeof object.privateClusterConfig !== "object") - throw TypeError(".google.container.v1.Cluster.privateClusterConfig: object expected"); - message.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.fromObject(object.privateClusterConfig); - } - if (object.databaseEncryption != null) { - if (typeof object.databaseEncryption !== "object") - throw TypeError(".google.container.v1.Cluster.databaseEncryption: object expected"); - message.databaseEncryption = $root.google.container.v1.DatabaseEncryption.fromObject(object.databaseEncryption); - } - if (object.verticalPodAutoscaling != null) { - if (typeof object.verticalPodAutoscaling !== "object") - throw TypeError(".google.container.v1.Cluster.verticalPodAutoscaling: object expected"); - message.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.fromObject(object.verticalPodAutoscaling); - } - if (object.shieldedNodes != null) { - if (typeof object.shieldedNodes !== "object") - throw TypeError(".google.container.v1.Cluster.shieldedNodes: object expected"); - message.shieldedNodes = $root.google.container.v1.ShieldedNodes.fromObject(object.shieldedNodes); - } - if (object.releaseChannel != null) { - if (typeof object.releaseChannel !== "object") - throw TypeError(".google.container.v1.Cluster.releaseChannel: object expected"); - message.releaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.releaseChannel); - } - if (object.workloadIdentityConfig != null) { - if (typeof object.workloadIdentityConfig !== "object") - throw TypeError(".google.container.v1.Cluster.workloadIdentityConfig: object expected"); - message.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); - } - if (object.meshCertificates != null) { - if (typeof object.meshCertificates !== "object") - throw TypeError(".google.container.v1.Cluster.meshCertificates: object expected"); - message.meshCertificates = $root.google.container.v1.MeshCertificates.fromObject(object.meshCertificates); - } - if (object.costManagementConfig != null) { - if (typeof object.costManagementConfig !== "object") - throw TypeError(".google.container.v1.Cluster.costManagementConfig: object expected"); - message.costManagementConfig = $root.google.container.v1.CostManagementConfig.fromObject(object.costManagementConfig); - } - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.container.v1.Cluster.notificationConfig: object expected"); - message.notificationConfig = $root.google.container.v1.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1.Cluster.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.identityServiceConfig != null) { - if (typeof object.identityServiceConfig !== "object") - throw TypeError(".google.container.v1.Cluster.identityServiceConfig: object expected"); - message.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.fromObject(object.identityServiceConfig); - } - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.zone != null) - message.zone = String(object.zone); - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.initialClusterVersion != null) - message.initialClusterVersion = String(object.initialClusterVersion); - if (object.currentMasterVersion != null) - message.currentMasterVersion = String(object.currentMasterVersion); - if (object.currentNodeVersion != null) - message.currentNodeVersion = String(object.currentNodeVersion); - if (object.createTime != null) - message.createTime = String(object.createTime); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PROVISIONING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "RECONCILING": - case 3: - message.status = 3; - break; - case "STOPPING": - case 4: - message.status = 4; - break; - case "ERROR": - case 5: - message.status = 5; - break; - case "DEGRADED": - case 6: - message.status = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.nodeIpv4CidrSize != null) - message.nodeIpv4CidrSize = object.nodeIpv4CidrSize | 0; - if (object.servicesIpv4Cidr != null) - message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); - if (object.instanceGroupUrls) { - if (!Array.isArray(object.instanceGroupUrls)) - throw TypeError(".google.container.v1.Cluster.instanceGroupUrls: array expected"); - message.instanceGroupUrls = []; - for (var i = 0; i < object.instanceGroupUrls.length; ++i) - message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); - } - if (object.currentNodeCount != null) - message.currentNodeCount = object.currentNodeCount | 0; - if (object.expireTime != null) - message.expireTime = String(object.expireTime); - if (object.location != null) - message.location = String(object.location); - if (object.enableTpu != null) - message.enableTpu = Boolean(object.enableTpu); - if (object.tpuIpv4CidrBlock != null) - message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); - if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".google.container.v1.Cluster.conditions: array expected"); - message.conditions = []; - for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".google.container.v1.Cluster.conditions: object expected"); - message.conditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.conditions[i]); - } - } - if (object.autopilot != null) { - if (typeof object.autopilot !== "object") - throw TypeError(".google.container.v1.Cluster.autopilot: object expected"); - message.autopilot = $root.google.container.v1.Autopilot.fromObject(object.autopilot); - } - if (object.id != null) - message.id = String(object.id); - if (object.nodePoolDefaults != null) { - if (typeof object.nodePoolDefaults !== "object") - throw TypeError(".google.container.v1.Cluster.nodePoolDefaults: object expected"); - message.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.fromObject(object.nodePoolDefaults); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1.Cluster.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1.LoggingConfig.fromObject(object.loggingConfig); - } - if (object.monitoringConfig != null) { - if (typeof object.monitoringConfig !== "object") - throw TypeError(".google.container.v1.Cluster.monitoringConfig: object expected"); - message.monitoringConfig = $root.google.container.v1.MonitoringConfig.fromObject(object.monitoringConfig); - } - if (object.nodePoolAutoConfig != null) { - if (typeof object.nodePoolAutoConfig !== "object") - throw TypeError(".google.container.v1.Cluster.nodePoolAutoConfig: object expected"); - message.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.fromObject(object.nodePoolAutoConfig); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.fleet != null) { - if (typeof object.fleet !== "object") - throw TypeError(".google.container.v1.Cluster.fleet: object expected"); - message.fleet = $root.google.container.v1.Fleet.fromObject(object.fleet); - } - if (object.securityPostureConfig != null) { - if (typeof object.securityPostureConfig !== "object") - throw TypeError(".google.container.v1.Cluster.securityPostureConfig: object expected"); - message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.fromObject(object.securityPostureConfig); - } - if (object.controlPlaneEndpointsConfig != null) { - if (typeof object.controlPlaneEndpointsConfig !== "object") - throw TypeError(".google.container.v1.Cluster.controlPlaneEndpointsConfig: object expected"); - message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.controlPlaneEndpointsConfig); - } - if (object.enableK8sBetaApis != null) { - if (typeof object.enableK8sBetaApis !== "object") - throw TypeError(".google.container.v1.Cluster.enableK8sBetaApis: object expected"); - message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); - } - if (object.enterpriseConfig != null) { - if (typeof object.enterpriseConfig !== "object") - throw TypeError(".google.container.v1.Cluster.enterpriseConfig: object expected"); - message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.fromObject(object.enterpriseConfig); - } - if (object.secretManagerConfig != null) { - if (typeof object.secretManagerConfig !== "object") - throw TypeError(".google.container.v1.Cluster.secretManagerConfig: object expected"); - message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.secretManagerConfig); - } - if (object.compliancePostureConfig != null) { - if (typeof object.compliancePostureConfig !== "object") - throw TypeError(".google.container.v1.Cluster.compliancePostureConfig: object expected"); - message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); - } - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.userManagedKeysConfig != null) { - if (typeof object.userManagedKeysConfig !== "object") - throw TypeError(".google.container.v1.Cluster.userManagedKeysConfig: object expected"); - message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); - } - if (object.rbacBindingConfig != null) { - if (typeof object.rbacBindingConfig !== "object") - throw TypeError(".google.container.v1.Cluster.rbacBindingConfig: object expected"); - message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.rbacBindingConfig); - } - return message; - }; - - /** - * Creates a plain object from a Cluster message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Cluster - * @static - * @param {google.container.v1.Cluster} message Cluster - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Cluster.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.nodePools = []; - object.locations = []; - object.instanceGroupUrls = []; - object.conditions = []; - } - if (options.objects || options.defaults) - object.resourceLabels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.initialNodeCount = 0; - object.nodeConfig = null; - object.masterAuth = null; - object.loggingService = ""; - object.monitoringService = ""; - object.network = ""; - object.clusterIpv4Cidr = ""; - object.addonsConfig = null; - object.subnetwork = ""; - object.enableKubernetesAlpha = false; - object.labelFingerprint = ""; - object.legacyAbac = null; - object.networkPolicy = null; - object.ipAllocationPolicy = null; - object.masterAuthorizedNetworksConfig = null; - object.maintenancePolicy = null; - object.binaryAuthorization = null; - object.autoscaling = null; - object.networkConfig = null; - object.defaultMaxPodsConstraint = null; - object.resourceUsageExportConfig = null; - object.authenticatorGroupsConfig = null; - object.privateClusterConfig = null; - object.databaseEncryption = null; - object.verticalPodAutoscaling = null; - object.shieldedNodes = null; - object.releaseChannel = null; - object.workloadIdentityConfig = null; - object.costManagementConfig = null; - object.notificationConfig = null; - object.confidentialNodes = null; - object.identityServiceConfig = null; - object.meshCertificates = null; - object.selfLink = ""; - object.zone = ""; - object.endpoint = ""; - object.initialClusterVersion = ""; - object.currentMasterVersion = ""; - object.currentNodeVersion = ""; - object.createTime = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.nodeIpv4CidrSize = 0; - object.servicesIpv4Cidr = ""; - object.currentNodeCount = 0; - object.expireTime = ""; - object.location = ""; - object.enableTpu = false; - object.tpuIpv4CidrBlock = ""; - object.autopilot = null; - object.id = ""; - object.loggingConfig = null; - object.monitoringConfig = null; - object.nodePoolAutoConfig = null; - object.etag = ""; - object.fleet = null; - object.enableK8sBetaApis = null; - object.securityPostureConfig = null; - object.controlPlaneEndpointsConfig = null; - object.enterpriseConfig = null; - object.secretManagerConfig = null; - object.compliancePostureConfig = 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.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - object.initialNodeCount = message.initialNodeCount; - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) - object.nodeConfig = $root.google.container.v1.NodeConfig.toObject(message.nodeConfig, options); - if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) - object.masterAuth = $root.google.container.v1.MasterAuth.toObject(message.masterAuth, options); - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - object.loggingService = message.loggingService; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - object.monitoringService = message.monitoringService; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - object.clusterIpv4Cidr = message.clusterIpv4Cidr; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) - object.addonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.addonsConfig, options); - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.container.v1.NodePool.toObject(message.nodePools[j], options); - } - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) - object.enableKubernetesAlpha = message.enableKubernetesAlpha; - var keys2; - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - object.labelFingerprint = message.labelFingerprint; - if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) - object.legacyAbac = $root.google.container.v1.LegacyAbac.toObject(message.legacyAbac, options); - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) - object.networkPolicy = $root.google.container.v1.NetworkPolicy.toObject(message.networkPolicy, options); - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) - object.ipAllocationPolicy = $root.google.container.v1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) - object.masterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) - object.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.toObject(message.maintenancePolicy, options); - if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) - object.binaryAuthorization = $root.google.container.v1.BinaryAuthorization.toObject(message.binaryAuthorization, options); - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1.ClusterAutoscaling.toObject(message.autoscaling, options); - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.container.v1.NetworkConfig.toObject(message.networkConfig, options); - if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) - object.defaultMaxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.toObject(message.defaultMaxPodsConstraint, options); - if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) - object.resourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.toObject(message.resourceUsageExportConfig, options); - if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) - object.authenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.toObject(message.authenticatorGroupsConfig, options); - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) - object.privateClusterConfig = $root.google.container.v1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) - object.databaseEncryption = $root.google.container.v1.DatabaseEncryption.toObject(message.databaseEncryption, options); - if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) - object.verticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.toObject(message.verticalPodAutoscaling, options); - if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) - object.shieldedNodes = $root.google.container.v1.ShieldedNodes.toObject(message.shieldedNodes, options); - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.releaseChannel, options); - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) - object.workloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); - if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) - object.costManagementConfig = $root.google.container.v1.CostManagementConfig.toObject(message.costManagementConfig, options); - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.container.v1.NotificationConfig.toObject(message.notificationConfig, options); - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) - object.identityServiceConfig = $root.google.container.v1.IdentityServiceConfig.toObject(message.identityServiceConfig, options); - if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) - object.meshCertificates = $root.google.container.v1.MeshCertificates.toObject(message.meshCertificates, options); - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) - object.initialClusterVersion = message.initialClusterVersion; - if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) - object.currentMasterVersion = message.currentMasterVersion; - if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) - object.currentNodeVersion = message.currentNodeVersion; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = message.createTime; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1.Cluster.Status[message.status] === undefined ? message.status : $root.google.container.v1.Cluster.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) - object.nodeIpv4CidrSize = message.nodeIpv4CidrSize; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - object.servicesIpv4Cidr = message.servicesIpv4Cidr; - if (message.instanceGroupUrls && message.instanceGroupUrls.length) { - object.instanceGroupUrls = []; - for (var j = 0; j < message.instanceGroupUrls.length; ++j) - object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; - } - if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) - object.currentNodeCount = message.currentNodeCount; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = message.expireTime; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) - object.enableTpu = message.enableTpu; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; - if (message.conditions && message.conditions.length) { - object.conditions = []; - for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.google.container.v1.StatusCondition.toObject(message.conditions[j], options); - } - if (message.autopilot != null && message.hasOwnProperty("autopilot")) - object.autopilot = $root.google.container.v1.Autopilot.toObject(message.autopilot, options); - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { - object.nodePoolDefaults = $root.google.container.v1.NodePoolDefaults.toObject(message.nodePoolDefaults, options); - if (options.oneofs) - object._nodePoolDefaults = "nodePoolDefaults"; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1.LoggingConfig.toObject(message.loggingConfig, options); - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) - object.monitoringConfig = $root.google.container.v1.MonitoringConfig.toObject(message.monitoringConfig, options); - if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) - object.nodePoolAutoConfig = $root.google.container.v1.NodePoolAutoConfig.toObject(message.nodePoolAutoConfig, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.fleet != null && message.hasOwnProperty("fleet")) - object.fleet = $root.google.container.v1.Fleet.toObject(message.fleet, options); - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) - object.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); - if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) - object.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); - if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) - object.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.controlPlaneEndpointsConfig, options); - if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) - object.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.toObject(message.enterpriseConfig, options); - if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) - object.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.secretManagerConfig, options); - if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) - object.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - object.satisfiesPzs = message.satisfiesPzs; - if (options.oneofs) - object._satisfiesPzs = "satisfiesPzs"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - object.satisfiesPzi = message.satisfiesPzi; - if (options.oneofs) - object._satisfiesPzi = "satisfiesPzi"; - } - if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { - object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); - if (options.oneofs) - object._userManagedKeysConfig = "userManagedKeysConfig"; - } - if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { - object.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.rbacBindingConfig, options); - if (options.oneofs) - object._rbacBindingConfig = "rbacBindingConfig"; - } - return object; - }; - - /** - * Converts this Cluster to JSON. - * @function toJSON - * @memberof google.container.v1.Cluster - * @instance - * @returns {Object.} JSON object - */ - Cluster.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Cluster - * @function getTypeUrl - * @memberof google.container.v1.Cluster - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Cluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Cluster"; - }; - - /** - * Status enum. - * @name google.container.v1.Cluster.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_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 - */ - Cluster.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_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 Cluster; - })(); - - v1.RBACBindingConfig = (function() { - - /** - * Properties of a RBACBindingConfig. - * @memberof google.container.v1 - * @interface IRBACBindingConfig - * @property {boolean|null} [enableInsecureBindingSystemUnauthenticated] RBACBindingConfig enableInsecureBindingSystemUnauthenticated - * @property {boolean|null} [enableInsecureBindingSystemAuthenticated] RBACBindingConfig enableInsecureBindingSystemAuthenticated - */ - - /** - * Constructs a new RBACBindingConfig. - * @memberof google.container.v1 - * @classdesc Represents a RBACBindingConfig. - * @implements IRBACBindingConfig - * @constructor - * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set - */ - function RBACBindingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RBACBindingConfig enableInsecureBindingSystemUnauthenticated. - * @member {boolean|null|undefined} enableInsecureBindingSystemUnauthenticated - * @memberof google.container.v1.RBACBindingConfig - * @instance - */ - RBACBindingConfig.prototype.enableInsecureBindingSystemUnauthenticated = null; - - /** - * RBACBindingConfig enableInsecureBindingSystemAuthenticated. - * @member {boolean|null|undefined} enableInsecureBindingSystemAuthenticated - * @memberof google.container.v1.RBACBindingConfig - * @instance - */ - RBACBindingConfig.prototype.enableInsecureBindingSystemAuthenticated = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. - * @member {"enableInsecureBindingSystemUnauthenticated"|undefined} _enableInsecureBindingSystemUnauthenticated - * @memberof google.container.v1.RBACBindingConfig - * @instance - */ - Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemUnauthenticated", { - get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemUnauthenticated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RBACBindingConfig _enableInsecureBindingSystemAuthenticated. - * @member {"enableInsecureBindingSystemAuthenticated"|undefined} _enableInsecureBindingSystemAuthenticated - * @memberof google.container.v1.RBACBindingConfig - * @instance - */ - Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemAuthenticated", { - get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemAuthenticated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RBACBindingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set - * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig instance - */ - RBACBindingConfig.create = function create(properties) { - return new RBACBindingConfig(properties); - }; - - /** - * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RBACBindingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableInsecureBindingSystemUnauthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemUnauthenticated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableInsecureBindingSystemUnauthenticated); - if (message.enableInsecureBindingSystemAuthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemAuthenticated")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableInsecureBindingSystemAuthenticated); - return writer; - }; - - /** - * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RBACBindingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RBACBindingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RBACBindingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RBACBindingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableInsecureBindingSystemUnauthenticated = reader.bool(); - break; - } - case 2: { - message.enableInsecureBindingSystemAuthenticated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RBACBindingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RBACBindingConfig message. - * @function verify - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RBACBindingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { - properties._enableInsecureBindingSystemUnauthenticated = 1; - if (typeof message.enableInsecureBindingSystemUnauthenticated !== "boolean") - return "enableInsecureBindingSystemUnauthenticated: boolean expected"; - } - if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { - properties._enableInsecureBindingSystemAuthenticated = 1; - if (typeof message.enableInsecureBindingSystemAuthenticated !== "boolean") - return "enableInsecureBindingSystemAuthenticated: boolean expected"; - } - return null; - }; - - /** - * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig - */ - RBACBindingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RBACBindingConfig) - return object; - var message = new $root.google.container.v1.RBACBindingConfig(); - if (object.enableInsecureBindingSystemUnauthenticated != null) - message.enableInsecureBindingSystemUnauthenticated = Boolean(object.enableInsecureBindingSystemUnauthenticated); - if (object.enableInsecureBindingSystemAuthenticated != null) - message.enableInsecureBindingSystemAuthenticated = Boolean(object.enableInsecureBindingSystemAuthenticated); - return message; - }; - - /** - * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {google.container.v1.RBACBindingConfig} message RBACBindingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RBACBindingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { - object.enableInsecureBindingSystemUnauthenticated = message.enableInsecureBindingSystemUnauthenticated; - if (options.oneofs) - object._enableInsecureBindingSystemUnauthenticated = "enableInsecureBindingSystemUnauthenticated"; - } - if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { - object.enableInsecureBindingSystemAuthenticated = message.enableInsecureBindingSystemAuthenticated; - if (options.oneofs) - object._enableInsecureBindingSystemAuthenticated = "enableInsecureBindingSystemAuthenticated"; - } - return object; - }; - - /** - * Converts this RBACBindingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.RBACBindingConfig - * @instance - * @returns {Object.} JSON object - */ - RBACBindingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RBACBindingConfig - * @function getTypeUrl - * @memberof google.container.v1.RBACBindingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RBACBindingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RBACBindingConfig"; - }; - - return RBACBindingConfig; - })(); - - v1.UserManagedKeysConfig = (function() { - - /** - * Properties of a UserManagedKeysConfig. - * @memberof google.container.v1 - * @interface IUserManagedKeysConfig - * @property {string|null} [clusterCa] UserManagedKeysConfig clusterCa - * @property {string|null} [etcdApiCa] UserManagedKeysConfig etcdApiCa - * @property {string|null} [etcdPeerCa] UserManagedKeysConfig etcdPeerCa - * @property {Array.|null} [serviceAccountSigningKeys] UserManagedKeysConfig serviceAccountSigningKeys - * @property {Array.|null} [serviceAccountVerificationKeys] UserManagedKeysConfig serviceAccountVerificationKeys - * @property {string|null} [aggregationCa] UserManagedKeysConfig aggregationCa - * @property {string|null} [controlPlaneDiskEncryptionKey] UserManagedKeysConfig controlPlaneDiskEncryptionKey - * @property {string|null} [gkeopsEtcdBackupEncryptionKey] UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey - */ - - /** - * Constructs a new UserManagedKeysConfig. - * @memberof google.container.v1 - * @classdesc Represents a UserManagedKeysConfig. - * @implements IUserManagedKeysConfig - * @constructor - * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set - */ - function UserManagedKeysConfig(properties) { - this.serviceAccountSigningKeys = []; - this.serviceAccountVerificationKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserManagedKeysConfig clusterCa. - * @member {string} clusterCa - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.clusterCa = ""; - - /** - * UserManagedKeysConfig etcdApiCa. - * @member {string} etcdApiCa - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.etcdApiCa = ""; - - /** - * UserManagedKeysConfig etcdPeerCa. - * @member {string} etcdPeerCa - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.etcdPeerCa = ""; - - /** - * UserManagedKeysConfig serviceAccountSigningKeys. - * @member {Array.} serviceAccountSigningKeys - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.serviceAccountSigningKeys = $util.emptyArray; - - /** - * UserManagedKeysConfig serviceAccountVerificationKeys. - * @member {Array.} serviceAccountVerificationKeys - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.serviceAccountVerificationKeys = $util.emptyArray; - - /** - * UserManagedKeysConfig aggregationCa. - * @member {string} aggregationCa - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.aggregationCa = ""; - - /** - * UserManagedKeysConfig controlPlaneDiskEncryptionKey. - * @member {string} controlPlaneDiskEncryptionKey - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.controlPlaneDiskEncryptionKey = ""; - - /** - * UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. - * @member {string} gkeopsEtcdBackupEncryptionKey - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - */ - UserManagedKeysConfig.prototype.gkeopsEtcdBackupEncryptionKey = ""; - - /** - * Creates a new UserManagedKeysConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set - * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig instance - */ - UserManagedKeysConfig.create = function create(properties) { - return new UserManagedKeysConfig(properties); - }; - - /** - * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserManagedKeysConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterCa != null && Object.hasOwnProperty.call(message, "clusterCa")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.clusterCa); - if (message.etcdApiCa != null && Object.hasOwnProperty.call(message, "etcdApiCa")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etcdApiCa); - if (message.etcdPeerCa != null && Object.hasOwnProperty.call(message, "etcdPeerCa")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.etcdPeerCa); - if (message.serviceAccountSigningKeys != null && message.serviceAccountSigningKeys.length) - for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.serviceAccountSigningKeys[i]); - if (message.serviceAccountVerificationKeys != null && message.serviceAccountVerificationKeys.length) - for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.serviceAccountVerificationKeys[i]); - if (message.aggregationCa != null && Object.hasOwnProperty.call(message, "aggregationCa")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.aggregationCa); - if (message.controlPlaneDiskEncryptionKey != null && Object.hasOwnProperty.call(message, "controlPlaneDiskEncryptionKey")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.controlPlaneDiskEncryptionKey); - if (message.gkeopsEtcdBackupEncryptionKey != null && Object.hasOwnProperty.call(message, "gkeopsEtcdBackupEncryptionKey")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.gkeopsEtcdBackupEncryptionKey); - return writer; - }; - - /** - * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserManagedKeysConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserManagedKeysConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserManagedKeysConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UserManagedKeysConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 10: { - message.clusterCa = reader.string(); - break; - } - case 11: { - message.etcdApiCa = reader.string(); - break; - } - case 12: { - message.etcdPeerCa = reader.string(); - break; - } - case 13: { - if (!(message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length)) - message.serviceAccountSigningKeys = []; - message.serviceAccountSigningKeys.push(reader.string()); - break; - } - case 14: { - if (!(message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length)) - message.serviceAccountVerificationKeys = []; - message.serviceAccountVerificationKeys.push(reader.string()); - break; - } - case 15: { - message.aggregationCa = reader.string(); - break; - } - case 16: { - message.controlPlaneDiskEncryptionKey = reader.string(); - break; - } - case 17: { - message.gkeopsEtcdBackupEncryptionKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserManagedKeysConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserManagedKeysConfig message. - * @function verify - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserManagedKeysConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) - if (!$util.isString(message.clusterCa)) - return "clusterCa: string expected"; - if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) - if (!$util.isString(message.etcdApiCa)) - return "etcdApiCa: string expected"; - if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) - if (!$util.isString(message.etcdPeerCa)) - return "etcdPeerCa: string expected"; - if (message.serviceAccountSigningKeys != null && message.hasOwnProperty("serviceAccountSigningKeys")) { - if (!Array.isArray(message.serviceAccountSigningKeys)) - return "serviceAccountSigningKeys: array expected"; - for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) - if (!$util.isString(message.serviceAccountSigningKeys[i])) - return "serviceAccountSigningKeys: string[] expected"; - } - if (message.serviceAccountVerificationKeys != null && message.hasOwnProperty("serviceAccountVerificationKeys")) { - if (!Array.isArray(message.serviceAccountVerificationKeys)) - return "serviceAccountVerificationKeys: array expected"; - for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) - if (!$util.isString(message.serviceAccountVerificationKeys[i])) - return "serviceAccountVerificationKeys: string[] expected"; - } - if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) - if (!$util.isString(message.aggregationCa)) - return "aggregationCa: string expected"; - if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) - if (!$util.isString(message.controlPlaneDiskEncryptionKey)) - return "controlPlaneDiskEncryptionKey: string expected"; - if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) - if (!$util.isString(message.gkeopsEtcdBackupEncryptionKey)) - return "gkeopsEtcdBackupEncryptionKey: string expected"; - return null; - }; - - /** - * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig - */ - UserManagedKeysConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UserManagedKeysConfig) - return object; - var message = new $root.google.container.v1.UserManagedKeysConfig(); - if (object.clusterCa != null) - message.clusterCa = String(object.clusterCa); - if (object.etcdApiCa != null) - message.etcdApiCa = String(object.etcdApiCa); - if (object.etcdPeerCa != null) - message.etcdPeerCa = String(object.etcdPeerCa); - if (object.serviceAccountSigningKeys) { - if (!Array.isArray(object.serviceAccountSigningKeys)) - throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountSigningKeys: array expected"); - message.serviceAccountSigningKeys = []; - for (var i = 0; i < object.serviceAccountSigningKeys.length; ++i) - message.serviceAccountSigningKeys[i] = String(object.serviceAccountSigningKeys[i]); - } - if (object.serviceAccountVerificationKeys) { - if (!Array.isArray(object.serviceAccountVerificationKeys)) - throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountVerificationKeys: array expected"); - message.serviceAccountVerificationKeys = []; - for (var i = 0; i < object.serviceAccountVerificationKeys.length; ++i) - message.serviceAccountVerificationKeys[i] = String(object.serviceAccountVerificationKeys[i]); - } - if (object.aggregationCa != null) - message.aggregationCa = String(object.aggregationCa); - if (object.controlPlaneDiskEncryptionKey != null) - message.controlPlaneDiskEncryptionKey = String(object.controlPlaneDiskEncryptionKey); - if (object.gkeopsEtcdBackupEncryptionKey != null) - message.gkeopsEtcdBackupEncryptionKey = String(object.gkeopsEtcdBackupEncryptionKey); - return message; - }; - - /** - * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {google.container.v1.UserManagedKeysConfig} message UserManagedKeysConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserManagedKeysConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.serviceAccountSigningKeys = []; - object.serviceAccountVerificationKeys = []; - } - if (options.defaults) { - object.clusterCa = ""; - object.etcdApiCa = ""; - object.etcdPeerCa = ""; - object.aggregationCa = ""; - object.controlPlaneDiskEncryptionKey = ""; - object.gkeopsEtcdBackupEncryptionKey = ""; - } - if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) - object.clusterCa = message.clusterCa; - if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) - object.etcdApiCa = message.etcdApiCa; - if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) - object.etcdPeerCa = message.etcdPeerCa; - if (message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length) { - object.serviceAccountSigningKeys = []; - for (var j = 0; j < message.serviceAccountSigningKeys.length; ++j) - object.serviceAccountSigningKeys[j] = message.serviceAccountSigningKeys[j]; - } - if (message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length) { - object.serviceAccountVerificationKeys = []; - for (var j = 0; j < message.serviceAccountVerificationKeys.length; ++j) - object.serviceAccountVerificationKeys[j] = message.serviceAccountVerificationKeys[j]; - } - if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) - object.aggregationCa = message.aggregationCa; - if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) - object.controlPlaneDiskEncryptionKey = message.controlPlaneDiskEncryptionKey; - if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) - object.gkeopsEtcdBackupEncryptionKey = message.gkeopsEtcdBackupEncryptionKey; - return object; - }; - - /** - * Converts this UserManagedKeysConfig to JSON. - * @function toJSON - * @memberof google.container.v1.UserManagedKeysConfig - * @instance - * @returns {Object.} JSON object - */ - UserManagedKeysConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserManagedKeysConfig - * @function getTypeUrl - * @memberof google.container.v1.UserManagedKeysConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserManagedKeysConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UserManagedKeysConfig"; - }; - - return UserManagedKeysConfig; - })(); - - v1.CompliancePostureConfig = (function() { - - /** - * Properties of a CompliancePostureConfig. - * @memberof google.container.v1 - * @interface ICompliancePostureConfig - * @property {google.container.v1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode - * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards - */ - - /** - * Constructs a new CompliancePostureConfig. - * @memberof google.container.v1 - * @classdesc Represents a CompliancePostureConfig. - * @implements ICompliancePostureConfig - * @constructor - * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set - */ - function CompliancePostureConfig(properties) { - this.complianceStandards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompliancePostureConfig mode. - * @member {google.container.v1.CompliancePostureConfig.Mode|null|undefined} mode - * @memberof google.container.v1.CompliancePostureConfig - * @instance - */ - CompliancePostureConfig.prototype.mode = null; - - /** - * CompliancePostureConfig complianceStandards. - * @member {Array.} complianceStandards - * @memberof google.container.v1.CompliancePostureConfig - * @instance - */ - CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CompliancePostureConfig _mode. - * @member {"mode"|undefined} _mode - * @memberof google.container.v1.CompliancePostureConfig - * @instance - */ - Object.defineProperty(CompliancePostureConfig.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CompliancePostureConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set - * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig instance - */ - CompliancePostureConfig.create = function create(properties) { - return new CompliancePostureConfig(properties); - }; - - /** - * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompliancePostureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.complianceStandards != null && message.complianceStandards.length) - for (var i = 0; i < message.complianceStandards.length; ++i) - $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompliancePostureConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - if (!(message.complianceStandards && message.complianceStandards.length)) - message.complianceStandards = []; - message.complianceStandards.push($root.google.container.v1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompliancePostureConfig message. - * @function verify - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompliancePostureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { - if (!Array.isArray(message.complianceStandards)) - return "complianceStandards: array expected"; - for (var i = 0; i < message.complianceStandards.length; ++i) { - var error = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); - if (error) - return "complianceStandards." + error; - } - } - return null; - }; - - /** - * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig - */ - CompliancePostureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CompliancePostureConfig) - return object; - var message = new $root.google.container.v1.CompliancePostureConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DISABLED": - case 1: - message.mode = 1; - break; - case "ENABLED": - case 2: - message.mode = 2; - break; - } - if (object.complianceStandards) { - if (!Array.isArray(object.complianceStandards)) - throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: array expected"); - message.complianceStandards = []; - for (var i = 0; i < object.complianceStandards.length; ++i) { - if (typeof object.complianceStandards[i] !== "object") - throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: object expected"); - message.complianceStandards[i] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {google.container.v1.CompliancePostureConfig} message CompliancePostureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompliancePostureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.complianceStandards = []; - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.complianceStandards && message.complianceStandards.length) { - object.complianceStandards = []; - for (var j = 0; j < message.complianceStandards.length; ++j) - object.complianceStandards[j] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); - } - return object; - }; - - /** - * Converts this CompliancePostureConfig to JSON. - * @function toJSON - * @memberof google.container.v1.CompliancePostureConfig - * @instance - * @returns {Object.} JSON object - */ - CompliancePostureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompliancePostureConfig - * @function getTypeUrl - * @memberof google.container.v1.CompliancePostureConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1.CompliancePostureConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} ENABLED=2 ENABLED value - */ - CompliancePostureConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "ENABLED"] = 2; - return values; - })(); - - CompliancePostureConfig.ComplianceStandard = (function() { - - /** - * Properties of a ComplianceStandard. - * @memberof google.container.v1.CompliancePostureConfig - * @interface IComplianceStandard - * @property {string|null} [standard] ComplianceStandard standard - */ - - /** - * Constructs a new ComplianceStandard. - * @memberof google.container.v1.CompliancePostureConfig - * @classdesc Represents a ComplianceStandard. - * @implements IComplianceStandard - * @constructor - * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set - */ - function ComplianceStandard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComplianceStandard standard. - * @member {string|null|undefined} standard - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @instance - */ - ComplianceStandard.prototype.standard = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComplianceStandard _standard. - * @member {"standard"|undefined} _standard - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @instance - */ - Object.defineProperty(ComplianceStandard.prototype, "_standard", { - get: $util.oneOfGetter($oneOfFields = ["standard"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComplianceStandard instance using the specified properties. - * @function create - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set - * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance - */ - ComplianceStandard.create = function create(properties) { - return new ComplianceStandard(properties); - }; - - /** - * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComplianceStandard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); - return writer; - }; - - /** - * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComplianceStandard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.standard = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComplianceStandard message. - * @function verify - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComplianceStandard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.standard != null && message.hasOwnProperty("standard")) { - properties._standard = 1; - if (!$util.isString(message.standard)) - return "standard: string expected"; - } - return null; - }; - - /** - * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - */ - ComplianceStandard.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CompliancePostureConfig.ComplianceStandard) - return object; - var message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); - if (object.standard != null) - message.standard = String(object.standard); - return message; - }; - - /** - * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComplianceStandard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.standard != null && message.hasOwnProperty("standard")) { - object.standard = message.standard; - if (options.oneofs) - object._standard = "standard"; - } - return object; - }; - - /** - * Converts this ComplianceStandard to JSON. - * @function toJSON - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @instance - * @returns {Object.} JSON object - */ - ComplianceStandard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComplianceStandard - * @function getTypeUrl - * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig.ComplianceStandard"; - }; - - return ComplianceStandard; - })(); - - return CompliancePostureConfig; - })(); - - v1.K8sBetaAPIConfig = (function() { - - /** - * Properties of a K8sBetaAPIConfig. - * @memberof google.container.v1 - * @interface IK8sBetaAPIConfig - * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis - */ - - /** - * Constructs a new K8sBetaAPIConfig. - * @memberof google.container.v1 - * @classdesc Represents a K8sBetaAPIConfig. - * @implements IK8sBetaAPIConfig - * @constructor - * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set - */ - function K8sBetaAPIConfig(properties) { - this.enabledApis = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * K8sBetaAPIConfig enabledApis. - * @member {Array.} enabledApis - * @memberof google.container.v1.K8sBetaAPIConfig - * @instance - */ - K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; - - /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig instance - */ - K8sBetaAPIConfig.create = function create(properties) { - return new K8sBetaAPIConfig(properties); - }; - - /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - K8sBetaAPIConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabledApis != null && message.enabledApis.length) - for (var i = 0; i < message.enabledApis.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); - return writer; - }; - - /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - K8sBetaAPIConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.K8sBetaAPIConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.enabledApis && message.enabledApis.length)) - message.enabledApis = []; - message.enabledApis.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a K8sBetaAPIConfig message. - * @function verify - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - K8sBetaAPIConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { - if (!Array.isArray(message.enabledApis)) - return "enabledApis: array expected"; - for (var i = 0; i < message.enabledApis.length; ++i) - if (!$util.isString(message.enabledApis[i])) - return "enabledApis: string[] expected"; - } - return null; - }; - - /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig - */ - K8sBetaAPIConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.K8sBetaAPIConfig) - return object; - var message = new $root.google.container.v1.K8sBetaAPIConfig(); - if (object.enabledApis) { - if (!Array.isArray(object.enabledApis)) - throw TypeError(".google.container.v1.K8sBetaAPIConfig.enabledApis: array expected"); - message.enabledApis = []; - for (var i = 0; i < object.enabledApis.length; ++i) - message.enabledApis[i] = String(object.enabledApis[i]); - } - return message; - }; - - /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {google.container.v1.K8sBetaAPIConfig} message K8sBetaAPIConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - K8sBetaAPIConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.enabledApis = []; - if (message.enabledApis && message.enabledApis.length) { - object.enabledApis = []; - for (var j = 0; j < message.enabledApis.length; ++j) - object.enabledApis[j] = message.enabledApis[j]; - } - return object; - }; - - /** - * Converts this K8sBetaAPIConfig to JSON. - * @function toJSON - * @memberof google.container.v1.K8sBetaAPIConfig - * @instance - * @returns {Object.} JSON object - */ - K8sBetaAPIConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for K8sBetaAPIConfig - * @function getTypeUrl - * @memberof google.container.v1.K8sBetaAPIConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.K8sBetaAPIConfig"; - }; - - return K8sBetaAPIConfig; - })(); - - v1.SecurityPostureConfig = (function() { - - /** - * Properties of a SecurityPostureConfig. - * @memberof google.container.v1 - * @interface ISecurityPostureConfig - * @property {google.container.v1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode - * @property {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode - */ - - /** - * Constructs a new SecurityPostureConfig. - * @memberof google.container.v1 - * @classdesc Represents a SecurityPostureConfig. - * @implements ISecurityPostureConfig - * @constructor - * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set - */ - function SecurityPostureConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityPostureConfig mode. - * @member {google.container.v1.SecurityPostureConfig.Mode|null|undefined} mode - * @memberof google.container.v1.SecurityPostureConfig - * @instance - */ - SecurityPostureConfig.prototype.mode = null; - - /** - * SecurityPostureConfig vulnerabilityMode. - * @member {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode - * @memberof google.container.v1.SecurityPostureConfig - * @instance - */ - SecurityPostureConfig.prototype.vulnerabilityMode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SecurityPostureConfig _mode. - * @member {"mode"|undefined} _mode - * @memberof google.container.v1.SecurityPostureConfig - * @instance - */ - Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SecurityPostureConfig _vulnerabilityMode. - * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode - * @memberof google.container.v1.SecurityPostureConfig - * @instance - */ - Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { - get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SecurityPostureConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig instance - */ - SecurityPostureConfig.create = function create(properties) { - return new SecurityPostureConfig(properties); - }; - - /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPostureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); - return writer; - }; - - /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPostureConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityPostureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - message.vulnerabilityMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityPostureConfig message. - * @function verify - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityPostureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - properties._vulnerabilityMode = 1; - switch (message.vulnerabilityMode) { - default: - return "vulnerabilityMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig - */ - SecurityPostureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecurityPostureConfig) - return object; - var message = new $root.google.container.v1.SecurityPostureConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DISABLED": - case 1: - message.mode = 1; - break; - case "BASIC": - case 2: - message.mode = 2; - break; - case "ENTERPRISE": - case 3: - message.mode = 3; - break; - } - switch (object.vulnerabilityMode) { - default: - if (typeof object.vulnerabilityMode === "number") { - message.vulnerabilityMode = object.vulnerabilityMode; - break; - } - break; - case "VULNERABILITY_MODE_UNSPECIFIED": - case 0: - message.vulnerabilityMode = 0; - break; - case "VULNERABILITY_DISABLED": - case 1: - message.vulnerabilityMode = 1; - break; - case "VULNERABILITY_BASIC": - case 2: - message.vulnerabilityMode = 2; - break; - case "VULNERABILITY_ENTERPRISE": - case 3: - message.vulnerabilityMode = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {google.container.v1.SecurityPostureConfig} message SecurityPostureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityPostureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - object.vulnerabilityMode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; - if (options.oneofs) - object._vulnerabilityMode = "vulnerabilityMode"; - } - return object; - }; - - /** - * Converts this SecurityPostureConfig to JSON. - * @function toJSON - * @memberof google.container.v1.SecurityPostureConfig - * @instance - * @returns {Object.} JSON object - */ - SecurityPostureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityPostureConfig - * @function getTypeUrl - * @memberof google.container.v1.SecurityPostureConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SecurityPostureConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1.SecurityPostureConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} BASIC=2 BASIC value - * @property {number} ENTERPRISE=3 ENTERPRISE value - */ - SecurityPostureConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "BASIC"] = 2; - values[valuesById[3] = "ENTERPRISE"] = 3; - return values; - })(); - - /** - * VulnerabilityMode enum. - * @name google.container.v1.SecurityPostureConfig.VulnerabilityMode - * @enum {number} - * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value - * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value - * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value - * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value - */ - SecurityPostureConfig.VulnerabilityMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; - values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; - values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; - return values; - })(); - - return SecurityPostureConfig; - })(); - - v1.NodePoolAutoConfig = (function() { - - /** - * Properties of a NodePoolAutoConfig. - * @memberof google.container.v1 - * @interface INodePoolAutoConfig - * @property {google.container.v1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags - * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags - * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig - * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] NodePoolAutoConfig linuxNodeConfig - */ - - /** - * Constructs a new NodePoolAutoConfig. - * @memberof google.container.v1 - * @classdesc Represents a NodePoolAutoConfig. - * @implements INodePoolAutoConfig - * @constructor - * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set - */ - function NodePoolAutoConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolAutoConfig networkTags. - * @member {google.container.v1.INetworkTags|null|undefined} networkTags - * @memberof google.container.v1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.networkTags = null; - - /** - * NodePoolAutoConfig resourceManagerTags. - * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.resourceManagerTags = null; - - /** - * NodePoolAutoConfig nodeKubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig - * @memberof google.container.v1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.nodeKubeletConfig = null; - - /** - * NodePoolAutoConfig linuxNodeConfig. - * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig - * @memberof google.container.v1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.linuxNodeConfig = null; - - /** - * Creates a new NodePoolAutoConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig instance - */ - NodePoolAutoConfig.create = function create(properties) { - return new NodePoolAutoConfig(properties); - }; - - /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) - $root.google.container.v1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) - $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.networkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 2: { - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolAutoConfig message. - * @function verify - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolAutoConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - var error = $root.google.container.v1.NetworkTags.verify(message.networkTags); - if (error) - return "networkTags." + error; - } - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); - if (error) - return "nodeKubeletConfig." + error; - } - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { - var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); - if (error) - return "linuxNodeConfig." + error; - } - return null; - }; - - /** - * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig - */ - NodePoolAutoConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolAutoConfig) - return object; - var message = new $root.google.container.v1.NodePoolAutoConfig(); - if (object.networkTags != null) { - if (typeof object.networkTags !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.networkTags: object expected"); - message.networkTags = $root.google.container.v1.NetworkTags.fromObject(object.networkTags); - } - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.nodeKubeletConfig != null) { - if (typeof object.nodeKubeletConfig !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); - } - if (object.linuxNodeConfig != null) { - if (typeof object.linuxNodeConfig !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.linuxNodeConfig: object expected"); - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {google.container.v1.NodePoolAutoConfig} message NodePoolAutoConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolAutoConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.networkTags = null; - object.resourceManagerTags = null; - object.nodeKubeletConfig = null; - object.linuxNodeConfig = null; - } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) - object.networkTags = $root.google.container.v1.NetworkTags.toObject(message.networkTags, options); - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) - object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) - object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); - return object; - }; - - /** - * Converts this NodePoolAutoConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodePoolAutoConfig - * @instance - * @returns {Object.} JSON object - */ - NodePoolAutoConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolAutoConfig - * @function getTypeUrl - * @memberof google.container.v1.NodePoolAutoConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePoolAutoConfig"; - }; - - return NodePoolAutoConfig; - })(); - - v1.NodePoolDefaults = (function() { - - /** - * Properties of a NodePoolDefaults. - * @memberof google.container.v1 - * @interface INodePoolDefaults - * @property {google.container.v1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults - */ - - /** - * Constructs a new NodePoolDefaults. - * @memberof google.container.v1 - * @classdesc Represents a NodePoolDefaults. - * @implements INodePoolDefaults - * @constructor - * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set - */ - function NodePoolDefaults(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolDefaults nodeConfigDefaults. - * @member {google.container.v1.INodeConfigDefaults|null|undefined} nodeConfigDefaults - * @memberof google.container.v1.NodePoolDefaults - * @instance - */ - NodePoolDefaults.prototype.nodeConfigDefaults = null; - - /** - * Creates a new NodePoolDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults instance - */ - NodePoolDefaults.create = function create(properties) { - return new NodePoolDefaults(properties); - }; - - /** - * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) - $root.google.container.v1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolDefaults message. - * @function verify - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { - var error = $root.google.container.v1.NodeConfigDefaults.verify(message.nodeConfigDefaults); - if (error) - return "nodeConfigDefaults." + error; - } - return null; - }; - - /** - * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults - */ - NodePoolDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolDefaults) - return object; - var message = new $root.google.container.v1.NodePoolDefaults(); - if (object.nodeConfigDefaults != null) { - if (typeof object.nodeConfigDefaults !== "object") - throw TypeError(".google.container.v1.NodePoolDefaults.nodeConfigDefaults: object expected"); - message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {google.container.v1.NodePoolDefaults} message NodePoolDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.nodeConfigDefaults = null; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) - object.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); - return object; - }; - - /** - * Converts this NodePoolDefaults to JSON. - * @function toJSON - * @memberof google.container.v1.NodePoolDefaults - * @instance - * @returns {Object.} JSON object - */ - NodePoolDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolDefaults - * @function getTypeUrl - * @memberof google.container.v1.NodePoolDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePoolDefaults"; - }; - - return NodePoolDefaults; - })(); - - v1.NodeConfigDefaults = (function() { - - /** - * Properties of a NodeConfigDefaults. - * @memberof google.container.v1 - * @interface INodeConfigDefaults - * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig - * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig - * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig - * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig - */ - - /** - * Constructs a new NodeConfigDefaults. - * @memberof google.container.v1 - * @classdesc Represents a NodeConfigDefaults. - * @implements INodeConfigDefaults - * @constructor - * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set - */ - function NodeConfigDefaults(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfigDefaults gcfsConfig. - * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.gcfsConfig = null; - - /** - * NodeConfigDefaults loggingConfig. - * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.loggingConfig = null; - - /** - * NodeConfigDefaults containerdConfig. - * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.containerdConfig = null; - - /** - * NodeConfigDefaults nodeKubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig - * @memberof google.container.v1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.nodeKubeletConfig = null; - - /** - * Creates a new NodeConfigDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set - * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults instance - */ - NodeConfigDefaults.create = function create(properties) { - return new NodeConfigDefaults(properties); - }; - - /** - * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {google.container.v1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfigDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodeConfigDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {google.container.v1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfigDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfigDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeConfigDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfigDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfigDefaults message. - * @function verify - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfigDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); - if (error) - return "nodeKubeletConfig." + error; - } - return null; - }; - - /** - * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeConfigDefaults} NodeConfigDefaults - */ - NodeConfigDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeConfigDefaults) - return object; - var message = new $root.google.container.v1.NodeConfigDefaults(); - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1.NodeConfigDefaults.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1.NodeConfigDefaults.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1.NodeConfigDefaults.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.nodeKubeletConfig != null) { - if (typeof object.nodeKubeletConfig !== "object") - throw TypeError(".google.container.v1.NodeConfigDefaults.nodeKubeletConfig: object expected"); - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {google.container.v1.NodeConfigDefaults} message NodeConfigDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfigDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcfsConfig = null; - object.loggingConfig = null; - object.containerdConfig = null; - object.nodeKubeletConfig = null; - } - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) - object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); - return object; - }; - - /** - * Converts this NodeConfigDefaults to JSON. - * @function toJSON - * @memberof google.container.v1.NodeConfigDefaults - * @instance - * @returns {Object.} JSON object - */ - NodeConfigDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfigDefaults - * @function getTypeUrl - * @memberof google.container.v1.NodeConfigDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfigDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeConfigDefaults"; - }; - - return NodeConfigDefaults; - })(); - - v1.ClusterUpdate = (function() { - - /** - * Properties of a ClusterUpdate. - * @memberof google.container.v1 - * @interface IClusterUpdate - * @property {string|null} [desiredNodeVersion] ClusterUpdate desiredNodeVersion - * @property {string|null} [desiredMonitoringService] ClusterUpdate desiredMonitoringService - * @property {google.container.v1.IAddonsConfig|null} [desiredAddonsConfig] ClusterUpdate desiredAddonsConfig - * @property {string|null} [desiredNodePoolId] ClusterUpdate desiredNodePoolId - * @property {string|null} [desiredImageType] ClusterUpdate desiredImageType - * @property {google.container.v1.IDatabaseEncryption|null} [desiredDatabaseEncryption] ClusterUpdate desiredDatabaseEncryption - * @property {google.container.v1.IWorkloadIdentityConfig|null} [desiredWorkloadIdentityConfig] ClusterUpdate desiredWorkloadIdentityConfig - * @property {google.container.v1.IMeshCertificates|null} [desiredMeshCertificates] ClusterUpdate desiredMeshCertificates - * @property {google.container.v1.IShieldedNodes|null} [desiredShieldedNodes] ClusterUpdate desiredShieldedNodes - * @property {google.container.v1.ICostManagementConfig|null} [desiredCostManagementConfig] ClusterUpdate desiredCostManagementConfig - * @property {google.container.v1.IDNSConfig|null} [desiredDnsConfig] ClusterUpdate desiredDnsConfig - * @property {google.container.v1.INodePoolAutoscaling|null} [desiredNodePoolAutoscaling] ClusterUpdate desiredNodePoolAutoscaling - * @property {Array.|null} [desiredLocations] ClusterUpdate desiredLocations - * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [desiredMasterAuthorizedNetworksConfig] ClusterUpdate desiredMasterAuthorizedNetworksConfig - * @property {google.container.v1.IClusterAutoscaling|null} [desiredClusterAutoscaling] ClusterUpdate desiredClusterAutoscaling - * @property {google.container.v1.IBinaryAuthorization|null} [desiredBinaryAuthorization] ClusterUpdate desiredBinaryAuthorization - * @property {string|null} [desiredLoggingService] ClusterUpdate desiredLoggingService - * @property {google.container.v1.IResourceUsageExportConfig|null} [desiredResourceUsageExportConfig] ClusterUpdate desiredResourceUsageExportConfig - * @property {google.container.v1.IVerticalPodAutoscaling|null} [desiredVerticalPodAutoscaling] ClusterUpdate desiredVerticalPodAutoscaling - * @property {google.container.v1.IPrivateClusterConfig|null} [desiredPrivateClusterConfig] ClusterUpdate desiredPrivateClusterConfig - * @property {google.container.v1.IIntraNodeVisibilityConfig|null} [desiredIntraNodeVisibilityConfig] ClusterUpdate desiredIntraNodeVisibilityConfig - * @property {google.container.v1.IDefaultSnatStatus|null} [desiredDefaultSnatStatus] ClusterUpdate desiredDefaultSnatStatus - * @property {google.container.v1.IReleaseChannel|null} [desiredReleaseChannel] ClusterUpdate desiredReleaseChannel - * @property {google.container.v1.IILBSubsettingConfig|null} [desiredL4ilbSubsettingConfig] ClusterUpdate desiredL4ilbSubsettingConfig - * @property {google.container.v1.DatapathProvider|null} [desiredDatapathProvider] ClusterUpdate desiredDatapathProvider - * @property {google.container.v1.PrivateIPv6GoogleAccess|null} [desiredPrivateIpv6GoogleAccess] ClusterUpdate desiredPrivateIpv6GoogleAccess - * @property {google.container.v1.INotificationConfig|null} [desiredNotificationConfig] ClusterUpdate desiredNotificationConfig - * @property {google.container.v1.IAuthenticatorGroupsConfig|null} [desiredAuthenticatorGroupsConfig] ClusterUpdate desiredAuthenticatorGroupsConfig - * @property {google.container.v1.ILoggingConfig|null} [desiredLoggingConfig] ClusterUpdate desiredLoggingConfig - * @property {google.container.v1.IMonitoringConfig|null} [desiredMonitoringConfig] ClusterUpdate desiredMonitoringConfig - * @property {google.container.v1.IIdentityServiceConfig|null} [desiredIdentityServiceConfig] ClusterUpdate desiredIdentityServiceConfig - * @property {google.container.v1.IServiceExternalIPsConfig|null} [desiredServiceExternalIpsConfig] ClusterUpdate desiredServiceExternalIpsConfig - * @property {boolean|null} [desiredEnablePrivateEndpoint] ClusterUpdate desiredEnablePrivateEndpoint - * @property {boolean|null} [desiredDefaultEnablePrivateNodes] ClusterUpdate desiredDefaultEnablePrivateNodes - * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [desiredControlPlaneEndpointsConfig] ClusterUpdate desiredControlPlaneEndpointsConfig - * @property {string|null} [desiredMasterVersion] ClusterUpdate desiredMasterVersion - * @property {google.container.v1.IGcfsConfig|null} [desiredGcfsConfig] ClusterUpdate desiredGcfsConfig - * @property {google.container.v1.INetworkTags|null} [desiredNodePoolAutoConfigNetworkTags] ClusterUpdate desiredNodePoolAutoConfigNetworkTags - * @property {google.container.v1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig - * @property {string|null} [etag] ClusterUpdate etag - * @property {google.container.v1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig - * @property {google.container.v1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet - * @property {google.container.v1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType - * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig - * @property {google.container.v1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig - * @property {google.container.v1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] ClusterUpdate enableK8sBetaApis - * @property {google.container.v1.ISecurityPostureConfig|null} [desiredSecurityPostureConfig] ClusterUpdate desiredSecurityPostureConfig - * @property {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [desiredNetworkPerformanceConfig] ClusterUpdate desiredNetworkPerformanceConfig - * @property {boolean|null} [desiredEnableFqdnNetworkPolicy] ClusterUpdate desiredEnableFqdnNetworkPolicy - * @property {google.container.v1.IWorkloadPolicyConfig|null} [desiredAutopilotWorkloadPolicyConfig] ClusterUpdate desiredAutopilotWorkloadPolicyConfig - * @property {google.container.v1.IK8sBetaAPIConfig|null} [desiredK8sBetaApis] ClusterUpdate desiredK8sBetaApis - * @property {google.container.v1.IContainerdConfig|null} [desiredContainerdConfig] ClusterUpdate desiredContainerdConfig - * @property {boolean|null} [desiredEnableMultiNetworking] ClusterUpdate desiredEnableMultiNetworking - * @property {google.container.v1.IResourceManagerTags|null} [desiredNodePoolAutoConfigResourceManagerTags] ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags - * @property {google.container.v1.InTransitEncryptionConfig|null} [desiredInTransitEncryptionConfig] ClusterUpdate desiredInTransitEncryptionConfig - * @property {boolean|null} [desiredEnableCiliumClusterwideNetworkPolicy] ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy - * @property {google.container.v1.ISecretManagerConfig|null} [desiredSecretManagerConfig] ClusterUpdate desiredSecretManagerConfig - * @property {google.container.v1.ICompliancePostureConfig|null} [desiredCompliancePostureConfig] ClusterUpdate desiredCompliancePostureConfig - * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodeKubeletConfig] ClusterUpdate desiredNodeKubeletConfig - * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig - * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] ClusterUpdate userManagedKeysConfig - * @property {google.container.v1.IRBACBindingConfig|null} [desiredRbacBindingConfig] ClusterUpdate desiredRbacBindingConfig - * @property {google.container.v1.IDesiredEnterpriseConfig|null} [desiredEnterpriseConfig] ClusterUpdate desiredEnterpriseConfig - * @property {google.container.v1.ILinuxNodeConfig|null} [desiredNodePoolAutoConfigLinuxNodeConfig] ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig - */ - - /** - * Constructs a new ClusterUpdate. - * @memberof google.container.v1 - * @classdesc Represents a ClusterUpdate. - * @implements IClusterUpdate - * @constructor - * @param {google.container.v1.IClusterUpdate=} [properties] Properties to set - */ - function ClusterUpdate(properties) { - this.desiredLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterUpdate desiredNodeVersion. - * @member {string} desiredNodeVersion - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodeVersion = ""; - - /** - * ClusterUpdate desiredMonitoringService. - * @member {string} desiredMonitoringService - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMonitoringService = ""; - - /** - * ClusterUpdate desiredAddonsConfig. - * @member {google.container.v1.IAddonsConfig|null|undefined} desiredAddonsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAddonsConfig = null; - - /** - * ClusterUpdate desiredNodePoolId. - * @member {string} desiredNodePoolId - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolId = ""; - - /** - * ClusterUpdate desiredImageType. - * @member {string} desiredImageType - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredImageType = ""; - - /** - * ClusterUpdate desiredDatabaseEncryption. - * @member {google.container.v1.IDatabaseEncryption|null|undefined} desiredDatabaseEncryption - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDatabaseEncryption = null; - - /** - * ClusterUpdate desiredWorkloadIdentityConfig. - * @member {google.container.v1.IWorkloadIdentityConfig|null|undefined} desiredWorkloadIdentityConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredWorkloadIdentityConfig = null; - - /** - * ClusterUpdate desiredMeshCertificates. - * @member {google.container.v1.IMeshCertificates|null|undefined} desiredMeshCertificates - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMeshCertificates = null; - - /** - * ClusterUpdate desiredShieldedNodes. - * @member {google.container.v1.IShieldedNodes|null|undefined} desiredShieldedNodes - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredShieldedNodes = null; - - /** - * ClusterUpdate desiredCostManagementConfig. - * @member {google.container.v1.ICostManagementConfig|null|undefined} desiredCostManagementConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredCostManagementConfig = null; - - /** - * ClusterUpdate desiredDnsConfig. - * @member {google.container.v1.IDNSConfig|null|undefined} desiredDnsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDnsConfig = null; - - /** - * ClusterUpdate desiredNodePoolAutoscaling. - * @member {google.container.v1.INodePoolAutoscaling|null|undefined} desiredNodePoolAutoscaling - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoscaling = null; - - /** - * ClusterUpdate desiredLocations. - * @member {Array.} desiredLocations - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLocations = $util.emptyArray; - - /** - * ClusterUpdate desiredMasterAuthorizedNetworksConfig. - * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} desiredMasterAuthorizedNetworksConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMasterAuthorizedNetworksConfig = null; - - /** - * ClusterUpdate desiredClusterAutoscaling. - * @member {google.container.v1.IClusterAutoscaling|null|undefined} desiredClusterAutoscaling - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredClusterAutoscaling = null; - - /** - * ClusterUpdate desiredBinaryAuthorization. - * @member {google.container.v1.IBinaryAuthorization|null|undefined} desiredBinaryAuthorization - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredBinaryAuthorization = null; - - /** - * ClusterUpdate desiredLoggingService. - * @member {string} desiredLoggingService - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLoggingService = ""; - - /** - * ClusterUpdate desiredResourceUsageExportConfig. - * @member {google.container.v1.IResourceUsageExportConfig|null|undefined} desiredResourceUsageExportConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredResourceUsageExportConfig = null; - - /** - * ClusterUpdate desiredVerticalPodAutoscaling. - * @member {google.container.v1.IVerticalPodAutoscaling|null|undefined} desiredVerticalPodAutoscaling - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredVerticalPodAutoscaling = null; - - /** - * ClusterUpdate desiredPrivateClusterConfig. - * @member {google.container.v1.IPrivateClusterConfig|null|undefined} desiredPrivateClusterConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredPrivateClusterConfig = null; - - /** - * ClusterUpdate desiredIntraNodeVisibilityConfig. - * @member {google.container.v1.IIntraNodeVisibilityConfig|null|undefined} desiredIntraNodeVisibilityConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredIntraNodeVisibilityConfig = null; - - /** - * ClusterUpdate desiredDefaultSnatStatus. - * @member {google.container.v1.IDefaultSnatStatus|null|undefined} desiredDefaultSnatStatus - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDefaultSnatStatus = null; - - /** - * ClusterUpdate desiredReleaseChannel. - * @member {google.container.v1.IReleaseChannel|null|undefined} desiredReleaseChannel - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredReleaseChannel = null; - - /** - * ClusterUpdate desiredL4ilbSubsettingConfig. - * @member {google.container.v1.IILBSubsettingConfig|null|undefined} desiredL4ilbSubsettingConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredL4ilbSubsettingConfig = null; - - /** - * ClusterUpdate desiredDatapathProvider. - * @member {google.container.v1.DatapathProvider} desiredDatapathProvider - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDatapathProvider = 0; - - /** - * ClusterUpdate desiredPrivateIpv6GoogleAccess. - * @member {google.container.v1.PrivateIPv6GoogleAccess} desiredPrivateIpv6GoogleAccess - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredPrivateIpv6GoogleAccess = 0; - - /** - * ClusterUpdate desiredNotificationConfig. - * @member {google.container.v1.INotificationConfig|null|undefined} desiredNotificationConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNotificationConfig = null; - - /** - * ClusterUpdate desiredAuthenticatorGroupsConfig. - * @member {google.container.v1.IAuthenticatorGroupsConfig|null|undefined} desiredAuthenticatorGroupsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAuthenticatorGroupsConfig = null; - - /** - * ClusterUpdate desiredLoggingConfig. - * @member {google.container.v1.ILoggingConfig|null|undefined} desiredLoggingConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLoggingConfig = null; - - /** - * ClusterUpdate desiredMonitoringConfig. - * @member {google.container.v1.IMonitoringConfig|null|undefined} desiredMonitoringConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMonitoringConfig = null; - - /** - * ClusterUpdate desiredIdentityServiceConfig. - * @member {google.container.v1.IIdentityServiceConfig|null|undefined} desiredIdentityServiceConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredIdentityServiceConfig = null; - - /** - * ClusterUpdate desiredServiceExternalIpsConfig. - * @member {google.container.v1.IServiceExternalIPsConfig|null|undefined} desiredServiceExternalIpsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredServiceExternalIpsConfig = null; - - /** - * ClusterUpdate desiredEnablePrivateEndpoint. - * @member {boolean|null|undefined} desiredEnablePrivateEndpoint - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnablePrivateEndpoint = null; - - /** - * ClusterUpdate desiredDefaultEnablePrivateNodes. - * @member {boolean|null|undefined} desiredDefaultEnablePrivateNodes - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDefaultEnablePrivateNodes = null; - - /** - * ClusterUpdate desiredControlPlaneEndpointsConfig. - * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} desiredControlPlaneEndpointsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredControlPlaneEndpointsConfig = null; - - /** - * ClusterUpdate desiredMasterVersion. - * @member {string} desiredMasterVersion - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMasterVersion = ""; - - /** - * ClusterUpdate desiredGcfsConfig. - * @member {google.container.v1.IGcfsConfig|null|undefined} desiredGcfsConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredGcfsConfig = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigNetworkTags. - * @member {google.container.v1.INetworkTags|null|undefined} desiredNodePoolAutoConfigNetworkTags - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigNetworkTags = null; - - /** - * ClusterUpdate desiredGatewayApiConfig. - * @member {google.container.v1.IGatewayAPIConfig|null|undefined} desiredGatewayApiConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredGatewayApiConfig = null; - - /** - * ClusterUpdate etag. - * @member {string} etag - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.etag = ""; - - /** - * ClusterUpdate desiredNodePoolLoggingConfig. - * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} desiredNodePoolLoggingConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; - - /** - * ClusterUpdate desiredFleet. - * @member {google.container.v1.IFleet|null|undefined} desiredFleet - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredFleet = null; - - /** - * ClusterUpdate desiredStackType. - * @member {google.container.v1.StackType} desiredStackType - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredStackType = 0; - - /** - * ClusterUpdate additionalPodRangesConfig. - * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.additionalPodRangesConfig = null; - - /** - * ClusterUpdate removedAdditionalPodRangesConfig. - * @member {google.container.v1.IAdditionalPodRangesConfig|null|undefined} removedAdditionalPodRangesConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.removedAdditionalPodRangesConfig = null; - - /** - * ClusterUpdate enableK8sBetaApis. - * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.enableK8sBetaApis = null; - - /** - * ClusterUpdate desiredSecurityPostureConfig. - * @member {google.container.v1.ISecurityPostureConfig|null|undefined} desiredSecurityPostureConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredSecurityPostureConfig = null; - - /** - * ClusterUpdate desiredNetworkPerformanceConfig. - * @member {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} desiredNetworkPerformanceConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNetworkPerformanceConfig = null; - - /** - * ClusterUpdate desiredEnableFqdnNetworkPolicy. - * @member {boolean|null|undefined} desiredEnableFqdnNetworkPolicy - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableFqdnNetworkPolicy = null; - - /** - * ClusterUpdate desiredAutopilotWorkloadPolicyConfig. - * @member {google.container.v1.IWorkloadPolicyConfig|null|undefined} desiredAutopilotWorkloadPolicyConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAutopilotWorkloadPolicyConfig = null; - - /** - * ClusterUpdate desiredK8sBetaApis. - * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} desiredK8sBetaApis - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredK8sBetaApis = null; - - /** - * ClusterUpdate desiredContainerdConfig. - * @member {google.container.v1.IContainerdConfig|null|undefined} desiredContainerdConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredContainerdConfig = null; - - /** - * ClusterUpdate desiredEnableMultiNetworking. - * @member {boolean|null|undefined} desiredEnableMultiNetworking - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableMultiNetworking = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. - * @member {google.container.v1.IResourceManagerTags|null|undefined} desiredNodePoolAutoConfigResourceManagerTags - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigResourceManagerTags = null; - - /** - * ClusterUpdate desiredInTransitEncryptionConfig. - * @member {google.container.v1.InTransitEncryptionConfig|null|undefined} desiredInTransitEncryptionConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredInTransitEncryptionConfig = null; - - /** - * ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. - * @member {boolean|null|undefined} desiredEnableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableCiliumClusterwideNetworkPolicy = null; - - /** - * ClusterUpdate desiredSecretManagerConfig. - * @member {google.container.v1.ISecretManagerConfig|null|undefined} desiredSecretManagerConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredSecretManagerConfig = null; - - /** - * ClusterUpdate desiredCompliancePostureConfig. - * @member {google.container.v1.ICompliancePostureConfig|null|undefined} desiredCompliancePostureConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredCompliancePostureConfig = null; - - /** - * ClusterUpdate desiredNodeKubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} desiredNodeKubeletConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodeKubeletConfig = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} desiredNodePoolAutoConfigKubeletConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigKubeletConfig = null; - - /** - * ClusterUpdate userManagedKeysConfig. - * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.userManagedKeysConfig = null; - - /** - * ClusterUpdate desiredRbacBindingConfig. - * @member {google.container.v1.IRBACBindingConfig|null|undefined} desiredRbacBindingConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredRbacBindingConfig = null; - - /** - * ClusterUpdate desiredEnterpriseConfig. - * @member {google.container.v1.IDesiredEnterpriseConfig|null|undefined} desiredEnterpriseConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnterpriseConfig = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. - * @member {google.container.v1.ILinuxNodeConfig|null|undefined} desiredNodePoolAutoConfigLinuxNodeConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigLinuxNodeConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ClusterUpdate _desiredEnablePrivateEndpoint. - * @member {"desiredEnablePrivateEndpoint"|undefined} _desiredEnablePrivateEndpoint - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnablePrivateEndpoint", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnablePrivateEndpoint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredDefaultEnablePrivateNodes. - * @member {"desiredDefaultEnablePrivateNodes"|undefined} _desiredDefaultEnablePrivateNodes - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredDefaultEnablePrivateNodes", { - get: $util.oneOfGetter($oneOfFields = ["desiredDefaultEnablePrivateNodes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableFqdnNetworkPolicy. - * @member {"desiredEnableFqdnNetworkPolicy"|undefined} _desiredEnableFqdnNetworkPolicy - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableFqdnNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableFqdnNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableMultiNetworking. - * @member {"desiredEnableMultiNetworking"|undefined} _desiredEnableMultiNetworking - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableMultiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableMultiNetworking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredInTransitEncryptionConfig. - * @member {"desiredInTransitEncryptionConfig"|undefined} _desiredInTransitEncryptionConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredInTransitEncryptionConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredInTransitEncryptionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. - * @member {"desiredEnableCiliumClusterwideNetworkPolicy"|undefined} _desiredEnableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableCiliumClusterwideNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableCiliumClusterwideNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredSecretManagerConfig. - * @member {"desiredSecretManagerConfig"|undefined} _desiredSecretManagerConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredSecretManagerConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredSecretManagerConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredCompliancePostureConfig. - * @member {"desiredCompliancePostureConfig"|undefined} _desiredCompliancePostureConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredCompliancePostureConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredCompliancePostureConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredRbacBindingConfig. - * @member {"desiredRbacBindingConfig"|undefined} _desiredRbacBindingConfig - * @memberof google.container.v1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredRbacBindingConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredRbacBindingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ClusterUpdate instance using the specified properties. - * @function create - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {google.container.v1.IClusterUpdate=} [properties] Properties to set - * @returns {google.container.v1.ClusterUpdate} ClusterUpdate instance - */ - ClusterUpdate.create = function create(properties) { - return new ClusterUpdate(properties); - }; - - /** - * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {google.container.v1.IClusterUpdate} message ClusterUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterUpdate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.desiredNodeVersion != null && Object.hasOwnProperty.call(message, "desiredNodeVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.desiredNodeVersion); - if (message.desiredMonitoringService != null && Object.hasOwnProperty.call(message, "desiredMonitoringService")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.desiredMonitoringService); - if (message.desiredAddonsConfig != null && Object.hasOwnProperty.call(message, "desiredAddonsConfig")) - $root.google.container.v1.AddonsConfig.encode(message.desiredAddonsConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.desiredNodePoolId != null && Object.hasOwnProperty.call(message, "desiredNodePoolId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.desiredNodePoolId); - if (message.desiredImageType != null && Object.hasOwnProperty.call(message, "desiredImageType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.desiredImageType); - if (message.desiredNodePoolAutoscaling != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoscaling")) - $root.google.container.v1.NodePoolAutoscaling.encode(message.desiredNodePoolAutoscaling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.desiredLocations != null && message.desiredLocations.length) - for (var i = 0; i < message.desiredLocations.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.desiredLocations[i]); - if (message.desiredMasterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "desiredMasterAuthorizedNetworksConfig")) - $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.desiredMasterAuthorizedNetworksConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.desiredClusterAutoscaling != null && Object.hasOwnProperty.call(message, "desiredClusterAutoscaling")) - $root.google.container.v1.ClusterAutoscaling.encode(message.desiredClusterAutoscaling, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.desiredBinaryAuthorization != null && Object.hasOwnProperty.call(message, "desiredBinaryAuthorization")) - $root.google.container.v1.BinaryAuthorization.encode(message.desiredBinaryAuthorization, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.desiredLoggingService != null && Object.hasOwnProperty.call(message, "desiredLoggingService")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.desiredLoggingService); - if (message.desiredResourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "desiredResourceUsageExportConfig")) - $root.google.container.v1.ResourceUsageExportConfig.encode(message.desiredResourceUsageExportConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.desiredVerticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "desiredVerticalPodAutoscaling")) - $root.google.container.v1.VerticalPodAutoscaling.encode(message.desiredVerticalPodAutoscaling, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.desiredPrivateClusterConfig != null && Object.hasOwnProperty.call(message, "desiredPrivateClusterConfig")) - $root.google.container.v1.PrivateClusterConfig.encode(message.desiredPrivateClusterConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.desiredIntraNodeVisibilityConfig != null && Object.hasOwnProperty.call(message, "desiredIntraNodeVisibilityConfig")) - $root.google.container.v1.IntraNodeVisibilityConfig.encode(message.desiredIntraNodeVisibilityConfig, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.desiredDefaultSnatStatus != null && Object.hasOwnProperty.call(message, "desiredDefaultSnatStatus")) - $root.google.container.v1.DefaultSnatStatus.encode(message.desiredDefaultSnatStatus, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.desiredReleaseChannel != null && Object.hasOwnProperty.call(message, "desiredReleaseChannel")) - $root.google.container.v1.ReleaseChannel.encode(message.desiredReleaseChannel, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.desiredL4ilbSubsettingConfig != null && Object.hasOwnProperty.call(message, "desiredL4ilbSubsettingConfig")) - $root.google.container.v1.ILBSubsettingConfig.encode(message.desiredL4ilbSubsettingConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.desiredDatabaseEncryption != null && Object.hasOwnProperty.call(message, "desiredDatabaseEncryption")) - $root.google.container.v1.DatabaseEncryption.encode(message.desiredDatabaseEncryption, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.desiredWorkloadIdentityConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadIdentityConfig")) - $root.google.container.v1.WorkloadIdentityConfig.encode(message.desiredWorkloadIdentityConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.desiredShieldedNodes != null && Object.hasOwnProperty.call(message, "desiredShieldedNodes")) - $root.google.container.v1.ShieldedNodes.encode(message.desiredShieldedNodes, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.desiredCostManagementConfig != null && Object.hasOwnProperty.call(message, "desiredCostManagementConfig")) - $root.google.container.v1.CostManagementConfig.encode(message.desiredCostManagementConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.desiredDatapathProvider != null && Object.hasOwnProperty.call(message, "desiredDatapathProvider")) - writer.uint32(/* id 50, wireType 0 =*/400).int32(message.desiredDatapathProvider); - if (message.desiredPrivateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "desiredPrivateIpv6GoogleAccess")) - writer.uint32(/* id 51, wireType 0 =*/408).int32(message.desiredPrivateIpv6GoogleAccess); - if (message.desiredDnsConfig != null && Object.hasOwnProperty.call(message, "desiredDnsConfig")) - $root.google.container.v1.DNSConfig.encode(message.desiredDnsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.desiredNotificationConfig != null && Object.hasOwnProperty.call(message, "desiredNotificationConfig")) - $root.google.container.v1.NotificationConfig.encode(message.desiredNotificationConfig, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); - if (message.desiredServiceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "desiredServiceExternalIpsConfig")) - $root.google.container.v1.ServiceExternalIPsConfig.encode(message.desiredServiceExternalIpsConfig, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); - if (message.desiredAuthenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "desiredAuthenticatorGroupsConfig")) - $root.google.container.v1.AuthenticatorGroupsConfig.encode(message.desiredAuthenticatorGroupsConfig, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); - if (message.desiredLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredLoggingConfig")) - $root.google.container.v1.LoggingConfig.encode(message.desiredLoggingConfig, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); - if (message.desiredMonitoringConfig != null && Object.hasOwnProperty.call(message, "desiredMonitoringConfig")) - $root.google.container.v1.MonitoringConfig.encode(message.desiredMonitoringConfig, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); - if (message.desiredIdentityServiceConfig != null && Object.hasOwnProperty.call(message, "desiredIdentityServiceConfig")) - $root.google.container.v1.IdentityServiceConfig.encode(message.desiredIdentityServiceConfig, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); - if (message.desiredMeshCertificates != null && Object.hasOwnProperty.call(message, "desiredMeshCertificates")) - $root.google.container.v1.MeshCertificates.encode(message.desiredMeshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.desiredEnablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "desiredEnablePrivateEndpoint")) - writer.uint32(/* id 71, wireType 0 =*/568).bool(message.desiredEnablePrivateEndpoint); - if (message.desiredDefaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "desiredDefaultEnablePrivateNodes")) - writer.uint32(/* id 72, wireType 0 =*/576).bool(message.desiredDefaultEnablePrivateNodes); - if (message.desiredControlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "desiredControlPlaneEndpointsConfig")) - $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.desiredControlPlaneEndpointsConfig, writer.uint32(/* id 73, wireType 2 =*/586).fork()).ldelim(); - if (message.desiredMasterVersion != null && Object.hasOwnProperty.call(message, "desiredMasterVersion")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.desiredMasterVersion); - if (message.desiredGcfsConfig != null && Object.hasOwnProperty.call(message, "desiredGcfsConfig")) - $root.google.container.v1.GcfsConfig.encode(message.desiredGcfsConfig, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.desiredNodePoolAutoConfigNetworkTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigNetworkTags")) - $root.google.container.v1.NetworkTags.encode(message.desiredNodePoolAutoConfigNetworkTags, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); - if (message.desiredGatewayApiConfig != null && Object.hasOwnProperty.call(message, "desiredGatewayApiConfig")) - $root.google.container.v1.GatewayAPIConfig.encode(message.desiredGatewayApiConfig, writer.uint32(/* id 114, wireType 2 =*/914).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); - if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) - $root.google.container.v1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); - if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) - $root.google.container.v1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); - if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) - writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); - if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) - $root.google.container.v1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); - if (message.removedAdditionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "removedAdditionalPodRangesConfig")) - $root.google.container.v1.AdditionalPodRangesConfig.encode(message.removedAdditionalPodRangesConfig, writer.uint32(/* id 121, wireType 2 =*/970).fork()).ldelim(); - if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) - $root.google.container.v1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 122, wireType 2 =*/978).fork()).ldelim(); - if (message.desiredSecurityPostureConfig != null && Object.hasOwnProperty.call(message, "desiredSecurityPostureConfig")) - $root.google.container.v1.SecurityPostureConfig.encode(message.desiredSecurityPostureConfig, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); - if (message.desiredNetworkPerformanceConfig != null && Object.hasOwnProperty.call(message, "desiredNetworkPerformanceConfig")) - $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.desiredNetworkPerformanceConfig, writer.uint32(/* id 125, wireType 2 =*/1002).fork()).ldelim(); - if (message.desiredEnableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableFqdnNetworkPolicy")) - writer.uint32(/* id 126, wireType 0 =*/1008).bool(message.desiredEnableFqdnNetworkPolicy); - if (message.desiredAutopilotWorkloadPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredAutopilotWorkloadPolicyConfig")) - $root.google.container.v1.WorkloadPolicyConfig.encode(message.desiredAutopilotWorkloadPolicyConfig, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); - if (message.desiredK8sBetaApis != null && Object.hasOwnProperty.call(message, "desiredK8sBetaApis")) - $root.google.container.v1.K8sBetaAPIConfig.encode(message.desiredK8sBetaApis, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); - if (message.desiredContainerdConfig != null && Object.hasOwnProperty.call(message, "desiredContainerdConfig")) - $root.google.container.v1.ContainerdConfig.encode(message.desiredContainerdConfig, writer.uint32(/* id 134, wireType 2 =*/1074).fork()).ldelim(); - if (message.desiredEnableMultiNetworking != null && Object.hasOwnProperty.call(message, "desiredEnableMultiNetworking")) - writer.uint32(/* id 135, wireType 0 =*/1080).bool(message.desiredEnableMultiNetworking); - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigResourceManagerTags")) - $root.google.container.v1.ResourceManagerTags.encode(message.desiredNodePoolAutoConfigResourceManagerTags, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); - if (message.desiredInTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "desiredInTransitEncryptionConfig")) - writer.uint32(/* id 137, wireType 0 =*/1096).int32(message.desiredInTransitEncryptionConfig); - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableCiliumClusterwideNetworkPolicy")) - writer.uint32(/* id 138, wireType 0 =*/1104).bool(message.desiredEnableCiliumClusterwideNetworkPolicy); - if (message.desiredSecretManagerConfig != null && Object.hasOwnProperty.call(message, "desiredSecretManagerConfig")) - $root.google.container.v1.SecretManagerConfig.encode(message.desiredSecretManagerConfig, writer.uint32(/* id 139, wireType 2 =*/1114).fork()).ldelim(); - if (message.desiredCompliancePostureConfig != null && Object.hasOwnProperty.call(message, "desiredCompliancePostureConfig")) - $root.google.container.v1.CompliancePostureConfig.encode(message.desiredCompliancePostureConfig, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); - if (message.desiredNodeKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodeKubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodeKubeletConfig, writer.uint32(/* id 141, wireType 2 =*/1130).fork()).ldelim(); - if (message.desiredNodePoolAutoConfigKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigKubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodePoolAutoConfigKubeletConfig, writer.uint32(/* id 142, wireType 2 =*/1138).fork()).ldelim(); - if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) - $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); - if (message.desiredRbacBindingConfig != null && Object.hasOwnProperty.call(message, "desiredRbacBindingConfig")) - $root.google.container.v1.RBACBindingConfig.encode(message.desiredRbacBindingConfig, writer.uint32(/* id 144, wireType 2 =*/1154).fork()).ldelim(); - if (message.desiredEnterpriseConfig != null && Object.hasOwnProperty.call(message, "desiredEnterpriseConfig")) - $root.google.container.v1.DesiredEnterpriseConfig.encode(message.desiredEnterpriseConfig, writer.uint32(/* id 147, wireType 2 =*/1178).fork()).ldelim(); - if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigLinuxNodeConfig")) - $root.google.container.v1.LinuxNodeConfig.encode(message.desiredNodePoolAutoConfigLinuxNodeConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1.ClusterUpdate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {google.container.v1.IClusterUpdate} message ClusterUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ClusterUpdate} ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterUpdate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClusterUpdate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.desiredNodeVersion = reader.string(); - break; - } - case 5: { - message.desiredMonitoringService = reader.string(); - break; - } - case 6: { - message.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.desiredNodePoolId = reader.string(); - break; - } - case 8: { - message.desiredImageType = reader.string(); - break; - } - case 46: { - message.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 47: { - message.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); - break; - } - case 67: { - message.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.decode(reader, reader.uint32()); - break; - } - case 48: { - message.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.decode(reader, reader.uint32()); - break; - } - case 49: { - message.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.decode(reader, reader.uint32()); - break; - } - case 53: { - message.desiredDnsConfig = $root.google.container.v1.DNSConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.desiredLocations && message.desiredLocations.length)) - message.desiredLocations = []; - message.desiredLocations.push(reader.string()); - break; - } - case 12: { - message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.decode(reader, reader.uint32()); - break; - } - case 16: { - message.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.decode(reader, reader.uint32()); - break; - } - case 19: { - message.desiredLoggingService = reader.string(); - break; - } - case 21: { - message.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 25: { - message.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 26: { - message.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.decode(reader, reader.uint32()); - break; - } - case 28: { - message.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.decode(reader, reader.uint32()); - break; - } - case 31: { - message.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 39: { - message.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.decode(reader, reader.uint32()); - break; - } - case 50: { - message.desiredDatapathProvider = reader.int32(); - break; - } - case 51: { - message.desiredPrivateIpv6GoogleAccess = reader.int32(); - break; - } - case 55: { - message.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 63: { - message.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); - break; - } - case 64: { - message.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.decode(reader, reader.uint32()); - break; - } - case 65: { - message.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.decode(reader, reader.uint32()); - break; - } - case 66: { - message.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.decode(reader, reader.uint32()); - break; - } - case 60: { - message.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); - break; - } - case 71: { - message.desiredEnablePrivateEndpoint = reader.bool(); - break; - } - case 72: { - message.desiredDefaultEnablePrivateNodes = reader.bool(); - break; - } - case 73: { - message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.desiredMasterVersion = reader.string(); - break; - } - case 109: { - message.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 110: { - message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 114: { - message.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.decode(reader, reader.uint32()); - break; - } - case 115: { - message.etag = reader.string(); - break; - } - case 116: { - message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 117: { - message.desiredFleet = $root.google.container.v1.Fleet.decode(reader, reader.uint32()); - break; - } - case 119: { - message.desiredStackType = reader.int32(); - break; - } - case 120: { - message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 121: { - message.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 122: { - message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 124: { - message.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.decode(reader, reader.uint32()); - break; - } - case 125: { - message.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 126: { - message.desiredEnableFqdnNetworkPolicy = reader.bool(); - break; - } - case 128: { - message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 131: { - message.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 134: { - message.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 135: { - message.desiredEnableMultiNetworking = reader.bool(); - break; - } - case 136: { - message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 137: { - message.desiredInTransitEncryptionConfig = reader.int32(); - break; - } - case 138: { - message.desiredEnableCiliumClusterwideNetworkPolicy = reader.bool(); - break; - } - case 139: { - message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); - break; - } - case 140: { - message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); - break; - } - case 141: { - message.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 142: { - message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 143: { - message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); - break; - } - case 144: { - message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); - break; - } - case 147: { - message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.decode(reader, reader.uint32()); - break; - } - case 150: { - message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ClusterUpdate} ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterUpdate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterUpdate message. - * @function verify - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterUpdate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) - if (!$util.isString(message.desiredNodeVersion)) - return "desiredNodeVersion: string expected"; - if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) - if (!$util.isString(message.desiredMonitoringService)) - return "desiredMonitoringService: string expected"; - if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) { - var error = $root.google.container.v1.AddonsConfig.verify(message.desiredAddonsConfig); - if (error) - return "desiredAddonsConfig." + error; - } - if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) - if (!$util.isString(message.desiredNodePoolId)) - return "desiredNodePoolId: string expected"; - if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) - if (!$util.isString(message.desiredImageType)) - return "desiredImageType: string expected"; - if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) { - var error = $root.google.container.v1.DatabaseEncryption.verify(message.desiredDatabaseEncryption); - if (error) - return "desiredDatabaseEncryption." + error; - } - if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) { - var error = $root.google.container.v1.WorkloadIdentityConfig.verify(message.desiredWorkloadIdentityConfig); - if (error) - return "desiredWorkloadIdentityConfig." + error; - } - if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) { - var error = $root.google.container.v1.MeshCertificates.verify(message.desiredMeshCertificates); - if (error) - return "desiredMeshCertificates." + error; - } - if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) { - var error = $root.google.container.v1.ShieldedNodes.verify(message.desiredShieldedNodes); - if (error) - return "desiredShieldedNodes." + error; - } - if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) { - var error = $root.google.container.v1.CostManagementConfig.verify(message.desiredCostManagementConfig); - if (error) - return "desiredCostManagementConfig." + error; - } - if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) { - var error = $root.google.container.v1.DNSConfig.verify(message.desiredDnsConfig); - if (error) - return "desiredDnsConfig." + error; - } - if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) { - var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.desiredNodePoolAutoscaling); - if (error) - return "desiredNodePoolAutoscaling." + error; - } - if (message.desiredLocations != null && message.hasOwnProperty("desiredLocations")) { - if (!Array.isArray(message.desiredLocations)) - return "desiredLocations: array expected"; - for (var i = 0; i < message.desiredLocations.length; ++i) - if (!$util.isString(message.desiredLocations[i])) - return "desiredLocations: string[] expected"; - } - if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) { - var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.desiredMasterAuthorizedNetworksConfig); - if (error) - return "desiredMasterAuthorizedNetworksConfig." + error; - } - if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) { - var error = $root.google.container.v1.ClusterAutoscaling.verify(message.desiredClusterAutoscaling); - if (error) - return "desiredClusterAutoscaling." + error; - } - if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) { - var error = $root.google.container.v1.BinaryAuthorization.verify(message.desiredBinaryAuthorization); - if (error) - return "desiredBinaryAuthorization." + error; - } - if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) - if (!$util.isString(message.desiredLoggingService)) - return "desiredLoggingService: string expected"; - if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) { - var error = $root.google.container.v1.ResourceUsageExportConfig.verify(message.desiredResourceUsageExportConfig); - if (error) - return "desiredResourceUsageExportConfig." + error; - } - if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) { - var error = $root.google.container.v1.VerticalPodAutoscaling.verify(message.desiredVerticalPodAutoscaling); - if (error) - return "desiredVerticalPodAutoscaling." + error; - } - if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) { - var error = $root.google.container.v1.PrivateClusterConfig.verify(message.desiredPrivateClusterConfig); - if (error) - return "desiredPrivateClusterConfig." + error; - } - if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) { - var error = $root.google.container.v1.IntraNodeVisibilityConfig.verify(message.desiredIntraNodeVisibilityConfig); - if (error) - return "desiredIntraNodeVisibilityConfig." + error; - } - if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) { - var error = $root.google.container.v1.DefaultSnatStatus.verify(message.desiredDefaultSnatStatus); - if (error) - return "desiredDefaultSnatStatus." + error; - } - if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) { - var error = $root.google.container.v1.ReleaseChannel.verify(message.desiredReleaseChannel); - if (error) - return "desiredReleaseChannel." + error; - } - if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) { - var error = $root.google.container.v1.ILBSubsettingConfig.verify(message.desiredL4ilbSubsettingConfig); - if (error) - return "desiredL4ilbSubsettingConfig." + error; - } - if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) - switch (message.desiredDatapathProvider) { - default: - return "desiredDatapathProvider: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) - switch (message.desiredPrivateIpv6GoogleAccess) { - default: - return "desiredPrivateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) { - var error = $root.google.container.v1.NotificationConfig.verify(message.desiredNotificationConfig); - if (error) - return "desiredNotificationConfig." + error; - } - if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) { - var error = $root.google.container.v1.AuthenticatorGroupsConfig.verify(message.desiredAuthenticatorGroupsConfig); - if (error) - return "desiredAuthenticatorGroupsConfig." + error; - } - if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) { - var error = $root.google.container.v1.LoggingConfig.verify(message.desiredLoggingConfig); - if (error) - return "desiredLoggingConfig." + error; - } - if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) { - var error = $root.google.container.v1.MonitoringConfig.verify(message.desiredMonitoringConfig); - if (error) - return "desiredMonitoringConfig." + error; - } - if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) { - var error = $root.google.container.v1.IdentityServiceConfig.verify(message.desiredIdentityServiceConfig); - if (error) - return "desiredIdentityServiceConfig." + error; - } - if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) { - var error = $root.google.container.v1.ServiceExternalIPsConfig.verify(message.desiredServiceExternalIpsConfig); - if (error) - return "desiredServiceExternalIpsConfig." + error; - } - if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { - properties._desiredEnablePrivateEndpoint = 1; - if (typeof message.desiredEnablePrivateEndpoint !== "boolean") - return "desiredEnablePrivateEndpoint: boolean expected"; - } - if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { - properties._desiredDefaultEnablePrivateNodes = 1; - if (typeof message.desiredDefaultEnablePrivateNodes !== "boolean") - return "desiredDefaultEnablePrivateNodes: boolean expected"; - } - if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) { - var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.desiredControlPlaneEndpointsConfig); - if (error) - return "desiredControlPlaneEndpointsConfig." + error; - } - if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) - if (!$util.isString(message.desiredMasterVersion)) - return "desiredMasterVersion: string expected"; - if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) { - var error = $root.google.container.v1.GcfsConfig.verify(message.desiredGcfsConfig); - if (error) - return "desiredGcfsConfig." + error; - } - if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) { - var error = $root.google.container.v1.NetworkTags.verify(message.desiredNodePoolAutoConfigNetworkTags); - if (error) - return "desiredNodePoolAutoConfigNetworkTags." + error; - } - if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) { - var error = $root.google.container.v1.GatewayAPIConfig.verify(message.desiredGatewayApiConfig); - if (error) - return "desiredGatewayApiConfig." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) { - var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.desiredNodePoolLoggingConfig); - if (error) - return "desiredNodePoolLoggingConfig." + error; - } - if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { - var error = $root.google.container.v1.Fleet.verify(message.desiredFleet); - if (error) - return "desiredFleet." + error; - } - if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) - switch (message.desiredStackType) { - default: - return "desiredStackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { - var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); - if (error) - return "additionalPodRangesConfig." + error; - } - if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) { - var error = $root.google.container.v1.AdditionalPodRangesConfig.verify(message.removedAdditionalPodRangesConfig); - if (error) - return "removedAdditionalPodRangesConfig." + error; - } - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { - var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); - if (error) - return "enableK8sBetaApis." + error; - } - if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) { - var error = $root.google.container.v1.SecurityPostureConfig.verify(message.desiredSecurityPostureConfig); - if (error) - return "desiredSecurityPostureConfig." + error; - } - if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) { - var error = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.desiredNetworkPerformanceConfig); - if (error) - return "desiredNetworkPerformanceConfig." + error; - } - if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { - properties._desiredEnableFqdnNetworkPolicy = 1; - if (typeof message.desiredEnableFqdnNetworkPolicy !== "boolean") - return "desiredEnableFqdnNetworkPolicy: boolean expected"; - } - if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) { - var error = $root.google.container.v1.WorkloadPolicyConfig.verify(message.desiredAutopilotWorkloadPolicyConfig); - if (error) - return "desiredAutopilotWorkloadPolicyConfig." + error; - } - if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) { - var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.desiredK8sBetaApis); - if (error) - return "desiredK8sBetaApis." + error; - } - if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) { - var error = $root.google.container.v1.ContainerdConfig.verify(message.desiredContainerdConfig); - if (error) - return "desiredContainerdConfig." + error; - } - if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { - properties._desiredEnableMultiNetworking = 1; - if (typeof message.desiredEnableMultiNetworking !== "boolean") - return "desiredEnableMultiNetworking: boolean expected"; - } - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) { - var error = $root.google.container.v1.ResourceManagerTags.verify(message.desiredNodePoolAutoConfigResourceManagerTags); - if (error) - return "desiredNodePoolAutoConfigResourceManagerTags." + error; - } - if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { - properties._desiredInTransitEncryptionConfig = 1; - switch (message.desiredInTransitEncryptionConfig) { - default: - return "desiredInTransitEncryptionConfig: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { - properties._desiredEnableCiliumClusterwideNetworkPolicy = 1; - if (typeof message.desiredEnableCiliumClusterwideNetworkPolicy !== "boolean") - return "desiredEnableCiliumClusterwideNetworkPolicy: boolean expected"; - } - if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { - properties._desiredSecretManagerConfig = 1; - { - var error = $root.google.container.v1.SecretManagerConfig.verify(message.desiredSecretManagerConfig); - if (error) - return "desiredSecretManagerConfig." + error; - } - } - if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { - properties._desiredCompliancePostureConfig = 1; - { - var error = $root.google.container.v1.CompliancePostureConfig.verify(message.desiredCompliancePostureConfig); - if (error) - return "desiredCompliancePostureConfig." + error; - } - } - if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.desiredNodeKubeletConfig); - if (error) - return "desiredNodeKubeletConfig." + error; - } - if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.desiredNodePoolAutoConfigKubeletConfig); - if (error) - return "desiredNodePoolAutoConfigKubeletConfig." + error; - } - if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { - var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); - if (error) - return "userManagedKeysConfig." + error; - } - if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { - properties._desiredRbacBindingConfig = 1; - { - var error = $root.google.container.v1.RBACBindingConfig.verify(message.desiredRbacBindingConfig); - if (error) - return "desiredRbacBindingConfig." + error; - } - } - if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) { - var error = $root.google.container.v1.DesiredEnterpriseConfig.verify(message.desiredEnterpriseConfig); - if (error) - return "desiredEnterpriseConfig." + error; - } - if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) { - var error = $root.google.container.v1.LinuxNodeConfig.verify(message.desiredNodePoolAutoConfigLinuxNodeConfig); - if (error) - return "desiredNodePoolAutoConfigLinuxNodeConfig." + error; - } - return null; - }; - - /** - * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ClusterUpdate} ClusterUpdate - */ - ClusterUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ClusterUpdate) - return object; - var message = new $root.google.container.v1.ClusterUpdate(); - if (object.desiredNodeVersion != null) - message.desiredNodeVersion = String(object.desiredNodeVersion); - if (object.desiredMonitoringService != null) - message.desiredMonitoringService = String(object.desiredMonitoringService); - if (object.desiredAddonsConfig != null) { - if (typeof object.desiredAddonsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredAddonsConfig: object expected"); - message.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.desiredAddonsConfig); - } - if (object.desiredNodePoolId != null) - message.desiredNodePoolId = String(object.desiredNodePoolId); - if (object.desiredImageType != null) - message.desiredImageType = String(object.desiredImageType); - if (object.desiredDatabaseEncryption != null) { - if (typeof object.desiredDatabaseEncryption !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredDatabaseEncryption: object expected"); - message.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.fromObject(object.desiredDatabaseEncryption); - } - if (object.desiredWorkloadIdentityConfig != null) { - if (typeof object.desiredWorkloadIdentityConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredWorkloadIdentityConfig: object expected"); - message.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.fromObject(object.desiredWorkloadIdentityConfig); - } - if (object.desiredMeshCertificates != null) { - if (typeof object.desiredMeshCertificates !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredMeshCertificates: object expected"); - message.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.fromObject(object.desiredMeshCertificates); - } - if (object.desiredShieldedNodes != null) { - if (typeof object.desiredShieldedNodes !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredShieldedNodes: object expected"); - message.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.fromObject(object.desiredShieldedNodes); - } - if (object.desiredCostManagementConfig != null) { - if (typeof object.desiredCostManagementConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredCostManagementConfig: object expected"); - message.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.fromObject(object.desiredCostManagementConfig); - } - if (object.desiredDnsConfig != null) { - if (typeof object.desiredDnsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredDnsConfig: object expected"); - message.desiredDnsConfig = $root.google.container.v1.DNSConfig.fromObject(object.desiredDnsConfig); - } - if (object.desiredNodePoolAutoscaling != null) { - if (typeof object.desiredNodePoolAutoscaling !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoscaling: object expected"); - message.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.desiredNodePoolAutoscaling); - } - if (object.desiredLocations) { - if (!Array.isArray(object.desiredLocations)) - throw TypeError(".google.container.v1.ClusterUpdate.desiredLocations: array expected"); - message.desiredLocations = []; - for (var i = 0; i < object.desiredLocations.length; ++i) - message.desiredLocations[i] = String(object.desiredLocations[i]); - } - if (object.desiredMasterAuthorizedNetworksConfig != null) { - if (typeof object.desiredMasterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredMasterAuthorizedNetworksConfig: object expected"); - message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.desiredMasterAuthorizedNetworksConfig); - } - if (object.desiredClusterAutoscaling != null) { - if (typeof object.desiredClusterAutoscaling !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredClusterAutoscaling: object expected"); - message.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.fromObject(object.desiredClusterAutoscaling); - } - if (object.desiredBinaryAuthorization != null) { - if (typeof object.desiredBinaryAuthorization !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredBinaryAuthorization: object expected"); - message.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.fromObject(object.desiredBinaryAuthorization); - } - if (object.desiredLoggingService != null) - message.desiredLoggingService = String(object.desiredLoggingService); - if (object.desiredResourceUsageExportConfig != null) { - if (typeof object.desiredResourceUsageExportConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredResourceUsageExportConfig: object expected"); - message.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.fromObject(object.desiredResourceUsageExportConfig); - } - if (object.desiredVerticalPodAutoscaling != null) { - if (typeof object.desiredVerticalPodAutoscaling !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredVerticalPodAutoscaling: object expected"); - message.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.fromObject(object.desiredVerticalPodAutoscaling); - } - if (object.desiredPrivateClusterConfig != null) { - if (typeof object.desiredPrivateClusterConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredPrivateClusterConfig: object expected"); - message.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.fromObject(object.desiredPrivateClusterConfig); - } - if (object.desiredIntraNodeVisibilityConfig != null) { - if (typeof object.desiredIntraNodeVisibilityConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredIntraNodeVisibilityConfig: object expected"); - message.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.fromObject(object.desiredIntraNodeVisibilityConfig); - } - if (object.desiredDefaultSnatStatus != null) { - if (typeof object.desiredDefaultSnatStatus !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredDefaultSnatStatus: object expected"); - message.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.fromObject(object.desiredDefaultSnatStatus); - } - if (object.desiredReleaseChannel != null) { - if (typeof object.desiredReleaseChannel !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredReleaseChannel: object expected"); - message.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.desiredReleaseChannel); - } - if (object.desiredL4ilbSubsettingConfig != null) { - if (typeof object.desiredL4ilbSubsettingConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredL4ilbSubsettingConfig: object expected"); - message.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.fromObject(object.desiredL4ilbSubsettingConfig); - } - switch (object.desiredDatapathProvider) { - default: - if (typeof object.desiredDatapathProvider === "number") { - message.desiredDatapathProvider = object.desiredDatapathProvider; - break; - } - break; - case "DATAPATH_PROVIDER_UNSPECIFIED": - case 0: - message.desiredDatapathProvider = 0; - break; - case "LEGACY_DATAPATH": - case 1: - message.desiredDatapathProvider = 1; - break; - case "ADVANCED_DATAPATH": - case 2: - message.desiredDatapathProvider = 2; - break; - } - switch (object.desiredPrivateIpv6GoogleAccess) { - default: - if (typeof object.desiredPrivateIpv6GoogleAccess === "number") { - message.desiredPrivateIpv6GoogleAccess = object.desiredPrivateIpv6GoogleAccess; - break; - } - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.desiredPrivateIpv6GoogleAccess = 0; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": - case 1: - message.desiredPrivateIpv6GoogleAccess = 1; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": - case 2: - message.desiredPrivateIpv6GoogleAccess = 2; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": - case 3: - message.desiredPrivateIpv6GoogleAccess = 3; - break; - } - if (object.desiredNotificationConfig != null) { - if (typeof object.desiredNotificationConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNotificationConfig: object expected"); - message.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.fromObject(object.desiredNotificationConfig); - } - if (object.desiredAuthenticatorGroupsConfig != null) { - if (typeof object.desiredAuthenticatorGroupsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredAuthenticatorGroupsConfig: object expected"); - message.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.fromObject(object.desiredAuthenticatorGroupsConfig); - } - if (object.desiredLoggingConfig != null) { - if (typeof object.desiredLoggingConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredLoggingConfig: object expected"); - message.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.fromObject(object.desiredLoggingConfig); - } - if (object.desiredMonitoringConfig != null) { - if (typeof object.desiredMonitoringConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredMonitoringConfig: object expected"); - message.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.fromObject(object.desiredMonitoringConfig); - } - if (object.desiredIdentityServiceConfig != null) { - if (typeof object.desiredIdentityServiceConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredIdentityServiceConfig: object expected"); - message.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.fromObject(object.desiredIdentityServiceConfig); - } - if (object.desiredServiceExternalIpsConfig != null) { - if (typeof object.desiredServiceExternalIpsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredServiceExternalIpsConfig: object expected"); - message.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.fromObject(object.desiredServiceExternalIpsConfig); - } - if (object.desiredEnablePrivateEndpoint != null) - message.desiredEnablePrivateEndpoint = Boolean(object.desiredEnablePrivateEndpoint); - if (object.desiredDefaultEnablePrivateNodes != null) - message.desiredDefaultEnablePrivateNodes = Boolean(object.desiredDefaultEnablePrivateNodes); - if (object.desiredControlPlaneEndpointsConfig != null) { - if (typeof object.desiredControlPlaneEndpointsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredControlPlaneEndpointsConfig: object expected"); - message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.desiredControlPlaneEndpointsConfig); - } - if (object.desiredMasterVersion != null) - message.desiredMasterVersion = String(object.desiredMasterVersion); - if (object.desiredGcfsConfig != null) { - if (typeof object.desiredGcfsConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredGcfsConfig: object expected"); - message.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.desiredGcfsConfig); - } - if (object.desiredNodePoolAutoConfigNetworkTags != null) { - if (typeof object.desiredNodePoolAutoConfigNetworkTags !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigNetworkTags: object expected"); - message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.fromObject(object.desiredNodePoolAutoConfigNetworkTags); - } - if (object.desiredGatewayApiConfig != null) { - if (typeof object.desiredGatewayApiConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredGatewayApiConfig: object expected"); - message.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.fromObject(object.desiredGatewayApiConfig); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.desiredNodePoolLoggingConfig != null) { - if (typeof object.desiredNodePoolLoggingConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); - message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); - } - if (object.desiredFleet != null) { - if (typeof object.desiredFleet !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredFleet: object expected"); - message.desiredFleet = $root.google.container.v1.Fleet.fromObject(object.desiredFleet); - } - switch (object.desiredStackType) { - default: - if (typeof object.desiredStackType === "number") { - message.desiredStackType = object.desiredStackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.desiredStackType = 0; - break; - case "IPV4": - case 1: - message.desiredStackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.desiredStackType = 2; - break; - } - if (object.additionalPodRangesConfig != null) { - if (typeof object.additionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.additionalPodRangesConfig: object expected"); - message.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); - } - if (object.removedAdditionalPodRangesConfig != null) { - if (typeof object.removedAdditionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.removedAdditionalPodRangesConfig: object expected"); - message.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.fromObject(object.removedAdditionalPodRangesConfig); - } - if (object.enableK8sBetaApis != null) { - if (typeof object.enableK8sBetaApis !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.enableK8sBetaApis: object expected"); - message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); - } - if (object.desiredSecurityPostureConfig != null) { - if (typeof object.desiredSecurityPostureConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredSecurityPostureConfig: object expected"); - message.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.fromObject(object.desiredSecurityPostureConfig); - } - if (object.desiredNetworkPerformanceConfig != null) { - if (typeof object.desiredNetworkPerformanceConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNetworkPerformanceConfig: object expected"); - message.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.desiredNetworkPerformanceConfig); - } - if (object.desiredEnableFqdnNetworkPolicy != null) - message.desiredEnableFqdnNetworkPolicy = Boolean(object.desiredEnableFqdnNetworkPolicy); - if (object.desiredAutopilotWorkloadPolicyConfig != null) { - if (typeof object.desiredAutopilotWorkloadPolicyConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredAutopilotWorkloadPolicyConfig: object expected"); - message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.fromObject(object.desiredAutopilotWorkloadPolicyConfig); - } - if (object.desiredK8sBetaApis != null) { - if (typeof object.desiredK8sBetaApis !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredK8sBetaApis: object expected"); - message.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.fromObject(object.desiredK8sBetaApis); - } - if (object.desiredContainerdConfig != null) { - if (typeof object.desiredContainerdConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredContainerdConfig: object expected"); - message.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.desiredContainerdConfig); - } - if (object.desiredEnableMultiNetworking != null) - message.desiredEnableMultiNetworking = Boolean(object.desiredEnableMultiNetworking); - if (object.desiredNodePoolAutoConfigResourceManagerTags != null) { - if (typeof object.desiredNodePoolAutoConfigResourceManagerTags !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigResourceManagerTags: object expected"); - message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.desiredNodePoolAutoConfigResourceManagerTags); - } - switch (object.desiredInTransitEncryptionConfig) { - default: - if (typeof object.desiredInTransitEncryptionConfig === "number") { - message.desiredInTransitEncryptionConfig = object.desiredInTransitEncryptionConfig; - break; - } - break; - case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": - case 0: - message.desiredInTransitEncryptionConfig = 0; - break; - case "IN_TRANSIT_ENCRYPTION_DISABLED": - case 1: - message.desiredInTransitEncryptionConfig = 1; - break; - case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": - case 2: - message.desiredInTransitEncryptionConfig = 2; - break; - } - if (object.desiredEnableCiliumClusterwideNetworkPolicy != null) - message.desiredEnableCiliumClusterwideNetworkPolicy = Boolean(object.desiredEnableCiliumClusterwideNetworkPolicy); - if (object.desiredSecretManagerConfig != null) { - if (typeof object.desiredSecretManagerConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredSecretManagerConfig: object expected"); - message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.desiredSecretManagerConfig); - } - if (object.desiredCompliancePostureConfig != null) { - if (typeof object.desiredCompliancePostureConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredCompliancePostureConfig: object expected"); - message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.desiredCompliancePostureConfig); - } - if (object.desiredNodeKubeletConfig != null) { - if (typeof object.desiredNodeKubeletConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodeKubeletConfig: object expected"); - message.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.desiredNodeKubeletConfig); - } - if (object.desiredNodePoolAutoConfigKubeletConfig != null) { - if (typeof object.desiredNodePoolAutoConfigKubeletConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigKubeletConfig: object expected"); - message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.desiredNodePoolAutoConfigKubeletConfig); - } - if (object.userManagedKeysConfig != null) { - if (typeof object.userManagedKeysConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.userManagedKeysConfig: object expected"); - message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); - } - if (object.desiredRbacBindingConfig != null) { - if (typeof object.desiredRbacBindingConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredRbacBindingConfig: object expected"); - message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.desiredRbacBindingConfig); - } - if (object.desiredEnterpriseConfig != null) { - if (typeof object.desiredEnterpriseConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredEnterpriseConfig: object expected"); - message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.fromObject(object.desiredEnterpriseConfig); - } - if (object.desiredNodePoolAutoConfigLinuxNodeConfig != null) { - if (typeof object.desiredNodePoolAutoConfigLinuxNodeConfig !== "object") - throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigLinuxNodeConfig: object expected"); - message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.desiredNodePoolAutoConfigLinuxNodeConfig); - } - return message; - }; - - /** - * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {google.container.v1.ClusterUpdate} message ClusterUpdate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterUpdate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.desiredLocations = []; - if (options.defaults) { - object.desiredNodeVersion = ""; - object.desiredMonitoringService = ""; - object.desiredAddonsConfig = null; - object.desiredNodePoolId = ""; - object.desiredImageType = ""; - object.desiredNodePoolAutoscaling = null; - object.desiredMasterAuthorizedNetworksConfig = null; - object.desiredClusterAutoscaling = null; - object.desiredBinaryAuthorization = null; - object.desiredLoggingService = ""; - object.desiredResourceUsageExportConfig = null; - object.desiredVerticalPodAutoscaling = null; - object.desiredPrivateClusterConfig = null; - object.desiredIntraNodeVisibilityConfig = null; - object.desiredDefaultSnatStatus = null; - object.desiredReleaseChannel = null; - object.desiredL4ilbSubsettingConfig = null; - object.desiredDatabaseEncryption = null; - object.desiredWorkloadIdentityConfig = null; - object.desiredShieldedNodes = null; - object.desiredCostManagementConfig = null; - object.desiredDatapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; - object.desiredPrivateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; - object.desiredDnsConfig = null; - object.desiredNotificationConfig = null; - object.desiredServiceExternalIpsConfig = null; - object.desiredAuthenticatorGroupsConfig = null; - object.desiredLoggingConfig = null; - object.desiredMonitoringConfig = null; - object.desiredIdentityServiceConfig = null; - object.desiredMeshCertificates = null; - object.desiredControlPlaneEndpointsConfig = null; - object.desiredMasterVersion = ""; - object.desiredGcfsConfig = null; - object.desiredNodePoolAutoConfigNetworkTags = null; - object.desiredGatewayApiConfig = null; - object.etag = ""; - object.desiredNodePoolLoggingConfig = null; - object.desiredFleet = null; - object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; - object.additionalPodRangesConfig = null; - object.removedAdditionalPodRangesConfig = null; - object.enableK8sBetaApis = null; - object.desiredSecurityPostureConfig = null; - object.desiredNetworkPerformanceConfig = null; - object.desiredAutopilotWorkloadPolicyConfig = null; - object.desiredK8sBetaApis = null; - object.desiredContainerdConfig = null; - object.desiredNodePoolAutoConfigResourceManagerTags = null; - object.desiredNodeKubeletConfig = null; - object.desiredNodePoolAutoConfigKubeletConfig = null; - object.userManagedKeysConfig = null; - object.desiredEnterpriseConfig = null; - object.desiredNodePoolAutoConfigLinuxNodeConfig = null; - } - if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) - object.desiredNodeVersion = message.desiredNodeVersion; - if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) - object.desiredMonitoringService = message.desiredMonitoringService; - if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) - object.desiredAddonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.desiredAddonsConfig, options); - if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) - object.desiredNodePoolId = message.desiredNodePoolId; - if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) - object.desiredImageType = message.desiredImageType; - if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) - object.desiredNodePoolAutoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.desiredNodePoolAutoscaling, options); - if (message.desiredLocations && message.desiredLocations.length) { - object.desiredLocations = []; - for (var j = 0; j < message.desiredLocations.length; ++j) - object.desiredLocations[j] = message.desiredLocations[j]; - } - if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) - object.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.desiredMasterAuthorizedNetworksConfig, options); - if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) - object.desiredClusterAutoscaling = $root.google.container.v1.ClusterAutoscaling.toObject(message.desiredClusterAutoscaling, options); - if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) - object.desiredBinaryAuthorization = $root.google.container.v1.BinaryAuthorization.toObject(message.desiredBinaryAuthorization, options); - if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) - object.desiredLoggingService = message.desiredLoggingService; - if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) - object.desiredResourceUsageExportConfig = $root.google.container.v1.ResourceUsageExportConfig.toObject(message.desiredResourceUsageExportConfig, options); - if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) - object.desiredVerticalPodAutoscaling = $root.google.container.v1.VerticalPodAutoscaling.toObject(message.desiredVerticalPodAutoscaling, options); - if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) - object.desiredPrivateClusterConfig = $root.google.container.v1.PrivateClusterConfig.toObject(message.desiredPrivateClusterConfig, options); - if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) - object.desiredIntraNodeVisibilityConfig = $root.google.container.v1.IntraNodeVisibilityConfig.toObject(message.desiredIntraNodeVisibilityConfig, options); - if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) - object.desiredDefaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.toObject(message.desiredDefaultSnatStatus, options); - if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) - object.desiredReleaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.desiredReleaseChannel, options); - if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) - object.desiredL4ilbSubsettingConfig = $root.google.container.v1.ILBSubsettingConfig.toObject(message.desiredL4ilbSubsettingConfig, options); - if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) - object.desiredDatabaseEncryption = $root.google.container.v1.DatabaseEncryption.toObject(message.desiredDatabaseEncryption, options); - if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) - object.desiredWorkloadIdentityConfig = $root.google.container.v1.WorkloadIdentityConfig.toObject(message.desiredWorkloadIdentityConfig, options); - if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) - object.desiredShieldedNodes = $root.google.container.v1.ShieldedNodes.toObject(message.desiredShieldedNodes, options); - if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) - object.desiredCostManagementConfig = $root.google.container.v1.CostManagementConfig.toObject(message.desiredCostManagementConfig, options); - if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) - object.desiredDatapathProvider = options.enums === String ? $root.google.container.v1.DatapathProvider[message.desiredDatapathProvider] === undefined ? message.desiredDatapathProvider : $root.google.container.v1.DatapathProvider[message.desiredDatapathProvider] : message.desiredDatapathProvider; - if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) - object.desiredPrivateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] === undefined ? message.desiredPrivateIpv6GoogleAccess : $root.google.container.v1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] : message.desiredPrivateIpv6GoogleAccess; - if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) - object.desiredDnsConfig = $root.google.container.v1.DNSConfig.toObject(message.desiredDnsConfig, options); - if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) - object.desiredNotificationConfig = $root.google.container.v1.NotificationConfig.toObject(message.desiredNotificationConfig, options); - if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) - object.desiredServiceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.toObject(message.desiredServiceExternalIpsConfig, options); - if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) - object.desiredAuthenticatorGroupsConfig = $root.google.container.v1.AuthenticatorGroupsConfig.toObject(message.desiredAuthenticatorGroupsConfig, options); - if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) - object.desiredLoggingConfig = $root.google.container.v1.LoggingConfig.toObject(message.desiredLoggingConfig, options); - if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) - object.desiredMonitoringConfig = $root.google.container.v1.MonitoringConfig.toObject(message.desiredMonitoringConfig, options); - if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) - object.desiredIdentityServiceConfig = $root.google.container.v1.IdentityServiceConfig.toObject(message.desiredIdentityServiceConfig, options); - if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) - object.desiredMeshCertificates = $root.google.container.v1.MeshCertificates.toObject(message.desiredMeshCertificates, options); - if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { - object.desiredEnablePrivateEndpoint = message.desiredEnablePrivateEndpoint; - if (options.oneofs) - object._desiredEnablePrivateEndpoint = "desiredEnablePrivateEndpoint"; - } - if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { - object.desiredDefaultEnablePrivateNodes = message.desiredDefaultEnablePrivateNodes; - if (options.oneofs) - object._desiredDefaultEnablePrivateNodes = "desiredDefaultEnablePrivateNodes"; - } - if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) - object.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.desiredControlPlaneEndpointsConfig, options); - if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) - object.desiredMasterVersion = message.desiredMasterVersion; - if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) - object.desiredGcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.desiredGcfsConfig, options); - if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) - object.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1.NetworkTags.toObject(message.desiredNodePoolAutoConfigNetworkTags, options); - if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) - object.desiredGatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.toObject(message.desiredGatewayApiConfig, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) - object.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); - if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) - object.desiredFleet = $root.google.container.v1.Fleet.toObject(message.desiredFleet, options); - if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) - object.desiredStackType = options.enums === String ? $root.google.container.v1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1.StackType[message.desiredStackType] : message.desiredStackType; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) - object.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); - if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) - object.removedAdditionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.removedAdditionalPodRangesConfig, options); - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) - object.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); - if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) - object.desiredSecurityPostureConfig = $root.google.container.v1.SecurityPostureConfig.toObject(message.desiredSecurityPostureConfig, options); - if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) - object.desiredNetworkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.desiredNetworkPerformanceConfig, options); - if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { - object.desiredEnableFqdnNetworkPolicy = message.desiredEnableFqdnNetworkPolicy; - if (options.oneofs) - object._desiredEnableFqdnNetworkPolicy = "desiredEnableFqdnNetworkPolicy"; - } - if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) - object.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.toObject(message.desiredAutopilotWorkloadPolicyConfig, options); - if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) - object.desiredK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.desiredK8sBetaApis, options); - if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) - object.desiredContainerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.desiredContainerdConfig, options); - if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { - object.desiredEnableMultiNetworking = message.desiredEnableMultiNetworking; - if (options.oneofs) - object._desiredEnableMultiNetworking = "desiredEnableMultiNetworking"; - } - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) - object.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.desiredNodePoolAutoConfigResourceManagerTags, options); - if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { - object.desiredInTransitEncryptionConfig = options.enums === String ? $root.google.container.v1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] === undefined ? message.desiredInTransitEncryptionConfig : $root.google.container.v1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] : message.desiredInTransitEncryptionConfig; - if (options.oneofs) - object._desiredInTransitEncryptionConfig = "desiredInTransitEncryptionConfig"; - } - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { - object.desiredEnableCiliumClusterwideNetworkPolicy = message.desiredEnableCiliumClusterwideNetworkPolicy; - if (options.oneofs) - object._desiredEnableCiliumClusterwideNetworkPolicy = "desiredEnableCiliumClusterwideNetworkPolicy"; - } - if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { - object.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.desiredSecretManagerConfig, options); - if (options.oneofs) - object._desiredSecretManagerConfig = "desiredSecretManagerConfig"; - } - if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { - object.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.desiredCompliancePostureConfig, options); - if (options.oneofs) - object._desiredCompliancePostureConfig = "desiredCompliancePostureConfig"; - } - if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) - object.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodeKubeletConfig, options); - if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) - object.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodePoolAutoConfigKubeletConfig, options); - if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) - object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); - if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { - object.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.desiredRbacBindingConfig, options); - if (options.oneofs) - object._desiredRbacBindingConfig = "desiredRbacBindingConfig"; - } - if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) - object.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.toObject(message.desiredEnterpriseConfig, options); - if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) - object.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.desiredNodePoolAutoConfigLinuxNodeConfig, options); - return object; - }; - - /** - * Converts this ClusterUpdate to JSON. - * @function toJSON - * @memberof google.container.v1.ClusterUpdate - * @instance - * @returns {Object.} JSON object - */ - ClusterUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterUpdate - * @function getTypeUrl - * @memberof google.container.v1.ClusterUpdate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ClusterUpdate"; - }; - - return ClusterUpdate; - })(); - - v1.AdditionalPodRangesConfig = (function() { - - /** - * Properties of an AdditionalPodRangesConfig. - * @memberof google.container.v1 - * @interface IAdditionalPodRangesConfig - * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames - * @property {Array.|null} [podRangeInfo] AdditionalPodRangesConfig podRangeInfo - */ - - /** - * Constructs a new AdditionalPodRangesConfig. - * @memberof google.container.v1 - * @classdesc Represents an AdditionalPodRangesConfig. - * @implements IAdditionalPodRangesConfig - * @constructor - * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set - */ - function AdditionalPodRangesConfig(properties) { - this.podRangeNames = []; - this.podRangeInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalPodRangesConfig podRangeNames. - * @member {Array.} podRangeNames - * @memberof google.container.v1.AdditionalPodRangesConfig - * @instance - */ - AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; - - /** - * AdditionalPodRangesConfig podRangeInfo. - * @member {Array.} podRangeInfo - * @memberof google.container.v1.AdditionalPodRangesConfig - * @instance - */ - AdditionalPodRangesConfig.prototype.podRangeInfo = $util.emptyArray; - - /** - * Creates a new AdditionalPodRangesConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set - * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig instance - */ - AdditionalPodRangesConfig.create = function create(properties) { - return new AdditionalPodRangesConfig(properties); - }; - - /** - * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodRangesConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.podRangeNames != null && message.podRangeNames.length) - for (var i = 0; i < message.podRangeNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); - if (message.podRangeInfo != null && message.podRangeInfo.length) - for (var i = 0; i < message.podRangeInfo.length; ++i) - $root.google.container.v1.RangeInfo.encode(message.podRangeInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalPodRangesConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodRangesConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalPodRangesConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.podRangeNames && message.podRangeNames.length)) - message.podRangeNames = []; - message.podRangeNames.push(reader.string()); - break; - } - case 2: { - if (!(message.podRangeInfo && message.podRangeInfo.length)) - message.podRangeInfo = []; - message.podRangeInfo.push($root.google.container.v1.RangeInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodRangesConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalPodRangesConfig message. - * @function verify - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalPodRangesConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { - if (!Array.isArray(message.podRangeNames)) - return "podRangeNames: array expected"; - for (var i = 0; i < message.podRangeNames.length; ++i) - if (!$util.isString(message.podRangeNames[i])) - return "podRangeNames: string[] expected"; - } - if (message.podRangeInfo != null && message.hasOwnProperty("podRangeInfo")) { - if (!Array.isArray(message.podRangeInfo)) - return "podRangeInfo: array expected"; - for (var i = 0; i < message.podRangeInfo.length; ++i) { - var error = $root.google.container.v1.RangeInfo.verify(message.podRangeInfo[i]); - if (error) - return "podRangeInfo." + error; - } - } - return null; - }; - - /** - * Creates an AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - */ - AdditionalPodRangesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AdditionalPodRangesConfig) - return object; - var message = new $root.google.container.v1.AdditionalPodRangesConfig(); - if (object.podRangeNames) { - if (!Array.isArray(object.podRangeNames)) - throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeNames: array expected"); - message.podRangeNames = []; - for (var i = 0; i < object.podRangeNames.length; ++i) - message.podRangeNames[i] = String(object.podRangeNames[i]); - } - if (object.podRangeInfo) { - if (!Array.isArray(object.podRangeInfo)) - throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeInfo: array expected"); - message.podRangeInfo = []; - for (var i = 0; i < object.podRangeInfo.length; ++i) { - if (typeof object.podRangeInfo[i] !== "object") - throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeInfo: object expected"); - message.podRangeInfo[i] = $root.google.container.v1.RangeInfo.fromObject(object.podRangeInfo[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1.AdditionalPodRangesConfig} message AdditionalPodRangesConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalPodRangesConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.podRangeNames = []; - object.podRangeInfo = []; - } - if (message.podRangeNames && message.podRangeNames.length) { - object.podRangeNames = []; - for (var j = 0; j < message.podRangeNames.length; ++j) - object.podRangeNames[j] = message.podRangeNames[j]; - } - if (message.podRangeInfo && message.podRangeInfo.length) { - object.podRangeInfo = []; - for (var j = 0; j < message.podRangeInfo.length; ++j) - object.podRangeInfo[j] = $root.google.container.v1.RangeInfo.toObject(message.podRangeInfo[j], options); - } - return object; - }; - - /** - * Converts this AdditionalPodRangesConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AdditionalPodRangesConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalPodRangesConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalPodRangesConfig - * @function getTypeUrl - * @memberof google.container.v1.AdditionalPodRangesConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalPodRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AdditionalPodRangesConfig"; - }; - - return AdditionalPodRangesConfig; - })(); - - v1.RangeInfo = (function() { - - /** - * Properties of a RangeInfo. - * @memberof google.container.v1 - * @interface IRangeInfo - * @property {string|null} [rangeName] RangeInfo rangeName - * @property {number|null} [utilization] RangeInfo utilization - */ - - /** - * Constructs a new RangeInfo. - * @memberof google.container.v1 - * @classdesc Represents a RangeInfo. - * @implements IRangeInfo - * @constructor - * @param {google.container.v1.IRangeInfo=} [properties] Properties to set - */ - function RangeInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RangeInfo rangeName. - * @member {string} rangeName - * @memberof google.container.v1.RangeInfo - * @instance - */ - RangeInfo.prototype.rangeName = ""; - - /** - * RangeInfo utilization. - * @member {number} utilization - * @memberof google.container.v1.RangeInfo - * @instance - */ - RangeInfo.prototype.utilization = 0; - - /** - * Creates a new RangeInfo instance using the specified properties. - * @function create - * @memberof google.container.v1.RangeInfo - * @static - * @param {google.container.v1.IRangeInfo=} [properties] Properties to set - * @returns {google.container.v1.RangeInfo} RangeInfo instance - */ - RangeInfo.create = function create(properties) { - return new RangeInfo(properties); - }; - - /** - * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RangeInfo - * @static - * @param {google.container.v1.IRangeInfo} message RangeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); - if (message.utilization != null && Object.hasOwnProperty.call(message, "utilization")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.utilization); - return writer; - }; - - /** - * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1.RangeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RangeInfo - * @static - * @param {google.container.v1.IRangeInfo} message RangeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RangeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RangeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RangeInfo} RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RangeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rangeName = reader.string(); - break; - } - case 2: { - message.utilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RangeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RangeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RangeInfo} RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RangeInfo message. - * @function verify - * @memberof google.container.v1.RangeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RangeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - if (!$util.isString(message.rangeName)) - return "rangeName: string expected"; - if (message.utilization != null && message.hasOwnProperty("utilization")) - if (typeof message.utilization !== "number") - return "utilization: number expected"; - return null; - }; - - /** - * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RangeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RangeInfo} RangeInfo - */ - RangeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RangeInfo) - return object; - var message = new $root.google.container.v1.RangeInfo(); - if (object.rangeName != null) - message.rangeName = String(object.rangeName); - if (object.utilization != null) - message.utilization = Number(object.utilization); - return message; - }; - - /** - * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RangeInfo - * @static - * @param {google.container.v1.RangeInfo} message RangeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RangeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rangeName = ""; - object.utilization = 0; - } - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - object.rangeName = message.rangeName; - if (message.utilization != null && message.hasOwnProperty("utilization")) - object.utilization = options.json && !isFinite(message.utilization) ? String(message.utilization) : message.utilization; - return object; - }; - - /** - * Converts this RangeInfo to JSON. - * @function toJSON - * @memberof google.container.v1.RangeInfo - * @instance - * @returns {Object.} JSON object - */ - RangeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RangeInfo - * @function getTypeUrl - * @memberof google.container.v1.RangeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RangeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RangeInfo"; - }; - - return RangeInfo; - })(); - - v1.DesiredEnterpriseConfig = (function() { - - /** - * Properties of a DesiredEnterpriseConfig. - * @memberof google.container.v1 - * @interface IDesiredEnterpriseConfig - * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] DesiredEnterpriseConfig desiredTier - */ - - /** - * Constructs a new DesiredEnterpriseConfig. - * @memberof google.container.v1 - * @classdesc Represents a DesiredEnterpriseConfig. - * @implements IDesiredEnterpriseConfig - * @constructor - * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set - */ - function DesiredEnterpriseConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DesiredEnterpriseConfig desiredTier. - * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier - * @memberof google.container.v1.DesiredEnterpriseConfig - * @instance - */ - DesiredEnterpriseConfig.prototype.desiredTier = 0; - - /** - * Creates a new DesiredEnterpriseConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set - * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig instance - */ - DesiredEnterpriseConfig.create = function create(properties) { - return new DesiredEnterpriseConfig(properties); - }; - - /** - * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DesiredEnterpriseConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredTier); - return writer; - }; - - /** - * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DesiredEnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DesiredEnterpriseConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DesiredEnterpriseConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.desiredTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DesiredEnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DesiredEnterpriseConfig message. - * @function verify - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DesiredEnterpriseConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) - switch (message.desiredTier) { - default: - return "desiredTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig - */ - DesiredEnterpriseConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DesiredEnterpriseConfig) - return object; - var message = new $root.google.container.v1.DesiredEnterpriseConfig(); - switch (object.desiredTier) { - default: - if (typeof object.desiredTier === "number") { - message.desiredTier = object.desiredTier; - break; - } - break; - case "CLUSTER_TIER_UNSPECIFIED": - case 0: - message.desiredTier = 0; - break; - case "STANDARD": - case 1: - message.desiredTier = 1; - break; - case "ENTERPRISE": - case 2: - message.desiredTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {google.container.v1.DesiredEnterpriseConfig} message DesiredEnterpriseConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DesiredEnterpriseConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; - if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) - object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; - return object; - }; - - /** - * Converts this DesiredEnterpriseConfig to JSON. - * @function toJSON - * @memberof google.container.v1.DesiredEnterpriseConfig - * @instance - * @returns {Object.} JSON object - */ - DesiredEnterpriseConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DesiredEnterpriseConfig - * @function getTypeUrl - * @memberof google.container.v1.DesiredEnterpriseConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DesiredEnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DesiredEnterpriseConfig"; - }; - - return DesiredEnterpriseConfig; - })(); - - v1.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.container.v1 - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {string|null} [zone] Operation zone - * @property {google.container.v1.Operation.Type|null} [operationType] Operation operationType - * @property {google.container.v1.Operation.Status|null} [status] Operation status - * @property {string|null} [detail] Operation detail - * @property {string|null} [statusMessage] Operation statusMessage - * @property {string|null} [selfLink] Operation selfLink - * @property {string|null} [targetLink] Operation targetLink - * @property {string|null} [location] Operation location - * @property {string|null} [startTime] Operation startTime - * @property {string|null} [endTime] Operation endTime - * @property {google.container.v1.IOperationProgress|null} [progress] Operation progress - * @property {Array.|null} [clusterConditions] Operation clusterConditions - * @property {Array.|null} [nodepoolConditions] Operation nodepoolConditions - * @property {google.rpc.IStatus|null} [error] Operation error - */ - - /** - * Constructs a new Operation. - * @memberof google.container.v1 - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.container.v1.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - this.clusterConditions = []; - this.nodepoolConditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation zone. - * @member {string} zone - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.zone = ""; - - /** - * Operation operationType. - * @member {google.container.v1.Operation.Type} operationType - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.operationType = 0; - - /** - * Operation status. - * @member {google.container.v1.Operation.Status} status - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.status = 0; - - /** - * Operation detail. - * @member {string} detail - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.detail = ""; - - /** - * Operation statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.statusMessage = ""; - - /** - * Operation selfLink. - * @member {string} selfLink - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.selfLink = ""; - - /** - * Operation targetLink. - * @member {string} targetLink - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.targetLink = ""; - - /** - * Operation location. - * @member {string} location - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.location = ""; - - /** - * Operation startTime. - * @member {string} startTime - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.startTime = ""; - - /** - * Operation endTime. - * @member {string} endTime - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.endTime = ""; - - /** - * Operation progress. - * @member {google.container.v1.IOperationProgress|null|undefined} progress - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.progress = null; - - /** - * Operation clusterConditions. - * @member {Array.} clusterConditions - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.clusterConditions = $util.emptyArray; - - /** - * Operation nodepoolConditions. - * @member {Array.} nodepoolConditions - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.nodepoolConditions = $util.emptyArray; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.container.v1.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.container.v1.Operation - * @static - * @param {google.container.v1.IOperation=} [properties] Properties to set - * @returns {google.container.v1.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Operation - * @static - * @param {google.container.v1.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operationType); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.selfLink); - if (message.targetLink != null && Object.hasOwnProperty.call(message, "targetLink")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetLink); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.detail); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.location); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.startTime); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.endTime); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.container.v1.OperationProgress.encode(message.progress, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.clusterConditions != null && message.clusterConditions.length) - for (var i = 0; i < message.clusterConditions.length; ++i) - $root.google.container.v1.StatusCondition.encode(message.clusterConditions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.nodepoolConditions != null && message.nodepoolConditions.length) - for (var i = 0; i < message.nodepoolConditions.length; ++i) - $root.google.container.v1.StatusCondition.encode(message.nodepoolConditions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Operation - * @static - * @param {google.container.v1.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationType = reader.int32(); - break; - } - case 4: { - message.status = reader.int32(); - break; - } - case 8: { - message.detail = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.selfLink = reader.string(); - break; - } - case 7: { - message.targetLink = reader.string(); - break; - } - case 9: { - message.location = reader.string(); - break; - } - case 10: { - message.startTime = reader.string(); - break; - } - case 11: { - message.endTime = reader.string(); - break; - } - case 12: { - message.progress = $root.google.container.v1.OperationProgress.decode(reader, reader.uint32()); - break; - } - case 13: { - if (!(message.clusterConditions && message.clusterConditions.length)) - message.clusterConditions = []; - message.clusterConditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 14: { - if (!(message.nodepoolConditions && message.nodepoolConditions.length)) - message.nodepoolConditions = []; - message.nodepoolConditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 15: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.container.v1.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) - switch (message.operationType) { - default: - return "operationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 18: - case 19: - break; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.targetLink != null && message.hasOwnProperty("targetLink")) - if (!$util.isString(message.targetLink)) - return "targetLink: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isString(message.startTime)) - return "startTime: string expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) - if (!$util.isString(message.endTime)) - return "endTime: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.container.v1.OperationProgress.verify(message.progress); - if (error) - return "progress." + error; - } - if (message.clusterConditions != null && message.hasOwnProperty("clusterConditions")) { - if (!Array.isArray(message.clusterConditions)) - return "clusterConditions: array expected"; - for (var i = 0; i < message.clusterConditions.length; ++i) { - var error = $root.google.container.v1.StatusCondition.verify(message.clusterConditions[i]); - if (error) - return "clusterConditions." + error; - } - } - if (message.nodepoolConditions != null && message.hasOwnProperty("nodepoolConditions")) { - if (!Array.isArray(message.nodepoolConditions)) - return "nodepoolConditions: array expected"; - for (var i = 0; i < message.nodepoolConditions.length; ++i) { - var error = $root.google.container.v1.StatusCondition.verify(message.nodepoolConditions[i]); - if (error) - return "nodepoolConditions." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Operation) - return object; - var message = new $root.google.container.v1.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.zone != null) - message.zone = String(object.zone); - switch (object.operationType) { - default: - if (typeof object.operationType === "number") { - message.operationType = object.operationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.operationType = 0; - break; - case "CREATE_CLUSTER": - case 1: - message.operationType = 1; - break; - case "DELETE_CLUSTER": - case 2: - message.operationType = 2; - break; - case "UPGRADE_MASTER": - case 3: - message.operationType = 3; - break; - case "UPGRADE_NODES": - case 4: - message.operationType = 4; - break; - case "REPAIR_CLUSTER": - case 5: - message.operationType = 5; - break; - case "UPDATE_CLUSTER": - case 6: - message.operationType = 6; - break; - case "CREATE_NODE_POOL": - case 7: - message.operationType = 7; - break; - case "DELETE_NODE_POOL": - case 8: - message.operationType = 8; - break; - case "SET_NODE_POOL_MANAGEMENT": - case 9: - message.operationType = 9; - break; - case "AUTO_REPAIR_NODES": - case 10: - message.operationType = 10; - break; - case "AUTO_UPGRADE_NODES": - case 11: - message.operationType = 11; - break; - case "SET_LABELS": - case 12: - message.operationType = 12; - break; - case "SET_MASTER_AUTH": - case 13: - message.operationType = 13; - break; - case "SET_NODE_POOL_SIZE": - case 14: - message.operationType = 14; - break; - case "SET_NETWORK_POLICY": - case 15: - message.operationType = 15; - break; - case "SET_MAINTENANCE_POLICY": - case 16: - message.operationType = 16; - break; - case "RESIZE_CLUSTER": - case 18: - message.operationType = 18; - break; - case "FLEET_FEATURE_UPGRADE": - case 19: - message.operationType = 19; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "DONE": - case 3: - message.status = 3; - break; - case "ABORTING": - case 4: - message.status = 4; - break; - } - if (object.detail != null) - message.detail = String(object.detail); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.targetLink != null) - message.targetLink = String(object.targetLink); - if (object.location != null) - message.location = String(object.location); - if (object.startTime != null) - message.startTime = String(object.startTime); - if (object.endTime != null) - message.endTime = String(object.endTime); - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.container.v1.Operation.progress: object expected"); - message.progress = $root.google.container.v1.OperationProgress.fromObject(object.progress); - } - if (object.clusterConditions) { - if (!Array.isArray(object.clusterConditions)) - throw TypeError(".google.container.v1.Operation.clusterConditions: array expected"); - message.clusterConditions = []; - for (var i = 0; i < object.clusterConditions.length; ++i) { - if (typeof object.clusterConditions[i] !== "object") - throw TypeError(".google.container.v1.Operation.clusterConditions: object expected"); - message.clusterConditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.clusterConditions[i]); - } - } - if (object.nodepoolConditions) { - if (!Array.isArray(object.nodepoolConditions)) - throw TypeError(".google.container.v1.Operation.nodepoolConditions: array expected"); - message.nodepoolConditions = []; - for (var i = 0; i < object.nodepoolConditions.length; ++i) { - if (typeof object.nodepoolConditions[i] !== "object") - throw TypeError(".google.container.v1.Operation.nodepoolConditions: object expected"); - message.nodepoolConditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.nodepoolConditions[i]); - } - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.container.v1.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Operation - * @static - * @param {google.container.v1.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clusterConditions = []; - object.nodepoolConditions = []; - } - if (options.defaults) { - object.name = ""; - object.zone = ""; - object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.selfLink = ""; - object.targetLink = ""; - object.detail = ""; - object.location = ""; - object.startTime = ""; - object.endTime = ""; - object.progress = null; - object.error = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.container.v1.Operation.Type[message.operationType] === undefined ? message.operationType : $root.google.container.v1.Operation.Type[message.operationType] : message.operationType; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1.Operation.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.targetLink != null && message.hasOwnProperty("targetLink")) - object.targetLink = message.targetLink; - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = message.endTime; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.container.v1.OperationProgress.toObject(message.progress, options); - if (message.clusterConditions && message.clusterConditions.length) { - object.clusterConditions = []; - for (var j = 0; j < message.clusterConditions.length; ++j) - object.clusterConditions[j] = $root.google.container.v1.StatusCondition.toObject(message.clusterConditions[j], options); - } - if (message.nodepoolConditions && message.nodepoolConditions.length) { - object.nodepoolConditions = []; - for (var j = 0; j < message.nodepoolConditions.length; ++j) - object.nodepoolConditions[j] = $root.google.container.v1.StatusCondition.toObject(message.nodepoolConditions[j], options); - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.container.v1.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.container.v1.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Operation"; - }; - - /** - * Status enum. - * @name google.container.v1.Operation.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} DONE=3 DONE value - * @property {number} ABORTING=4 ABORTING value - */ - Operation.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "DONE"] = 3; - values[valuesById[4] = "ABORTING"] = 4; - return values; - })(); - - /** - * Type enum. - * @name google.container.v1.Operation.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CREATE_CLUSTER=1 CREATE_CLUSTER value - * @property {number} DELETE_CLUSTER=2 DELETE_CLUSTER value - * @property {number} UPGRADE_MASTER=3 UPGRADE_MASTER value - * @property {number} UPGRADE_NODES=4 UPGRADE_NODES value - * @property {number} REPAIR_CLUSTER=5 REPAIR_CLUSTER value - * @property {number} UPDATE_CLUSTER=6 UPDATE_CLUSTER value - * @property {number} CREATE_NODE_POOL=7 CREATE_NODE_POOL value - * @property {number} DELETE_NODE_POOL=8 DELETE_NODE_POOL value - * @property {number} SET_NODE_POOL_MANAGEMENT=9 SET_NODE_POOL_MANAGEMENT value - * @property {number} AUTO_REPAIR_NODES=10 AUTO_REPAIR_NODES value - * @property {number} AUTO_UPGRADE_NODES=11 AUTO_UPGRADE_NODES value - * @property {number} SET_LABELS=12 SET_LABELS value - * @property {number} SET_MASTER_AUTH=13 SET_MASTER_AUTH value - * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value - * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value - * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value - * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value - * @property {number} FLEET_FEATURE_UPGRADE=19 FLEET_FEATURE_UPGRADE value - */ - Operation.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE_CLUSTER"] = 1; - values[valuesById[2] = "DELETE_CLUSTER"] = 2; - values[valuesById[3] = "UPGRADE_MASTER"] = 3; - values[valuesById[4] = "UPGRADE_NODES"] = 4; - values[valuesById[5] = "REPAIR_CLUSTER"] = 5; - values[valuesById[6] = "UPDATE_CLUSTER"] = 6; - values[valuesById[7] = "CREATE_NODE_POOL"] = 7; - values[valuesById[8] = "DELETE_NODE_POOL"] = 8; - values[valuesById[9] = "SET_NODE_POOL_MANAGEMENT"] = 9; - values[valuesById[10] = "AUTO_REPAIR_NODES"] = 10; - values[valuesById[11] = "AUTO_UPGRADE_NODES"] = 11; - values[valuesById[12] = "SET_LABELS"] = 12; - values[valuesById[13] = "SET_MASTER_AUTH"] = 13; - values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; - values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; - values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; - values[valuesById[18] = "RESIZE_CLUSTER"] = 18; - values[valuesById[19] = "FLEET_FEATURE_UPGRADE"] = 19; - return values; - })(); - - return Operation; - })(); - - v1.OperationProgress = (function() { - - /** - * Properties of an OperationProgress. - * @memberof google.container.v1 - * @interface IOperationProgress - * @property {string|null} [name] OperationProgress name - * @property {google.container.v1.Operation.Status|null} [status] OperationProgress status - * @property {Array.|null} [metrics] OperationProgress metrics - * @property {Array.|null} [stages] OperationProgress stages - */ - - /** - * Constructs a new OperationProgress. - * @memberof google.container.v1 - * @classdesc Represents an OperationProgress. - * @implements IOperationProgress - * @constructor - * @param {google.container.v1.IOperationProgress=} [properties] Properties to set - */ - function OperationProgress(properties) { - this.metrics = []; - this.stages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationProgress name. - * @member {string} name - * @memberof google.container.v1.OperationProgress - * @instance - */ - OperationProgress.prototype.name = ""; - - /** - * OperationProgress status. - * @member {google.container.v1.Operation.Status} status - * @memberof google.container.v1.OperationProgress - * @instance - */ - OperationProgress.prototype.status = 0; - - /** - * OperationProgress metrics. - * @member {Array.} metrics - * @memberof google.container.v1.OperationProgress - * @instance - */ - OperationProgress.prototype.metrics = $util.emptyArray; - - /** - * OperationProgress stages. - * @member {Array.} stages - * @memberof google.container.v1.OperationProgress - * @instance - */ - OperationProgress.prototype.stages = $util.emptyArray; - - /** - * Creates a new OperationProgress instance using the specified properties. - * @function create - * @memberof google.container.v1.OperationProgress - * @static - * @param {google.container.v1.IOperationProgress=} [properties] Properties to set - * @returns {google.container.v1.OperationProgress} OperationProgress instance - */ - OperationProgress.create = function create(properties) { - return new OperationProgress(properties); - }; - - /** - * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. - * @function encode - * @memberof google.container.v1.OperationProgress - * @static - * @param {google.container.v1.IOperationProgress} message OperationProgress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationProgress.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.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.container.v1.OperationProgress.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.stages != null && message.stages.length) - for (var i = 0; i < message.stages.length; ++i) - $root.google.container.v1.OperationProgress.encode(message.stages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.OperationProgress - * @static - * @param {google.container.v1.IOperationProgress} message OperationProgress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationProgress message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.OperationProgress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.OperationProgress} OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationProgress.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.OperationProgress(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.status = reader.int32(); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.container.v1.OperationProgress.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.stages && message.stages.length)) - message.stages = []; - message.stages.push($root.google.container.v1.OperationProgress.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationProgress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.OperationProgress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.OperationProgress} OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationProgress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationProgress message. - * @function verify - * @memberof google.container.v1.OperationProgress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationProgress.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.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - 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) { - var error = $root.google.container.v1.OperationProgress.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.stages != null && message.hasOwnProperty("stages")) { - if (!Array.isArray(message.stages)) - return "stages: array expected"; - for (var i = 0; i < message.stages.length; ++i) { - var error = $root.google.container.v1.OperationProgress.verify(message.stages[i]); - if (error) - return "stages." + error; - } - } - return null; - }; - - /** - * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.OperationProgress - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.OperationProgress} OperationProgress - */ - OperationProgress.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.OperationProgress) - return object; - var message = new $root.google.container.v1.OperationProgress(); - if (object.name != null) - message.name = String(object.name); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "DONE": - case 3: - message.status = 3; - break; - case "ABORTING": - case 4: - message.status = 4; - break; - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.container.v1.OperationProgress.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.container.v1.OperationProgress.metrics: object expected"); - message.metrics[i] = $root.google.container.v1.OperationProgress.Metric.fromObject(object.metrics[i]); - } - } - if (object.stages) { - if (!Array.isArray(object.stages)) - throw TypeError(".google.container.v1.OperationProgress.stages: array expected"); - message.stages = []; - for (var i = 0; i < object.stages.length; ++i) { - if (typeof object.stages[i] !== "object") - throw TypeError(".google.container.v1.OperationProgress.stages: object expected"); - message.stages[i] = $root.google.container.v1.OperationProgress.fromObject(object.stages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.OperationProgress - * @static - * @param {google.container.v1.OperationProgress} message OperationProgress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationProgress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metrics = []; - object.stages = []; - } - if (options.defaults) { - object.name = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1.Operation.Status[message.status] : message.status; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.container.v1.OperationProgress.Metric.toObject(message.metrics[j], options); - } - if (message.stages && message.stages.length) { - object.stages = []; - for (var j = 0; j < message.stages.length; ++j) - object.stages[j] = $root.google.container.v1.OperationProgress.toObject(message.stages[j], options); - } - return object; - }; - - /** - * Converts this OperationProgress to JSON. - * @function toJSON - * @memberof google.container.v1.OperationProgress - * @instance - * @returns {Object.} JSON object - */ - OperationProgress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationProgress - * @function getTypeUrl - * @memberof google.container.v1.OperationProgress - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.OperationProgress"; - }; - - OperationProgress.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.container.v1.OperationProgress - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {number|Long|null} [intValue] Metric intValue - * @property {number|null} [doubleValue] Metric doubleValue - * @property {string|null} [stringValue] Metric stringValue - */ - - /** - * Constructs a new Metric. - * @memberof google.container.v1.OperationProgress - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.container.v1.OperationProgress.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric name. - * @member {string} name - * @memberof google.container.v1.OperationProgress.Metric - * @instance - */ - Metric.prototype.name = ""; - - /** - * Metric intValue. - * @member {number|Long|null|undefined} intValue - * @memberof google.container.v1.OperationProgress.Metric - * @instance - */ - Metric.prototype.intValue = null; - - /** - * Metric doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.container.v1.OperationProgress.Metric - * @instance - */ - Metric.prototype.doubleValue = null; - - /** - * Metric stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.container.v1.OperationProgress.Metric - * @instance - */ - Metric.prototype.stringValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Metric value. - * @member {"intValue"|"doubleValue"|"stringValue"|undefined} value - * @memberof google.container.v1.OperationProgress.Metric - * @instance - */ - Object.defineProperty(Metric.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {google.container.v1.OperationProgress.IMetric=} [properties] Properties to set - * @returns {google.container.v1.OperationProgress.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. - * @function encode - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {google.container.v1.OperationProgress.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.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.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.intValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1.OperationProgress.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {google.container.v1.OperationProgress.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.OperationProgress.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.OperationProgress.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.intValue = reader.int64(); - break; - } - case 3: { - message.doubleValue = reader.double(); - break; - } - case 4: { - message.stringValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.OperationProgress.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.OperationProgress.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.OperationProgress.Metric) - return object; - var message = new $root.google.container.v1.OperationProgress.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {google.container.v1.OperationProgress.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.container.v1.OperationProgress.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.container.v1.OperationProgress.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.OperationProgress.Metric"; - }; - - return Metric; - })(); - - return OperationProgress; - })(); - - v1.CreateClusterRequest = (function() { - - /** - * Properties of a CreateClusterRequest. - * @memberof google.container.v1 - * @interface ICreateClusterRequest - * @property {string|null} [projectId] CreateClusterRequest projectId - * @property {string|null} [zone] CreateClusterRequest zone - * @property {google.container.v1.ICluster|null} [cluster] CreateClusterRequest cluster - * @property {string|null} [parent] CreateClusterRequest parent - */ - - /** - * Constructs a new CreateClusterRequest. - * @memberof google.container.v1 - * @classdesc Represents a CreateClusterRequest. - * @implements ICreateClusterRequest - * @constructor - * @param {google.container.v1.ICreateClusterRequest=} [properties] Properties to set - */ - function CreateClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.projectId = ""; - - /** - * CreateClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.zone = ""; - - /** - * CreateClusterRequest cluster. - * @member {google.container.v1.ICluster|null|undefined} cluster - * @memberof google.container.v1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.cluster = null; - - /** - * CreateClusterRequest parent. - * @member {string} parent - * @memberof google.container.v1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.parent = ""; - - /** - * Creates a new CreateClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {google.container.v1.ICreateClusterRequest=} [properties] Properties to set - * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest instance - */ - CreateClusterRequest.create = function create(properties) { - return new CreateClusterRequest(properties); - }; - - /** - * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {google.container.v1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - $root.google.container.v1.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - return writer; - }; - - /** - * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {google.container.v1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CreateClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.cluster = $root.google.container.v1.Cluster.decode(reader, reader.uint32()); - break; - } - case 5: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateClusterRequest message. - * @function verify - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { - var error = $root.google.container.v1.Cluster.verify(message.cluster); - if (error) - return "cluster." + error; - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CreateClusterRequest} CreateClusterRequest - */ - CreateClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CreateClusterRequest) - return object; - var message = new $root.google.container.v1.CreateClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.cluster != null) { - if (typeof object.cluster !== "object") - throw TypeError(".google.container.v1.CreateClusterRequest.cluster: object expected"); - message.cluster = $root.google.container.v1.Cluster.fromObject(object.cluster); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {google.container.v1.CreateClusterRequest} message CreateClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.cluster = null; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.container.v1.Cluster.toObject(message.cluster, options); - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this CreateClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CreateClusterRequest - * @instance - * @returns {Object.} JSON object - */ - CreateClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateClusterRequest - * @function getTypeUrl - * @memberof google.container.v1.CreateClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CreateClusterRequest"; - }; - - return CreateClusterRequest; - })(); - - v1.GetClusterRequest = (function() { - - /** - * Properties of a GetClusterRequest. - * @memberof google.container.v1 - * @interface IGetClusterRequest - * @property {string|null} [projectId] GetClusterRequest projectId - * @property {string|null} [zone] GetClusterRequest zone - * @property {string|null} [clusterId] GetClusterRequest clusterId - * @property {string|null} [name] GetClusterRequest name - */ - - /** - * Constructs a new GetClusterRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetClusterRequest. - * @implements IGetClusterRequest - * @constructor - * @param {google.container.v1.IGetClusterRequest=} [properties] Properties to set - */ - function GetClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.projectId = ""; - - /** - * GetClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.zone = ""; - - /** - * GetClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.clusterId = ""; - - /** - * GetClusterRequest name. - * @member {string} name - * @memberof google.container.v1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.name = ""; - - /** - * Creates a new GetClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {google.container.v1.IGetClusterRequest=} [properties] Properties to set - * @returns {google.container.v1.GetClusterRequest} GetClusterRequest instance - */ - GetClusterRequest.create = function create(properties) { - return new GetClusterRequest(properties); - }; - - /** - * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {google.container.v1.IGetClusterRequest} message GetClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.GetClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {google.container.v1.IGetClusterRequest} message GetClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetClusterRequest} GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetClusterRequest} GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetClusterRequest message. - * @function verify - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetClusterRequest} GetClusterRequest - */ - GetClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetClusterRequest) - return object; - var message = new $root.google.container.v1.GetClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {google.container.v1.GetClusterRequest} message GetClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetClusterRequest - * @instance - * @returns {Object.} JSON object - */ - GetClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetClusterRequest - * @function getTypeUrl - * @memberof google.container.v1.GetClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetClusterRequest"; - }; - - return GetClusterRequest; - })(); - - v1.UpdateClusterRequest = (function() { - - /** - * Properties of an UpdateClusterRequest. - * @memberof google.container.v1 - * @interface IUpdateClusterRequest - * @property {string|null} [projectId] UpdateClusterRequest projectId - * @property {string|null} [zone] UpdateClusterRequest zone - * @property {string|null} [clusterId] UpdateClusterRequest clusterId - * @property {google.container.v1.IClusterUpdate|null} [update] UpdateClusterRequest update - * @property {string|null} [name] UpdateClusterRequest name - */ - - /** - * Constructs a new UpdateClusterRequest. - * @memberof google.container.v1 - * @classdesc Represents an UpdateClusterRequest. - * @implements IUpdateClusterRequest - * @constructor - * @param {google.container.v1.IUpdateClusterRequest=} [properties] Properties to set - */ - function UpdateClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.projectId = ""; - - /** - * UpdateClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.zone = ""; - - /** - * UpdateClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.clusterId = ""; - - /** - * UpdateClusterRequest update. - * @member {google.container.v1.IClusterUpdate|null|undefined} update - * @memberof google.container.v1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.update = null; - - /** - * UpdateClusterRequest name. - * @member {string} name - * @memberof google.container.v1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.name = ""; - - /** - * Creates a new UpdateClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {google.container.v1.IUpdateClusterRequest=} [properties] Properties to set - * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest instance - */ - UpdateClusterRequest.create = function create(properties) { - return new UpdateClusterRequest(properties); - }; - - /** - * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {google.container.v1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.container.v1.ClusterUpdate.encode(message.update, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {google.container.v1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.update = $root.google.container.v1.ClusterUpdate.decode(reader, reader.uint32()); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateClusterRequest message. - * @function verify - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.update != null && message.hasOwnProperty("update")) { - var error = $root.google.container.v1.ClusterUpdate.verify(message.update); - if (error) - return "update." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpdateClusterRequest} UpdateClusterRequest - */ - UpdateClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpdateClusterRequest) - return object; - var message = new $root.google.container.v1.UpdateClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.container.v1.UpdateClusterRequest.update: object expected"); - message.update = $root.google.container.v1.ClusterUpdate.fromObject(object.update); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {google.container.v1.UpdateClusterRequest} message UpdateClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.update = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.update != null && message.hasOwnProperty("update")) - object.update = $root.google.container.v1.ClusterUpdate.toObject(message.update, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this UpdateClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1.UpdateClusterRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateClusterRequest - * @function getTypeUrl - * @memberof google.container.v1.UpdateClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpdateClusterRequest"; - }; - - return UpdateClusterRequest; - })(); - - v1.UpdateNodePoolRequest = (function() { - - /** - * Properties of an UpdateNodePoolRequest. - * @memberof google.container.v1 - * @interface IUpdateNodePoolRequest - * @property {string|null} [projectId] UpdateNodePoolRequest projectId - * @property {string|null} [zone] UpdateNodePoolRequest zone - * @property {string|null} [clusterId] UpdateNodePoolRequest clusterId - * @property {string|null} [nodePoolId] UpdateNodePoolRequest nodePoolId - * @property {string|null} [nodeVersion] UpdateNodePoolRequest nodeVersion - * @property {string|null} [imageType] UpdateNodePoolRequest imageType - * @property {string|null} [name] UpdateNodePoolRequest name - * @property {Array.|null} [locations] UpdateNodePoolRequest locations - * @property {google.container.v1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] UpdateNodePoolRequest workloadMetadataConfig - * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] UpdateNodePoolRequest upgradeSettings - * @property {google.container.v1.INetworkTags|null} [tags] UpdateNodePoolRequest tags - * @property {google.container.v1.INodeTaints|null} [taints] UpdateNodePoolRequest taints - * @property {google.container.v1.INodeLabels|null} [labels] UpdateNodePoolRequest labels - * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] UpdateNodePoolRequest linuxNodeConfig - * @property {google.container.v1.INodeKubeletConfig|null} [kubeletConfig] UpdateNodePoolRequest kubeletConfig - * @property {google.container.v1.INodeNetworkConfig|null} [nodeNetworkConfig] UpdateNodePoolRequest nodeNetworkConfig - * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] UpdateNodePoolRequest gcfsConfig - * @property {google.container.v1.IConfidentialNodes|null} [confidentialNodes] UpdateNodePoolRequest confidentialNodes - * @property {google.container.v1.IVirtualNIC|null} [gvnic] UpdateNodePoolRequest gvnic - * @property {string|null} [etag] UpdateNodePoolRequest etag - * @property {google.container.v1.IFastSocket|null} [fastSocket] UpdateNodePoolRequest fastSocket - * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] UpdateNodePoolRequest loggingConfig - * @property {google.container.v1.IResourceLabels|null} [resourceLabels] UpdateNodePoolRequest resourceLabels - * @property {google.container.v1.IWindowsNodeConfig|null} [windowsNodeConfig] UpdateNodePoolRequest windowsNodeConfig - * @property {Array.|null} [accelerators] UpdateNodePoolRequest accelerators - * @property {string|null} [machineType] UpdateNodePoolRequest machineType - * @property {string|null} [diskType] UpdateNodePoolRequest diskType - * @property {number|Long|null} [diskSizeGb] UpdateNodePoolRequest diskSizeGb - * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] UpdateNodePoolRequest resourceManagerTags - * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] UpdateNodePoolRequest containerdConfig - * @property {google.container.v1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] UpdateNodePoolRequest queuedProvisioning - * @property {Array.|null} [storagePools] UpdateNodePoolRequest storagePools - */ - - /** - * Constructs a new UpdateNodePoolRequest. - * @memberof google.container.v1 - * @classdesc Represents an UpdateNodePoolRequest. - * @implements IUpdateNodePoolRequest - * @constructor - * @param {google.container.v1.IUpdateNodePoolRequest=} [properties] Properties to set - */ - function UpdateNodePoolRequest(properties) { - this.locations = []; - this.accelerators = []; - this.storagePools = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.projectId = ""; - - /** - * UpdateNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.zone = ""; - - /** - * UpdateNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.clusterId = ""; - - /** - * UpdateNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodePoolId = ""; - - /** - * UpdateNodePoolRequest nodeVersion. - * @member {string} nodeVersion - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodeVersion = ""; - - /** - * UpdateNodePoolRequest imageType. - * @member {string} imageType - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.imageType = ""; - - /** - * UpdateNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.name = ""; - - /** - * UpdateNodePoolRequest locations. - * @member {Array.} locations - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.locations = $util.emptyArray; - - /** - * UpdateNodePoolRequest workloadMetadataConfig. - * @member {google.container.v1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.workloadMetadataConfig = null; - - /** - * UpdateNodePoolRequest upgradeSettings. - * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.upgradeSettings = null; - - /** - * UpdateNodePoolRequest tags. - * @member {google.container.v1.INetworkTags|null|undefined} tags - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.tags = null; - - /** - * UpdateNodePoolRequest taints. - * @member {google.container.v1.INodeTaints|null|undefined} taints - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.taints = null; - - /** - * UpdateNodePoolRequest labels. - * @member {google.container.v1.INodeLabels|null|undefined} labels - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.labels = null; - - /** - * UpdateNodePoolRequest linuxNodeConfig. - * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.linuxNodeConfig = null; - - /** - * UpdateNodePoolRequest kubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} kubeletConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.kubeletConfig = null; - - /** - * UpdateNodePoolRequest nodeNetworkConfig. - * @member {google.container.v1.INodeNetworkConfig|null|undefined} nodeNetworkConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodeNetworkConfig = null; - - /** - * UpdateNodePoolRequest gcfsConfig. - * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.gcfsConfig = null; - - /** - * UpdateNodePoolRequest confidentialNodes. - * @member {google.container.v1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.confidentialNodes = null; - - /** - * UpdateNodePoolRequest gvnic. - * @member {google.container.v1.IVirtualNIC|null|undefined} gvnic - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.gvnic = null; - - /** - * UpdateNodePoolRequest etag. - * @member {string} etag - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.etag = ""; - - /** - * UpdateNodePoolRequest fastSocket. - * @member {google.container.v1.IFastSocket|null|undefined} fastSocket - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.fastSocket = null; - - /** - * UpdateNodePoolRequest loggingConfig. - * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.loggingConfig = null; - - /** - * UpdateNodePoolRequest resourceLabels. - * @member {google.container.v1.IResourceLabels|null|undefined} resourceLabels - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.resourceLabels = null; - - /** - * UpdateNodePoolRequest windowsNodeConfig. - * @member {google.container.v1.IWindowsNodeConfig|null|undefined} windowsNodeConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.windowsNodeConfig = null; - - /** - * UpdateNodePoolRequest accelerators. - * @member {Array.} accelerators - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.accelerators = $util.emptyArray; - - /** - * UpdateNodePoolRequest machineType. - * @member {string} machineType - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.machineType = ""; - - /** - * UpdateNodePoolRequest diskType. - * @member {string} diskType - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.diskType = ""; - - /** - * UpdateNodePoolRequest diskSizeGb. - * @member {number|Long} diskSizeGb - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UpdateNodePoolRequest resourceManagerTags. - * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.resourceManagerTags = null; - - /** - * UpdateNodePoolRequest containerdConfig. - * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.containerdConfig = null; - - /** - * UpdateNodePoolRequest queuedProvisioning. - * @member {google.container.v1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.queuedProvisioning = null; - - /** - * UpdateNodePoolRequest storagePools. - * @member {Array.} storagePools - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.storagePools = $util.emptyArray; - - /** - * Creates a new UpdateNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {google.container.v1.IUpdateNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest instance - */ - UpdateNodePoolRequest.create = function create(properties) { - return new UpdateNodePoolRequest(properties); - }; - - /** - * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {google.container.v1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.nodeVersion != null && Object.hasOwnProperty.call(message, "nodeVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeVersion); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.imageType); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.name); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) - $root.google.container.v1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.container.v1.NetworkTags.encode(message.tags, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.taints != null && Object.hasOwnProperty.call(message, "taints")) - $root.google.container.v1.NodeTaints.encode(message.taints, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - $root.google.container.v1.NodeLabels.encode(message.labels, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) - $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.nodeNetworkConfig != null && Object.hasOwnProperty.call(message, "nodeNetworkConfig")) - $root.google.container.v1.NodeNetworkConfig.encode(message.nodeNetworkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) - $root.google.container.v1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.etag); - if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) - $root.google.container.v1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - $root.google.container.v1.ResourceLabels.encode(message.resourceLabels, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) - $root.google.container.v1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.accelerators != null && message.accelerators.length) - for (var i = 0; i < message.accelerators.length; ++i) - $root.google.container.v1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.machineType); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.diskType); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 38, wireType 0 =*/304).int64(message.diskSizeGb); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) - $root.google.container.v1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.storagePools != null && message.storagePools.length) - for (var i = 0; i < message.storagePools.length; ++i) - writer.uint32(/* id 43, wireType 2 =*/346).string(message.storagePools[i]); - return writer; - }; - - /** - * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {google.container.v1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.nodeVersion = reader.string(); - break; - } - case 6: { - message.imageType = reader.string(); - break; - } - case 8: { - message.name = reader.string(); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 16: { - message.tags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 17: { - message.taints = $root.google.container.v1.NodeTaints.decode(reader, reader.uint32()); - break; - } - case 18: { - message.labels = $root.google.container.v1.NodeLabels.decode(reader, reader.uint32()); - break; - } - case 19: { - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - case 20: { - message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.gcfsConfig = $root.google.container.v1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 23: { - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 29: { - message.gvnic = $root.google.container.v1.VirtualNIC.decode(reader, reader.uint32()); - break; - } - case 30: { - message.etag = reader.string(); - break; - } - case 31: { - message.fastSocket = $root.google.container.v1.FastSocket.decode(reader, reader.uint32()); - break; - } - case 32: { - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 33: { - message.resourceLabels = $root.google.container.v1.ResourceLabels.decode(reader, reader.uint32()); - break; - } - case 34: { - message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.decode(reader, reader.uint32()); - break; - } - case 35: { - if (!(message.accelerators && message.accelerators.length)) - message.accelerators = []; - message.accelerators.push($root.google.container.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 36: { - message.machineType = reader.string(); - break; - } - case 37: { - message.diskType = reader.string(); - break; - } - case 38: { - message.diskSizeGb = reader.int64(); - break; - } - case 39: { - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 40: { - message.containerdConfig = $root.google.container.v1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 42: { - message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); - break; - } - case 43: { - if (!(message.storagePools && message.storagePools.length)) - message.storagePools = []; - message.storagePools.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateNodePoolRequest message. - * @function verify - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) - if (!$util.isString(message.nodeVersion)) - return "nodeVersion: string expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { - var error = $root.google.container.v1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); - if (error) - return "workloadMetadataConfig." + error; - } - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - var error = $root.google.container.v1.NetworkTags.verify(message.tags); - if (error) - return "tags." + error; - } - if (message.taints != null && message.hasOwnProperty("taints")) { - var error = $root.google.container.v1.NodeTaints.verify(message.taints); - if (error) - return "taints." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - var error = $root.google.container.v1.NodeLabels.verify(message.labels); - if (error) - return "labels." + error; - } - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { - var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); - if (error) - return "linuxNodeConfig." + error; - } - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.kubeletConfig); - if (error) - return "kubeletConfig." + error; - } - if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) { - var error = $root.google.container.v1.NodeNetworkConfig.verify(message.nodeNetworkConfig); - if (error) - return "nodeNetworkConfig." + error; - } - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.gvnic != null && message.hasOwnProperty("gvnic")) { - var error = $root.google.container.v1.VirtualNIC.verify(message.gvnic); - if (error) - return "gvnic." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - var error = $root.google.container.v1.FastSocket.verify(message.fastSocket); - if (error) - return "fastSocket." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - var error = $root.google.container.v1.ResourceLabels.verify(message.resourceLabels); - if (error) - return "resourceLabels." + error; - } - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { - var error = $root.google.container.v1.WindowsNodeConfig.verify(message.windowsNodeConfig); - if (error) - return "windowsNodeConfig." + error; - } - if (message.accelerators != null && message.hasOwnProperty("accelerators")) { - if (!Array.isArray(message.accelerators)) - return "accelerators: array expected"; - for (var i = 0; i < message.accelerators.length; ++i) { - var error = $root.google.container.v1.AcceleratorConfig.verify(message.accelerators[i]); - if (error) - return "accelerators." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { - var error = $root.google.container.v1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); - if (error) - return "queuedProvisioning." + error; - } - if (message.storagePools != null && message.hasOwnProperty("storagePools")) { - if (!Array.isArray(message.storagePools)) - return "storagePools: array expected"; - for (var i = 0; i < message.storagePools.length; ++i) - if (!$util.isString(message.storagePools[i])) - return "storagePools: string[] expected"; - } - return null; - }; - - /** - * Creates an UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpdateNodePoolRequest} UpdateNodePoolRequest - */ - UpdateNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpdateNodePoolRequest) - return object; - var message = new $root.google.container.v1.UpdateNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.nodeVersion != null) - message.nodeVersion = String(object.nodeVersion); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.name != null) - message.name = String(object.name); - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1.UpdateNodePoolRequest.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.workloadMetadataConfig != null) { - if (typeof object.workloadMetadataConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.workloadMetadataConfig: object expected"); - message.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); - } - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.tags: object expected"); - message.tags = $root.google.container.v1.NetworkTags.fromObject(object.tags); - } - if (object.taints != null) { - if (typeof object.taints !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.taints: object expected"); - message.taints = $root.google.container.v1.NodeTaints.fromObject(object.taints); - } - if (object.labels != null) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.labels: object expected"); - message.labels = $root.google.container.v1.NodeLabels.fromObject(object.labels); - } - if (object.linuxNodeConfig != null) { - if (typeof object.linuxNodeConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.linuxNodeConfig: object expected"); - message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); - } - if (object.kubeletConfig != null) { - if (typeof object.kubeletConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.kubeletConfig: object expected"); - message.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.kubeletConfig); - } - if (object.nodeNetworkConfig != null) { - if (typeof object.nodeNetworkConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.nodeNetworkConfig: object expected"); - message.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.fromObject(object.nodeNetworkConfig); - } - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.gvnic != null) { - if (typeof object.gvnic !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.gvnic: object expected"); - message.gvnic = $root.google.container.v1.VirtualNIC.fromObject(object.gvnic); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.fastSocket != null) { - if (typeof object.fastSocket !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.fastSocket: object expected"); - message.fastSocket = $root.google.container.v1.FastSocket.fromObject(object.fastSocket); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.resourceLabels != null) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.resourceLabels: object expected"); - message.resourceLabels = $root.google.container.v1.ResourceLabels.fromObject(object.resourceLabels); - } - if (object.windowsNodeConfig != null) { - if (typeof object.windowsNodeConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.windowsNodeConfig: object expected"); - message.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); - } - if (object.accelerators) { - if (!Array.isArray(object.accelerators)) - throw TypeError(".google.container.v1.UpdateNodePoolRequest.accelerators: array expected"); - message.accelerators = []; - for (var i = 0; i < object.accelerators.length; ++i) { - if (typeof object.accelerators[i] !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.accelerators: object expected"); - message.accelerators[i] = $root.google.container.v1.AcceleratorConfig.fromObject(object.accelerators[i]); - } - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.queuedProvisioning != null) { - if (typeof object.queuedProvisioning !== "object") - throw TypeError(".google.container.v1.UpdateNodePoolRequest.queuedProvisioning: object expected"); - message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); - } - if (object.storagePools) { - if (!Array.isArray(object.storagePools)) - throw TypeError(".google.container.v1.UpdateNodePoolRequest.storagePools: array expected"); - message.storagePools = []; - for (var i = 0; i < object.storagePools.length; ++i) - message.storagePools[i] = String(object.storagePools[i]); - } - return message; - }; - - /** - * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {google.container.v1.UpdateNodePoolRequest} message UpdateNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.locations = []; - object.accelerators = []; - object.storagePools = []; - } - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.nodeVersion = ""; - object.imageType = ""; - object.name = ""; - object.workloadMetadataConfig = null; - object.upgradeSettings = null; - object.tags = null; - object.taints = null; - object.labels = null; - object.linuxNodeConfig = null; - object.kubeletConfig = null; - object.nodeNetworkConfig = null; - object.gcfsConfig = null; - object.confidentialNodes = null; - object.gvnic = null; - object.etag = ""; - object.fastSocket = null; - object.loggingConfig = null; - object.resourceLabels = null; - object.windowsNodeConfig = null; - object.machineType = ""; - object.diskType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.diskSizeGb = options.longs === String ? "0" : 0; - object.resourceManagerTags = null; - object.containerdConfig = null; - object.queuedProvisioning = null; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) - object.nodeVersion = message.nodeVersion; - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) - object.workloadMetadataConfig = $root.google.container.v1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.tags != null && message.hasOwnProperty("tags")) - object.tags = $root.google.container.v1.NetworkTags.toObject(message.tags, options); - if (message.taints != null && message.hasOwnProperty("taints")) - object.taints = $root.google.container.v1.NodeTaints.toObject(message.taints, options); - if (message.labels != null && message.hasOwnProperty("labels")) - object.labels = $root.google.container.v1.NodeLabels.toObject(message.labels, options); - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) - object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) - object.kubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.kubeletConfig, options); - if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) - object.nodeNetworkConfig = $root.google.container.v1.NodeNetworkConfig.toObject(message.nodeNetworkConfig, options); - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.gvnic != null && message.hasOwnProperty("gvnic")) - object.gvnic = $root.google.container.v1.VirtualNIC.toObject(message.gvnic, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) - object.fastSocket = $root.google.container.v1.FastSocket.toObject(message.fastSocket, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) - object.resourceLabels = $root.google.container.v1.ResourceLabels.toObject(message.resourceLabels, options); - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) - object.windowsNodeConfig = $root.google.container.v1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); - if (message.accelerators && message.accelerators.length) { - object.accelerators = []; - for (var j = 0; j < message.accelerators.length; ++j) - object.accelerators[j] = $root.google.container.v1.AcceleratorConfig.toObject(message.accelerators[j], options); - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) - object.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); - if (message.storagePools && message.storagePools.length) { - object.storagePools = []; - for (var j = 0; j < message.storagePools.length; ++j) - object.storagePools[j] = message.storagePools[j]; - } - return object; - }; - - /** - * Converts this UpdateNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1.UpdateNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1.UpdateNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpdateNodePoolRequest"; - }; - - return UpdateNodePoolRequest; - })(); - - v1.SetNodePoolAutoscalingRequest = (function() { - - /** - * Properties of a SetNodePoolAutoscalingRequest. - * @memberof google.container.v1 - * @interface ISetNodePoolAutoscalingRequest - * @property {string|null} [projectId] SetNodePoolAutoscalingRequest projectId - * @property {string|null} [zone] SetNodePoolAutoscalingRequest zone - * @property {string|null} [clusterId] SetNodePoolAutoscalingRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolAutoscalingRequest nodePoolId - * @property {google.container.v1.INodePoolAutoscaling|null} [autoscaling] SetNodePoolAutoscalingRequest autoscaling - * @property {string|null} [name] SetNodePoolAutoscalingRequest name - */ - - /** - * Constructs a new SetNodePoolAutoscalingRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetNodePoolAutoscalingRequest. - * @implements ISetNodePoolAutoscalingRequest - * @constructor - * @param {google.container.v1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set - */ - function SetNodePoolAutoscalingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolAutoscalingRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.projectId = ""; - - /** - * SetNodePoolAutoscalingRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.zone = ""; - - /** - * SetNodePoolAutoscalingRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.clusterId = ""; - - /** - * SetNodePoolAutoscalingRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolAutoscalingRequest autoscaling. - * @member {google.container.v1.INodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.autoscaling = null; - - /** - * SetNodePoolAutoscalingRequest name. - * @member {string} name - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set - * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest instance - */ - SetNodePoolAutoscalingRequest.create = function create(properties) { - return new SetNodePoolAutoscalingRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolAutoscalingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolAutoscalingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolAutoscalingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolAutoscalingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolAutoscalingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolAutoscalingRequest message. - * @function verify - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolAutoscalingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - */ - SetNodePoolAutoscalingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetNodePoolAutoscalingRequest) - return object; - var message = new $root.google.container.v1.SetNodePoolAutoscalingRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1.SetNodePoolAutoscalingRequest.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.autoscaling); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1.SetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolAutoscalingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.autoscaling = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolAutoscalingRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolAutoscalingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolAutoscalingRequest - * @function getTypeUrl - * @memberof google.container.v1.SetNodePoolAutoscalingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolAutoscalingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetNodePoolAutoscalingRequest"; - }; - - return SetNodePoolAutoscalingRequest; - })(); - - v1.SetLoggingServiceRequest = (function() { - - /** - * Properties of a SetLoggingServiceRequest. - * @memberof google.container.v1 - * @interface ISetLoggingServiceRequest - * @property {string|null} [projectId] SetLoggingServiceRequest projectId - * @property {string|null} [zone] SetLoggingServiceRequest zone - * @property {string|null} [clusterId] SetLoggingServiceRequest clusterId - * @property {string|null} [loggingService] SetLoggingServiceRequest loggingService - * @property {string|null} [name] SetLoggingServiceRequest name - */ - - /** - * Constructs a new SetLoggingServiceRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetLoggingServiceRequest. - * @implements ISetLoggingServiceRequest - * @constructor - * @param {google.container.v1.ISetLoggingServiceRequest=} [properties] Properties to set - */ - function SetLoggingServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLoggingServiceRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.projectId = ""; - - /** - * SetLoggingServiceRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.zone = ""; - - /** - * SetLoggingServiceRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.clusterId = ""; - - /** - * SetLoggingServiceRequest loggingService. - * @member {string} loggingService - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.loggingService = ""; - - /** - * SetLoggingServiceRequest name. - * @member {string} name - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.name = ""; - - /** - * Creates a new SetLoggingServiceRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {google.container.v1.ISetLoggingServiceRequest=} [properties] Properties to set - * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest instance - */ - SetLoggingServiceRequest.create = function create(properties) { - return new SetLoggingServiceRequest(properties); - }; - - /** - * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {google.container.v1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLoggingServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.loggingService); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLoggingServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {google.container.v1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLoggingServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLoggingServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLoggingServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.loggingService = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLoggingServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLoggingServiceRequest message. - * @function verify - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLoggingServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - if (!$util.isString(message.loggingService)) - return "loggingService: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetLoggingServiceRequest} SetLoggingServiceRequest - */ - SetLoggingServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetLoggingServiceRequest) - return object; - var message = new $root.google.container.v1.SetLoggingServiceRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.loggingService != null) - message.loggingService = String(object.loggingService); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {google.container.v1.SetLoggingServiceRequest} message SetLoggingServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLoggingServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.loggingService = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - object.loggingService = message.loggingService; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLoggingServiceRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetLoggingServiceRequest - * @instance - * @returns {Object.} JSON object - */ - SetLoggingServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLoggingServiceRequest - * @function getTypeUrl - * @memberof google.container.v1.SetLoggingServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLoggingServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetLoggingServiceRequest"; - }; - - return SetLoggingServiceRequest; - })(); - - v1.SetMonitoringServiceRequest = (function() { - - /** - * Properties of a SetMonitoringServiceRequest. - * @memberof google.container.v1 - * @interface ISetMonitoringServiceRequest - * @property {string|null} [projectId] SetMonitoringServiceRequest projectId - * @property {string|null} [zone] SetMonitoringServiceRequest zone - * @property {string|null} [clusterId] SetMonitoringServiceRequest clusterId - * @property {string|null} [monitoringService] SetMonitoringServiceRequest monitoringService - * @property {string|null} [name] SetMonitoringServiceRequest name - */ - - /** - * Constructs a new SetMonitoringServiceRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetMonitoringServiceRequest. - * @implements ISetMonitoringServiceRequest - * @constructor - * @param {google.container.v1.ISetMonitoringServiceRequest=} [properties] Properties to set - */ - function SetMonitoringServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMonitoringServiceRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.projectId = ""; - - /** - * SetMonitoringServiceRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.zone = ""; - - /** - * SetMonitoringServiceRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.clusterId = ""; - - /** - * SetMonitoringServiceRequest monitoringService. - * @member {string} monitoringService - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.monitoringService = ""; - - /** - * SetMonitoringServiceRequest name. - * @member {string} name - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.name = ""; - - /** - * Creates a new SetMonitoringServiceRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1.ISetMonitoringServiceRequest=} [properties] Properties to set - * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest instance - */ - SetMonitoringServiceRequest.create = function create(properties) { - return new SetMonitoringServiceRequest(properties); - }; - - /** - * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMonitoringServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.monitoringService); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMonitoringServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMonitoringServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMonitoringServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMonitoringServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.monitoringService = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMonitoringServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMonitoringServiceRequest message. - * @function verify - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMonitoringServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - if (!$util.isString(message.monitoringService)) - return "monitoringService: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - */ - SetMonitoringServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetMonitoringServiceRequest) - return object; - var message = new $root.google.container.v1.SetMonitoringServiceRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.monitoringService != null) - message.monitoringService = String(object.monitoringService); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1.SetMonitoringServiceRequest} message SetMonitoringServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMonitoringServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.monitoringService = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - object.monitoringService = message.monitoringService; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMonitoringServiceRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetMonitoringServiceRequest - * @instance - * @returns {Object.} JSON object - */ - SetMonitoringServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMonitoringServiceRequest - * @function getTypeUrl - * @memberof google.container.v1.SetMonitoringServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMonitoringServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetMonitoringServiceRequest"; - }; - - return SetMonitoringServiceRequest; - })(); - - v1.SetAddonsConfigRequest = (function() { - - /** - * Properties of a SetAddonsConfigRequest. - * @memberof google.container.v1 - * @interface ISetAddonsConfigRequest - * @property {string|null} [projectId] SetAddonsConfigRequest projectId - * @property {string|null} [zone] SetAddonsConfigRequest zone - * @property {string|null} [clusterId] SetAddonsConfigRequest clusterId - * @property {google.container.v1.IAddonsConfig|null} [addonsConfig] SetAddonsConfigRequest addonsConfig - * @property {string|null} [name] SetAddonsConfigRequest name - */ - - /** - * Constructs a new SetAddonsConfigRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetAddonsConfigRequest. - * @implements ISetAddonsConfigRequest - * @constructor - * @param {google.container.v1.ISetAddonsConfigRequest=} [properties] Properties to set - */ - function SetAddonsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetAddonsConfigRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.projectId = ""; - - /** - * SetAddonsConfigRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.zone = ""; - - /** - * SetAddonsConfigRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.clusterId = ""; - - /** - * SetAddonsConfigRequest addonsConfig. - * @member {google.container.v1.IAddonsConfig|null|undefined} addonsConfig - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.addonsConfig = null; - - /** - * SetAddonsConfigRequest name. - * @member {string} name - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.name = ""; - - /** - * Creates a new SetAddonsConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {google.container.v1.ISetAddonsConfigRequest=} [properties] Properties to set - * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest instance - */ - SetAddonsConfigRequest.create = function create(properties) { - return new SetAddonsConfigRequest(properties); - }; - - /** - * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {google.container.v1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetAddonsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) - $root.google.container.v1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.SetAddonsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {google.container.v1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetAddonsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetAddonsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetAddonsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.addonsConfig = $root.google.container.v1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetAddonsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetAddonsConfigRequest message. - * @function verify - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetAddonsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { - var error = $root.google.container.v1.AddonsConfig.verify(message.addonsConfig); - if (error) - return "addonsConfig." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetAddonsConfigRequest} SetAddonsConfigRequest - */ - SetAddonsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetAddonsConfigRequest) - return object; - var message = new $root.google.container.v1.SetAddonsConfigRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.addonsConfig != null) { - if (typeof object.addonsConfig !== "object") - throw TypeError(".google.container.v1.SetAddonsConfigRequest.addonsConfig: object expected"); - message.addonsConfig = $root.google.container.v1.AddonsConfig.fromObject(object.addonsConfig); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {google.container.v1.SetAddonsConfigRequest} message SetAddonsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetAddonsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.addonsConfig = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) - object.addonsConfig = $root.google.container.v1.AddonsConfig.toObject(message.addonsConfig, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetAddonsConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetAddonsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - SetAddonsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetAddonsConfigRequest - * @function getTypeUrl - * @memberof google.container.v1.SetAddonsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetAddonsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetAddonsConfigRequest"; - }; - - return SetAddonsConfigRequest; - })(); - - v1.SetLocationsRequest = (function() { - - /** - * Properties of a SetLocationsRequest. - * @memberof google.container.v1 - * @interface ISetLocationsRequest - * @property {string|null} [projectId] SetLocationsRequest projectId - * @property {string|null} [zone] SetLocationsRequest zone - * @property {string|null} [clusterId] SetLocationsRequest clusterId - * @property {Array.|null} [locations] SetLocationsRequest locations - * @property {string|null} [name] SetLocationsRequest name - */ - - /** - * Constructs a new SetLocationsRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetLocationsRequest. - * @implements ISetLocationsRequest - * @constructor - * @param {google.container.v1.ISetLocationsRequest=} [properties] Properties to set - */ - function SetLocationsRequest(properties) { - this.locations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLocationsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.projectId = ""; - - /** - * SetLocationsRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.zone = ""; - - /** - * SetLocationsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.clusterId = ""; - - /** - * SetLocationsRequest locations. - * @member {Array.} locations - * @memberof google.container.v1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.locations = $util.emptyArray; - - /** - * SetLocationsRequest name. - * @member {string} name - * @memberof google.container.v1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.name = ""; - - /** - * Creates a new SetLocationsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {google.container.v1.ISetLocationsRequest=} [properties] Properties to set - * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest instance - */ - SetLocationsRequest.create = function create(properties) { - return new SetLocationsRequest(properties); - }; - - /** - * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {google.container.v1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLocationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locations[i]); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLocationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {google.container.v1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLocationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLocationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLocationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLocationsRequest message. - * @function verify - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLocationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetLocationsRequest} SetLocationsRequest - */ - SetLocationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetLocationsRequest) - return object; - var message = new $root.google.container.v1.SetLocationsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1.SetLocationsRequest.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {google.container.v1.SetLocationsRequest} message SetLocationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLocationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.locations = []; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLocationsRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetLocationsRequest - * @instance - * @returns {Object.} JSON object - */ - SetLocationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLocationsRequest - * @function getTypeUrl - * @memberof google.container.v1.SetLocationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetLocationsRequest"; - }; - - return SetLocationsRequest; - })(); - - v1.UpdateMasterRequest = (function() { - - /** - * Properties of an UpdateMasterRequest. - * @memberof google.container.v1 - * @interface IUpdateMasterRequest - * @property {string|null} [projectId] UpdateMasterRequest projectId - * @property {string|null} [zone] UpdateMasterRequest zone - * @property {string|null} [clusterId] UpdateMasterRequest clusterId - * @property {string|null} [masterVersion] UpdateMasterRequest masterVersion - * @property {string|null} [name] UpdateMasterRequest name - */ - - /** - * Constructs a new UpdateMasterRequest. - * @memberof google.container.v1 - * @classdesc Represents an UpdateMasterRequest. - * @implements IUpdateMasterRequest - * @constructor - * @param {google.container.v1.IUpdateMasterRequest=} [properties] Properties to set - */ - function UpdateMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateMasterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.projectId = ""; - - /** - * UpdateMasterRequest zone. - * @member {string} zone - * @memberof google.container.v1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.zone = ""; - - /** - * UpdateMasterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.clusterId = ""; - - /** - * UpdateMasterRequest masterVersion. - * @member {string} masterVersion - * @memberof google.container.v1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.masterVersion = ""; - - /** - * UpdateMasterRequest name. - * @member {string} name - * @memberof google.container.v1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.name = ""; - - /** - * Creates a new UpdateMasterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {google.container.v1.IUpdateMasterRequest=} [properties] Properties to set - * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest instance - */ - UpdateMasterRequest.create = function create(properties) { - return new UpdateMasterRequest(properties); - }; - - /** - * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {google.container.v1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.masterVersion != null && Object.hasOwnProperty.call(message, "masterVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterVersion); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1.UpdateMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {google.container.v1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpdateMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.masterVersion = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateMasterRequest message. - * @function verify - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) - if (!$util.isString(message.masterVersion)) - return "masterVersion: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpdateMasterRequest} UpdateMasterRequest - */ - UpdateMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpdateMasterRequest) - return object; - var message = new $root.google.container.v1.UpdateMasterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.masterVersion != null) - message.masterVersion = String(object.masterVersion); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {google.container.v1.UpdateMasterRequest} message UpdateMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateMasterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.masterVersion = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) - object.masterVersion = message.masterVersion; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this UpdateMasterRequest to JSON. - * @function toJSON - * @memberof google.container.v1.UpdateMasterRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateMasterRequest - * @function getTypeUrl - * @memberof google.container.v1.UpdateMasterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateMasterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpdateMasterRequest"; - }; - - return UpdateMasterRequest; - })(); - - v1.SetMasterAuthRequest = (function() { - - /** - * Properties of a SetMasterAuthRequest. - * @memberof google.container.v1 - * @interface ISetMasterAuthRequest - * @property {string|null} [projectId] SetMasterAuthRequest projectId - * @property {string|null} [zone] SetMasterAuthRequest zone - * @property {string|null} [clusterId] SetMasterAuthRequest clusterId - * @property {google.container.v1.SetMasterAuthRequest.Action|null} [action] SetMasterAuthRequest action - * @property {google.container.v1.IMasterAuth|null} [update] SetMasterAuthRequest update - * @property {string|null} [name] SetMasterAuthRequest name - */ - - /** - * Constructs a new SetMasterAuthRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetMasterAuthRequest. - * @implements ISetMasterAuthRequest - * @constructor - * @param {google.container.v1.ISetMasterAuthRequest=} [properties] Properties to set - */ - function SetMasterAuthRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMasterAuthRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.projectId = ""; - - /** - * SetMasterAuthRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.zone = ""; - - /** - * SetMasterAuthRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.clusterId = ""; - - /** - * SetMasterAuthRequest action. - * @member {google.container.v1.SetMasterAuthRequest.Action} action - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.action = 0; - - /** - * SetMasterAuthRequest update. - * @member {google.container.v1.IMasterAuth|null|undefined} update - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.update = null; - - /** - * SetMasterAuthRequest name. - * @member {string} name - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.name = ""; - - /** - * Creates a new SetMasterAuthRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {google.container.v1.ISetMasterAuthRequest=} [properties] Properties to set - * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest instance - */ - SetMasterAuthRequest.create = function create(properties) { - return new SetMasterAuthRequest(properties); - }; - - /** - * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {google.container.v1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterAuthRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); - if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.container.v1.MasterAuth.encode(message.update, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMasterAuthRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {google.container.v1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterAuthRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterAuthRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMasterAuthRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.action = reader.int32(); - break; - } - case 5: { - message.update = $root.google.container.v1.MasterAuth.decode(reader, reader.uint32()); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterAuthRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMasterAuthRequest message. - * @function verify - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMasterAuthRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.update != null && message.hasOwnProperty("update")) { - var error = $root.google.container.v1.MasterAuth.verify(message.update); - if (error) - return "update." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetMasterAuthRequest} SetMasterAuthRequest - */ - SetMasterAuthRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetMasterAuthRequest) - return object; - var message = new $root.google.container.v1.SetMasterAuthRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "UNKNOWN": - case 0: - message.action = 0; - break; - case "SET_PASSWORD": - case 1: - message.action = 1; - break; - case "GENERATE_PASSWORD": - case 2: - message.action = 2; - break; - case "SET_USERNAME": - case 3: - message.action = 3; - break; - } - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.container.v1.SetMasterAuthRequest.update: object expected"); - message.update = $root.google.container.v1.MasterAuth.fromObject(object.update); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {google.container.v1.SetMasterAuthRequest} message SetMasterAuthRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMasterAuthRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.action = options.enums === String ? "UNKNOWN" : 0; - object.update = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.container.v1.SetMasterAuthRequest.Action[message.action] === undefined ? message.action : $root.google.container.v1.SetMasterAuthRequest.Action[message.action] : message.action; - if (message.update != null && message.hasOwnProperty("update")) - object.update = $root.google.container.v1.MasterAuth.toObject(message.update, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMasterAuthRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetMasterAuthRequest - * @instance - * @returns {Object.} JSON object - */ - SetMasterAuthRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMasterAuthRequest - * @function getTypeUrl - * @memberof google.container.v1.SetMasterAuthRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMasterAuthRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetMasterAuthRequest"; - }; - - /** - * Action enum. - * @name google.container.v1.SetMasterAuthRequest.Action - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} SET_PASSWORD=1 SET_PASSWORD value - * @property {number} GENERATE_PASSWORD=2 GENERATE_PASSWORD value - * @property {number} SET_USERNAME=3 SET_USERNAME value - */ - SetMasterAuthRequest.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "SET_PASSWORD"] = 1; - values[valuesById[2] = "GENERATE_PASSWORD"] = 2; - values[valuesById[3] = "SET_USERNAME"] = 3; - return values; - })(); - - return SetMasterAuthRequest; - })(); - - v1.DeleteClusterRequest = (function() { - - /** - * Properties of a DeleteClusterRequest. - * @memberof google.container.v1 - * @interface IDeleteClusterRequest - * @property {string|null} [projectId] DeleteClusterRequest projectId - * @property {string|null} [zone] DeleteClusterRequest zone - * @property {string|null} [clusterId] DeleteClusterRequest clusterId - * @property {string|null} [name] DeleteClusterRequest name - */ - - /** - * Constructs a new DeleteClusterRequest. - * @memberof google.container.v1 - * @classdesc Represents a DeleteClusterRequest. - * @implements IDeleteClusterRequest - * @constructor - * @param {google.container.v1.IDeleteClusterRequest=} [properties] Properties to set - */ - function DeleteClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.projectId = ""; - - /** - * DeleteClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.zone = ""; - - /** - * DeleteClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.clusterId = ""; - - /** - * DeleteClusterRequest name. - * @member {string} name - * @memberof google.container.v1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.name = ""; - - /** - * Creates a new DeleteClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {google.container.v1.IDeleteClusterRequest=} [properties] Properties to set - * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest instance - */ - DeleteClusterRequest.create = function create(properties) { - return new DeleteClusterRequest(properties); - }; - - /** - * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {google.container.v1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {google.container.v1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DeleteClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteClusterRequest message. - * @function verify - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DeleteClusterRequest} DeleteClusterRequest - */ - DeleteClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DeleteClusterRequest) - return object; - var message = new $root.google.container.v1.DeleteClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {google.container.v1.DeleteClusterRequest} message DeleteClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1.DeleteClusterRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteClusterRequest - * @function getTypeUrl - * @memberof google.container.v1.DeleteClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DeleteClusterRequest"; - }; - - return DeleteClusterRequest; - })(); - - v1.ListClustersRequest = (function() { - - /** - * Properties of a ListClustersRequest. - * @memberof google.container.v1 - * @interface IListClustersRequest - * @property {string|null} [projectId] ListClustersRequest projectId - * @property {string|null} [zone] ListClustersRequest zone - * @property {string|null} [parent] ListClustersRequest parent - */ - - /** - * Constructs a new ListClustersRequest. - * @memberof google.container.v1 - * @classdesc Represents a ListClustersRequest. - * @implements IListClustersRequest - * @constructor - * @param {google.container.v1.IListClustersRequest=} [properties] Properties to set - */ - function ListClustersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListClustersRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.projectId = ""; - - /** - * ListClustersRequest zone. - * @member {string} zone - * @memberof google.container.v1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.zone = ""; - - /** - * ListClustersRequest parent. - * @member {string} parent - * @memberof google.container.v1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.parent = ""; - - /** - * Creates a new ListClustersRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {google.container.v1.IListClustersRequest=} [properties] Properties to set - * @returns {google.container.v1.ListClustersRequest} ListClustersRequest instance - */ - ListClustersRequest.create = function create(properties) { - return new ListClustersRequest(properties); - }; - - /** - * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {google.container.v1.IListClustersRequest} message ListClustersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1.ListClustersRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {google.container.v1.IListClustersRequest} message ListClustersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListClustersRequest} ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListClustersRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListClustersRequest} ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListClustersRequest message. - * @function verify - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListClustersRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListClustersRequest} ListClustersRequest - */ - ListClustersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListClustersRequest) - return object; - var message = new $root.google.container.v1.ListClustersRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {google.container.v1.ListClustersRequest} message ListClustersRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListClustersRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListClustersRequest to JSON. - * @function toJSON - * @memberof google.container.v1.ListClustersRequest - * @instance - * @returns {Object.} JSON object - */ - ListClustersRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListClustersRequest - * @function getTypeUrl - * @memberof google.container.v1.ListClustersRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListClustersRequest"; - }; - - return ListClustersRequest; - })(); - - v1.ListClustersResponse = (function() { - - /** - * Properties of a ListClustersResponse. - * @memberof google.container.v1 - * @interface IListClustersResponse - * @property {Array.|null} [clusters] ListClustersResponse clusters - * @property {Array.|null} [missingZones] ListClustersResponse missingZones - */ - - /** - * Constructs a new ListClustersResponse. - * @memberof google.container.v1 - * @classdesc Represents a ListClustersResponse. - * @implements IListClustersResponse - * @constructor - * @param {google.container.v1.IListClustersResponse=} [properties] Properties to set - */ - function ListClustersResponse(properties) { - this.clusters = []; - this.missingZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListClustersResponse clusters. - * @member {Array.} clusters - * @memberof google.container.v1.ListClustersResponse - * @instance - */ - ListClustersResponse.prototype.clusters = $util.emptyArray; - - /** - * ListClustersResponse missingZones. - * @member {Array.} missingZones - * @memberof google.container.v1.ListClustersResponse - * @instance - */ - ListClustersResponse.prototype.missingZones = $util.emptyArray; - - /** - * Creates a new ListClustersResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {google.container.v1.IListClustersResponse=} [properties] Properties to set - * @returns {google.container.v1.ListClustersResponse} ListClustersResponse instance - */ - ListClustersResponse.create = function create(properties) { - return new ListClustersResponse(properties); - }; - - /** - * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {google.container.v1.IListClustersResponse} message ListClustersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusters != null && message.clusters.length) - for (var i = 0; i < message.clusters.length; ++i) - $root.google.container.v1.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.missingZones != null && message.missingZones.length) - for (var i = 0; i < message.missingZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); - return writer; - }; - - /** - * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1.ListClustersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {google.container.v1.IListClustersResponse} message ListClustersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListClustersResponse} ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListClustersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.clusters && message.clusters.length)) - message.clusters = []; - message.clusters.push($root.google.container.v1.Cluster.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.missingZones && message.missingZones.length)) - message.missingZones = []; - message.missingZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListClustersResponse} ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListClustersResponse message. - * @function verify - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListClustersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusters != null && message.hasOwnProperty("clusters")) { - if (!Array.isArray(message.clusters)) - return "clusters: array expected"; - for (var i = 0; i < message.clusters.length; ++i) { - var error = $root.google.container.v1.Cluster.verify(message.clusters[i]); - if (error) - return "clusters." + error; - } - } - if (message.missingZones != null && message.hasOwnProperty("missingZones")) { - if (!Array.isArray(message.missingZones)) - return "missingZones: array expected"; - for (var i = 0; i < message.missingZones.length; ++i) - if (!$util.isString(message.missingZones[i])) - return "missingZones: string[] expected"; - } - return null; - }; - - /** - * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListClustersResponse} ListClustersResponse - */ - ListClustersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListClustersResponse) - return object; - var message = new $root.google.container.v1.ListClustersResponse(); - if (object.clusters) { - if (!Array.isArray(object.clusters)) - throw TypeError(".google.container.v1.ListClustersResponse.clusters: array expected"); - message.clusters = []; - for (var i = 0; i < object.clusters.length; ++i) { - if (typeof object.clusters[i] !== "object") - throw TypeError(".google.container.v1.ListClustersResponse.clusters: object expected"); - message.clusters[i] = $root.google.container.v1.Cluster.fromObject(object.clusters[i]); - } - } - if (object.missingZones) { - if (!Array.isArray(object.missingZones)) - throw TypeError(".google.container.v1.ListClustersResponse.missingZones: array expected"); - message.missingZones = []; - for (var i = 0; i < object.missingZones.length; ++i) - message.missingZones[i] = String(object.missingZones[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {google.container.v1.ListClustersResponse} message ListClustersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListClustersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clusters = []; - object.missingZones = []; - } - if (message.clusters && message.clusters.length) { - object.clusters = []; - for (var j = 0; j < message.clusters.length; ++j) - object.clusters[j] = $root.google.container.v1.Cluster.toObject(message.clusters[j], options); - } - if (message.missingZones && message.missingZones.length) { - object.missingZones = []; - for (var j = 0; j < message.missingZones.length; ++j) - object.missingZones[j] = message.missingZones[j]; - } - return object; - }; - - /** - * Converts this ListClustersResponse to JSON. - * @function toJSON - * @memberof google.container.v1.ListClustersResponse - * @instance - * @returns {Object.} JSON object - */ - ListClustersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListClustersResponse - * @function getTypeUrl - * @memberof google.container.v1.ListClustersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListClustersResponse"; - }; - - return ListClustersResponse; - })(); - - v1.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.container.v1 - * @interface IGetOperationRequest - * @property {string|null} [projectId] GetOperationRequest projectId - * @property {string|null} [zone] GetOperationRequest zone - * @property {string|null} [operationId] GetOperationRequest operationId - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.container.v1.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.projectId = ""; - - /** - * GetOperationRequest zone. - * @member {string} zone - * @memberof google.container.v1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.zone = ""; - - /** - * GetOperationRequest operationId. - * @member {string} operationId - * @memberof google.container.v1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.operationId = ""; - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.container.v1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {google.container.v1.IGetOperationRequest=} [properties] Properties to set - * @returns {google.container.v1.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {google.container.v1.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {google.container.v1.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationId = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationId != null && message.hasOwnProperty("operationId")) - if (!$util.isString(message.operationId)) - return "operationId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetOperationRequest) - return object; - var message = new $root.google.container.v1.GetOperationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.operationId != null) - message.operationId = String(object.operationId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {google.container.v1.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.operationId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationId != null && message.hasOwnProperty("operationId")) - object.operationId = message.operationId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.container.v1.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - v1.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.container.v1 - * @interface IListOperationsRequest - * @property {string|null} [projectId] ListOperationsRequest projectId - * @property {string|null} [zone] ListOperationsRequest zone - * @property {string|null} [parent] ListOperationsRequest parent - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.container.v1 - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.container.v1.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.projectId = ""; - - /** - * ListOperationsRequest zone. - * @member {string} zone - * @memberof google.container.v1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.zone = ""; - - /** - * ListOperationsRequest parent. - * @member {string} parent - * @memberof google.container.v1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.parent = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {google.container.v1.IListOperationsRequest=} [properties] Properties to set - * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {google.container.v1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {google.container.v1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListOperationsRequest) - return object; - var message = new $root.google.container.v1.ListOperationsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {google.container.v1.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.container.v1.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.container.v1.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - v1.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.container.v1 - * @interface ICancelOperationRequest - * @property {string|null} [projectId] CancelOperationRequest projectId - * @property {string|null} [zone] CancelOperationRequest zone - * @property {string|null} [operationId] CancelOperationRequest operationId - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.container.v1 - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.container.v1.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.projectId = ""; - - /** - * CancelOperationRequest zone. - * @member {string} zone - * @memberof google.container.v1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.zone = ""; - - /** - * CancelOperationRequest operationId. - * @member {string} operationId - * @memberof google.container.v1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.operationId = ""; - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.container.v1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {google.container.v1.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {google.container.v1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {google.container.v1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationId = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationId != null && message.hasOwnProperty("operationId")) - if (!$util.isString(message.operationId)) - return "operationId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CancelOperationRequest) - return object; - var message = new $root.google.container.v1.CancelOperationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.operationId != null) - message.operationId = String(object.operationId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {google.container.v1.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.operationId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationId != null && message.hasOwnProperty("operationId")) - object.operationId = message.operationId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.container.v1.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - v1.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.container.v1 - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {Array.|null} [missingZones] ListOperationsResponse missingZones - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.container.v1 - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.container.v1.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - this.missingZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.container.v1.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse missingZones. - * @member {Array.} missingZones - * @memberof google.container.v1.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.missingZones = $util.emptyArray; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {google.container.v1.IListOperationsResponse=} [properties] Properties to set - * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {google.container.v1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.container.v1.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.missingZones != null && message.missingZones.length) - for (var i = 0; i < message.missingZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {google.container.v1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.container.v1.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.missingZones && message.missingZones.length)) - message.missingZones = []; - message.missingZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.container.v1.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.missingZones != null && message.hasOwnProperty("missingZones")) { - if (!Array.isArray(message.missingZones)) - return "missingZones: array expected"; - for (var i = 0; i < message.missingZones.length; ++i) - if (!$util.isString(message.missingZones[i])) - return "missingZones: string[] expected"; - } - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListOperationsResponse) - return object; - var message = new $root.google.container.v1.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.container.v1.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.container.v1.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.container.v1.Operation.fromObject(object.operations[i]); - } - } - if (object.missingZones) { - if (!Array.isArray(object.missingZones)) - throw TypeError(".google.container.v1.ListOperationsResponse.missingZones: array expected"); - message.missingZones = []; - for (var i = 0; i < object.missingZones.length; ++i) - message.missingZones[i] = String(object.missingZones[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {google.container.v1.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.operations = []; - object.missingZones = []; - } - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.container.v1.Operation.toObject(message.operations[j], options); - } - if (message.missingZones && message.missingZones.length) { - object.missingZones = []; - for (var j = 0; j < message.missingZones.length; ++j) - object.missingZones[j] = message.missingZones[j]; - } - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.container.v1.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.container.v1.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - v1.GetServerConfigRequest = (function() { - - /** - * Properties of a GetServerConfigRequest. - * @memberof google.container.v1 - * @interface IGetServerConfigRequest - * @property {string|null} [projectId] GetServerConfigRequest projectId - * @property {string|null} [zone] GetServerConfigRequest zone - * @property {string|null} [name] GetServerConfigRequest name - */ - - /** - * Constructs a new GetServerConfigRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetServerConfigRequest. - * @implements IGetServerConfigRequest - * @constructor - * @param {google.container.v1.IGetServerConfigRequest=} [properties] Properties to set - */ - function GetServerConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetServerConfigRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.projectId = ""; - - /** - * GetServerConfigRequest zone. - * @member {string} zone - * @memberof google.container.v1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.zone = ""; - - /** - * GetServerConfigRequest name. - * @member {string} name - * @memberof google.container.v1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.name = ""; - - /** - * Creates a new GetServerConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {google.container.v1.IGetServerConfigRequest=} [properties] Properties to set - * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest instance - */ - GetServerConfigRequest.create = function create(properties) { - return new GetServerConfigRequest(properties); - }; - - /** - * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {google.container.v1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServerConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetServerConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {google.container.v1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServerConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetServerConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetServerConfigRequest message. - * @function verify - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetServerConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetServerConfigRequest} GetServerConfigRequest - */ - GetServerConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetServerConfigRequest) - return object; - var message = new $root.google.container.v1.GetServerConfigRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {google.container.v1.GetServerConfigRequest} message GetServerConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetServerConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetServerConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetServerConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetServerConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetServerConfigRequest - * @function getTypeUrl - * @memberof google.container.v1.GetServerConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetServerConfigRequest"; - }; - - return GetServerConfigRequest; - })(); - - v1.ServerConfig = (function() { - - /** - * Properties of a ServerConfig. - * @memberof google.container.v1 - * @interface IServerConfig - * @property {string|null} [defaultClusterVersion] ServerConfig defaultClusterVersion - * @property {Array.|null} [validNodeVersions] ServerConfig validNodeVersions - * @property {string|null} [defaultImageType] ServerConfig defaultImageType - * @property {Array.|null} [validImageTypes] ServerConfig validImageTypes - * @property {Array.|null} [validMasterVersions] ServerConfig validMasterVersions - * @property {Array.|null} [channels] ServerConfig channels - */ - - /** - * Constructs a new ServerConfig. - * @memberof google.container.v1 - * @classdesc Represents a ServerConfig. - * @implements IServerConfig - * @constructor - * @param {google.container.v1.IServerConfig=} [properties] Properties to set - */ - function ServerConfig(properties) { - this.validNodeVersions = []; - this.validImageTypes = []; - this.validMasterVersions = []; - this.channels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerConfig defaultClusterVersion. - * @member {string} defaultClusterVersion - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.defaultClusterVersion = ""; - - /** - * ServerConfig validNodeVersions. - * @member {Array.} validNodeVersions - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.validNodeVersions = $util.emptyArray; - - /** - * ServerConfig defaultImageType. - * @member {string} defaultImageType - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.defaultImageType = ""; - - /** - * ServerConfig validImageTypes. - * @member {Array.} validImageTypes - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.validImageTypes = $util.emptyArray; - - /** - * ServerConfig validMasterVersions. - * @member {Array.} validMasterVersions - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.validMasterVersions = $util.emptyArray; - - /** - * ServerConfig channels. - * @member {Array.} channels - * @memberof google.container.v1.ServerConfig - * @instance - */ - ServerConfig.prototype.channels = $util.emptyArray; - - /** - * Creates a new ServerConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ServerConfig - * @static - * @param {google.container.v1.IServerConfig=} [properties] Properties to set - * @returns {google.container.v1.ServerConfig} ServerConfig instance - */ - ServerConfig.create = function create(properties) { - return new ServerConfig(properties); - }; - - /** - * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ServerConfig - * @static - * @param {google.container.v1.IServerConfig} message ServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaultClusterVersion != null && Object.hasOwnProperty.call(message, "defaultClusterVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultClusterVersion); - if (message.validNodeVersions != null && message.validNodeVersions.length) - for (var i = 0; i < message.validNodeVersions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.validNodeVersions[i]); - if (message.defaultImageType != null && Object.hasOwnProperty.call(message, "defaultImageType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultImageType); - if (message.validImageTypes != null && message.validImageTypes.length) - for (var i = 0; i < message.validImageTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.validImageTypes[i]); - if (message.validMasterVersions != null && message.validMasterVersions.length) - for (var i = 0; i < message.validMasterVersions.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.validMasterVersions[i]); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.google.container.v1.ServerConfig.ReleaseChannelConfig.encode(message.channels[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ServerConfig - * @static - * @param {google.container.v1.IServerConfig} message ServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ServerConfig} ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServerConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.defaultClusterVersion = reader.string(); - break; - } - case 3: { - if (!(message.validNodeVersions && message.validNodeVersions.length)) - message.validNodeVersions = []; - message.validNodeVersions.push(reader.string()); - break; - } - case 4: { - message.defaultImageType = reader.string(); - break; - } - case 5: { - if (!(message.validImageTypes && message.validImageTypes.length)) - message.validImageTypes = []; - message.validImageTypes.push(reader.string()); - break; - } - case 6: { - if (!(message.validMasterVersions && message.validMasterVersions.length)) - message.validMasterVersions = []; - message.validMasterVersions.push(reader.string()); - break; - } - case 9: { - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.google.container.v1.ServerConfig.ReleaseChannelConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ServerConfig} ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerConfig message. - * @function verify - * @memberof google.container.v1.ServerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) - if (!$util.isString(message.defaultClusterVersion)) - return "defaultClusterVersion: string expected"; - if (message.validNodeVersions != null && message.hasOwnProperty("validNodeVersions")) { - if (!Array.isArray(message.validNodeVersions)) - return "validNodeVersions: array expected"; - for (var i = 0; i < message.validNodeVersions.length; ++i) - if (!$util.isString(message.validNodeVersions[i])) - return "validNodeVersions: string[] expected"; - } - if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) - if (!$util.isString(message.defaultImageType)) - return "defaultImageType: string expected"; - if (message.validImageTypes != null && message.hasOwnProperty("validImageTypes")) { - if (!Array.isArray(message.validImageTypes)) - return "validImageTypes: array expected"; - for (var i = 0; i < message.validImageTypes.length; ++i) - if (!$util.isString(message.validImageTypes[i])) - return "validImageTypes: string[] expected"; - } - if (message.validMasterVersions != null && message.hasOwnProperty("validMasterVersions")) { - if (!Array.isArray(message.validMasterVersions)) - return "validMasterVersions: array expected"; - for (var i = 0; i < message.validMasterVersions.length; ++i) - if (!$util.isString(message.validMasterVersions[i])) - return "validMasterVersions: string[] expected"; - } - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - return null; - }; - - /** - * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ServerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ServerConfig} ServerConfig - */ - ServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ServerConfig) - return object; - var message = new $root.google.container.v1.ServerConfig(); - if (object.defaultClusterVersion != null) - message.defaultClusterVersion = String(object.defaultClusterVersion); - if (object.validNodeVersions) { - if (!Array.isArray(object.validNodeVersions)) - throw TypeError(".google.container.v1.ServerConfig.validNodeVersions: array expected"); - message.validNodeVersions = []; - for (var i = 0; i < object.validNodeVersions.length; ++i) - message.validNodeVersions[i] = String(object.validNodeVersions[i]); - } - if (object.defaultImageType != null) - message.defaultImageType = String(object.defaultImageType); - if (object.validImageTypes) { - if (!Array.isArray(object.validImageTypes)) - throw TypeError(".google.container.v1.ServerConfig.validImageTypes: array expected"); - message.validImageTypes = []; - for (var i = 0; i < object.validImageTypes.length; ++i) - message.validImageTypes[i] = String(object.validImageTypes[i]); - } - if (object.validMasterVersions) { - if (!Array.isArray(object.validMasterVersions)) - throw TypeError(".google.container.v1.ServerConfig.validMasterVersions: array expected"); - message.validMasterVersions = []; - for (var i = 0; i < object.validMasterVersions.length; ++i) - message.validMasterVersions[i] = String(object.validMasterVersions[i]); - } - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".google.container.v1.ServerConfig.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".google.container.v1.ServerConfig.channels: object expected"); - message.channels[i] = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.fromObject(object.channels[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ServerConfig - * @static - * @param {google.container.v1.ServerConfig} message ServerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.validNodeVersions = []; - object.validImageTypes = []; - object.validMasterVersions = []; - object.channels = []; - } - if (options.defaults) { - object.defaultClusterVersion = ""; - object.defaultImageType = ""; - } - if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) - object.defaultClusterVersion = message.defaultClusterVersion; - if (message.validNodeVersions && message.validNodeVersions.length) { - object.validNodeVersions = []; - for (var j = 0; j < message.validNodeVersions.length; ++j) - object.validNodeVersions[j] = message.validNodeVersions[j]; - } - if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) - object.defaultImageType = message.defaultImageType; - if (message.validImageTypes && message.validImageTypes.length) { - object.validImageTypes = []; - for (var j = 0; j < message.validImageTypes.length; ++j) - object.validImageTypes[j] = message.validImageTypes[j]; - } - if (message.validMasterVersions && message.validMasterVersions.length) { - object.validMasterVersions = []; - for (var j = 0; j < message.validMasterVersions.length; ++j) - object.validMasterVersions[j] = message.validMasterVersions[j]; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.google.container.v1.ServerConfig.ReleaseChannelConfig.toObject(message.channels[j], options); - } - return object; - }; - - /** - * Converts this ServerConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ServerConfig - * @instance - * @returns {Object.} JSON object - */ - ServerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerConfig - * @function getTypeUrl - * @memberof google.container.v1.ServerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ServerConfig"; - }; - - ServerConfig.ReleaseChannelConfig = (function() { - - /** - * Properties of a ReleaseChannelConfig. - * @memberof google.container.v1.ServerConfig - * @interface IReleaseChannelConfig - * @property {google.container.v1.ReleaseChannel.Channel|null} [channel] ReleaseChannelConfig channel - * @property {string|null} [defaultVersion] ReleaseChannelConfig defaultVersion - * @property {Array.|null} [validVersions] ReleaseChannelConfig validVersions - * @property {string|null} [upgradeTargetVersion] ReleaseChannelConfig upgradeTargetVersion - */ - - /** - * Constructs a new ReleaseChannelConfig. - * @memberof google.container.v1.ServerConfig - * @classdesc Represents a ReleaseChannelConfig. - * @implements IReleaseChannelConfig - * @constructor - * @param {google.container.v1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set - */ - function ReleaseChannelConfig(properties) { - this.validVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReleaseChannelConfig channel. - * @member {google.container.v1.ReleaseChannel.Channel} channel - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.channel = 0; - - /** - * ReleaseChannelConfig defaultVersion. - * @member {string} defaultVersion - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.defaultVersion = ""; - - /** - * ReleaseChannelConfig validVersions. - * @member {Array.} validVersions - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.validVersions = $util.emptyArray; - - /** - * ReleaseChannelConfig upgradeTargetVersion. - * @member {string} upgradeTargetVersion - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.upgradeTargetVersion = ""; - - /** - * Creates a new ReleaseChannelConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set - * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig instance - */ - ReleaseChannelConfig.create = function create(properties) { - return new ReleaseChannelConfig(properties); - }; - - /** - * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannelConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - if (message.defaultVersion != null && Object.hasOwnProperty.call(message, "defaultVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultVersion); - if (message.validVersions != null && message.validVersions.length) - for (var i = 0; i < message.validVersions.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.validVersions[i]); - if (message.upgradeTargetVersion != null && Object.hasOwnProperty.call(message, "upgradeTargetVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.upgradeTargetVersion); - return writer; - }; - - /** - * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannelConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServerConfig.ReleaseChannelConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - case 2: { - message.defaultVersion = reader.string(); - break; - } - case 4: { - if (!(message.validVersions && message.validVersions.length)) - message.validVersions = []; - message.validVersions.push(reader.string()); - break; - } - case 5: { - message.upgradeTargetVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannelConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseChannelConfig message. - * @function verify - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseChannelConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) - if (!$util.isString(message.defaultVersion)) - return "defaultVersion: 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) - if (!$util.isString(message.validVersions[i])) - return "validVersions: string[] expected"; - } - if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) - if (!$util.isString(message.upgradeTargetVersion)) - return "upgradeTargetVersion: string expected"; - return null; - }; - - /** - * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - */ - ReleaseChannelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ServerConfig.ReleaseChannelConfig) - return object; - var message = new $root.google.container.v1.ServerConfig.ReleaseChannelConfig(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "RAPID": - case 1: - message.channel = 1; - break; - case "REGULAR": - case 2: - message.channel = 2; - break; - case "STABLE": - case 3: - message.channel = 3; - break; - case "EXTENDED": - case 4: - message.channel = 4; - break; - } - if (object.defaultVersion != null) - message.defaultVersion = String(object.defaultVersion); - if (object.validVersions) { - if (!Array.isArray(object.validVersions)) - throw TypeError(".google.container.v1.ServerConfig.ReleaseChannelConfig.validVersions: array expected"); - message.validVersions = []; - for (var i = 0; i < object.validVersions.length; ++i) - message.validVersions[i] = String(object.validVersions[i]); - } - if (object.upgradeTargetVersion != null) - message.upgradeTargetVersion = String(object.upgradeTargetVersion); - return message; - }; - - /** - * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1.ServerConfig.ReleaseChannelConfig} message ReleaseChannelConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseChannelConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validVersions = []; - if (options.defaults) { - object.channel = options.enums === String ? "UNSPECIFIED" : 0; - object.defaultVersion = ""; - object.upgradeTargetVersion = ""; - } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.ReleaseChannel.Channel[message.channel] : message.channel; - if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) - object.defaultVersion = message.defaultVersion; - if (message.validVersions && message.validVersions.length) { - object.validVersions = []; - for (var j = 0; j < message.validVersions.length; ++j) - object.validVersions[j] = message.validVersions[j]; - } - if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) - object.upgradeTargetVersion = message.upgradeTargetVersion; - return object; - }; - - /** - * Converts this ReleaseChannelConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @instance - * @returns {Object.} JSON object - */ - ReleaseChannelConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReleaseChannelConfig - * @function getTypeUrl - * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ServerConfig.ReleaseChannelConfig"; - }; - - return ReleaseChannelConfig; - })(); - - return ServerConfig; - })(); - - v1.CreateNodePoolRequest = (function() { - - /** - * Properties of a CreateNodePoolRequest. - * @memberof google.container.v1 - * @interface ICreateNodePoolRequest - * @property {string|null} [projectId] CreateNodePoolRequest projectId - * @property {string|null} [zone] CreateNodePoolRequest zone - * @property {string|null} [clusterId] CreateNodePoolRequest clusterId - * @property {google.container.v1.INodePool|null} [nodePool] CreateNodePoolRequest nodePool - * @property {string|null} [parent] CreateNodePoolRequest parent - */ - - /** - * Constructs a new CreateNodePoolRequest. - * @memberof google.container.v1 - * @classdesc Represents a CreateNodePoolRequest. - * @implements ICreateNodePoolRequest - * @constructor - * @param {google.container.v1.ICreateNodePoolRequest=} [properties] Properties to set - */ - function CreateNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.projectId = ""; - - /** - * CreateNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.zone = ""; - - /** - * CreateNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.clusterId = ""; - - /** - * CreateNodePoolRequest nodePool. - * @member {google.container.v1.INodePool|null|undefined} nodePool - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.nodePool = null; - - /** - * CreateNodePoolRequest parent. - * @member {string} parent - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.parent = ""; - - /** - * Creates a new CreateNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {google.container.v1.ICreateNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest instance - */ - CreateNodePoolRequest.create = function create(properties) { - return new CreateNodePoolRequest(properties); - }; - - /** - * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {google.container.v1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePool != null && Object.hasOwnProperty.call(message, "nodePool")) - $root.google.container.v1.NodePool.encode(message.nodePool, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.parent); - return writer; - }; - - /** - * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.CreateNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {google.container.v1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CreateNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePool = $root.google.container.v1.NodePool.decode(reader, reader.uint32()); - break; - } - case 6: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateNodePoolRequest message. - * @function verify - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePool != null && message.hasOwnProperty("nodePool")) { - var error = $root.google.container.v1.NodePool.verify(message.nodePool); - if (error) - return "nodePool." + error; - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CreateNodePoolRequest} CreateNodePoolRequest - */ - CreateNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CreateNodePoolRequest) - return object; - var message = new $root.google.container.v1.CreateNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePool != null) { - if (typeof object.nodePool !== "object") - throw TypeError(".google.container.v1.CreateNodePoolRequest.nodePool: object expected"); - message.nodePool = $root.google.container.v1.NodePool.fromObject(object.nodePool); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {google.container.v1.CreateNodePoolRequest} message CreateNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePool = null; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePool != null && message.hasOwnProperty("nodePool")) - object.nodePool = $root.google.container.v1.NodePool.toObject(message.nodePool, options); - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this CreateNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CreateNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - CreateNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1.CreateNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CreateNodePoolRequest"; - }; - - return CreateNodePoolRequest; - })(); - - v1.DeleteNodePoolRequest = (function() { - - /** - * Properties of a DeleteNodePoolRequest. - * @memberof google.container.v1 - * @interface IDeleteNodePoolRequest - * @property {string|null} [projectId] DeleteNodePoolRequest projectId - * @property {string|null} [zone] DeleteNodePoolRequest zone - * @property {string|null} [clusterId] DeleteNodePoolRequest clusterId - * @property {string|null} [nodePoolId] DeleteNodePoolRequest nodePoolId - * @property {string|null} [name] DeleteNodePoolRequest name - */ - - /** - * Constructs a new DeleteNodePoolRequest. - * @memberof google.container.v1 - * @classdesc Represents a DeleteNodePoolRequest. - * @implements IDeleteNodePoolRequest - * @constructor - * @param {google.container.v1.IDeleteNodePoolRequest=} [properties] Properties to set - */ - function DeleteNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.projectId = ""; - - /** - * DeleteNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.zone = ""; - - /** - * DeleteNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.clusterId = ""; - - /** - * DeleteNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.nodePoolId = ""; - - /** - * DeleteNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.name = ""; - - /** - * Creates a new DeleteNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {google.container.v1.IDeleteNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest instance - */ - DeleteNodePoolRequest.create = function create(properties) { - return new DeleteNodePoolRequest(properties); - }; - - /** - * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {google.container.v1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.DeleteNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {google.container.v1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DeleteNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteNodePoolRequest message. - * @function verify - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DeleteNodePoolRequest} DeleteNodePoolRequest - */ - DeleteNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DeleteNodePoolRequest) - return object; - var message = new $root.google.container.v1.DeleteNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {google.container.v1.DeleteNodePoolRequest} message DeleteNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1.DeleteNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1.DeleteNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DeleteNodePoolRequest"; - }; - - return DeleteNodePoolRequest; - })(); - - v1.ListNodePoolsRequest = (function() { - - /** - * Properties of a ListNodePoolsRequest. - * @memberof google.container.v1 - * @interface IListNodePoolsRequest - * @property {string|null} [projectId] ListNodePoolsRequest projectId - * @property {string|null} [zone] ListNodePoolsRequest zone - * @property {string|null} [clusterId] ListNodePoolsRequest clusterId - * @property {string|null} [parent] ListNodePoolsRequest parent - */ - - /** - * Constructs a new ListNodePoolsRequest. - * @memberof google.container.v1 - * @classdesc Represents a ListNodePoolsRequest. - * @implements IListNodePoolsRequest - * @constructor - * @param {google.container.v1.IListNodePoolsRequest=} [properties] Properties to set - */ - function ListNodePoolsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListNodePoolsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.projectId = ""; - - /** - * ListNodePoolsRequest zone. - * @member {string} zone - * @memberof google.container.v1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.zone = ""; - - /** - * ListNodePoolsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.clusterId = ""; - - /** - * ListNodePoolsRequest parent. - * @member {string} parent - * @memberof google.container.v1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.parent = ""; - - /** - * Creates a new ListNodePoolsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {google.container.v1.IListNodePoolsRequest=} [properties] Properties to set - * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest instance - */ - ListNodePoolsRequest.create = function create(properties) { - return new ListNodePoolsRequest(properties); - }; - - /** - * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {google.container.v1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {google.container.v1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListNodePoolsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 5: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNodePoolsRequest message. - * @function verify - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNodePoolsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListNodePoolsRequest} ListNodePoolsRequest - */ - ListNodePoolsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListNodePoolsRequest) - return object; - var message = new $root.google.container.v1.ListNodePoolsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {google.container.v1.ListNodePoolsRequest} message ListNodePoolsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNodePoolsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListNodePoolsRequest to JSON. - * @function toJSON - * @memberof google.container.v1.ListNodePoolsRequest - * @instance - * @returns {Object.} JSON object - */ - ListNodePoolsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNodePoolsRequest - * @function getTypeUrl - * @memberof google.container.v1.ListNodePoolsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListNodePoolsRequest"; - }; - - return ListNodePoolsRequest; - })(); - - v1.GetNodePoolRequest = (function() { - - /** - * Properties of a GetNodePoolRequest. - * @memberof google.container.v1 - * @interface IGetNodePoolRequest - * @property {string|null} [projectId] GetNodePoolRequest projectId - * @property {string|null} [zone] GetNodePoolRequest zone - * @property {string|null} [clusterId] GetNodePoolRequest clusterId - * @property {string|null} [nodePoolId] GetNodePoolRequest nodePoolId - * @property {string|null} [name] GetNodePoolRequest name - */ - - /** - * Constructs a new GetNodePoolRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetNodePoolRequest. - * @implements IGetNodePoolRequest - * @constructor - * @param {google.container.v1.IGetNodePoolRequest=} [properties] Properties to set - */ - function GetNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.projectId = ""; - - /** - * GetNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.zone = ""; - - /** - * GetNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.clusterId = ""; - - /** - * GetNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.nodePoolId = ""; - - /** - * GetNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.name = ""; - - /** - * Creates a new GetNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {google.container.v1.IGetNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest instance - */ - GetNodePoolRequest.create = function create(properties) { - return new GetNodePoolRequest(properties); - }; - - /** - * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {google.container.v1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1.GetNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {google.container.v1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetNodePoolRequest message. - * @function verify - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetNodePoolRequest} GetNodePoolRequest - */ - GetNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetNodePoolRequest) - return object; - var message = new $root.google.container.v1.GetNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {google.container.v1.GetNodePoolRequest} message GetNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - GetNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1.GetNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetNodePoolRequest"; - }; - - return GetNodePoolRequest; - })(); - - v1.BlueGreenSettings = (function() { - - /** - * Properties of a BlueGreenSettings. - * @memberof google.container.v1 - * @interface IBlueGreenSettings - * @property {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null} [standardRolloutPolicy] BlueGreenSettings standardRolloutPolicy - * @property {google.protobuf.IDuration|null} [nodePoolSoakDuration] BlueGreenSettings nodePoolSoakDuration - */ - - /** - * Constructs a new BlueGreenSettings. - * @memberof google.container.v1 - * @classdesc Represents a BlueGreenSettings. - * @implements IBlueGreenSettings - * @constructor - * @param {google.container.v1.IBlueGreenSettings=} [properties] Properties to set - */ - function BlueGreenSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlueGreenSettings standardRolloutPolicy. - * @member {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy|null|undefined} standardRolloutPolicy - * @memberof google.container.v1.BlueGreenSettings - * @instance - */ - BlueGreenSettings.prototype.standardRolloutPolicy = null; - - /** - * BlueGreenSettings nodePoolSoakDuration. - * @member {google.protobuf.IDuration|null|undefined} nodePoolSoakDuration - * @memberof google.container.v1.BlueGreenSettings - * @instance - */ - BlueGreenSettings.prototype.nodePoolSoakDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BlueGreenSettings rolloutPolicy. - * @member {"standardRolloutPolicy"|undefined} rolloutPolicy - * @memberof google.container.v1.BlueGreenSettings - * @instance - */ - Object.defineProperty(BlueGreenSettings.prototype, "rolloutPolicy", { - get: $util.oneOfGetter($oneOfFields = ["standardRolloutPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BlueGreenSettings _nodePoolSoakDuration. - * @member {"nodePoolSoakDuration"|undefined} _nodePoolSoakDuration - * @memberof google.container.v1.BlueGreenSettings - * @instance - */ - Object.defineProperty(BlueGreenSettings.prototype, "_nodePoolSoakDuration", { - get: $util.oneOfGetter($oneOfFields = ["nodePoolSoakDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BlueGreenSettings instance using the specified properties. - * @function create - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {google.container.v1.IBlueGreenSettings=} [properties] Properties to set - * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings instance - */ - BlueGreenSettings.create = function create(properties) { - return new BlueGreenSettings(properties); - }; - - /** - * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. - * @function encode - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {google.container.v1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.standardRolloutPolicy != null && Object.hasOwnProperty.call(message, "standardRolloutPolicy")) - $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.encode(message.standardRolloutPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nodePoolSoakDuration != null && Object.hasOwnProperty.call(message, "nodePoolSoakDuration")) - $root.google.protobuf.Duration.encode(message.nodePoolSoakDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {google.container.v1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BlueGreenSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.nodePoolSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlueGreenSettings message. - * @function verify - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlueGreenSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { - properties.rolloutPolicy = 1; - { - var error = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify(message.standardRolloutPolicy); - if (error) - return "standardRolloutPolicy." + error; - } - } - if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { - properties._nodePoolSoakDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.nodePoolSoakDuration); - if (error) - return "nodePoolSoakDuration." + error; - } - } - return null; - }; - - /** - * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.BlueGreenSettings} BlueGreenSettings - */ - BlueGreenSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.BlueGreenSettings) - return object; - var message = new $root.google.container.v1.BlueGreenSettings(); - if (object.standardRolloutPolicy != null) { - if (typeof object.standardRolloutPolicy !== "object") - throw TypeError(".google.container.v1.BlueGreenSettings.standardRolloutPolicy: object expected"); - message.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.fromObject(object.standardRolloutPolicy); - } - if (object.nodePoolSoakDuration != null) { - if (typeof object.nodePoolSoakDuration !== "object") - throw TypeError(".google.container.v1.BlueGreenSettings.nodePoolSoakDuration: object expected"); - message.nodePoolSoakDuration = $root.google.protobuf.Duration.fromObject(object.nodePoolSoakDuration); - } - return message; - }; - - /** - * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {google.container.v1.BlueGreenSettings} message BlueGreenSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlueGreenSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { - object.standardRolloutPolicy = $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy.toObject(message.standardRolloutPolicy, options); - if (options.oneofs) - object.rolloutPolicy = "standardRolloutPolicy"; - } - if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { - object.nodePoolSoakDuration = $root.google.protobuf.Duration.toObject(message.nodePoolSoakDuration, options); - if (options.oneofs) - object._nodePoolSoakDuration = "nodePoolSoakDuration"; - } - return object; - }; - - /** - * Converts this BlueGreenSettings to JSON. - * @function toJSON - * @memberof google.container.v1.BlueGreenSettings - * @instance - * @returns {Object.} JSON object - */ - BlueGreenSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BlueGreenSettings - * @function getTypeUrl - * @memberof google.container.v1.BlueGreenSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BlueGreenSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.BlueGreenSettings"; - }; - - BlueGreenSettings.StandardRolloutPolicy = (function() { - - /** - * Properties of a StandardRolloutPolicy. - * @memberof google.container.v1.BlueGreenSettings - * @interface IStandardRolloutPolicy - * @property {number|null} [batchPercentage] StandardRolloutPolicy batchPercentage - * @property {number|null} [batchNodeCount] StandardRolloutPolicy batchNodeCount - * @property {google.protobuf.IDuration|null} [batchSoakDuration] StandardRolloutPolicy batchSoakDuration - */ - - /** - * Constructs a new StandardRolloutPolicy. - * @memberof google.container.v1.BlueGreenSettings - * @classdesc Represents a StandardRolloutPolicy. - * @implements IStandardRolloutPolicy - * @constructor - * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set - */ - function StandardRolloutPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StandardRolloutPolicy batchPercentage. - * @member {number|null|undefined} batchPercentage - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchPercentage = null; - - /** - * StandardRolloutPolicy batchNodeCount. - * @member {number|null|undefined} batchNodeCount - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchNodeCount = null; - - /** - * StandardRolloutPolicy batchSoakDuration. - * @member {google.protobuf.IDuration|null|undefined} batchSoakDuration - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchSoakDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * StandardRolloutPolicy updateBatchSize. - * @member {"batchPercentage"|"batchNodeCount"|undefined} updateBatchSize - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - Object.defineProperty(StandardRolloutPolicy.prototype, "updateBatchSize", { - get: $util.oneOfGetter($oneOfFields = ["batchPercentage", "batchNodeCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * StandardRolloutPolicy _batchSoakDuration. - * @member {"batchSoakDuration"|undefined} _batchSoakDuration - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - Object.defineProperty(StandardRolloutPolicy.prototype, "_batchSoakDuration", { - get: $util.oneOfGetter($oneOfFields = ["batchSoakDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new StandardRolloutPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set - * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy instance - */ - StandardRolloutPolicy.create = function create(properties) { - return new StandardRolloutPolicy(properties); - }; - - /** - * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardRolloutPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.batchPercentage != null && Object.hasOwnProperty.call(message, "batchPercentage")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.batchPercentage); - if (message.batchNodeCount != null && Object.hasOwnProperty.call(message, "batchNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchNodeCount); - if (message.batchSoakDuration != null && Object.hasOwnProperty.call(message, "batchSoakDuration")) - $root.google.protobuf.Duration.encode(message.batchSoakDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardRolloutPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.batchPercentage = reader.float(); - break; - } - case 2: { - message.batchNodeCount = reader.int32(); - break; - } - case 3: { - message.batchSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StandardRolloutPolicy message. - * @function verify - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StandardRolloutPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { - properties.updateBatchSize = 1; - if (typeof message.batchPercentage !== "number") - return "batchPercentage: number expected"; - } - if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { - if (properties.updateBatchSize === 1) - return "updateBatchSize: multiple values"; - properties.updateBatchSize = 1; - if (!$util.isInteger(message.batchNodeCount)) - return "batchNodeCount: integer expected"; - } - if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { - properties._batchSoakDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.batchSoakDuration); - if (error) - return "batchSoakDuration." + error; - } - } - return null; - }; - - /** - * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - */ - StandardRolloutPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy) - return object; - var message = new $root.google.container.v1.BlueGreenSettings.StandardRolloutPolicy(); - if (object.batchPercentage != null) - message.batchPercentage = Number(object.batchPercentage); - if (object.batchNodeCount != null) - message.batchNodeCount = object.batchNodeCount | 0; - if (object.batchSoakDuration != null) { - if (typeof object.batchSoakDuration !== "object") - throw TypeError(".google.container.v1.BlueGreenSettings.StandardRolloutPolicy.batchSoakDuration: object expected"); - message.batchSoakDuration = $root.google.protobuf.Duration.fromObject(object.batchSoakDuration); - } - return message; - }; - - /** - * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1.BlueGreenSettings.StandardRolloutPolicy} message StandardRolloutPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StandardRolloutPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { - object.batchPercentage = options.json && !isFinite(message.batchPercentage) ? String(message.batchPercentage) : message.batchPercentage; - if (options.oneofs) - object.updateBatchSize = "batchPercentage"; - } - if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { - object.batchNodeCount = message.batchNodeCount; - if (options.oneofs) - object.updateBatchSize = "batchNodeCount"; - } - if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { - object.batchSoakDuration = $root.google.protobuf.Duration.toObject(message.batchSoakDuration, options); - if (options.oneofs) - object._batchSoakDuration = "batchSoakDuration"; - } - return object; - }; - - /** - * Converts this StandardRolloutPolicy to JSON. - * @function toJSON - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @instance - * @returns {Object.} JSON object - */ - StandardRolloutPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StandardRolloutPolicy - * @function getTypeUrl - * @memberof google.container.v1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StandardRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.BlueGreenSettings.StandardRolloutPolicy"; - }; - - return StandardRolloutPolicy; - })(); - - return BlueGreenSettings; - })(); - - v1.NodePool = (function() { - - /** - * Properties of a NodePool. - * @memberof google.container.v1 - * @interface INodePool - * @property {string|null} [name] NodePool name - * @property {google.container.v1.INodeConfig|null} [config] NodePool config - * @property {number|null} [initialNodeCount] NodePool initialNodeCount - * @property {Array.|null} [locations] NodePool locations - * @property {google.container.v1.INodeNetworkConfig|null} [networkConfig] NodePool networkConfig - * @property {string|null} [selfLink] NodePool selfLink - * @property {string|null} [version] NodePool version - * @property {Array.|null} [instanceGroupUrls] NodePool instanceGroupUrls - * @property {google.container.v1.NodePool.Status|null} [status] NodePool status - * @property {string|null} [statusMessage] NodePool statusMessage - * @property {google.container.v1.INodePoolAutoscaling|null} [autoscaling] NodePool autoscaling - * @property {google.container.v1.INodeManagement|null} [management] NodePool management - * @property {google.container.v1.IMaxPodsConstraint|null} [maxPodsConstraint] NodePool maxPodsConstraint - * @property {Array.|null} [conditions] NodePool conditions - * @property {number|null} [podIpv4CidrSize] NodePool podIpv4CidrSize - * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] NodePool upgradeSettings - * @property {google.container.v1.NodePool.IPlacementPolicy|null} [placementPolicy] NodePool placementPolicy - * @property {google.container.v1.NodePool.IUpdateInfo|null} [updateInfo] NodePool updateInfo - * @property {string|null} [etag] NodePool etag - * @property {google.container.v1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] NodePool queuedProvisioning - * @property {google.container.v1.IBestEffortProvisioning|null} [bestEffortProvisioning] NodePool bestEffortProvisioning - */ - - /** - * Constructs a new NodePool. - * @memberof google.container.v1 - * @classdesc Represents a NodePool. - * @implements INodePool - * @constructor - * @param {google.container.v1.INodePool=} [properties] Properties to set - */ - function NodePool(properties) { - this.locations = []; - this.instanceGroupUrls = []; - this.conditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePool name. - * @member {string} name - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.name = ""; - - /** - * NodePool config. - * @member {google.container.v1.INodeConfig|null|undefined} config - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.config = null; - - /** - * NodePool initialNodeCount. - * @member {number} initialNodeCount - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.initialNodeCount = 0; - - /** - * NodePool locations. - * @member {Array.} locations - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.locations = $util.emptyArray; - - /** - * NodePool networkConfig. - * @member {google.container.v1.INodeNetworkConfig|null|undefined} networkConfig - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.networkConfig = null; - - /** - * NodePool selfLink. - * @member {string} selfLink - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.selfLink = ""; - - /** - * NodePool version. - * @member {string} version - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.version = ""; - - /** - * NodePool instanceGroupUrls. - * @member {Array.} instanceGroupUrls - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.instanceGroupUrls = $util.emptyArray; - - /** - * NodePool status. - * @member {google.container.v1.NodePool.Status} status - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.status = 0; - - /** - * NodePool statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.statusMessage = ""; - - /** - * NodePool autoscaling. - * @member {google.container.v1.INodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.autoscaling = null; - - /** - * NodePool management. - * @member {google.container.v1.INodeManagement|null|undefined} management - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.management = null; - - /** - * NodePool maxPodsConstraint. - * @member {google.container.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.maxPodsConstraint = null; - - /** - * NodePool conditions. - * @member {Array.} conditions - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.conditions = $util.emptyArray; - - /** - * NodePool podIpv4CidrSize. - * @member {number} podIpv4CidrSize - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.podIpv4CidrSize = 0; - - /** - * NodePool upgradeSettings. - * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.upgradeSettings = null; - - /** - * NodePool placementPolicy. - * @member {google.container.v1.NodePool.IPlacementPolicy|null|undefined} placementPolicy - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.placementPolicy = null; - - /** - * NodePool updateInfo. - * @member {google.container.v1.NodePool.IUpdateInfo|null|undefined} updateInfo - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.updateInfo = null; - - /** - * NodePool etag. - * @member {string} etag - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.etag = ""; - - /** - * NodePool queuedProvisioning. - * @member {google.container.v1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.queuedProvisioning = null; - - /** - * NodePool bestEffortProvisioning. - * @member {google.container.v1.IBestEffortProvisioning|null|undefined} bestEffortProvisioning - * @memberof google.container.v1.NodePool - * @instance - */ - NodePool.prototype.bestEffortProvisioning = null; - - /** - * Creates a new NodePool instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool - * @static - * @param {google.container.v1.INodePool=} [properties] Properties to set - * @returns {google.container.v1.NodePool} NodePool instance - */ - NodePool.create = function create(properties) { - return new NodePool(properties); - }; - - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool - * @static - * @param {google.container.v1.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.container.v1.NodeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) - $root.google.container.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.podIpv4CidrSize != null && Object.hasOwnProperty.call(message, "podIpv4CidrSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.podIpv4CidrSize); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.container.v1.NodeNetworkConfig.encode(message.networkConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.version); - if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.instanceGroupUrls[i]); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 103, wireType 0 =*/824).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.statusMessage); - if (message.conditions != null && message.conditions.length) - for (var i = 0; i < message.conditions.length; ++i) - $root.google.container.v1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); - if (message.placementPolicy != null && Object.hasOwnProperty.call(message, "placementPolicy")) - $root.google.container.v1.NodePool.PlacementPolicy.encode(message.placementPolicy, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); - if (message.updateInfo != null && Object.hasOwnProperty.call(message, "updateInfo")) - $root.google.container.v1.NodePool.UpdateInfo.encode(message.updateInfo, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.etag); - if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) - $root.google.container.v1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); - if (message.bestEffortProvisioning != null && Object.hasOwnProperty.call(message, "bestEffortProvisioning")) - $root.google.container.v1.BestEffortProvisioning.encode(message.bestEffortProvisioning, writer.uint32(/* id 113, wireType 2 =*/906).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1.NodePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool - * @static - * @param {google.container.v1.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePool message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.container.v1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.initialNodeCount = reader.int32(); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.networkConfig = $root.google.container.v1.NodeNetworkConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.selfLink = reader.string(); - break; - } - case 101: { - message.version = reader.string(); - break; - } - case 102: { - if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) - message.instanceGroupUrls = []; - message.instanceGroupUrls.push(reader.string()); - break; - } - case 103: { - message.status = reader.int32(); - break; - } - case 104: { - message.statusMessage = reader.string(); - break; - } - case 4: { - message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 5: { - message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 6: { - message.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - case 105: { - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.container.v1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 7: { - message.podIpv4CidrSize = reader.int32(); - break; - } - case 107: { - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 108: { - message.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.decode(reader, reader.uint32()); - break; - } - case 109: { - message.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.decode(reader, reader.uint32()); - break; - } - case 110: { - message.etag = reader.string(); - break; - } - case 112: { - message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); - break; - } - case 113: { - message.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePool message. - * @function verify - * @memberof google.container.v1.NodePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.container.v1.NodeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - if (!$util.isInteger(message.initialNodeCount)) - return "initialNodeCount: integer expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.container.v1.NodeNetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { - if (!Array.isArray(message.instanceGroupUrls)) - return "instanceGroupUrls: array expected"; - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - if (!$util.isString(message.instanceGroupUrls[i])) - return "instanceGroupUrls: string[] expected"; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1.NodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { - var error = $root.google.container.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); - if (error) - return "maxPodsConstraint." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) - return "conditions: array expected"; - for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.google.container.v1.StatusCondition.verify(message.conditions[i]); - if (error) - return "conditions." + error; - } - } - if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) - if (!$util.isInteger(message.podIpv4CidrSize)) - return "podIpv4CidrSize: integer expected"; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) { - var error = $root.google.container.v1.NodePool.PlacementPolicy.verify(message.placementPolicy); - if (error) - return "placementPolicy." + error; - } - if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) { - var error = $root.google.container.v1.NodePool.UpdateInfo.verify(message.updateInfo); - if (error) - return "updateInfo." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { - var error = $root.google.container.v1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); - if (error) - return "queuedProvisioning." + error; - } - if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) { - var error = $root.google.container.v1.BestEffortProvisioning.verify(message.bestEffortProvisioning); - if (error) - return "bestEffortProvisioning." + error; - } - return null; - }; - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool} NodePool - */ - NodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool) - return object; - var message = new $root.google.container.v1.NodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.container.v1.NodePool.config: object expected"); - message.config = $root.google.container.v1.NodeConfig.fromObject(object.config); - } - if (object.initialNodeCount != null) - message.initialNodeCount = object.initialNodeCount | 0; - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1.NodePool.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.container.v1.NodePool.networkConfig: object expected"); - message.networkConfig = $root.google.container.v1.NodeNetworkConfig.fromObject(object.networkConfig); - } - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.version != null) - message.version = String(object.version); - if (object.instanceGroupUrls) { - if (!Array.isArray(object.instanceGroupUrls)) - throw TypeError(".google.container.v1.NodePool.instanceGroupUrls: array expected"); - message.instanceGroupUrls = []; - for (var i = 0; i < object.instanceGroupUrls.length; ++i) - message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PROVISIONING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "RUNNING_WITH_ERROR": - case 3: - message.status = 3; - break; - case "RECONCILING": - case 4: - message.status = 4; - break; - case "STOPPING": - case 5: - message.status = 5; - break; - case "ERROR": - case 6: - message.status = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1.NodePool.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1.NodePoolAutoscaling.fromObject(object.autoscaling); - } - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1.NodePool.management: object expected"); - message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); - } - if (object.maxPodsConstraint != null) { - if (typeof object.maxPodsConstraint !== "object") - throw TypeError(".google.container.v1.NodePool.maxPodsConstraint: object expected"); - message.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); - } - if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".google.container.v1.NodePool.conditions: array expected"); - message.conditions = []; - for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".google.container.v1.NodePool.conditions: object expected"); - message.conditions[i] = $root.google.container.v1.StatusCondition.fromObject(object.conditions[i]); - } - } - if (object.podIpv4CidrSize != null) - message.podIpv4CidrSize = object.podIpv4CidrSize | 0; - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1.NodePool.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.placementPolicy != null) { - if (typeof object.placementPolicy !== "object") - throw TypeError(".google.container.v1.NodePool.placementPolicy: object expected"); - message.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.fromObject(object.placementPolicy); - } - if (object.updateInfo != null) { - if (typeof object.updateInfo !== "object") - throw TypeError(".google.container.v1.NodePool.updateInfo: object expected"); - message.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.fromObject(object.updateInfo); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.queuedProvisioning != null) { - if (typeof object.queuedProvisioning !== "object") - throw TypeError(".google.container.v1.NodePool.queuedProvisioning: object expected"); - message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); - } - if (object.bestEffortProvisioning != null) { - if (typeof object.bestEffortProvisioning !== "object") - throw TypeError(".google.container.v1.NodePool.bestEffortProvisioning: object expected"); - message.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.fromObject(object.bestEffortProvisioning); - } - return message; - }; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool - * @static - * @param {google.container.v1.NodePool} message NodePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.locations = []; - object.instanceGroupUrls = []; - object.conditions = []; - } - if (options.defaults) { - object.name = ""; - object.config = null; - object.initialNodeCount = 0; - object.autoscaling = null; - object.management = null; - object.maxPodsConstraint = null; - object.podIpv4CidrSize = 0; - object.networkConfig = null; - object.selfLink = ""; - object.version = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.upgradeSettings = null; - object.placementPolicy = null; - object.updateInfo = null; - object.etag = ""; - object.queuedProvisioning = null; - object.bestEffortProvisioning = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.container.v1.NodeConfig.toObject(message.config, options); - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - object.initialNodeCount = message.initialNodeCount; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1.NodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) - object.maxPodsConstraint = $root.google.container.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); - if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) - object.podIpv4CidrSize = message.podIpv4CidrSize; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.container.v1.NodeNetworkConfig.toObject(message.networkConfig, options); - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.instanceGroupUrls && message.instanceGroupUrls.length) { - object.instanceGroupUrls = []; - for (var j = 0; j < message.instanceGroupUrls.length; ++j) - object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1.NodePool.Status[message.status] === undefined ? message.status : $root.google.container.v1.NodePool.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.conditions && message.conditions.length) { - object.conditions = []; - for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.google.container.v1.StatusCondition.toObject(message.conditions[j], options); - } - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) - object.placementPolicy = $root.google.container.v1.NodePool.PlacementPolicy.toObject(message.placementPolicy, options); - if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) - object.updateInfo = $root.google.container.v1.NodePool.UpdateInfo.toObject(message.updateInfo, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) - object.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); - if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) - object.bestEffortProvisioning = $root.google.container.v1.BestEffortProvisioning.toObject(message.bestEffortProvisioning, options); - return object; - }; - - /** - * Converts this NodePool to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool - * @instance - * @returns {Object.} JSON object - */ - NodePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePool - * @function getTypeUrl - * @memberof google.container.v1.NodePool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool"; - }; - - NodePool.UpgradeSettings = (function() { - - /** - * Properties of an UpgradeSettings. - * @memberof google.container.v1.NodePool - * @interface IUpgradeSettings - * @property {number|null} [maxSurge] UpgradeSettings maxSurge - * @property {number|null} [maxUnavailable] UpgradeSettings maxUnavailable - * @property {google.container.v1.NodePoolUpdateStrategy|null} [strategy] UpgradeSettings strategy - * @property {google.container.v1.IBlueGreenSettings|null} [blueGreenSettings] UpgradeSettings blueGreenSettings - */ - - /** - * Constructs a new UpgradeSettings. - * @memberof google.container.v1.NodePool - * @classdesc Represents an UpgradeSettings. - * @implements IUpgradeSettings - * @constructor - * @param {google.container.v1.NodePool.IUpgradeSettings=} [properties] Properties to set - */ - function UpgradeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeSettings maxSurge. - * @member {number} maxSurge - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.maxSurge = 0; - - /** - * UpgradeSettings maxUnavailable. - * @member {number} maxUnavailable - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.maxUnavailable = 0; - - /** - * UpgradeSettings strategy. - * @member {google.container.v1.NodePoolUpdateStrategy|null|undefined} strategy - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.strategy = null; - - /** - * UpgradeSettings blueGreenSettings. - * @member {google.container.v1.IBlueGreenSettings|null|undefined} blueGreenSettings - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.blueGreenSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpgradeSettings _strategy. - * @member {"strategy"|undefined} _strategy - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - Object.defineProperty(UpgradeSettings.prototype, "_strategy", { - get: $util.oneOfGetter($oneOfFields = ["strategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpgradeSettings _blueGreenSettings. - * @member {"blueGreenSettings"|undefined} _blueGreenSettings - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - */ - Object.defineProperty(UpgradeSettings.prototype, "_blueGreenSettings", { - get: $util.oneOfGetter($oneOfFields = ["blueGreenSettings"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpgradeSettings instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1.NodePool.IUpgradeSettings=} [properties] Properties to set - * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings instance - */ - UpgradeSettings.create = function create(properties) { - return new UpgradeSettings(properties); - }; - - /** - * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxSurge != null && Object.hasOwnProperty.call(message, "maxSurge")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxSurge); - if (message.maxUnavailable != null && Object.hasOwnProperty.call(message, "maxUnavailable")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxUnavailable); - if (message.strategy != null && Object.hasOwnProperty.call(message, "strategy")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.strategy); - if (message.blueGreenSettings != null && Object.hasOwnProperty.call(message, "blueGreenSettings")) - $root.google.container.v1.BlueGreenSettings.encode(message.blueGreenSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpgradeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpgradeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxSurge = reader.int32(); - break; - } - case 2: { - message.maxUnavailable = reader.int32(); - break; - } - case 3: { - message.strategy = reader.int32(); - break; - } - case 4: { - message.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeSettings message. - * @function verify - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) - if (!$util.isInteger(message.maxSurge)) - return "maxSurge: integer expected"; - if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) - if (!$util.isInteger(message.maxUnavailable)) - return "maxUnavailable: integer expected"; - if (message.strategy != null && message.hasOwnProperty("strategy")) { - properties._strategy = 1; - switch (message.strategy) { - default: - return "strategy: enum value expected"; - case 0: - case 2: - case 3: - break; - } - } - if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { - properties._blueGreenSettings = 1; - { - var error = $root.google.container.v1.BlueGreenSettings.verify(message.blueGreenSettings); - if (error) - return "blueGreenSettings." + error; - } - } - return null; - }; - - /** - * Creates an UpgradeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool.UpgradeSettings} UpgradeSettings - */ - UpgradeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool.UpgradeSettings) - return object; - var message = new $root.google.container.v1.NodePool.UpgradeSettings(); - if (object.maxSurge != null) - message.maxSurge = object.maxSurge | 0; - if (object.maxUnavailable != null) - message.maxUnavailable = object.maxUnavailable | 0; - switch (object.strategy) { - default: - if (typeof object.strategy === "number") { - message.strategy = object.strategy; - break; - } - break; - case "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": - case 0: - message.strategy = 0; - break; - case "BLUE_GREEN": - case 2: - message.strategy = 2; - break; - case "SURGE": - case 3: - message.strategy = 3; - break; - } - if (object.blueGreenSettings != null) { - if (typeof object.blueGreenSettings !== "object") - throw TypeError(".google.container.v1.NodePool.UpgradeSettings.blueGreenSettings: object expected"); - message.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.fromObject(object.blueGreenSettings); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1.NodePool.UpgradeSettings} message UpgradeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.maxSurge = 0; - object.maxUnavailable = 0; - } - if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) - object.maxSurge = message.maxSurge; - if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) - object.maxUnavailable = message.maxUnavailable; - if (message.strategy != null && message.hasOwnProperty("strategy")) { - object.strategy = options.enums === String ? $root.google.container.v1.NodePoolUpdateStrategy[message.strategy] === undefined ? message.strategy : $root.google.container.v1.NodePoolUpdateStrategy[message.strategy] : message.strategy; - if (options.oneofs) - object._strategy = "strategy"; - } - if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { - object.blueGreenSettings = $root.google.container.v1.BlueGreenSettings.toObject(message.blueGreenSettings, options); - if (options.oneofs) - object._blueGreenSettings = "blueGreenSettings"; - } - return object; - }; - - /** - * Converts this UpgradeSettings to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool.UpgradeSettings - * @instance - * @returns {Object.} JSON object - */ - UpgradeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeSettings - * @function getTypeUrl - * @memberof google.container.v1.NodePool.UpgradeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool.UpgradeSettings"; - }; - - return UpgradeSettings; - })(); - - NodePool.UpdateInfo = (function() { - - /** - * Properties of an UpdateInfo. - * @memberof google.container.v1.NodePool - * @interface IUpdateInfo - * @property {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null} [blueGreenInfo] UpdateInfo blueGreenInfo - */ - - /** - * Constructs a new UpdateInfo. - * @memberof google.container.v1.NodePool - * @classdesc Represents an UpdateInfo. - * @implements IUpdateInfo - * @constructor - * @param {google.container.v1.NodePool.IUpdateInfo=} [properties] Properties to set - */ - function UpdateInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateInfo blueGreenInfo. - * @member {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo|null|undefined} blueGreenInfo - * @memberof google.container.v1.NodePool.UpdateInfo - * @instance - */ - UpdateInfo.prototype.blueGreenInfo = null; - - /** - * Creates a new UpdateInfo instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {google.container.v1.NodePool.IUpdateInfo=} [properties] Properties to set - * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo instance - */ - UpdateInfo.create = function create(properties) { - return new UpdateInfo(properties); - }; - - /** - * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {google.container.v1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.blueGreenInfo != null && Object.hasOwnProperty.call(message, "blueGreenInfo")) - $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.encode(message.blueGreenInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {google.container.v1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpdateInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateInfo message. - * @function verify - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) { - var error = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify(message.blueGreenInfo); - if (error) - return "blueGreenInfo." + error; - } - return null; - }; - - /** - * Creates an UpdateInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool.UpdateInfo} UpdateInfo - */ - UpdateInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool.UpdateInfo) - return object; - var message = new $root.google.container.v1.NodePool.UpdateInfo(); - if (object.blueGreenInfo != null) { - if (typeof object.blueGreenInfo !== "object") - throw TypeError(".google.container.v1.NodePool.UpdateInfo.blueGreenInfo: object expected"); - message.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.fromObject(object.blueGreenInfo); - } - return message; - }; - - /** - * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {google.container.v1.NodePool.UpdateInfo} message UpdateInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.blueGreenInfo = null; - if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) - object.blueGreenInfo = $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.toObject(message.blueGreenInfo, options); - return object; - }; - - /** - * Converts this UpdateInfo to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool.UpdateInfo - * @instance - * @returns {Object.} JSON object - */ - UpdateInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateInfo - * @function getTypeUrl - * @memberof google.container.v1.NodePool.UpdateInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool.UpdateInfo"; - }; - - UpdateInfo.BlueGreenInfo = (function() { - - /** - * Properties of a BlueGreenInfo. - * @memberof google.container.v1.NodePool.UpdateInfo - * @interface IBlueGreenInfo - * @property {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null} [phase] BlueGreenInfo phase - * @property {Array.|null} [blueInstanceGroupUrls] BlueGreenInfo blueInstanceGroupUrls - * @property {Array.|null} [greenInstanceGroupUrls] BlueGreenInfo greenInstanceGroupUrls - * @property {string|null} [bluePoolDeletionStartTime] BlueGreenInfo bluePoolDeletionStartTime - * @property {string|null} [greenPoolVersion] BlueGreenInfo greenPoolVersion - */ - - /** - * Constructs a new BlueGreenInfo. - * @memberof google.container.v1.NodePool.UpdateInfo - * @classdesc Represents a BlueGreenInfo. - * @implements IBlueGreenInfo - * @constructor - * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set - */ - function BlueGreenInfo(properties) { - this.blueInstanceGroupUrls = []; - this.greenInstanceGroupUrls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlueGreenInfo phase. - * @member {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase} phase - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.phase = 0; - - /** - * BlueGreenInfo blueInstanceGroupUrls. - * @member {Array.} blueInstanceGroupUrls - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.blueInstanceGroupUrls = $util.emptyArray; - - /** - * BlueGreenInfo greenInstanceGroupUrls. - * @member {Array.} greenInstanceGroupUrls - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.greenInstanceGroupUrls = $util.emptyArray; - - /** - * BlueGreenInfo bluePoolDeletionStartTime. - * @member {string} bluePoolDeletionStartTime - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.bluePoolDeletionStartTime = ""; - - /** - * BlueGreenInfo greenPoolVersion. - * @member {string} greenPoolVersion - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.greenPoolVersion = ""; - - /** - * Creates a new BlueGreenInfo instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set - * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo instance - */ - BlueGreenInfo.create = function create(properties) { - return new BlueGreenInfo(properties); - }; - - /** - * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.phase); - if (message.blueInstanceGroupUrls != null && message.blueInstanceGroupUrls.length) - for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.blueInstanceGroupUrls[i]); - if (message.greenInstanceGroupUrls != null && message.greenInstanceGroupUrls.length) - for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.greenInstanceGroupUrls[i]); - if (message.bluePoolDeletionStartTime != null && Object.hasOwnProperty.call(message, "bluePoolDeletionStartTime")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.bluePoolDeletionStartTime); - if (message.greenPoolVersion != null && Object.hasOwnProperty.call(message, "greenPoolVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.greenPoolVersion); - return writer; - }; - - /** - * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phase = reader.int32(); - break; - } - case 2: { - if (!(message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length)) - message.blueInstanceGroupUrls = []; - message.blueInstanceGroupUrls.push(reader.string()); - break; - } - case 3: { - if (!(message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length)) - message.greenInstanceGroupUrls = []; - message.greenInstanceGroupUrls.push(reader.string()); - break; - } - case 4: { - message.bluePoolDeletionStartTime = reader.string(); - break; - } - case 5: { - message.greenPoolVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlueGreenInfo message. - * @function verify - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlueGreenInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phase != null && message.hasOwnProperty("phase")) - switch (message.phase) { - default: - return "phase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.blueInstanceGroupUrls != null && message.hasOwnProperty("blueInstanceGroupUrls")) { - if (!Array.isArray(message.blueInstanceGroupUrls)) - return "blueInstanceGroupUrls: array expected"; - for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) - if (!$util.isString(message.blueInstanceGroupUrls[i])) - return "blueInstanceGroupUrls: string[] expected"; - } - if (message.greenInstanceGroupUrls != null && message.hasOwnProperty("greenInstanceGroupUrls")) { - if (!Array.isArray(message.greenInstanceGroupUrls)) - return "greenInstanceGroupUrls: array expected"; - for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) - if (!$util.isString(message.greenInstanceGroupUrls[i])) - return "greenInstanceGroupUrls: string[] expected"; - } - if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) - if (!$util.isString(message.bluePoolDeletionStartTime)) - return "bluePoolDeletionStartTime: string expected"; - if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) - if (!$util.isString(message.greenPoolVersion)) - return "greenPoolVersion: string expected"; - return null; - }; - - /** - * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - */ - BlueGreenInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo) - return object; - var message = new $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo(); - switch (object.phase) { - default: - if (typeof object.phase === "number") { - message.phase = object.phase; - break; - } - break; - case "PHASE_UNSPECIFIED": - case 0: - message.phase = 0; - break; - case "UPDATE_STARTED": - case 1: - message.phase = 1; - break; - case "CREATING_GREEN_POOL": - case 2: - message.phase = 2; - break; - case "CORDONING_BLUE_POOL": - case 3: - message.phase = 3; - break; - case "DRAINING_BLUE_POOL": - case 4: - message.phase = 4; - break; - case "NODE_POOL_SOAKING": - case 5: - message.phase = 5; - break; - case "DELETING_BLUE_POOL": - case 6: - message.phase = 6; - break; - case "ROLLBACK_STARTED": - case 7: - message.phase = 7; - break; - } - if (object.blueInstanceGroupUrls) { - if (!Array.isArray(object.blueInstanceGroupUrls)) - throw TypeError(".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.blueInstanceGroupUrls: array expected"); - message.blueInstanceGroupUrls = []; - for (var i = 0; i < object.blueInstanceGroupUrls.length; ++i) - message.blueInstanceGroupUrls[i] = String(object.blueInstanceGroupUrls[i]); - } - if (object.greenInstanceGroupUrls) { - if (!Array.isArray(object.greenInstanceGroupUrls)) - throw TypeError(".google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.greenInstanceGroupUrls: array expected"); - message.greenInstanceGroupUrls = []; - for (var i = 0; i < object.greenInstanceGroupUrls.length; ++i) - message.greenInstanceGroupUrls[i] = String(object.greenInstanceGroupUrls[i]); - } - if (object.bluePoolDeletionStartTime != null) - message.bluePoolDeletionStartTime = String(object.bluePoolDeletionStartTime); - if (object.greenPoolVersion != null) - message.greenPoolVersion = String(object.greenPoolVersion); - return message; - }; - - /** - * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1.NodePool.UpdateInfo.BlueGreenInfo} message BlueGreenInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlueGreenInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.blueInstanceGroupUrls = []; - object.greenInstanceGroupUrls = []; - } - if (options.defaults) { - object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; - object.bluePoolDeletionStartTime = ""; - object.greenPoolVersion = ""; - } - if (message.phase != null && message.hasOwnProperty("phase")) - object.phase = options.enums === String ? $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] === undefined ? message.phase : $root.google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] : message.phase; - if (message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length) { - object.blueInstanceGroupUrls = []; - for (var j = 0; j < message.blueInstanceGroupUrls.length; ++j) - object.blueInstanceGroupUrls[j] = message.blueInstanceGroupUrls[j]; - } - if (message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length) { - object.greenInstanceGroupUrls = []; - for (var j = 0; j < message.greenInstanceGroupUrls.length; ++j) - object.greenInstanceGroupUrls[j] = message.greenInstanceGroupUrls[j]; - } - if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) - object.bluePoolDeletionStartTime = message.bluePoolDeletionStartTime; - if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) - object.greenPoolVersion = message.greenPoolVersion; - return object; - }; - - /** - * Converts this BlueGreenInfo to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - * @returns {Object.} JSON object - */ - BlueGreenInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BlueGreenInfo - * @function getTypeUrl - * @memberof google.container.v1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BlueGreenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool.UpdateInfo.BlueGreenInfo"; - }; - - /** - * Phase enum. - * @name google.container.v1.NodePool.UpdateInfo.BlueGreenInfo.Phase - * @enum {number} - * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value - * @property {number} UPDATE_STARTED=1 UPDATE_STARTED value - * @property {number} CREATING_GREEN_POOL=2 CREATING_GREEN_POOL value - * @property {number} CORDONING_BLUE_POOL=3 CORDONING_BLUE_POOL value - * @property {number} DRAINING_BLUE_POOL=4 DRAINING_BLUE_POOL value - * @property {number} NODE_POOL_SOAKING=5 NODE_POOL_SOAKING value - * @property {number} DELETING_BLUE_POOL=6 DELETING_BLUE_POOL value - * @property {number} ROLLBACK_STARTED=7 ROLLBACK_STARTED value - */ - BlueGreenInfo.Phase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UPDATE_STARTED"] = 1; - values[valuesById[2] = "CREATING_GREEN_POOL"] = 2; - values[valuesById[3] = "CORDONING_BLUE_POOL"] = 3; - values[valuesById[4] = "DRAINING_BLUE_POOL"] = 4; - values[valuesById[5] = "NODE_POOL_SOAKING"] = 5; - values[valuesById[6] = "DELETING_BLUE_POOL"] = 6; - values[valuesById[7] = "ROLLBACK_STARTED"] = 7; - return values; - })(); - - return BlueGreenInfo; - })(); - - return UpdateInfo; - })(); - - /** - * Status enum. - * @name google.container.v1.NodePool.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} PROVISIONING=1 PROVISIONING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} RUNNING_WITH_ERROR=3 RUNNING_WITH_ERROR value - * @property {number} RECONCILING=4 RECONCILING value - * @property {number} STOPPING=5 STOPPING value - * @property {number} ERROR=6 ERROR value - */ - NodePool.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROVISIONING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "RUNNING_WITH_ERROR"] = 3; - values[valuesById[4] = "RECONCILING"] = 4; - values[valuesById[5] = "STOPPING"] = 5; - values[valuesById[6] = "ERROR"] = 6; - return values; - })(); - - NodePool.PlacementPolicy = (function() { - - /** - * Properties of a PlacementPolicy. - * @memberof google.container.v1.NodePool - * @interface IPlacementPolicy - * @property {google.container.v1.NodePool.PlacementPolicy.Type|null} [type] PlacementPolicy type - * @property {string|null} [tpuTopology] PlacementPolicy tpuTopology - * @property {string|null} [policyName] PlacementPolicy policyName - */ - - /** - * Constructs a new PlacementPolicy. - * @memberof google.container.v1.NodePool - * @classdesc Represents a PlacementPolicy. - * @implements IPlacementPolicy - * @constructor - * @param {google.container.v1.NodePool.IPlacementPolicy=} [properties] Properties to set - */ - function PlacementPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlacementPolicy type. - * @member {google.container.v1.NodePool.PlacementPolicy.Type} type - * @memberof google.container.v1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.type = 0; - - /** - * PlacementPolicy tpuTopology. - * @member {string} tpuTopology - * @memberof google.container.v1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.tpuTopology = ""; - - /** - * PlacementPolicy policyName. - * @member {string} policyName - * @memberof google.container.v1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.policyName = ""; - - /** - * Creates a new PlacementPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1.NodePool.IPlacementPolicy=} [properties] Properties to set - * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy instance - */ - PlacementPolicy.create = function create(properties) { - return new PlacementPolicy(properties); - }; - - /** - * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.tpuTopology != null && Object.hasOwnProperty.call(message, "tpuTopology")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tpuTopology); - if (message.policyName != null && Object.hasOwnProperty.call(message, "policyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.policyName); - return writer; - }; - - /** - * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1.NodePool.PlacementPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.PlacementPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.tpuTopology = reader.string(); - break; - } - case 3: { - message.policyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlacementPolicy message. - * @function verify - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlacementPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) - if (!$util.isString(message.tpuTopology)) - return "tpuTopology: string expected"; - if (message.policyName != null && message.hasOwnProperty("policyName")) - if (!$util.isString(message.policyName)) - return "policyName: string expected"; - return null; - }; - - /** - * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool.PlacementPolicy} PlacementPolicy - */ - PlacementPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool.PlacementPolicy) - return object; - var message = new $root.google.container.v1.NodePool.PlacementPolicy(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "COMPACT": - case 1: - message.type = 1; - break; - } - if (object.tpuTopology != null) - message.tpuTopology = String(object.tpuTopology); - if (object.policyName != null) - message.policyName = String(object.policyName); - return message; - }; - - /** - * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1.NodePool.PlacementPolicy} message PlacementPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlacementPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.tpuTopology = ""; - object.policyName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1.NodePool.PlacementPolicy.Type[message.type] === undefined ? message.type : $root.google.container.v1.NodePool.PlacementPolicy.Type[message.type] : message.type; - if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) - object.tpuTopology = message.tpuTopology; - if (message.policyName != null && message.hasOwnProperty("policyName")) - object.policyName = message.policyName; - return object; - }; - - /** - * Converts this PlacementPolicy to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool.PlacementPolicy - * @instance - * @returns {Object.} JSON object - */ - PlacementPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlacementPolicy - * @function getTypeUrl - * @memberof google.container.v1.NodePool.PlacementPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool.PlacementPolicy"; - }; - - /** - * Type enum. - * @name google.container.v1.NodePool.PlacementPolicy.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} COMPACT=1 COMPACT value - */ - PlacementPolicy.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPACT"] = 1; - return values; - })(); - - return PlacementPolicy; - })(); - - NodePool.QueuedProvisioning = (function() { - - /** - * Properties of a QueuedProvisioning. - * @memberof google.container.v1.NodePool - * @interface IQueuedProvisioning - * @property {boolean|null} [enabled] QueuedProvisioning enabled - */ - - /** - * Constructs a new QueuedProvisioning. - * @memberof google.container.v1.NodePool - * @classdesc Represents a QueuedProvisioning. - * @implements IQueuedProvisioning - * @constructor - * @param {google.container.v1.NodePool.IQueuedProvisioning=} [properties] Properties to set - */ - function QueuedProvisioning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueuedProvisioning enabled. - * @member {boolean} enabled - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @instance - */ - QueuedProvisioning.prototype.enabled = false; - - /** - * Creates a new QueuedProvisioning instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1.NodePool.IQueuedProvisioning=} [properties] Properties to set - * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning instance - */ - QueuedProvisioning.create = function create(properties) { - return new QueuedProvisioning(properties); - }; - - /** - * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueuedProvisioning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1.NodePool.QueuedProvisioning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueuedProvisioning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueuedProvisioning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePool.QueuedProvisioning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueuedProvisioning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueuedProvisioning message. - * @function verify - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueuedProvisioning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePool.QueuedProvisioning} QueuedProvisioning - */ - QueuedProvisioning.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePool.QueuedProvisioning) - return object; - var message = new $root.google.container.v1.NodePool.QueuedProvisioning(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1.NodePool.QueuedProvisioning} message QueuedProvisioning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueuedProvisioning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this QueuedProvisioning to JSON. - * @function toJSON - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @instance - * @returns {Object.} JSON object - */ - QueuedProvisioning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueuedProvisioning - * @function getTypeUrl - * @memberof google.container.v1.NodePool.QueuedProvisioning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueuedProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePool.QueuedProvisioning"; - }; - - return QueuedProvisioning; - })(); - - return NodePool; - })(); - - v1.NodeManagement = (function() { - - /** - * Properties of a NodeManagement. - * @memberof google.container.v1 - * @interface INodeManagement - * @property {boolean|null} [autoUpgrade] NodeManagement autoUpgrade - * @property {boolean|null} [autoRepair] NodeManagement autoRepair - * @property {google.container.v1.IAutoUpgradeOptions|null} [upgradeOptions] NodeManagement upgradeOptions - */ - - /** - * Constructs a new NodeManagement. - * @memberof google.container.v1 - * @classdesc Represents a NodeManagement. - * @implements INodeManagement - * @constructor - * @param {google.container.v1.INodeManagement=} [properties] Properties to set - */ - function NodeManagement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeManagement autoUpgrade. - * @member {boolean} autoUpgrade - * @memberof google.container.v1.NodeManagement - * @instance - */ - NodeManagement.prototype.autoUpgrade = false; - - /** - * NodeManagement autoRepair. - * @member {boolean} autoRepair - * @memberof google.container.v1.NodeManagement - * @instance - */ - NodeManagement.prototype.autoRepair = false; - - /** - * NodeManagement upgradeOptions. - * @member {google.container.v1.IAutoUpgradeOptions|null|undefined} upgradeOptions - * @memberof google.container.v1.NodeManagement - * @instance - */ - NodeManagement.prototype.upgradeOptions = null; - - /** - * Creates a new NodeManagement instance using the specified properties. - * @function create - * @memberof google.container.v1.NodeManagement - * @static - * @param {google.container.v1.INodeManagement=} [properties] Properties to set - * @returns {google.container.v1.NodeManagement} NodeManagement instance - */ - NodeManagement.create = function create(properties) { - return new NodeManagement(properties); - }; - - /** - * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodeManagement - * @static - * @param {google.container.v1.INodeManagement} message NodeManagement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeManagement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.autoUpgrade != null && Object.hasOwnProperty.call(message, "autoUpgrade")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.autoUpgrade); - if (message.autoRepair != null && Object.hasOwnProperty.call(message, "autoRepair")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRepair); - if (message.upgradeOptions != null && Object.hasOwnProperty.call(message, "upgradeOptions")) - $root.google.container.v1.AutoUpgradeOptions.encode(message.upgradeOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1.NodeManagement.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodeManagement - * @static - * @param {google.container.v1.INodeManagement} message NodeManagement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeManagement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeManagement message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodeManagement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodeManagement} NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeManagement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodeManagement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.autoUpgrade = reader.bool(); - break; - } - case 2: { - message.autoRepair = reader.bool(); - break; - } - case 10: { - message.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeManagement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodeManagement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodeManagement} NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeManagement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeManagement message. - * @function verify - * @memberof google.container.v1.NodeManagement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeManagement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) - if (typeof message.autoUpgrade !== "boolean") - return "autoUpgrade: boolean expected"; - if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) - if (typeof message.autoRepair !== "boolean") - return "autoRepair: boolean expected"; - if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) { - var error = $root.google.container.v1.AutoUpgradeOptions.verify(message.upgradeOptions); - if (error) - return "upgradeOptions." + error; - } - return null; - }; - - /** - * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodeManagement - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodeManagement} NodeManagement - */ - NodeManagement.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodeManagement) - return object; - var message = new $root.google.container.v1.NodeManagement(); - if (object.autoUpgrade != null) - message.autoUpgrade = Boolean(object.autoUpgrade); - if (object.autoRepair != null) - message.autoRepair = Boolean(object.autoRepair); - if (object.upgradeOptions != null) { - if (typeof object.upgradeOptions !== "object") - throw TypeError(".google.container.v1.NodeManagement.upgradeOptions: object expected"); - message.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.fromObject(object.upgradeOptions); - } - return message; - }; - - /** - * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodeManagement - * @static - * @param {google.container.v1.NodeManagement} message NodeManagement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeManagement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.autoUpgrade = false; - object.autoRepair = false; - object.upgradeOptions = null; - } - if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) - object.autoUpgrade = message.autoUpgrade; - if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) - object.autoRepair = message.autoRepair; - if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) - object.upgradeOptions = $root.google.container.v1.AutoUpgradeOptions.toObject(message.upgradeOptions, options); - return object; - }; - - /** - * Converts this NodeManagement to JSON. - * @function toJSON - * @memberof google.container.v1.NodeManagement - * @instance - * @returns {Object.} JSON object - */ - NodeManagement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeManagement - * @function getTypeUrl - * @memberof google.container.v1.NodeManagement - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeManagement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodeManagement"; - }; - - return NodeManagement; - })(); - - v1.BestEffortProvisioning = (function() { - - /** - * Properties of a BestEffortProvisioning. - * @memberof google.container.v1 - * @interface IBestEffortProvisioning - * @property {boolean|null} [enabled] BestEffortProvisioning enabled - * @property {number|null} [minProvisionNodes] BestEffortProvisioning minProvisionNodes - */ - - /** - * Constructs a new BestEffortProvisioning. - * @memberof google.container.v1 - * @classdesc Represents a BestEffortProvisioning. - * @implements IBestEffortProvisioning - * @constructor - * @param {google.container.v1.IBestEffortProvisioning=} [properties] Properties to set - */ - function BestEffortProvisioning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BestEffortProvisioning enabled. - * @member {boolean} enabled - * @memberof google.container.v1.BestEffortProvisioning - * @instance - */ - BestEffortProvisioning.prototype.enabled = false; - - /** - * BestEffortProvisioning minProvisionNodes. - * @member {number} minProvisionNodes - * @memberof google.container.v1.BestEffortProvisioning - * @instance - */ - BestEffortProvisioning.prototype.minProvisionNodes = 0; - - /** - * Creates a new BestEffortProvisioning instance using the specified properties. - * @function create - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {google.container.v1.IBestEffortProvisioning=} [properties] Properties to set - * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning instance - */ - BestEffortProvisioning.create = function create(properties) { - return new BestEffortProvisioning(properties); - }; - - /** - * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. - * @function encode - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {google.container.v1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BestEffortProvisioning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.minProvisionNodes != null && Object.hasOwnProperty.call(message, "minProvisionNodes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minProvisionNodes); - return writer; - }; - - /** - * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1.BestEffortProvisioning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {google.container.v1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BestEffortProvisioning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BestEffortProvisioning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BestEffortProvisioning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.minProvisionNodes = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BestEffortProvisioning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BestEffortProvisioning message. - * @function verify - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BestEffortProvisioning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) - if (!$util.isInteger(message.minProvisionNodes)) - return "minProvisionNodes: integer expected"; - return null; - }; - - /** - * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.BestEffortProvisioning} BestEffortProvisioning - */ - BestEffortProvisioning.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.BestEffortProvisioning) - return object; - var message = new $root.google.container.v1.BestEffortProvisioning(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.minProvisionNodes != null) - message.minProvisionNodes = object.minProvisionNodes | 0; - return message; - }; - - /** - * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {google.container.v1.BestEffortProvisioning} message BestEffortProvisioning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BestEffortProvisioning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.minProvisionNodes = 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) - object.minProvisionNodes = message.minProvisionNodes; - return object; - }; - - /** - * Converts this BestEffortProvisioning to JSON. - * @function toJSON - * @memberof google.container.v1.BestEffortProvisioning - * @instance - * @returns {Object.} JSON object - */ - BestEffortProvisioning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BestEffortProvisioning - * @function getTypeUrl - * @memberof google.container.v1.BestEffortProvisioning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BestEffortProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.BestEffortProvisioning"; - }; - - return BestEffortProvisioning; - })(); - - v1.AutoUpgradeOptions = (function() { - - /** - * Properties of an AutoUpgradeOptions. - * @memberof google.container.v1 - * @interface IAutoUpgradeOptions - * @property {string|null} [autoUpgradeStartTime] AutoUpgradeOptions autoUpgradeStartTime - * @property {string|null} [description] AutoUpgradeOptions description - */ - - /** - * Constructs a new AutoUpgradeOptions. - * @memberof google.container.v1 - * @classdesc Represents an AutoUpgradeOptions. - * @implements IAutoUpgradeOptions - * @constructor - * @param {google.container.v1.IAutoUpgradeOptions=} [properties] Properties to set - */ - function AutoUpgradeOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoUpgradeOptions autoUpgradeStartTime. - * @member {string} autoUpgradeStartTime - * @memberof google.container.v1.AutoUpgradeOptions - * @instance - */ - AutoUpgradeOptions.prototype.autoUpgradeStartTime = ""; - - /** - * AutoUpgradeOptions description. - * @member {string} description - * @memberof google.container.v1.AutoUpgradeOptions - * @instance - */ - AutoUpgradeOptions.prototype.description = ""; - - /** - * Creates a new AutoUpgradeOptions instance using the specified properties. - * @function create - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {google.container.v1.IAutoUpgradeOptions=} [properties] Properties to set - * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions instance - */ - AutoUpgradeOptions.create = function create(properties) { - return new AutoUpgradeOptions(properties); - }; - - /** - * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {google.container.v1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoUpgradeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.autoUpgradeStartTime != null && Object.hasOwnProperty.call(message, "autoUpgradeStartTime")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.autoUpgradeStartTime); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1.AutoUpgradeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {google.container.v1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoUpgradeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoUpgradeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutoUpgradeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.autoUpgradeStartTime = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoUpgradeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoUpgradeOptions message. - * @function verify - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoUpgradeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) - if (!$util.isString(message.autoUpgradeStartTime)) - return "autoUpgradeStartTime: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AutoUpgradeOptions} AutoUpgradeOptions - */ - AutoUpgradeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AutoUpgradeOptions) - return object; - var message = new $root.google.container.v1.AutoUpgradeOptions(); - if (object.autoUpgradeStartTime != null) - message.autoUpgradeStartTime = String(object.autoUpgradeStartTime); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {google.container.v1.AutoUpgradeOptions} message AutoUpgradeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoUpgradeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.autoUpgradeStartTime = ""; - object.description = ""; - } - if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) - object.autoUpgradeStartTime = message.autoUpgradeStartTime; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AutoUpgradeOptions to JSON. - * @function toJSON - * @memberof google.container.v1.AutoUpgradeOptions - * @instance - * @returns {Object.} JSON object - */ - AutoUpgradeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoUpgradeOptions - * @function getTypeUrl - * @memberof google.container.v1.AutoUpgradeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoUpgradeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AutoUpgradeOptions"; - }; - - return AutoUpgradeOptions; - })(); - - v1.MaintenancePolicy = (function() { - - /** - * Properties of a MaintenancePolicy. - * @memberof google.container.v1 - * @interface IMaintenancePolicy - * @property {google.container.v1.IMaintenanceWindow|null} [window] MaintenancePolicy window - * @property {string|null} [resourceVersion] MaintenancePolicy resourceVersion - */ - - /** - * Constructs a new MaintenancePolicy. - * @memberof google.container.v1 - * @classdesc Represents a MaintenancePolicy. - * @implements IMaintenancePolicy - * @constructor - * @param {google.container.v1.IMaintenancePolicy=} [properties] Properties to set - */ - function MaintenancePolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenancePolicy window. - * @member {google.container.v1.IMaintenanceWindow|null|undefined} window - * @memberof google.container.v1.MaintenancePolicy - * @instance - */ - MaintenancePolicy.prototype.window = null; - - /** - * MaintenancePolicy resourceVersion. - * @member {string} resourceVersion - * @memberof google.container.v1.MaintenancePolicy - * @instance - */ - MaintenancePolicy.prototype.resourceVersion = ""; - - /** - * Creates a new MaintenancePolicy instance using the specified properties. - * @function create - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {google.container.v1.IMaintenancePolicy=} [properties] Properties to set - * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy instance - */ - MaintenancePolicy.create = function create(properties) { - return new MaintenancePolicy(properties); - }; - - /** - * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {google.container.v1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenancePolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && Object.hasOwnProperty.call(message, "window")) - $root.google.container.v1.MaintenanceWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resourceVersion != null && Object.hasOwnProperty.call(message, "resourceVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceVersion); - return writer; - }; - - /** - * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1.MaintenancePolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {google.container.v1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenancePolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenancePolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.window = $root.google.container.v1.MaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resourceVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenancePolicy message. - * @function verify - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenancePolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.container.v1.MaintenanceWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) - if (!$util.isString(message.resourceVersion)) - return "resourceVersion: string expected"; - return null; - }; - - /** - * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MaintenancePolicy} MaintenancePolicy - */ - MaintenancePolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MaintenancePolicy) - return object; - var message = new $root.google.container.v1.MaintenancePolicy(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.container.v1.MaintenancePolicy.window: object expected"); - message.window = $root.google.container.v1.MaintenanceWindow.fromObject(object.window); - } - if (object.resourceVersion != null) - message.resourceVersion = String(object.resourceVersion); - return message; - }; - - /** - * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {google.container.v1.MaintenancePolicy} message MaintenancePolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenancePolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.resourceVersion = ""; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.container.v1.MaintenanceWindow.toObject(message.window, options); - if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) - object.resourceVersion = message.resourceVersion; - return object; - }; - - /** - * Converts this MaintenancePolicy to JSON. - * @function toJSON - * @memberof google.container.v1.MaintenancePolicy - * @instance - * @returns {Object.} JSON object - */ - MaintenancePolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenancePolicy - * @function getTypeUrl - * @memberof google.container.v1.MaintenancePolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MaintenancePolicy"; - }; - - return MaintenancePolicy; - })(); - - v1.MaintenanceWindow = (function() { - - /** - * Properties of a MaintenanceWindow. - * @memberof google.container.v1 - * @interface IMaintenanceWindow - * @property {google.container.v1.IDailyMaintenanceWindow|null} [dailyMaintenanceWindow] MaintenanceWindow dailyMaintenanceWindow - * @property {google.container.v1.IRecurringTimeWindow|null} [recurringWindow] MaintenanceWindow recurringWindow - * @property {Object.|null} [maintenanceExclusions] MaintenanceWindow maintenanceExclusions - */ - - /** - * Constructs a new MaintenanceWindow. - * @memberof google.container.v1 - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow - * @constructor - * @param {google.container.v1.IMaintenanceWindow=} [properties] Properties to set - */ - function MaintenanceWindow(properties) { - this.maintenanceExclusions = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceWindow dailyMaintenanceWindow. - * @member {google.container.v1.IDailyMaintenanceWindow|null|undefined} dailyMaintenanceWindow - * @memberof google.container.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.dailyMaintenanceWindow = null; - - /** - * MaintenanceWindow recurringWindow. - * @member {google.container.v1.IRecurringTimeWindow|null|undefined} recurringWindow - * @memberof google.container.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.recurringWindow = null; - - /** - * MaintenanceWindow maintenanceExclusions. - * @member {Object.} maintenanceExclusions - * @memberof google.container.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.maintenanceExclusions = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MaintenanceWindow policy. - * @member {"dailyMaintenanceWindow"|"recurringWindow"|undefined} policy - * @memberof google.container.v1.MaintenanceWindow - * @instance - */ - Object.defineProperty(MaintenanceWindow.prototype, "policy", { - get: $util.oneOfGetter($oneOfFields = ["dailyMaintenanceWindow", "recurringWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {google.container.v1.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow instance - */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); - }; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {google.container.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dailyMaintenanceWindow != null && Object.hasOwnProperty.call(message, "dailyMaintenanceWindow")) - $root.google.container.v1.DailyMaintenanceWindow.encode(message.dailyMaintenanceWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recurringWindow != null && Object.hasOwnProperty.call(message, "recurringWindow")) - $root.google.container.v1.RecurringTimeWindow.encode(message.recurringWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maintenanceExclusions != null && Object.hasOwnProperty.call(message, "maintenanceExclusions")) - for (var keys = Object.keys(message.maintenanceExclusions), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.container.v1.TimeWindow.encode(message.maintenanceExclusions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {google.container.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenanceWindow(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recurringWindow = $root.google.container.v1.RecurringTimeWindow.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.maintenanceExclusions === $util.emptyObject) - message.maintenanceExclusions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.container.v1.TimeWindow.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.maintenanceExclusions[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceWindow message. - * @function verify - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { - properties.policy = 1; - { - var error = $root.google.container.v1.DailyMaintenanceWindow.verify(message.dailyMaintenanceWindow); - if (error) - return "dailyMaintenanceWindow." + error; - } - } - if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { - if (properties.policy === 1) - return "policy: multiple values"; - properties.policy = 1; - { - var error = $root.google.container.v1.RecurringTimeWindow.verify(message.recurringWindow); - if (error) - return "recurringWindow." + error; - } - } - if (message.maintenanceExclusions != null && message.hasOwnProperty("maintenanceExclusions")) { - if (!$util.isObject(message.maintenanceExclusions)) - return "maintenanceExclusions: object expected"; - var key = Object.keys(message.maintenanceExclusions); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.container.v1.TimeWindow.verify(message.maintenanceExclusions[key[i]]); - if (error) - return "maintenanceExclusions." + error; - } - } - return null; - }; - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MaintenanceWindow} MaintenanceWindow - */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MaintenanceWindow) - return object; - var message = new $root.google.container.v1.MaintenanceWindow(); - if (object.dailyMaintenanceWindow != null) { - if (typeof object.dailyMaintenanceWindow !== "object") - throw TypeError(".google.container.v1.MaintenanceWindow.dailyMaintenanceWindow: object expected"); - message.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.fromObject(object.dailyMaintenanceWindow); - } - if (object.recurringWindow != null) { - if (typeof object.recurringWindow !== "object") - throw TypeError(".google.container.v1.MaintenanceWindow.recurringWindow: object expected"); - message.recurringWindow = $root.google.container.v1.RecurringTimeWindow.fromObject(object.recurringWindow); - } - if (object.maintenanceExclusions) { - if (typeof object.maintenanceExclusions !== "object") - throw TypeError(".google.container.v1.MaintenanceWindow.maintenanceExclusions: object expected"); - message.maintenanceExclusions = {}; - for (var keys = Object.keys(object.maintenanceExclusions), i = 0; i < keys.length; ++i) { - if (typeof object.maintenanceExclusions[keys[i]] !== "object") - throw TypeError(".google.container.v1.MaintenanceWindow.maintenanceExclusions: object expected"); - message.maintenanceExclusions[keys[i]] = $root.google.container.v1.TimeWindow.fromObject(object.maintenanceExclusions[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {google.container.v1.MaintenanceWindow} message MaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.maintenanceExclusions = {}; - if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { - object.dailyMaintenanceWindow = $root.google.container.v1.DailyMaintenanceWindow.toObject(message.dailyMaintenanceWindow, options); - if (options.oneofs) - object.policy = "dailyMaintenanceWindow"; - } - if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { - object.recurringWindow = $root.google.container.v1.RecurringTimeWindow.toObject(message.recurringWindow, options); - if (options.oneofs) - object.policy = "recurringWindow"; - } - var keys2; - if (message.maintenanceExclusions && (keys2 = Object.keys(message.maintenanceExclusions)).length) { - object.maintenanceExclusions = {}; - for (var j = 0; j < keys2.length; ++j) - object.maintenanceExclusions[keys2[j]] = $root.google.container.v1.TimeWindow.toObject(message.maintenanceExclusions[keys2[j]], options); - } - return object; - }; - - /** - * Converts this MaintenanceWindow to JSON. - * @function toJSON - * @memberof google.container.v1.MaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - MaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceWindow - * @function getTypeUrl - * @memberof google.container.v1.MaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MaintenanceWindow"; - }; - - return MaintenanceWindow; - })(); - - v1.TimeWindow = (function() { - - /** - * Properties of a TimeWindow. - * @memberof google.container.v1 - * @interface ITimeWindow - * @property {google.container.v1.IMaintenanceExclusionOptions|null} [maintenanceExclusionOptions] TimeWindow maintenanceExclusionOptions - * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime - */ - - /** - * Constructs a new TimeWindow. - * @memberof google.container.v1 - * @classdesc Represents a TimeWindow. - * @implements ITimeWindow - * @constructor - * @param {google.container.v1.ITimeWindow=} [properties] Properties to set - */ - function TimeWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimeWindow maintenanceExclusionOptions. - * @member {google.container.v1.IMaintenanceExclusionOptions|null|undefined} maintenanceExclusionOptions - * @memberof google.container.v1.TimeWindow - * @instance - */ - TimeWindow.prototype.maintenanceExclusionOptions = null; - - /** - * TimeWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.container.v1.TimeWindow - * @instance - */ - TimeWindow.prototype.startTime = null; - - /** - * TimeWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.container.v1.TimeWindow - * @instance - */ - TimeWindow.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TimeWindow options. - * @member {"maintenanceExclusionOptions"|undefined} options - * @memberof google.container.v1.TimeWindow - * @instance - */ - Object.defineProperty(TimeWindow.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["maintenanceExclusionOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TimeWindow instance using the specified properties. - * @function create - * @memberof google.container.v1.TimeWindow - * @static - * @param {google.container.v1.ITimeWindow=} [properties] Properties to set - * @returns {google.container.v1.TimeWindow} TimeWindow instance - */ - TimeWindow.create = function create(properties) { - return new TimeWindow(properties); - }; - - /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1.TimeWindow - * @static - * @param {google.container.v1.ITimeWindow} message TimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maintenanceExclusionOptions != null && Object.hasOwnProperty.call(message, "maintenanceExclusionOptions")) - $root.google.container.v1.MaintenanceExclusionOptions.encode(message.maintenanceExclusionOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1.TimeWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.TimeWindow - * @static - * @param {google.container.v1.ITimeWindow} message TimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.TimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.TimeWindow} TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.TimeWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.decode(reader, reader.uint32()); - break; - } - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.TimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.TimeWindow} TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeWindow message. - * @function verify - * @memberof google.container.v1.TimeWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { - properties.options = 1; - { - var error = $root.google.container.v1.MaintenanceExclusionOptions.verify(message.maintenanceExclusionOptions); - if (error) - return "maintenanceExclusionOptions." + error; - } - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.TimeWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.TimeWindow} TimeWindow - */ - TimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.TimeWindow) - return object; - var message = new $root.google.container.v1.TimeWindow(); - if (object.maintenanceExclusionOptions != null) { - if (typeof object.maintenanceExclusionOptions !== "object") - throw TypeError(".google.container.v1.TimeWindow.maintenanceExclusionOptions: object expected"); - message.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.fromObject(object.maintenanceExclusionOptions); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.container.v1.TimeWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.container.v1.TimeWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.TimeWindow - * @static - * @param {google.container.v1.TimeWindow} message TimeWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { - object.maintenanceExclusionOptions = $root.google.container.v1.MaintenanceExclusionOptions.toObject(message.maintenanceExclusionOptions, options); - if (options.oneofs) - object.options = "maintenanceExclusionOptions"; - } - return object; - }; - - /** - * Converts this TimeWindow to JSON. - * @function toJSON - * @memberof google.container.v1.TimeWindow - * @instance - * @returns {Object.} JSON object - */ - TimeWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeWindow - * @function getTypeUrl - * @memberof google.container.v1.TimeWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.TimeWindow"; - }; - - return TimeWindow; - })(); - - v1.MaintenanceExclusionOptions = (function() { - - /** - * Properties of a MaintenanceExclusionOptions. - * @memberof google.container.v1 - * @interface IMaintenanceExclusionOptions - * @property {google.container.v1.MaintenanceExclusionOptions.Scope|null} [scope] MaintenanceExclusionOptions scope - */ - - /** - * Constructs a new MaintenanceExclusionOptions. - * @memberof google.container.v1 - * @classdesc Represents a MaintenanceExclusionOptions. - * @implements IMaintenanceExclusionOptions - * @constructor - * @param {google.container.v1.IMaintenanceExclusionOptions=} [properties] Properties to set - */ - function MaintenanceExclusionOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceExclusionOptions scope. - * @member {google.container.v1.MaintenanceExclusionOptions.Scope} scope - * @memberof google.container.v1.MaintenanceExclusionOptions - * @instance - */ - MaintenanceExclusionOptions.prototype.scope = 0; - - /** - * Creates a new MaintenanceExclusionOptions instance using the specified properties. - * @function create - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1.IMaintenanceExclusionOptions=} [properties] Properties to set - * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions instance - */ - MaintenanceExclusionOptions.create = function create(properties) { - return new MaintenanceExclusionOptions(properties); - }; - - /** - * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceExclusionOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - return writer; - }; - - /** - * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1.MaintenanceExclusionOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceExclusionOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceExclusionOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MaintenanceExclusionOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceExclusionOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceExclusionOptions message. - * @function verify - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceExclusionOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - */ - MaintenanceExclusionOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MaintenanceExclusionOptions) - return object; - var message = new $root.google.container.v1.MaintenanceExclusionOptions(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "NO_UPGRADES": - case 0: - message.scope = 0; - break; - case "NO_MINOR_UPGRADES": - case 1: - message.scope = 1; - break; - case "NO_MINOR_OR_NODE_UPGRADES": - case 2: - message.scope = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1.MaintenanceExclusionOptions} message MaintenanceExclusionOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceExclusionOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scope = options.enums === String ? "NO_UPGRADES" : 0; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.container.v1.MaintenanceExclusionOptions.Scope[message.scope] === undefined ? message.scope : $root.google.container.v1.MaintenanceExclusionOptions.Scope[message.scope] : message.scope; - return object; - }; - - /** - * Converts this MaintenanceExclusionOptions to JSON. - * @function toJSON - * @memberof google.container.v1.MaintenanceExclusionOptions - * @instance - * @returns {Object.} JSON object - */ - MaintenanceExclusionOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceExclusionOptions - * @function getTypeUrl - * @memberof google.container.v1.MaintenanceExclusionOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceExclusionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MaintenanceExclusionOptions"; - }; - - /** - * Scope enum. - * @name google.container.v1.MaintenanceExclusionOptions.Scope - * @enum {number} - * @property {number} NO_UPGRADES=0 NO_UPGRADES value - * @property {number} NO_MINOR_UPGRADES=1 NO_MINOR_UPGRADES value - * @property {number} NO_MINOR_OR_NODE_UPGRADES=2 NO_MINOR_OR_NODE_UPGRADES value - */ - MaintenanceExclusionOptions.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_UPGRADES"] = 0; - values[valuesById[1] = "NO_MINOR_UPGRADES"] = 1; - values[valuesById[2] = "NO_MINOR_OR_NODE_UPGRADES"] = 2; - return values; - })(); - - return MaintenanceExclusionOptions; - })(); - - v1.RecurringTimeWindow = (function() { - - /** - * Properties of a RecurringTimeWindow. - * @memberof google.container.v1 - * @interface IRecurringTimeWindow - * @property {google.container.v1.ITimeWindow|null} [window] RecurringTimeWindow window - * @property {string|null} [recurrence] RecurringTimeWindow recurrence - */ - - /** - * Constructs a new RecurringTimeWindow. - * @memberof google.container.v1 - * @classdesc Represents a RecurringTimeWindow. - * @implements IRecurringTimeWindow - * @constructor - * @param {google.container.v1.IRecurringTimeWindow=} [properties] Properties to set - */ - function RecurringTimeWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecurringTimeWindow window. - * @member {google.container.v1.ITimeWindow|null|undefined} window - * @memberof google.container.v1.RecurringTimeWindow - * @instance - */ - RecurringTimeWindow.prototype.window = null; - - /** - * RecurringTimeWindow recurrence. - * @member {string} recurrence - * @memberof google.container.v1.RecurringTimeWindow - * @instance - */ - RecurringTimeWindow.prototype.recurrence = ""; - - /** - * Creates a new RecurringTimeWindow instance using the specified properties. - * @function create - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {google.container.v1.IRecurringTimeWindow=} [properties] Properties to set - * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow instance - */ - RecurringTimeWindow.create = function create(properties) { - return new RecurringTimeWindow(properties); - }; - - /** - * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {google.container.v1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringTimeWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && Object.hasOwnProperty.call(message, "window")) - $root.google.container.v1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.recurrence); - return writer; - }; - - /** - * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1.RecurringTimeWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {google.container.v1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringTimeWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringTimeWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RecurringTimeWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.window = $root.google.container.v1.TimeWindow.decode(reader, reader.uint32()); - break; - } - case 2: { - message.recurrence = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringTimeWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecurringTimeWindow message. - * @function verify - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecurringTimeWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.container.v1.TimeWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - if (!$util.isString(message.recurrence)) - return "recurrence: string expected"; - return null; - }; - - /** - * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RecurringTimeWindow} RecurringTimeWindow - */ - RecurringTimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RecurringTimeWindow) - return object; - var message = new $root.google.container.v1.RecurringTimeWindow(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.container.v1.RecurringTimeWindow.window: object expected"); - message.window = $root.google.container.v1.TimeWindow.fromObject(object.window); - } - if (object.recurrence != null) - message.recurrence = String(object.recurrence); - return message; - }; - - /** - * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {google.container.v1.RecurringTimeWindow} message RecurringTimeWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecurringTimeWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.recurrence = ""; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.container.v1.TimeWindow.toObject(message.window, options); - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - object.recurrence = message.recurrence; - return object; - }; - - /** - * Converts this RecurringTimeWindow to JSON. - * @function toJSON - * @memberof google.container.v1.RecurringTimeWindow - * @instance - * @returns {Object.} JSON object - */ - RecurringTimeWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RecurringTimeWindow - * @function getTypeUrl - * @memberof google.container.v1.RecurringTimeWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecurringTimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RecurringTimeWindow"; - }; - - return RecurringTimeWindow; - })(); - - v1.DailyMaintenanceWindow = (function() { - - /** - * Properties of a DailyMaintenanceWindow. - * @memberof google.container.v1 - * @interface IDailyMaintenanceWindow - * @property {string|null} [startTime] DailyMaintenanceWindow startTime - * @property {string|null} [duration] DailyMaintenanceWindow duration - */ - - /** - * Constructs a new DailyMaintenanceWindow. - * @memberof google.container.v1 - * @classdesc Represents a DailyMaintenanceWindow. - * @implements IDailyMaintenanceWindow - * @constructor - * @param {google.container.v1.IDailyMaintenanceWindow=} [properties] Properties to set - */ - function DailyMaintenanceWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DailyMaintenanceWindow startTime. - * @member {string} startTime - * @memberof google.container.v1.DailyMaintenanceWindow - * @instance - */ - DailyMaintenanceWindow.prototype.startTime = ""; - - /** - * DailyMaintenanceWindow duration. - * @member {string} duration - * @memberof google.container.v1.DailyMaintenanceWindow - * @instance - */ - DailyMaintenanceWindow.prototype.duration = ""; - - /** - * Creates a new DailyMaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {google.container.v1.IDailyMaintenanceWindow=} [properties] Properties to set - * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow instance - */ - DailyMaintenanceWindow.create = function create(properties) { - return new DailyMaintenanceWindow(properties); - }; - - /** - * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {google.container.v1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailyMaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.startTime); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.duration); - return writer; - }; - - /** - * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1.DailyMaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {google.container.v1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailyMaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailyMaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DailyMaintenanceWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.startTime = reader.string(); - break; - } - case 3: { - message.duration = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailyMaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DailyMaintenanceWindow message. - * @function verify - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DailyMaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isString(message.startTime)) - return "startTime: string expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isString(message.duration)) - return "duration: string expected"; - return null; - }; - - /** - * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DailyMaintenanceWindow} DailyMaintenanceWindow - */ - DailyMaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DailyMaintenanceWindow) - return object; - var message = new $root.google.container.v1.DailyMaintenanceWindow(); - if (object.startTime != null) - message.startTime = String(object.startTime); - if (object.duration != null) - message.duration = String(object.duration); - return message; - }; - - /** - * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {google.container.v1.DailyMaintenanceWindow} message DailyMaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DailyMaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = ""; - object.duration = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = message.startTime; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - return object; - }; - - /** - * Converts this DailyMaintenanceWindow to JSON. - * @function toJSON - * @memberof google.container.v1.DailyMaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - DailyMaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DailyMaintenanceWindow - * @function getTypeUrl - * @memberof google.container.v1.DailyMaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DailyMaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DailyMaintenanceWindow"; - }; - - return DailyMaintenanceWindow; - })(); - - v1.SetNodePoolManagementRequest = (function() { - - /** - * Properties of a SetNodePoolManagementRequest. - * @memberof google.container.v1 - * @interface ISetNodePoolManagementRequest - * @property {string|null} [projectId] SetNodePoolManagementRequest projectId - * @property {string|null} [zone] SetNodePoolManagementRequest zone - * @property {string|null} [clusterId] SetNodePoolManagementRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolManagementRequest nodePoolId - * @property {google.container.v1.INodeManagement|null} [management] SetNodePoolManagementRequest management - * @property {string|null} [name] SetNodePoolManagementRequest name - */ - - /** - * Constructs a new SetNodePoolManagementRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetNodePoolManagementRequest. - * @implements ISetNodePoolManagementRequest - * @constructor - * @param {google.container.v1.ISetNodePoolManagementRequest=} [properties] Properties to set - */ - function SetNodePoolManagementRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolManagementRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.projectId = ""; - - /** - * SetNodePoolManagementRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.zone = ""; - - /** - * SetNodePoolManagementRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.clusterId = ""; - - /** - * SetNodePoolManagementRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolManagementRequest management. - * @member {google.container.v1.INodeManagement|null|undefined} management - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.management = null; - - /** - * SetNodePoolManagementRequest name. - * @member {string} name - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolManagementRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1.ISetNodePoolManagementRequest=} [properties] Properties to set - * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest instance - */ - SetNodePoolManagementRequest.create = function create(properties) { - return new SetNodePoolManagementRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolManagementRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolManagementRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolManagementRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolManagementRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolManagementRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolManagementRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolManagementRequest message. - * @function verify - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolManagementRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - */ - SetNodePoolManagementRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetNodePoolManagementRequest) - return object; - var message = new $root.google.container.v1.SetNodePoolManagementRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1.SetNodePoolManagementRequest.management: object expected"); - message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1.SetNodePoolManagementRequest} message SetNodePoolManagementRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolManagementRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.management = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolManagementRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetNodePoolManagementRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolManagementRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolManagementRequest - * @function getTypeUrl - * @memberof google.container.v1.SetNodePoolManagementRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolManagementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetNodePoolManagementRequest"; - }; - - return SetNodePoolManagementRequest; - })(); - - v1.SetNodePoolSizeRequest = (function() { - - /** - * Properties of a SetNodePoolSizeRequest. - * @memberof google.container.v1 - * @interface ISetNodePoolSizeRequest - * @property {string|null} [projectId] SetNodePoolSizeRequest projectId - * @property {string|null} [zone] SetNodePoolSizeRequest zone - * @property {string|null} [clusterId] SetNodePoolSizeRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolSizeRequest nodePoolId - * @property {number|null} [nodeCount] SetNodePoolSizeRequest nodeCount - * @property {string|null} [name] SetNodePoolSizeRequest name - */ - - /** - * Constructs a new SetNodePoolSizeRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetNodePoolSizeRequest. - * @implements ISetNodePoolSizeRequest - * @constructor - * @param {google.container.v1.ISetNodePoolSizeRequest=} [properties] Properties to set - */ - function SetNodePoolSizeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolSizeRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.projectId = ""; - - /** - * SetNodePoolSizeRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.zone = ""; - - /** - * SetNodePoolSizeRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.clusterId = ""; - - /** - * SetNodePoolSizeRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolSizeRequest nodeCount. - * @member {number} nodeCount - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.nodeCount = 0; - - /** - * SetNodePoolSizeRequest name. - * @member {string} name - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolSizeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1.ISetNodePoolSizeRequest=} [properties] Properties to set - * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest instance - */ - SetNodePoolSizeRequest.create = function create(properties) { - return new SetNodePoolSizeRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolSizeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nodeCount); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNodePoolSizeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolSizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolSizeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNodePoolSizeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.nodeCount = reader.int32(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolSizeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolSizeRequest message. - * @function verify - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolSizeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - */ - SetNodePoolSizeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetNodePoolSizeRequest) - return object; - var message = new $root.google.container.v1.SetNodePoolSizeRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1.SetNodePoolSizeRequest} message SetNodePoolSizeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolSizeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.nodeCount = 0; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolSizeRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetNodePoolSizeRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolSizeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolSizeRequest - * @function getTypeUrl - * @memberof google.container.v1.SetNodePoolSizeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolSizeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetNodePoolSizeRequest"; - }; - - return SetNodePoolSizeRequest; - })(); - - v1.CompleteNodePoolUpgradeRequest = (function() { - - /** - * Properties of a CompleteNodePoolUpgradeRequest. - * @memberof google.container.v1 - * @interface ICompleteNodePoolUpgradeRequest - * @property {string|null} [name] CompleteNodePoolUpgradeRequest name - */ - - /** - * Constructs a new CompleteNodePoolUpgradeRequest. - * @memberof google.container.v1 - * @classdesc Represents a CompleteNodePoolUpgradeRequest. - * @implements ICompleteNodePoolUpgradeRequest - * @constructor - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set - */ - function CompleteNodePoolUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteNodePoolUpgradeRequest name. - * @member {string} name - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @instance - */ - CompleteNodePoolUpgradeRequest.prototype.name = ""; - - /** - * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set - * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest instance - */ - CompleteNodePoolUpgradeRequest.create = function create(properties) { - return new CompleteNodePoolUpgradeRequest(properties); - }; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteNodePoolUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompleteNodePoolUpgradeRequest(); - 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 CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteNodePoolUpgradeRequest message. - * @function verify - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - */ - CompleteNodePoolUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CompleteNodePoolUpgradeRequest) - return object; - var message = new $root.google.container.v1.CompleteNodePoolUpgradeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1.CompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - CompleteNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteNodePoolUpgradeRequest - * @function getTypeUrl - * @memberof google.container.v1.CompleteNodePoolUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CompleteNodePoolUpgradeRequest"; - }; - - return CompleteNodePoolUpgradeRequest; - })(); - - v1.RollbackNodePoolUpgradeRequest = (function() { - - /** - * Properties of a RollbackNodePoolUpgradeRequest. - * @memberof google.container.v1 - * @interface IRollbackNodePoolUpgradeRequest - * @property {string|null} [projectId] RollbackNodePoolUpgradeRequest projectId - * @property {string|null} [zone] RollbackNodePoolUpgradeRequest zone - * @property {string|null} [clusterId] RollbackNodePoolUpgradeRequest clusterId - * @property {string|null} [nodePoolId] RollbackNodePoolUpgradeRequest nodePoolId - * @property {string|null} [name] RollbackNodePoolUpgradeRequest name - * @property {boolean|null} [respectPdb] RollbackNodePoolUpgradeRequest respectPdb - */ - - /** - * Constructs a new RollbackNodePoolUpgradeRequest. - * @memberof google.container.v1 - * @classdesc Represents a RollbackNodePoolUpgradeRequest. - * @implements IRollbackNodePoolUpgradeRequest - * @constructor - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set - */ - function RollbackNodePoolUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackNodePoolUpgradeRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.projectId = ""; - - /** - * RollbackNodePoolUpgradeRequest zone. - * @member {string} zone - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.zone = ""; - - /** - * RollbackNodePoolUpgradeRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.clusterId = ""; - - /** - * RollbackNodePoolUpgradeRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.nodePoolId = ""; - - /** - * RollbackNodePoolUpgradeRequest name. - * @member {string} name - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.name = ""; - - /** - * RollbackNodePoolUpgradeRequest respectPdb. - * @member {boolean} respectPdb - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.respectPdb = false; - - /** - * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set - * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest instance - */ - RollbackNodePoolUpgradeRequest.create = function create(properties) { - return new RollbackNodePoolUpgradeRequest(properties); - }; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackNodePoolUpgradeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.respectPdb != null && Object.hasOwnProperty.call(message, "respectPdb")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.respectPdb); - return writer; - }; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackNodePoolUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RollbackNodePoolUpgradeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - message.respectPdb = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackNodePoolUpgradeRequest message. - * @function verify - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackNodePoolUpgradeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) - if (typeof message.respectPdb !== "boolean") - return "respectPdb: boolean expected"; - return null; - }; - - /** - * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - */ - RollbackNodePoolUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RollbackNodePoolUpgradeRequest) - return object; - var message = new $root.google.container.v1.RollbackNodePoolUpgradeRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - if (object.respectPdb != null) - message.respectPdb = Boolean(object.respectPdb); - return message; - }; - - /** - * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1.RollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackNodePoolUpgradeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - object.respectPdb = false; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) - object.respectPdb = message.respectPdb; - return object; - }; - - /** - * Converts this RollbackNodePoolUpgradeRequest to JSON. - * @function toJSON - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - RollbackNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RollbackNodePoolUpgradeRequest - * @function getTypeUrl - * @memberof google.container.v1.RollbackNodePoolUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RollbackNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RollbackNodePoolUpgradeRequest"; - }; - - return RollbackNodePoolUpgradeRequest; - })(); - - v1.ListNodePoolsResponse = (function() { - - /** - * Properties of a ListNodePoolsResponse. - * @memberof google.container.v1 - * @interface IListNodePoolsResponse - * @property {Array.|null} [nodePools] ListNodePoolsResponse nodePools - */ - - /** - * Constructs a new ListNodePoolsResponse. - * @memberof google.container.v1 - * @classdesc Represents a ListNodePoolsResponse. - * @implements IListNodePoolsResponse - * @constructor - * @param {google.container.v1.IListNodePoolsResponse=} [properties] Properties to set - */ - function ListNodePoolsResponse(properties) { - this.nodePools = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListNodePoolsResponse nodePools. - * @member {Array.} nodePools - * @memberof google.container.v1.ListNodePoolsResponse - * @instance - */ - ListNodePoolsResponse.prototype.nodePools = $util.emptyArray; - - /** - * Creates a new ListNodePoolsResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {google.container.v1.IListNodePoolsResponse=} [properties] Properties to set - * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse instance - */ - ListNodePoolsResponse.create = function create(properties) { - return new ListNodePoolsResponse(properties); - }; - - /** - * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {google.container.v1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.container.v1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1.ListNodePoolsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {google.container.v1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListNodePoolsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.container.v1.NodePool.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNodePoolsResponse message. - * @function verify - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNodePoolsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.container.v1.NodePool.verify(message.nodePools[i]); - if (error) - return "nodePools." + error; - } - } - return null; - }; - - /** - * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListNodePoolsResponse} ListNodePoolsResponse - */ - ListNodePoolsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListNodePoolsResponse) - return object; - var message = new $root.google.container.v1.ListNodePoolsResponse(); - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.container.v1.ListNodePoolsResponse.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.container.v1.ListNodePoolsResponse.nodePools: object expected"); - message.nodePools[i] = $root.google.container.v1.NodePool.fromObject(object.nodePools[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {google.container.v1.ListNodePoolsResponse} message ListNodePoolsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNodePoolsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodePools = []; - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.container.v1.NodePool.toObject(message.nodePools[j], options); - } - return object; - }; - - /** - * Converts this ListNodePoolsResponse to JSON. - * @function toJSON - * @memberof google.container.v1.ListNodePoolsResponse - * @instance - * @returns {Object.} JSON object - */ - ListNodePoolsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNodePoolsResponse - * @function getTypeUrl - * @memberof google.container.v1.ListNodePoolsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListNodePoolsResponse"; - }; - - return ListNodePoolsResponse; - })(); - - v1.ClusterAutoscaling = (function() { - - /** - * Properties of a ClusterAutoscaling. - * @memberof google.container.v1 - * @interface IClusterAutoscaling - * @property {boolean|null} [enableNodeAutoprovisioning] ClusterAutoscaling enableNodeAutoprovisioning - * @property {Array.|null} [resourceLimits] ClusterAutoscaling resourceLimits - * @property {google.container.v1.ClusterAutoscaling.AutoscalingProfile|null} [autoscalingProfile] ClusterAutoscaling autoscalingProfile - * @property {google.container.v1.IAutoprovisioningNodePoolDefaults|null} [autoprovisioningNodePoolDefaults] ClusterAutoscaling autoprovisioningNodePoolDefaults - * @property {Array.|null} [autoprovisioningLocations] ClusterAutoscaling autoprovisioningLocations - */ - - /** - * Constructs a new ClusterAutoscaling. - * @memberof google.container.v1 - * @classdesc Represents a ClusterAutoscaling. - * @implements IClusterAutoscaling - * @constructor - * @param {google.container.v1.IClusterAutoscaling=} [properties] Properties to set - */ - function ClusterAutoscaling(properties) { - this.resourceLimits = []; - this.autoprovisioningLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterAutoscaling enableNodeAutoprovisioning. - * @member {boolean} enableNodeAutoprovisioning - * @memberof google.container.v1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.enableNodeAutoprovisioning = false; - - /** - * ClusterAutoscaling resourceLimits. - * @member {Array.} resourceLimits - * @memberof google.container.v1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.resourceLimits = $util.emptyArray; - - /** - * ClusterAutoscaling autoscalingProfile. - * @member {google.container.v1.ClusterAutoscaling.AutoscalingProfile} autoscalingProfile - * @memberof google.container.v1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoscalingProfile = 0; - - /** - * ClusterAutoscaling autoprovisioningNodePoolDefaults. - * @member {google.container.v1.IAutoprovisioningNodePoolDefaults|null|undefined} autoprovisioningNodePoolDefaults - * @memberof google.container.v1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoprovisioningNodePoolDefaults = null; - - /** - * ClusterAutoscaling autoprovisioningLocations. - * @member {Array.} autoprovisioningLocations - * @memberof google.container.v1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoprovisioningLocations = $util.emptyArray; - - /** - * Creates a new ClusterAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {google.container.v1.IClusterAutoscaling=} [properties] Properties to set - * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling instance - */ - ClusterAutoscaling.create = function create(properties) { - return new ClusterAutoscaling(properties); - }; - - /** - * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {google.container.v1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableNodeAutoprovisioning != null && Object.hasOwnProperty.call(message, "enableNodeAutoprovisioning")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNodeAutoprovisioning); - if (message.resourceLimits != null && message.resourceLimits.length) - for (var i = 0; i < message.resourceLimits.length; ++i) - $root.google.container.v1.ResourceLimit.encode(message.resourceLimits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoscalingProfile != null && Object.hasOwnProperty.call(message, "autoscalingProfile")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.autoscalingProfile); - if (message.autoprovisioningNodePoolDefaults != null && Object.hasOwnProperty.call(message, "autoprovisioningNodePoolDefaults")) - $root.google.container.v1.AutoprovisioningNodePoolDefaults.encode(message.autoprovisioningNodePoolDefaults, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.autoprovisioningLocations != null && message.autoprovisioningLocations.length) - for (var i = 0; i < message.autoprovisioningLocations.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.autoprovisioningLocations[i]); - return writer; - }; - - /** - * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.ClusterAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {google.container.v1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ClusterAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableNodeAutoprovisioning = reader.bool(); - break; - } - case 2: { - if (!(message.resourceLimits && message.resourceLimits.length)) - message.resourceLimits = []; - message.resourceLimits.push($root.google.container.v1.ResourceLimit.decode(reader, reader.uint32())); - break; - } - case 3: { - message.autoscalingProfile = reader.int32(); - break; - } - case 4: { - message.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.autoprovisioningLocations && message.autoprovisioningLocations.length)) - message.autoprovisioningLocations = []; - message.autoprovisioningLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterAutoscaling message. - * @function verify - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) - if (typeof message.enableNodeAutoprovisioning !== "boolean") - return "enableNodeAutoprovisioning: boolean expected"; - if (message.resourceLimits != null && message.hasOwnProperty("resourceLimits")) { - if (!Array.isArray(message.resourceLimits)) - return "resourceLimits: array expected"; - for (var i = 0; i < message.resourceLimits.length; ++i) { - var error = $root.google.container.v1.ResourceLimit.verify(message.resourceLimits[i]); - if (error) - return "resourceLimits." + error; - } - } - if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) - switch (message.autoscalingProfile) { - default: - return "autoscalingProfile: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) { - var error = $root.google.container.v1.AutoprovisioningNodePoolDefaults.verify(message.autoprovisioningNodePoolDefaults); - if (error) - return "autoprovisioningNodePoolDefaults." + error; - } - if (message.autoprovisioningLocations != null && message.hasOwnProperty("autoprovisioningLocations")) { - if (!Array.isArray(message.autoprovisioningLocations)) - return "autoprovisioningLocations: array expected"; - for (var i = 0; i < message.autoprovisioningLocations.length; ++i) - if (!$util.isString(message.autoprovisioningLocations[i])) - return "autoprovisioningLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ClusterAutoscaling} ClusterAutoscaling - */ - ClusterAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ClusterAutoscaling) - return object; - var message = new $root.google.container.v1.ClusterAutoscaling(); - if (object.enableNodeAutoprovisioning != null) - message.enableNodeAutoprovisioning = Boolean(object.enableNodeAutoprovisioning); - if (object.resourceLimits) { - if (!Array.isArray(object.resourceLimits)) - throw TypeError(".google.container.v1.ClusterAutoscaling.resourceLimits: array expected"); - message.resourceLimits = []; - for (var i = 0; i < object.resourceLimits.length; ++i) { - if (typeof object.resourceLimits[i] !== "object") - throw TypeError(".google.container.v1.ClusterAutoscaling.resourceLimits: object expected"); - message.resourceLimits[i] = $root.google.container.v1.ResourceLimit.fromObject(object.resourceLimits[i]); - } - } - switch (object.autoscalingProfile) { - default: - if (typeof object.autoscalingProfile === "number") { - message.autoscalingProfile = object.autoscalingProfile; - break; - } - break; - case "PROFILE_UNSPECIFIED": - case 0: - message.autoscalingProfile = 0; - break; - case "OPTIMIZE_UTILIZATION": - case 1: - message.autoscalingProfile = 1; - break; - case "BALANCED": - case 2: - message.autoscalingProfile = 2; - break; - } - if (object.autoprovisioningNodePoolDefaults != null) { - if (typeof object.autoprovisioningNodePoolDefaults !== "object") - throw TypeError(".google.container.v1.ClusterAutoscaling.autoprovisioningNodePoolDefaults: object expected"); - message.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.fromObject(object.autoprovisioningNodePoolDefaults); - } - if (object.autoprovisioningLocations) { - if (!Array.isArray(object.autoprovisioningLocations)) - throw TypeError(".google.container.v1.ClusterAutoscaling.autoprovisioningLocations: array expected"); - message.autoprovisioningLocations = []; - for (var i = 0; i < object.autoprovisioningLocations.length; ++i) - message.autoprovisioningLocations[i] = String(object.autoprovisioningLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {google.container.v1.ClusterAutoscaling} message ClusterAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resourceLimits = []; - object.autoprovisioningLocations = []; - } - if (options.defaults) { - object.enableNodeAutoprovisioning = false; - object.autoscalingProfile = options.enums === String ? "PROFILE_UNSPECIFIED" : 0; - object.autoprovisioningNodePoolDefaults = null; - } - if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) - object.enableNodeAutoprovisioning = message.enableNodeAutoprovisioning; - if (message.resourceLimits && message.resourceLimits.length) { - object.resourceLimits = []; - for (var j = 0; j < message.resourceLimits.length; ++j) - object.resourceLimits[j] = $root.google.container.v1.ResourceLimit.toObject(message.resourceLimits[j], options); - } - if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) - object.autoscalingProfile = options.enums === String ? $root.google.container.v1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] === undefined ? message.autoscalingProfile : $root.google.container.v1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] : message.autoscalingProfile; - if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) - object.autoprovisioningNodePoolDefaults = $root.google.container.v1.AutoprovisioningNodePoolDefaults.toObject(message.autoprovisioningNodePoolDefaults, options); - if (message.autoprovisioningLocations && message.autoprovisioningLocations.length) { - object.autoprovisioningLocations = []; - for (var j = 0; j < message.autoprovisioningLocations.length; ++j) - object.autoprovisioningLocations[j] = message.autoprovisioningLocations[j]; - } - return object; - }; - - /** - * Converts this ClusterAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1.ClusterAutoscaling - * @instance - * @returns {Object.} JSON object - */ - ClusterAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterAutoscaling - * @function getTypeUrl - * @memberof google.container.v1.ClusterAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ClusterAutoscaling"; - }; - - /** - * AutoscalingProfile enum. - * @name google.container.v1.ClusterAutoscaling.AutoscalingProfile - * @enum {number} - * @property {number} PROFILE_UNSPECIFIED=0 PROFILE_UNSPECIFIED value - * @property {number} OPTIMIZE_UTILIZATION=1 OPTIMIZE_UTILIZATION value - * @property {number} BALANCED=2 BALANCED value - */ - ClusterAutoscaling.AutoscalingProfile = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROFILE_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIMIZE_UTILIZATION"] = 1; - values[valuesById[2] = "BALANCED"] = 2; - return values; - })(); - - return ClusterAutoscaling; - })(); - - v1.AutoprovisioningNodePoolDefaults = (function() { - - /** - * Properties of an AutoprovisioningNodePoolDefaults. - * @memberof google.container.v1 - * @interface IAutoprovisioningNodePoolDefaults - * @property {Array.|null} [oauthScopes] AutoprovisioningNodePoolDefaults oauthScopes - * @property {string|null} [serviceAccount] AutoprovisioningNodePoolDefaults serviceAccount - * @property {google.container.v1.NodePool.IUpgradeSettings|null} [upgradeSettings] AutoprovisioningNodePoolDefaults upgradeSettings - * @property {google.container.v1.INodeManagement|null} [management] AutoprovisioningNodePoolDefaults management - * @property {string|null} [minCpuPlatform] AutoprovisioningNodePoolDefaults minCpuPlatform - * @property {number|null} [diskSizeGb] AutoprovisioningNodePoolDefaults diskSizeGb - * @property {string|null} [diskType] AutoprovisioningNodePoolDefaults diskType - * @property {google.container.v1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] AutoprovisioningNodePoolDefaults shieldedInstanceConfig - * @property {string|null} [bootDiskKmsKey] AutoprovisioningNodePoolDefaults bootDiskKmsKey - * @property {string|null} [imageType] AutoprovisioningNodePoolDefaults imageType - * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled - */ - - /** - * Constructs a new AutoprovisioningNodePoolDefaults. - * @memberof google.container.v1 - * @classdesc Represents an AutoprovisioningNodePoolDefaults. - * @implements IAutoprovisioningNodePoolDefaults - * @constructor - * @param {google.container.v1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set - */ - function AutoprovisioningNodePoolDefaults(properties) { - this.oauthScopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoprovisioningNodePoolDefaults oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.oauthScopes = $util.emptyArray; - - /** - * AutoprovisioningNodePoolDefaults serviceAccount. - * @member {string} serviceAccount - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.serviceAccount = ""; - - /** - * AutoprovisioningNodePoolDefaults upgradeSettings. - * @member {google.container.v1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.upgradeSettings = null; - - /** - * AutoprovisioningNodePoolDefaults management. - * @member {google.container.v1.INodeManagement|null|undefined} management - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.management = null; - - /** - * AutoprovisioningNodePoolDefaults minCpuPlatform. - * @member {string} minCpuPlatform - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.minCpuPlatform = ""; - - /** - * AutoprovisioningNodePoolDefaults diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.diskSizeGb = 0; - - /** - * AutoprovisioningNodePoolDefaults diskType. - * @member {string} diskType - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.diskType = ""; - - /** - * AutoprovisioningNodePoolDefaults shieldedInstanceConfig. - * @member {google.container.v1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.shieldedInstanceConfig = null; - - /** - * AutoprovisioningNodePoolDefaults bootDiskKmsKey. - * @member {string} bootDiskKmsKey - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.bootDiskKmsKey = ""; - - /** - * AutoprovisioningNodePoolDefaults imageType. - * @member {string} imageType - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.imageType = ""; - - /** - * AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. - * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.insecureKubeletReadonlyPortEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. - * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - */ - Object.defineProperty(AutoprovisioningNodePoolDefaults.prototype, "_insecureKubeletReadonlyPortEnabled", { - get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set - * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults instance - */ - AutoprovisioningNodePoolDefaults.create = function create(properties) { - return new AutoprovisioningNodePoolDefaults(properties); - }; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoprovisioningNodePoolDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.oauthScopes[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1.NodeManagement.encode(message.management, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.minCpuPlatform); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskSizeGb); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.diskType); - if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) - $root.google.container.v1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.bootDiskKmsKey); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.imageType); - if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.insecureKubeletReadonlyPortEnabled); - return writer; - }; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoprovisioningNodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoprovisioningNodePoolDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutoprovisioningNodePoolDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 2: { - message.serviceAccount = reader.string(); - break; - } - case 3: { - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 4: { - message.management = $root.google.container.v1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 5: { - message.minCpuPlatform = reader.string(); - break; - } - case 6: { - message.diskSizeGb = reader.int32(); - break; - } - case 7: { - message.diskType = reader.string(); - break; - } - case 8: { - message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.bootDiskKmsKey = reader.string(); - break; - } - case 10: { - message.imageType = reader.string(); - break; - } - case 13: { - message.insecureKubeletReadonlyPortEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoprovisioningNodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoprovisioningNodePoolDefaults message. - * @function verify - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoprovisioningNodePoolDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { - var error = $root.google.container.v1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); - if (error) - return "shieldedInstanceConfig." + error; - } - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - if (!$util.isString(message.bootDiskKmsKey)) - return "bootDiskKmsKey: string expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - properties._insecureKubeletReadonlyPortEnabled = 1; - if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") - return "insecureKubeletReadonlyPortEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates an AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - */ - AutoprovisioningNodePoolDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AutoprovisioningNodePoolDefaults) - return object; - var message = new $root.google.container.v1.AutoprovisioningNodePoolDefaults(); - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.management: object expected"); - message.management = $root.google.container.v1.NodeManagement.fromObject(object.management); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.shieldedInstanceConfig != null) { - if (typeof object.shieldedInstanceConfig !== "object") - throw TypeError(".google.container.v1.AutoprovisioningNodePoolDefaults.shieldedInstanceConfig: object expected"); - message.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); - } - if (object.bootDiskKmsKey != null) - message.bootDiskKmsKey = String(object.bootDiskKmsKey); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.insecureKubeletReadonlyPortEnabled != null) - message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); - return message; - }; - - /** - * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1.AutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoprovisioningNodePoolDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oauthScopes = []; - if (options.defaults) { - object.serviceAccount = ""; - object.upgradeSettings = null; - object.management = null; - object.minCpuPlatform = ""; - object.diskSizeGb = 0; - object.diskType = ""; - object.shieldedInstanceConfig = null; - object.bootDiskKmsKey = ""; - object.imageType = ""; - } - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1.NodeManagement.toObject(message.management, options); - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - object.minCpuPlatform = message.minCpuPlatform; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) - object.shieldedInstanceConfig = $root.google.container.v1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - object.bootDiskKmsKey = message.bootDiskKmsKey; - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; - if (options.oneofs) - object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; - } - return object; - }; - - /** - * Converts this AutoprovisioningNodePoolDefaults to JSON. - * @function toJSON - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @instance - * @returns {Object.} JSON object - */ - AutoprovisioningNodePoolDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoprovisioningNodePoolDefaults - * @function getTypeUrl - * @memberof google.container.v1.AutoprovisioningNodePoolDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoprovisioningNodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AutoprovisioningNodePoolDefaults"; - }; - - return AutoprovisioningNodePoolDefaults; - })(); - - v1.ResourceLimit = (function() { - - /** - * Properties of a ResourceLimit. - * @memberof google.container.v1 - * @interface IResourceLimit - * @property {string|null} [resourceType] ResourceLimit resourceType - * @property {number|Long|null} [minimum] ResourceLimit minimum - * @property {number|Long|null} [maximum] ResourceLimit maximum - */ - - /** - * Constructs a new ResourceLimit. - * @memberof google.container.v1 - * @classdesc Represents a ResourceLimit. - * @implements IResourceLimit - * @constructor - * @param {google.container.v1.IResourceLimit=} [properties] Properties to set - */ - function ResourceLimit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceLimit resourceType. - * @member {string} resourceType - * @memberof google.container.v1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.resourceType = ""; - - /** - * ResourceLimit minimum. - * @member {number|Long} minimum - * @memberof google.container.v1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.minimum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResourceLimit maximum. - * @member {number|Long} maximum - * @memberof google.container.v1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.maximum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ResourceLimit instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceLimit - * @static - * @param {google.container.v1.IResourceLimit=} [properties] Properties to set - * @returns {google.container.v1.ResourceLimit} ResourceLimit instance - */ - ResourceLimit.create = function create(properties) { - return new ResourceLimit(properties); - }; - - /** - * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceLimit - * @static - * @param {google.container.v1.IResourceLimit} message ResourceLimit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLimit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); - if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.minimum); - if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maximum); - return writer; - }; - - /** - * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1.ResourceLimit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceLimit - * @static - * @param {google.container.v1.IResourceLimit} message ResourceLimit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLimit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceLimit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceLimit} ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLimit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceLimit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.string(); - break; - } - case 2: { - message.minimum = reader.int64(); - break; - } - case 3: { - message.maximum = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceLimit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceLimit} ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLimit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceLimit message. - * @function verify - * @memberof google.container.v1.ResourceLimit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceLimit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.minimum != null && message.hasOwnProperty("minimum")) - if (!$util.isInteger(message.minimum) && !(message.minimum && $util.isInteger(message.minimum.low) && $util.isInteger(message.minimum.high))) - return "minimum: integer|Long expected"; - if (message.maximum != null && message.hasOwnProperty("maximum")) - if (!$util.isInteger(message.maximum) && !(message.maximum && $util.isInteger(message.maximum.low) && $util.isInteger(message.maximum.high))) - return "maximum: integer|Long expected"; - return null; - }; - - /** - * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceLimit - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceLimit} ResourceLimit - */ - ResourceLimit.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceLimit) - return object; - var message = new $root.google.container.v1.ResourceLimit(); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.minimum != null) - if ($util.Long) - (message.minimum = $util.Long.fromValue(object.minimum)).unsigned = false; - else if (typeof object.minimum === "string") - message.minimum = parseInt(object.minimum, 10); - else if (typeof object.minimum === "number") - message.minimum = object.minimum; - else if (typeof object.minimum === "object") - message.minimum = new $util.LongBits(object.minimum.low >>> 0, object.minimum.high >>> 0).toNumber(); - if (object.maximum != null) - if ($util.Long) - (message.maximum = $util.Long.fromValue(object.maximum)).unsigned = false; - else if (typeof object.maximum === "string") - message.maximum = parseInt(object.maximum, 10); - else if (typeof object.maximum === "number") - message.maximum = object.maximum; - else if (typeof object.maximum === "object") - message.maximum = new $util.LongBits(object.maximum.low >>> 0, object.maximum.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceLimit - * @static - * @param {google.container.v1.ResourceLimit} message ResourceLimit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceLimit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minimum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minimum = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maximum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maximum = options.longs === String ? "0" : 0; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.minimum != null && message.hasOwnProperty("minimum")) - if (typeof message.minimum === "number") - object.minimum = options.longs === String ? String(message.minimum) : message.minimum; - else - object.minimum = options.longs === String ? $util.Long.prototype.toString.call(message.minimum) : options.longs === Number ? new $util.LongBits(message.minimum.low >>> 0, message.minimum.high >>> 0).toNumber() : message.minimum; - if (message.maximum != null && message.hasOwnProperty("maximum")) - if (typeof message.maximum === "number") - object.maximum = options.longs === String ? String(message.maximum) : message.maximum; - else - object.maximum = options.longs === String ? $util.Long.prototype.toString.call(message.maximum) : options.longs === Number ? new $util.LongBits(message.maximum.low >>> 0, message.maximum.high >>> 0).toNumber() : message.maximum; - return object; - }; - - /** - * Converts this ResourceLimit to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceLimit - * @instance - * @returns {Object.} JSON object - */ - ResourceLimit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceLimit - * @function getTypeUrl - * @memberof google.container.v1.ResourceLimit - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceLimit"; - }; - - return ResourceLimit; - })(); - - v1.NodePoolAutoscaling = (function() { - - /** - * Properties of a NodePoolAutoscaling. - * @memberof google.container.v1 - * @interface INodePoolAutoscaling - * @property {boolean|null} [enabled] NodePoolAutoscaling enabled - * @property {number|null} [minNodeCount] NodePoolAutoscaling minNodeCount - * @property {number|null} [maxNodeCount] NodePoolAutoscaling maxNodeCount - * @property {boolean|null} [autoprovisioned] NodePoolAutoscaling autoprovisioned - * @property {google.container.v1.NodePoolAutoscaling.LocationPolicy|null} [locationPolicy] NodePoolAutoscaling locationPolicy - * @property {number|null} [totalMinNodeCount] NodePoolAutoscaling totalMinNodeCount - * @property {number|null} [totalMaxNodeCount] NodePoolAutoscaling totalMaxNodeCount - */ - - /** - * Constructs a new NodePoolAutoscaling. - * @memberof google.container.v1 - * @classdesc Represents a NodePoolAutoscaling. - * @implements INodePoolAutoscaling - * @constructor - * @param {google.container.v1.INodePoolAutoscaling=} [properties] Properties to set - */ - function NodePoolAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolAutoscaling enabled. - * @member {boolean} enabled - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.enabled = false; - - /** - * NodePoolAutoscaling minNodeCount. - * @member {number} minNodeCount - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.minNodeCount = 0; - - /** - * NodePoolAutoscaling maxNodeCount. - * @member {number} maxNodeCount - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.maxNodeCount = 0; - - /** - * NodePoolAutoscaling autoprovisioned. - * @member {boolean} autoprovisioned - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.autoprovisioned = false; - - /** - * NodePoolAutoscaling locationPolicy. - * @member {google.container.v1.NodePoolAutoscaling.LocationPolicy} locationPolicy - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.locationPolicy = 0; - - /** - * NodePoolAutoscaling totalMinNodeCount. - * @member {number} totalMinNodeCount - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.totalMinNodeCount = 0; - - /** - * NodePoolAutoscaling totalMaxNodeCount. - * @member {number} totalMaxNodeCount - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.totalMaxNodeCount = 0; - - /** - * Creates a new NodePoolAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {google.container.v1.INodePoolAutoscaling=} [properties] Properties to set - * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling instance - */ - NodePoolAutoscaling.create = function create(properties) { - return new NodePoolAutoscaling(properties); - }; - - /** - * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {google.container.v1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minNodeCount); - if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); - if (message.autoprovisioned != null && Object.hasOwnProperty.call(message, "autoprovisioned")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autoprovisioned); - if (message.locationPolicy != null && Object.hasOwnProperty.call(message, "locationPolicy")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.locationPolicy); - if (message.totalMinNodeCount != null && Object.hasOwnProperty.call(message, "totalMinNodeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalMinNodeCount); - if (message.totalMaxNodeCount != null && Object.hasOwnProperty.call(message, "totalMaxNodeCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.totalMaxNodeCount); - return writer; - }; - - /** - * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {google.container.v1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.minNodeCount = reader.int32(); - break; - } - case 3: { - message.maxNodeCount = reader.int32(); - break; - } - case 4: { - message.autoprovisioned = reader.bool(); - break; - } - case 5: { - message.locationPolicy = reader.int32(); - break; - } - case 6: { - message.totalMinNodeCount = reader.int32(); - break; - } - case 7: { - message.totalMaxNodeCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolAutoscaling message. - * @function verify - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean 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.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) - if (typeof message.autoprovisioned !== "boolean") - return "autoprovisioned: boolean expected"; - if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) - switch (message.locationPolicy) { - default: - return "locationPolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) - if (!$util.isInteger(message.totalMinNodeCount)) - return "totalMinNodeCount: integer expected"; - if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) - if (!$util.isInteger(message.totalMaxNodeCount)) - return "totalMaxNodeCount: integer expected"; - return null; - }; - - /** - * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolAutoscaling} NodePoolAutoscaling - */ - NodePoolAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolAutoscaling) - return object; - var message = new $root.google.container.v1.NodePoolAutoscaling(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.minNodeCount != null) - message.minNodeCount = object.minNodeCount | 0; - if (object.maxNodeCount != null) - message.maxNodeCount = object.maxNodeCount | 0; - if (object.autoprovisioned != null) - message.autoprovisioned = Boolean(object.autoprovisioned); - switch (object.locationPolicy) { - default: - if (typeof object.locationPolicy === "number") { - message.locationPolicy = object.locationPolicy; - break; - } - break; - case "LOCATION_POLICY_UNSPECIFIED": - case 0: - message.locationPolicy = 0; - break; - case "BALANCED": - case 1: - message.locationPolicy = 1; - break; - case "ANY": - case 2: - message.locationPolicy = 2; - break; - } - if (object.totalMinNodeCount != null) - message.totalMinNodeCount = object.totalMinNodeCount | 0; - if (object.totalMaxNodeCount != null) - message.totalMaxNodeCount = object.totalMaxNodeCount | 0; - return message; - }; - - /** - * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {google.container.v1.NodePoolAutoscaling} message NodePoolAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.minNodeCount = 0; - object.maxNodeCount = 0; - object.autoprovisioned = false; - object.locationPolicy = options.enums === String ? "LOCATION_POLICY_UNSPECIFIED" : 0; - object.totalMinNodeCount = 0; - object.totalMaxNodeCount = 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - object.minNodeCount = message.minNodeCount; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - object.maxNodeCount = message.maxNodeCount; - if (message.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) - object.autoprovisioned = message.autoprovisioned; - if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) - object.locationPolicy = options.enums === String ? $root.google.container.v1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] === undefined ? message.locationPolicy : $root.google.container.v1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] : message.locationPolicy; - if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) - object.totalMinNodeCount = message.totalMinNodeCount; - if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) - object.totalMaxNodeCount = message.totalMaxNodeCount; - return object; - }; - - /** - * Converts this NodePoolAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1.NodePoolAutoscaling - * @instance - * @returns {Object.} JSON object - */ - NodePoolAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolAutoscaling - * @function getTypeUrl - * @memberof google.container.v1.NodePoolAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePoolAutoscaling"; - }; - - /** - * LocationPolicy enum. - * @name google.container.v1.NodePoolAutoscaling.LocationPolicy - * @enum {number} - * @property {number} LOCATION_POLICY_UNSPECIFIED=0 LOCATION_POLICY_UNSPECIFIED value - * @property {number} BALANCED=1 BALANCED value - * @property {number} ANY=2 ANY value - */ - NodePoolAutoscaling.LocationPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCATION_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "BALANCED"] = 1; - values[valuesById[2] = "ANY"] = 2; - return values; - })(); - - return NodePoolAutoscaling; - })(); - - v1.SetLabelsRequest = (function() { - - /** - * Properties of a SetLabelsRequest. - * @memberof google.container.v1 - * @interface ISetLabelsRequest - * @property {string|null} [projectId] SetLabelsRequest projectId - * @property {string|null} [zone] SetLabelsRequest zone - * @property {string|null} [clusterId] SetLabelsRequest clusterId - * @property {Object.|null} [resourceLabels] SetLabelsRequest resourceLabels - * @property {string|null} [labelFingerprint] SetLabelsRequest labelFingerprint - * @property {string|null} [name] SetLabelsRequest name - */ - - /** - * Constructs a new SetLabelsRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetLabelsRequest. - * @implements ISetLabelsRequest - * @constructor - * @param {google.container.v1.ISetLabelsRequest=} [properties] Properties to set - */ - function SetLabelsRequest(properties) { - this.resourceLabels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLabelsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.projectId = ""; - - /** - * SetLabelsRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.zone = ""; - - /** - * SetLabelsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.clusterId = ""; - - /** - * SetLabelsRequest resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.resourceLabels = $util.emptyObject; - - /** - * SetLabelsRequest labelFingerprint. - * @member {string} labelFingerprint - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.labelFingerprint = ""; - - /** - * SetLabelsRequest name. - * @member {string} name - * @memberof google.container.v1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.name = ""; - - /** - * Creates a new SetLabelsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {google.container.v1.ISetLabelsRequest=} [properties] Properties to set - * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest instance - */ - SetLabelsRequest.create = function create(properties) { - return new SetLabelsRequest(properties); - }; - - /** - * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {google.container.v1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLabelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), 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.resourceLabels[keys[i]]).ldelim(); - if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.labelFingerprint); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLabelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {google.container.v1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLabelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLabelsRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 5: { - message.labelFingerprint = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLabelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLabelsRequest message. - * @function verify - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLabelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - if (!$util.isString(message.labelFingerprint)) - return "labelFingerprint: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetLabelsRequest} SetLabelsRequest - */ - SetLabelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetLabelsRequest) - return object; - var message = new $root.google.container.v1.SetLabelsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1.SetLabelsRequest.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.labelFingerprint != null) - message.labelFingerprint = String(object.labelFingerprint); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {google.container.v1.SetLabelsRequest} message SetLabelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLabelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceLabels = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.labelFingerprint = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - var keys2; - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - object.labelFingerprint = message.labelFingerprint; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLabelsRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetLabelsRequest - * @instance - * @returns {Object.} JSON object - */ - SetLabelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLabelsRequest - * @function getTypeUrl - * @memberof google.container.v1.SetLabelsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetLabelsRequest"; - }; - - return SetLabelsRequest; - })(); - - v1.SetLegacyAbacRequest = (function() { - - /** - * Properties of a SetLegacyAbacRequest. - * @memberof google.container.v1 - * @interface ISetLegacyAbacRequest - * @property {string|null} [projectId] SetLegacyAbacRequest projectId - * @property {string|null} [zone] SetLegacyAbacRequest zone - * @property {string|null} [clusterId] SetLegacyAbacRequest clusterId - * @property {boolean|null} [enabled] SetLegacyAbacRequest enabled - * @property {string|null} [name] SetLegacyAbacRequest name - */ - - /** - * Constructs a new SetLegacyAbacRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetLegacyAbacRequest. - * @implements ISetLegacyAbacRequest - * @constructor - * @param {google.container.v1.ISetLegacyAbacRequest=} [properties] Properties to set - */ - function SetLegacyAbacRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLegacyAbacRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.projectId = ""; - - /** - * SetLegacyAbacRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.zone = ""; - - /** - * SetLegacyAbacRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.clusterId = ""; - - /** - * SetLegacyAbacRequest enabled. - * @member {boolean} enabled - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.enabled = false; - - /** - * SetLegacyAbacRequest name. - * @member {string} name - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.name = ""; - - /** - * Creates a new SetLegacyAbacRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {google.container.v1.ISetLegacyAbacRequest=} [properties] Properties to set - * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest instance - */ - SetLegacyAbacRequest.create = function create(properties) { - return new SetLegacyAbacRequest(properties); - }; - - /** - * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {google.container.v1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLegacyAbacRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1.SetLegacyAbacRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {google.container.v1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLegacyAbacRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLegacyAbacRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetLegacyAbacRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.enabled = reader.bool(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLegacyAbacRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLegacyAbacRequest message. - * @function verify - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLegacyAbacRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetLegacyAbacRequest} SetLegacyAbacRequest - */ - SetLegacyAbacRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetLegacyAbacRequest) - return object; - var message = new $root.google.container.v1.SetLegacyAbacRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {google.container.v1.SetLegacyAbacRequest} message SetLegacyAbacRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLegacyAbacRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.enabled = false; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLegacyAbacRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetLegacyAbacRequest - * @instance - * @returns {Object.} JSON object - */ - SetLegacyAbacRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLegacyAbacRequest - * @function getTypeUrl - * @memberof google.container.v1.SetLegacyAbacRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLegacyAbacRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetLegacyAbacRequest"; - }; - - return SetLegacyAbacRequest; - })(); - - v1.StartIPRotationRequest = (function() { - - /** - * Properties of a StartIPRotationRequest. - * @memberof google.container.v1 - * @interface IStartIPRotationRequest - * @property {string|null} [projectId] StartIPRotationRequest projectId - * @property {string|null} [zone] StartIPRotationRequest zone - * @property {string|null} [clusterId] StartIPRotationRequest clusterId - * @property {string|null} [name] StartIPRotationRequest name - * @property {boolean|null} [rotateCredentials] StartIPRotationRequest rotateCredentials - */ - - /** - * Constructs a new StartIPRotationRequest. - * @memberof google.container.v1 - * @classdesc Represents a StartIPRotationRequest. - * @implements IStartIPRotationRequest - * @constructor - * @param {google.container.v1.IStartIPRotationRequest=} [properties] Properties to set - */ - function StartIPRotationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StartIPRotationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.projectId = ""; - - /** - * StartIPRotationRequest zone. - * @member {string} zone - * @memberof google.container.v1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.zone = ""; - - /** - * StartIPRotationRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.clusterId = ""; - - /** - * StartIPRotationRequest name. - * @member {string} name - * @memberof google.container.v1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.name = ""; - - /** - * StartIPRotationRequest rotateCredentials. - * @member {boolean} rotateCredentials - * @memberof google.container.v1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.rotateCredentials = false; - - /** - * Creates a new StartIPRotationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {google.container.v1.IStartIPRotationRequest=} [properties] Properties to set - * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest instance - */ - StartIPRotationRequest.create = function create(properties) { - return new StartIPRotationRequest(properties); - }; - - /** - * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {google.container.v1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartIPRotationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.rotateCredentials != null && Object.hasOwnProperty.call(message, "rotateCredentials")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.rotateCredentials); - return writer; - }; - - /** - * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.StartIPRotationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {google.container.v1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartIPRotationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StartIPRotationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - message.rotateCredentials = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartIPRotationRequest message. - * @function verify - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartIPRotationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) - if (typeof message.rotateCredentials !== "boolean") - return "rotateCredentials: boolean expected"; - return null; - }; - - /** - * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.StartIPRotationRequest} StartIPRotationRequest - */ - StartIPRotationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.StartIPRotationRequest) - return object; - var message = new $root.google.container.v1.StartIPRotationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - if (object.rotateCredentials != null) - message.rotateCredentials = Boolean(object.rotateCredentials); - return message; - }; - - /** - * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {google.container.v1.StartIPRotationRequest} message StartIPRotationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartIPRotationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - object.rotateCredentials = false; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) - object.rotateCredentials = message.rotateCredentials; - return object; - }; - - /** - * Converts this StartIPRotationRequest to JSON. - * @function toJSON - * @memberof google.container.v1.StartIPRotationRequest - * @instance - * @returns {Object.} JSON object - */ - StartIPRotationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartIPRotationRequest - * @function getTypeUrl - * @memberof google.container.v1.StartIPRotationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.StartIPRotationRequest"; - }; - - return StartIPRotationRequest; - })(); - - v1.CompleteIPRotationRequest = (function() { - - /** - * Properties of a CompleteIPRotationRequest. - * @memberof google.container.v1 - * @interface ICompleteIPRotationRequest - * @property {string|null} [projectId] CompleteIPRotationRequest projectId - * @property {string|null} [zone] CompleteIPRotationRequest zone - * @property {string|null} [clusterId] CompleteIPRotationRequest clusterId - * @property {string|null} [name] CompleteIPRotationRequest name - */ - - /** - * Constructs a new CompleteIPRotationRequest. - * @memberof google.container.v1 - * @classdesc Represents a CompleteIPRotationRequest. - * @implements ICompleteIPRotationRequest - * @constructor - * @param {google.container.v1.ICompleteIPRotationRequest=} [properties] Properties to set - */ - function CompleteIPRotationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteIPRotationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.projectId = ""; - - /** - * CompleteIPRotationRequest zone. - * @member {string} zone - * @memberof google.container.v1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.zone = ""; - - /** - * CompleteIPRotationRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.clusterId = ""; - - /** - * CompleteIPRotationRequest name. - * @member {string} name - * @memberof google.container.v1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.name = ""; - - /** - * Creates a new CompleteIPRotationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {google.container.v1.ICompleteIPRotationRequest=} [properties] Properties to set - * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest instance - */ - CompleteIPRotationRequest.create = function create(properties) { - return new CompleteIPRotationRequest(properties); - }; - - /** - * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {google.container.v1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteIPRotationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1.CompleteIPRotationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {google.container.v1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteIPRotationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompleteIPRotationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteIPRotationRequest message. - * @function verify - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteIPRotationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CompleteIPRotationRequest} CompleteIPRotationRequest - */ - CompleteIPRotationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CompleteIPRotationRequest) - return object; - var message = new $root.google.container.v1.CompleteIPRotationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {google.container.v1.CompleteIPRotationRequest} message CompleteIPRotationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteIPRotationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CompleteIPRotationRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CompleteIPRotationRequest - * @instance - * @returns {Object.} JSON object - */ - CompleteIPRotationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteIPRotationRequest - * @function getTypeUrl - * @memberof google.container.v1.CompleteIPRotationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CompleteIPRotationRequest"; - }; - - return CompleteIPRotationRequest; - })(); - - v1.AcceleratorConfig = (function() { - - /** - * Properties of an AcceleratorConfig. - * @memberof google.container.v1 - * @interface IAcceleratorConfig - * @property {number|Long|null} [acceleratorCount] AcceleratorConfig acceleratorCount - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {string|null} [gpuPartitionSize] AcceleratorConfig gpuPartitionSize - * @property {google.container.v1.IGPUSharingConfig|null} [gpuSharingConfig] AcceleratorConfig gpuSharingConfig - * @property {google.container.v1.IGPUDriverInstallationConfig|null} [gpuDriverInstallationConfig] AcceleratorConfig gpuDriverInstallationConfig - */ - - /** - * Constructs a new AcceleratorConfig. - * @memberof google.container.v1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig - * @constructor - * @param {google.container.v1.IAcceleratorConfig=} [properties] Properties to set - */ - function AcceleratorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcceleratorConfig acceleratorCount. - * @member {number|Long} acceleratorCount - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AcceleratorConfig acceleratorType. - * @member {string} acceleratorType - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorType = ""; - - /** - * AcceleratorConfig gpuPartitionSize. - * @member {string} gpuPartitionSize - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuPartitionSize = ""; - - /** - * AcceleratorConfig gpuSharingConfig. - * @member {google.container.v1.IGPUSharingConfig|null|undefined} gpuSharingConfig - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuSharingConfig = null; - - /** - * AcceleratorConfig gpuDriverInstallationConfig. - * @member {google.container.v1.IGPUDriverInstallationConfig|null|undefined} gpuDriverInstallationConfig - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuDriverInstallationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AcceleratorConfig _gpuSharingConfig. - * @member {"gpuSharingConfig"|undefined} _gpuSharingConfig - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_gpuSharingConfig", { - get: $util.oneOfGetter($oneOfFields = ["gpuSharingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _gpuDriverInstallationConfig. - * @member {"gpuDriverInstallationConfig"|undefined} _gpuDriverInstallationConfig - * @memberof google.container.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_gpuDriverInstallationConfig", { - get: $util.oneOfGetter($oneOfFields = ["gpuDriverInstallationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {google.container.v1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {google.container.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.acceleratorCount); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.acceleratorType); - if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gpuPartitionSize); - if (message.gpuSharingConfig != null && Object.hasOwnProperty.call(message, "gpuSharingConfig")) - $root.google.container.v1.GPUSharingConfig.encode(message.gpuSharingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.gpuDriverInstallationConfig != null && Object.hasOwnProperty.call(message, "gpuDriverInstallationConfig")) - $root.google.container.v1.GPUDriverInstallationConfig.encode(message.gpuDriverInstallationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1.AcceleratorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {google.container.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AcceleratorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceleratorCount = reader.int64(); - break; - } - case 2: { - message.acceleratorType = reader.string(); - break; - } - case 3: { - message.gpuPartitionSize = reader.string(); - break; - } - case 5: { - message.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcceleratorConfig message. - * @function verify - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcceleratorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) - if (!$util.isInteger(message.acceleratorCount) && !(message.acceleratorCount && $util.isInteger(message.acceleratorCount.low) && $util.isInteger(message.acceleratorCount.high))) - return "acceleratorCount: integer|Long expected"; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) - if (!$util.isString(message.gpuPartitionSize)) - return "gpuPartitionSize: string expected"; - if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { - properties._gpuSharingConfig = 1; - { - var error = $root.google.container.v1.GPUSharingConfig.verify(message.gpuSharingConfig); - if (error) - return "gpuSharingConfig." + error; - } - } - if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { - properties._gpuDriverInstallationConfig = 1; - { - var error = $root.google.container.v1.GPUDriverInstallationConfig.verify(message.gpuDriverInstallationConfig); - if (error) - return "gpuDriverInstallationConfig." + error; - } - } - return null; - }; - - /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AcceleratorConfig} AcceleratorConfig - */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AcceleratorConfig) - return object; - var message = new $root.google.container.v1.AcceleratorConfig(); - if (object.acceleratorCount != null) - if ($util.Long) - (message.acceleratorCount = $util.Long.fromValue(object.acceleratorCount)).unsigned = false; - else if (typeof object.acceleratorCount === "string") - message.acceleratorCount = parseInt(object.acceleratorCount, 10); - else if (typeof object.acceleratorCount === "number") - message.acceleratorCount = object.acceleratorCount; - else if (typeof object.acceleratorCount === "object") - message.acceleratorCount = new $util.LongBits(object.acceleratorCount.low >>> 0, object.acceleratorCount.high >>> 0).toNumber(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.gpuPartitionSize != null) - message.gpuPartitionSize = String(object.gpuPartitionSize); - if (object.gpuSharingConfig != null) { - if (typeof object.gpuSharingConfig !== "object") - throw TypeError(".google.container.v1.AcceleratorConfig.gpuSharingConfig: object expected"); - message.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.fromObject(object.gpuSharingConfig); - } - if (object.gpuDriverInstallationConfig != null) { - if (typeof object.gpuDriverInstallationConfig !== "object") - throw TypeError(".google.container.v1.AcceleratorConfig.gpuDriverInstallationConfig: object expected"); - message.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.fromObject(object.gpuDriverInstallationConfig); - } - return message; - }; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {google.container.v1.AcceleratorConfig} message AcceleratorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcceleratorConfig.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.acceleratorCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.acceleratorCount = options.longs === String ? "0" : 0; - object.acceleratorType = ""; - object.gpuPartitionSize = ""; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) - if (typeof message.acceleratorCount === "number") - object.acceleratorCount = options.longs === String ? String(message.acceleratorCount) : message.acceleratorCount; - else - object.acceleratorCount = options.longs === String ? $util.Long.prototype.toString.call(message.acceleratorCount) : options.longs === Number ? new $util.LongBits(message.acceleratorCount.low >>> 0, message.acceleratorCount.high >>> 0).toNumber() : message.acceleratorCount; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) - object.acceleratorType = message.acceleratorType; - if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) - object.gpuPartitionSize = message.gpuPartitionSize; - if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { - object.gpuSharingConfig = $root.google.container.v1.GPUSharingConfig.toObject(message.gpuSharingConfig, options); - if (options.oneofs) - object._gpuSharingConfig = "gpuSharingConfig"; - } - if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { - object.gpuDriverInstallationConfig = $root.google.container.v1.GPUDriverInstallationConfig.toObject(message.gpuDriverInstallationConfig, options); - if (options.oneofs) - object._gpuDriverInstallationConfig = "gpuDriverInstallationConfig"; - } - return object; - }; - - /** - * Converts this AcceleratorConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AcceleratorConfig - * @instance - * @returns {Object.} JSON object - */ - AcceleratorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcceleratorConfig - * @function getTypeUrl - * @memberof google.container.v1.AcceleratorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AcceleratorConfig"; - }; - - return AcceleratorConfig; - })(); - - v1.GPUSharingConfig = (function() { - - /** - * Properties of a GPUSharingConfig. - * @memberof google.container.v1 - * @interface IGPUSharingConfig - * @property {number|Long|null} [maxSharedClientsPerGpu] GPUSharingConfig maxSharedClientsPerGpu - * @property {google.container.v1.GPUSharingConfig.GPUSharingStrategy|null} [gpuSharingStrategy] GPUSharingConfig gpuSharingStrategy - */ - - /** - * Constructs a new GPUSharingConfig. - * @memberof google.container.v1 - * @classdesc Represents a GPUSharingConfig. - * @implements IGPUSharingConfig - * @constructor - * @param {google.container.v1.IGPUSharingConfig=} [properties] Properties to set - */ - function GPUSharingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GPUSharingConfig maxSharedClientsPerGpu. - * @member {number|Long} maxSharedClientsPerGpu - * @memberof google.container.v1.GPUSharingConfig - * @instance - */ - GPUSharingConfig.prototype.maxSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * GPUSharingConfig gpuSharingStrategy. - * @member {google.container.v1.GPUSharingConfig.GPUSharingStrategy|null|undefined} gpuSharingStrategy - * @memberof google.container.v1.GPUSharingConfig - * @instance - */ - GPUSharingConfig.prototype.gpuSharingStrategy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GPUSharingConfig _gpuSharingStrategy. - * @member {"gpuSharingStrategy"|undefined} _gpuSharingStrategy - * @memberof google.container.v1.GPUSharingConfig - * @instance - */ - Object.defineProperty(GPUSharingConfig.prototype, "_gpuSharingStrategy", { - get: $util.oneOfGetter($oneOfFields = ["gpuSharingStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GPUSharingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {google.container.v1.IGPUSharingConfig=} [properties] Properties to set - * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig instance - */ - GPUSharingConfig.create = function create(properties) { - return new GPUSharingConfig(properties); - }; - - /** - * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {google.container.v1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUSharingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxSharedClientsPerGpu")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxSharedClientsPerGpu); - if (message.gpuSharingStrategy != null && Object.hasOwnProperty.call(message, "gpuSharingStrategy")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gpuSharingStrategy); - return writer; - }; - - /** - * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUSharingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {google.container.v1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUSharingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUSharingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GPUSharingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxSharedClientsPerGpu = reader.int64(); - break; - } - case 2: { - message.gpuSharingStrategy = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUSharingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GPUSharingConfig message. - * @function verify - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GPUSharingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) - if (!$util.isInteger(message.maxSharedClientsPerGpu) && !(message.maxSharedClientsPerGpu && $util.isInteger(message.maxSharedClientsPerGpu.low) && $util.isInteger(message.maxSharedClientsPerGpu.high))) - return "maxSharedClientsPerGpu: integer|Long expected"; - if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { - properties._gpuSharingStrategy = 1; - switch (message.gpuSharingStrategy) { - default: - return "gpuSharingStrategy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GPUSharingConfig} GPUSharingConfig - */ - GPUSharingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GPUSharingConfig) - return object; - var message = new $root.google.container.v1.GPUSharingConfig(); - if (object.maxSharedClientsPerGpu != null) - if ($util.Long) - (message.maxSharedClientsPerGpu = $util.Long.fromValue(object.maxSharedClientsPerGpu)).unsigned = false; - else if (typeof object.maxSharedClientsPerGpu === "string") - message.maxSharedClientsPerGpu = parseInt(object.maxSharedClientsPerGpu, 10); - else if (typeof object.maxSharedClientsPerGpu === "number") - message.maxSharedClientsPerGpu = object.maxSharedClientsPerGpu; - else if (typeof object.maxSharedClientsPerGpu === "object") - message.maxSharedClientsPerGpu = new $util.LongBits(object.maxSharedClientsPerGpu.low >>> 0, object.maxSharedClientsPerGpu.high >>> 0).toNumber(); - switch (object.gpuSharingStrategy) { - default: - if (typeof object.gpuSharingStrategy === "number") { - message.gpuSharingStrategy = object.gpuSharingStrategy; - break; - } - break; - case "GPU_SHARING_STRATEGY_UNSPECIFIED": - case 0: - message.gpuSharingStrategy = 0; - break; - case "TIME_SHARING": - case 1: - message.gpuSharingStrategy = 1; - break; - case "MPS": - case 2: - message.gpuSharingStrategy = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {google.container.v1.GPUSharingConfig} message GPUSharingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GPUSharingConfig.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.maxSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxSharedClientsPerGpu = options.longs === String ? "0" : 0; - if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) - if (typeof message.maxSharedClientsPerGpu === "number") - object.maxSharedClientsPerGpu = options.longs === String ? String(message.maxSharedClientsPerGpu) : message.maxSharedClientsPerGpu; - else - object.maxSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxSharedClientsPerGpu.low >>> 0, message.maxSharedClientsPerGpu.high >>> 0).toNumber() : message.maxSharedClientsPerGpu; - if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { - object.gpuSharingStrategy = options.enums === String ? $root.google.container.v1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] === undefined ? message.gpuSharingStrategy : $root.google.container.v1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] : message.gpuSharingStrategy; - if (options.oneofs) - object._gpuSharingStrategy = "gpuSharingStrategy"; - } - return object; - }; - - /** - * Converts this GPUSharingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GPUSharingConfig - * @instance - * @returns {Object.} JSON object - */ - GPUSharingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GPUSharingConfig - * @function getTypeUrl - * @memberof google.container.v1.GPUSharingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GPUSharingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GPUSharingConfig"; - }; - - /** - * GPUSharingStrategy enum. - * @name google.container.v1.GPUSharingConfig.GPUSharingStrategy - * @enum {number} - * @property {number} GPU_SHARING_STRATEGY_UNSPECIFIED=0 GPU_SHARING_STRATEGY_UNSPECIFIED value - * @property {number} TIME_SHARING=1 TIME_SHARING value - * @property {number} MPS=2 MPS value - */ - GPUSharingConfig.GPUSharingStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GPU_SHARING_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIME_SHARING"] = 1; - values[valuesById[2] = "MPS"] = 2; - return values; - })(); - - return GPUSharingConfig; - })(); - - v1.GPUDriverInstallationConfig = (function() { - - /** - * Properties of a GPUDriverInstallationConfig. - * @memberof google.container.v1 - * @interface IGPUDriverInstallationConfig - * @property {google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null} [gpuDriverVersion] GPUDriverInstallationConfig gpuDriverVersion - */ - - /** - * Constructs a new GPUDriverInstallationConfig. - * @memberof google.container.v1 - * @classdesc Represents a GPUDriverInstallationConfig. - * @implements IGPUDriverInstallationConfig - * @constructor - * @param {google.container.v1.IGPUDriverInstallationConfig=} [properties] Properties to set - */ - function GPUDriverInstallationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GPUDriverInstallationConfig gpuDriverVersion. - * @member {google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion|null|undefined} gpuDriverVersion - * @memberof google.container.v1.GPUDriverInstallationConfig - * @instance - */ - GPUDriverInstallationConfig.prototype.gpuDriverVersion = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GPUDriverInstallationConfig _gpuDriverVersion. - * @member {"gpuDriverVersion"|undefined} _gpuDriverVersion - * @memberof google.container.v1.GPUDriverInstallationConfig - * @instance - */ - Object.defineProperty(GPUDriverInstallationConfig.prototype, "_gpuDriverVersion", { - get: $util.oneOfGetter($oneOfFields = ["gpuDriverVersion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GPUDriverInstallationConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1.IGPUDriverInstallationConfig=} [properties] Properties to set - * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig instance - */ - GPUDriverInstallationConfig.create = function create(properties) { - return new GPUDriverInstallationConfig(properties); - }; - - /** - * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUDriverInstallationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gpuDriverVersion != null && Object.hasOwnProperty.call(message, "gpuDriverVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gpuDriverVersion); - return writer; - }; - - /** - * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1.GPUDriverInstallationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUDriverInstallationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUDriverInstallationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GPUDriverInstallationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gpuDriverVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUDriverInstallationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GPUDriverInstallationConfig message. - * @function verify - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GPUDriverInstallationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { - properties._gpuDriverVersion = 1; - switch (message.gpuDriverVersion) { - default: - return "gpuDriverVersion: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - */ - GPUDriverInstallationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GPUDriverInstallationConfig) - return object; - var message = new $root.google.container.v1.GPUDriverInstallationConfig(); - switch (object.gpuDriverVersion) { - default: - if (typeof object.gpuDriverVersion === "number") { - message.gpuDriverVersion = object.gpuDriverVersion; - break; - } - break; - case "GPU_DRIVER_VERSION_UNSPECIFIED": - case 0: - message.gpuDriverVersion = 0; - break; - case "INSTALLATION_DISABLED": - case 1: - message.gpuDriverVersion = 1; - break; - case "DEFAULT": - case 2: - message.gpuDriverVersion = 2; - break; - case "LATEST": - case 3: - message.gpuDriverVersion = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1.GPUDriverInstallationConfig} message GPUDriverInstallationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GPUDriverInstallationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { - object.gpuDriverVersion = options.enums === String ? $root.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] === undefined ? message.gpuDriverVersion : $root.google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] : message.gpuDriverVersion; - if (options.oneofs) - object._gpuDriverVersion = "gpuDriverVersion"; - } - return object; - }; - - /** - * Converts this GPUDriverInstallationConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GPUDriverInstallationConfig - * @instance - * @returns {Object.} JSON object - */ - GPUDriverInstallationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GPUDriverInstallationConfig - * @function getTypeUrl - * @memberof google.container.v1.GPUDriverInstallationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GPUDriverInstallationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GPUDriverInstallationConfig"; - }; - - /** - * GPUDriverVersion enum. - * @name google.container.v1.GPUDriverInstallationConfig.GPUDriverVersion - * @enum {number} - * @property {number} GPU_DRIVER_VERSION_UNSPECIFIED=0 GPU_DRIVER_VERSION_UNSPECIFIED value - * @property {number} INSTALLATION_DISABLED=1 INSTALLATION_DISABLED value - * @property {number} DEFAULT=2 DEFAULT value - * @property {number} LATEST=3 LATEST value - */ - GPUDriverInstallationConfig.GPUDriverVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GPU_DRIVER_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLATION_DISABLED"] = 1; - values[valuesById[2] = "DEFAULT"] = 2; - values[valuesById[3] = "LATEST"] = 3; - return values; - })(); - - return GPUDriverInstallationConfig; - })(); - - v1.WorkloadMetadataConfig = (function() { - - /** - * Properties of a WorkloadMetadataConfig. - * @memberof google.container.v1 - * @interface IWorkloadMetadataConfig - * @property {google.container.v1.WorkloadMetadataConfig.Mode|null} [mode] WorkloadMetadataConfig mode - */ - - /** - * Constructs a new WorkloadMetadataConfig. - * @memberof google.container.v1 - * @classdesc Represents a WorkloadMetadataConfig. - * @implements IWorkloadMetadataConfig - * @constructor - * @param {google.container.v1.IWorkloadMetadataConfig=} [properties] Properties to set - */ - function WorkloadMetadataConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadMetadataConfig mode. - * @member {google.container.v1.WorkloadMetadataConfig.Mode} mode - * @memberof google.container.v1.WorkloadMetadataConfig - * @instance - */ - WorkloadMetadataConfig.prototype.mode = 0; - - /** - * Creates a new WorkloadMetadataConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {google.container.v1.IWorkloadMetadataConfig=} [properties] Properties to set - * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig instance - */ - WorkloadMetadataConfig.create = function create(properties) { - return new WorkloadMetadataConfig(properties); - }; - - /** - * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {google.container.v1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadMetadataConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); - return writer; - }; - - /** - * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadMetadataConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {google.container.v1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadMetadataConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadMetadataConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadMetadataConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.mode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadMetadataConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadMetadataConfig message. - * @function verify - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadMetadataConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.WorkloadMetadataConfig} WorkloadMetadataConfig - */ - WorkloadMetadataConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.WorkloadMetadataConfig) - return object; - var message = new $root.google.container.v1.WorkloadMetadataConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "GCE_METADATA": - case 1: - message.mode = 1; - break; - case "GKE_METADATA": - case 2: - message.mode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {google.container.v1.WorkloadMetadataConfig} message WorkloadMetadataConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadMetadataConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.container.v1.WorkloadMetadataConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.WorkloadMetadataConfig.Mode[message.mode] : message.mode; - return object; - }; - - /** - * Converts this WorkloadMetadataConfig to JSON. - * @function toJSON - * @memberof google.container.v1.WorkloadMetadataConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadMetadataConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadMetadataConfig - * @function getTypeUrl - * @memberof google.container.v1.WorkloadMetadataConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadMetadataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.WorkloadMetadataConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1.WorkloadMetadataConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} GCE_METADATA=1 GCE_METADATA value - * @property {number} GKE_METADATA=2 GKE_METADATA value - */ - WorkloadMetadataConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCE_METADATA"] = 1; - values[valuesById[2] = "GKE_METADATA"] = 2; - return values; - })(); - - return WorkloadMetadataConfig; - })(); - - v1.SetNetworkPolicyRequest = (function() { - - /** - * Properties of a SetNetworkPolicyRequest. - * @memberof google.container.v1 - * @interface ISetNetworkPolicyRequest - * @property {string|null} [projectId] SetNetworkPolicyRequest projectId - * @property {string|null} [zone] SetNetworkPolicyRequest zone - * @property {string|null} [clusterId] SetNetworkPolicyRequest clusterId - * @property {google.container.v1.INetworkPolicy|null} [networkPolicy] SetNetworkPolicyRequest networkPolicy - * @property {string|null} [name] SetNetworkPolicyRequest name - */ - - /** - * Constructs a new SetNetworkPolicyRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetNetworkPolicyRequest. - * @implements ISetNetworkPolicyRequest - * @constructor - * @param {google.container.v1.ISetNetworkPolicyRequest=} [properties] Properties to set - */ - function SetNetworkPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNetworkPolicyRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.projectId = ""; - - /** - * SetNetworkPolicyRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.zone = ""; - - /** - * SetNetworkPolicyRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.clusterId = ""; - - /** - * SetNetworkPolicyRequest networkPolicy. - * @member {google.container.v1.INetworkPolicy|null|undefined} networkPolicy - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.networkPolicy = null; - - /** - * SetNetworkPolicyRequest name. - * @member {string} name - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.name = ""; - - /** - * Creates a new SetNetworkPolicyRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1.ISetNetworkPolicyRequest=} [properties] Properties to set - * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest instance - */ - SetNetworkPolicyRequest.create = function create(properties) { - return new SetNetworkPolicyRequest(properties); - }; - - /** - * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNetworkPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) - $root.google.container.v1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetNetworkPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNetworkPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNetworkPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetNetworkPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.networkPolicy = $root.google.container.v1.NetworkPolicy.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNetworkPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNetworkPolicyRequest message. - * @function verify - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNetworkPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { - var error = $root.google.container.v1.NetworkPolicy.verify(message.networkPolicy); - if (error) - return "networkPolicy." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - */ - SetNetworkPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetNetworkPolicyRequest) - return object; - var message = new $root.google.container.v1.SetNetworkPolicyRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.networkPolicy != null) { - if (typeof object.networkPolicy !== "object") - throw TypeError(".google.container.v1.SetNetworkPolicyRequest.networkPolicy: object expected"); - message.networkPolicy = $root.google.container.v1.NetworkPolicy.fromObject(object.networkPolicy); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1.SetNetworkPolicyRequest} message SetNetworkPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNetworkPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.networkPolicy = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) - object.networkPolicy = $root.google.container.v1.NetworkPolicy.toObject(message.networkPolicy, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNetworkPolicyRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetNetworkPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetNetworkPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNetworkPolicyRequest - * @function getTypeUrl - * @memberof google.container.v1.SetNetworkPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNetworkPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetNetworkPolicyRequest"; - }; - - return SetNetworkPolicyRequest; - })(); - - v1.SetMaintenancePolicyRequest = (function() { - - /** - * Properties of a SetMaintenancePolicyRequest. - * @memberof google.container.v1 - * @interface ISetMaintenancePolicyRequest - * @property {string|null} [projectId] SetMaintenancePolicyRequest projectId - * @property {string|null} [zone] SetMaintenancePolicyRequest zone - * @property {string|null} [clusterId] SetMaintenancePolicyRequest clusterId - * @property {google.container.v1.IMaintenancePolicy|null} [maintenancePolicy] SetMaintenancePolicyRequest maintenancePolicy - * @property {string|null} [name] SetMaintenancePolicyRequest name - */ - - /** - * Constructs a new SetMaintenancePolicyRequest. - * @memberof google.container.v1 - * @classdesc Represents a SetMaintenancePolicyRequest. - * @implements ISetMaintenancePolicyRequest - * @constructor - * @param {google.container.v1.ISetMaintenancePolicyRequest=} [properties] Properties to set - */ - function SetMaintenancePolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMaintenancePolicyRequest projectId. - * @member {string} projectId - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.projectId = ""; - - /** - * SetMaintenancePolicyRequest zone. - * @member {string} zone - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.zone = ""; - - /** - * SetMaintenancePolicyRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.clusterId = ""; - - /** - * SetMaintenancePolicyRequest maintenancePolicy. - * @member {google.container.v1.IMaintenancePolicy|null|undefined} maintenancePolicy - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.maintenancePolicy = null; - - /** - * SetMaintenancePolicyRequest name. - * @member {string} name - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.name = ""; - - /** - * Creates a new SetMaintenancePolicyRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1.ISetMaintenancePolicyRequest=} [properties] Properties to set - * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest instance - */ - SetMaintenancePolicyRequest.create = function create(properties) { - return new SetMaintenancePolicyRequest(properties); - }; - - /** - * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMaintenancePolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) - $root.google.container.v1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1.SetMaintenancePolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMaintenancePolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMaintenancePolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SetMaintenancePolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMaintenancePolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMaintenancePolicyRequest message. - * @function verify - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMaintenancePolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { - var error = $root.google.container.v1.MaintenancePolicy.verify(message.maintenancePolicy); - if (error) - return "maintenancePolicy." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - */ - SetMaintenancePolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SetMaintenancePolicyRequest) - return object; - var message = new $root.google.container.v1.SetMaintenancePolicyRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.maintenancePolicy != null) { - if (typeof object.maintenancePolicy !== "object") - throw TypeError(".google.container.v1.SetMaintenancePolicyRequest.maintenancePolicy: object expected"); - message.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.fromObject(object.maintenancePolicy); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1.SetMaintenancePolicyRequest} message SetMaintenancePolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMaintenancePolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.maintenancePolicy = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) - object.maintenancePolicy = $root.google.container.v1.MaintenancePolicy.toObject(message.maintenancePolicy, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMaintenancePolicyRequest to JSON. - * @function toJSON - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetMaintenancePolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMaintenancePolicyRequest - * @function getTypeUrl - * @memberof google.container.v1.SetMaintenancePolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMaintenancePolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SetMaintenancePolicyRequest"; - }; - - return SetMaintenancePolicyRequest; - })(); - - v1.StatusCondition = (function() { - - /** - * Properties of a StatusCondition. - * @memberof google.container.v1 - * @interface IStatusCondition - * @property {google.container.v1.StatusCondition.Code|null} [code] StatusCondition code - * @property {string|null} [message] StatusCondition message - * @property {google.rpc.Code|null} [canonicalCode] StatusCondition canonicalCode - */ - - /** - * Constructs a new StatusCondition. - * @memberof google.container.v1 - * @classdesc Represents a StatusCondition. - * @implements IStatusCondition - * @constructor - * @param {google.container.v1.IStatusCondition=} [properties] Properties to set - */ - function StatusCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatusCondition code. - * @member {google.container.v1.StatusCondition.Code} code - * @memberof google.container.v1.StatusCondition - * @instance - */ - StatusCondition.prototype.code = 0; - - /** - * StatusCondition message. - * @member {string} message - * @memberof google.container.v1.StatusCondition - * @instance - */ - StatusCondition.prototype.message = ""; - - /** - * StatusCondition canonicalCode. - * @member {google.rpc.Code} canonicalCode - * @memberof google.container.v1.StatusCondition - * @instance - */ - StatusCondition.prototype.canonicalCode = 0; - - /** - * Creates a new StatusCondition instance using the specified properties. - * @function create - * @memberof google.container.v1.StatusCondition - * @static - * @param {google.container.v1.IStatusCondition=} [properties] Properties to set - * @returns {google.container.v1.StatusCondition} StatusCondition instance - */ - StatusCondition.create = function create(properties) { - return new StatusCondition(properties); - }; - - /** - * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. - * @function encode - * @memberof google.container.v1.StatusCondition - * @static - * @param {google.container.v1.IStatusCondition} message StatusCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.canonicalCode != null && Object.hasOwnProperty.call(message, "canonicalCode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.canonicalCode); - return writer; - }; - - /** - * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1.StatusCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.StatusCondition - * @static - * @param {google.container.v1.IStatusCondition} message StatusCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatusCondition message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.StatusCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.StatusCondition} StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.StatusCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.canonicalCode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StatusCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.StatusCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.StatusCondition} StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatusCondition message. - * @function verify - * @memberof google.container.v1.StatusCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatusCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 7: - case 9: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) - switch (message.canonicalCode) { - default: - return "canonicalCode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 16: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - return null; - }; - - /** - * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.StatusCondition - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.StatusCondition} StatusCondition - */ - StatusCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.StatusCondition) - return object; - var message = new $root.google.container.v1.StatusCondition(); - switch (object.code) { - default: - if (typeof object.code === "number") { - message.code = object.code; - break; - } - break; - case "UNKNOWN": - case 0: - message.code = 0; - break; - case "GCE_STOCKOUT": - case 1: - message.code = 1; - break; - case "GKE_SERVICE_ACCOUNT_DELETED": - case 2: - message.code = 2; - break; - case "GCE_QUOTA_EXCEEDED": - case 3: - message.code = 3; - break; - case "SET_BY_OPERATOR": - case 4: - message.code = 4; - break; - case "CLOUD_KMS_KEY_ERROR": - case 7: - message.code = 7; - break; - case "CA_EXPIRING": - case 9: - message.code = 9; - break; - } - if (object.message != null) - message.message = String(object.message); - switch (object.canonicalCode) { - default: - if (typeof object.canonicalCode === "number") { - message.canonicalCode = object.canonicalCode; - break; - } - break; - case "OK": - case 0: - message.canonicalCode = 0; - break; - case "CANCELLED": - case 1: - message.canonicalCode = 1; - break; - case "UNKNOWN": - case 2: - message.canonicalCode = 2; - break; - case "INVALID_ARGUMENT": - case 3: - message.canonicalCode = 3; - break; - case "DEADLINE_EXCEEDED": - case 4: - message.canonicalCode = 4; - break; - case "NOT_FOUND": - case 5: - message.canonicalCode = 5; - break; - case "ALREADY_EXISTS": - case 6: - message.canonicalCode = 6; - break; - case "PERMISSION_DENIED": - case 7: - message.canonicalCode = 7; - break; - case "UNAUTHENTICATED": - case 16: - message.canonicalCode = 16; - break; - case "RESOURCE_EXHAUSTED": - case 8: - message.canonicalCode = 8; - break; - case "FAILED_PRECONDITION": - case 9: - message.canonicalCode = 9; - break; - case "ABORTED": - case 10: - message.canonicalCode = 10; - break; - case "OUT_OF_RANGE": - case 11: - message.canonicalCode = 11; - break; - case "UNIMPLEMENTED": - case 12: - message.canonicalCode = 12; - break; - case "INTERNAL": - case 13: - message.canonicalCode = 13; - break; - case "UNAVAILABLE": - case 14: - message.canonicalCode = 14; - break; - case "DATA_LOSS": - case 15: - message.canonicalCode = 15; - break; - } - return message; - }; - - /** - * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.StatusCondition - * @static - * @param {google.container.v1.StatusCondition} message StatusCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatusCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = options.enums === String ? "UNKNOWN" : 0; - object.message = ""; - object.canonicalCode = options.enums === String ? "OK" : 0; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.google.container.v1.StatusCondition.Code[message.code] === undefined ? message.code : $root.google.container.v1.StatusCondition.Code[message.code] : message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) - object.canonicalCode = options.enums === String ? $root.google.rpc.Code[message.canonicalCode] === undefined ? message.canonicalCode : $root.google.rpc.Code[message.canonicalCode] : message.canonicalCode; - return object; - }; - - /** - * Converts this StatusCondition to JSON. - * @function toJSON - * @memberof google.container.v1.StatusCondition - * @instance - * @returns {Object.} JSON object - */ - StatusCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StatusCondition - * @function getTypeUrl - * @memberof google.container.v1.StatusCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StatusCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.StatusCondition"; - }; - - /** - * Code enum. - * @name google.container.v1.StatusCondition.Code - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} GCE_STOCKOUT=1 GCE_STOCKOUT value - * @property {number} GKE_SERVICE_ACCOUNT_DELETED=2 GKE_SERVICE_ACCOUNT_DELETED value - * @property {number} GCE_QUOTA_EXCEEDED=3 GCE_QUOTA_EXCEEDED value - * @property {number} SET_BY_OPERATOR=4 SET_BY_OPERATOR value - * @property {number} CLOUD_KMS_KEY_ERROR=7 CLOUD_KMS_KEY_ERROR value - * @property {number} CA_EXPIRING=9 CA_EXPIRING value - */ - StatusCondition.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "GCE_STOCKOUT"] = 1; - values[valuesById[2] = "GKE_SERVICE_ACCOUNT_DELETED"] = 2; - values[valuesById[3] = "GCE_QUOTA_EXCEEDED"] = 3; - values[valuesById[4] = "SET_BY_OPERATOR"] = 4; - values[valuesById[7] = "CLOUD_KMS_KEY_ERROR"] = 7; - values[valuesById[9] = "CA_EXPIRING"] = 9; - return values; - })(); - - return StatusCondition; - })(); - - v1.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof google.container.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {string|null} [subnetwork] NetworkConfig subnetwork - * @property {boolean|null} [enableIntraNodeVisibility] NetworkConfig enableIntraNodeVisibility - * @property {google.container.v1.IDefaultSnatStatus|null} [defaultSnatStatus] NetworkConfig defaultSnatStatus - * @property {boolean|null} [enableL4ilbSubsetting] NetworkConfig enableL4ilbSubsetting - * @property {google.container.v1.DatapathProvider|null} [datapathProvider] NetworkConfig datapathProvider - * @property {google.container.v1.PrivateIPv6GoogleAccess|null} [privateIpv6GoogleAccess] NetworkConfig privateIpv6GoogleAccess - * @property {google.container.v1.IDNSConfig|null} [dnsConfig] NetworkConfig dnsConfig - * @property {google.container.v1.IServiceExternalIPsConfig|null} [serviceExternalIpsConfig] NetworkConfig serviceExternalIpsConfig - * @property {google.container.v1.IGatewayAPIConfig|null} [gatewayApiConfig] NetworkConfig gatewayApiConfig - * @property {boolean|null} [enableMultiNetworking] NetworkConfig enableMultiNetworking - * @property {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [networkPerformanceConfig] NetworkConfig networkPerformanceConfig - * @property {boolean|null} [enableFqdnNetworkPolicy] NetworkConfig enableFqdnNetworkPolicy - * @property {google.container.v1.InTransitEncryptionConfig|null} [inTransitEncryptionConfig] NetworkConfig inTransitEncryptionConfig - * @property {boolean|null} [enableCiliumClusterwideNetworkPolicy] NetworkConfig enableCiliumClusterwideNetworkPolicy - * @property {boolean|null} [defaultEnablePrivateNodes] NetworkConfig defaultEnablePrivateNodes - */ - - /** - * Constructs a new NetworkConfig. - * @memberof google.container.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.container.v1.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig network. - * @member {string} network - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.network = ""; - - /** - * NetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.subnetwork = ""; - - /** - * NetworkConfig enableIntraNodeVisibility. - * @member {boolean} enableIntraNodeVisibility - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableIntraNodeVisibility = false; - - /** - * NetworkConfig defaultSnatStatus. - * @member {google.container.v1.IDefaultSnatStatus|null|undefined} defaultSnatStatus - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.defaultSnatStatus = null; - - /** - * NetworkConfig enableL4ilbSubsetting. - * @member {boolean} enableL4ilbSubsetting - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableL4ilbSubsetting = false; - - /** - * NetworkConfig datapathProvider. - * @member {google.container.v1.DatapathProvider} datapathProvider - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.datapathProvider = 0; - - /** - * NetworkConfig privateIpv6GoogleAccess. - * @member {google.container.v1.PrivateIPv6GoogleAccess} privateIpv6GoogleAccess - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.privateIpv6GoogleAccess = 0; - - /** - * NetworkConfig dnsConfig. - * @member {google.container.v1.IDNSConfig|null|undefined} dnsConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.dnsConfig = null; - - /** - * NetworkConfig serviceExternalIpsConfig. - * @member {google.container.v1.IServiceExternalIPsConfig|null|undefined} serviceExternalIpsConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.serviceExternalIpsConfig = null; - - /** - * NetworkConfig gatewayApiConfig. - * @member {google.container.v1.IGatewayAPIConfig|null|undefined} gatewayApiConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.gatewayApiConfig = null; - - /** - * NetworkConfig enableMultiNetworking. - * @member {boolean} enableMultiNetworking - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableMultiNetworking = false; - - /** - * NetworkConfig networkPerformanceConfig. - * @member {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.networkPerformanceConfig = null; - - /** - * NetworkConfig enableFqdnNetworkPolicy. - * @member {boolean|null|undefined} enableFqdnNetworkPolicy - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableFqdnNetworkPolicy = null; - - /** - * NetworkConfig inTransitEncryptionConfig. - * @member {google.container.v1.InTransitEncryptionConfig|null|undefined} inTransitEncryptionConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.inTransitEncryptionConfig = null; - - /** - * NetworkConfig enableCiliumClusterwideNetworkPolicy. - * @member {boolean|null|undefined} enableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableCiliumClusterwideNetworkPolicy = null; - - /** - * NetworkConfig defaultEnablePrivateNodes. - * @member {boolean|null|undefined} defaultEnablePrivateNodes - * @memberof google.container.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.defaultEnablePrivateNodes = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkConfig _enableFqdnNetworkPolicy. - * @member {"enableFqdnNetworkPolicy"|undefined} _enableFqdnNetworkPolicy - * @memberof google.container.v1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_enableFqdnNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["enableFqdnNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfig _inTransitEncryptionConfig. - * @member {"inTransitEncryptionConfig"|undefined} _inTransitEncryptionConfig - * @memberof google.container.v1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_inTransitEncryptionConfig", { - get: $util.oneOfGetter($oneOfFields = ["inTransitEncryptionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfig _enableCiliumClusterwideNetworkPolicy. - * @member {"enableCiliumClusterwideNetworkPolicy"|undefined} _enableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_enableCiliumClusterwideNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["enableCiliumClusterwideNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfig _defaultEnablePrivateNodes. - * @member {"defaultEnablePrivateNodes"|undefined} _defaultEnablePrivateNodes - * @memberof google.container.v1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_defaultEnablePrivateNodes", { - get: $util.oneOfGetter($oneOfFields = ["defaultEnablePrivateNodes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NetworkConfig - * @static - * @param {google.container.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.container.v1.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NetworkConfig - * @static - * @param {google.container.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.enableIntraNodeVisibility != null && Object.hasOwnProperty.call(message, "enableIntraNodeVisibility")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableIntraNodeVisibility); - if (message.defaultSnatStatus != null && Object.hasOwnProperty.call(message, "defaultSnatStatus")) - $root.google.container.v1.DefaultSnatStatus.encode(message.defaultSnatStatus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.enableL4ilbSubsetting != null && Object.hasOwnProperty.call(message, "enableL4ilbSubsetting")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableL4ilbSubsetting); - if (message.datapathProvider != null && Object.hasOwnProperty.call(message, "datapathProvider")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.datapathProvider); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.privateIpv6GoogleAccess); - if (message.dnsConfig != null && Object.hasOwnProperty.call(message, "dnsConfig")) - $root.google.container.v1.DNSConfig.encode(message.dnsConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.serviceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "serviceExternalIpsConfig")) - $root.google.container.v1.ServiceExternalIPsConfig.encode(message.serviceExternalIpsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.gatewayApiConfig != null && Object.hasOwnProperty.call(message, "gatewayApiConfig")) - $root.google.container.v1.GatewayAPIConfig.encode(message.gatewayApiConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.enableMultiNetworking != null && Object.hasOwnProperty.call(message, "enableMultiNetworking")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableMultiNetworking); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.enableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableFqdnNetworkPolicy")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableFqdnNetworkPolicy); - if (message.inTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "inTransitEncryptionConfig")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.inTransitEncryptionConfig); - if (message.enableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableCiliumClusterwideNetworkPolicy")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.enableCiliumClusterwideNetworkPolicy); - if (message.defaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "defaultEnablePrivateNodes")) - writer.uint32(/* id 22, wireType 0 =*/176).bool(message.defaultEnablePrivateNodes); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NetworkConfig - * @static - * @param {google.container.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - case 5: { - message.enableIntraNodeVisibility = reader.bool(); - break; - } - case 7: { - message.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.decode(reader, reader.uint32()); - break; - } - case 10: { - message.enableL4ilbSubsetting = reader.bool(); - break; - } - case 11: { - message.datapathProvider = reader.int32(); - break; - } - case 12: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 13: { - message.dnsConfig = $root.google.container.v1.DNSConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.enableMultiNetworking = reader.bool(); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.enableFqdnNetworkPolicy = reader.bool(); - break; - } - case 20: { - message.inTransitEncryptionConfig = reader.int32(); - break; - } - case 21: { - message.enableCiliumClusterwideNetworkPolicy = reader.bool(); - break; - } - case 22: { - message.defaultEnablePrivateNodes = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.container.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) - if (typeof message.enableIntraNodeVisibility !== "boolean") - return "enableIntraNodeVisibility: boolean expected"; - if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) { - var error = $root.google.container.v1.DefaultSnatStatus.verify(message.defaultSnatStatus); - if (error) - return "defaultSnatStatus." + error; - } - if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) - if (typeof message.enableL4ilbSubsetting !== "boolean") - return "enableL4ilbSubsetting: boolean expected"; - if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) - switch (message.datapathProvider) { - default: - return "datapathProvider: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) { - var error = $root.google.container.v1.DNSConfig.verify(message.dnsConfig); - if (error) - return "dnsConfig." + error; - } - if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) { - var error = $root.google.container.v1.ServiceExternalIPsConfig.verify(message.serviceExternalIpsConfig); - if (error) - return "serviceExternalIpsConfig." + error; - } - if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) { - var error = $root.google.container.v1.GatewayAPIConfig.verify(message.gatewayApiConfig); - if (error) - return "gatewayApiConfig." + error; - } - if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) - if (typeof message.enableMultiNetworking !== "boolean") - return "enableMultiNetworking: boolean expected"; - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - var error = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { - properties._enableFqdnNetworkPolicy = 1; - if (typeof message.enableFqdnNetworkPolicy !== "boolean") - return "enableFqdnNetworkPolicy: boolean expected"; - } - if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { - properties._inTransitEncryptionConfig = 1; - switch (message.inTransitEncryptionConfig) { - default: - return "inTransitEncryptionConfig: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { - properties._enableCiliumClusterwideNetworkPolicy = 1; - if (typeof message.enableCiliumClusterwideNetworkPolicy !== "boolean") - return "enableCiliumClusterwideNetworkPolicy: boolean expected"; - } - if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { - properties._defaultEnablePrivateNodes = 1; - if (typeof message.defaultEnablePrivateNodes !== "boolean") - return "defaultEnablePrivateNodes: boolean expected"; - } - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NetworkConfig) - return object; - var message = new $root.google.container.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.enableIntraNodeVisibility != null) - message.enableIntraNodeVisibility = Boolean(object.enableIntraNodeVisibility); - if (object.defaultSnatStatus != null) { - if (typeof object.defaultSnatStatus !== "object") - throw TypeError(".google.container.v1.NetworkConfig.defaultSnatStatus: object expected"); - message.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.fromObject(object.defaultSnatStatus); - } - if (object.enableL4ilbSubsetting != null) - message.enableL4ilbSubsetting = Boolean(object.enableL4ilbSubsetting); - switch (object.datapathProvider) { - default: - if (typeof object.datapathProvider === "number") { - message.datapathProvider = object.datapathProvider; - break; - } - break; - case "DATAPATH_PROVIDER_UNSPECIFIED": - case 0: - message.datapathProvider = 0; - break; - case "LEGACY_DATAPATH": - case 1: - message.datapathProvider = 1; - break; - case "ADVANCED_DATAPATH": - case 2: - message.datapathProvider = 2; - break; - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.dnsConfig != null) { - if (typeof object.dnsConfig !== "object") - throw TypeError(".google.container.v1.NetworkConfig.dnsConfig: object expected"); - message.dnsConfig = $root.google.container.v1.DNSConfig.fromObject(object.dnsConfig); - } - if (object.serviceExternalIpsConfig != null) { - if (typeof object.serviceExternalIpsConfig !== "object") - throw TypeError(".google.container.v1.NetworkConfig.serviceExternalIpsConfig: object expected"); - message.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.fromObject(object.serviceExternalIpsConfig); - } - if (object.gatewayApiConfig != null) { - if (typeof object.gatewayApiConfig !== "object") - throw TypeError(".google.container.v1.NetworkConfig.gatewayApiConfig: object expected"); - message.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.fromObject(object.gatewayApiConfig); - } - if (object.enableMultiNetworking != null) - message.enableMultiNetworking = Boolean(object.enableMultiNetworking); - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.container.v1.NetworkConfig.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.enableFqdnNetworkPolicy != null) - message.enableFqdnNetworkPolicy = Boolean(object.enableFqdnNetworkPolicy); - switch (object.inTransitEncryptionConfig) { - default: - if (typeof object.inTransitEncryptionConfig === "number") { - message.inTransitEncryptionConfig = object.inTransitEncryptionConfig; - break; - } - break; - case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": - case 0: - message.inTransitEncryptionConfig = 0; - break; - case "IN_TRANSIT_ENCRYPTION_DISABLED": - case 1: - message.inTransitEncryptionConfig = 1; - break; - case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": - case 2: - message.inTransitEncryptionConfig = 2; - break; - } - if (object.enableCiliumClusterwideNetworkPolicy != null) - message.enableCiliumClusterwideNetworkPolicy = Boolean(object.enableCiliumClusterwideNetworkPolicy); - if (object.defaultEnablePrivateNodes != null) - message.defaultEnablePrivateNodes = Boolean(object.defaultEnablePrivateNodes); - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NetworkConfig - * @static - * @param {google.container.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.subnetwork = ""; - object.enableIntraNodeVisibility = false; - object.defaultSnatStatus = null; - object.enableL4ilbSubsetting = false; - object.datapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; - object.privateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; - object.dnsConfig = null; - object.serviceExternalIpsConfig = null; - object.gatewayApiConfig = null; - object.enableMultiNetworking = false; - object.networkPerformanceConfig = null; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) - object.enableIntraNodeVisibility = message.enableIntraNodeVisibility; - if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) - object.defaultSnatStatus = $root.google.container.v1.DefaultSnatStatus.toObject(message.defaultSnatStatus, options); - if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) - object.enableL4ilbSubsetting = message.enableL4ilbSubsetting; - if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) - object.datapathProvider = options.enums === String ? $root.google.container.v1.DatapathProvider[message.datapathProvider] === undefined ? message.datapathProvider : $root.google.container.v1.DatapathProvider[message.datapathProvider] : message.datapathProvider; - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.container.v1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) - object.dnsConfig = $root.google.container.v1.DNSConfig.toObject(message.dnsConfig, options); - if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) - object.serviceExternalIpsConfig = $root.google.container.v1.ServiceExternalIPsConfig.toObject(message.serviceExternalIpsConfig, options); - if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) - object.gatewayApiConfig = $root.google.container.v1.GatewayAPIConfig.toObject(message.gatewayApiConfig, options); - if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) - object.enableMultiNetworking = message.enableMultiNetworking; - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) - object.networkPerformanceConfig = $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { - object.enableFqdnNetworkPolicy = message.enableFqdnNetworkPolicy; - if (options.oneofs) - object._enableFqdnNetworkPolicy = "enableFqdnNetworkPolicy"; - } - if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { - object.inTransitEncryptionConfig = options.enums === String ? $root.google.container.v1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] === undefined ? message.inTransitEncryptionConfig : $root.google.container.v1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] : message.inTransitEncryptionConfig; - if (options.oneofs) - object._inTransitEncryptionConfig = "inTransitEncryptionConfig"; - } - if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { - object.enableCiliumClusterwideNetworkPolicy = message.enableCiliumClusterwideNetworkPolicy; - if (options.oneofs) - object._enableCiliumClusterwideNetworkPolicy = "enableCiliumClusterwideNetworkPolicy"; - } - if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { - object.defaultEnablePrivateNodes = message.defaultEnablePrivateNodes; - if (options.oneofs) - object._defaultEnablePrivateNodes = "defaultEnablePrivateNodes"; - } - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.container.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NetworkConfig"; - }; - - NetworkConfig.ClusterNetworkPerformanceConfig = (function() { - - /** - * Properties of a ClusterNetworkPerformanceConfig. - * @memberof google.container.v1.NetworkConfig - * @interface IClusterNetworkPerformanceConfig - * @property {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] ClusterNetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new ClusterNetworkPerformanceConfig. - * @memberof google.container.v1.NetworkConfig - * @classdesc Represents a ClusterNetworkPerformanceConfig. - * @implements IClusterNetworkPerformanceConfig - * @constructor - * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set - */ - function ClusterNetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterNetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - */ - ClusterNetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - */ - Object.defineProperty(ClusterNetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig instance - */ - ClusterNetworkPerformanceConfig.create = function create(properties) { - return new ClusterNetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterNetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterNetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterNetworkPerformanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterNetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterNetworkPerformanceConfig message. - * @function verify - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterNetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - */ - ClusterNetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig) - return object; - var message = new $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "TIER_1": - case 1: - message.totalEgressBandwidthTier = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterNetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this ClusterNetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - ClusterNetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterNetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterNetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.container.v1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} TIER_1=1 TIER_1 value - */ - ClusterNetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIER_1"] = 1; - return values; - })(); - - return ClusterNetworkPerformanceConfig; - })(); - - return NetworkConfig; - })(); - - v1.GatewayAPIConfig = (function() { - - /** - * Properties of a GatewayAPIConfig. - * @memberof google.container.v1 - * @interface IGatewayAPIConfig - * @property {google.container.v1.GatewayAPIConfig.Channel|null} [channel] GatewayAPIConfig channel - */ - - /** - * Constructs a new GatewayAPIConfig. - * @memberof google.container.v1 - * @classdesc Represents a GatewayAPIConfig. - * @implements IGatewayAPIConfig - * @constructor - * @param {google.container.v1.IGatewayAPIConfig=} [properties] Properties to set - */ - function GatewayAPIConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GatewayAPIConfig channel. - * @member {google.container.v1.GatewayAPIConfig.Channel} channel - * @memberof google.container.v1.GatewayAPIConfig - * @instance - */ - GatewayAPIConfig.prototype.channel = 0; - - /** - * Creates a new GatewayAPIConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {google.container.v1.IGatewayAPIConfig=} [properties] Properties to set - * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig instance - */ - GatewayAPIConfig.create = function create(properties) { - return new GatewayAPIConfig(properties); - }; - - /** - * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {google.container.v1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatewayAPIConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - return writer; - }; - - /** - * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.GatewayAPIConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {google.container.v1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatewayAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatewayAPIConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GatewayAPIConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatewayAPIConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GatewayAPIConfig message. - * @function verify - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GatewayAPIConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GatewayAPIConfig} GatewayAPIConfig - */ - GatewayAPIConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GatewayAPIConfig) - return object; - var message = new $root.google.container.v1.GatewayAPIConfig(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "CHANNEL_UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "CHANNEL_DISABLED": - case 1: - message.channel = 1; - break; - case "CHANNEL_EXPERIMENTAL": - case 3: - message.channel = 3; - break; - case "CHANNEL_STANDARD": - case 4: - message.channel = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {google.container.v1.GatewayAPIConfig} message GatewayAPIConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GatewayAPIConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.channel = options.enums === String ? "CHANNEL_UNSPECIFIED" : 0; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1.GatewayAPIConfig.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.GatewayAPIConfig.Channel[message.channel] : message.channel; - return object; - }; - - /** - * Converts this GatewayAPIConfig to JSON. - * @function toJSON - * @memberof google.container.v1.GatewayAPIConfig - * @instance - * @returns {Object.} JSON object - */ - GatewayAPIConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GatewayAPIConfig - * @function getTypeUrl - * @memberof google.container.v1.GatewayAPIConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GatewayAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GatewayAPIConfig"; - }; - - /** - * Channel enum. - * @name google.container.v1.GatewayAPIConfig.Channel - * @enum {number} - * @property {number} CHANNEL_UNSPECIFIED=0 CHANNEL_UNSPECIFIED value - * @property {number} CHANNEL_DISABLED=1 CHANNEL_DISABLED value - * @property {number} CHANNEL_EXPERIMENTAL=3 CHANNEL_EXPERIMENTAL value - * @property {number} CHANNEL_STANDARD=4 CHANNEL_STANDARD value - */ - GatewayAPIConfig.Channel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANNEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "CHANNEL_DISABLED"] = 1; - values[valuesById[3] = "CHANNEL_EXPERIMENTAL"] = 3; - values[valuesById[4] = "CHANNEL_STANDARD"] = 4; - return values; - })(); - - return GatewayAPIConfig; - })(); - - v1.ServiceExternalIPsConfig = (function() { - - /** - * Properties of a ServiceExternalIPsConfig. - * @memberof google.container.v1 - * @interface IServiceExternalIPsConfig - * @property {boolean|null} [enabled] ServiceExternalIPsConfig enabled - */ - - /** - * Constructs a new ServiceExternalIPsConfig. - * @memberof google.container.v1 - * @classdesc Represents a ServiceExternalIPsConfig. - * @implements IServiceExternalIPsConfig - * @constructor - * @param {google.container.v1.IServiceExternalIPsConfig=} [properties] Properties to set - */ - function ServiceExternalIPsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceExternalIPsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ServiceExternalIPsConfig - * @instance - */ - ServiceExternalIPsConfig.prototype.enabled = false; - - /** - * Creates a new ServiceExternalIPsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1.IServiceExternalIPsConfig=} [properties] Properties to set - * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig instance - */ - ServiceExternalIPsConfig.create = function create(properties) { - return new ServiceExternalIPsConfig(properties); - }; - - /** - * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceExternalIPsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1.ServiceExternalIPsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceExternalIPsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceExternalIPsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ServiceExternalIPsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceExternalIPsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceExternalIPsConfig message. - * @function verify - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceExternalIPsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - */ - ServiceExternalIPsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ServiceExternalIPsConfig) - return object; - var message = new $root.google.container.v1.ServiceExternalIPsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1.ServiceExternalIPsConfig} message ServiceExternalIPsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceExternalIPsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ServiceExternalIPsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ServiceExternalIPsConfig - * @instance - * @returns {Object.} JSON object - */ - ServiceExternalIPsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceExternalIPsConfig - * @function getTypeUrl - * @memberof google.container.v1.ServiceExternalIPsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceExternalIPsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ServiceExternalIPsConfig"; - }; - - return ServiceExternalIPsConfig; - })(); - - v1.GetOpenIDConfigRequest = (function() { - - /** - * Properties of a GetOpenIDConfigRequest. - * @memberof google.container.v1 - * @interface IGetOpenIDConfigRequest - * @property {string|null} [parent] GetOpenIDConfigRequest parent - */ - - /** - * Constructs a new GetOpenIDConfigRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetOpenIDConfigRequest. - * @implements IGetOpenIDConfigRequest - * @constructor - * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set - */ - function GetOpenIDConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOpenIDConfigRequest parent. - * @member {string} parent - * @memberof google.container.v1.GetOpenIDConfigRequest - * @instance - */ - GetOpenIDConfigRequest.prototype.parent = ""; - - /** - * Creates a new GetOpenIDConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set - * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest instance - */ - GetOpenIDConfigRequest.create = function create(properties) { - return new GetOpenIDConfigRequest(properties); - }; - - /** - * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigRequest.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); - return writer; - }; - - /** - * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOpenIDConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOpenIDConfigRequest message. - * @function verify - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOpenIDConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - */ - GetOpenIDConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetOpenIDConfigRequest) - return object; - var message = new $root.google.container.v1.GetOpenIDConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1.GetOpenIDConfigRequest} message GetOpenIDConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOpenIDConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this GetOpenIDConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetOpenIDConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetOpenIDConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOpenIDConfigRequest - * @function getTypeUrl - * @memberof google.container.v1.GetOpenIDConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOpenIDConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetOpenIDConfigRequest"; - }; - - return GetOpenIDConfigRequest; - })(); - - v1.GetOpenIDConfigResponse = (function() { - - /** - * Properties of a GetOpenIDConfigResponse. - * @memberof google.container.v1 - * @interface IGetOpenIDConfigResponse - * @property {string|null} [issuer] GetOpenIDConfigResponse issuer - * @property {string|null} [jwksUri] GetOpenIDConfigResponse jwksUri - * @property {Array.|null} [responseTypesSupported] GetOpenIDConfigResponse responseTypesSupported - * @property {Array.|null} [subjectTypesSupported] GetOpenIDConfigResponse subjectTypesSupported - * @property {Array.|null} [idTokenSigningAlgValuesSupported] GetOpenIDConfigResponse idTokenSigningAlgValuesSupported - * @property {Array.|null} [claimsSupported] GetOpenIDConfigResponse claimsSupported - * @property {Array.|null} [grantTypes] GetOpenIDConfigResponse grantTypes - */ - - /** - * Constructs a new GetOpenIDConfigResponse. - * @memberof google.container.v1 - * @classdesc Represents a GetOpenIDConfigResponse. - * @implements IGetOpenIDConfigResponse - * @constructor - * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set - */ - function GetOpenIDConfigResponse(properties) { - this.responseTypesSupported = []; - this.subjectTypesSupported = []; - this.idTokenSigningAlgValuesSupported = []; - this.claimsSupported = []; - this.grantTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOpenIDConfigResponse issuer. - * @member {string} issuer - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.issuer = ""; - - /** - * GetOpenIDConfigResponse jwksUri. - * @member {string} jwksUri - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.jwksUri = ""; - - /** - * GetOpenIDConfigResponse responseTypesSupported. - * @member {Array.} responseTypesSupported - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.responseTypesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse subjectTypesSupported. - * @member {Array.} subjectTypesSupported - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.subjectTypesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. - * @member {Array.} idTokenSigningAlgValuesSupported - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.idTokenSigningAlgValuesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse claimsSupported. - * @member {Array.} claimsSupported - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.claimsSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse grantTypes. - * @member {Array.} grantTypes - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.grantTypes = $util.emptyArray; - - /** - * Creates a new GetOpenIDConfigResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set - * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse instance - */ - GetOpenIDConfigResponse.create = function create(properties) { - return new GetOpenIDConfigResponse(properties); - }; - - /** - * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jwksUri); - if (message.responseTypesSupported != null && message.responseTypesSupported.length) - for (var i = 0; i < message.responseTypesSupported.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.responseTypesSupported[i]); - if (message.subjectTypesSupported != null && message.subjectTypesSupported.length) - for (var i = 0; i < message.subjectTypesSupported.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjectTypesSupported[i]); - if (message.idTokenSigningAlgValuesSupported != null && message.idTokenSigningAlgValuesSupported.length) - for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.idTokenSigningAlgValuesSupported[i]); - if (message.claimsSupported != null && message.claimsSupported.length) - for (var i = 0; i < message.claimsSupported.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.claimsSupported[i]); - if (message.grantTypes != null && message.grantTypes.length) - for (var i = 0; i < message.grantTypes.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.grantTypes[i]); - return writer; - }; - - /** - * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetOpenIDConfigResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issuer = reader.string(); - break; - } - case 2: { - message.jwksUri = reader.string(); - break; - } - case 3: { - if (!(message.responseTypesSupported && message.responseTypesSupported.length)) - message.responseTypesSupported = []; - message.responseTypesSupported.push(reader.string()); - break; - } - case 4: { - if (!(message.subjectTypesSupported && message.subjectTypesSupported.length)) - message.subjectTypesSupported = []; - message.subjectTypesSupported.push(reader.string()); - break; - } - case 5: { - if (!(message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length)) - message.idTokenSigningAlgValuesSupported = []; - message.idTokenSigningAlgValuesSupported.push(reader.string()); - break; - } - case 6: { - if (!(message.claimsSupported && message.claimsSupported.length)) - message.claimsSupported = []; - message.claimsSupported.push(reader.string()); - break; - } - case 7: { - if (!(message.grantTypes && message.grantTypes.length)) - message.grantTypes = []; - message.grantTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOpenIDConfigResponse message. - * @function verify - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOpenIDConfigResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - if (!$util.isString(message.jwksUri)) - return "jwksUri: string expected"; - if (message.responseTypesSupported != null && message.hasOwnProperty("responseTypesSupported")) { - if (!Array.isArray(message.responseTypesSupported)) - return "responseTypesSupported: array expected"; - for (var i = 0; i < message.responseTypesSupported.length; ++i) - if (!$util.isString(message.responseTypesSupported[i])) - return "responseTypesSupported: string[] expected"; - } - if (message.subjectTypesSupported != null && message.hasOwnProperty("subjectTypesSupported")) { - if (!Array.isArray(message.subjectTypesSupported)) - return "subjectTypesSupported: array expected"; - for (var i = 0; i < message.subjectTypesSupported.length; ++i) - if (!$util.isString(message.subjectTypesSupported[i])) - return "subjectTypesSupported: string[] expected"; - } - if (message.idTokenSigningAlgValuesSupported != null && message.hasOwnProperty("idTokenSigningAlgValuesSupported")) { - if (!Array.isArray(message.idTokenSigningAlgValuesSupported)) - return "idTokenSigningAlgValuesSupported: array expected"; - for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) - if (!$util.isString(message.idTokenSigningAlgValuesSupported[i])) - return "idTokenSigningAlgValuesSupported: string[] expected"; - } - if (message.claimsSupported != null && message.hasOwnProperty("claimsSupported")) { - if (!Array.isArray(message.claimsSupported)) - return "claimsSupported: array expected"; - for (var i = 0; i < message.claimsSupported.length; ++i) - if (!$util.isString(message.claimsSupported[i])) - return "claimsSupported: string[] expected"; - } - if (message.grantTypes != null && message.hasOwnProperty("grantTypes")) { - if (!Array.isArray(message.grantTypes)) - return "grantTypes: array expected"; - for (var i = 0; i < message.grantTypes.length; ++i) - if (!$util.isString(message.grantTypes[i])) - return "grantTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - */ - GetOpenIDConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetOpenIDConfigResponse) - return object; - var message = new $root.google.container.v1.GetOpenIDConfigResponse(); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.jwksUri != null) - message.jwksUri = String(object.jwksUri); - if (object.responseTypesSupported) { - if (!Array.isArray(object.responseTypesSupported)) - throw TypeError(".google.container.v1.GetOpenIDConfigResponse.responseTypesSupported: array expected"); - message.responseTypesSupported = []; - for (var i = 0; i < object.responseTypesSupported.length; ++i) - message.responseTypesSupported[i] = String(object.responseTypesSupported[i]); - } - if (object.subjectTypesSupported) { - if (!Array.isArray(object.subjectTypesSupported)) - throw TypeError(".google.container.v1.GetOpenIDConfigResponse.subjectTypesSupported: array expected"); - message.subjectTypesSupported = []; - for (var i = 0; i < object.subjectTypesSupported.length; ++i) - message.subjectTypesSupported[i] = String(object.subjectTypesSupported[i]); - } - if (object.idTokenSigningAlgValuesSupported) { - if (!Array.isArray(object.idTokenSigningAlgValuesSupported)) - throw TypeError(".google.container.v1.GetOpenIDConfigResponse.idTokenSigningAlgValuesSupported: array expected"); - message.idTokenSigningAlgValuesSupported = []; - for (var i = 0; i < object.idTokenSigningAlgValuesSupported.length; ++i) - message.idTokenSigningAlgValuesSupported[i] = String(object.idTokenSigningAlgValuesSupported[i]); - } - if (object.claimsSupported) { - if (!Array.isArray(object.claimsSupported)) - throw TypeError(".google.container.v1.GetOpenIDConfigResponse.claimsSupported: array expected"); - message.claimsSupported = []; - for (var i = 0; i < object.claimsSupported.length; ++i) - message.claimsSupported[i] = String(object.claimsSupported[i]); - } - if (object.grantTypes) { - if (!Array.isArray(object.grantTypes)) - throw TypeError(".google.container.v1.GetOpenIDConfigResponse.grantTypes: array expected"); - message.grantTypes = []; - for (var i = 0; i < object.grantTypes.length; ++i) - message.grantTypes[i] = String(object.grantTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1.GetOpenIDConfigResponse} message GetOpenIDConfigResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOpenIDConfigResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.responseTypesSupported = []; - object.subjectTypesSupported = []; - object.idTokenSigningAlgValuesSupported = []; - object.claimsSupported = []; - object.grantTypes = []; - } - if (options.defaults) { - object.issuer = ""; - object.jwksUri = ""; - } - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - object.jwksUri = message.jwksUri; - if (message.responseTypesSupported && message.responseTypesSupported.length) { - object.responseTypesSupported = []; - for (var j = 0; j < message.responseTypesSupported.length; ++j) - object.responseTypesSupported[j] = message.responseTypesSupported[j]; - } - if (message.subjectTypesSupported && message.subjectTypesSupported.length) { - object.subjectTypesSupported = []; - for (var j = 0; j < message.subjectTypesSupported.length; ++j) - object.subjectTypesSupported[j] = message.subjectTypesSupported[j]; - } - if (message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length) { - object.idTokenSigningAlgValuesSupported = []; - for (var j = 0; j < message.idTokenSigningAlgValuesSupported.length; ++j) - object.idTokenSigningAlgValuesSupported[j] = message.idTokenSigningAlgValuesSupported[j]; - } - if (message.claimsSupported && message.claimsSupported.length) { - object.claimsSupported = []; - for (var j = 0; j < message.claimsSupported.length; ++j) - object.claimsSupported[j] = message.claimsSupported[j]; - } - if (message.grantTypes && message.grantTypes.length) { - object.grantTypes = []; - for (var j = 0; j < message.grantTypes.length; ++j) - object.grantTypes[j] = message.grantTypes[j]; - } - return object; - }; - - /** - * Converts this GetOpenIDConfigResponse to JSON. - * @function toJSON - * @memberof google.container.v1.GetOpenIDConfigResponse - * @instance - * @returns {Object.} JSON object - */ - GetOpenIDConfigResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOpenIDConfigResponse - * @function getTypeUrl - * @memberof google.container.v1.GetOpenIDConfigResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOpenIDConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetOpenIDConfigResponse"; - }; - - return GetOpenIDConfigResponse; - })(); - - v1.GetJSONWebKeysRequest = (function() { - - /** - * Properties of a GetJSONWebKeysRequest. - * @memberof google.container.v1 - * @interface IGetJSONWebKeysRequest - * @property {string|null} [parent] GetJSONWebKeysRequest parent - */ - - /** - * Constructs a new GetJSONWebKeysRequest. - * @memberof google.container.v1 - * @classdesc Represents a GetJSONWebKeysRequest. - * @implements IGetJSONWebKeysRequest - * @constructor - * @param {google.container.v1.IGetJSONWebKeysRequest=} [properties] Properties to set - */ - function GetJSONWebKeysRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJSONWebKeysRequest parent. - * @member {string} parent - * @memberof google.container.v1.GetJSONWebKeysRequest - * @instance - */ - GetJSONWebKeysRequest.prototype.parent = ""; - - /** - * Creates a new GetJSONWebKeysRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1.IGetJSONWebKeysRequest=} [properties] Properties to set - * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest instance - */ - GetJSONWebKeysRequest.create = function create(properties) { - return new GetJSONWebKeysRequest(properties); - }; - - /** - * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysRequest.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); - return writer; - }; - - /** - * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetJSONWebKeysRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJSONWebKeysRequest message. - * @function verify - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJSONWebKeysRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - */ - GetJSONWebKeysRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetJSONWebKeysRequest) - return object; - var message = new $root.google.container.v1.GetJSONWebKeysRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1.GetJSONWebKeysRequest} message GetJSONWebKeysRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJSONWebKeysRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this GetJSONWebKeysRequest to JSON. - * @function toJSON - * @memberof google.container.v1.GetJSONWebKeysRequest - * @instance - * @returns {Object.} JSON object - */ - GetJSONWebKeysRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetJSONWebKeysRequest - * @function getTypeUrl - * @memberof google.container.v1.GetJSONWebKeysRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetJSONWebKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetJSONWebKeysRequest"; - }; - - return GetJSONWebKeysRequest; - })(); - - v1.Jwk = (function() { - - /** - * Properties of a Jwk. - * @memberof google.container.v1 - * @interface IJwk - * @property {string|null} [kty] Jwk kty - * @property {string|null} [alg] Jwk alg - * @property {string|null} [use] Jwk use - * @property {string|null} [kid] Jwk kid - * @property {string|null} [n] Jwk n - * @property {string|null} [e] Jwk e - * @property {string|null} [x] Jwk x - * @property {string|null} [y] Jwk y - * @property {string|null} [crv] Jwk crv - */ - - /** - * Constructs a new Jwk. - * @memberof google.container.v1 - * @classdesc Represents a Jwk. - * @implements IJwk - * @constructor - * @param {google.container.v1.IJwk=} [properties] Properties to set - */ - function Jwk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Jwk kty. - * @member {string} kty - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.kty = ""; - - /** - * Jwk alg. - * @member {string} alg - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.alg = ""; - - /** - * Jwk use. - * @member {string} use - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.use = ""; - - /** - * Jwk kid. - * @member {string} kid - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.kid = ""; - - /** - * Jwk n. - * @member {string} n - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.n = ""; - - /** - * Jwk e. - * @member {string} e - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.e = ""; - - /** - * Jwk x. - * @member {string} x - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.x = ""; - - /** - * Jwk y. - * @member {string} y - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.y = ""; - - /** - * Jwk crv. - * @member {string} crv - * @memberof google.container.v1.Jwk - * @instance - */ - Jwk.prototype.crv = ""; - - /** - * Creates a new Jwk instance using the specified properties. - * @function create - * @memberof google.container.v1.Jwk - * @static - * @param {google.container.v1.IJwk=} [properties] Properties to set - * @returns {google.container.v1.Jwk} Jwk instance - */ - Jwk.create = function create(properties) { - return new Jwk(properties); - }; - - /** - * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Jwk - * @static - * @param {google.container.v1.IJwk} message Jwk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Jwk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kty != null && Object.hasOwnProperty.call(message, "kty")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kty); - if (message.alg != null && Object.hasOwnProperty.call(message, "alg")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.alg); - if (message.use != null && Object.hasOwnProperty.call(message, "use")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.use); - if (message.kid != null && Object.hasOwnProperty.call(message, "kid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kid); - if (message.n != null && Object.hasOwnProperty.call(message, "n")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.n); - if (message.e != null && Object.hasOwnProperty.call(message, "e")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.e); - if (message.x != null && Object.hasOwnProperty.call(message, "x")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.x); - if (message.y != null && Object.hasOwnProperty.call(message, "y")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.y); - if (message.crv != null && Object.hasOwnProperty.call(message, "crv")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.crv); - return writer; - }; - - /** - * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1.Jwk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Jwk - * @static - * @param {google.container.v1.IJwk} message Jwk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Jwk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Jwk message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Jwk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Jwk} Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Jwk.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Jwk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kty = reader.string(); - break; - } - case 2: { - message.alg = reader.string(); - break; - } - case 3: { - message.use = reader.string(); - break; - } - case 4: { - message.kid = reader.string(); - break; - } - case 5: { - message.n = reader.string(); - break; - } - case 6: { - message.e = reader.string(); - break; - } - case 7: { - message.x = reader.string(); - break; - } - case 8: { - message.y = reader.string(); - break; - } - case 9: { - message.crv = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Jwk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Jwk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Jwk} Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Jwk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Jwk message. - * @function verify - * @memberof google.container.v1.Jwk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Jwk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kty != null && message.hasOwnProperty("kty")) - if (!$util.isString(message.kty)) - return "kty: string expected"; - if (message.alg != null && message.hasOwnProperty("alg")) - if (!$util.isString(message.alg)) - return "alg: string expected"; - if (message.use != null && message.hasOwnProperty("use")) - if (!$util.isString(message.use)) - return "use: string expected"; - if (message.kid != null && message.hasOwnProperty("kid")) - if (!$util.isString(message.kid)) - return "kid: string expected"; - if (message.n != null && message.hasOwnProperty("n")) - if (!$util.isString(message.n)) - return "n: string expected"; - if (message.e != null && message.hasOwnProperty("e")) - if (!$util.isString(message.e)) - return "e: string expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (!$util.isString(message.x)) - return "x: string expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (!$util.isString(message.y)) - return "y: string expected"; - if (message.crv != null && message.hasOwnProperty("crv")) - if (!$util.isString(message.crv)) - return "crv: string expected"; - return null; - }; - - /** - * Creates a Jwk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Jwk - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Jwk} Jwk - */ - Jwk.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Jwk) - return object; - var message = new $root.google.container.v1.Jwk(); - if (object.kty != null) - message.kty = String(object.kty); - if (object.alg != null) - message.alg = String(object.alg); - if (object.use != null) - message.use = String(object.use); - if (object.kid != null) - message.kid = String(object.kid); - if (object.n != null) - message.n = String(object.n); - if (object.e != null) - message.e = String(object.e); - if (object.x != null) - message.x = String(object.x); - if (object.y != null) - message.y = String(object.y); - if (object.crv != null) - message.crv = String(object.crv); - return message; - }; - - /** - * Creates a plain object from a Jwk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Jwk - * @static - * @param {google.container.v1.Jwk} message Jwk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Jwk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kty = ""; - object.alg = ""; - object.use = ""; - object.kid = ""; - object.n = ""; - object.e = ""; - object.x = ""; - object.y = ""; - object.crv = ""; - } - if (message.kty != null && message.hasOwnProperty("kty")) - object.kty = message.kty; - if (message.alg != null && message.hasOwnProperty("alg")) - object.alg = message.alg; - if (message.use != null && message.hasOwnProperty("use")) - object.use = message.use; - if (message.kid != null && message.hasOwnProperty("kid")) - object.kid = message.kid; - if (message.n != null && message.hasOwnProperty("n")) - object.n = message.n; - if (message.e != null && message.hasOwnProperty("e")) - object.e = message.e; - if (message.x != null && message.hasOwnProperty("x")) - object.x = message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = message.y; - if (message.crv != null && message.hasOwnProperty("crv")) - object.crv = message.crv; - return object; - }; - - /** - * Converts this Jwk to JSON. - * @function toJSON - * @memberof google.container.v1.Jwk - * @instance - * @returns {Object.} JSON object - */ - Jwk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Jwk - * @function getTypeUrl - * @memberof google.container.v1.Jwk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Jwk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Jwk"; - }; - - return Jwk; - })(); - - v1.GetJSONWebKeysResponse = (function() { - - /** - * Properties of a GetJSONWebKeysResponse. - * @memberof google.container.v1 - * @interface IGetJSONWebKeysResponse - * @property {Array.|null} [keys] GetJSONWebKeysResponse keys - */ - - /** - * Constructs a new GetJSONWebKeysResponse. - * @memberof google.container.v1 - * @classdesc Represents a GetJSONWebKeysResponse. - * @implements IGetJSONWebKeysResponse - * @constructor - * @param {google.container.v1.IGetJSONWebKeysResponse=} [properties] Properties to set - */ - function GetJSONWebKeysResponse(properties) { - this.keys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJSONWebKeysResponse keys. - * @member {Array.} keys - * @memberof google.container.v1.GetJSONWebKeysResponse - * @instance - */ - GetJSONWebKeysResponse.prototype.keys = $util.emptyArray; - - /** - * Creates a new GetJSONWebKeysResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1.IGetJSONWebKeysResponse=} [properties] Properties to set - * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse instance - */ - GetJSONWebKeysResponse.create = function create(properties) { - return new GetJSONWebKeysResponse(properties); - }; - - /** - * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.google.container.v1.Jwk.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1.GetJSONWebKeysResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GetJSONWebKeysResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.google.container.v1.Jwk.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJSONWebKeysResponse message. - * @function verify - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJSONWebKeysResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.google.container.v1.Jwk.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - return null; - }; - - /** - * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - */ - GetJSONWebKeysResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.GetJSONWebKeysResponse) - return object; - var message = new $root.google.container.v1.GetJSONWebKeysResponse(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".google.container.v1.GetJSONWebKeysResponse.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".google.container.v1.GetJSONWebKeysResponse.keys: object expected"); - message.keys[i] = $root.google.container.v1.Jwk.fromObject(object.keys[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1.GetJSONWebKeysResponse} message GetJSONWebKeysResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJSONWebKeysResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.google.container.v1.Jwk.toObject(message.keys[j], options); - } - return object; - }; - - /** - * Converts this GetJSONWebKeysResponse to JSON. - * @function toJSON - * @memberof google.container.v1.GetJSONWebKeysResponse - * @instance - * @returns {Object.} JSON object - */ - GetJSONWebKeysResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetJSONWebKeysResponse - * @function getTypeUrl - * @memberof google.container.v1.GetJSONWebKeysResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetJSONWebKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.GetJSONWebKeysResponse"; - }; - - return GetJSONWebKeysResponse; - })(); - - v1.CheckAutopilotCompatibilityRequest = (function() { - - /** - * Properties of a CheckAutopilotCompatibilityRequest. - * @memberof google.container.v1 - * @interface ICheckAutopilotCompatibilityRequest - * @property {string|null} [name] CheckAutopilotCompatibilityRequest name - */ - - /** - * Constructs a new CheckAutopilotCompatibilityRequest. - * @memberof google.container.v1 - * @classdesc Represents a CheckAutopilotCompatibilityRequest. - * @implements ICheckAutopilotCompatibilityRequest - * @constructor - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set - */ - function CheckAutopilotCompatibilityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckAutopilotCompatibilityRequest name. - * @member {string} name - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @instance - */ - CheckAutopilotCompatibilityRequest.prototype.name = ""; - - /** - * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set - * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest instance - */ - CheckAutopilotCompatibilityRequest.create = function create(properties) { - return new CheckAutopilotCompatibilityRequest(properties); - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CheckAutopilotCompatibilityRequest(); - 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 CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckAutopilotCompatibilityRequest message. - * @function verify - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - */ - CheckAutopilotCompatibilityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CheckAutopilotCompatibilityRequest) - return object; - var message = new $root.google.container.v1.CheckAutopilotCompatibilityRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1.CheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest to JSON. - * @function toJSON - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @instance - * @returns {Object.} JSON object - */ - CheckAutopilotCompatibilityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityRequest - * @function getTypeUrl - * @memberof google.container.v1.CheckAutopilotCompatibilityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckAutopilotCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CheckAutopilotCompatibilityRequest"; - }; - - return CheckAutopilotCompatibilityRequest; - })(); - - v1.AutopilotCompatibilityIssue = (function() { - - /** - * Properties of an AutopilotCompatibilityIssue. - * @memberof google.container.v1 - * @interface IAutopilotCompatibilityIssue - * @property {google.protobuf.ITimestamp|null} [lastObservation] AutopilotCompatibilityIssue lastObservation - * @property {string|null} [constraintType] AutopilotCompatibilityIssue constraintType - * @property {google.container.v1.AutopilotCompatibilityIssue.IssueType|null} [incompatibilityType] AutopilotCompatibilityIssue incompatibilityType - * @property {Array.|null} [subjects] AutopilotCompatibilityIssue subjects - * @property {string|null} [documentationUrl] AutopilotCompatibilityIssue documentationUrl - * @property {string|null} [description] AutopilotCompatibilityIssue description - */ - - /** - * Constructs a new AutopilotCompatibilityIssue. - * @memberof google.container.v1 - * @classdesc Represents an AutopilotCompatibilityIssue. - * @implements IAutopilotCompatibilityIssue - * @constructor - * @param {google.container.v1.IAutopilotCompatibilityIssue=} [properties] Properties to set - */ - function AutopilotCompatibilityIssue(properties) { - this.subjects = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutopilotCompatibilityIssue lastObservation. - * @member {google.protobuf.ITimestamp|null|undefined} lastObservation - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.lastObservation = null; - - /** - * AutopilotCompatibilityIssue constraintType. - * @member {string} constraintType - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.constraintType = ""; - - /** - * AutopilotCompatibilityIssue incompatibilityType. - * @member {google.container.v1.AutopilotCompatibilityIssue.IssueType} incompatibilityType - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.incompatibilityType = 0; - - /** - * AutopilotCompatibilityIssue subjects. - * @member {Array.} subjects - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.subjects = $util.emptyArray; - - /** - * AutopilotCompatibilityIssue documentationUrl. - * @member {string} documentationUrl - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.documentationUrl = ""; - - /** - * AutopilotCompatibilityIssue description. - * @member {string} description - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.description = ""; - - /** - * Creates a new AutopilotCompatibilityIssue instance using the specified properties. - * @function create - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1.IAutopilotCompatibilityIssue=} [properties] Properties to set - * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue instance - */ - AutopilotCompatibilityIssue.create = function create(properties) { - return new AutopilotCompatibilityIssue(properties); - }; - - /** - * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotCompatibilityIssue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastObservation != null && Object.hasOwnProperty.call(message, "lastObservation")) - $root.google.protobuf.Timestamp.encode(message.lastObservation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.constraintType); - if (message.incompatibilityType != null && Object.hasOwnProperty.call(message, "incompatibilityType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.incompatibilityType); - if (message.subjects != null && message.subjects.length) - for (var i = 0; i < message.subjects.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjects[i]); - if (message.documentationUrl != null && Object.hasOwnProperty.call(message, "documentationUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.documentationUrl); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - return writer; - }; - - /** - * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1.AutopilotCompatibilityIssue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotCompatibilityIssue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotCompatibilityIssue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutopilotCompatibilityIssue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastObservation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.constraintType = reader.string(); - break; - } - case 3: { - message.incompatibilityType = reader.int32(); - break; - } - case 4: { - if (!(message.subjects && message.subjects.length)) - message.subjects = []; - message.subjects.push(reader.string()); - break; - } - case 5: { - message.documentationUrl = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotCompatibilityIssue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutopilotCompatibilityIssue message. - * @function verify - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutopilotCompatibilityIssue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastObservation); - if (error) - return "lastObservation." + error; - } - if (message.constraintType != null && message.hasOwnProperty("constraintType")) - if (!$util.isString(message.constraintType)) - return "constraintType: string expected"; - if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) - switch (message.incompatibilityType) { - default: - return "incompatibilityType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.subjects != null && message.hasOwnProperty("subjects")) { - if (!Array.isArray(message.subjects)) - return "subjects: array expected"; - for (var i = 0; i < message.subjects.length; ++i) - if (!$util.isString(message.subjects[i])) - return "subjects: string[] expected"; - } - if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) - if (!$util.isString(message.documentationUrl)) - return "documentationUrl: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - */ - AutopilotCompatibilityIssue.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AutopilotCompatibilityIssue) - return object; - var message = new $root.google.container.v1.AutopilotCompatibilityIssue(); - if (object.lastObservation != null) { - if (typeof object.lastObservation !== "object") - throw TypeError(".google.container.v1.AutopilotCompatibilityIssue.lastObservation: object expected"); - message.lastObservation = $root.google.protobuf.Timestamp.fromObject(object.lastObservation); - } - if (object.constraintType != null) - message.constraintType = String(object.constraintType); - switch (object.incompatibilityType) { - default: - if (typeof object.incompatibilityType === "number") { - message.incompatibilityType = object.incompatibilityType; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.incompatibilityType = 0; - break; - case "INCOMPATIBILITY": - case 1: - message.incompatibilityType = 1; - break; - case "ADDITIONAL_CONFIG_REQUIRED": - case 2: - message.incompatibilityType = 2; - break; - case "PASSED_WITH_OPTIONAL_CONFIG": - case 3: - message.incompatibilityType = 3; - break; - } - if (object.subjects) { - if (!Array.isArray(object.subjects)) - throw TypeError(".google.container.v1.AutopilotCompatibilityIssue.subjects: array expected"); - message.subjects = []; - for (var i = 0; i < object.subjects.length; ++i) - message.subjects[i] = String(object.subjects[i]); - } - if (object.documentationUrl != null) - message.documentationUrl = String(object.documentationUrl); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1.AutopilotCompatibilityIssue} message AutopilotCompatibilityIssue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutopilotCompatibilityIssue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subjects = []; - if (options.defaults) { - object.lastObservation = null; - object.constraintType = ""; - object.incompatibilityType = options.enums === String ? "UNSPECIFIED" : 0; - object.documentationUrl = ""; - object.description = ""; - } - if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) - object.lastObservation = $root.google.protobuf.Timestamp.toObject(message.lastObservation, options); - if (message.constraintType != null && message.hasOwnProperty("constraintType")) - object.constraintType = message.constraintType; - if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) - object.incompatibilityType = options.enums === String ? $root.google.container.v1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] === undefined ? message.incompatibilityType : $root.google.container.v1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] : message.incompatibilityType; - if (message.subjects && message.subjects.length) { - object.subjects = []; - for (var j = 0; j < message.subjects.length; ++j) - object.subjects[j] = message.subjects[j]; - } - if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) - object.documentationUrl = message.documentationUrl; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AutopilotCompatibilityIssue to JSON. - * @function toJSON - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @instance - * @returns {Object.} JSON object - */ - AutopilotCompatibilityIssue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutopilotCompatibilityIssue - * @function getTypeUrl - * @memberof google.container.v1.AutopilotCompatibilityIssue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutopilotCompatibilityIssue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AutopilotCompatibilityIssue"; - }; - - /** - * IssueType enum. - * @name google.container.v1.AutopilotCompatibilityIssue.IssueType - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} INCOMPATIBILITY=1 INCOMPATIBILITY value - * @property {number} ADDITIONAL_CONFIG_REQUIRED=2 ADDITIONAL_CONFIG_REQUIRED value - * @property {number} PASSED_WITH_OPTIONAL_CONFIG=3 PASSED_WITH_OPTIONAL_CONFIG value - */ - AutopilotCompatibilityIssue.IssueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "INCOMPATIBILITY"] = 1; - values[valuesById[2] = "ADDITIONAL_CONFIG_REQUIRED"] = 2; - values[valuesById[3] = "PASSED_WITH_OPTIONAL_CONFIG"] = 3; - return values; - })(); - - return AutopilotCompatibilityIssue; - })(); - - v1.CheckAutopilotCompatibilityResponse = (function() { - - /** - * Properties of a CheckAutopilotCompatibilityResponse. - * @memberof google.container.v1 - * @interface ICheckAutopilotCompatibilityResponse - * @property {Array.|null} [issues] CheckAutopilotCompatibilityResponse issues - * @property {string|null} [summary] CheckAutopilotCompatibilityResponse summary - */ - - /** - * Constructs a new CheckAutopilotCompatibilityResponse. - * @memberof google.container.v1 - * @classdesc Represents a CheckAutopilotCompatibilityResponse. - * @implements ICheckAutopilotCompatibilityResponse - * @constructor - * @param {google.container.v1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set - */ - function CheckAutopilotCompatibilityResponse(properties) { - this.issues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckAutopilotCompatibilityResponse issues. - * @member {Array.} issues - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @instance - */ - CheckAutopilotCompatibilityResponse.prototype.issues = $util.emptyArray; - - /** - * CheckAutopilotCompatibilityResponse summary. - * @member {string} summary - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @instance - */ - CheckAutopilotCompatibilityResponse.prototype.summary = ""; - - /** - * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set - * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse instance - */ - CheckAutopilotCompatibilityResponse.create = function create(properties) { - return new CheckAutopilotCompatibilityResponse(properties); - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issues != null && message.issues.length) - for (var i = 0; i < message.issues.length; ++i) - $root.google.container.v1.AutopilotCompatibilityIssue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); - return writer; - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CheckAutopilotCompatibilityResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.issues && message.issues.length)) - message.issues = []; - message.issues.push($root.google.container.v1.AutopilotCompatibilityIssue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.summary = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckAutopilotCompatibilityResponse message. - * @function verify - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckAutopilotCompatibilityResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issues != null && message.hasOwnProperty("issues")) { - if (!Array.isArray(message.issues)) - return "issues: array expected"; - for (var i = 0; i < message.issues.length; ++i) { - var error = $root.google.container.v1.AutopilotCompatibilityIssue.verify(message.issues[i]); - if (error) - return "issues." + error; - } - } - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - return null; - }; - - /** - * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - */ - CheckAutopilotCompatibilityResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CheckAutopilotCompatibilityResponse) - return object; - var message = new $root.google.container.v1.CheckAutopilotCompatibilityResponse(); - if (object.issues) { - if (!Array.isArray(object.issues)) - throw TypeError(".google.container.v1.CheckAutopilotCompatibilityResponse.issues: array expected"); - message.issues = []; - for (var i = 0; i < object.issues.length; ++i) { - if (typeof object.issues[i] !== "object") - throw TypeError(".google.container.v1.CheckAutopilotCompatibilityResponse.issues: object expected"); - message.issues[i] = $root.google.container.v1.AutopilotCompatibilityIssue.fromObject(object.issues[i]); - } - } - if (object.summary != null) - message.summary = String(object.summary); - return message; - }; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1.CheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckAutopilotCompatibilityResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.issues = []; - if (options.defaults) - object.summary = ""; - if (message.issues && message.issues.length) { - object.issues = []; - for (var j = 0; j < message.issues.length; ++j) - object.issues[j] = $root.google.container.v1.AutopilotCompatibilityIssue.toObject(message.issues[j], options); - } - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - return object; - }; - - /** - * Converts this CheckAutopilotCompatibilityResponse to JSON. - * @function toJSON - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @instance - * @returns {Object.} JSON object - */ - CheckAutopilotCompatibilityResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityResponse - * @function getTypeUrl - * @memberof google.container.v1.CheckAutopilotCompatibilityResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckAutopilotCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CheckAutopilotCompatibilityResponse"; - }; - - return CheckAutopilotCompatibilityResponse; - })(); - - v1.ReleaseChannel = (function() { - - /** - * Properties of a ReleaseChannel. - * @memberof google.container.v1 - * @interface IReleaseChannel - * @property {google.container.v1.ReleaseChannel.Channel|null} [channel] ReleaseChannel channel - */ - - /** - * Constructs a new ReleaseChannel. - * @memberof google.container.v1 - * @classdesc Represents a ReleaseChannel. - * @implements IReleaseChannel - * @constructor - * @param {google.container.v1.IReleaseChannel=} [properties] Properties to set - */ - function ReleaseChannel(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReleaseChannel channel. - * @member {google.container.v1.ReleaseChannel.Channel} channel - * @memberof google.container.v1.ReleaseChannel - * @instance - */ - ReleaseChannel.prototype.channel = 0; - - /** - * Creates a new ReleaseChannel instance using the specified properties. - * @function create - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {google.container.v1.IReleaseChannel=} [properties] Properties to set - * @returns {google.container.v1.ReleaseChannel} ReleaseChannel instance - */ - ReleaseChannel.create = function create(properties) { - return new ReleaseChannel(properties); - }; - - /** - * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {google.container.v1.IReleaseChannel} message ReleaseChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - return writer; - }; - - /** - * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1.ReleaseChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {google.container.v1.IReleaseChannel} message ReleaseChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ReleaseChannel} ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ReleaseChannel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ReleaseChannel} ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseChannel message. - * @function verify - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ReleaseChannel} ReleaseChannel - */ - ReleaseChannel.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ReleaseChannel) - return object; - var message = new $root.google.container.v1.ReleaseChannel(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "RAPID": - case 1: - message.channel = 1; - break; - case "REGULAR": - case 2: - message.channel = 2; - break; - case "STABLE": - case 3: - message.channel = 3; - break; - case "EXTENDED": - case 4: - message.channel = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {google.container.v1.ReleaseChannel} message ReleaseChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.channel = options.enums === String ? "UNSPECIFIED" : 0; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.ReleaseChannel.Channel[message.channel] : message.channel; - return object; - }; - - /** - * Converts this ReleaseChannel to JSON. - * @function toJSON - * @memberof google.container.v1.ReleaseChannel - * @instance - * @returns {Object.} JSON object - */ - ReleaseChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReleaseChannel - * @function getTypeUrl - * @memberof google.container.v1.ReleaseChannel - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseChannel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ReleaseChannel"; - }; - - /** - * Channel enum. - * @name google.container.v1.ReleaseChannel.Channel - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} RAPID=1 RAPID value - * @property {number} REGULAR=2 REGULAR value - * @property {number} STABLE=3 STABLE value - * @property {number} EXTENDED=4 EXTENDED value - */ - ReleaseChannel.Channel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "RAPID"] = 1; - values[valuesById[2] = "REGULAR"] = 2; - values[valuesById[3] = "STABLE"] = 3; - values[valuesById[4] = "EXTENDED"] = 4; - return values; - })(); - - return ReleaseChannel; - })(); - - v1.CostManagementConfig = (function() { - - /** - * Properties of a CostManagementConfig. - * @memberof google.container.v1 - * @interface ICostManagementConfig - * @property {boolean|null} [enabled] CostManagementConfig enabled - */ - - /** - * Constructs a new CostManagementConfig. - * @memberof google.container.v1 - * @classdesc Represents a CostManagementConfig. - * @implements ICostManagementConfig - * @constructor - * @param {google.container.v1.ICostManagementConfig=} [properties] Properties to set - */ - function CostManagementConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CostManagementConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.CostManagementConfig - * @instance - */ - CostManagementConfig.prototype.enabled = false; - - /** - * Creates a new CostManagementConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {google.container.v1.ICostManagementConfig=} [properties] Properties to set - * @returns {google.container.v1.CostManagementConfig} CostManagementConfig instance - */ - CostManagementConfig.create = function create(properties) { - return new CostManagementConfig(properties); - }; - - /** - * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {google.container.v1.ICostManagementConfig} message CostManagementConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CostManagementConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1.CostManagementConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {google.container.v1.ICostManagementConfig} message CostManagementConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CostManagementConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.CostManagementConfig} CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CostManagementConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CostManagementConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.CostManagementConfig} CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CostManagementConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CostManagementConfig message. - * @function verify - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CostManagementConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.CostManagementConfig} CostManagementConfig - */ - CostManagementConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.CostManagementConfig) - return object; - var message = new $root.google.container.v1.CostManagementConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {google.container.v1.CostManagementConfig} message CostManagementConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CostManagementConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this CostManagementConfig to JSON. - * @function toJSON - * @memberof google.container.v1.CostManagementConfig - * @instance - * @returns {Object.} JSON object - */ - CostManagementConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CostManagementConfig - * @function getTypeUrl - * @memberof google.container.v1.CostManagementConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CostManagementConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.CostManagementConfig"; - }; - - return CostManagementConfig; - })(); - - v1.IntraNodeVisibilityConfig = (function() { - - /** - * Properties of an IntraNodeVisibilityConfig. - * @memberof google.container.v1 - * @interface IIntraNodeVisibilityConfig - * @property {boolean|null} [enabled] IntraNodeVisibilityConfig enabled - */ - - /** - * Constructs a new IntraNodeVisibilityConfig. - * @memberof google.container.v1 - * @classdesc Represents an IntraNodeVisibilityConfig. - * @implements IIntraNodeVisibilityConfig - * @constructor - * @param {google.container.v1.IIntraNodeVisibilityConfig=} [properties] Properties to set - */ - function IntraNodeVisibilityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntraNodeVisibilityConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @instance - */ - IntraNodeVisibilityConfig.prototype.enabled = false; - - /** - * Creates a new IntraNodeVisibilityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1.IIntraNodeVisibilityConfig=} [properties] Properties to set - * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig instance - */ - IntraNodeVisibilityConfig.create = function create(properties) { - return new IntraNodeVisibilityConfig(properties); - }; - - /** - * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntraNodeVisibilityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1.IntraNodeVisibilityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntraNodeVisibilityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntraNodeVisibilityConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IntraNodeVisibilityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntraNodeVisibilityConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntraNodeVisibilityConfig message. - * @function verify - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntraNodeVisibilityConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates an IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - */ - IntraNodeVisibilityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.IntraNodeVisibilityConfig) - return object; - var message = new $root.google.container.v1.IntraNodeVisibilityConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1.IntraNodeVisibilityConfig} message IntraNodeVisibilityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntraNodeVisibilityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this IntraNodeVisibilityConfig to JSON. - * @function toJSON - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @instance - * @returns {Object.} JSON object - */ - IntraNodeVisibilityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntraNodeVisibilityConfig - * @function getTypeUrl - * @memberof google.container.v1.IntraNodeVisibilityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntraNodeVisibilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.IntraNodeVisibilityConfig"; - }; - - return IntraNodeVisibilityConfig; - })(); - - v1.ILBSubsettingConfig = (function() { - - /** - * Properties of a ILBSubsettingConfig. - * @memberof google.container.v1 - * @interface IILBSubsettingConfig - * @property {boolean|null} [enabled] ILBSubsettingConfig enabled - */ - - /** - * Constructs a new ILBSubsettingConfig. - * @memberof google.container.v1 - * @classdesc Represents a ILBSubsettingConfig. - * @implements IILBSubsettingConfig - * @constructor - * @param {google.container.v1.IILBSubsettingConfig=} [properties] Properties to set - */ - function ILBSubsettingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ILBSubsettingConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ILBSubsettingConfig - * @instance - */ - ILBSubsettingConfig.prototype.enabled = false; - - /** - * Creates a new ILBSubsettingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {google.container.v1.IILBSubsettingConfig=} [properties] Properties to set - * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig instance - */ - ILBSubsettingConfig.create = function create(properties) { - return new ILBSubsettingConfig(properties); - }; - - /** - * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {google.container.v1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ILBSubsettingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1.ILBSubsettingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {google.container.v1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ILBSubsettingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ILBSubsettingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ILBSubsettingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ILBSubsettingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ILBSubsettingConfig message. - * @function verify - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ILBSubsettingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ILBSubsettingConfig} ILBSubsettingConfig - */ - ILBSubsettingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ILBSubsettingConfig) - return object; - var message = new $root.google.container.v1.ILBSubsettingConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {google.container.v1.ILBSubsettingConfig} message ILBSubsettingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ILBSubsettingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ILBSubsettingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ILBSubsettingConfig - * @instance - * @returns {Object.} JSON object - */ - ILBSubsettingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ILBSubsettingConfig - * @function getTypeUrl - * @memberof google.container.v1.ILBSubsettingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ILBSubsettingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ILBSubsettingConfig"; - }; - - return ILBSubsettingConfig; - })(); - - v1.DNSConfig = (function() { - - /** - * Properties of a DNSConfig. - * @memberof google.container.v1 - * @interface IDNSConfig - * @property {google.container.v1.DNSConfig.Provider|null} [clusterDns] DNSConfig clusterDns - * @property {google.container.v1.DNSConfig.DNSScope|null} [clusterDnsScope] DNSConfig clusterDnsScope - * @property {string|null} [clusterDnsDomain] DNSConfig clusterDnsDomain - * @property {string|null} [additiveVpcScopeDnsDomain] DNSConfig additiveVpcScopeDnsDomain - */ - - /** - * Constructs a new DNSConfig. - * @memberof google.container.v1 - * @classdesc Represents a DNSConfig. - * @implements IDNSConfig - * @constructor - * @param {google.container.v1.IDNSConfig=} [properties] Properties to set - */ - function DNSConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DNSConfig clusterDns. - * @member {google.container.v1.DNSConfig.Provider} clusterDns - * @memberof google.container.v1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDns = 0; - - /** - * DNSConfig clusterDnsScope. - * @member {google.container.v1.DNSConfig.DNSScope} clusterDnsScope - * @memberof google.container.v1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDnsScope = 0; - - /** - * DNSConfig clusterDnsDomain. - * @member {string} clusterDnsDomain - * @memberof google.container.v1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDnsDomain = ""; - - /** - * DNSConfig additiveVpcScopeDnsDomain. - * @member {string} additiveVpcScopeDnsDomain - * @memberof google.container.v1.DNSConfig - * @instance - */ - DNSConfig.prototype.additiveVpcScopeDnsDomain = ""; - - /** - * Creates a new DNSConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.DNSConfig - * @static - * @param {google.container.v1.IDNSConfig=} [properties] Properties to set - * @returns {google.container.v1.DNSConfig} DNSConfig instance - */ - DNSConfig.create = function create(properties) { - return new DNSConfig(properties); - }; - - /** - * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DNSConfig - * @static - * @param {google.container.v1.IDNSConfig} message DNSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterDns != null && Object.hasOwnProperty.call(message, "clusterDns")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterDns); - if (message.clusterDnsScope != null && Object.hasOwnProperty.call(message, "clusterDnsScope")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.clusterDnsScope); - if (message.clusterDnsDomain != null && Object.hasOwnProperty.call(message, "clusterDnsDomain")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterDnsDomain); - if (message.additiveVpcScopeDnsDomain != null && Object.hasOwnProperty.call(message, "additiveVpcScopeDnsDomain")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.additiveVpcScopeDnsDomain); - return writer; - }; - - /** - * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1.DNSConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DNSConfig - * @static - * @param {google.container.v1.IDNSConfig} message DNSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DNSConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DNSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DNSConfig} DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DNSConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clusterDns = reader.int32(); - break; - } - case 2: { - message.clusterDnsScope = reader.int32(); - break; - } - case 3: { - message.clusterDnsDomain = reader.string(); - break; - } - case 5: { - message.additiveVpcScopeDnsDomain = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DNSConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DNSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DNSConfig} DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DNSConfig message. - * @function verify - * @memberof google.container.v1.DNSConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DNSConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) - switch (message.clusterDns) { - default: - return "clusterDns: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) - switch (message.clusterDnsScope) { - default: - return "clusterDnsScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) - if (!$util.isString(message.clusterDnsDomain)) - return "clusterDnsDomain: string expected"; - if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) - if (!$util.isString(message.additiveVpcScopeDnsDomain)) - return "additiveVpcScopeDnsDomain: string expected"; - return null; - }; - - /** - * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DNSConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DNSConfig} DNSConfig - */ - DNSConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DNSConfig) - return object; - var message = new $root.google.container.v1.DNSConfig(); - switch (object.clusterDns) { - default: - if (typeof object.clusterDns === "number") { - message.clusterDns = object.clusterDns; - break; - } - break; - case "PROVIDER_UNSPECIFIED": - case 0: - message.clusterDns = 0; - break; - case "PLATFORM_DEFAULT": - case 1: - message.clusterDns = 1; - break; - case "CLOUD_DNS": - case 2: - message.clusterDns = 2; - break; - case "KUBE_DNS": - case 3: - message.clusterDns = 3; - break; - } - switch (object.clusterDnsScope) { - default: - if (typeof object.clusterDnsScope === "number") { - message.clusterDnsScope = object.clusterDnsScope; - break; - } - break; - case "DNS_SCOPE_UNSPECIFIED": - case 0: - message.clusterDnsScope = 0; - break; - case "CLUSTER_SCOPE": - case 1: - message.clusterDnsScope = 1; - break; - case "VPC_SCOPE": - case 2: - message.clusterDnsScope = 2; - break; - } - if (object.clusterDnsDomain != null) - message.clusterDnsDomain = String(object.clusterDnsDomain); - if (object.additiveVpcScopeDnsDomain != null) - message.additiveVpcScopeDnsDomain = String(object.additiveVpcScopeDnsDomain); - return message; - }; - - /** - * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DNSConfig - * @static - * @param {google.container.v1.DNSConfig} message DNSConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DNSConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterDns = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; - object.clusterDnsScope = options.enums === String ? "DNS_SCOPE_UNSPECIFIED" : 0; - object.clusterDnsDomain = ""; - object.additiveVpcScopeDnsDomain = ""; - } - if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) - object.clusterDns = options.enums === String ? $root.google.container.v1.DNSConfig.Provider[message.clusterDns] === undefined ? message.clusterDns : $root.google.container.v1.DNSConfig.Provider[message.clusterDns] : message.clusterDns; - if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) - object.clusterDnsScope = options.enums === String ? $root.google.container.v1.DNSConfig.DNSScope[message.clusterDnsScope] === undefined ? message.clusterDnsScope : $root.google.container.v1.DNSConfig.DNSScope[message.clusterDnsScope] : message.clusterDnsScope; - if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) - object.clusterDnsDomain = message.clusterDnsDomain; - if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) - object.additiveVpcScopeDnsDomain = message.additiveVpcScopeDnsDomain; - return object; - }; - - /** - * Converts this DNSConfig to JSON. - * @function toJSON - * @memberof google.container.v1.DNSConfig - * @instance - * @returns {Object.} JSON object - */ - DNSConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DNSConfig - * @function getTypeUrl - * @memberof google.container.v1.DNSConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DNSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DNSConfig"; - }; - - /** - * Provider enum. - * @name google.container.v1.DNSConfig.Provider - * @enum {number} - * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value - * @property {number} PLATFORM_DEFAULT=1 PLATFORM_DEFAULT value - * @property {number} CLOUD_DNS=2 CLOUD_DNS value - * @property {number} KUBE_DNS=3 KUBE_DNS value - */ - DNSConfig.Provider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLATFORM_DEFAULT"] = 1; - values[valuesById[2] = "CLOUD_DNS"] = 2; - values[valuesById[3] = "KUBE_DNS"] = 3; - return values; - })(); - - /** - * DNSScope enum. - * @name google.container.v1.DNSConfig.DNSScope - * @enum {number} - * @property {number} DNS_SCOPE_UNSPECIFIED=0 DNS_SCOPE_UNSPECIFIED value - * @property {number} CLUSTER_SCOPE=1 CLUSTER_SCOPE value - * @property {number} VPC_SCOPE=2 VPC_SCOPE value - */ - DNSConfig.DNSScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DNS_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLUSTER_SCOPE"] = 1; - values[valuesById[2] = "VPC_SCOPE"] = 2; - return values; - })(); - - return DNSConfig; - })(); - - v1.MaxPodsConstraint = (function() { - - /** - * Properties of a MaxPodsConstraint. - * @memberof google.container.v1 - * @interface IMaxPodsConstraint - * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode - */ - - /** - * Constructs a new MaxPodsConstraint. - * @memberof google.container.v1 - * @classdesc Represents a MaxPodsConstraint. - * @implements IMaxPodsConstraint - * @constructor - * @param {google.container.v1.IMaxPodsConstraint=} [properties] Properties to set - */ - function MaxPodsConstraint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaxPodsConstraint maxPodsPerNode. - * @member {number|Long} maxPodsPerNode - * @memberof google.container.v1.MaxPodsConstraint - * @instance - */ - MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new MaxPodsConstraint instance using the specified properties. - * @function create - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {google.container.v1.IMaxPodsConstraint=} [properties] Properties to set - * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint instance - */ - MaxPodsConstraint.create = function create(properties) { - return new MaxPodsConstraint(properties); - }; - - /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1.MaxPodsConstraint.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {google.container.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1.MaxPodsConstraint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {google.container.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.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; - }; - - /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaxPodsConstraint message. - * @function verify - * @memberof google.container.v1.MaxPodsConstraint - * @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) { - 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; - }; - - /** - * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MaxPodsConstraint - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MaxPodsConstraint} MaxPodsConstraint - */ - MaxPodsConstraint.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MaxPodsConstraint) - return object; - var message = new $root.google.container.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.container.v1.MaxPodsConstraint - * @static - * @param {google.container.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.container.v1.MaxPodsConstraint - * @instance - * @returns {Object.} JSON object - */ - MaxPodsConstraint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaxPodsConstraint - * @function getTypeUrl - * @memberof google.container.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.container.v1.MaxPodsConstraint"; - }; - - return MaxPodsConstraint; - })(); - - v1.WorkloadIdentityConfig = (function() { - - /** - * Properties of a WorkloadIdentityConfig. - * @memberof google.container.v1 - * @interface IWorkloadIdentityConfig - * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool - */ - - /** - * Constructs a new WorkloadIdentityConfig. - * @memberof google.container.v1 - * @classdesc Represents a WorkloadIdentityConfig. - * @implements IWorkloadIdentityConfig - * @constructor - * @param {google.container.v1.IWorkloadIdentityConfig=} [properties] Properties to set - */ - function WorkloadIdentityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadIdentityConfig workloadPool. - * @member {string} workloadPool - * @memberof google.container.v1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.workloadPool = ""; - - /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {google.container.v1.IWorkloadIdentityConfig=} [properties] Properties to set - * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig instance - */ - WorkloadIdentityConfig.create = function create(properties) { - return new WorkloadIdentityConfig(properties); - }; - - /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1.WorkloadIdentityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {google.container.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadIdentityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workloadPool != null && Object.hasOwnProperty.call(message, "workloadPool")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadPool); - return writer; - }; - - /** - * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadIdentityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {google.container.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadIdentityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.workloadPool = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadIdentityConfig message. - * @function verify - * @memberof google.container.v1.WorkloadIdentityConfig - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) - if (!$util.isString(message.workloadPool)) - return "workloadPool: string expected"; - return null; - }; - - /** - * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.WorkloadIdentityConfig} WorkloadIdentityConfig - */ - WorkloadIdentityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.WorkloadIdentityConfig) - return object; - var message = new $root.google.container.v1.WorkloadIdentityConfig(); - if (object.workloadPool != null) - message.workloadPool = String(object.workloadPool); - return message; - }; - - /** - * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {google.container.v1.WorkloadIdentityConfig} message WorkloadIdentityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadIdentityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.workloadPool = ""; - if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) - object.workloadPool = message.workloadPool; - return object; - }; - - /** - * Converts this WorkloadIdentityConfig to JSON. - * @function toJSON - * @memberof google.container.v1.WorkloadIdentityConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadIdentityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadIdentityConfig - * @function getTypeUrl - * @memberof google.container.v1.WorkloadIdentityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.WorkloadIdentityConfig"; - }; - - return WorkloadIdentityConfig; - })(); - - v1.IdentityServiceConfig = (function() { - - /** - * Properties of an IdentityServiceConfig. - * @memberof google.container.v1 - * @interface IIdentityServiceConfig - * @property {boolean|null} [enabled] IdentityServiceConfig enabled - */ - - /** - * Constructs a new IdentityServiceConfig. - * @memberof google.container.v1 - * @classdesc Represents an IdentityServiceConfig. - * @implements IIdentityServiceConfig - * @constructor - * @param {google.container.v1.IIdentityServiceConfig=} [properties] Properties to set - */ - function IdentityServiceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentityServiceConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.IdentityServiceConfig - * @instance - */ - IdentityServiceConfig.prototype.enabled = false; - - /** - * Creates a new IdentityServiceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {google.container.v1.IIdentityServiceConfig=} [properties] Properties to set - * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig instance - */ - IdentityServiceConfig.create = function create(properties) { - return new IdentityServiceConfig(properties); - }; - - /** - * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {google.container.v1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentityServiceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1.IdentityServiceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {google.container.v1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentityServiceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentityServiceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.IdentityServiceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentityServiceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentityServiceConfig message. - * @function verify - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentityServiceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates an IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.IdentityServiceConfig} IdentityServiceConfig - */ - IdentityServiceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.IdentityServiceConfig) - return object; - var message = new $root.google.container.v1.IdentityServiceConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {google.container.v1.IdentityServiceConfig} message IdentityServiceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentityServiceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this IdentityServiceConfig to JSON. - * @function toJSON - * @memberof google.container.v1.IdentityServiceConfig - * @instance - * @returns {Object.} JSON object - */ - IdentityServiceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IdentityServiceConfig - * @function getTypeUrl - * @memberof google.container.v1.IdentityServiceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IdentityServiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.IdentityServiceConfig"; - }; - - return IdentityServiceConfig; - })(); - - v1.MeshCertificates = (function() { - - /** - * Properties of a MeshCertificates. - * @memberof google.container.v1 - * @interface IMeshCertificates - * @property {google.protobuf.IBoolValue|null} [enableCertificates] MeshCertificates enableCertificates - */ - - /** - * Constructs a new MeshCertificates. - * @memberof google.container.v1 - * @classdesc Represents a MeshCertificates. - * @implements IMeshCertificates - * @constructor - * @param {google.container.v1.IMeshCertificates=} [properties] Properties to set - */ - function MeshCertificates(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MeshCertificates enableCertificates. - * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates - * @memberof google.container.v1.MeshCertificates - * @instance - */ - MeshCertificates.prototype.enableCertificates = null; - - /** - * Creates a new MeshCertificates instance using the specified properties. - * @function create - * @memberof google.container.v1.MeshCertificates - * @static - * @param {google.container.v1.IMeshCertificates=} [properties] Properties to set - * @returns {google.container.v1.MeshCertificates} MeshCertificates instance - */ - MeshCertificates.create = function create(properties) { - return new MeshCertificates(properties); - }; - - /** - * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MeshCertificates - * @static - * @param {google.container.v1.IMeshCertificates} message MeshCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MeshCertificates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) - $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1.MeshCertificates.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MeshCertificates - * @static - * @param {google.container.v1.IMeshCertificates} message MeshCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MeshCertificates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MeshCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MeshCertificates} MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MeshCertificates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MeshCertificates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MeshCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MeshCertificates} MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MeshCertificates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MeshCertificates message. - * @function verify - * @memberof google.container.v1.MeshCertificates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MeshCertificates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { - var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); - if (error) - return "enableCertificates." + error; - } - return null; - }; - - /** - * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MeshCertificates - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MeshCertificates} MeshCertificates - */ - MeshCertificates.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MeshCertificates) - return object; - var message = new $root.google.container.v1.MeshCertificates(); - if (object.enableCertificates != null) { - if (typeof object.enableCertificates !== "object") - throw TypeError(".google.container.v1.MeshCertificates.enableCertificates: object expected"); - message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); - } - return message; - }; - - /** - * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MeshCertificates - * @static - * @param {google.container.v1.MeshCertificates} message MeshCertificates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MeshCertificates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enableCertificates = null; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) - object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); - return object; - }; - - /** - * Converts this MeshCertificates to JSON. - * @function toJSON - * @memberof google.container.v1.MeshCertificates - * @instance - * @returns {Object.} JSON object - */ - MeshCertificates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MeshCertificates - * @function getTypeUrl - * @memberof google.container.v1.MeshCertificates - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MeshCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MeshCertificates"; - }; - - return MeshCertificates; - })(); - - v1.DatabaseEncryption = (function() { - - /** - * Properties of a DatabaseEncryption. - * @memberof google.container.v1 - * @interface IDatabaseEncryption - * @property {string|null} [keyName] DatabaseEncryption keyName - * @property {google.container.v1.DatabaseEncryption.State|null} [state] DatabaseEncryption state - * @property {google.container.v1.DatabaseEncryption.CurrentState|null} [currentState] DatabaseEncryption currentState - * @property {Array.|null} [decryptionKeys] DatabaseEncryption decryptionKeys - * @property {Array.|null} [lastOperationErrors] DatabaseEncryption lastOperationErrors - */ - - /** - * Constructs a new DatabaseEncryption. - * @memberof google.container.v1 - * @classdesc Represents a DatabaseEncryption. - * @implements IDatabaseEncryption - * @constructor - * @param {google.container.v1.IDatabaseEncryption=} [properties] Properties to set - */ - function DatabaseEncryption(properties) { - this.decryptionKeys = []; - this.lastOperationErrors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseEncryption keyName. - * @member {string} keyName - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.keyName = ""; - - /** - * DatabaseEncryption state. - * @member {google.container.v1.DatabaseEncryption.State} state - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.state = 0; - - /** - * DatabaseEncryption currentState. - * @member {google.container.v1.DatabaseEncryption.CurrentState|null|undefined} currentState - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.currentState = null; - - /** - * DatabaseEncryption decryptionKeys. - * @member {Array.} decryptionKeys - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.decryptionKeys = $util.emptyArray; - - /** - * DatabaseEncryption lastOperationErrors. - * @member {Array.} lastOperationErrors - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.lastOperationErrors = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DatabaseEncryption _currentState. - * @member {"currentState"|undefined} _currentState - * @memberof google.container.v1.DatabaseEncryption - * @instance - */ - Object.defineProperty(DatabaseEncryption.prototype, "_currentState", { - get: $util.oneOfGetter($oneOfFields = ["currentState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DatabaseEncryption instance using the specified properties. - * @function create - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {google.container.v1.IDatabaseEncryption=} [properties] Properties to set - * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption instance - */ - DatabaseEncryption.create = function create(properties) { - return new DatabaseEncryption(properties); - }; - - /** - * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {google.container.v1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.currentState != null && Object.hasOwnProperty.call(message, "currentState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currentState); - if (message.decryptionKeys != null && message.decryptionKeys.length) - for (var i = 0; i < message.decryptionKeys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.decryptionKeys[i]); - if (message.lastOperationErrors != null && message.lastOperationErrors.length) - for (var i = 0; i < message.lastOperationErrors.length; ++i) - $root.google.container.v1.DatabaseEncryption.OperationError.encode(message.lastOperationErrors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {google.container.v1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseEncryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DatabaseEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyName = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.currentState = reader.int32(); - break; - } - case 4: { - if (!(message.decryptionKeys && message.decryptionKeys.length)) - message.decryptionKeys = []; - message.decryptionKeys.push(reader.string()); - break; - } - case 5: { - if (!(message.lastOperationErrors && message.lastOperationErrors.length)) - message.lastOperationErrors = []; - message.lastOperationErrors.push($root.google.container.v1.DatabaseEncryption.OperationError.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseEncryption message. - * @function verify - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.currentState != null && message.hasOwnProperty("currentState")) { - properties._currentState = 1; - switch (message.currentState) { - default: - return "currentState: enum value expected"; - case 0: - case 7: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - } - if (message.decryptionKeys != null && message.hasOwnProperty("decryptionKeys")) { - if (!Array.isArray(message.decryptionKeys)) - return "decryptionKeys: array expected"; - for (var i = 0; i < message.decryptionKeys.length; ++i) - if (!$util.isString(message.decryptionKeys[i])) - return "decryptionKeys: string[] expected"; - } - if (message.lastOperationErrors != null && message.hasOwnProperty("lastOperationErrors")) { - if (!Array.isArray(message.lastOperationErrors)) - return "lastOperationErrors: array expected"; - for (var i = 0; i < message.lastOperationErrors.length; ++i) { - var error = $root.google.container.v1.DatabaseEncryption.OperationError.verify(message.lastOperationErrors[i]); - if (error) - return "lastOperationErrors." + error; - } - } - return null; - }; - - /** - * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DatabaseEncryption} DatabaseEncryption - */ - DatabaseEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DatabaseEncryption) - return object; - var message = new $root.google.container.v1.DatabaseEncryption(); - if (object.keyName != null) - message.keyName = String(object.keyName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "UNKNOWN": - case 0: - message.state = 0; - break; - case "ENCRYPTED": - case 1: - message.state = 1; - break; - case "DECRYPTED": - case 2: - message.state = 2; - break; - } - switch (object.currentState) { - default: - if (typeof object.currentState === "number") { - message.currentState = object.currentState; - break; - } - break; - case "CURRENT_STATE_UNSPECIFIED": - case 0: - message.currentState = 0; - break; - case "CURRENT_STATE_ENCRYPTED": - case 7: - message.currentState = 7; - break; - case "CURRENT_STATE_DECRYPTED": - case 2: - message.currentState = 2; - break; - case "CURRENT_STATE_ENCRYPTION_PENDING": - case 3: - message.currentState = 3; - break; - case "CURRENT_STATE_ENCRYPTION_ERROR": - case 4: - message.currentState = 4; - break; - case "CURRENT_STATE_DECRYPTION_PENDING": - case 5: - message.currentState = 5; - break; - case "CURRENT_STATE_DECRYPTION_ERROR": - case 6: - message.currentState = 6; - break; - } - if (object.decryptionKeys) { - if (!Array.isArray(object.decryptionKeys)) - throw TypeError(".google.container.v1.DatabaseEncryption.decryptionKeys: array expected"); - message.decryptionKeys = []; - for (var i = 0; i < object.decryptionKeys.length; ++i) - message.decryptionKeys[i] = String(object.decryptionKeys[i]); - } - if (object.lastOperationErrors) { - if (!Array.isArray(object.lastOperationErrors)) - throw TypeError(".google.container.v1.DatabaseEncryption.lastOperationErrors: array expected"); - message.lastOperationErrors = []; - for (var i = 0; i < object.lastOperationErrors.length; ++i) { - if (typeof object.lastOperationErrors[i] !== "object") - throw TypeError(".google.container.v1.DatabaseEncryption.lastOperationErrors: object expected"); - message.lastOperationErrors[i] = $root.google.container.v1.DatabaseEncryption.OperationError.fromObject(object.lastOperationErrors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {google.container.v1.DatabaseEncryption} message DatabaseEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.decryptionKeys = []; - object.lastOperationErrors = []; - } - if (options.defaults) { - object.keyName = ""; - object.state = options.enums === String ? "UNKNOWN" : 0; - } - if (message.keyName != null && message.hasOwnProperty("keyName")) - object.keyName = message.keyName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.container.v1.DatabaseEncryption.State[message.state] === undefined ? message.state : $root.google.container.v1.DatabaseEncryption.State[message.state] : message.state; - if (message.currentState != null && message.hasOwnProperty("currentState")) { - object.currentState = options.enums === String ? $root.google.container.v1.DatabaseEncryption.CurrentState[message.currentState] === undefined ? message.currentState : $root.google.container.v1.DatabaseEncryption.CurrentState[message.currentState] : message.currentState; - if (options.oneofs) - object._currentState = "currentState"; - } - if (message.decryptionKeys && message.decryptionKeys.length) { - object.decryptionKeys = []; - for (var j = 0; j < message.decryptionKeys.length; ++j) - object.decryptionKeys[j] = message.decryptionKeys[j]; - } - if (message.lastOperationErrors && message.lastOperationErrors.length) { - object.lastOperationErrors = []; - for (var j = 0; j < message.lastOperationErrors.length; ++j) - object.lastOperationErrors[j] = $root.google.container.v1.DatabaseEncryption.OperationError.toObject(message.lastOperationErrors[j], options); - } - return object; - }; - - /** - * Converts this DatabaseEncryption to JSON. - * @function toJSON - * @memberof google.container.v1.DatabaseEncryption - * @instance - * @returns {Object.} JSON object - */ - DatabaseEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseEncryption - * @function getTypeUrl - * @memberof google.container.v1.DatabaseEncryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DatabaseEncryption"; - }; - - /** - * State enum. - * @name google.container.v1.DatabaseEncryption.State - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ENCRYPTED=1 ENCRYPTED value - * @property {number} DECRYPTED=2 DECRYPTED value - */ - DatabaseEncryption.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ENCRYPTED"] = 1; - values[valuesById[2] = "DECRYPTED"] = 2; - return values; - })(); - - /** - * CurrentState enum. - * @name google.container.v1.DatabaseEncryption.CurrentState - * @enum {number} - * @property {number} CURRENT_STATE_UNSPECIFIED=0 CURRENT_STATE_UNSPECIFIED value - * @property {number} CURRENT_STATE_ENCRYPTED=7 CURRENT_STATE_ENCRYPTED value - * @property {number} CURRENT_STATE_DECRYPTED=2 CURRENT_STATE_DECRYPTED value - * @property {number} CURRENT_STATE_ENCRYPTION_PENDING=3 CURRENT_STATE_ENCRYPTION_PENDING value - * @property {number} CURRENT_STATE_ENCRYPTION_ERROR=4 CURRENT_STATE_ENCRYPTION_ERROR value - * @property {number} CURRENT_STATE_DECRYPTION_PENDING=5 CURRENT_STATE_DECRYPTION_PENDING value - * @property {number} CURRENT_STATE_DECRYPTION_ERROR=6 CURRENT_STATE_DECRYPTION_ERROR value - */ - DatabaseEncryption.CurrentState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CURRENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[7] = "CURRENT_STATE_ENCRYPTED"] = 7; - values[valuesById[2] = "CURRENT_STATE_DECRYPTED"] = 2; - values[valuesById[3] = "CURRENT_STATE_ENCRYPTION_PENDING"] = 3; - values[valuesById[4] = "CURRENT_STATE_ENCRYPTION_ERROR"] = 4; - values[valuesById[5] = "CURRENT_STATE_DECRYPTION_PENDING"] = 5; - values[valuesById[6] = "CURRENT_STATE_DECRYPTION_ERROR"] = 6; - return values; - })(); - - DatabaseEncryption.OperationError = (function() { - - /** - * Properties of an OperationError. - * @memberof google.container.v1.DatabaseEncryption - * @interface IOperationError - * @property {string|null} [keyName] OperationError keyName - * @property {string|null} [errorMessage] OperationError errorMessage - * @property {google.protobuf.ITimestamp|null} [timestamp] OperationError timestamp - */ - - /** - * Constructs a new OperationError. - * @memberof google.container.v1.DatabaseEncryption - * @classdesc Represents an OperationError. - * @implements IOperationError - * @constructor - * @param {google.container.v1.DatabaseEncryption.IOperationError=} [properties] Properties to set - */ - function OperationError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationError keyName. - * @member {string} keyName - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.keyName = ""; - - /** - * OperationError errorMessage. - * @member {string} errorMessage - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.errorMessage = ""; - - /** - * OperationError timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.timestamp = null; - - /** - * Creates a new OperationError instance using the specified properties. - * @function create - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1.DatabaseEncryption.IOperationError=} [properties] Properties to set - * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError instance - */ - OperationError.create = function create(properties) { - return new OperationError(properties); - }; - - /** - * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1.DatabaseEncryption.OperationError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationError message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DatabaseEncryption.OperationError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyName = reader.string(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - case 3: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationError message. - * @function verify - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - return null; - }; - - /** - * Creates an OperationError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DatabaseEncryption.OperationError} OperationError - */ - OperationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DatabaseEncryption.OperationError) - return object; - var message = new $root.google.container.v1.DatabaseEncryption.OperationError(); - if (object.keyName != null) - message.keyName = String(object.keyName); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.container.v1.DatabaseEncryption.OperationError.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - return message; - }; - - /** - * Creates a plain object from an OperationError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1.DatabaseEncryption.OperationError} message OperationError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyName = ""; - object.errorMessage = ""; - object.timestamp = null; - } - if (message.keyName != null && message.hasOwnProperty("keyName")) - object.keyName = message.keyName; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - return object; - }; - - /** - * Converts this OperationError to JSON. - * @function toJSON - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @instance - * @returns {Object.} JSON object - */ - OperationError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationError - * @function getTypeUrl - * @memberof google.container.v1.DatabaseEncryption.OperationError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DatabaseEncryption.OperationError"; - }; - - return OperationError; - })(); - - return DatabaseEncryption; - })(); - - v1.ListUsableSubnetworksRequest = (function() { - - /** - * Properties of a ListUsableSubnetworksRequest. - * @memberof google.container.v1 - * @interface IListUsableSubnetworksRequest - * @property {string|null} [parent] ListUsableSubnetworksRequest parent - * @property {string|null} [filter] ListUsableSubnetworksRequest filter - * @property {number|null} [pageSize] ListUsableSubnetworksRequest pageSize - * @property {string|null} [pageToken] ListUsableSubnetworksRequest pageToken - */ - - /** - * Constructs a new ListUsableSubnetworksRequest. - * @memberof google.container.v1 - * @classdesc Represents a ListUsableSubnetworksRequest. - * @implements IListUsableSubnetworksRequest - * @constructor - * @param {google.container.v1.IListUsableSubnetworksRequest=} [properties] Properties to set - */ - function ListUsableSubnetworksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUsableSubnetworksRequest parent. - * @member {string} parent - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.parent = ""; - - /** - * ListUsableSubnetworksRequest filter. - * @member {string} filter - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.filter = ""; - - /** - * ListUsableSubnetworksRequest pageSize. - * @member {number} pageSize - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.pageSize = 0; - - /** - * ListUsableSubnetworksRequest pageToken. - * @member {string} pageToken - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUsableSubnetworksRequest instance using the specified properties. - * @function create - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1.IListUsableSubnetworksRequest=} [properties] Properties to set - * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest instance - */ - ListUsableSubnetworksRequest.create = function create(properties) { - return new ListUsableSubnetworksRequest(properties); - }; - - /** - * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListUsableSubnetworksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUsableSubnetworksRequest message. - * @function verify - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUsableSubnetworksRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - */ - ListUsableSubnetworksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListUsableSubnetworksRequest) - return object; - var message = new $root.google.container.v1.ListUsableSubnetworksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1.ListUsableSubnetworksRequest} message ListUsableSubnetworksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUsableSubnetworksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUsableSubnetworksRequest to JSON. - * @function toJSON - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @instance - * @returns {Object.} JSON object - */ - ListUsableSubnetworksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUsableSubnetworksRequest - * @function getTypeUrl - * @memberof google.container.v1.ListUsableSubnetworksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUsableSubnetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListUsableSubnetworksRequest"; - }; - - return ListUsableSubnetworksRequest; - })(); - - v1.ListUsableSubnetworksResponse = (function() { - - /** - * Properties of a ListUsableSubnetworksResponse. - * @memberof google.container.v1 - * @interface IListUsableSubnetworksResponse - * @property {Array.|null} [subnetworks] ListUsableSubnetworksResponse subnetworks - * @property {string|null} [nextPageToken] ListUsableSubnetworksResponse nextPageToken - */ - - /** - * Constructs a new ListUsableSubnetworksResponse. - * @memberof google.container.v1 - * @classdesc Represents a ListUsableSubnetworksResponse. - * @implements IListUsableSubnetworksResponse - * @constructor - * @param {google.container.v1.IListUsableSubnetworksResponse=} [properties] Properties to set - */ - function ListUsableSubnetworksResponse(properties) { - this.subnetworks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUsableSubnetworksResponse subnetworks. - * @member {Array.} subnetworks - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @instance - */ - ListUsableSubnetworksResponse.prototype.subnetworks = $util.emptyArray; - - /** - * ListUsableSubnetworksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @instance - */ - ListUsableSubnetworksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUsableSubnetworksResponse instance using the specified properties. - * @function create - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1.IListUsableSubnetworksResponse=} [properties] Properties to set - * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse instance - */ - ListUsableSubnetworksResponse.create = function create(properties) { - return new ListUsableSubnetworksResponse(properties); - }; - - /** - * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetworks != null && message.subnetworks.length) - for (var i = 0; i < message.subnetworks.length; ++i) - $root.google.container.v1.UsableSubnetwork.encode(message.subnetworks[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 ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1.ListUsableSubnetworksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ListUsableSubnetworksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.subnetworks && message.subnetworks.length)) - message.subnetworks = []; - message.subnetworks.push($root.google.container.v1.UsableSubnetwork.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUsableSubnetworksResponse message. - * @function verify - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUsableSubnetworksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subnetworks != null && message.hasOwnProperty("subnetworks")) { - if (!Array.isArray(message.subnetworks)) - return "subnetworks: array expected"; - for (var i = 0; i < message.subnetworks.length; ++i) { - var error = $root.google.container.v1.UsableSubnetwork.verify(message.subnetworks[i]); - if (error) - return "subnetworks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - */ - ListUsableSubnetworksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ListUsableSubnetworksResponse) - return object; - var message = new $root.google.container.v1.ListUsableSubnetworksResponse(); - if (object.subnetworks) { - if (!Array.isArray(object.subnetworks)) - throw TypeError(".google.container.v1.ListUsableSubnetworksResponse.subnetworks: array expected"); - message.subnetworks = []; - for (var i = 0; i < object.subnetworks.length; ++i) { - if (typeof object.subnetworks[i] !== "object") - throw TypeError(".google.container.v1.ListUsableSubnetworksResponse.subnetworks: object expected"); - message.subnetworks[i] = $root.google.container.v1.UsableSubnetwork.fromObject(object.subnetworks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1.ListUsableSubnetworksResponse} message ListUsableSubnetworksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUsableSubnetworksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subnetworks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.subnetworks && message.subnetworks.length) { - object.subnetworks = []; - for (var j = 0; j < message.subnetworks.length; ++j) - object.subnetworks[j] = $root.google.container.v1.UsableSubnetwork.toObject(message.subnetworks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUsableSubnetworksResponse to JSON. - * @function toJSON - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @instance - * @returns {Object.} JSON object - */ - ListUsableSubnetworksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUsableSubnetworksResponse - * @function getTypeUrl - * @memberof google.container.v1.ListUsableSubnetworksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUsableSubnetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ListUsableSubnetworksResponse"; - }; - - return ListUsableSubnetworksResponse; - })(); - - v1.UsableSubnetworkSecondaryRange = (function() { - - /** - * Properties of a UsableSubnetworkSecondaryRange. - * @memberof google.container.v1 - * @interface IUsableSubnetworkSecondaryRange - * @property {string|null} [rangeName] UsableSubnetworkSecondaryRange rangeName - * @property {string|null} [ipCidrRange] UsableSubnetworkSecondaryRange ipCidrRange - * @property {google.container.v1.UsableSubnetworkSecondaryRange.Status|null} [status] UsableSubnetworkSecondaryRange status - */ - - /** - * Constructs a new UsableSubnetworkSecondaryRange. - * @memberof google.container.v1 - * @classdesc Represents a UsableSubnetworkSecondaryRange. - * @implements IUsableSubnetworkSecondaryRange - * @constructor - * @param {google.container.v1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set - */ - function UsableSubnetworkSecondaryRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsableSubnetworkSecondaryRange rangeName. - * @member {string} rangeName - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.rangeName = ""; - - /** - * UsableSubnetworkSecondaryRange ipCidrRange. - * @member {string} ipCidrRange - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.ipCidrRange = ""; - - /** - * UsableSubnetworkSecondaryRange status. - * @member {google.container.v1.UsableSubnetworkSecondaryRange.Status} status - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.status = 0; - - /** - * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. - * @function create - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set - * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange instance - */ - UsableSubnetworkSecondaryRange.create = function create(properties) { - return new UsableSubnetworkSecondaryRange(properties); - }; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetworkSecondaryRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipCidrRange); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); - return writer; - }; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetworkSecondaryRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetworkSecondaryRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UsableSubnetworkSecondaryRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rangeName = reader.string(); - break; - } - case 2: { - message.ipCidrRange = reader.string(); - break; - } - case 3: { - message.status = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetworkSecondaryRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsableSubnetworkSecondaryRange message. - * @function verify - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsableSubnetworkSecondaryRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - if (!$util.isString(message.rangeName)) - return "rangeName: string expected"; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - */ - UsableSubnetworkSecondaryRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UsableSubnetworkSecondaryRange) - return object; - var message = new $root.google.container.v1.UsableSubnetworkSecondaryRange(); - if (object.rangeName != null) - message.rangeName = String(object.rangeName); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "UNKNOWN": - case 0: - message.status = 0; - break; - case "UNUSED": - case 1: - message.status = 1; - break; - case "IN_USE_SERVICE": - case 2: - message.status = 2; - break; - case "IN_USE_SHAREABLE_POD": - case 3: - message.status = 3; - break; - case "IN_USE_MANAGED_POD": - case 4: - message.status = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1.UsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsableSubnetworkSecondaryRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rangeName = ""; - object.ipCidrRange = ""; - object.status = options.enums === String ? "UNKNOWN" : 0; - } - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - object.rangeName = message.rangeName; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - object.ipCidrRange = message.ipCidrRange; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1.UsableSubnetworkSecondaryRange.Status[message.status] === undefined ? message.status : $root.google.container.v1.UsableSubnetworkSecondaryRange.Status[message.status] : message.status; - return object; - }; - - /** - * Converts this UsableSubnetworkSecondaryRange to JSON. - * @function toJSON - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @instance - * @returns {Object.} JSON object - */ - UsableSubnetworkSecondaryRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsableSubnetworkSecondaryRange - * @function getTypeUrl - * @memberof google.container.v1.UsableSubnetworkSecondaryRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsableSubnetworkSecondaryRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UsableSubnetworkSecondaryRange"; - }; - - /** - * Status enum. - * @name google.container.v1.UsableSubnetworkSecondaryRange.Status - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} UNUSED=1 UNUSED value - * @property {number} IN_USE_SERVICE=2 IN_USE_SERVICE value - * @property {number} IN_USE_SHAREABLE_POD=3 IN_USE_SHAREABLE_POD value - * @property {number} IN_USE_MANAGED_POD=4 IN_USE_MANAGED_POD value - */ - UsableSubnetworkSecondaryRange.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "UNUSED"] = 1; - values[valuesById[2] = "IN_USE_SERVICE"] = 2; - values[valuesById[3] = "IN_USE_SHAREABLE_POD"] = 3; - values[valuesById[4] = "IN_USE_MANAGED_POD"] = 4; - return values; - })(); - - return UsableSubnetworkSecondaryRange; - })(); - - v1.UsableSubnetwork = (function() { - - /** - * Properties of a UsableSubnetwork. - * @memberof google.container.v1 - * @interface IUsableSubnetwork - * @property {string|null} [subnetwork] UsableSubnetwork subnetwork - * @property {string|null} [network] UsableSubnetwork network - * @property {string|null} [ipCidrRange] UsableSubnetwork ipCidrRange - * @property {Array.|null} [secondaryIpRanges] UsableSubnetwork secondaryIpRanges - * @property {string|null} [statusMessage] UsableSubnetwork statusMessage - */ - - /** - * Constructs a new UsableSubnetwork. - * @memberof google.container.v1 - * @classdesc Represents a UsableSubnetwork. - * @implements IUsableSubnetwork - * @constructor - * @param {google.container.v1.IUsableSubnetwork=} [properties] Properties to set - */ - function UsableSubnetwork(properties) { - this.secondaryIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsableSubnetwork subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.subnetwork = ""; - - /** - * UsableSubnetwork network. - * @member {string} network - * @memberof google.container.v1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.network = ""; - - /** - * UsableSubnetwork ipCidrRange. - * @member {string} ipCidrRange - * @memberof google.container.v1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.ipCidrRange = ""; - - /** - * UsableSubnetwork secondaryIpRanges. - * @member {Array.} secondaryIpRanges - * @memberof google.container.v1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.secondaryIpRanges = $util.emptyArray; - - /** - * UsableSubnetwork statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.statusMessage = ""; - - /** - * Creates a new UsableSubnetwork instance using the specified properties. - * @function create - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {google.container.v1.IUsableSubnetwork=} [properties] Properties to set - * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork instance - */ - UsableSubnetwork.create = function create(properties) { - return new UsableSubnetwork(properties); - }; - - /** - * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {google.container.v1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetwork.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipCidrRange); - if (message.secondaryIpRanges != null && message.secondaryIpRanges.length) - for (var i = 0; i < message.secondaryIpRanges.length; ++i) - $root.google.container.v1.UsableSubnetworkSecondaryRange.encode(message.secondaryIpRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - return writer; - }; - - /** - * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1.UsableSubnetwork.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {google.container.v1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetwork.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetwork.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UsableSubnetwork(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.subnetwork = reader.string(); - break; - } - case 2: { - message.network = reader.string(); - break; - } - case 3: { - message.ipCidrRange = reader.string(); - break; - } - case 4: { - if (!(message.secondaryIpRanges && message.secondaryIpRanges.length)) - message.secondaryIpRanges = []; - message.secondaryIpRanges.push($root.google.container.v1.UsableSubnetworkSecondaryRange.decode(reader, reader.uint32())); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetwork.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsableSubnetwork message. - * @function verify - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsableSubnetwork.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - if (message.secondaryIpRanges != null && message.hasOwnProperty("secondaryIpRanges")) { - if (!Array.isArray(message.secondaryIpRanges)) - return "secondaryIpRanges: array expected"; - for (var i = 0; i < message.secondaryIpRanges.length; ++i) { - var error = $root.google.container.v1.UsableSubnetworkSecondaryRange.verify(message.secondaryIpRanges[i]); - if (error) - return "secondaryIpRanges." + error; - } - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - return null; - }; - - /** - * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UsableSubnetwork} UsableSubnetwork - */ - UsableSubnetwork.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UsableSubnetwork) - return object; - var message = new $root.google.container.v1.UsableSubnetwork(); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.network != null) - message.network = String(object.network); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.secondaryIpRanges) { - if (!Array.isArray(object.secondaryIpRanges)) - throw TypeError(".google.container.v1.UsableSubnetwork.secondaryIpRanges: array expected"); - message.secondaryIpRanges = []; - for (var i = 0; i < object.secondaryIpRanges.length; ++i) { - if (typeof object.secondaryIpRanges[i] !== "object") - throw TypeError(".google.container.v1.UsableSubnetwork.secondaryIpRanges: object expected"); - message.secondaryIpRanges[i] = $root.google.container.v1.UsableSubnetworkSecondaryRange.fromObject(object.secondaryIpRanges[i]); - } - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - return message; - }; - - /** - * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {google.container.v1.UsableSubnetwork} message UsableSubnetwork - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsableSubnetwork.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.secondaryIpRanges = []; - if (options.defaults) { - object.subnetwork = ""; - object.network = ""; - object.ipCidrRange = ""; - object.statusMessage = ""; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - object.ipCidrRange = message.ipCidrRange; - if (message.secondaryIpRanges && message.secondaryIpRanges.length) { - object.secondaryIpRanges = []; - for (var j = 0; j < message.secondaryIpRanges.length; ++j) - object.secondaryIpRanges[j] = $root.google.container.v1.UsableSubnetworkSecondaryRange.toObject(message.secondaryIpRanges[j], options); - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - return object; - }; - - /** - * Converts this UsableSubnetwork to JSON. - * @function toJSON - * @memberof google.container.v1.UsableSubnetwork - * @instance - * @returns {Object.} JSON object - */ - UsableSubnetwork.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsableSubnetwork - * @function getTypeUrl - * @memberof google.container.v1.UsableSubnetwork - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsableSubnetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UsableSubnetwork"; - }; - - return UsableSubnetwork; - })(); - - v1.ResourceUsageExportConfig = (function() { - - /** - * Properties of a ResourceUsageExportConfig. - * @memberof google.container.v1 - * @interface IResourceUsageExportConfig - * @property {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null} [bigqueryDestination] ResourceUsageExportConfig bigqueryDestination - * @property {boolean|null} [enableNetworkEgressMetering] ResourceUsageExportConfig enableNetworkEgressMetering - * @property {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null} [consumptionMeteringConfig] ResourceUsageExportConfig consumptionMeteringConfig - */ - - /** - * Constructs a new ResourceUsageExportConfig. - * @memberof google.container.v1 - * @classdesc Represents a ResourceUsageExportConfig. - * @implements IResourceUsageExportConfig - * @constructor - * @param {google.container.v1.IResourceUsageExportConfig=} [properties] Properties to set - */ - function ResourceUsageExportConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceUsageExportConfig bigqueryDestination. - * @member {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.container.v1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.bigqueryDestination = null; - - /** - * ResourceUsageExportConfig enableNetworkEgressMetering. - * @member {boolean} enableNetworkEgressMetering - * @memberof google.container.v1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.enableNetworkEgressMetering = false; - - /** - * ResourceUsageExportConfig consumptionMeteringConfig. - * @member {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null|undefined} consumptionMeteringConfig - * @memberof google.container.v1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.consumptionMeteringConfig = null; - - /** - * Creates a new ResourceUsageExportConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {google.container.v1.IResourceUsageExportConfig=} [properties] Properties to set - * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig instance - */ - ResourceUsageExportConfig.create = function create(properties) { - return new ResourceUsageExportConfig(properties); - }; - - /** - * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {google.container.v1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceUsageExportConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryDestination != null && Object.hasOwnProperty.call(message, "bigqueryDestination")) - $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.enableNetworkEgressMetering != null && Object.hasOwnProperty.call(message, "enableNetworkEgressMetering")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNetworkEgressMetering); - if (message.consumptionMeteringConfig != null && Object.hasOwnProperty.call(message, "consumptionMeteringConfig")) - $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.encode(message.consumptionMeteringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {google.container.v1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceUsageExportConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceUsageExportConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.decode(reader, reader.uint32()); - break; - } - case 2: { - message.enableNetworkEgressMetering = reader.bool(); - break; - } - case 3: { - message.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceUsageExportConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceUsageExportConfig message. - * @function verify - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceUsageExportConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - var error = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify(message.bigqueryDestination); - if (error) - return "bigqueryDestination." + error; - } - if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) - if (typeof message.enableNetworkEgressMetering !== "boolean") - return "enableNetworkEgressMetering: boolean expected"; - if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) { - var error = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify(message.consumptionMeteringConfig); - if (error) - return "consumptionMeteringConfig." + error; - } - return null; - }; - - /** - * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceUsageExportConfig} ResourceUsageExportConfig - */ - ResourceUsageExportConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceUsageExportConfig) - return object; - var message = new $root.google.container.v1.ResourceUsageExportConfig(); - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.container.v1.ResourceUsageExportConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.fromObject(object.bigqueryDestination); - } - if (object.enableNetworkEgressMetering != null) - message.enableNetworkEgressMetering = Boolean(object.enableNetworkEgressMetering); - if (object.consumptionMeteringConfig != null) { - if (typeof object.consumptionMeteringConfig !== "object") - throw TypeError(".google.container.v1.ResourceUsageExportConfig.consumptionMeteringConfig: object expected"); - message.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.fromObject(object.consumptionMeteringConfig); - } - return message; - }; - - /** - * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {google.container.v1.ResourceUsageExportConfig} message ResourceUsageExportConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceUsageExportConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bigqueryDestination = null; - object.enableNetworkEgressMetering = false; - object.consumptionMeteringConfig = null; - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - object.bigqueryDestination = $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination.toObject(message.bigqueryDestination, options); - if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) - object.enableNetworkEgressMetering = message.enableNetworkEgressMetering; - if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) - object.consumptionMeteringConfig = $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.toObject(message.consumptionMeteringConfig, options); - return object; - }; - - /** - * Converts this ResourceUsageExportConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceUsageExportConfig - * @instance - * @returns {Object.} JSON object - */ - ResourceUsageExportConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceUsageExportConfig - * @function getTypeUrl - * @memberof google.container.v1.ResourceUsageExportConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceUsageExportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig"; - }; - - ResourceUsageExportConfig.BigQueryDestination = (function() { - - /** - * Properties of a BigQueryDestination. - * @memberof google.container.v1.ResourceUsageExportConfig - * @interface IBigQueryDestination - * @property {string|null} [datasetId] BigQueryDestination datasetId - */ - - /** - * Constructs a new BigQueryDestination. - * @memberof google.container.v1.ResourceUsageExportConfig - * @classdesc Represents a BigQueryDestination. - * @implements IBigQueryDestination - * @constructor - * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set - */ - function BigQueryDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryDestination datasetId. - * @member {string} datasetId - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @instance - */ - BigQueryDestination.prototype.datasetId = ""; - - /** - * Creates a new BigQueryDestination instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set - * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination instance - */ - BigQueryDestination.create = function create(properties) { - return new BigQueryDestination(properties); - }; - - /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); - return writer; - }; - - /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.datasetId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDestination message. - * @function verify - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; - return null; - }; - - /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - */ - BigQueryDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination) - return object; - var message = new $root.google.container.v1.ResourceUsageExportConfig.BigQueryDestination(); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - return message; - }; - - /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1.ResourceUsageExportConfig.BigQueryDestination} message BigQueryDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetId = ""; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - return object; - }; - - /** - * Converts this BigQueryDestination to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @instance - * @returns {Object.} JSON object - */ - BigQueryDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDestination - * @function getTypeUrl - * @memberof google.container.v1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig.BigQueryDestination"; - }; - - return BigQueryDestination; - })(); - - ResourceUsageExportConfig.ConsumptionMeteringConfig = (function() { - - /** - * Properties of a ConsumptionMeteringConfig. - * @memberof google.container.v1.ResourceUsageExportConfig - * @interface IConsumptionMeteringConfig - * @property {boolean|null} [enabled] ConsumptionMeteringConfig enabled - */ - - /** - * Constructs a new ConsumptionMeteringConfig. - * @memberof google.container.v1.ResourceUsageExportConfig - * @classdesc Represents a ConsumptionMeteringConfig. - * @implements IConsumptionMeteringConfig - * @constructor - * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set - */ - function ConsumptionMeteringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsumptionMeteringConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @instance - */ - ConsumptionMeteringConfig.prototype.enabled = false; - - /** - * Creates a new ConsumptionMeteringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set - * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig instance - */ - ConsumptionMeteringConfig.create = function create(properties) { - return new ConsumptionMeteringConfig(properties); - }; - - /** - * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsumptionMeteringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsumptionMeteringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsumptionMeteringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsumptionMeteringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsumptionMeteringConfig message. - * @function verify - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsumptionMeteringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - */ - ConsumptionMeteringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig) - return object; - var message = new $root.google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig} message ConsumptionMeteringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsumptionMeteringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConsumptionMeteringConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @instance - * @returns {Object.} JSON object - */ - ConsumptionMeteringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConsumptionMeteringConfig - * @function getTypeUrl - * @memberof google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConsumptionMeteringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig"; - }; - - return ConsumptionMeteringConfig; - })(); - - return ResourceUsageExportConfig; - })(); - - v1.VerticalPodAutoscaling = (function() { - - /** - * Properties of a VerticalPodAutoscaling. - * @memberof google.container.v1 - * @interface IVerticalPodAutoscaling - * @property {boolean|null} [enabled] VerticalPodAutoscaling enabled - */ - - /** - * Constructs a new VerticalPodAutoscaling. - * @memberof google.container.v1 - * @classdesc Represents a VerticalPodAutoscaling. - * @implements IVerticalPodAutoscaling - * @constructor - * @param {google.container.v1.IVerticalPodAutoscaling=} [properties] Properties to set - */ - function VerticalPodAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerticalPodAutoscaling enabled. - * @member {boolean} enabled - * @memberof google.container.v1.VerticalPodAutoscaling - * @instance - */ - VerticalPodAutoscaling.prototype.enabled = false; - - /** - * Creates a new VerticalPodAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {google.container.v1.IVerticalPodAutoscaling=} [properties] Properties to set - * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling instance - */ - VerticalPodAutoscaling.create = function create(properties) { - return new VerticalPodAutoscaling(properties); - }; - - /** - * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {google.container.v1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerticalPodAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1.VerticalPodAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {google.container.v1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerticalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerticalPodAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.VerticalPodAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerticalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerticalPodAutoscaling message. - * @function verify - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerticalPodAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.VerticalPodAutoscaling} VerticalPodAutoscaling - */ - VerticalPodAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.VerticalPodAutoscaling) - return object; - var message = new $root.google.container.v1.VerticalPodAutoscaling(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {google.container.v1.VerticalPodAutoscaling} message VerticalPodAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerticalPodAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this VerticalPodAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1.VerticalPodAutoscaling - * @instance - * @returns {Object.} JSON object - */ - VerticalPodAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VerticalPodAutoscaling - * @function getTypeUrl - * @memberof google.container.v1.VerticalPodAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VerticalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.VerticalPodAutoscaling"; - }; - - return VerticalPodAutoscaling; - })(); - - v1.DefaultSnatStatus = (function() { - - /** - * Properties of a DefaultSnatStatus. - * @memberof google.container.v1 - * @interface IDefaultSnatStatus - * @property {boolean|null} [disabled] DefaultSnatStatus disabled - */ - - /** - * Constructs a new DefaultSnatStatus. - * @memberof google.container.v1 - * @classdesc Represents a DefaultSnatStatus. - * @implements IDefaultSnatStatus - * @constructor - * @param {google.container.v1.IDefaultSnatStatus=} [properties] Properties to set - */ - function DefaultSnatStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DefaultSnatStatus disabled. - * @member {boolean} disabled - * @memberof google.container.v1.DefaultSnatStatus - * @instance - */ - DefaultSnatStatus.prototype.disabled = false; - - /** - * Creates a new DefaultSnatStatus instance using the specified properties. - * @function create - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {google.container.v1.IDefaultSnatStatus=} [properties] Properties to set - * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus instance - */ - DefaultSnatStatus.create = function create(properties) { - return new DefaultSnatStatus(properties); - }; - - /** - * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. - * @function encode - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {google.container.v1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DefaultSnatStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1.DefaultSnatStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {google.container.v1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DefaultSnatStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DefaultSnatStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DefaultSnatStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DefaultSnatStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DefaultSnatStatus message. - * @function verify - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DefaultSnatStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.DefaultSnatStatus} DefaultSnatStatus - */ - DefaultSnatStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.DefaultSnatStatus) - return object; - var message = new $root.google.container.v1.DefaultSnatStatus(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {google.container.v1.DefaultSnatStatus} message DefaultSnatStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DefaultSnatStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this DefaultSnatStatus to JSON. - * @function toJSON - * @memberof google.container.v1.DefaultSnatStatus - * @instance - * @returns {Object.} JSON object - */ - DefaultSnatStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DefaultSnatStatus - * @function getTypeUrl - * @memberof google.container.v1.DefaultSnatStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DefaultSnatStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.DefaultSnatStatus"; - }; - - return DefaultSnatStatus; - })(); - - v1.ShieldedNodes = (function() { - - /** - * Properties of a ShieldedNodes. - * @memberof google.container.v1 - * @interface IShieldedNodes - * @property {boolean|null} [enabled] ShieldedNodes enabled - */ - - /** - * Constructs a new ShieldedNodes. - * @memberof google.container.v1 - * @classdesc Represents a ShieldedNodes. - * @implements IShieldedNodes - * @constructor - * @param {google.container.v1.IShieldedNodes=} [properties] Properties to set - */ - function ShieldedNodes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShieldedNodes enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ShieldedNodes - * @instance - */ - ShieldedNodes.prototype.enabled = false; - - /** - * Creates a new ShieldedNodes instance using the specified properties. - * @function create - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {google.container.v1.IShieldedNodes=} [properties] Properties to set - * @returns {google.container.v1.ShieldedNodes} ShieldedNodes instance - */ - ShieldedNodes.create = function create(properties) { - return new ShieldedNodes(properties); - }; - - /** - * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {google.container.v1.IShieldedNodes} message ShieldedNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedNodes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1.ShieldedNodes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {google.container.v1.IShieldedNodes} message ShieldedNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedNodes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ShieldedNodes} ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedNodes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ShieldedNodes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ShieldedNodes} ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedNodes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShieldedNodes message. - * @function verify - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShieldedNodes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ShieldedNodes} ShieldedNodes - */ - ShieldedNodes.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ShieldedNodes) - return object; - var message = new $root.google.container.v1.ShieldedNodes(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {google.container.v1.ShieldedNodes} message ShieldedNodes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShieldedNodes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ShieldedNodes to JSON. - * @function toJSON - * @memberof google.container.v1.ShieldedNodes - * @instance - * @returns {Object.} JSON object - */ - ShieldedNodes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShieldedNodes - * @function getTypeUrl - * @memberof google.container.v1.ShieldedNodes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShieldedNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ShieldedNodes"; - }; - - return ShieldedNodes; - })(); - - v1.VirtualNIC = (function() { - - /** - * Properties of a VirtualNIC. - * @memberof google.container.v1 - * @interface IVirtualNIC - * @property {boolean|null} [enabled] VirtualNIC enabled - */ - - /** - * Constructs a new VirtualNIC. - * @memberof google.container.v1 - * @classdesc Represents a VirtualNIC. - * @implements IVirtualNIC - * @constructor - * @param {google.container.v1.IVirtualNIC=} [properties] Properties to set - */ - function VirtualNIC(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VirtualNIC enabled. - * @member {boolean} enabled - * @memberof google.container.v1.VirtualNIC - * @instance - */ - VirtualNIC.prototype.enabled = false; - - /** - * Creates a new VirtualNIC instance using the specified properties. - * @function create - * @memberof google.container.v1.VirtualNIC - * @static - * @param {google.container.v1.IVirtualNIC=} [properties] Properties to set - * @returns {google.container.v1.VirtualNIC} VirtualNIC instance - */ - VirtualNIC.create = function create(properties) { - return new VirtualNIC(properties); - }; - - /** - * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. - * @function encode - * @memberof google.container.v1.VirtualNIC - * @static - * @param {google.container.v1.IVirtualNIC} message VirtualNIC message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualNIC.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1.VirtualNIC.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.VirtualNIC - * @static - * @param {google.container.v1.IVirtualNIC} message VirtualNIC message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualNIC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.VirtualNIC - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.VirtualNIC} VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualNIC.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.VirtualNIC(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.VirtualNIC - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.VirtualNIC} VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualNIC.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VirtualNIC message. - * @function verify - * @memberof google.container.v1.VirtualNIC - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VirtualNIC.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.VirtualNIC - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.VirtualNIC} VirtualNIC - */ - VirtualNIC.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.VirtualNIC) - return object; - var message = new $root.google.container.v1.VirtualNIC(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.VirtualNIC - * @static - * @param {google.container.v1.VirtualNIC} message VirtualNIC - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VirtualNIC.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this VirtualNIC to JSON. - * @function toJSON - * @memberof google.container.v1.VirtualNIC - * @instance - * @returns {Object.} JSON object - */ - VirtualNIC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VirtualNIC - * @function getTypeUrl - * @memberof google.container.v1.VirtualNIC - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VirtualNIC.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.VirtualNIC"; - }; - - return VirtualNIC; - })(); - - v1.FastSocket = (function() { - - /** - * Properties of a FastSocket. - * @memberof google.container.v1 - * @interface IFastSocket - * @property {boolean|null} [enabled] FastSocket enabled - */ - - /** - * Constructs a new FastSocket. - * @memberof google.container.v1 - * @classdesc Represents a FastSocket. - * @implements IFastSocket - * @constructor - * @param {google.container.v1.IFastSocket=} [properties] Properties to set - */ - function FastSocket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FastSocket enabled. - * @member {boolean} enabled - * @memberof google.container.v1.FastSocket - * @instance - */ - FastSocket.prototype.enabled = false; - - /** - * Creates a new FastSocket instance using the specified properties. - * @function create - * @memberof google.container.v1.FastSocket - * @static - * @param {google.container.v1.IFastSocket=} [properties] Properties to set - * @returns {google.container.v1.FastSocket} FastSocket instance - */ - FastSocket.create = function create(properties) { - return new FastSocket(properties); - }; - - /** - * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. - * @function encode - * @memberof google.container.v1.FastSocket - * @static - * @param {google.container.v1.IFastSocket} message FastSocket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FastSocket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1.FastSocket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.FastSocket - * @static - * @param {google.container.v1.IFastSocket} message FastSocket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FastSocket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FastSocket message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.FastSocket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.FastSocket} FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FastSocket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.FastSocket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FastSocket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.FastSocket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.FastSocket} FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FastSocket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FastSocket message. - * @function verify - * @memberof google.container.v1.FastSocket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FastSocket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.FastSocket - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.FastSocket} FastSocket - */ - FastSocket.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.FastSocket) - return object; - var message = new $root.google.container.v1.FastSocket(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a FastSocket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.FastSocket - * @static - * @param {google.container.v1.FastSocket} message FastSocket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FastSocket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this FastSocket to JSON. - * @function toJSON - * @memberof google.container.v1.FastSocket - * @instance - * @returns {Object.} JSON object - */ - FastSocket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FastSocket - * @function getTypeUrl - * @memberof google.container.v1.FastSocket - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FastSocket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.FastSocket"; - }; - - return FastSocket; - })(); - - /** - * PrivateIPv6GoogleAccess enum. - * @name google.container.v1.PrivateIPv6GoogleAccess - * @enum {number} - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED=1 PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE=2 PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL=3 PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL value - */ - v1.PrivateIPv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED"] = 1; - values[valuesById[2] = "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL"] = 3; - return values; - })(); - - v1.NotificationConfig = (function() { - - /** - * Properties of a NotificationConfig. - * @memberof google.container.v1 - * @interface INotificationConfig - * @property {google.container.v1.NotificationConfig.IPubSub|null} [pubsub] NotificationConfig pubsub - */ - - /** - * Constructs a new NotificationConfig. - * @memberof google.container.v1 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig - * @constructor - * @param {google.container.v1.INotificationConfig=} [properties] Properties to set - */ - function NotificationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NotificationConfig pubsub. - * @member {google.container.v1.NotificationConfig.IPubSub|null|undefined} pubsub - * @memberof google.container.v1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.pubsub = null; - - /** - * Creates a new NotificationConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NotificationConfig - * @static - * @param {google.container.v1.INotificationConfig=} [properties] Properties to set - * @returns {google.container.v1.NotificationConfig} NotificationConfig instance - */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); - }; - - /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NotificationConfig - * @static - * @param {google.container.v1.INotificationConfig} message NotificationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) - $root.google.container.v1.NotificationConfig.PubSub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NotificationConfig - * @static - * @param {google.container.v1.INotificationConfig} message NotificationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NotificationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NotificationConfig} NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.pubsub = $root.google.container.v1.NotificationConfig.PubSub.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NotificationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NotificationConfig} NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotificationConfig message. - * @function verify - * @memberof google.container.v1.NotificationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) { - var error = $root.google.container.v1.NotificationConfig.PubSub.verify(message.pubsub); - if (error) - return "pubsub." + error; - } - return null; - }; - - /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NotificationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NotificationConfig} NotificationConfig - */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NotificationConfig) - return object; - var message = new $root.google.container.v1.NotificationConfig(); - if (object.pubsub != null) { - if (typeof object.pubsub !== "object") - throw TypeError(".google.container.v1.NotificationConfig.pubsub: object expected"); - message.pubsub = $root.google.container.v1.NotificationConfig.PubSub.fromObject(object.pubsub); - } - return message; - }; - - /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NotificationConfig - * @static - * @param {google.container.v1.NotificationConfig} message NotificationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pubsub = null; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) - object.pubsub = $root.google.container.v1.NotificationConfig.PubSub.toObject(message.pubsub, options); - return object; - }; - - /** - * Converts this NotificationConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NotificationConfig - * @instance - * @returns {Object.} JSON object - */ - NotificationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NotificationConfig - * @function getTypeUrl - * @memberof google.container.v1.NotificationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NotificationConfig"; - }; - - /** - * EventType enum. - * @name google.container.v1.NotificationConfig.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} UPGRADE_AVAILABLE_EVENT=1 UPGRADE_AVAILABLE_EVENT value - * @property {number} UPGRADE_EVENT=2 UPGRADE_EVENT value - * @property {number} SECURITY_BULLETIN_EVENT=3 SECURITY_BULLETIN_EVENT value - */ - NotificationConfig.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UPGRADE_AVAILABLE_EVENT"] = 1; - values[valuesById[2] = "UPGRADE_EVENT"] = 2; - values[valuesById[3] = "SECURITY_BULLETIN_EVENT"] = 3; - return values; - })(); - - NotificationConfig.PubSub = (function() { - - /** - * Properties of a PubSub. - * @memberof google.container.v1.NotificationConfig - * @interface IPubSub - * @property {boolean|null} [enabled] PubSub enabled - * @property {string|null} [topic] PubSub topic - * @property {google.container.v1.NotificationConfig.IFilter|null} [filter] PubSub filter - */ - - /** - * Constructs a new PubSub. - * @memberof google.container.v1.NotificationConfig - * @classdesc Represents a PubSub. - * @implements IPubSub - * @constructor - * @param {google.container.v1.NotificationConfig.IPubSub=} [properties] Properties to set - */ - function PubSub(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PubSub enabled. - * @member {boolean} enabled - * @memberof google.container.v1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.enabled = false; - - /** - * PubSub topic. - * @member {string} topic - * @memberof google.container.v1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.topic = ""; - - /** - * PubSub filter. - * @member {google.container.v1.NotificationConfig.IFilter|null|undefined} filter - * @memberof google.container.v1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.filter = null; - - /** - * Creates a new PubSub instance using the specified properties. - * @function create - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {google.container.v1.NotificationConfig.IPubSub=} [properties] Properties to set - * @returns {google.container.v1.NotificationConfig.PubSub} PubSub instance - */ - PubSub.create = function create(properties) { - return new PubSub(properties); - }; - - /** - * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {google.container.v1.NotificationConfig.IPubSub} message PubSub message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSub.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.container.v1.NotificationConfig.Filter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.PubSub.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {google.container.v1.NotificationConfig.IPubSub} message PubSub message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSub.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PubSub message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NotificationConfig.PubSub} PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSub.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig.PubSub(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.topic = reader.string(); - break; - } - case 3: { - message.filter = $root.google.container.v1.NotificationConfig.Filter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PubSub message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NotificationConfig.PubSub} PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSub.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubSub message. - * @function verify - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubSub.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.container.v1.NotificationConfig.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - return null; - }; - - /** - * Creates a PubSub message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NotificationConfig.PubSub} PubSub - */ - PubSub.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NotificationConfig.PubSub) - return object; - var message = new $root.google.container.v1.NotificationConfig.PubSub(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.topic != null) - message.topic = String(object.topic); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.container.v1.NotificationConfig.PubSub.filter: object expected"); - message.filter = $root.google.container.v1.NotificationConfig.Filter.fromObject(object.filter); - } - return message; - }; - - /** - * Creates a plain object from a PubSub message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {google.container.v1.NotificationConfig.PubSub} message PubSub - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubSub.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.topic = ""; - object.filter = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.container.v1.NotificationConfig.Filter.toObject(message.filter, options); - return object; - }; - - /** - * Converts this PubSub to JSON. - * @function toJSON - * @memberof google.container.v1.NotificationConfig.PubSub - * @instance - * @returns {Object.} JSON object - */ - PubSub.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PubSub - * @function getTypeUrl - * @memberof google.container.v1.NotificationConfig.PubSub - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PubSub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NotificationConfig.PubSub"; - }; - - return PubSub; - })(); - - NotificationConfig.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof google.container.v1.NotificationConfig - * @interface IFilter - * @property {Array.|null} [eventType] Filter eventType - */ - - /** - * Constructs a new Filter. - * @memberof google.container.v1.NotificationConfig - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.container.v1.NotificationConfig.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - this.eventType = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter eventType. - * @member {Array.} eventType - * @memberof google.container.v1.NotificationConfig.Filter - * @instance - */ - Filter.prototype.eventType = $util.emptyArray; - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {google.container.v1.NotificationConfig.IFilter=} [properties] Properties to set - * @returns {google.container.v1.NotificationConfig.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {google.container.v1.NotificationConfig.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventType != null && message.eventType.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.eventType.length; ++i) - writer.int32(message.eventType[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1.NotificationConfig.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {google.container.v1.NotificationConfig.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NotificationConfig.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NotificationConfig.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.eventType && message.eventType.length)) - message.eventType = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.eventType.push(reader.int32()); - } else - message.eventType.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NotificationConfig.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) { - if (!Array.isArray(message.eventType)) - return "eventType: array expected"; - for (var i = 0; i < message.eventType.length; ++i) - switch (message.eventType[i]) { - default: - return "eventType: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NotificationConfig.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NotificationConfig.Filter) - return object; - var message = new $root.google.container.v1.NotificationConfig.Filter(); - if (object.eventType) { - if (!Array.isArray(object.eventType)) - throw TypeError(".google.container.v1.NotificationConfig.Filter.eventType: array expected"); - message.eventType = []; - for (var i = 0; i < object.eventType.length; ++i) - switch (object.eventType[i]) { - default: - if (typeof object.eventType[i] === "number") { - message.eventType[i] = object.eventType[i]; - break; - } - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.eventType[i] = 0; - break; - case "UPGRADE_AVAILABLE_EVENT": - case 1: - message.eventType[i] = 1; - break; - case "UPGRADE_EVENT": - case 2: - message.eventType[i] = 2; - break; - case "SECURITY_BULLETIN_EVENT": - case 3: - message.eventType[i] = 3; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {google.container.v1.NotificationConfig.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.eventType = []; - if (message.eventType && message.eventType.length) { - object.eventType = []; - for (var j = 0; j < message.eventType.length; ++j) - object.eventType[j] = options.enums === String ? $root.google.container.v1.NotificationConfig.EventType[message.eventType[j]] === undefined ? message.eventType[j] : $root.google.container.v1.NotificationConfig.EventType[message.eventType[j]] : message.eventType[j]; - } - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.container.v1.NotificationConfig.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.container.v1.NotificationConfig.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NotificationConfig.Filter"; - }; - - return Filter; - })(); - - return NotificationConfig; - })(); - - v1.ConfidentialNodes = (function() { - - /** - * Properties of a ConfidentialNodes. - * @memberof google.container.v1 - * @interface IConfidentialNodes - * @property {boolean|null} [enabled] ConfidentialNodes enabled - */ - - /** - * Constructs a new ConfidentialNodes. - * @memberof google.container.v1 - * @classdesc Represents a ConfidentialNodes. - * @implements IConfidentialNodes - * @constructor - * @param {google.container.v1.IConfidentialNodes=} [properties] Properties to set - */ - function ConfidentialNodes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfidentialNodes enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ConfidentialNodes - * @instance - */ - ConfidentialNodes.prototype.enabled = false; - - /** - * Creates a new ConfidentialNodes instance using the specified properties. - * @function create - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {google.container.v1.IConfidentialNodes=} [properties] Properties to set - * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes instance - */ - ConfidentialNodes.create = function create(properties) { - return new ConfidentialNodes(properties); - }; - - /** - * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {google.container.v1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialNodes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1.ConfidentialNodes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {google.container.v1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialNodes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialNodes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ConfidentialNodes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialNodes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidentialNodes message. - * @function verify - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidentialNodes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ConfidentialNodes} ConfidentialNodes - */ - ConfidentialNodes.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ConfidentialNodes) - return object; - var message = new $root.google.container.v1.ConfidentialNodes(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {google.container.v1.ConfidentialNodes} message ConfidentialNodes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidentialNodes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConfidentialNodes to JSON. - * @function toJSON - * @memberof google.container.v1.ConfidentialNodes - * @instance - * @returns {Object.} JSON object - */ - ConfidentialNodes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfidentialNodes - * @function getTypeUrl - * @memberof google.container.v1.ConfidentialNodes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidentialNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ConfidentialNodes"; - }; - - return ConfidentialNodes; - })(); - - /** - * UpgradeResourceType enum. - * @name google.container.v1.UpgradeResourceType - * @enum {number} - * @property {number} UPGRADE_RESOURCE_TYPE_UNSPECIFIED=0 UPGRADE_RESOURCE_TYPE_UNSPECIFIED value - * @property {number} MASTER=1 MASTER value - * @property {number} NODE_POOL=2 NODE_POOL value - */ - v1.UpgradeResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPGRADE_RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MASTER"] = 1; - values[valuesById[2] = "NODE_POOL"] = 2; - return values; - })(); - - v1.UpgradeEvent = (function() { - - /** - * Properties of an UpgradeEvent. - * @memberof google.container.v1 - * @interface IUpgradeEvent - * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeEvent resourceType - * @property {string|null} [operation] UpgradeEvent operation - * @property {google.protobuf.ITimestamp|null} [operationStartTime] UpgradeEvent operationStartTime - * @property {string|null} [currentVersion] UpgradeEvent currentVersion - * @property {string|null} [targetVersion] UpgradeEvent targetVersion - * @property {string|null} [resource] UpgradeEvent resource - */ - - /** - * Constructs a new UpgradeEvent. - * @memberof google.container.v1 - * @classdesc Represents an UpgradeEvent. - * @implements IUpgradeEvent - * @constructor - * @param {google.container.v1.IUpgradeEvent=} [properties] Properties to set - */ - function UpgradeEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeEvent resourceType. - * @member {google.container.v1.UpgradeResourceType} resourceType - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.resourceType = 0; - - /** - * UpgradeEvent operation. - * @member {string} operation - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.operation = ""; - - /** - * UpgradeEvent operationStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} operationStartTime - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.operationStartTime = null; - - /** - * UpgradeEvent currentVersion. - * @member {string} currentVersion - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.currentVersion = ""; - - /** - * UpgradeEvent targetVersion. - * @member {string} targetVersion - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.targetVersion = ""; - - /** - * UpgradeEvent resource. - * @member {string} resource - * @memberof google.container.v1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.resource = ""; - - /** - * Creates a new UpgradeEvent instance using the specified properties. - * @function create - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {google.container.v1.IUpgradeEvent=} [properties] Properties to set - * @returns {google.container.v1.UpgradeEvent} UpgradeEvent instance - */ - UpgradeEvent.create = function create(properties) { - return new UpgradeEvent(properties); - }; - - /** - * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {google.container.v1.IUpgradeEvent} message UpgradeEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); - if (message.operationStartTime != null && Object.hasOwnProperty.call(message, "operationStartTime")) - $root.google.protobuf.Timestamp.encode(message.operationStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.currentVersion); - if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetVersion); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.resource); - return writer; - }; - - /** - * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {google.container.v1.IUpgradeEvent} message UpgradeEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpgradeEvent} UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.int32(); - break; - } - case 2: { - message.operation = reader.string(); - break; - } - case 3: { - message.operationStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.currentVersion = reader.string(); - break; - } - case 5: { - message.targetVersion = reader.string(); - break; - } - case 6: { - message.resource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpgradeEvent} UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeEvent message. - * @function verify - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.operationStartTime); - if (error) - return "operationStartTime." + error; - } - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - if (!$util.isString(message.currentVersion)) - return "currentVersion: string expected"; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - if (!$util.isString(message.targetVersion)) - return "targetVersion: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - return null; - }; - - /** - * Creates an UpgradeEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpgradeEvent} UpgradeEvent - */ - UpgradeEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpgradeEvent) - return object; - var message = new $root.google.container.v1.UpgradeEvent(); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "MASTER": - case 1: - message.resourceType = 1; - break; - case "NODE_POOL": - case 2: - message.resourceType = 2; - break; - } - if (object.operation != null) - message.operation = String(object.operation); - if (object.operationStartTime != null) { - if (typeof object.operationStartTime !== "object") - throw TypeError(".google.container.v1.UpgradeEvent.operationStartTime: object expected"); - message.operationStartTime = $root.google.protobuf.Timestamp.fromObject(object.operationStartTime); - } - if (object.currentVersion != null) - message.currentVersion = String(object.currentVersion); - if (object.targetVersion != null) - message.targetVersion = String(object.targetVersion); - if (object.resource != null) - message.resource = String(object.resource); - return message; - }; - - /** - * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {google.container.v1.UpgradeEvent} message UpgradeEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; - object.operation = ""; - object.operationStartTime = null; - object.currentVersion = ""; - object.targetVersion = ""; - object.resource = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) - object.operationStartTime = $root.google.protobuf.Timestamp.toObject(message.operationStartTime, options); - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - object.currentVersion = message.currentVersion; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - object.targetVersion = message.targetVersion; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - return object; - }; - - /** - * Converts this UpgradeEvent to JSON. - * @function toJSON - * @memberof google.container.v1.UpgradeEvent - * @instance - * @returns {Object.} JSON object - */ - UpgradeEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeEvent - * @function getTypeUrl - * @memberof google.container.v1.UpgradeEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpgradeEvent"; - }; - - return UpgradeEvent; - })(); - - v1.UpgradeInfoEvent = (function() { - - /** - * Properties of an UpgradeInfoEvent. - * @memberof google.container.v1 - * @interface IUpgradeInfoEvent - * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeInfoEvent resourceType - * @property {string|null} [operation] UpgradeInfoEvent operation - * @property {google.protobuf.ITimestamp|null} [startTime] UpgradeInfoEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] UpgradeInfoEvent endTime - * @property {string|null} [currentVersion] UpgradeInfoEvent currentVersion - * @property {string|null} [targetVersion] UpgradeInfoEvent targetVersion - * @property {string|null} [resource] UpgradeInfoEvent resource - * @property {google.container.v1.UpgradeInfoEvent.State|null} [state] UpgradeInfoEvent state - * @property {string|null} [description] UpgradeInfoEvent description - */ - - /** - * Constructs a new UpgradeInfoEvent. - * @memberof google.container.v1 - * @classdesc Represents an UpgradeInfoEvent. - * @implements IUpgradeInfoEvent - * @constructor - * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set - */ - function UpgradeInfoEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeInfoEvent resourceType. - * @member {google.container.v1.UpgradeResourceType} resourceType - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.resourceType = 0; - - /** - * UpgradeInfoEvent operation. - * @member {string} operation - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.operation = ""; - - /** - * UpgradeInfoEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.startTime = null; - - /** - * UpgradeInfoEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.endTime = null; - - /** - * UpgradeInfoEvent currentVersion. - * @member {string} currentVersion - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.currentVersion = ""; - - /** - * UpgradeInfoEvent targetVersion. - * @member {string} targetVersion - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.targetVersion = ""; - - /** - * UpgradeInfoEvent resource. - * @member {string} resource - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.resource = ""; - - /** - * UpgradeInfoEvent state. - * @member {google.container.v1.UpgradeInfoEvent.State} state - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.state = 0; - - /** - * UpgradeInfoEvent description. - * @member {string} description - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - */ - UpgradeInfoEvent.prototype.description = ""; - - /** - * Creates a new UpgradeInfoEvent instance using the specified properties. - * @function create - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set - * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent instance - */ - UpgradeInfoEvent.create = function create(properties) { - return new UpgradeInfoEvent(properties); - }; - - /** - * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeInfoEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currentVersion); - if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetVersion); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.resource); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.description); - return writer; - }; - - /** - * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeInfoEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeInfoEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeInfoEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeInfoEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.int32(); - break; - } - case 2: { - message.operation = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.currentVersion = reader.string(); - break; - } - case 6: { - message.targetVersion = reader.string(); - break; - } - case 7: { - message.resource = reader.string(); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 11: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeInfoEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeInfoEvent message. - * @function verify - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeInfoEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - if (!$util.isString(message.currentVersion)) - return "currentVersion: string expected"; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - if (!$util.isString(message.targetVersion)) - return "targetVersion: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent - */ - UpgradeInfoEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpgradeInfoEvent) - return object; - var message = new $root.google.container.v1.UpgradeInfoEvent(); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "MASTER": - case 1: - message.resourceType = 1; - break; - case "NODE_POOL": - case 2: - message.resourceType = 2; - break; - } - if (object.operation != null) - message.operation = String(object.operation); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.container.v1.UpgradeInfoEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.container.v1.UpgradeInfoEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.currentVersion != null) - message.currentVersion = String(object.currentVersion); - if (object.targetVersion != null) - message.targetVersion = String(object.targetVersion); - if (object.resource != null) - message.resource = String(object.resource); - 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 "STARTED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "CANCELED": - case 6: - message.state = 6; - break; - } - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {google.container.v1.UpgradeInfoEvent} message UpgradeInfoEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeInfoEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; - object.operation = ""; - object.startTime = null; - object.endTime = null; - object.currentVersion = ""; - object.targetVersion = ""; - object.resource = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.description = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - object.currentVersion = message.currentVersion; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - object.targetVersion = message.targetVersion; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.container.v1.UpgradeInfoEvent.State[message.state] === undefined ? message.state : $root.google.container.v1.UpgradeInfoEvent.State[message.state] : message.state; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this UpgradeInfoEvent to JSON. - * @function toJSON - * @memberof google.container.v1.UpgradeInfoEvent - * @instance - * @returns {Object.} JSON object - */ - UpgradeInfoEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeInfoEvent - * @function getTypeUrl - * @memberof google.container.v1.UpgradeInfoEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeInfoEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpgradeInfoEvent"; - }; - - /** - * State enum. - * @name google.container.v1.UpgradeInfoEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=3 STARTED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} CANCELED=6 CANCELED value - */ - UpgradeInfoEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[3] = "STARTED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "CANCELED"] = 6; - return values; - })(); - - return UpgradeInfoEvent; - })(); - - v1.UpgradeAvailableEvent = (function() { - - /** - * Properties of an UpgradeAvailableEvent. - * @memberof google.container.v1 - * @interface IUpgradeAvailableEvent - * @property {string|null} [version] UpgradeAvailableEvent version - * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeAvailableEvent resourceType - * @property {google.container.v1.IReleaseChannel|null} [releaseChannel] UpgradeAvailableEvent releaseChannel - * @property {string|null} [resource] UpgradeAvailableEvent resource - */ - - /** - * Constructs a new UpgradeAvailableEvent. - * @memberof google.container.v1 - * @classdesc Represents an UpgradeAvailableEvent. - * @implements IUpgradeAvailableEvent - * @constructor - * @param {google.container.v1.IUpgradeAvailableEvent=} [properties] Properties to set - */ - function UpgradeAvailableEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeAvailableEvent version. - * @member {string} version - * @memberof google.container.v1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.version = ""; - - /** - * UpgradeAvailableEvent resourceType. - * @member {google.container.v1.UpgradeResourceType} resourceType - * @memberof google.container.v1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.resourceType = 0; - - /** - * UpgradeAvailableEvent releaseChannel. - * @member {google.container.v1.IReleaseChannel|null|undefined} releaseChannel - * @memberof google.container.v1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.releaseChannel = null; - - /** - * UpgradeAvailableEvent resource. - * @member {string} resource - * @memberof google.container.v1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.resource = ""; - - /** - * Creates a new UpgradeAvailableEvent instance using the specified properties. - * @function create - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {google.container.v1.IUpgradeAvailableEvent=} [properties] Properties to set - * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent instance - */ - UpgradeAvailableEvent.create = function create(properties) { - return new UpgradeAvailableEvent(properties); - }; - - /** - * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {google.container.v1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeAvailableEvent.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - $root.google.container.v1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); - return writer; - }; - - /** - * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeAvailableEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {google.container.v1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeAvailableEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeAvailableEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeAvailableEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.resourceType = reader.int32(); - break; - } - case 3: { - message.releaseChannel = $root.google.container.v1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 4: { - message.resource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeAvailableEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeAvailableEvent message. - * @function verify - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeAvailableEvent.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.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { - var error = $root.google.container.v1.ReleaseChannel.verify(message.releaseChannel); - if (error) - return "releaseChannel." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - return null; - }; - - /** - * Creates an UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.UpgradeAvailableEvent} UpgradeAvailableEvent - */ - UpgradeAvailableEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.UpgradeAvailableEvent) - return object; - var message = new $root.google.container.v1.UpgradeAvailableEvent(); - if (object.version != null) - message.version = String(object.version); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "MASTER": - case 1: - message.resourceType = 1; - break; - case "NODE_POOL": - case 2: - message.resourceType = 2; - break; - } - if (object.releaseChannel != null) { - if (typeof object.releaseChannel !== "object") - throw TypeError(".google.container.v1.UpgradeAvailableEvent.releaseChannel: object expected"); - message.releaseChannel = $root.google.container.v1.ReleaseChannel.fromObject(object.releaseChannel); - } - if (object.resource != null) - message.resource = String(object.resource); - return message; - }; - - /** - * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {google.container.v1.UpgradeAvailableEvent} message UpgradeAvailableEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeAvailableEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; - object.releaseChannel = null; - object.resource = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = $root.google.container.v1.ReleaseChannel.toObject(message.releaseChannel, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - return object; - }; - - /** - * Converts this UpgradeAvailableEvent to JSON. - * @function toJSON - * @memberof google.container.v1.UpgradeAvailableEvent - * @instance - * @returns {Object.} JSON object - */ - UpgradeAvailableEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeAvailableEvent - * @function getTypeUrl - * @memberof google.container.v1.UpgradeAvailableEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeAvailableEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.UpgradeAvailableEvent"; - }; - - return UpgradeAvailableEvent; - })(); - - v1.SecurityBulletinEvent = (function() { - - /** - * Properties of a SecurityBulletinEvent. - * @memberof google.container.v1 - * @interface ISecurityBulletinEvent - * @property {string|null} [resourceTypeAffected] SecurityBulletinEvent resourceTypeAffected - * @property {string|null} [bulletinId] SecurityBulletinEvent bulletinId - * @property {Array.|null} [cveIds] SecurityBulletinEvent cveIds - * @property {string|null} [severity] SecurityBulletinEvent severity - * @property {string|null} [bulletinUri] SecurityBulletinEvent bulletinUri - * @property {string|null} [briefDescription] SecurityBulletinEvent briefDescription - * @property {Array.|null} [affectedSupportedMinors] SecurityBulletinEvent affectedSupportedMinors - * @property {Array.|null} [patchedVersions] SecurityBulletinEvent patchedVersions - * @property {string|null} [suggestedUpgradeTarget] SecurityBulletinEvent suggestedUpgradeTarget - * @property {boolean|null} [manualStepsRequired] SecurityBulletinEvent manualStepsRequired - */ - - /** - * Constructs a new SecurityBulletinEvent. - * @memberof google.container.v1 - * @classdesc Represents a SecurityBulletinEvent. - * @implements ISecurityBulletinEvent - * @constructor - * @param {google.container.v1.ISecurityBulletinEvent=} [properties] Properties to set - */ - function SecurityBulletinEvent(properties) { - this.cveIds = []; - this.affectedSupportedMinors = []; - this.patchedVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityBulletinEvent resourceTypeAffected. - * @member {string} resourceTypeAffected - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.resourceTypeAffected = ""; - - /** - * SecurityBulletinEvent bulletinId. - * @member {string} bulletinId - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.bulletinId = ""; - - /** - * SecurityBulletinEvent cveIds. - * @member {Array.} cveIds - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.cveIds = $util.emptyArray; - - /** - * SecurityBulletinEvent severity. - * @member {string} severity - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.severity = ""; - - /** - * SecurityBulletinEvent bulletinUri. - * @member {string} bulletinUri - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.bulletinUri = ""; - - /** - * SecurityBulletinEvent briefDescription. - * @member {string} briefDescription - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.briefDescription = ""; - - /** - * SecurityBulletinEvent affectedSupportedMinors. - * @member {Array.} affectedSupportedMinors - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.affectedSupportedMinors = $util.emptyArray; - - /** - * SecurityBulletinEvent patchedVersions. - * @member {Array.} patchedVersions - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.patchedVersions = $util.emptyArray; - - /** - * SecurityBulletinEvent suggestedUpgradeTarget. - * @member {string} suggestedUpgradeTarget - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.suggestedUpgradeTarget = ""; - - /** - * SecurityBulletinEvent manualStepsRequired. - * @member {boolean} manualStepsRequired - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.manualStepsRequired = false; - - /** - * Creates a new SecurityBulletinEvent instance using the specified properties. - * @function create - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {google.container.v1.ISecurityBulletinEvent=} [properties] Properties to set - * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent instance - */ - SecurityBulletinEvent.create = function create(properties) { - return new SecurityBulletinEvent(properties); - }; - - /** - * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {google.container.v1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityBulletinEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceTypeAffected != null && Object.hasOwnProperty.call(message, "resourceTypeAffected")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypeAffected); - if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletinId); - if (message.cveIds != null && message.cveIds.length) - for (var i = 0; i < message.cveIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cveIds[i]); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); - if (message.bulletinUri != null && Object.hasOwnProperty.call(message, "bulletinUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.bulletinUri); - if (message.briefDescription != null && Object.hasOwnProperty.call(message, "briefDescription")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.briefDescription); - if (message.affectedSupportedMinors != null && message.affectedSupportedMinors.length) - for (var i = 0; i < message.affectedSupportedMinors.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.affectedSupportedMinors[i]); - if (message.patchedVersions != null && message.patchedVersions.length) - for (var i = 0; i < message.patchedVersions.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.patchedVersions[i]); - if (message.suggestedUpgradeTarget != null && Object.hasOwnProperty.call(message, "suggestedUpgradeTarget")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.suggestedUpgradeTarget); - if (message.manualStepsRequired != null && Object.hasOwnProperty.call(message, "manualStepsRequired")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.manualStepsRequired); - return writer; - }; - - /** - * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1.SecurityBulletinEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {google.container.v1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityBulletinEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityBulletinEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityBulletinEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceTypeAffected = reader.string(); - break; - } - case 2: { - message.bulletinId = reader.string(); - break; - } - case 3: { - if (!(message.cveIds && message.cveIds.length)) - message.cveIds = []; - message.cveIds.push(reader.string()); - break; - } - case 4: { - message.severity = reader.string(); - break; - } - case 5: { - message.bulletinUri = reader.string(); - break; - } - case 6: { - message.briefDescription = reader.string(); - break; - } - case 7: { - if (!(message.affectedSupportedMinors && message.affectedSupportedMinors.length)) - message.affectedSupportedMinors = []; - message.affectedSupportedMinors.push(reader.string()); - break; - } - case 8: { - if (!(message.patchedVersions && message.patchedVersions.length)) - message.patchedVersions = []; - message.patchedVersions.push(reader.string()); - break; - } - case 9: { - message.suggestedUpgradeTarget = reader.string(); - break; - } - case 10: { - message.manualStepsRequired = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityBulletinEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityBulletinEvent message. - * @function verify - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityBulletinEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) - if (!$util.isString(message.resourceTypeAffected)) - return "resourceTypeAffected: string expected"; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - if (!$util.isString(message.bulletinId)) - return "bulletinId: string expected"; - if (message.cveIds != null && message.hasOwnProperty("cveIds")) { - if (!Array.isArray(message.cveIds)) - return "cveIds: array expected"; - for (var i = 0; i < message.cveIds.length; ++i) - if (!$util.isString(message.cveIds[i])) - return "cveIds: string[] expected"; - } - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) - if (!$util.isString(message.bulletinUri)) - return "bulletinUri: string expected"; - if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) - if (!$util.isString(message.briefDescription)) - return "briefDescription: string expected"; - if (message.affectedSupportedMinors != null && message.hasOwnProperty("affectedSupportedMinors")) { - if (!Array.isArray(message.affectedSupportedMinors)) - return "affectedSupportedMinors: array expected"; - for (var i = 0; i < message.affectedSupportedMinors.length; ++i) - if (!$util.isString(message.affectedSupportedMinors[i])) - return "affectedSupportedMinors: string[] expected"; - } - if (message.patchedVersions != null && message.hasOwnProperty("patchedVersions")) { - if (!Array.isArray(message.patchedVersions)) - return "patchedVersions: array expected"; - for (var i = 0; i < message.patchedVersions.length; ++i) - if (!$util.isString(message.patchedVersions[i])) - return "patchedVersions: string[] expected"; - } - if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) - if (!$util.isString(message.suggestedUpgradeTarget)) - return "suggestedUpgradeTarget: string expected"; - if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) - if (typeof message.manualStepsRequired !== "boolean") - return "manualStepsRequired: boolean expected"; - return null; - }; - - /** - * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SecurityBulletinEvent} SecurityBulletinEvent - */ - SecurityBulletinEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecurityBulletinEvent) - return object; - var message = new $root.google.container.v1.SecurityBulletinEvent(); - if (object.resourceTypeAffected != null) - message.resourceTypeAffected = String(object.resourceTypeAffected); - if (object.bulletinId != null) - message.bulletinId = String(object.bulletinId); - if (object.cveIds) { - if (!Array.isArray(object.cveIds)) - throw TypeError(".google.container.v1.SecurityBulletinEvent.cveIds: array expected"); - message.cveIds = []; - for (var i = 0; i < object.cveIds.length; ++i) - message.cveIds[i] = String(object.cveIds[i]); - } - if (object.severity != null) - message.severity = String(object.severity); - if (object.bulletinUri != null) - message.bulletinUri = String(object.bulletinUri); - if (object.briefDescription != null) - message.briefDescription = String(object.briefDescription); - if (object.affectedSupportedMinors) { - if (!Array.isArray(object.affectedSupportedMinors)) - throw TypeError(".google.container.v1.SecurityBulletinEvent.affectedSupportedMinors: array expected"); - message.affectedSupportedMinors = []; - for (var i = 0; i < object.affectedSupportedMinors.length; ++i) - message.affectedSupportedMinors[i] = String(object.affectedSupportedMinors[i]); - } - if (object.patchedVersions) { - if (!Array.isArray(object.patchedVersions)) - throw TypeError(".google.container.v1.SecurityBulletinEvent.patchedVersions: array expected"); - message.patchedVersions = []; - for (var i = 0; i < object.patchedVersions.length; ++i) - message.patchedVersions[i] = String(object.patchedVersions[i]); - } - if (object.suggestedUpgradeTarget != null) - message.suggestedUpgradeTarget = String(object.suggestedUpgradeTarget); - if (object.manualStepsRequired != null) - message.manualStepsRequired = Boolean(object.manualStepsRequired); - return message; - }; - - /** - * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {google.container.v1.SecurityBulletinEvent} message SecurityBulletinEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityBulletinEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cveIds = []; - object.affectedSupportedMinors = []; - object.patchedVersions = []; - } - if (options.defaults) { - object.resourceTypeAffected = ""; - object.bulletinId = ""; - object.severity = ""; - object.bulletinUri = ""; - object.briefDescription = ""; - object.suggestedUpgradeTarget = ""; - object.manualStepsRequired = false; - } - if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) - object.resourceTypeAffected = message.resourceTypeAffected; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - object.bulletinId = message.bulletinId; - if (message.cveIds && message.cveIds.length) { - object.cveIds = []; - for (var j = 0; j < message.cveIds.length; ++j) - object.cveIds[j] = message.cveIds[j]; - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) - object.bulletinUri = message.bulletinUri; - if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) - object.briefDescription = message.briefDescription; - if (message.affectedSupportedMinors && message.affectedSupportedMinors.length) { - object.affectedSupportedMinors = []; - for (var j = 0; j < message.affectedSupportedMinors.length; ++j) - object.affectedSupportedMinors[j] = message.affectedSupportedMinors[j]; - } - if (message.patchedVersions && message.patchedVersions.length) { - object.patchedVersions = []; - for (var j = 0; j < message.patchedVersions.length; ++j) - object.patchedVersions[j] = message.patchedVersions[j]; - } - if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) - object.suggestedUpgradeTarget = message.suggestedUpgradeTarget; - if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) - object.manualStepsRequired = message.manualStepsRequired; - return object; - }; - - /** - * Converts this SecurityBulletinEvent to JSON. - * @function toJSON - * @memberof google.container.v1.SecurityBulletinEvent - * @instance - * @returns {Object.} JSON object - */ - SecurityBulletinEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityBulletinEvent - * @function getTypeUrl - * @memberof google.container.v1.SecurityBulletinEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityBulletinEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SecurityBulletinEvent"; - }; - - return SecurityBulletinEvent; - })(); - - v1.Autopilot = (function() { - - /** - * Properties of an Autopilot. - * @memberof google.container.v1 - * @interface IAutopilot - * @property {boolean|null} [enabled] Autopilot enabled - * @property {google.container.v1.IWorkloadPolicyConfig|null} [workloadPolicyConfig] Autopilot workloadPolicyConfig - */ - - /** - * Constructs a new Autopilot. - * @memberof google.container.v1 - * @classdesc Represents an Autopilot. - * @implements IAutopilot - * @constructor - * @param {google.container.v1.IAutopilot=} [properties] Properties to set - */ - function Autopilot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Autopilot enabled. - * @member {boolean} enabled - * @memberof google.container.v1.Autopilot - * @instance - */ - Autopilot.prototype.enabled = false; - - /** - * Autopilot workloadPolicyConfig. - * @member {google.container.v1.IWorkloadPolicyConfig|null|undefined} workloadPolicyConfig - * @memberof google.container.v1.Autopilot - * @instance - */ - Autopilot.prototype.workloadPolicyConfig = null; - - /** - * Creates a new Autopilot instance using the specified properties. - * @function create - * @memberof google.container.v1.Autopilot - * @static - * @param {google.container.v1.IAutopilot=} [properties] Properties to set - * @returns {google.container.v1.Autopilot} Autopilot instance - */ - Autopilot.create = function create(properties) { - return new Autopilot(properties); - }; - - /** - * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Autopilot - * @static - * @param {google.container.v1.IAutopilot} message Autopilot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Autopilot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.workloadPolicyConfig != null && Object.hasOwnProperty.call(message, "workloadPolicyConfig")) - $root.google.container.v1.WorkloadPolicyConfig.encode(message.workloadPolicyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1.Autopilot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Autopilot - * @static - * @param {google.container.v1.IAutopilot} message Autopilot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Autopilot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Autopilot message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Autopilot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Autopilot} Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Autopilot.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Autopilot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Autopilot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Autopilot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Autopilot} Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Autopilot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Autopilot message. - * @function verify - * @memberof google.container.v1.Autopilot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Autopilot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) { - var error = $root.google.container.v1.WorkloadPolicyConfig.verify(message.workloadPolicyConfig); - if (error) - return "workloadPolicyConfig." + error; - } - return null; - }; - - /** - * Creates an Autopilot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Autopilot - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Autopilot} Autopilot - */ - Autopilot.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Autopilot) - return object; - var message = new $root.google.container.v1.Autopilot(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.workloadPolicyConfig != null) { - if (typeof object.workloadPolicyConfig !== "object") - throw TypeError(".google.container.v1.Autopilot.workloadPolicyConfig: object expected"); - message.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.fromObject(object.workloadPolicyConfig); - } - return message; - }; - - /** - * Creates a plain object from an Autopilot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Autopilot - * @static - * @param {google.container.v1.Autopilot} message Autopilot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Autopilot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.workloadPolicyConfig = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) - object.workloadPolicyConfig = $root.google.container.v1.WorkloadPolicyConfig.toObject(message.workloadPolicyConfig, options); - return object; - }; - - /** - * Converts this Autopilot to JSON. - * @function toJSON - * @memberof google.container.v1.Autopilot - * @instance - * @returns {Object.} JSON object - */ - Autopilot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Autopilot - * @function getTypeUrl - * @memberof google.container.v1.Autopilot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Autopilot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Autopilot"; - }; - - return Autopilot; - })(); - - v1.WorkloadPolicyConfig = (function() { - - /** - * Properties of a WorkloadPolicyConfig. - * @memberof google.container.v1 - * @interface IWorkloadPolicyConfig - * @property {boolean|null} [allowNetAdmin] WorkloadPolicyConfig allowNetAdmin - */ - - /** - * Constructs a new WorkloadPolicyConfig. - * @memberof google.container.v1 - * @classdesc Represents a WorkloadPolicyConfig. - * @implements IWorkloadPolicyConfig - * @constructor - * @param {google.container.v1.IWorkloadPolicyConfig=} [properties] Properties to set - */ - function WorkloadPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadPolicyConfig allowNetAdmin. - * @member {boolean|null|undefined} allowNetAdmin - * @memberof google.container.v1.WorkloadPolicyConfig - * @instance - */ - WorkloadPolicyConfig.prototype.allowNetAdmin = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * WorkloadPolicyConfig _allowNetAdmin. - * @member {"allowNetAdmin"|undefined} _allowNetAdmin - * @memberof google.container.v1.WorkloadPolicyConfig - * @instance - */ - Object.defineProperty(WorkloadPolicyConfig.prototype, "_allowNetAdmin", { - get: $util.oneOfGetter($oneOfFields = ["allowNetAdmin"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WorkloadPolicyConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {google.container.v1.IWorkloadPolicyConfig=} [properties] Properties to set - * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig instance - */ - WorkloadPolicyConfig.create = function create(properties) { - return new WorkloadPolicyConfig(properties); - }; - - /** - * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {google.container.v1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowNetAdmin != null && Object.hasOwnProperty.call(message, "allowNetAdmin")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowNetAdmin); - return writer; - }; - - /** - * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1.WorkloadPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {google.container.v1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.WorkloadPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.allowNetAdmin = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadPolicyConfig message. - * @function verify - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { - properties._allowNetAdmin = 1; - if (typeof message.allowNetAdmin !== "boolean") - return "allowNetAdmin: boolean expected"; - } - return null; - }; - - /** - * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.WorkloadPolicyConfig} WorkloadPolicyConfig - */ - WorkloadPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.WorkloadPolicyConfig) - return object; - var message = new $root.google.container.v1.WorkloadPolicyConfig(); - if (object.allowNetAdmin != null) - message.allowNetAdmin = Boolean(object.allowNetAdmin); - return message; - }; - - /** - * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {google.container.v1.WorkloadPolicyConfig} message WorkloadPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { - object.allowNetAdmin = message.allowNetAdmin; - if (options.oneofs) - object._allowNetAdmin = "allowNetAdmin"; - } - return object; - }; - - /** - * Converts this WorkloadPolicyConfig to JSON. - * @function toJSON - * @memberof google.container.v1.WorkloadPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadPolicyConfig - * @function getTypeUrl - * @memberof google.container.v1.WorkloadPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.WorkloadPolicyConfig"; - }; - - return WorkloadPolicyConfig; - })(); - - v1.LoggingConfig = (function() { - - /** - * Properties of a LoggingConfig. - * @memberof google.container.v1 - * @interface ILoggingConfig - * @property {google.container.v1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig - */ - - /** - * Constructs a new LoggingConfig. - * @memberof google.container.v1 - * @classdesc Represents a LoggingConfig. - * @implements ILoggingConfig - * @constructor - * @param {google.container.v1.ILoggingConfig=} [properties] Properties to set - */ - function LoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingConfig componentConfig. - * @member {google.container.v1.ILoggingComponentConfig|null|undefined} componentConfig - * @memberof google.container.v1.LoggingConfig - * @instance - */ - LoggingConfig.prototype.componentConfig = null; - - /** - * Creates a new LoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LoggingConfig - * @static - * @param {google.container.v1.ILoggingConfig=} [properties] Properties to set - * @returns {google.container.v1.LoggingConfig} LoggingConfig instance - */ - LoggingConfig.create = function create(properties) { - return new LoggingConfig(properties); - }; - - /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1.LoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LoggingConfig - * @static - * @param {google.container.v1.ILoggingConfig} message LoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) - $root.google.container.v1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LoggingConfig - * @static - * @param {google.container.v1.ILoggingConfig} message LoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LoggingConfig} LoggingConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.componentConfig = $root.google.container.v1.LoggingComponentConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LoggingConfig} LoggingConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingConfig message. - * @function verify - * @memberof google.container.v1.LoggingConfig - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { - var error = $root.google.container.v1.LoggingComponentConfig.verify(message.componentConfig); - if (error) - return "componentConfig." + error; - } - return null; - }; - - /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LoggingConfig} LoggingConfig - */ - LoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LoggingConfig) - return object; - var message = new $root.google.container.v1.LoggingConfig(); - if (object.componentConfig != null) { - if (typeof object.componentConfig !== "object") - throw TypeError(".google.container.v1.LoggingConfig.componentConfig: object expected"); - message.componentConfig = $root.google.container.v1.LoggingComponentConfig.fromObject(object.componentConfig); - } - return message; - }; - - /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LoggingConfig - * @static - * @param {google.container.v1.LoggingConfig} message LoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingConfig.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.container.v1.LoggingComponentConfig.toObject(message.componentConfig, options); - return object; - }; - - /** - * Converts this LoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LoggingConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingConfig - * @function getTypeUrl - * @memberof google.container.v1.LoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LoggingConfig"; - }; - - return LoggingConfig; - })(); - - v1.LoggingComponentConfig = (function() { - - /** - * Properties of a LoggingComponentConfig. - * @memberof google.container.v1 - * @interface ILoggingComponentConfig - * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents - */ - - /** - * Constructs a new LoggingComponentConfig. - * @memberof google.container.v1 - * @classdesc Represents a LoggingComponentConfig. - * @implements ILoggingComponentConfig - * @constructor - * @param {google.container.v1.ILoggingComponentConfig=} [properties] Properties to set - */ - function LoggingComponentConfig(properties) { - this.enableComponents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingComponentConfig enableComponents. - * @member {Array.} enableComponents - * @memberof google.container.v1.LoggingComponentConfig - * @instance - */ - LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; - - /** - * Creates a new LoggingComponentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {google.container.v1.ILoggingComponentConfig=} [properties] Properties to set - * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig instance - */ - LoggingComponentConfig.create = function create(properties) { - return new LoggingComponentConfig(properties); - }; - - /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1.LoggingComponentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {google.container.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingComponentConfig.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(); - } - return writer; - }; - - /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingComponentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {google.container.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingComponentConfig(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingComponentConfig message. - * @function verify - * @memberof google.container.v1.LoggingComponentConfig - * @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) { - 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: - case 3: - case 4: - case 5: - case 7: - case 8: - break; - } - } - return null; - }; - - /** - * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LoggingComponentConfig} LoggingComponentConfig - */ - LoggingComponentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LoggingComponentConfig) - return object; - var message = new $root.google.container.v1.LoggingComponentConfig(); - if (object.enableComponents) { - if (!Array.isArray(object.enableComponents)) - throw TypeError(".google.container.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; - case "APISERVER": - case 3: - message.enableComponents[i] = 3; - break; - case "SCHEDULER": - case 4: - message.enableComponents[i] = 4; - break; - case "CONTROLLER_MANAGER": - case 5: - message.enableComponents[i] = 5; - break; - case "KCP_SSHD": - case 7: - message.enableComponents[i] = 7; - break; - case "KCP_CONNECTION": - case 8: - message.enableComponents[i] = 8; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {google.container.v1.LoggingComponentConfig} message LoggingComponentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingComponentConfig.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.container.v1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; - } - return object; - }; - - /** - * Converts this LoggingComponentConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LoggingComponentConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingComponentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingComponentConfig - * @function getTypeUrl - * @memberof google.container.v1.LoggingComponentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LoggingComponentConfig"; - }; - - /** - * Component enum. - * @name google.container.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 - * @property {number} APISERVER=3 APISERVER value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value - * @property {number} KCP_SSHD=7 KCP_SSHD value - * @property {number} KCP_CONNECTION=8 KCP_CONNECTION 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; - values[valuesById[3] = "APISERVER"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; - values[valuesById[7] = "KCP_SSHD"] = 7; - values[valuesById[8] = "KCP_CONNECTION"] = 8; - return values; - })(); - - return LoggingComponentConfig; - })(); - - v1.RayClusterLoggingConfig = (function() { - - /** - * Properties of a RayClusterLoggingConfig. - * @memberof google.container.v1 - * @interface IRayClusterLoggingConfig - * @property {boolean|null} [enabled] RayClusterLoggingConfig enabled - */ - - /** - * Constructs a new RayClusterLoggingConfig. - * @memberof google.container.v1 - * @classdesc Represents a RayClusterLoggingConfig. - * @implements IRayClusterLoggingConfig - * @constructor - * @param {google.container.v1.IRayClusterLoggingConfig=} [properties] Properties to set - */ - function RayClusterLoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayClusterLoggingConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.RayClusterLoggingConfig - * @instance - */ - RayClusterLoggingConfig.prototype.enabled = false; - - /** - * Creates a new RayClusterLoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {google.container.v1.IRayClusterLoggingConfig=} [properties] Properties to set - * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig instance - */ - RayClusterLoggingConfig.create = function create(properties) { - return new RayClusterLoggingConfig(properties); - }; - - /** - * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {google.container.v1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterLoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterLoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {google.container.v1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterLoggingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayClusterLoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterLoggingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayClusterLoggingConfig message. - * @function verify - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayClusterLoggingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RayClusterLoggingConfig} RayClusterLoggingConfig - */ - RayClusterLoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RayClusterLoggingConfig) - return object; - var message = new $root.google.container.v1.RayClusterLoggingConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {google.container.v1.RayClusterLoggingConfig} message RayClusterLoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayClusterLoggingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this RayClusterLoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.RayClusterLoggingConfig - * @instance - * @returns {Object.} JSON object - */ - RayClusterLoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayClusterLoggingConfig - * @function getTypeUrl - * @memberof google.container.v1.RayClusterLoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayClusterLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RayClusterLoggingConfig"; - }; - - return RayClusterLoggingConfig; - })(); - - v1.MonitoringConfig = (function() { - - /** - * Properties of a MonitoringConfig. - * @memberof google.container.v1 - * @interface IMonitoringConfig - * @property {google.container.v1.IMonitoringComponentConfig|null} [componentConfig] MonitoringConfig componentConfig - * @property {google.container.v1.IManagedPrometheusConfig|null} [managedPrometheusConfig] MonitoringConfig managedPrometheusConfig - * @property {google.container.v1.IAdvancedDatapathObservabilityConfig|null} [advancedDatapathObservabilityConfig] MonitoringConfig advancedDatapathObservabilityConfig - */ - - /** - * Constructs a new MonitoringConfig. - * @memberof google.container.v1 - * @classdesc Represents a MonitoringConfig. - * @implements IMonitoringConfig - * @constructor - * @param {google.container.v1.IMonitoringConfig=} [properties] Properties to set - */ - function MonitoringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoringConfig componentConfig. - * @member {google.container.v1.IMonitoringComponentConfig|null|undefined} componentConfig - * @memberof google.container.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.componentConfig = null; - - /** - * MonitoringConfig managedPrometheusConfig. - * @member {google.container.v1.IManagedPrometheusConfig|null|undefined} managedPrometheusConfig - * @memberof google.container.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.managedPrometheusConfig = null; - - /** - * MonitoringConfig advancedDatapathObservabilityConfig. - * @member {google.container.v1.IAdvancedDatapathObservabilityConfig|null|undefined} advancedDatapathObservabilityConfig - * @memberof google.container.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.advancedDatapathObservabilityConfig = null; - - /** - * Creates a new MonitoringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {google.container.v1.IMonitoringConfig=} [properties] Properties to set - * @returns {google.container.v1.MonitoringConfig} MonitoringConfig instance - */ - MonitoringConfig.create = function create(properties) { - return new MonitoringConfig(properties); - }; - - /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1.MonitoringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {google.container.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) - $root.google.container.v1.MonitoringComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.managedPrometheusConfig != null && Object.hasOwnProperty.call(message, "managedPrometheusConfig")) - $root.google.container.v1.ManagedPrometheusConfig.encode(message.managedPrometheusConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.advancedDatapathObservabilityConfig != null && Object.hasOwnProperty.call(message, "advancedDatapathObservabilityConfig")) - $root.google.container.v1.AdvancedDatapathObservabilityConfig.encode(message.advancedDatapathObservabilityConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {google.container.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MonitoringConfig} MonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.container.v1.MonitoringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.componentConfig = $root.google.container.v1.MonitoringComponentConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MonitoringConfig} MonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoringConfig message. - * @function verify - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { - var error = $root.google.container.v1.MonitoringComponentConfig.verify(message.componentConfig); - if (error) - return "componentConfig." + error; - } - if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) { - var error = $root.google.container.v1.ManagedPrometheusConfig.verify(message.managedPrometheusConfig); - if (error) - return "managedPrometheusConfig." + error; - } - if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) { - var error = $root.google.container.v1.AdvancedDatapathObservabilityConfig.verify(message.advancedDatapathObservabilityConfig); - if (error) - return "advancedDatapathObservabilityConfig." + error; - } - return null; - }; - - /** - * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MonitoringConfig} MonitoringConfig - */ - MonitoringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MonitoringConfig) - return object; - var message = new $root.google.container.v1.MonitoringConfig(); - if (object.componentConfig != null) { - if (typeof object.componentConfig !== "object") - throw TypeError(".google.container.v1.MonitoringConfig.componentConfig: object expected"); - message.componentConfig = $root.google.container.v1.MonitoringComponentConfig.fromObject(object.componentConfig); - } - if (object.managedPrometheusConfig != null) { - if (typeof object.managedPrometheusConfig !== "object") - throw TypeError(".google.container.v1.MonitoringConfig.managedPrometheusConfig: object expected"); - message.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.fromObject(object.managedPrometheusConfig); - } - if (object.advancedDatapathObservabilityConfig != null) { - if (typeof object.advancedDatapathObservabilityConfig !== "object") - throw TypeError(".google.container.v1.MonitoringConfig.advancedDatapathObservabilityConfig: object expected"); - message.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.fromObject(object.advancedDatapathObservabilityConfig); - } - return message; - }; - - /** - * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {google.container.v1.MonitoringConfig} message MonitoringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.componentConfig = null; - object.managedPrometheusConfig = null; - object.advancedDatapathObservabilityConfig = null; - } - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) - object.componentConfig = $root.google.container.v1.MonitoringComponentConfig.toObject(message.componentConfig, options); - if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) - object.managedPrometheusConfig = $root.google.container.v1.ManagedPrometheusConfig.toObject(message.managedPrometheusConfig, options); - if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) - object.advancedDatapathObservabilityConfig = $root.google.container.v1.AdvancedDatapathObservabilityConfig.toObject(message.advancedDatapathObservabilityConfig, options); - return object; - }; - - /** - * Converts this MonitoringConfig to JSON. - * @function toJSON - * @memberof google.container.v1.MonitoringConfig - * @instance - * @returns {Object.} JSON object - */ - MonitoringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonitoringConfig - * @function getTypeUrl - * @memberof google.container.v1.MonitoringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MonitoringConfig"; - }; - - return MonitoringConfig; - })(); - - v1.AdvancedDatapathObservabilityConfig = (function() { - - /** - * Properties of an AdvancedDatapathObservabilityConfig. - * @memberof google.container.v1 - * @interface IAdvancedDatapathObservabilityConfig - * @property {boolean|null} [enableMetrics] AdvancedDatapathObservabilityConfig enableMetrics - * @property {google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode|null} [relayMode] AdvancedDatapathObservabilityConfig relayMode - * @property {boolean|null} [enableRelay] AdvancedDatapathObservabilityConfig enableRelay - */ - - /** - * Constructs a new AdvancedDatapathObservabilityConfig. - * @memberof google.container.v1 - * @classdesc Represents an AdvancedDatapathObservabilityConfig. - * @implements IAdvancedDatapathObservabilityConfig - * @constructor - * @param {google.container.v1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set - */ - function AdvancedDatapathObservabilityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedDatapathObservabilityConfig enableMetrics. - * @member {boolean} enableMetrics - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.enableMetrics = false; - - /** - * AdvancedDatapathObservabilityConfig relayMode. - * @member {google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode} relayMode - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.relayMode = 0; - - /** - * AdvancedDatapathObservabilityConfig enableRelay. - * @member {boolean|null|undefined} enableRelay - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.enableRelay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedDatapathObservabilityConfig _enableRelay. - * @member {"enableRelay"|undefined} _enableRelay - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @instance - */ - Object.defineProperty(AdvancedDatapathObservabilityConfig.prototype, "_enableRelay", { - get: $util.oneOfGetter($oneOfFields = ["enableRelay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set - * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig instance - */ - AdvancedDatapathObservabilityConfig.create = function create(properties) { - return new AdvancedDatapathObservabilityConfig(properties); - }; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedDatapathObservabilityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableMetrics != null && Object.hasOwnProperty.call(message, "enableMetrics")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableMetrics); - if (message.relayMode != null && Object.hasOwnProperty.call(message, "relayMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relayMode); - if (message.enableRelay != null && Object.hasOwnProperty.call(message, "enableRelay")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableRelay); - return writer; - }; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedDatapathObservabilityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedDatapathObservabilityConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdvancedDatapathObservabilityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableMetrics = reader.bool(); - break; - } - case 2: { - message.relayMode = reader.int32(); - break; - } - case 3: { - message.enableRelay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedDatapathObservabilityConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedDatapathObservabilityConfig message. - * @function verify - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedDatapathObservabilityConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) - if (typeof message.enableMetrics !== "boolean") - return "enableMetrics: boolean expected"; - if (message.relayMode != null && message.hasOwnProperty("relayMode")) - switch (message.relayMode) { - default: - return "relayMode: enum value expected"; - case 0: - case 1: - case 3: - case 4: - break; - } - if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { - properties._enableRelay = 1; - if (typeof message.enableRelay !== "boolean") - return "enableRelay: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - */ - AdvancedDatapathObservabilityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.AdvancedDatapathObservabilityConfig) - return object; - var message = new $root.google.container.v1.AdvancedDatapathObservabilityConfig(); - if (object.enableMetrics != null) - message.enableMetrics = Boolean(object.enableMetrics); - switch (object.relayMode) { - default: - if (typeof object.relayMode === "number") { - message.relayMode = object.relayMode; - break; - } - break; - case "RELAY_MODE_UNSPECIFIED": - case 0: - message.relayMode = 0; - break; - case "DISABLED": - case 1: - message.relayMode = 1; - break; - case "INTERNAL_VPC_LB": - case 3: - message.relayMode = 3; - break; - case "EXTERNAL_LB": - case 4: - message.relayMode = 4; - break; - } - if (object.enableRelay != null) - message.enableRelay = Boolean(object.enableRelay); - return message; - }; - - /** - * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1.AdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedDatapathObservabilityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableMetrics = false; - object.relayMode = options.enums === String ? "RELAY_MODE_UNSPECIFIED" : 0; - } - if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) - object.enableMetrics = message.enableMetrics; - if (message.relayMode != null && message.hasOwnProperty("relayMode")) - object.relayMode = options.enums === String ? $root.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] === undefined ? message.relayMode : $root.google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] : message.relayMode; - if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { - object.enableRelay = message.enableRelay; - if (options.oneofs) - object._enableRelay = "enableRelay"; - } - return object; - }; - - /** - * Converts this AdvancedDatapathObservabilityConfig to JSON. - * @function toJSON - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @instance - * @returns {Object.} JSON object - */ - AdvancedDatapathObservabilityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedDatapathObservabilityConfig - * @function getTypeUrl - * @memberof google.container.v1.AdvancedDatapathObservabilityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedDatapathObservabilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.AdvancedDatapathObservabilityConfig"; - }; - - /** - * RelayMode enum. - * @name google.container.v1.AdvancedDatapathObservabilityConfig.RelayMode - * @enum {number} - * @property {number} RELAY_MODE_UNSPECIFIED=0 RELAY_MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} INTERNAL_VPC_LB=3 INTERNAL_VPC_LB value - * @property {number} EXTERNAL_LB=4 EXTERNAL_LB value - */ - AdvancedDatapathObservabilityConfig.RelayMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELAY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[3] = "INTERNAL_VPC_LB"] = 3; - values[valuesById[4] = "EXTERNAL_LB"] = 4; - return values; - })(); - - return AdvancedDatapathObservabilityConfig; - })(); - - v1.RayClusterMonitoringConfig = (function() { - - /** - * Properties of a RayClusterMonitoringConfig. - * @memberof google.container.v1 - * @interface IRayClusterMonitoringConfig - * @property {boolean|null} [enabled] RayClusterMonitoringConfig enabled - */ - - /** - * Constructs a new RayClusterMonitoringConfig. - * @memberof google.container.v1 - * @classdesc Represents a RayClusterMonitoringConfig. - * @implements IRayClusterMonitoringConfig - * @constructor - * @param {google.container.v1.IRayClusterMonitoringConfig=} [properties] Properties to set - */ - function RayClusterMonitoringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayClusterMonitoringConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.RayClusterMonitoringConfig - * @instance - */ - RayClusterMonitoringConfig.prototype.enabled = false; - - /** - * Creates a new RayClusterMonitoringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1.IRayClusterMonitoringConfig=} [properties] Properties to set - * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig instance - */ - RayClusterMonitoringConfig.create = function create(properties) { - return new RayClusterMonitoringConfig(properties); - }; - - /** - * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterMonitoringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1.RayClusterMonitoringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterMonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterMonitoringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RayClusterMonitoringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterMonitoringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayClusterMonitoringConfig message. - * @function verify - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayClusterMonitoringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - */ - RayClusterMonitoringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.RayClusterMonitoringConfig) - return object; - var message = new $root.google.container.v1.RayClusterMonitoringConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1.RayClusterMonitoringConfig} message RayClusterMonitoringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayClusterMonitoringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this RayClusterMonitoringConfig to JSON. - * @function toJSON - * @memberof google.container.v1.RayClusterMonitoringConfig - * @instance - * @returns {Object.} JSON object - */ - RayClusterMonitoringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayClusterMonitoringConfig - * @function getTypeUrl - * @memberof google.container.v1.RayClusterMonitoringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayClusterMonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.RayClusterMonitoringConfig"; - }; - - return RayClusterMonitoringConfig; - })(); - - v1.NodePoolLoggingConfig = (function() { - - /** - * Properties of a NodePoolLoggingConfig. - * @memberof google.container.v1 - * @interface INodePoolLoggingConfig - * @property {google.container.v1.ILoggingVariantConfig|null} [variantConfig] NodePoolLoggingConfig variantConfig - */ - - /** - * Constructs a new NodePoolLoggingConfig. - * @memberof google.container.v1 - * @classdesc Represents a NodePoolLoggingConfig. - * @implements INodePoolLoggingConfig - * @constructor - * @param {google.container.v1.INodePoolLoggingConfig=} [properties] Properties to set - */ - function NodePoolLoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolLoggingConfig variantConfig. - * @member {google.container.v1.ILoggingVariantConfig|null|undefined} variantConfig - * @memberof google.container.v1.NodePoolLoggingConfig - * @instance - */ - NodePoolLoggingConfig.prototype.variantConfig = null; - - /** - * Creates a new NodePoolLoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {google.container.v1.INodePoolLoggingConfig=} [properties] Properties to set - * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig instance - */ - NodePoolLoggingConfig.create = function create(properties) { - return new NodePoolLoggingConfig(properties); - }; - - /** - * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {google.container.v1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolLoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.variantConfig != null && Object.hasOwnProperty.call(message, "variantConfig")) - $root.google.container.v1.LoggingVariantConfig.encode(message.variantConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolLoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {google.container.v1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolLoggingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolLoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.variantConfig = $root.google.container.v1.LoggingVariantConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolLoggingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolLoggingConfig message. - * @function verify - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolLoggingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) { - var error = $root.google.container.v1.LoggingVariantConfig.verify(message.variantConfig); - if (error) - return "variantConfig." + error; - } - return null; - }; - - /** - * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolLoggingConfig} NodePoolLoggingConfig - */ - NodePoolLoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolLoggingConfig) - return object; - var message = new $root.google.container.v1.NodePoolLoggingConfig(); - if (object.variantConfig != null) { - if (typeof object.variantConfig !== "object") - throw TypeError(".google.container.v1.NodePoolLoggingConfig.variantConfig: object expected"); - message.variantConfig = $root.google.container.v1.LoggingVariantConfig.fromObject(object.variantConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {google.container.v1.NodePoolLoggingConfig} message NodePoolLoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolLoggingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.variantConfig = null; - if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) - object.variantConfig = $root.google.container.v1.LoggingVariantConfig.toObject(message.variantConfig, options); - return object; - }; - - /** - * Converts this NodePoolLoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1.NodePoolLoggingConfig - * @instance - * @returns {Object.} JSON object - */ - NodePoolLoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolLoggingConfig - * @function getTypeUrl - * @memberof google.container.v1.NodePoolLoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.NodePoolLoggingConfig"; - }; - - return NodePoolLoggingConfig; - })(); - - v1.LoggingVariantConfig = (function() { - - /** - * Properties of a LoggingVariantConfig. - * @memberof google.container.v1 - * @interface ILoggingVariantConfig - * @property {google.container.v1.LoggingVariantConfig.Variant|null} [variant] LoggingVariantConfig variant - */ - - /** - * Constructs a new LoggingVariantConfig. - * @memberof google.container.v1 - * @classdesc Represents a LoggingVariantConfig. - * @implements ILoggingVariantConfig - * @constructor - * @param {google.container.v1.ILoggingVariantConfig=} [properties] Properties to set - */ - function LoggingVariantConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingVariantConfig variant. - * @member {google.container.v1.LoggingVariantConfig.Variant} variant - * @memberof google.container.v1.LoggingVariantConfig - * @instance - */ - LoggingVariantConfig.prototype.variant = 0; - - /** - * Creates a new LoggingVariantConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {google.container.v1.ILoggingVariantConfig=} [properties] Properties to set - * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig instance - */ - LoggingVariantConfig.create = function create(properties) { - return new LoggingVariantConfig(properties); - }; - - /** - * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {google.container.v1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingVariantConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.variant); - return writer; - }; - - /** - * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1.LoggingVariantConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {google.container.v1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingVariantConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingVariantConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LoggingVariantConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.variant = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingVariantConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingVariantConfig message. - * @function verify - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoggingVariantConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.variant != null && message.hasOwnProperty("variant")) - switch (message.variant) { - default: - return "variant: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LoggingVariantConfig} LoggingVariantConfig - */ - LoggingVariantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LoggingVariantConfig) - return object; - var message = new $root.google.container.v1.LoggingVariantConfig(); - switch (object.variant) { - default: - if (typeof object.variant === "number") { - message.variant = object.variant; - break; - } - break; - case "VARIANT_UNSPECIFIED": - case 0: - message.variant = 0; - break; - case "DEFAULT": - case 1: - message.variant = 1; - break; - case "MAX_THROUGHPUT": - case 2: - message.variant = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {google.container.v1.LoggingVariantConfig} message LoggingVariantConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingVariantConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.variant = options.enums === String ? "VARIANT_UNSPECIFIED" : 0; - if (message.variant != null && message.hasOwnProperty("variant")) - object.variant = options.enums === String ? $root.google.container.v1.LoggingVariantConfig.Variant[message.variant] === undefined ? message.variant : $root.google.container.v1.LoggingVariantConfig.Variant[message.variant] : message.variant; - return object; - }; - - /** - * Converts this LoggingVariantConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LoggingVariantConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingVariantConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingVariantConfig - * @function getTypeUrl - * @memberof google.container.v1.LoggingVariantConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingVariantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LoggingVariantConfig"; - }; - - /** - * Variant enum. - * @name google.container.v1.LoggingVariantConfig.Variant - * @enum {number} - * @property {number} VARIANT_UNSPECIFIED=0 VARIANT_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} MAX_THROUGHPUT=2 MAX_THROUGHPUT value - */ - LoggingVariantConfig.Variant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "MAX_THROUGHPUT"] = 2; - return values; - })(); - - return LoggingVariantConfig; - })(); - - v1.MonitoringComponentConfig = (function() { - - /** - * Properties of a MonitoringComponentConfig. - * @memberof google.container.v1 - * @interface IMonitoringComponentConfig - * @property {Array.|null} [enableComponents] MonitoringComponentConfig enableComponents - */ - - /** - * Constructs a new MonitoringComponentConfig. - * @memberof google.container.v1 - * @classdesc Represents a MonitoringComponentConfig. - * @implements IMonitoringComponentConfig - * @constructor - * @param {google.container.v1.IMonitoringComponentConfig=} [properties] Properties to set - */ - function MonitoringComponentConfig(properties) { - this.enableComponents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoringComponentConfig enableComponents. - * @member {Array.} enableComponents - * @memberof google.container.v1.MonitoringComponentConfig - * @instance - */ - MonitoringComponentConfig.prototype.enableComponents = $util.emptyArray; - - /** - * Creates a new MonitoringComponentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {google.container.v1.IMonitoringComponentConfig=} [properties] Properties to set - * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig instance - */ - MonitoringComponentConfig.create = function create(properties) { - return new MonitoringComponentConfig(properties); - }; - - /** - * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {google.container.v1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringComponentConfig.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(); - } - return writer; - }; - - /** - * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1.MonitoringComponentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {google.container.v1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringComponentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.MonitoringComponentConfig(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringComponentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoringComponentConfig message. - * @function verify - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoringComponentConfig.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 3: - case 4: - case 5: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - } - return null; - }; - - /** - * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.MonitoringComponentConfig} MonitoringComponentConfig - */ - MonitoringComponentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.MonitoringComponentConfig) - return object; - var message = new $root.google.container.v1.MonitoringComponentConfig(); - if (object.enableComponents) { - if (!Array.isArray(object.enableComponents)) - throw TypeError(".google.container.v1.MonitoringComponentConfig.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 "APISERVER": - case 3: - message.enableComponents[i] = 3; - break; - case "SCHEDULER": - case 4: - message.enableComponents[i] = 4; - break; - case "CONTROLLER_MANAGER": - case 5: - message.enableComponents[i] = 5; - break; - case "STORAGE": - case 7: - message.enableComponents[i] = 7; - break; - case "HPA": - case 8: - message.enableComponents[i] = 8; - break; - case "POD": - case 9: - message.enableComponents[i] = 9; - break; - case "DAEMONSET": - case 10: - message.enableComponents[i] = 10; - break; - case "DEPLOYMENT": - case 11: - message.enableComponents[i] = 11; - break; - case "STATEFULSET": - case 12: - message.enableComponents[i] = 12; - break; - case "CADVISOR": - case 13: - message.enableComponents[i] = 13; - break; - case "KUBELET": - case 14: - message.enableComponents[i] = 14; - break; - case "DCGM": - case 15: - message.enableComponents[i] = 15; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {google.container.v1.MonitoringComponentConfig} message MonitoringComponentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoringComponentConfig.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.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; - } - return object; - }; - - /** - * Converts this MonitoringComponentConfig to JSON. - * @function toJSON - * @memberof google.container.v1.MonitoringComponentConfig - * @instance - * @returns {Object.} JSON object - */ - MonitoringComponentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonitoringComponentConfig - * @function getTypeUrl - * @memberof google.container.v1.MonitoringComponentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.MonitoringComponentConfig"; - }; - - /** - * Component enum. - * @name google.container.v1.MonitoringComponentConfig.Component - * @enum {number} - * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value - * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value - * @property {number} APISERVER=3 APISERVER value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value - * @property {number} STORAGE=7 STORAGE value - * @property {number} HPA=8 HPA value - * @property {number} POD=9 POD value - * @property {number} DAEMONSET=10 DAEMONSET value - * @property {number} DEPLOYMENT=11 DEPLOYMENT value - * @property {number} STATEFULSET=12 STATEFULSET value - * @property {number} CADVISOR=13 CADVISOR value - * @property {number} KUBELET=14 KUBELET value - * @property {number} DCGM=15 DCGM value - */ - MonitoringComponentConfig.Component = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; - values[valuesById[3] = "APISERVER"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; - values[valuesById[7] = "STORAGE"] = 7; - values[valuesById[8] = "HPA"] = 8; - values[valuesById[9] = "POD"] = 9; - values[valuesById[10] = "DAEMONSET"] = 10; - values[valuesById[11] = "DEPLOYMENT"] = 11; - values[valuesById[12] = "STATEFULSET"] = 12; - values[valuesById[13] = "CADVISOR"] = 13; - values[valuesById[14] = "KUBELET"] = 14; - values[valuesById[15] = "DCGM"] = 15; - return values; - })(); - - return MonitoringComponentConfig; - })(); - - /** - * DatapathProvider enum. - * @name google.container.v1.DatapathProvider - * @enum {number} - * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value - * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value - * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value - */ - v1.DatapathProvider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEGACY_DATAPATH"] = 1; - values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; - return values; - })(); - - /** - * NodePoolUpdateStrategy enum. - * @name google.container.v1.NodePoolUpdateStrategy - * @enum {number} - * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value - * @property {number} BLUE_GREEN=2 BLUE_GREEN value - * @property {number} SURGE=3 SURGE value - */ - v1.NodePoolUpdateStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[2] = "BLUE_GREEN"] = 2; - values[valuesById[3] = "SURGE"] = 3; - return values; - })(); - - v1.ManagedPrometheusConfig = (function() { - - /** - * Properties of a ManagedPrometheusConfig. - * @memberof google.container.v1 - * @interface IManagedPrometheusConfig - * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled - */ - - /** - * Constructs a new ManagedPrometheusConfig. - * @memberof google.container.v1 - * @classdesc Represents a ManagedPrometheusConfig. - * @implements IManagedPrometheusConfig - * @constructor - * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set - */ - function ManagedPrometheusConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagedPrometheusConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ManagedPrometheusConfig - * @instance - */ - ManagedPrometheusConfig.prototype.enabled = false; - - /** - * Creates a new ManagedPrometheusConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig instance - */ - ManagedPrometheusConfig.create = function create(properties) { - return new ManagedPrometheusConfig(properties); - }; - - /** - * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagedPrometheusConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.container.v1.ManagedPrometheusConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagedPrometheusConfig message. - * @function verify - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagedPrometheusConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig - */ - ManagedPrometheusConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ManagedPrometheusConfig) - return object; - var message = new $root.google.container.v1.ManagedPrometheusConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {google.container.v1.ManagedPrometheusConfig} message ManagedPrometheusConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagedPrometheusConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ManagedPrometheusConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ManagedPrometheusConfig - * @instance - * @returns {Object.} JSON object - */ - ManagedPrometheusConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagedPrometheusConfig - * @function getTypeUrl - * @memberof google.container.v1.ManagedPrometheusConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ManagedPrometheusConfig"; - }; - - return ManagedPrometheusConfig; - })(); - - v1.Fleet = (function() { - - /** - * Properties of a Fleet. - * @memberof google.container.v1 - * @interface IFleet - * @property {string|null} [project] Fleet project - * @property {string|null} [membership] Fleet membership - * @property {boolean|null} [preRegistered] Fleet preRegistered - */ - - /** - * Constructs a new Fleet. - * @memberof google.container.v1 - * @classdesc Represents a Fleet. - * @implements IFleet - * @constructor - * @param {google.container.v1.IFleet=} [properties] Properties to set - */ - function Fleet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Fleet project. - * @member {string} project - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.project = ""; - - /** - * Fleet membership. - * @member {string} membership - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.membership = ""; - - /** - * Fleet preRegistered. - * @member {boolean} preRegistered - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.preRegistered = false; - - /** - * Creates a new Fleet instance using the specified properties. - * @function create - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet=} [properties] Properties to set - * @returns {google.container.v1.Fleet} Fleet instance - */ - Fleet.create = function create(properties) { - return new Fleet(properties); - }; - - /** - * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.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.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); - return writer; - }; - - /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Fleet message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Fleet} Fleet - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Fleet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.membership = reader.string(); - break; - } - case 3: { - message.preRegistered = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Fleet} Fleet - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Fleet message. - * @function verify - * @memberof google.container.v1.Fleet - * @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) { - 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.preRegistered != null && message.hasOwnProperty("preRegistered")) - if (typeof message.preRegistered !== "boolean") - return "preRegistered: boolean expected"; - return null; - }; - - /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Fleet - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Fleet} Fleet - */ - Fleet.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Fleet) - return object; - var message = new $root.google.container.v1.Fleet(); - if (object.project != null) - message.project = String(object.project); - if (object.membership != null) - message.membership = String(object.membership); - if (object.preRegistered != null) - message.preRegistered = Boolean(object.preRegistered); - return message; - }; - - /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.Fleet} message Fleet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fleet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.membership = ""; - object.preRegistered = false; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; - if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) - object.preRegistered = message.preRegistered; - return object; - }; - - /** - * Converts this Fleet to JSON. - * @function toJSON - * @memberof google.container.v1.Fleet - * @instance - * @returns {Object.} JSON object - */ - Fleet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Fleet - * @function getTypeUrl - * @memberof google.container.v1.Fleet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Fleet"; - }; - - return Fleet; - })(); - - /** - * StackType enum. - * @name google.container.v1.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4=1 IPV4 value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - v1.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - v1.ControlPlaneEndpointsConfig = (function() { - - /** - * Properties of a ControlPlaneEndpointsConfig. - * @memberof google.container.v1 - * @interface IControlPlaneEndpointsConfig - * @property {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null} [dnsEndpointConfig] ControlPlaneEndpointsConfig dnsEndpointConfig - * @property {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null} [ipEndpointsConfig] ControlPlaneEndpointsConfig ipEndpointsConfig - */ - - /** - * Constructs a new ControlPlaneEndpointsConfig. - * @memberof google.container.v1 - * @classdesc Represents a ControlPlaneEndpointsConfig. - * @implements IControlPlaneEndpointsConfig - * @constructor - * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set - */ - function ControlPlaneEndpointsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControlPlaneEndpointsConfig dnsEndpointConfig. - * @member {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null|undefined} dnsEndpointConfig - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @instance - */ - ControlPlaneEndpointsConfig.prototype.dnsEndpointConfig = null; - - /** - * ControlPlaneEndpointsConfig ipEndpointsConfig. - * @member {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null|undefined} ipEndpointsConfig - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @instance - */ - ControlPlaneEndpointsConfig.prototype.ipEndpointsConfig = null; - - /** - * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set - * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig instance - */ - ControlPlaneEndpointsConfig.create = function create(properties) { - return new ControlPlaneEndpointsConfig(properties); - }; - - /** - * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlPlaneEndpointsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dnsEndpointConfig != null && Object.hasOwnProperty.call(message, "dnsEndpointConfig")) - $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.encode(message.dnsEndpointConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ipEndpointsConfig != null && Object.hasOwnProperty.call(message, "ipEndpointsConfig")) - $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.encode(message.ipEndpointsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlPlaneEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlPlaneEndpointsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlPlaneEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControlPlaneEndpointsConfig message. - * @function verify - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControlPlaneEndpointsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) { - var error = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify(message.dnsEndpointConfig); - if (error) - return "dnsEndpointConfig." + error; - } - if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) { - var error = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify(message.ipEndpointsConfig); - if (error) - return "ipEndpointsConfig." + error; - } - return null; - }; - - /** - * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig - */ - ControlPlaneEndpointsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig) - return object; - var message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); - if (object.dnsEndpointConfig != null) { - if (typeof object.dnsEndpointConfig !== "object") - throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.dnsEndpointConfig: object expected"); - message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.fromObject(object.dnsEndpointConfig); - } - if (object.ipEndpointsConfig != null) { - if (typeof object.ipEndpointsConfig !== "object") - throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.ipEndpointsConfig: object expected"); - message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.fromObject(object.ipEndpointsConfig); - } - return message; - }; - - /** - * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControlPlaneEndpointsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dnsEndpointConfig = null; - object.ipEndpointsConfig = null; - } - if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) - object.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.toObject(message.dnsEndpointConfig, options); - if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) - object.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.toObject(message.ipEndpointsConfig, options); - return object; - }; - - /** - * Converts this ControlPlaneEndpointsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @instance - * @returns {Object.} JSON object - */ - ControlPlaneEndpointsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ControlPlaneEndpointsConfig - * @function getTypeUrl - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ControlPlaneEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig"; - }; - - ControlPlaneEndpointsConfig.DNSEndpointConfig = (function() { - - /** - * Properties of a DNSEndpointConfig. - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @interface IDNSEndpointConfig - * @property {string|null} [endpoint] DNSEndpointConfig endpoint - * @property {boolean|null} [allowExternalTraffic] DNSEndpointConfig allowExternalTraffic - */ - - /** - * Constructs a new DNSEndpointConfig. - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @classdesc Represents a DNSEndpointConfig. - * @implements IDNSEndpointConfig - * @constructor - * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set - */ - function DNSEndpointConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DNSEndpointConfig endpoint. - * @member {string} endpoint - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @instance - */ - DNSEndpointConfig.prototype.endpoint = ""; - - /** - * DNSEndpointConfig allowExternalTraffic. - * @member {boolean|null|undefined} allowExternalTraffic - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @instance - */ - DNSEndpointConfig.prototype.allowExternalTraffic = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DNSEndpointConfig _allowExternalTraffic. - * @member {"allowExternalTraffic"|undefined} _allowExternalTraffic - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @instance - */ - Object.defineProperty(DNSEndpointConfig.prototype, "_allowExternalTraffic", { - get: $util.oneOfGetter($oneOfFields = ["allowExternalTraffic"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DNSEndpointConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set - * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig instance - */ - DNSEndpointConfig.create = function create(properties) { - return new DNSEndpointConfig(properties); - }; - - /** - * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSEndpointConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpoint); - if (message.allowExternalTraffic != null && Object.hasOwnProperty.call(message, "allowExternalTraffic")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowExternalTraffic); - return writer; - }; - - /** - * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSEndpointConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DNSEndpointConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSEndpointConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.endpoint = reader.string(); - break; - } - case 3: { - message.allowExternalTraffic = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSEndpointConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DNSEndpointConfig message. - * @function verify - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DNSEndpointConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { - properties._allowExternalTraffic = 1; - if (typeof message.allowExternalTraffic !== "boolean") - return "allowExternalTraffic: boolean expected"; - } - return null; - }; - - /** - * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig - */ - DNSEndpointConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig) - return object; - var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.allowExternalTraffic != null) - message.allowExternalTraffic = Boolean(object.allowExternalTraffic); - return message; - }; - - /** - * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} message DNSEndpointConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DNSEndpointConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.endpoint = ""; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { - object.allowExternalTraffic = message.allowExternalTraffic; - if (options.oneofs) - object._allowExternalTraffic = "allowExternalTraffic"; - } - return object; - }; - - /** - * Converts this DNSEndpointConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @instance - * @returns {Object.} JSON object - */ - DNSEndpointConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DNSEndpointConfig - * @function getTypeUrl - * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DNSEndpointConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"; - }; - - return DNSEndpointConfig; - })(); - - ControlPlaneEndpointsConfig.IPEndpointsConfig = (function() { - - /** - * Properties of a IPEndpointsConfig. - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @interface IIPEndpointsConfig - * @property {boolean|null} [enabled] IPEndpointsConfig enabled - * @property {boolean|null} [enablePublicEndpoint] IPEndpointsConfig enablePublicEndpoint - * @property {boolean|null} [globalAccess] IPEndpointsConfig globalAccess - * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [authorizedNetworksConfig] IPEndpointsConfig authorizedNetworksConfig - * @property {string|null} [publicEndpoint] IPEndpointsConfig publicEndpoint - * @property {string|null} [privateEndpoint] IPEndpointsConfig privateEndpoint - * @property {string|null} [privateEndpointSubnetwork] IPEndpointsConfig privateEndpointSubnetwork - */ - - /** - * Constructs a new IPEndpointsConfig. - * @memberof google.container.v1.ControlPlaneEndpointsConfig - * @classdesc Represents a IPEndpointsConfig. - * @implements IIPEndpointsConfig - * @constructor - * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set - */ - function IPEndpointsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IPEndpointsConfig enabled. - * @member {boolean|null|undefined} enabled - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.enabled = null; - - /** - * IPEndpointsConfig enablePublicEndpoint. - * @member {boolean|null|undefined} enablePublicEndpoint - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.enablePublicEndpoint = null; - - /** - * IPEndpointsConfig globalAccess. - * @member {boolean|null|undefined} globalAccess - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.globalAccess = null; - - /** - * IPEndpointsConfig authorizedNetworksConfig. - * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} authorizedNetworksConfig - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.authorizedNetworksConfig = null; - - /** - * IPEndpointsConfig publicEndpoint. - * @member {string} publicEndpoint - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.publicEndpoint = ""; - - /** - * IPEndpointsConfig privateEndpoint. - * @member {string} privateEndpoint - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.privateEndpoint = ""; - - /** - * IPEndpointsConfig privateEndpointSubnetwork. - * @member {string} privateEndpointSubnetwork - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - IPEndpointsConfig.prototype.privateEndpointSubnetwork = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IPEndpointsConfig _enabled. - * @member {"enabled"|undefined} _enabled - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - Object.defineProperty(IPEndpointsConfig.prototype, "_enabled", { - get: $util.oneOfGetter($oneOfFields = ["enabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * IPEndpointsConfig _enablePublicEndpoint. - * @member {"enablePublicEndpoint"|undefined} _enablePublicEndpoint - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - Object.defineProperty(IPEndpointsConfig.prototype, "_enablePublicEndpoint", { - get: $util.oneOfGetter($oneOfFields = ["enablePublicEndpoint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * IPEndpointsConfig _globalAccess. - * @member {"globalAccess"|undefined} _globalAccess - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - */ - Object.defineProperty(IPEndpointsConfig.prototype, "_globalAccess", { - get: $util.oneOfGetter($oneOfFields = ["globalAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new IPEndpointsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set - * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig instance - */ - IPEndpointsConfig.create = function create(properties) { - return new IPEndpointsConfig(properties); - }; - - /** - * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPEndpointsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.enablePublicEndpoint != null && Object.hasOwnProperty.call(message, "enablePublicEndpoint")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePublicEndpoint); - if (message.globalAccess != null && Object.hasOwnProperty.call(message, "globalAccess")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.globalAccess); - if (message.authorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "authorizedNetworksConfig")) - $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.authorizedNetworksConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); - if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.privateEndpoint); - if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.privateEndpointSubnetwork); - return writer; - }; - - /** - * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a IPEndpointsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPEndpointsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.enablePublicEndpoint = reader.bool(); - break; - } - case 3: { - message.globalAccess = reader.bool(); - break; - } - case 4: { - message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.publicEndpoint = reader.string(); - break; - } - case 6: { - message.privateEndpoint = reader.string(); - break; - } - case 7: { - message.privateEndpointSubnetwork = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a IPEndpointsConfig message. - * @function verify - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IPEndpointsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - properties._enabled = 1; - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - } - if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { - properties._enablePublicEndpoint = 1; - if (typeof message.enablePublicEndpoint !== "boolean") - return "enablePublicEndpoint: boolean expected"; - } - if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { - properties._globalAccess = 1; - if (typeof message.globalAccess !== "boolean") - return "globalAccess: boolean expected"; - } - if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) { - var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.authorizedNetworksConfig); - if (error) - return "authorizedNetworksConfig." + error; - } - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - if (!$util.isString(message.publicEndpoint)) - return "publicEndpoint: string expected"; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - if (!$util.isString(message.privateEndpoint)) - return "privateEndpoint: string expected"; - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - if (!$util.isString(message.privateEndpointSubnetwork)) - return "privateEndpointSubnetwork: string expected"; - return null; - }; - - /** - * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig - */ - IPEndpointsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig) - return object; - var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.enablePublicEndpoint != null) - message.enablePublicEndpoint = Boolean(object.enablePublicEndpoint); - if (object.globalAccess != null) - message.globalAccess = Boolean(object.globalAccess); - if (object.authorizedNetworksConfig != null) { - if (typeof object.authorizedNetworksConfig !== "object") - throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorizedNetworksConfig: object expected"); - message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.authorizedNetworksConfig); - } - if (object.publicEndpoint != null) - message.publicEndpoint = String(object.publicEndpoint); - if (object.privateEndpoint != null) - message.privateEndpoint = String(object.privateEndpoint); - if (object.privateEndpointSubnetwork != null) - message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); - return message; - }; - - /** - * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} message IPEndpointsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IPEndpointsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authorizedNetworksConfig = null; - object.publicEndpoint = ""; - object.privateEndpoint = ""; - object.privateEndpointSubnetwork = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) { - object.enabled = message.enabled; - if (options.oneofs) - object._enabled = "enabled"; - } - if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { - object.enablePublicEndpoint = message.enablePublicEndpoint; - if (options.oneofs) - object._enablePublicEndpoint = "enablePublicEndpoint"; - } - if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { - object.globalAccess = message.globalAccess; - if (options.oneofs) - object._globalAccess = "globalAccess"; - } - if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) - object.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.authorizedNetworksConfig, options); - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - object.publicEndpoint = message.publicEndpoint; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - object.privateEndpoint = message.privateEndpoint; - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; - return object; - }; - - /** - * Converts this IPEndpointsConfig to JSON. - * @function toJSON - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @instance - * @returns {Object.} JSON object - */ - IPEndpointsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IPEndpointsConfig - * @function getTypeUrl - * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IPEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"; - }; - - return IPEndpointsConfig; - })(); - - return ControlPlaneEndpointsConfig; - })(); - - /** - * IPv6AccessType enum. - * @name google.container.v1.IPv6AccessType - * @enum {number} - * @property {number} IPV6_ACCESS_TYPE_UNSPECIFIED=0 IPV6_ACCESS_TYPE_UNSPECIFIED value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - v1.IPv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IPV6_ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - v1.LocalNvmeSsdBlockConfig = (function() { - - /** - * Properties of a LocalNvmeSsdBlockConfig. - * @memberof google.container.v1 - * @interface ILocalNvmeSsdBlockConfig - * @property {number|null} [localSsdCount] LocalNvmeSsdBlockConfig localSsdCount - */ - - /** - * Constructs a new LocalNvmeSsdBlockConfig. - * @memberof google.container.v1 - * @classdesc Represents a LocalNvmeSsdBlockConfig. - * @implements ILocalNvmeSsdBlockConfig - * @constructor - * @param {google.container.v1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set - */ - function LocalNvmeSsdBlockConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocalNvmeSsdBlockConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @instance - */ - LocalNvmeSsdBlockConfig.prototype.localSsdCount = 0; - - /** - * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set - * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig instance - */ - LocalNvmeSsdBlockConfig.create = function create(properties) { - return new LocalNvmeSsdBlockConfig(properties); - }; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalNvmeSsdBlockConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); - return writer; - }; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalNvmeSsdBlockConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalNvmeSsdBlockConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LocalNvmeSsdBlockConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.localSsdCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalNvmeSsdBlockConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocalNvmeSsdBlockConfig message. - * @function verify - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalNvmeSsdBlockConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - return null; - }; - - /** - * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - */ - LocalNvmeSsdBlockConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.LocalNvmeSsdBlockConfig) - return object; - var message = new $root.google.container.v1.LocalNvmeSsdBlockConfig(); - if (object.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - return message; - }; - - /** - * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1.LocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalNvmeSsdBlockConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localSsdCount = 0; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - return object; - }; - - /** - * Converts this LocalNvmeSsdBlockConfig to JSON. - * @function toJSON - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @instance - * @returns {Object.} JSON object - */ - LocalNvmeSsdBlockConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocalNvmeSsdBlockConfig - * @function getTypeUrl - * @memberof google.container.v1.LocalNvmeSsdBlockConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocalNvmeSsdBlockConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.LocalNvmeSsdBlockConfig"; - }; - - return LocalNvmeSsdBlockConfig; - })(); - - v1.EphemeralStorageLocalSsdConfig = (function() { - - /** - * Properties of an EphemeralStorageLocalSsdConfig. - * @memberof google.container.v1 - * @interface IEphemeralStorageLocalSsdConfig - * @property {number|null} [localSsdCount] EphemeralStorageLocalSsdConfig localSsdCount - */ - - /** - * Constructs a new EphemeralStorageLocalSsdConfig. - * @memberof google.container.v1 - * @classdesc Represents an EphemeralStorageLocalSsdConfig. - * @implements IEphemeralStorageLocalSsdConfig - * @constructor - * @param {google.container.v1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set - */ - function EphemeralStorageLocalSsdConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EphemeralStorageLocalSsdConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @instance - */ - EphemeralStorageLocalSsdConfig.prototype.localSsdCount = 0; - - /** - * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set - * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig instance - */ - EphemeralStorageLocalSsdConfig.create = function create(properties) { - return new EphemeralStorageLocalSsdConfig(properties); - }; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageLocalSsdConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); - return writer; - }; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageLocalSsdConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageLocalSsdConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EphemeralStorageLocalSsdConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.localSsdCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageLocalSsdConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EphemeralStorageLocalSsdConfig message. - * @function verify - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EphemeralStorageLocalSsdConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - return null; - }; - - /** - * Creates an EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - */ - EphemeralStorageLocalSsdConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.EphemeralStorageLocalSsdConfig) - return object; - var message = new $root.google.container.v1.EphemeralStorageLocalSsdConfig(); - if (object.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - return message; - }; - - /** - * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1.EphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EphemeralStorageLocalSsdConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localSsdCount = 0; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - return object; - }; - - /** - * Converts this EphemeralStorageLocalSsdConfig to JSON. - * @function toJSON - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @instance - * @returns {Object.} JSON object - */ - EphemeralStorageLocalSsdConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EphemeralStorageLocalSsdConfig - * @function getTypeUrl - * @memberof google.container.v1.EphemeralStorageLocalSsdConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EphemeralStorageLocalSsdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.EphemeralStorageLocalSsdConfig"; - }; - - return EphemeralStorageLocalSsdConfig; - })(); - - v1.ResourceManagerTags = (function() { - - /** - * Properties of a ResourceManagerTags. - * @memberof google.container.v1 - * @interface IResourceManagerTags - * @property {Object.|null} [tags] ResourceManagerTags tags - */ - - /** - * Constructs a new ResourceManagerTags. - * @memberof google.container.v1 - * @classdesc Represents a ResourceManagerTags. - * @implements IResourceManagerTags - * @constructor - * @param {google.container.v1.IResourceManagerTags=} [properties] Properties to set - */ - function ResourceManagerTags(properties) { - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceManagerTags tags. - * @member {Object.} tags - * @memberof google.container.v1.ResourceManagerTags - * @instance - */ - ResourceManagerTags.prototype.tags = $util.emptyObject; - - /** - * Creates a new ResourceManagerTags instance using the specified properties. - * @function create - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {google.container.v1.IResourceManagerTags=} [properties] Properties to set - * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags instance - */ - ResourceManagerTags.create = function create(properties) { - return new ResourceManagerTags(properties); - }; - - /** - * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. - * @function encode - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {google.container.v1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceManagerTags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1.ResourceManagerTags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {google.container.v1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceManagerTags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceManagerTags.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ResourceManagerTags(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceManagerTags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceManagerTags message. - * @function verify - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceManagerTags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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"; - } - return null; - }; - - /** - * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.ResourceManagerTags} ResourceManagerTags - */ - ResourceManagerTags.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ResourceManagerTags) - return object; - var message = new $root.google.container.v1.ResourceManagerTags(); - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.container.v1.ResourceManagerTags.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]]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {google.container.v1.ResourceManagerTags} message ResourceManagerTags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceManagerTags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.tags = {}; - 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]]; - } - return object; - }; - - /** - * Converts this ResourceManagerTags to JSON. - * @function toJSON - * @memberof google.container.v1.ResourceManagerTags - * @instance - * @returns {Object.} JSON object - */ - ResourceManagerTags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceManagerTags - * @function getTypeUrl - * @memberof google.container.v1.ResourceManagerTags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceManagerTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.ResourceManagerTags"; - }; - - return ResourceManagerTags; - })(); - - v1.EnterpriseConfig = (function() { - - /** - * Properties of an EnterpriseConfig. - * @memberof google.container.v1 - * @interface IEnterpriseConfig - * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [clusterTier] EnterpriseConfig clusterTier - * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] EnterpriseConfig desiredTier - */ - - /** - * Constructs a new EnterpriseConfig. - * @memberof google.container.v1 - * @classdesc Represents an EnterpriseConfig. - * @implements IEnterpriseConfig - * @constructor - * @param {google.container.v1.IEnterpriseConfig=} [properties] Properties to set - */ - function EnterpriseConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnterpriseConfig clusterTier. - * @member {google.container.v1.EnterpriseConfig.ClusterTier} clusterTier - * @memberof google.container.v1.EnterpriseConfig - * @instance - */ - EnterpriseConfig.prototype.clusterTier = 0; - - /** - * EnterpriseConfig desiredTier. - * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier - * @memberof google.container.v1.EnterpriseConfig - * @instance - */ - EnterpriseConfig.prototype.desiredTier = 0; - - /** - * Creates a new EnterpriseConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {google.container.v1.IEnterpriseConfig=} [properties] Properties to set - * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig instance - */ - EnterpriseConfig.create = function create(properties) { - return new EnterpriseConfig(properties); - }; - - /** - * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {google.container.v1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnterpriseConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterTier); - if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.desiredTier); - return writer; - }; - - /** - * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.EnterpriseConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {google.container.v1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnterpriseConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EnterpriseConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clusterTier = reader.int32(); - break; - } - case 2: { - message.desiredTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnterpriseConfig message. - * @function verify - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnterpriseConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) - switch (message.clusterTier) { - default: - return "clusterTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) - switch (message.desiredTier) { - default: - return "desiredTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an EnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.EnterpriseConfig} EnterpriseConfig - */ - EnterpriseConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.EnterpriseConfig) - return object; - var message = new $root.google.container.v1.EnterpriseConfig(); - switch (object.clusterTier) { - default: - if (typeof object.clusterTier === "number") { - message.clusterTier = object.clusterTier; - break; - } - break; - case "CLUSTER_TIER_UNSPECIFIED": - case 0: - message.clusterTier = 0; - break; - case "STANDARD": - case 1: - message.clusterTier = 1; - break; - case "ENTERPRISE": - case 2: - message.clusterTier = 2; - break; - } - switch (object.desiredTier) { - default: - if (typeof object.desiredTier === "number") { - message.desiredTier = object.desiredTier; - break; - } - break; - case "CLUSTER_TIER_UNSPECIFIED": - case 0: - message.desiredTier = 0; - break; - case "STANDARD": - case 1: - message.desiredTier = 1; - break; - case "ENTERPRISE": - case 2: - message.desiredTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {google.container.v1.EnterpriseConfig} message EnterpriseConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnterpriseConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; - object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; - } - if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) - object.clusterTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] : message.clusterTier; - if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) - object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; - return object; - }; - - /** - * Converts this EnterpriseConfig to JSON. - * @function toJSON - * @memberof google.container.v1.EnterpriseConfig - * @instance - * @returns {Object.} JSON object - */ - EnterpriseConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnterpriseConfig - * @function getTypeUrl - * @memberof google.container.v1.EnterpriseConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.EnterpriseConfig"; - }; - - /** - * ClusterTier enum. - * @name google.container.v1.EnterpriseConfig.ClusterTier - * @enum {number} - * @property {number} CLUSTER_TIER_UNSPECIFIED=0 CLUSTER_TIER_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} ENTERPRISE=2 ENTERPRISE value - */ - EnterpriseConfig.ClusterTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLUSTER_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "ENTERPRISE"] = 2; - return values; - })(); - - return EnterpriseConfig; - })(); - - v1.SecretManagerConfig = (function() { - - /** - * Properties of a SecretManagerConfig. - * @memberof google.container.v1 - * @interface ISecretManagerConfig - * @property {boolean|null} [enabled] SecretManagerConfig enabled - */ - - /** - * Constructs a new SecretManagerConfig. - * @memberof google.container.v1 - * @classdesc Represents a SecretManagerConfig. - * @implements ISecretManagerConfig - * @constructor - * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set - */ - function SecretManagerConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecretManagerConfig enabled. - * @member {boolean|null|undefined} enabled - * @memberof google.container.v1.SecretManagerConfig - * @instance - */ - SecretManagerConfig.prototype.enabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SecretManagerConfig _enabled. - * @member {"enabled"|undefined} _enabled - * @memberof google.container.v1.SecretManagerConfig - * @instance - */ - Object.defineProperty(SecretManagerConfig.prototype, "_enabled", { - get: $util.oneOfGetter($oneOfFields = ["enabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SecretManagerConfig instance using the specified properties. - * @function create - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set - * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig instance - */ - SecretManagerConfig.create = function create(properties) { - return new SecretManagerConfig(properties); - }; - - /** - * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecretManagerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecretManagerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecretManagerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecretManagerConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecretManagerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecretManagerConfig message. - * @function verify - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecretManagerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - properties._enabled = 1; - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - } - return null; - }; - - /** - * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig - */ - SecretManagerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecretManagerConfig) - return object; - var message = new $root.google.container.v1.SecretManagerConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {google.container.v1.SecretManagerConfig} message SecretManagerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecretManagerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - object.enabled = message.enabled; - if (options.oneofs) - object._enabled = "enabled"; - } - return object; - }; - - /** - * Converts this SecretManagerConfig to JSON. - * @function toJSON - * @memberof google.container.v1.SecretManagerConfig - * @instance - * @returns {Object.} JSON object - */ - SecretManagerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecretManagerConfig - * @function getTypeUrl - * @memberof google.container.v1.SecretManagerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecretManagerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SecretManagerConfig"; - }; - - return SecretManagerConfig; - })(); - - v1.SecondaryBootDisk = (function() { - - /** - * Properties of a SecondaryBootDisk. - * @memberof google.container.v1 - * @interface ISecondaryBootDisk - * @property {google.container.v1.SecondaryBootDisk.Mode|null} [mode] SecondaryBootDisk mode - * @property {string|null} [diskImage] SecondaryBootDisk diskImage - */ - - /** - * Constructs a new SecondaryBootDisk. - * @memberof google.container.v1 - * @classdesc Represents a SecondaryBootDisk. - * @implements ISecondaryBootDisk - * @constructor - * @param {google.container.v1.ISecondaryBootDisk=} [properties] Properties to set - */ - function SecondaryBootDisk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecondaryBootDisk mode. - * @member {google.container.v1.SecondaryBootDisk.Mode} mode - * @memberof google.container.v1.SecondaryBootDisk - * @instance - */ - SecondaryBootDisk.prototype.mode = 0; - - /** - * SecondaryBootDisk diskImage. - * @member {string} diskImage - * @memberof google.container.v1.SecondaryBootDisk - * @instance - */ - SecondaryBootDisk.prototype.diskImage = ""; - - /** - * Creates a new SecondaryBootDisk instance using the specified properties. - * @function create - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {google.container.v1.ISecondaryBootDisk=} [properties] Properties to set - * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk instance - */ - SecondaryBootDisk.create = function create(properties) { - return new SecondaryBootDisk(properties); - }; - - /** - * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {google.container.v1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.diskImage != null && Object.hasOwnProperty.call(message, "diskImage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diskImage); - return writer; - }; - - /** - * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {google.container.v1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDisk.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecondaryBootDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - message.diskImage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecondaryBootDisk message. - * @function verify - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecondaryBootDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - break; - } - if (message.diskImage != null && message.hasOwnProperty("diskImage")) - if (!$util.isString(message.diskImage)) - return "diskImage: string expected"; - return null; - }; - - /** - * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SecondaryBootDisk} SecondaryBootDisk - */ - SecondaryBootDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecondaryBootDisk) - return object; - var message = new $root.google.container.v1.SecondaryBootDisk(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "CONTAINER_IMAGE_CACHE": - case 1: - message.mode = 1; - break; - } - if (object.diskImage != null) - message.diskImage = String(object.diskImage); - return message; - }; - - /** - * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {google.container.v1.SecondaryBootDisk} message SecondaryBootDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecondaryBootDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - object.diskImage = ""; - } - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.container.v1.SecondaryBootDisk.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecondaryBootDisk.Mode[message.mode] : message.mode; - if (message.diskImage != null && message.hasOwnProperty("diskImage")) - object.diskImage = message.diskImage; - return object; - }; - - /** - * Converts this SecondaryBootDisk to JSON. - * @function toJSON - * @memberof google.container.v1.SecondaryBootDisk - * @instance - * @returns {Object.} JSON object - */ - SecondaryBootDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecondaryBootDisk - * @function getTypeUrl - * @memberof google.container.v1.SecondaryBootDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecondaryBootDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SecondaryBootDisk"; - }; - - /** - * Mode enum. - * @name google.container.v1.SecondaryBootDisk.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} CONTAINER_IMAGE_CACHE=1 CONTAINER_IMAGE_CACHE value - */ - SecondaryBootDisk.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONTAINER_IMAGE_CACHE"] = 1; - return values; - })(); - - return SecondaryBootDisk; - })(); - - /** - * InTransitEncryptionConfig enum. - * @name google.container.v1.InTransitEncryptionConfig - * @enum {number} - * @property {number} IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED=0 IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED value - * @property {number} IN_TRANSIT_ENCRYPTION_DISABLED=1 IN_TRANSIT_ENCRYPTION_DISABLED value - * @property {number} IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT=2 IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT value - */ - v1.InTransitEncryptionConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_TRANSIT_ENCRYPTION_DISABLED"] = 1; - values[valuesById[2] = "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT"] = 2; - return values; - })(); - - v1.SecondaryBootDiskUpdateStrategy = (function() { - - /** - * Properties of a SecondaryBootDiskUpdateStrategy. - * @memberof google.container.v1 - * @interface ISecondaryBootDiskUpdateStrategy - */ - - /** - * Constructs a new SecondaryBootDiskUpdateStrategy. - * @memberof google.container.v1 - * @classdesc Represents a SecondaryBootDiskUpdateStrategy. - * @implements ISecondaryBootDiskUpdateStrategy - * @constructor - * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set - */ - function SecondaryBootDiskUpdateStrategy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. - * @function create - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set - * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy instance - */ - SecondaryBootDiskUpdateStrategy.create = function create(properties) { - return new SecondaryBootDiskUpdateStrategy(properties); - }; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @function encode - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDiskUpdateStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDiskUpdateStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDiskUpdateStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecondaryBootDiskUpdateStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDiskUpdateStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecondaryBootDiskUpdateStrategy message. - * @function verify - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecondaryBootDiskUpdateStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - */ - SecondaryBootDiskUpdateStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecondaryBootDiskUpdateStrategy) - return object; - return new $root.google.container.v1.SecondaryBootDiskUpdateStrategy(); - }; - - /** - * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1.SecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecondaryBootDiskUpdateStrategy.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SecondaryBootDiskUpdateStrategy to JSON. - * @function toJSON - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @instance - * @returns {Object.} JSON object - */ - SecondaryBootDiskUpdateStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecondaryBootDiskUpdateStrategy - * @function getTypeUrl - * @memberof google.container.v1.SecondaryBootDiskUpdateStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecondaryBootDiskUpdateStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.SecondaryBootDiskUpdateStrategy"; - }; - - return SecondaryBootDiskUpdateStrategy; - })(); - - return v1; - })(); - - return container; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.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.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.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.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - 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.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), 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.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - 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.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - 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.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.DoubleValue = (function() { - - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ - - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; - - return DoubleValue; - })(); - - protobuf.FloatValue = (function() { - - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ - - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; - - /** - * Creates a new FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ - - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; - - return UInt32Value; - })(); - - protobuf.BoolValue = (function() { - - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ - - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; - - /** - * Creates a new BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { - - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ - - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; - - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; - - return BytesValue; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - return protobuf; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - /** - * Code enum. - * @name google.rpc.Code - * @enum {number} - * @property {number} OK=0 OK value - * @property {number} CANCELLED=1 CANCELLED value - * @property {number} UNKNOWN=2 UNKNOWN value - * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value - * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value - * @property {number} NOT_FOUND=5 NOT_FOUND value - * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value - * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value - * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value - * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value - * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value - * @property {number} ABORTED=10 ABORTED value - * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value - * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value - * @property {number} INTERNAL=13 INTERNAL value - * @property {number} UNAVAILABLE=14 UNAVAILABLE value - * @property {number} DATA_LOSS=15 DATA_LOSS value - */ - rpc.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OK"] = 0; - values[valuesById[1] = "CANCELLED"] = 1; - values[valuesById[2] = "UNKNOWN"] = 2; - values[valuesById[3] = "INVALID_ARGUMENT"] = 3; - values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; - values[valuesById[5] = "NOT_FOUND"] = 5; - values[valuesById[6] = "ALREADY_EXISTS"] = 6; - values[valuesById[7] = "PERMISSION_DENIED"] = 7; - values[valuesById[16] = "UNAUTHENTICATED"] = 16; - values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; - values[valuesById[9] = "FAILED_PRECONDITION"] = 9; - values[valuesById[10] = "ABORTED"] = 10; - values[valuesById[11] = "OUT_OF_RANGE"] = 11; - values[valuesById[12] = "UNIMPLEMENTED"] = 12; - values[valuesById[13] = "INTERNAL"] = 13; - values[valuesById[14] = "UNAVAILABLE"] = 14; - values[valuesById[15] = "DATA_LOSS"] = 15; - return values; - })(); - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-container/v1/protos/protos.json b/owl-bot-staging/google-container/v1/protos/protos.json deleted file mode 100644 index 6404a29c92a..00000000000 --- a/owl-bot-staging/google-container/v1/protos/protos.json +++ /dev/null @@ -1,8766 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "container": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Container.V1", - "go_package": "cloud.google.com/go/container/apiv1/containerpb;containerpb", - "java_multiple_files": true, - "java_outer_classname": "ClusterServiceProto", - "java_package": "com.google.container.v1", - "php_namespace": "Google\\Cloud\\Container\\V1", - "ruby_package": "Google::Cloud::Container::V1", - "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" - }, - "nested": { - "ClusterManager": { - "options": { - "(google.api.default_host)": "container.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListClusters": { - "requestType": "ListClustersRequest", - "responseType": "ListClustersResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/clusters", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/clusters", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/clusters" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetCluster": { - "requestType": "GetClusterRequest", - "responseType": "Cluster", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/clusters/*}", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateCluster": { - "requestType": "CreateClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/clusters", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,cluster" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/clusters", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster" - }, - { - "(google.api.method_signature)": "parent,cluster" - } - ] - }, - "UpdateCluster": { - "requestType": "UpdateClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).put": "/v1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.put": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,update" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1/{name=projects/*/locations/*/clusters/*}", - "body": "*", - "additional_bindings": { - "put": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,update" - }, - { - "(google.api.method_signature)": "name,update" - } - ] - }, - "UpdateNodePool": { - "requestType": "UpdateNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).put": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", - "body": "*" - } - } - } - ] - }, - "SetNodePoolAutoscaling": { - "requestType": "SetNodePoolAutoscalingRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", - "body": "*" - } - } - } - ] - }, - "SetLoggingService": { - "requestType": "SetLoggingServiceRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLogging", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,logging_service" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLogging", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" - }, - { - "(google.api.method_signature)": "name,logging_service" - } - ] - }, - "SetMonitoringService": { - "requestType": "SetMonitoringServiceRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,monitoring_service" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" - }, - { - "(google.api.method_signature)": "name,monitoring_service" - } - ] - }, - "SetAddonsConfig": { - "requestType": "SetAddonsConfigRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setAddons", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,addons_config" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setAddons", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" - }, - { - "(google.api.method_signature)": "name,addons_config" - } - ] - }, - "SetLocations": { - "requestType": "SetLocationsRequest", - "responseType": "Operation", - "options": { - "deprecated": true, - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLocations", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,locations" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLocations", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,locations" - }, - { - "(google.api.method_signature)": "name,locations" - } - ] - }, - "UpdateMaster": { - "requestType": "UpdateMasterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,master_version" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" - }, - { - "(google.api.method_signature)": "name,master_version" - } - ] - }, - "SetMasterAuth": { - "requestType": "SetMasterAuthRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", - "body": "*" - } - } - } - ] - }, - "DeleteCluster": { - "requestType": "DeleteClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).additional_bindings.delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/clusters/*}", - "additional_bindings": { - "delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/operations", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/operations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/operations", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/operations" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/operations/*}", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/operations/*}", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,operation_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/operations/*}:cancel", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/operations/*}:cancel", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,operation_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetServerConfig": { - "requestType": "GetServerConfigRequest", - "responseType": "ServerConfig", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*}/serverConfig", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/serverconfig", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*}/serverConfig", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/serverconfig" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetJSONWebKeys": { - "requestType": "GetJSONWebKeysRequest", - "responseType": "GetJSONWebKeysResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/clusters/*}/jwks" - } - } - ] - }, - "ListNodePools": { - "requestType": "ListNodePoolsRequest", - "responseType": "ListNodePoolsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetNodePool": { - "requestType": "GetNodePoolRequest", - "responseType": "NodePool", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).additional_bindings.get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "additional_bindings": { - "get": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateNodePool": { - "requestType": "CreateNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,node_pool" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" - }, - { - "(google.api.method_signature)": "parent,node_pool" - } - ] - }, - "DeleteNodePool": { - "requestType": "DeleteNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).additional_bindings.delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "additional_bindings": { - "delete": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CompleteNodePoolUpgrade": { - "requestType": "CompleteNodePoolUpgradeRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", - "body": "*" - } - } - ] - }, - "RollbackNodePoolUpgrade": { - "requestType": "RollbackNodePoolUpgradeRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SetNodePoolManagement": { - "requestType": "SetNodePoolManagementRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", - "body": "*" - } - } - } - ] - }, - "SetLabels": { - "requestType": "SetLabelsRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", - "body": "*" - } - } - } - ] - }, - "SetLegacyAbac": { - "requestType": "SetLegacyAbacRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,enabled" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" - }, - { - "(google.api.method_signature)": "name,enabled" - } - ] - }, - "StartIPRotation": { - "requestType": "StartIPRotationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CompleteIPRotation": { - "requestType": "CompleteIPRotationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SetNodePoolSize": { - "requestType": "SetNodePoolSizeRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", - "body": "*" - } - } - } - ] - }, - "SetNetworkPolicy": { - "requestType": "SetNetworkPolicyRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,network_policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" - }, - { - "(google.api.method_signature)": "name,network_policy" - } - ] - }, - "SetMaintenancePolicy": { - "requestType": "SetMaintenancePolicyRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,maintenance_policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" - }, - { - "(google.api.method_signature)": "name,maintenance_policy" - } - ] - }, - "ListUsableSubnetworks": { - "requestType": "ListUsableSubnetworksRequest", - "responseType": "ListUsableSubnetworksResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/aggregated/usableSubnetworks" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*}/aggregated/usableSubnetworks" - } - } - ] - }, - "CheckAutopilotCompatibility": { - "requestType": "CheckAutopilotCompatibilityRequest", - "responseType": "CheckAutopilotCompatibilityResponse", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - } - } - ] - } - } - }, - "LinuxNodeConfig": { - "oneofs": { - "_hugepages": { - "oneof": [ - "hugepages" - ] - } - }, - "fields": { - "sysctls": { - "keyType": "string", - "type": "string", - "id": 1 - }, - "cgroupMode": { - "type": "CgroupMode", - "id": 2 - }, - "hugepages": { - "type": "HugepagesConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "CgroupMode": { - "values": { - "CGROUP_MODE_UNSPECIFIED": 0, - "CGROUP_MODE_V1": 1, - "CGROUP_MODE_V2": 2 - } - }, - "HugepagesConfig": { - "oneofs": { - "_hugepageSize2m": { - "oneof": [ - "hugepageSize2m" - ] - }, - "_hugepageSize1g": { - "oneof": [ - "hugepageSize1g" - ] - } - }, - "fields": { - "hugepageSize2m": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "hugepageSize1g": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - } - } - }, - "WindowsNodeConfig": { - "fields": { - "osVersion": { - "type": "OSVersion", - "id": 1 - } - }, - "nested": { - "OSVersion": { - "values": { - "OS_VERSION_UNSPECIFIED": 0, - "OS_VERSION_LTSC2019": 1, - "OS_VERSION_LTSC2022": 2 - } - } - } - }, - "NodeKubeletConfig": { - "oneofs": { - "_insecureKubeletReadonlyPortEnabled": { - "oneof": [ - "insecureKubeletReadonlyPortEnabled" - ] - } - }, - "fields": { - "cpuManagerPolicy": { - "type": "string", - "id": 1 - }, - "cpuCfsQuota": { - "type": "google.protobuf.BoolValue", - "id": 2 - }, - "cpuCfsQuotaPeriod": { - "type": "string", - "id": 3 - }, - "podPidsLimit": { - "type": "int64", - "id": 4 - }, - "insecureKubeletReadonlyPortEnabled": { - "type": "bool", - "id": 7, - "options": { - "proto3_optional": true - } - } - } - }, - "NodeConfig": { - "oneofs": { - "_fastSocket": { - "oneof": [ - "fastSocket" - ] - }, - "_secondaryBootDiskUpdateStrategy": { - "oneof": [ - "secondaryBootDiskUpdateStrategy" - ] - }, - "_localSsdEncryptionMode": { - "oneof": [ - "localSsdEncryptionMode" - ] - } - }, - "fields": { - "machineType": { - "type": "string", - "id": 1 - }, - "diskSizeGb": { - "type": "int32", - "id": 2 - }, - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "serviceAccount": { - "type": "string", - "id": 9 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "imageType": { - "type": "string", - "id": 5 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6 - }, - "localSsdCount": { - "type": "int32", - "id": 7 - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "preemptible": { - "type": "bool", - "id": 10 - }, - "accelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 11 - }, - "diskType": { - "type": "string", - "id": 12 - }, - "minCpuPlatform": { - "type": "string", - "id": 13 - }, - "workloadMetadataConfig": { - "type": "WorkloadMetadataConfig", - "id": 14 - }, - "taints": { - "rule": "repeated", - "type": "NodeTaint", - "id": 15 - }, - "sandboxConfig": { - "type": "SandboxConfig", - "id": 17 - }, - "nodeGroup": { - "type": "string", - "id": 18 - }, - "reservationAffinity": { - "type": "ReservationAffinity", - "id": 19 - }, - "shieldedInstanceConfig": { - "type": "ShieldedInstanceConfig", - "id": 20 - }, - "linuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 21 - }, - "kubeletConfig": { - "type": "NodeKubeletConfig", - "id": 22 - }, - "bootDiskKmsKey": { - "type": "string", - "id": 23 - }, - "gcfsConfig": { - "type": "GcfsConfig", - "id": 25 - }, - "advancedMachineFeatures": { - "type": "AdvancedMachineFeatures", - "id": 26 - }, - "gvnic": { - "type": "VirtualNIC", - "id": 29 - }, - "spot": { - "type": "bool", - "id": 32 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 35 - }, - "fastSocket": { - "type": "FastSocket", - "id": 36, - "options": { - "proto3_optional": true - } - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 37 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 38 - }, - "windowsNodeConfig": { - "type": "WindowsNodeConfig", - "id": 39 - }, - "localNvmeSsdBlockConfig": { - "type": "LocalNvmeSsdBlockConfig", - "id": 40 - }, - "ephemeralStorageLocalSsdConfig": { - "type": "EphemeralStorageLocalSsdConfig", - "id": 41 - }, - "soleTenantConfig": { - "type": "SoleTenantConfig", - "id": 42 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 43 - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 45 - }, - "enableConfidentialStorage": { - "type": "bool", - "id": 46, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "secondaryBootDisks": { - "rule": "repeated", - "type": "SecondaryBootDisk", - "id": 48 - }, - "storagePools": { - "rule": "repeated", - "type": "string", - "id": 49 - }, - "secondaryBootDiskUpdateStrategy": { - "type": "SecondaryBootDiskUpdateStrategy", - "id": 50, - "options": { - "proto3_optional": true - } - }, - "localSsdEncryptionMode": { - "type": "LocalSsdEncryptionMode", - "id": 54, - "options": { - "proto3_optional": true - } - }, - "effectiveCgroupMode": { - "type": "EffectiveCgroupMode", - "id": 55, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "LocalSsdEncryptionMode": { - "values": { - "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": 0, - "STANDARD_ENCRYPTION": 1, - "EPHEMERAL_KEY_ENCRYPTION": 2 - } - }, - "EffectiveCgroupMode": { - "values": { - "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": 0, - "EFFECTIVE_CGROUP_MODE_V1": 1, - "EFFECTIVE_CGROUP_MODE_V2": 2 - } - } - } - }, - "AdvancedMachineFeatures": { - "oneofs": { - "_threadsPerCore": { - "oneof": [ - "threadsPerCore" - ] - }, - "_enableNestedVirtualization": { - "oneof": [ - "enableNestedVirtualization" - ] - } - }, - "fields": { - "threadsPerCore": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "enableNestedVirtualization": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "NodeNetworkConfig": { - "oneofs": { - "_enablePrivateNodes": { - "oneof": [ - "enablePrivateNodes" - ] - }, - "_networkPerformanceConfig": { - "oneof": [ - "networkPerformanceConfig" - ] - } - }, - "fields": { - "createPodRange": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "podRange": { - "type": "string", - "id": 5 - }, - "podIpv4CidrBlock": { - "type": "string", - "id": 6 - }, - "enablePrivateNodes": { - "type": "bool", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "networkPerformanceConfig": { - "type": "NetworkPerformanceConfig", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "podCidrOverprovisionConfig": { - "type": "PodCIDROverprovisionConfig", - "id": 13 - }, - "additionalNodeNetworkConfigs": { - "rule": "repeated", - "type": "AdditionalNodeNetworkConfig", - "id": 14 - }, - "additionalPodNetworkConfigs": { - "rule": "repeated", - "type": "AdditionalPodNetworkConfig", - "id": 15 - }, - "podIpv4RangeUtilization": { - "type": "double", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "NetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "TIER_1": 1 - } - } - } - } - } - }, - "AdditionalNodeNetworkConfig": { - "fields": { - "network": { - "type": "string", - "id": 1 - }, - "subnetwork": { - "type": "string", - "id": 2 - } - } - }, - "AdditionalPodNetworkConfig": { - "oneofs": { - "_maxPodsPerNode": { - "oneof": [ - "maxPodsPerNode" - ] - } - }, - "fields": { - "subnetwork": { - "type": "string", - "id": 1 - }, - "secondaryPodRange": { - "type": "string", - "id": 2 - }, - "maxPodsPerNode": { - "type": "MaxPodsConstraint", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "ShieldedInstanceConfig": { - "fields": { - "enableSecureBoot": { - "type": "bool", - "id": 1 - }, - "enableIntegrityMonitoring": { - "type": "bool", - "id": 2 - } - } - }, - "SandboxConfig": { - "fields": { - "type": { - "type": "Type", - "id": 2 - } - }, - "nested": { - "Type": { - "values": { - "UNSPECIFIED": 0, - "GVISOR": 1 - } - } - } - }, - "GcfsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ReservationAffinity": { - "fields": { - "consumeReservationType": { - "type": "Type", - "id": 1 - }, - "key": { - "type": "string", - "id": 2 - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Type": { - "values": { - "UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3 - } - } - } - }, - "SoleTenantConfig": { - "fields": { - "nodeAffinities": { - "rule": "repeated", - "type": "NodeAffinity", - "id": 1 - } - }, - "nested": { - "NodeAffinity": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "operator": { - "type": "Operator", - "id": 2 - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Operator": { - "values": { - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2 - } - } - } - } - } - }, - "ContainerdConfig": { - "fields": { - "privateRegistryAccessConfig": { - "type": "PrivateRegistryAccessConfig", - "id": 1 - } - }, - "nested": { - "PrivateRegistryAccessConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "certificateAuthorityDomainConfig": { - "rule": "repeated", - "type": "CertificateAuthorityDomainConfig", - "id": 2 - } - }, - "nested": { - "CertificateAuthorityDomainConfig": { - "oneofs": { - "certificateConfig": { - "oneof": [ - "gcpSecretManagerCertificateConfig" - ] - } - }, - "fields": { - "fqdns": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "gcpSecretManagerCertificateConfig": { - "type": "GCPSecretManagerCertificateConfig", - "id": 2 - } - }, - "nested": { - "GCPSecretManagerCertificateConfig": { - "fields": { - "secretUri": { - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } - }, - "NodeTaint": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "value": { - "type": "string", - "id": 2 - }, - "effect": { - "type": "Effect", - "id": 3 - } - }, - "nested": { - "Effect": { - "values": { - "EFFECT_UNSPECIFIED": 0, - "NO_SCHEDULE": 1, - "PREFER_NO_SCHEDULE": 2, - "NO_EXECUTE": 3 - } - } - } - }, - "NodeTaints": { - "fields": { - "taints": { - "rule": "repeated", - "type": "NodeTaint", - "id": 1 - } - } - }, - "NodeLabels": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "ResourceLabels": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "NetworkTags": { - "fields": { - "tags": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "MasterAuth": { - "fields": { - "username": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "password": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clientCertificateConfig": { - "type": "ClientCertificateConfig", - "id": 3 - }, - "clusterCaCertificate": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientCertificate": { - "type": "string", - "id": 101, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientKey": { - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ClientCertificateConfig": { - "fields": { - "issueClientCertificate": { - "type": "bool", - "id": 1 - } - } - }, - "AddonsConfig": { - "fields": { - "httpLoadBalancing": { - "type": "HttpLoadBalancing", - "id": 1 - }, - "horizontalPodAutoscaling": { - "type": "HorizontalPodAutoscaling", - "id": 2 - }, - "kubernetesDashboard": { - "type": "KubernetesDashboard", - "id": 3, - "options": { - "deprecated": true - } - }, - "networkPolicyConfig": { - "type": "NetworkPolicyConfig", - "id": 4 - }, - "cloudRunConfig": { - "type": "CloudRunConfig", - "id": 7 - }, - "dnsCacheConfig": { - "type": "DnsCacheConfig", - "id": 8 - }, - "configConnectorConfig": { - "type": "ConfigConnectorConfig", - "id": 10 - }, - "gcePersistentDiskCsiDriverConfig": { - "type": "GcePersistentDiskCsiDriverConfig", - "id": 11 - }, - "gcpFilestoreCsiDriverConfig": { - "type": "GcpFilestoreCsiDriverConfig", - "id": 14 - }, - "gkeBackupAgentConfig": { - "type": "GkeBackupAgentConfig", - "id": 16 - }, - "gcsFuseCsiDriverConfig": { - "type": "GcsFuseCsiDriverConfig", - "id": 17 - }, - "statefulHaConfig": { - "type": "StatefulHAConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "parallelstoreCsiDriverConfig": { - "type": "ParallelstoreCsiDriverConfig", - "id": 19 - }, - "rayOperatorConfig": { - "type": "RayOperatorConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "HttpLoadBalancing": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "HorizontalPodAutoscaling": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "KubernetesDashboard": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "NetworkPolicyConfig": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "DnsCacheConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "PrivateClusterMasterGlobalAccessConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "PrivateClusterConfig": { - "fields": { - "enablePrivateNodes": { - "type": "bool", - "id": 1, - "options": { - "deprecated": true - } - }, - "enablePrivateEndpoint": { - "type": "bool", - "id": 2, - "options": { - "deprecated": true - } - }, - "masterIpv4CidrBlock": { - "type": "string", - "id": 3 - }, - "privateEndpoint": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "publicEndpoint": { - "type": "string", - "id": 5, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peeringName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "masterGlobalAccessConfig": { - "type": "PrivateClusterMasterGlobalAccessConfig", - "id": 8, - "options": { - "deprecated": true - } - }, - "privateEndpointSubnetwork": { - "type": "string", - "id": 10, - "options": { - "deprecated": true - } - } - } - }, - "AuthenticatorGroupsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "securityGroup": { - "type": "string", - "id": 2 - } - } - }, - "CloudRunConfig": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 3 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "LOAD_BALANCER_TYPE_EXTERNAL": 1, - "LOAD_BALANCER_TYPE_INTERNAL": 2 - } - } - } - }, - "ConfigConnectorConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcePersistentDiskCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcpFilestoreCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcsFuseCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ParallelstoreCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "RayOperatorConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "rayClusterLoggingConfig": { - "type": "RayClusterLoggingConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rayClusterMonitoringConfig": { - "type": "RayClusterMonitoringConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GkeBackupAgentConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "StatefulHAConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "MasterAuthorizedNetworksConfig": { - "oneofs": { - "_gcpPublicCidrsAccessEnabled": { - "oneof": [ - "gcpPublicCidrsAccessEnabled" - ] - }, - "_privateEndpointEnforcementEnabled": { - "oneof": [ - "privateEndpointEnforcementEnabled" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "cidrBlocks": { - "rule": "repeated", - "type": "CidrBlock", - "id": 2 - }, - "gcpPublicCidrsAccessEnabled": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "privateEndpointEnforcementEnabled": { - "type": "bool", - "id": 5, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "CidrBlock": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "cidrBlock": { - "type": "string", - "id": 2 - } - } - } - } - }, - "LegacyAbac": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "NetworkPolicy": { - "fields": { - "provider": { - "type": "Provider", - "id": 1 - }, - "enabled": { - "type": "bool", - "id": 2 - } - }, - "nested": { - "Provider": { - "values": { - "PROVIDER_UNSPECIFIED": 0, - "CALICO": 1 - } - } - } - }, - "BinaryAuthorization": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "deprecated": true - } - }, - "evaluationMode": { - "type": "EvaluationMode", - "id": 2 - } - }, - "nested": { - "EvaluationMode": { - "values": { - "EVALUATION_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "PROJECT_SINGLETON_POLICY_ENFORCE": 2 - } - } - } - }, - "PodCIDROverprovisionConfig": { - "fields": { - "disable": { - "type": "bool", - "id": 1 - } - } - }, - "IPAllocationPolicy": { - "fields": { - "useIpAliases": { - "type": "bool", - "id": 1 - }, - "createSubnetwork": { - "type": "bool", - "id": 2 - }, - "subnetworkName": { - "type": "string", - "id": 3 - }, - "clusterIpv4Cidr": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "nodeIpv4Cidr": { - "type": "string", - "id": 5, - "options": { - "deprecated": true - } - }, - "servicesIpv4Cidr": { - "type": "string", - "id": 6, - "options": { - "deprecated": true - } - }, - "clusterSecondaryRangeName": { - "type": "string", - "id": 7 - }, - "servicesSecondaryRangeName": { - "type": "string", - "id": 8 - }, - "clusterIpv4CidrBlock": { - "type": "string", - "id": 9 - }, - "nodeIpv4CidrBlock": { - "type": "string", - "id": 10 - }, - "servicesIpv4CidrBlock": { - "type": "string", - "id": 11 - }, - "tpuIpv4CidrBlock": { - "type": "string", - "id": 13 - }, - "useRoutes": { - "type": "bool", - "id": 15 - }, - "stackType": { - "type": "StackType", - "id": 16 - }, - "ipv6AccessType": { - "type": "IPv6AccessType", - "id": 17 - }, - "podCidrOverprovisionConfig": { - "type": "PodCIDROverprovisionConfig", - "id": 21 - }, - "subnetIpv6CidrBlock": { - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "servicesIpv6CidrBlock": { - "type": "string", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "additionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "defaultPodIpv4RangeUtilization": { - "type": "double", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Cluster": { - "oneofs": { - "_nodePoolDefaults": { - "oneof": [ - "nodePoolDefaults" - ] - }, - "_satisfiesPzs": { - "oneof": [ - "satisfiesPzs" - ] - }, - "_satisfiesPzi": { - "oneof": [ - "satisfiesPzi" - ] - }, - "_userManagedKeysConfig": { - "oneof": [ - "userManagedKeysConfig" - ] - }, - "_rbacBindingConfig": { - "oneof": [ - "rbacBindingConfig" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "initialNodeCount": { - "type": "int32", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodeConfig": { - "type": "NodeConfig", - "id": 4, - "options": { - "deprecated": true - } - }, - "masterAuth": { - "type": "MasterAuth", - "id": 5 - }, - "loggingService": { - "type": "string", - "id": 6 - }, - "monitoringService": { - "type": "string", - "id": 7 - }, - "network": { - "type": "string", - "id": 8 - }, - "clusterIpv4Cidr": { - "type": "string", - "id": 9 - }, - "addonsConfig": { - "type": "AddonsConfig", - "id": 10 - }, - "subnetwork": { - "type": "string", - "id": 11 - }, - "nodePools": { - "rule": "repeated", - "type": "NodePool", - "id": 12 - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "enableKubernetesAlpha": { - "type": "bool", - "id": 14 - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 15 - }, - "labelFingerprint": { - "type": "string", - "id": 16 - }, - "legacyAbac": { - "type": "LegacyAbac", - "id": 18 - }, - "networkPolicy": { - "type": "NetworkPolicy", - "id": 19 - }, - "ipAllocationPolicy": { - "type": "IPAllocationPolicy", - "id": 20 - }, - "masterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 22, - "options": { - "deprecated": true - } - }, - "maintenancePolicy": { - "type": "MaintenancePolicy", - "id": 23 - }, - "binaryAuthorization": { - "type": "BinaryAuthorization", - "id": 24 - }, - "autoscaling": { - "type": "ClusterAutoscaling", - "id": 26 - }, - "networkConfig": { - "type": "NetworkConfig", - "id": 27 - }, - "defaultMaxPodsConstraint": { - "type": "MaxPodsConstraint", - "id": 30 - }, - "resourceUsageExportConfig": { - "type": "ResourceUsageExportConfig", - "id": 33 - }, - "authenticatorGroupsConfig": { - "type": "AuthenticatorGroupsConfig", - "id": 34 - }, - "privateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 37 - }, - "databaseEncryption": { - "type": "DatabaseEncryption", - "id": 38 - }, - "verticalPodAutoscaling": { - "type": "VerticalPodAutoscaling", - "id": 39 - }, - "shieldedNodes": { - "type": "ShieldedNodes", - "id": 40 - }, - "releaseChannel": { - "type": "ReleaseChannel", - "id": 41 - }, - "workloadIdentityConfig": { - "type": "WorkloadIdentityConfig", - "id": 43 - }, - "meshCertificates": { - "type": "MeshCertificates", - "id": 67 - }, - "costManagementConfig": { - "type": "CostManagementConfig", - "id": 45 - }, - "notificationConfig": { - "type": "NotificationConfig", - "id": 49 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 50 - }, - "identityServiceConfig": { - "type": "IdentityServiceConfig", - "id": 54 - }, - "selfLink": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "zone": { - "type": "string", - "id": 101, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endpoint": { - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "initialClusterVersion": { - "type": "string", - "id": 103 - }, - "currentMasterVersion": { - "type": "string", - "id": 104, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "currentNodeVersion": { - "type": "string", - "id": 105, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "string", - "id": 106, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 107, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 108, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nodeIpv4CidrSize": { - "type": "int32", - "id": 109, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "servicesIpv4Cidr": { - "type": "string", - "id": 110, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "instanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 111, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "currentNodeCount": { - "type": "int32", - "id": 112, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "expireTime": { - "type": "string", - "id": 113, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 114, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enableTpu": { - "type": "bool", - "id": 115 - }, - "tpuIpv4CidrBlock": { - "type": "string", - "id": 116, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "conditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 118 - }, - "autopilot": { - "type": "Autopilot", - "id": 128 - }, - "id": { - "type": "string", - "id": 129, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nodePoolDefaults": { - "type": "NodePoolDefaults", - "id": 131, - "options": { - "proto3_optional": true - } - }, - "loggingConfig": { - "type": "LoggingConfig", - "id": 132 - }, - "monitoringConfig": { - "type": "MonitoringConfig", - "id": 133 - }, - "nodePoolAutoConfig": { - "type": "NodePoolAutoConfig", - "id": 136 - }, - "etag": { - "type": "string", - "id": 139 - }, - "fleet": { - "type": "Fleet", - "id": 140 - }, - "securityPostureConfig": { - "type": "SecurityPostureConfig", - "id": 145 - }, - "controlPlaneEndpointsConfig": { - "type": "ControlPlaneEndpointsConfig", - "id": 146 - }, - "enableK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 143 - }, - "enterpriseConfig": { - "type": "EnterpriseConfig", - "id": 149 - }, - "secretManagerConfig": { - "type": "SecretManagerConfig", - "id": 150 - }, - "compliancePostureConfig": { - "type": "CompliancePostureConfig", - "id": 151 - }, - "satisfiesPzs": { - "type": "bool", - "id": 152, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 153, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "userManagedKeysConfig": { - "type": "UserManagedKeysConfig", - "id": 154, - "options": { - "proto3_optional": true - } - }, - "rbacBindingConfig": { - "type": "RBACBindingConfig", - "id": 156, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RECONCILING": 3, - "STOPPING": 4, - "ERROR": 5, - "DEGRADED": 6 - } - } - } - }, - "RBACBindingConfig": { - "oneofs": { - "_enableInsecureBindingSystemUnauthenticated": { - "oneof": [ - "enableInsecureBindingSystemUnauthenticated" - ] - }, - "_enableInsecureBindingSystemAuthenticated": { - "oneof": [ - "enableInsecureBindingSystemAuthenticated" - ] - } - }, - "fields": { - "enableInsecureBindingSystemUnauthenticated": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "enableInsecureBindingSystemAuthenticated": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "UserManagedKeysConfig": { - "fields": { - "clusterCa": { - "type": "string", - "id": 10, - "options": { - "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" - } - }, - "etcdApiCa": { - "type": "string", - "id": 11, - "options": { - "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" - } - }, - "etcdPeerCa": { - "type": "string", - "id": 12, - "options": { - "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" - } - }, - "serviceAccountSigningKeys": { - "rule": "repeated", - "type": "string", - "id": 13, - "options": { - "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" - } - }, - "serviceAccountVerificationKeys": { - "rule": "repeated", - "type": "string", - "id": 14, - "options": { - "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" - } - }, - "aggregationCa": { - "type": "string", - "id": 15, - "options": { - "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" - } - }, - "controlPlaneDiskEncryptionKey": { - "type": "string", - "id": 16, - "options": { - "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" - } - }, - "gkeopsEtcdBackupEncryptionKey": { - "type": "string", - "id": 17, - "options": { - "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" - } - } - } - }, - "CompliancePostureConfig": { - "oneofs": { - "_mode": { - "oneof": [ - "mode" - ] - } - }, - "fields": { - "mode": { - "type": "Mode", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "complianceStandards": { - "rule": "repeated", - "type": "ComplianceStandard", - "id": 2 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "ENABLED": 2 - } - }, - "ComplianceStandard": { - "oneofs": { - "_standard": { - "oneof": [ - "standard" - ] - } - }, - "fields": { - "standard": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "K8sBetaAPIConfig": { - "fields": { - "enabledApis": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "SecurityPostureConfig": { - "oneofs": { - "_mode": { - "oneof": [ - "mode" - ] - }, - "_vulnerabilityMode": { - "oneof": [ - "vulnerabilityMode" - ] - } - }, - "fields": { - "mode": { - "type": "Mode", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "vulnerabilityMode": { - "type": "VulnerabilityMode", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "BASIC": 2, - "ENTERPRISE": 3 - } - }, - "VulnerabilityMode": { - "values": { - "VULNERABILITY_MODE_UNSPECIFIED": 0, - "VULNERABILITY_DISABLED": 1, - "VULNERABILITY_BASIC": 2, - "VULNERABILITY_ENTERPRISE": 3 - } - } - } - }, - "NodePoolAutoConfig": { - "fields": { - "networkTags": { - "type": "NetworkTags", - "id": 1 - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 2 - }, - "nodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 3 - }, - "linuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "NodePoolDefaults": { - "fields": { - "nodeConfigDefaults": { - "type": "NodeConfigDefaults", - "id": 1 - } - } - }, - "NodeConfigDefaults": { - "fields": { - "gcfsConfig": { - "type": "GcfsConfig", - "id": 1 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 3 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 4 - }, - "nodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 6 - } - } - }, - "ClusterUpdate": { - "oneofs": { - "_desiredEnablePrivateEndpoint": { - "oneof": [ - "desiredEnablePrivateEndpoint" - ] - }, - "_desiredDefaultEnablePrivateNodes": { - "oneof": [ - "desiredDefaultEnablePrivateNodes" - ] - }, - "_desiredEnableFqdnNetworkPolicy": { - "oneof": [ - "desiredEnableFqdnNetworkPolicy" - ] - }, - "_desiredEnableMultiNetworking": { - "oneof": [ - "desiredEnableMultiNetworking" - ] - }, - "_desiredInTransitEncryptionConfig": { - "oneof": [ - "desiredInTransitEncryptionConfig" - ] - }, - "_desiredEnableCiliumClusterwideNetworkPolicy": { - "oneof": [ - "desiredEnableCiliumClusterwideNetworkPolicy" - ] - }, - "_desiredSecretManagerConfig": { - "oneof": [ - "desiredSecretManagerConfig" - ] - }, - "_desiredCompliancePostureConfig": { - "oneof": [ - "desiredCompliancePostureConfig" - ] - }, - "_desiredRbacBindingConfig": { - "oneof": [ - "desiredRbacBindingConfig" - ] - } - }, - "fields": { - "desiredNodeVersion": { - "type": "string", - "id": 4 - }, - "desiredMonitoringService": { - "type": "string", - "id": 5 - }, - "desiredAddonsConfig": { - "type": "AddonsConfig", - "id": 6 - }, - "desiredNodePoolId": { - "type": "string", - "id": 7 - }, - "desiredImageType": { - "type": "string", - "id": 8 - }, - "desiredDatabaseEncryption": { - "type": "DatabaseEncryption", - "id": 46 - }, - "desiredWorkloadIdentityConfig": { - "type": "WorkloadIdentityConfig", - "id": 47 - }, - "desiredMeshCertificates": { - "type": "MeshCertificates", - "id": 67 - }, - "desiredShieldedNodes": { - "type": "ShieldedNodes", - "id": 48 - }, - "desiredCostManagementConfig": { - "type": "CostManagementConfig", - "id": 49 - }, - "desiredDnsConfig": { - "type": "DNSConfig", - "id": 53 - }, - "desiredNodePoolAutoscaling": { - "type": "NodePoolAutoscaling", - "id": 9 - }, - "desiredLocations": { - "rule": "repeated", - "type": "string", - "id": 10 - }, - "desiredMasterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 12, - "options": { - "deprecated": true - } - }, - "desiredClusterAutoscaling": { - "type": "ClusterAutoscaling", - "id": 15 - }, - "desiredBinaryAuthorization": { - "type": "BinaryAuthorization", - "id": 16 - }, - "desiredLoggingService": { - "type": "string", - "id": 19 - }, - "desiredResourceUsageExportConfig": { - "type": "ResourceUsageExportConfig", - "id": 21 - }, - "desiredVerticalPodAutoscaling": { - "type": "VerticalPodAutoscaling", - "id": 22 - }, - "desiredPrivateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 25, - "options": { - "deprecated": true - } - }, - "desiredIntraNodeVisibilityConfig": { - "type": "IntraNodeVisibilityConfig", - "id": 26 - }, - "desiredDefaultSnatStatus": { - "type": "DefaultSnatStatus", - "id": 28 - }, - "desiredReleaseChannel": { - "type": "ReleaseChannel", - "id": 31 - }, - "desiredL4ilbSubsettingConfig": { - "type": "ILBSubsettingConfig", - "id": 39 - }, - "desiredDatapathProvider": { - "type": "DatapathProvider", - "id": 50 - }, - "desiredPrivateIpv6GoogleAccess": { - "type": "PrivateIPv6GoogleAccess", - "id": 51 - }, - "desiredNotificationConfig": { - "type": "NotificationConfig", - "id": 55 - }, - "desiredAuthenticatorGroupsConfig": { - "type": "AuthenticatorGroupsConfig", - "id": 63 - }, - "desiredLoggingConfig": { - "type": "LoggingConfig", - "id": 64 - }, - "desiredMonitoringConfig": { - "type": "MonitoringConfig", - "id": 65 - }, - "desiredIdentityServiceConfig": { - "type": "IdentityServiceConfig", - "id": 66 - }, - "desiredServiceExternalIpsConfig": { - "type": "ServiceExternalIPsConfig", - "id": 60 - }, - "desiredEnablePrivateEndpoint": { - "type": "bool", - "id": 71, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "desiredDefaultEnablePrivateNodes": { - "type": "bool", - "id": 72, - "options": { - "proto3_optional": true - } - }, - "desiredControlPlaneEndpointsConfig": { - "type": "ControlPlaneEndpointsConfig", - "id": 73 - }, - "desiredMasterVersion": { - "type": "string", - "id": 100 - }, - "desiredGcfsConfig": { - "type": "GcfsConfig", - "id": 109 - }, - "desiredNodePoolAutoConfigNetworkTags": { - "type": "NetworkTags", - "id": 110 - }, - "desiredGatewayApiConfig": { - "type": "GatewayAPIConfig", - "id": 114 - }, - "etag": { - "type": "string", - "id": 115 - }, - "desiredNodePoolLoggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 116 - }, - "desiredFleet": { - "type": "Fleet", - "id": 117 - }, - "desiredStackType": { - "type": "StackType", - "id": 119 - }, - "additionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 120 - }, - "removedAdditionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 121 - }, - "enableK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 122 - }, - "desiredSecurityPostureConfig": { - "type": "SecurityPostureConfig", - "id": 124 - }, - "desiredNetworkPerformanceConfig": { - "type": "NetworkConfig.ClusterNetworkPerformanceConfig", - "id": 125 - }, - "desiredEnableFqdnNetworkPolicy": { - "type": "bool", - "id": 126, - "options": { - "proto3_optional": true - } - }, - "desiredAutopilotWorkloadPolicyConfig": { - "type": "WorkloadPolicyConfig", - "id": 128 - }, - "desiredK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 131 - }, - "desiredContainerdConfig": { - "type": "ContainerdConfig", - "id": 134 - }, - "desiredEnableMultiNetworking": { - "type": "bool", - "id": 135, - "options": { - "proto3_optional": true - } - }, - "desiredNodePoolAutoConfigResourceManagerTags": { - "type": "ResourceManagerTags", - "id": 136 - }, - "desiredInTransitEncryptionConfig": { - "type": "InTransitEncryptionConfig", - "id": 137, - "options": { - "proto3_optional": true - } - }, - "desiredEnableCiliumClusterwideNetworkPolicy": { - "type": "bool", - "id": 138, - "options": { - "proto3_optional": true - } - }, - "desiredSecretManagerConfig": { - "type": "SecretManagerConfig", - "id": 139, - "options": { - "proto3_optional": true - } - }, - "desiredCompliancePostureConfig": { - "type": "CompliancePostureConfig", - "id": 140, - "options": { - "proto3_optional": true - } - }, - "desiredNodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 141 - }, - "desiredNodePoolAutoConfigKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 142 - }, - "userManagedKeysConfig": { - "type": "UserManagedKeysConfig", - "id": 143 - }, - "desiredRbacBindingConfig": { - "type": "RBACBindingConfig", - "id": 144, - "options": { - "proto3_optional": true - } - }, - "desiredEnterpriseConfig": { - "type": "DesiredEnterpriseConfig", - "id": 147 - }, - "desiredNodePoolAutoConfigLinuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 150 - } - } - }, - "AdditionalPodRangesConfig": { - "fields": { - "podRangeNames": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "podRangeInfo": { - "rule": "repeated", - "type": "RangeInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "RangeInfo": { - "fields": { - "rangeName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "utilization": { - "type": "double", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "DesiredEnterpriseConfig": { - "fields": { - "desiredTier": { - "type": "EnterpriseConfig.ClusterTier", - "id": 1 - } - } - }, - "Operation": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "operationType": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "detail": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "selfLink": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "targetLink": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startTime": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "progress": { - "type": "OperationProgress", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clusterConditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 13, - "options": { - "deprecated": true - } - }, - "nodepoolConditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 14, - "options": { - "deprecated": true - } - }, - "error": { - "type": "google.rpc.Status", - "id": 15 - } - }, - "nested": { - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "DONE": 3, - "ABORTING": 4 - } - }, - "Type": { - "valuesOptions": { - "AUTO_UPGRADE_NODES": { - "deprecated": true - }, - "SET_LABELS": { - "deprecated": true - }, - "SET_MASTER_AUTH": { - "deprecated": true - }, - "SET_NETWORK_POLICY": { - "deprecated": true - }, - "SET_MAINTENANCE_POLICY": { - "deprecated": true - } - }, - "values": { - "TYPE_UNSPECIFIED": 0, - "CREATE_CLUSTER": 1, - "DELETE_CLUSTER": 2, - "UPGRADE_MASTER": 3, - "UPGRADE_NODES": 4, - "REPAIR_CLUSTER": 5, - "UPDATE_CLUSTER": 6, - "CREATE_NODE_POOL": 7, - "DELETE_NODE_POOL": 8, - "SET_NODE_POOL_MANAGEMENT": 9, - "AUTO_REPAIR_NODES": 10, - "AUTO_UPGRADE_NODES": 11, - "SET_LABELS": 12, - "SET_MASTER_AUTH": 13, - "SET_NODE_POOL_SIZE": 14, - "SET_NETWORK_POLICY": 15, - "SET_MAINTENANCE_POLICY": 16, - "RESIZE_CLUSTER": 18, - "FLEET_FEATURE_UPGRADE": 19 - } - } - } - }, - "OperationProgress": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "status": { - "type": "Operation.Status", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "stages": { - "rule": "repeated", - "type": "OperationProgress", - "id": 4 - } - }, - "nested": { - "Metric": { - "oneofs": { - "value": { - "oneof": [ - "intValue", - "doubleValue", - "stringValue" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "intValue": { - "type": "int64", - "id": 2 - }, - "doubleValue": { - "type": "double", - "id": 3 - }, - "stringValue": { - "type": "string", - "id": 4 - } - } - } - } - }, - "CreateClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "cluster": { - "type": "Cluster", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 5 - } - } - }, - "GetClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "UpdateClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "update": { - "type": "ClusterUpdate", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "UpdateNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "nodeVersion": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "imageType": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 8 - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "workloadMetadataConfig": { - "type": "WorkloadMetadataConfig", - "id": 14 - }, - "upgradeSettings": { - "type": "NodePool.UpgradeSettings", - "id": 15 - }, - "tags": { - "type": "NetworkTags", - "id": 16 - }, - "taints": { - "type": "NodeTaints", - "id": 17 - }, - "labels": { - "type": "NodeLabels", - "id": 18 - }, - "linuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 19 - }, - "kubeletConfig": { - "type": "NodeKubeletConfig", - "id": 20 - }, - "nodeNetworkConfig": { - "type": "NodeNetworkConfig", - "id": 21 - }, - "gcfsConfig": { - "type": "GcfsConfig", - "id": 22 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 23 - }, - "gvnic": { - "type": "VirtualNIC", - "id": 29 - }, - "etag": { - "type": "string", - "id": 30 - }, - "fastSocket": { - "type": "FastSocket", - "id": 31 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 32 - }, - "resourceLabels": { - "type": "ResourceLabels", - "id": 33 - }, - "windowsNodeConfig": { - "type": "WindowsNodeConfig", - "id": 34 - }, - "accelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 35 - }, - "machineType": { - "type": "string", - "id": 36, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskType": { - "type": "string", - "id": 37, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskSizeGb": { - "type": "int64", - "id": 38, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 39 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 40 - }, - "queuedProvisioning": { - "type": "NodePool.QueuedProvisioning", - "id": 42 - }, - "storagePools": { - "rule": "repeated", - "type": "string", - "id": 43 - } - } - }, - "SetNodePoolAutoscalingRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "autoscaling": { - "type": "NodePoolAutoscaling", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetLoggingServiceRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "loggingService": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "SetMonitoringServiceRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "monitoringService": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetAddonsConfigRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "addonsConfig": { - "type": "AddonsConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetLocationsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "UpdateMasterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "masterVersion": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetMasterAuthRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "action": { - "type": "Action", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "update": { - "type": "MasterAuth", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - }, - "nested": { - "Action": { - "values": { - "UNKNOWN": 0, - "SET_PASSWORD": 1, - "GENERATE_PASSWORD": 2, - "SET_USERNAME": 3 - } - } - } - }, - "DeleteClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ListClustersRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "parent": { - "type": "string", - "id": 4 - } - } - }, - "ListClustersResponse": { - "fields": { - "clusters": { - "rule": "repeated", - "type": "Cluster", - "id": 1 - }, - "missingZones": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "GetOperationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "operationId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "ListOperationsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "parent": { - "type": "string", - "id": 4 - } - } - }, - "CancelOperationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "operationId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "missingZones": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "GetServerConfigRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ServerConfig": { - "fields": { - "defaultClusterVersion": { - "type": "string", - "id": 1 - }, - "validNodeVersions": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "defaultImageType": { - "type": "string", - "id": 4 - }, - "validImageTypes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "validMasterVersions": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "channels": { - "rule": "repeated", - "type": "ReleaseChannelConfig", - "id": 9 - } - }, - "nested": { - "ReleaseChannelConfig": { - "fields": { - "channel": { - "type": "ReleaseChannel.Channel", - "id": 1 - }, - "defaultVersion": { - "type": "string", - "id": 2 - }, - "validVersions": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "upgradeTargetVersion": { - "type": "string", - "id": 5 - } - } - } - } - }, - "CreateNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePool": { - "type": "NodePool", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 6 - } - } - }, - "DeleteNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "ListNodePoolsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "parent": { - "type": "string", - "id": 5 - } - } - }, - "GetNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "BlueGreenSettings": { - "oneofs": { - "rolloutPolicy": { - "oneof": [ - "standardRolloutPolicy" - ] - }, - "_nodePoolSoakDuration": { - "oneof": [ - "nodePoolSoakDuration" - ] - } - }, - "fields": { - "standardRolloutPolicy": { - "type": "StandardRolloutPolicy", - "id": 1 - }, - "nodePoolSoakDuration": { - "type": "google.protobuf.Duration", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "StandardRolloutPolicy": { - "oneofs": { - "updateBatchSize": { - "oneof": [ - "batchPercentage", - "batchNodeCount" - ] - }, - "_batchSoakDuration": { - "oneof": [ - "batchSoakDuration" - ] - } - }, - "fields": { - "batchPercentage": { - "type": "float", - "id": 1 - }, - "batchNodeCount": { - "type": "int32", - "id": 2 - }, - "batchSoakDuration": { - "type": "google.protobuf.Duration", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "NodePool": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "NodeConfig", - "id": 2 - }, - "initialNodeCount": { - "type": "int32", - "id": 3 - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "networkConfig": { - "type": "NodeNetworkConfig", - "id": 14 - }, - "selfLink": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "version": { - "type": "string", - "id": 101 - }, - "instanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 103, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 104, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "autoscaling": { - "type": "NodePoolAutoscaling", - "id": 4 - }, - "management": { - "type": "NodeManagement", - "id": 5 - }, - "maxPodsConstraint": { - "type": "MaxPodsConstraint", - "id": 6 - }, - "conditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 105 - }, - "podIpv4CidrSize": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "upgradeSettings": { - "type": "UpgradeSettings", - "id": 107 - }, - "placementPolicy": { - "type": "PlacementPolicy", - "id": 108 - }, - "updateInfo": { - "type": "UpdateInfo", - "id": 109, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "etag": { - "type": "string", - "id": 110 - }, - "queuedProvisioning": { - "type": "QueuedProvisioning", - "id": 112 - }, - "bestEffortProvisioning": { - "type": "BestEffortProvisioning", - "id": 113 - } - }, - "nested": { - "UpgradeSettings": { - "oneofs": { - "_strategy": { - "oneof": [ - "strategy" - ] - }, - "_blueGreenSettings": { - "oneof": [ - "blueGreenSettings" - ] - } - }, - "fields": { - "maxSurge": { - "type": "int32", - "id": 1 - }, - "maxUnavailable": { - "type": "int32", - "id": 2 - }, - "strategy": { - "type": "NodePoolUpdateStrategy", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "blueGreenSettings": { - "type": "BlueGreenSettings", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "UpdateInfo": { - "fields": { - "blueGreenInfo": { - "type": "BlueGreenInfo", - "id": 1 - } - }, - "nested": { - "BlueGreenInfo": { - "fields": { - "phase": { - "type": "Phase", - "id": 1 - }, - "blueInstanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "greenInstanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "bluePoolDeletionStartTime": { - "type": "string", - "id": 4 - }, - "greenPoolVersion": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Phase": { - "values": { - "PHASE_UNSPECIFIED": 0, - "UPDATE_STARTED": 1, - "CREATING_GREEN_POOL": 2, - "CORDONING_BLUE_POOL": 3, - "DRAINING_BLUE_POOL": 4, - "NODE_POOL_SOAKING": 5, - "DELETING_BLUE_POOL": 6, - "ROLLBACK_STARTED": 7 - } - } - } - } - } - }, - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RUNNING_WITH_ERROR": 3, - "RECONCILING": 4, - "STOPPING": 5, - "ERROR": 6 - } - }, - "PlacementPolicy": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "tpuTopology": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "policyName": { - "type": "string", - "id": 3 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "COMPACT": 1 - } - } - } - }, - "QueuedProvisioning": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - } - } - }, - "NodeManagement": { - "fields": { - "autoUpgrade": { - "type": "bool", - "id": 1 - }, - "autoRepair": { - "type": "bool", - "id": 2 - }, - "upgradeOptions": { - "type": "AutoUpgradeOptions", - "id": 10 - } - } - }, - "BestEffortProvisioning": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "minProvisionNodes": { - "type": "int32", - "id": 2 - } - } - }, - "AutoUpgradeOptions": { - "fields": { - "autoUpgradeStartTime": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "MaintenancePolicy": { - "fields": { - "window": { - "type": "MaintenanceWindow", - "id": 1 - }, - "resourceVersion": { - "type": "string", - "id": 3 - } - } - }, - "MaintenanceWindow": { - "oneofs": { - "policy": { - "oneof": [ - "dailyMaintenanceWindow", - "recurringWindow" - ] - } - }, - "fields": { - "dailyMaintenanceWindow": { - "type": "DailyMaintenanceWindow", - "id": 2 - }, - "recurringWindow": { - "type": "RecurringTimeWindow", - "id": 3 - }, - "maintenanceExclusions": { - "keyType": "string", - "type": "TimeWindow", - "id": 4 - } - } - }, - "TimeWindow": { - "oneofs": { - "options": { - "oneof": [ - "maintenanceExclusionOptions" - ] - } - }, - "fields": { - "maintenanceExclusionOptions": { - "type": "MaintenanceExclusionOptions", - "id": 3 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "MaintenanceExclusionOptions": { - "fields": { - "scope": { - "type": "Scope", - "id": 1 - } - }, - "nested": { - "Scope": { - "values": { - "NO_UPGRADES": 0, - "NO_MINOR_UPGRADES": 1, - "NO_MINOR_OR_NODE_UPGRADES": 2 - } - } - } - }, - "RecurringTimeWindow": { - "fields": { - "window": { - "type": "TimeWindow", - "id": 1 - }, - "recurrence": { - "type": "string", - "id": 2 - } - } - }, - "DailyMaintenanceWindow": { - "fields": { - "startTime": { - "type": "string", - "id": 2 - }, - "duration": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SetNodePoolManagementRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "management": { - "type": "NodeManagement", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetNodePoolSizeRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "nodeCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "CompleteNodePoolUpgradeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "RollbackNodePoolUpgradeRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 6 - }, - "respectPdb": { - "type": "bool", - "id": 7 - } - } - }, - "ListNodePoolsResponse": { - "fields": { - "nodePools": { - "rule": "repeated", - "type": "NodePool", - "id": 1 - } - } - }, - "ClusterAutoscaling": { - "fields": { - "enableNodeAutoprovisioning": { - "type": "bool", - "id": 1 - }, - "resourceLimits": { - "rule": "repeated", - "type": "ResourceLimit", - "id": 2 - }, - "autoscalingProfile": { - "type": "AutoscalingProfile", - "id": 3 - }, - "autoprovisioningNodePoolDefaults": { - "type": "AutoprovisioningNodePoolDefaults", - "id": 4 - }, - "autoprovisioningLocations": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "AutoscalingProfile": { - "values": { - "PROFILE_UNSPECIFIED": 0, - "OPTIMIZE_UTILIZATION": 1, - "BALANCED": 2 - } - } - } - }, - "AutoprovisioningNodePoolDefaults": { - "oneofs": { - "_insecureKubeletReadonlyPortEnabled": { - "oneof": [ - "insecureKubeletReadonlyPortEnabled" - ] - } - }, - "fields": { - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "serviceAccount": { - "type": "string", - "id": 2 - }, - "upgradeSettings": { - "type": "NodePool.UpgradeSettings", - "id": 3 - }, - "management": { - "type": "NodeManagement", - "id": 4 - }, - "minCpuPlatform": { - "type": "string", - "id": 5, - "options": { - "deprecated": true - } - }, - "diskSizeGb": { - "type": "int32", - "id": 6 - }, - "diskType": { - "type": "string", - "id": 7 - }, - "shieldedInstanceConfig": { - "type": "ShieldedInstanceConfig", - "id": 8 - }, - "bootDiskKmsKey": { - "type": "string", - "id": 9 - }, - "imageType": { - "type": "string", - "id": 10 - }, - "insecureKubeletReadonlyPortEnabled": { - "type": "bool", - "id": 13, - "options": { - "proto3_optional": true - } - } - } - }, - "ResourceLimit": { - "fields": { - "resourceType": { - "type": "string", - "id": 1 - }, - "minimum": { - "type": "int64", - "id": 2 - }, - "maximum": { - "type": "int64", - "id": 3 - } - } - }, - "NodePoolAutoscaling": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "minNodeCount": { - "type": "int32", - "id": 2 - }, - "maxNodeCount": { - "type": "int32", - "id": 3 - }, - "autoprovisioned": { - "type": "bool", - "id": 4 - }, - "locationPolicy": { - "type": "LocationPolicy", - "id": 5 - }, - "totalMinNodeCount": { - "type": "int32", - "id": 6 - }, - "totalMaxNodeCount": { - "type": "int32", - "id": 7 - } - }, - "nested": { - "LocationPolicy": { - "values": { - "LOCATION_POLICY_UNSPECIFIED": 0, - "BALANCED": 1, - "ANY": 2 - } - } - } - }, - "SetLabelsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "labelFingerprint": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetLegacyAbacRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "enabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "StartIPRotationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 6 - }, - "rotateCredentials": { - "type": "bool", - "id": 7 - } - } - }, - "CompleteIPRotationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "AcceleratorConfig": { - "oneofs": { - "_gpuSharingConfig": { - "oneof": [ - "gpuSharingConfig" - ] - }, - "_gpuDriverInstallationConfig": { - "oneof": [ - "gpuDriverInstallationConfig" - ] - } - }, - "fields": { - "acceleratorCount": { - "type": "int64", - "id": 1 - }, - "acceleratorType": { - "type": "string", - "id": 2 - }, - "gpuPartitionSize": { - "type": "string", - "id": 3 - }, - "gpuSharingConfig": { - "type": "GPUSharingConfig", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "gpuDriverInstallationConfig": { - "type": "GPUDriverInstallationConfig", - "id": 6, - "options": { - "proto3_optional": true - } - } - } - }, - "GPUSharingConfig": { - "oneofs": { - "_gpuSharingStrategy": { - "oneof": [ - "gpuSharingStrategy" - ] - } - }, - "fields": { - "maxSharedClientsPerGpu": { - "type": "int64", - "id": 1 - }, - "gpuSharingStrategy": { - "type": "GPUSharingStrategy", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "GPUSharingStrategy": { - "values": { - "GPU_SHARING_STRATEGY_UNSPECIFIED": 0, - "TIME_SHARING": 1, - "MPS": 2 - } - } - } - }, - "GPUDriverInstallationConfig": { - "oneofs": { - "_gpuDriverVersion": { - "oneof": [ - "gpuDriverVersion" - ] - } - }, - "fields": { - "gpuDriverVersion": { - "type": "GPUDriverVersion", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "GPUDriverVersion": { - "values": { - "GPU_DRIVER_VERSION_UNSPECIFIED": 0, - "INSTALLATION_DISABLED": 1, - "DEFAULT": 2, - "LATEST": 3 - } - } - } - }, - "WorkloadMetadataConfig": { - "fields": { - "mode": { - "type": "Mode", - "id": 2 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "GCE_METADATA": 1, - "GKE_METADATA": 2 - } - } - } - }, - "SetNetworkPolicyRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true - } - }, - "networkPolicy": { - "type": "NetworkPolicy", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetMaintenancePolicyRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "maintenancePolicy": { - "type": "MaintenancePolicy", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "StatusCondition": { - "fields": { - "code": { - "type": "Code", - "id": 1, - "options": { - "deprecated": true - } - }, - "message": { - "type": "string", - "id": 2 - }, - "canonicalCode": { - "type": "google.rpc.Code", - "id": 3 - } - }, - "nested": { - "Code": { - "values": { - "UNKNOWN": 0, - "GCE_STOCKOUT": 1, - "GKE_SERVICE_ACCOUNT_DELETED": 2, - "GCE_QUOTA_EXCEEDED": 3, - "SET_BY_OPERATOR": 4, - "CLOUD_KMS_KEY_ERROR": 7, - "CA_EXPIRING": 9 - } - } - } - }, - "NetworkConfig": { - "oneofs": { - "_enableFqdnNetworkPolicy": { - "oneof": [ - "enableFqdnNetworkPolicy" - ] - }, - "_inTransitEncryptionConfig": { - "oneof": [ - "inTransitEncryptionConfig" - ] - }, - "_enableCiliumClusterwideNetworkPolicy": { - "oneof": [ - "enableCiliumClusterwideNetworkPolicy" - ] - }, - "_defaultEnablePrivateNodes": { - "oneof": [ - "defaultEnablePrivateNodes" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "subnetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enableIntraNodeVisibility": { - "type": "bool", - "id": 5 - }, - "defaultSnatStatus": { - "type": "DefaultSnatStatus", - "id": 7 - }, - "enableL4ilbSubsetting": { - "type": "bool", - "id": 10 - }, - "datapathProvider": { - "type": "DatapathProvider", - "id": 11 - }, - "privateIpv6GoogleAccess": { - "type": "PrivateIPv6GoogleAccess", - "id": 12 - }, - "dnsConfig": { - "type": "DNSConfig", - "id": 13 - }, - "serviceExternalIpsConfig": { - "type": "ServiceExternalIPsConfig", - "id": 15 - }, - "gatewayApiConfig": { - "type": "GatewayAPIConfig", - "id": 16 - }, - "enableMultiNetworking": { - "type": "bool", - "id": 17 - }, - "networkPerformanceConfig": { - "type": "ClusterNetworkPerformanceConfig", - "id": 18 - }, - "enableFqdnNetworkPolicy": { - "type": "bool", - "id": 19, - "options": { - "proto3_optional": true - } - }, - "inTransitEncryptionConfig": { - "type": "InTransitEncryptionConfig", - "id": 20, - "options": { - "proto3_optional": true - } - }, - "enableCiliumClusterwideNetworkPolicy": { - "type": "bool", - "id": 21, - "options": { - "proto3_optional": true - } - }, - "defaultEnablePrivateNodes": { - "type": "bool", - "id": 22, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "ClusterNetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "TIER_1": 1 - } - } - } - } - } - }, - "GatewayAPIConfig": { - "fields": { - "channel": { - "type": "Channel", - "id": 1 - } - }, - "nested": { - "Channel": { - "valuesOptions": { - "CHANNEL_EXPERIMENTAL": { - "deprecated": true - } - }, - "values": { - "CHANNEL_UNSPECIFIED": 0, - "CHANNEL_DISABLED": 1, - "CHANNEL_EXPERIMENTAL": 3, - "CHANNEL_STANDARD": 4 - } - } - } - }, - "ServiceExternalIPsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GetOpenIDConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - } - } - }, - "GetOpenIDConfigResponse": { - "fields": { - "issuer": { - "type": "string", - "id": 1 - }, - "jwksUri": { - "type": "string", - "id": 2 - }, - "responseTypesSupported": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "subjectTypesSupported": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "idTokenSigningAlgValuesSupported": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "claimsSupported": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "grantTypes": { - "rule": "repeated", - "type": "string", - "id": 7 - } - } - }, - "GetJSONWebKeysRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - } - } - }, - "Jwk": { - "fields": { - "kty": { - "type": "string", - "id": 1 - }, - "alg": { - "type": "string", - "id": 2 - }, - "use": { - "type": "string", - "id": 3 - }, - "kid": { - "type": "string", - "id": 4 - }, - "n": { - "type": "string", - "id": 5 - }, - "e": { - "type": "string", - "id": 6 - }, - "x": { - "type": "string", - "id": 7 - }, - "y": { - "type": "string", - "id": 8 - }, - "crv": { - "type": "string", - "id": 9 - } - } - }, - "GetJSONWebKeysResponse": { - "fields": { - "keys": { - "rule": "repeated", - "type": "Jwk", - "id": 1 - } - } - }, - "CheckAutopilotCompatibilityRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "AutopilotCompatibilityIssue": { - "fields": { - "lastObservation": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "constraintType": { - "type": "string", - "id": 2 - }, - "incompatibilityType": { - "type": "IssueType", - "id": 3 - }, - "subjects": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "documentationUrl": { - "type": "string", - "id": 5 - }, - "description": { - "type": "string", - "id": 6 - } - }, - "nested": { - "IssueType": { - "values": { - "UNSPECIFIED": 0, - "INCOMPATIBILITY": 1, - "ADDITIONAL_CONFIG_REQUIRED": 2, - "PASSED_WITH_OPTIONAL_CONFIG": 3 - } - } - } - }, - "CheckAutopilotCompatibilityResponse": { - "fields": { - "issues": { - "rule": "repeated", - "type": "AutopilotCompatibilityIssue", - "id": 1 - }, - "summary": { - "type": "string", - "id": 2 - } - } - }, - "ReleaseChannel": { - "fields": { - "channel": { - "type": "Channel", - "id": 1 - } - }, - "nested": { - "Channel": { - "values": { - "UNSPECIFIED": 0, - "RAPID": 1, - "REGULAR": 2, - "STABLE": 3, - "EXTENDED": 4 - } - } - } - }, - "CostManagementConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "IntraNodeVisibilityConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ILBSubsettingConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "DNSConfig": { - "fields": { - "clusterDns": { - "type": "Provider", - "id": 1 - }, - "clusterDnsScope": { - "type": "DNSScope", - "id": 2 - }, - "clusterDnsDomain": { - "type": "string", - "id": 3 - }, - "additiveVpcScopeDnsDomain": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Provider": { - "values": { - "PROVIDER_UNSPECIFIED": 0, - "PLATFORM_DEFAULT": 1, - "CLOUD_DNS": 2, - "KUBE_DNS": 3 - } - }, - "DNSScope": { - "values": { - "DNS_SCOPE_UNSPECIFIED": 0, - "CLUSTER_SCOPE": 1, - "VPC_SCOPE": 2 - } - } - } - }, - "MaxPodsConstraint": { - "fields": { - "maxPodsPerNode": { - "type": "int64", - "id": 1 - } - } - }, - "WorkloadIdentityConfig": { - "fields": { - "workloadPool": { - "type": "string", - "id": 2 - } - } - }, - "IdentityServiceConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "MeshCertificates": { - "fields": { - "enableCertificates": { - "type": "google.protobuf.BoolValue", - "id": 1 - } - } - }, - "DatabaseEncryption": { - "oneofs": { - "_currentState": { - "oneof": [ - "currentState" - ] - } - }, - "fields": { - "keyName": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "currentState": { - "type": "CurrentState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "decryptionKeys": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastOperationErrors": { - "rule": "repeated", - "type": "OperationError", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "UNKNOWN": 0, - "ENCRYPTED": 1, - "DECRYPTED": 2 - } - }, - "CurrentState": { - "values": { - "CURRENT_STATE_UNSPECIFIED": 0, - "CURRENT_STATE_ENCRYPTED": 7, - "CURRENT_STATE_DECRYPTED": 2, - "CURRENT_STATE_ENCRYPTION_PENDING": 3, - "CURRENT_STATE_ENCRYPTION_ERROR": 4, - "CURRENT_STATE_DECRYPTION_PENDING": 5, - "CURRENT_STATE_DECRYPTION_ERROR": 6 - } - }, - "OperationError": { - "fields": { - "keyName": { - "type": "string", - "id": 1 - }, - "errorMessage": { - "type": "string", - "id": 2 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - } - } - }, - "ListUsableSubnetworksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "filter": { - "type": "string", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListUsableSubnetworksResponse": { - "fields": { - "subnetworks": { - "rule": "repeated", - "type": "UsableSubnetwork", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UsableSubnetworkSecondaryRange": { - "fields": { - "rangeName": { - "type": "string", - "id": 1 - }, - "ipCidrRange": { - "type": "string", - "id": 2 - }, - "status": { - "type": "Status", - "id": 3 - } - }, - "nested": { - "Status": { - "values": { - "UNKNOWN": 0, - "UNUSED": 1, - "IN_USE_SERVICE": 2, - "IN_USE_SHAREABLE_POD": 3, - "IN_USE_MANAGED_POD": 4 - } - } - } - }, - "UsableSubnetwork": { - "fields": { - "subnetwork": { - "type": "string", - "id": 1 - }, - "network": { - "type": "string", - "id": 2 - }, - "ipCidrRange": { - "type": "string", - "id": 3 - }, - "secondaryIpRanges": { - "rule": "repeated", - "type": "UsableSubnetworkSecondaryRange", - "id": 4 - }, - "statusMessage": { - "type": "string", - "id": 5 - } - } - }, - "ResourceUsageExportConfig": { - "fields": { - "bigqueryDestination": { - "type": "BigQueryDestination", - "id": 1 - }, - "enableNetworkEgressMetering": { - "type": "bool", - "id": 2 - }, - "consumptionMeteringConfig": { - "type": "ConsumptionMeteringConfig", - "id": 3 - } - }, - "nested": { - "BigQueryDestination": { - "fields": { - "datasetId": { - "type": "string", - "id": 1 - } - } - }, - "ConsumptionMeteringConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - } - } - }, - "VerticalPodAutoscaling": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "DefaultSnatStatus": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "ShieldedNodes": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "VirtualNIC": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "FastSocket": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "PrivateIPv6GoogleAccess": { - "values": { - "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": 1, - "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": 2, - "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": 3 - } - }, - "NotificationConfig": { - "fields": { - "pubsub": { - "type": "PubSub", - "id": 1 - } - }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "UPGRADE_AVAILABLE_EVENT": 1, - "UPGRADE_EVENT": 2, - "SECURITY_BULLETIN_EVENT": 3 - } - }, - "PubSub": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "topic": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" - } - }, - "filter": { - "type": "Filter", - "id": 3 - } - } - }, - "Filter": { - "fields": { - "eventType": { - "rule": "repeated", - "type": "EventType", - "id": 1 - } - } - } - } - }, - "ConfidentialNodes": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "UpgradeResourceType": { - "values": { - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": 0, - "MASTER": 1, - "NODE_POOL": 2 - } - }, - "UpgradeEvent": { - "fields": { - "resourceType": { - "type": "UpgradeResourceType", - "id": 1 - }, - "operation": { - "type": "string", - "id": 2 - }, - "operationStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "currentVersion": { - "type": "string", - "id": 4 - }, - "targetVersion": { - "type": "string", - "id": 5 - }, - "resource": { - "type": "string", - "id": 6 - } - } - }, - "UpgradeInfoEvent": { - "fields": { - "resourceType": { - "type": "UpgradeResourceType", - "id": 1 - }, - "operation": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "currentVersion": { - "type": "string", - "id": 5 - }, - "targetVersion": { - "type": "string", - "id": 6 - }, - "resource": { - "type": "string", - "id": 7 - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 11 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STARTED": 3, - "SUCCEEDED": 4, - "FAILED": 5, - "CANCELED": 6 - } - } - } - }, - "UpgradeAvailableEvent": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "resourceType": { - "type": "UpgradeResourceType", - "id": 2 - }, - "releaseChannel": { - "type": "ReleaseChannel", - "id": 3 - }, - "resource": { - "type": "string", - "id": 4 - } - } - }, - "SecurityBulletinEvent": { - "fields": { - "resourceTypeAffected": { - "type": "string", - "id": 1 - }, - "bulletinId": { - "type": "string", - "id": 2 - }, - "cveIds": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "severity": { - "type": "string", - "id": 4 - }, - "bulletinUri": { - "type": "string", - "id": 5 - }, - "briefDescription": { - "type": "string", - "id": 6 - }, - "affectedSupportedMinors": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "patchedVersions": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "suggestedUpgradeTarget": { - "type": "string", - "id": 9 - }, - "manualStepsRequired": { - "type": "bool", - "id": 10 - } - } - }, - "Autopilot": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "workloadPolicyConfig": { - "type": "WorkloadPolicyConfig", - "id": 2 - } - } - }, - "WorkloadPolicyConfig": { - "oneofs": { - "_allowNetAdmin": { - "oneof": [ - "allowNetAdmin" - ] - } - }, - "fields": { - "allowNetAdmin": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "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, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5, - "KCP_SSHD": 7, - "KCP_CONNECTION": 8 - } - } - } - }, - "RayClusterLoggingConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "MonitoringConfig": { - "fields": { - "componentConfig": { - "type": "MonitoringComponentConfig", - "id": 1 - }, - "managedPrometheusConfig": { - "type": "ManagedPrometheusConfig", - "id": 2 - }, - "advancedDatapathObservabilityConfig": { - "type": "AdvancedDatapathObservabilityConfig", - "id": 3 - } - } - }, - "AdvancedDatapathObservabilityConfig": { - "oneofs": { - "_enableRelay": { - "oneof": [ - "enableRelay" - ] - } - }, - "fields": { - "enableMetrics": { - "type": "bool", - "id": 1 - }, - "relayMode": { - "type": "RelayMode", - "id": 2 - }, - "enableRelay": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RelayMode": { - "values": { - "RELAY_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "INTERNAL_VPC_LB": 3, - "EXTERNAL_LB": 4 - } - } - } - }, - "RayClusterMonitoringConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "NodePoolLoggingConfig": { - "fields": { - "variantConfig": { - "type": "LoggingVariantConfig", - "id": 1 - } - } - }, - "LoggingVariantConfig": { - "fields": { - "variant": { - "type": "Variant", - "id": 1 - } - }, - "nested": { - "Variant": { - "values": { - "VARIANT_UNSPECIFIED": 0, - "DEFAULT": 1, - "MAX_THROUGHPUT": 2 - } - } - } - }, - "MonitoringComponentConfig": { - "fields": { - "enableComponents": { - "rule": "repeated", - "type": "Component", - "id": 1 - } - }, - "nested": { - "Component": { - "values": { - "COMPONENT_UNSPECIFIED": 0, - "SYSTEM_COMPONENTS": 1, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5, - "STORAGE": 7, - "HPA": 8, - "POD": 9, - "DAEMONSET": 10, - "DEPLOYMENT": 11, - "STATEFULSET": 12, - "CADVISOR": 13, - "KUBELET": 14, - "DCGM": 15 - } - } - } - }, - "DatapathProvider": { - "values": { - "DATAPATH_PROVIDER_UNSPECIFIED": 0, - "LEGACY_DATAPATH": 1, - "ADVANCED_DATAPATH": 2 - } - }, - "NodePoolUpdateStrategy": { - "values": { - "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": 0, - "BLUE_GREEN": 2, - "SURGE": 3 - } - }, - "ManagedPrometheusConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "Fleet": { - "fields": { - "project": { - "type": "string", - "id": 1 - }, - "membership": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "preRegistered": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4": 1, - "IPV4_IPV6": 2 - } - }, - "ControlPlaneEndpointsConfig": { - "fields": { - "dnsEndpointConfig": { - "type": "DNSEndpointConfig", - "id": 1 - }, - "ipEndpointsConfig": { - "type": "IPEndpointsConfig", - "id": 3 - } - }, - "nested": { - "DNSEndpointConfig": { - "oneofs": { - "_allowExternalTraffic": { - "oneof": [ - "allowExternalTraffic" - ] - } - }, - "fields": { - "endpoint": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "allowExternalTraffic": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "IPEndpointsConfig": { - "oneofs": { - "_enabled": { - "oneof": [ - "enabled" - ] - }, - "_enablePublicEndpoint": { - "oneof": [ - "enablePublicEndpoint" - ] - }, - "_globalAccess": { - "oneof": [ - "globalAccess" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "enablePublicEndpoint": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "globalAccess": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "authorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 4 - }, - "publicEndpoint": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "privateEndpoint": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "privateEndpointSubnetwork": { - "type": "string", - "id": 7 - } - } - } - } - }, - "IPv6AccessType": { - "values": { - "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, - "INTERNAL": 1, - "EXTERNAL": 2 - } - }, - "LocalNvmeSsdBlockConfig": { - "fields": { - "localSsdCount": { - "type": "int32", - "id": 1 - } - } - }, - "EphemeralStorageLocalSsdConfig": { - "fields": { - "localSsdCount": { - "type": "int32", - "id": 1 - } - } - }, - "ResourceManagerTags": { - "fields": { - "tags": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "EnterpriseConfig": { - "fields": { - "clusterTier": { - "type": "ClusterTier", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "desiredTier": { - "type": "ClusterTier", - "id": 2 - } - }, - "nested": { - "ClusterTier": { - "values": { - "CLUSTER_TIER_UNSPECIFIED": 0, - "STANDARD": 1, - "ENTERPRISE": 2 - } - } - } - }, - "SecretManagerConfig": { - "oneofs": { - "_enabled": { - "oneof": [ - "enabled" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "SecondaryBootDisk": { - "fields": { - "mode": { - "type": "Mode", - "id": 1 - }, - "diskImage": { - "type": "string", - "id": 2 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "CONTAINER_IMAGE_CACHE": 1 - } - } - } - }, - "InTransitEncryptionConfig": { - "values": { - "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": 0, - "IN_TRANSIT_ENCRYPTION_DISABLED": 1, - "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": 2 - } - }, - "SecondaryBootDiskUpdateStrategy": { - "fields": {} - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "DoubleValue": { - "fields": { - "value": { - "type": "double", - "id": 1 - } - } - }, - "FloatValue": { - "fields": { - "value": { - "type": "float", - "id": 1 - } - } - }, - "Int64Value": { - "fields": { - "value": { - "type": "int64", - "id": 1 - } - } - }, - "UInt64Value": { - "fields": { - "value": { - "type": "uint64", - "id": 1 - } - } - }, - "Int32Value": { - "fields": { - "value": { - "type": "int32", - "id": 1 - } - } - }, - "UInt32Value": { - "fields": { - "value": { - "type": "uint32", - "id": 1 - } - } - }, - "BoolValue": { - "fields": { - "value": { - "type": "bool", - "id": 1 - } - } - }, - "StringValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "BytesValue": { - "fields": { - "value": { - "type": "bytes", - "id": 1 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC", - "cc_enable_arenas": true - }, - "nested": { - "Code": { - "values": { - "OK": 0, - "CANCELLED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "UNAUTHENTICATED": 16, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15 - } - }, - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js deleted file mode 100644 index 436d9310438..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.cancel_operation.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_CancelOperation_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. - */ - /** - * The name (project, location, operation id) of the operation to cancel. - * Specified in the format `projects/* /locations/* /operations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCancelOperation() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.cancelOperation(request); - console.log(response); - } - - callCancelOperation(); - // [END container_v1_generated_ClusterManager_CancelOperation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js deleted file mode 100644 index b6d786247a8..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.check_autopilot_compatibility.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_CheckAutopilotCompatibility_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. - */ - /** - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCheckAutopilotCompatibility() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.checkAutopilotCompatibility(request); - console.log(response); - } - - callCheckAutopilotCompatibility(); - // [END container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js deleted file mode 100644 index 1f17528b893..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_i_p_rotation.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_CompleteIPRotation_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. - */ - /** - * The name (project, location, cluster name) of the cluster to complete IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCompleteIPRotation() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.completeIPRotation(request); - console.log(response); - } - - callCompleteIPRotation(); - // [END container_v1_generated_ClusterManager_CompleteIPRotation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js deleted file mode 100644 index 27f869557dd..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * complete upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCompleteNodePoolUpgrade() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.completeNodePoolUpgrade(request); - console.log(response); - } - - callCompleteNodePoolUpgrade(); - // [END container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js deleted file mode 100644 index 53903512545..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_cluster.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(cluster) { - // [START container_v1_generated_ClusterManager_CreateCluster_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. A cluster - * resource (https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) - */ - // const cluster = {} - /** - * The parent (project and location) where the cluster will be created. - * Specified in the format `projects/* /locations/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCreateCluster() { - // Construct request - const request = { - cluster, - }; - - // Run request - const response = await containerClient.createCluster(request); - console.log(response); - } - - callCreateCluster(); - // [END container_v1_generated_ClusterManager_CreateCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js deleted file mode 100644 index 5beae0c3c32..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.create_node_pool.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(nodePool) { - // [START container_v1_generated_ClusterManager_CreateNodePool_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 node pool to create. - */ - // const nodePool = {} - /** - * The parent (project, location, cluster name) where the node pool will be - * created. Specified in the format - * `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCreateNodePool() { - // Construct request - const request = { - nodePool, - }; - - // Run request - const response = await containerClient.createNodePool(request); - console.log(response); - } - - callCreateNodePool(); - // [END container_v1_generated_ClusterManager_CreateNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js deleted file mode 100644 index 070c083a2b8..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_cluster.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_DeleteCluster_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. - */ - /** - * The name (project, location, cluster) of the cluster to delete. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callDeleteCluster() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.deleteCluster(request); - console.log(response); - } - - callDeleteCluster(); - // [END container_v1_generated_ClusterManager_DeleteCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js deleted file mode 100644 index 5e683fc4fac..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.delete_node_pool.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_DeleteNodePool_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * delete. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callDeleteNodePool() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.deleteNodePool(request); - console.log(response); - } - - callDeleteNodePool(); - // [END container_v1_generated_ClusterManager_DeleteNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js deleted file mode 100644 index 52830f015f9..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_cluster.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_GetCluster_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. - */ - /** - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetCluster() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getCluster(request); - console.log(response); - } - - callGetCluster(); - // [END container_v1_generated_ClusterManager_GetCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js deleted file mode 100644 index 0b960261b88..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_GetJSONWebKeys_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. - */ - /** - * The cluster (project, location, cluster name) to get keys for. Specified in - * the format `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetJSONWebKeys() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getJSONWebKeys(request); - console.log(response); - } - - callGetJSONWebKeys(); - // [END container_v1_generated_ClusterManager_GetJSONWebKeys_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js deleted file mode 100644 index 09b9a51ef52..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_node_pool.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_GetNodePool_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * get. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetNodePool() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getNodePool(request); - console.log(response); - } - - callGetNodePool(); - // [END container_v1_generated_ClusterManager_GetNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js deleted file mode 100644 index 7a949f35e18..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_operation.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_GetOperation_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. - */ - /** - * The name (project, location, operation id) of the operation to get. - * Specified in the format `projects/* /locations/* /operations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetOperation() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getOperation(request); - console.log(response); - } - - callGetOperation(); - // [END container_v1_generated_ClusterManager_GetOperation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js deleted file mode 100644 index a30f036dd59..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.get_server_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_GetServerConfig_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. - */ - /** - * The name (project and location) of the server config to get, - * specified in the format `projects/* /locations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetServerConfig() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getServerConfig(request); - console.log(response); - } - - callGetServerConfig(); - // [END container_v1_generated_ClusterManager_GetServerConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js deleted file mode 100644 index 88f813780a8..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_clusters.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_ListClusters_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. - */ - /** - * The parent (project and location) where the clusters will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListClusters() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.listClusters(request); - console.log(response); - } - - callListClusters(); - // [END container_v1_generated_ClusterManager_ListClusters_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js deleted file mode 100644 index df166d52370..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_node_pools.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_ListNodePools_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. - */ - /** - * The parent (project, location, cluster name) where the node pools will be - * listed. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListNodePools() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.listNodePools(request); - console.log(response); - } - - callListNodePools(); - // [END container_v1_generated_ClusterManager_ListNodePools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js deleted file mode 100644 index 8cb23250609..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_operations.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_ListOperations_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. - */ - /** - * The parent (project and location) where the operations will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListOperations() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.listOperations(request); - console.log(response); - } - - callListOperations(); - // [END container_v1_generated_ClusterManager_ListOperations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js deleted file mode 100644 index 459e08ffb2a..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.list_usable_subnetworks.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_ListUsableSubnetworks_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. - */ - /** - * The parent project where subnetworks are usable. - * Specified in the format `projects/*`. - */ - // const parent = 'abc123' - /** - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - */ - // const filter = 'abc123' - /** - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - */ - // const pageSize = 1234 - /** - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - */ - // const pageToken = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListUsableSubnetworks() { - // Construct request - const request = { - }; - - // Run request - const iterable = containerClient.listUsableSubnetworksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUsableSubnetworks(); - // [END container_v1_generated_ClusterManager_ListUsableSubnetworks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js deleted file mode 100644 index cab5eb8bb05..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node poll to - * rollback upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - /** - * Option for rollback to ignore the PodDisruptionBudget. - * Default value is false. - */ - // const respectPdb = true - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callRollbackNodePoolUpgrade() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.rollbackNodePoolUpgrade(request); - console.log(response); - } - - callRollbackNodePoolUpgrade(); - // [END container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js deleted file mode 100644 index 0a56b5477ef..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_addons_config.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(addonsConfig) { - // [START container_v1_generated_ClusterManager_SetAddonsConfig_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 desired configurations for the various addons available to - * run in the cluster. - */ - // const addonsConfig = {} - /** - * The name (project, location, cluster) of the cluster to set addons. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetAddonsConfig() { - // Construct request - const request = { - addonsConfig, - }; - - // Run request - const response = await containerClient.setAddonsConfig(request); - console.log(response); - } - - callSetAddonsConfig(); - // [END container_v1_generated_ClusterManager_SetAddonsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js deleted file mode 100644 index f4bcccaf538..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_labels.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(resourceLabels, labelFingerprint) { - // [START container_v1_generated_ClusterManager_SetLabels_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 labels to set for that cluster. - */ - // const resourceLabels = [1,2,3,4] - /** - * Required. The fingerprint of the previous set of labels for this resource, - * used to detect conflicts. The fingerprint is initially generated by - * Kubernetes Engine and changes after every request to modify or update - * labels. You must always provide an up-to-date fingerprint hash when - * updating or changing labels. Make a `get()` request to the - * resource to get the latest fingerprint. - */ - // const labelFingerprint = 'abc123' - /** - * The name (project, location, cluster name) of the cluster to set labels. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLabels() { - // Construct request - const request = { - resourceLabels, - labelFingerprint, - }; - - // Run request - const response = await containerClient.setLabels(request); - console.log(response); - } - - callSetLabels(); - // [END container_v1_generated_ClusterManager_SetLabels_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js deleted file mode 100644 index 9ee434d645b..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_legacy_abac.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(enabled) { - // [START container_v1_generated_ClusterManager_SetLegacyAbac_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. Whether ABAC authorization will be enabled in the cluster. - */ - // const enabled = true - /** - * The name (project, location, cluster name) of the cluster to set legacy - * abac. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLegacyAbac() { - // Construct request - const request = { - enabled, - }; - - // Run request - const response = await containerClient.setLegacyAbac(request); - console.log(response); - } - - callSetLegacyAbac(); - // [END container_v1_generated_ClusterManager_SetLegacyAbac_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js deleted file mode 100644 index 1028dcfb16b..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_locations.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(locations) { - // [START container_v1_generated_ClusterManager_SetLocations_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 desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. - * This list must always include the cluster's primary zone. - */ - // const locations = ['abc','def'] - /** - * The name (project, location, cluster) of the cluster to set locations. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLocations() { - // Construct request - const request = { - locations, - }; - - // Run request - const response = await containerClient.setLocations(request); - console.log(response); - } - - callSetLocations(); - // [END container_v1_generated_ClusterManager_SetLocations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js deleted file mode 100644 index 537c9f07334..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_logging_service.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(loggingService) { - // [START container_v1_generated_ClusterManager_SetLoggingService_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 logging service the cluster should use to write logs. - * Currently available options: - * * `logging.googleapis.com/kubernetes` - The Cloud Logging - * service with a Kubernetes-native resource model - * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - * available as of GKE 1.15). - * * `none` - no logs will be exported from the cluster. - * If left as an empty string,`logging.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - */ - // const loggingService = 'abc123' - /** - * The name (project, location, cluster) of the cluster to set logging. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLoggingService() { - // Construct request - const request = { - loggingService, - }; - - // Run request - const response = await containerClient.setLoggingService(request); - console.log(response); - } - - callSetLoggingService(); - // [END container_v1_generated_ClusterManager_SetLoggingService_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js deleted file mode 100644 index 6e51209ae4c..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_maintenance_policy.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, maintenancePolicy) { - // [START container_v1_generated_ClusterManager_SetMaintenancePolicy_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 Google Developers Console project ID or project - * number (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - */ - // const projectId = 'abc123' - /** - * Required. The name of the Google Compute Engine - * zone (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. - */ - // const zone = 'abc123' - /** - * Required. The name of the cluster to update. - */ - // const clusterId = 'abc123' - /** - * Required. The maintenance policy to be set for the cluster. An empty field - * clears the existing maintenance policy. - */ - // const maintenancePolicy = {} - /** - * The name (project, location, cluster name) of the cluster to set - * maintenance policy. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMaintenancePolicy() { - // Construct request - const request = { - projectId, - zone, - clusterId, - maintenancePolicy, - }; - - // Run request - const response = await containerClient.setMaintenancePolicy(request); - console.log(response); - } - - callSetMaintenancePolicy(); - // [END container_v1_generated_ClusterManager_SetMaintenancePolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js deleted file mode 100644 index fa2074336b4..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_master_auth.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(action, update) { - // [START container_v1_generated_ClusterManager_SetMasterAuth_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 exact form of action to be taken on the master auth. - */ - // const action = {} - /** - * Required. A description of the update. - */ - // const update = {} - /** - * The name (project, location, cluster) of the cluster to set auth. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMasterAuth() { - // Construct request - const request = { - action, - update, - }; - - // Run request - const response = await containerClient.setMasterAuth(request); - console.log(response); - } - - callSetMasterAuth(); - // [END container_v1_generated_ClusterManager_SetMasterAuth_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js deleted file mode 100644 index 4a09b3607a3..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_monitoring_service.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(monitoringService) { - // [START container_v1_generated_ClusterManager_SetMonitoringService_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 monitoring service the cluster should use to write metrics. - * Currently available options: - * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - * service with a Kubernetes-native resource model - * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - * longer available as of GKE 1.15). - * * `none` - No metrics will be exported from the cluster. - * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - */ - // const monitoringService = 'abc123' - /** - * The name (project, location, cluster) of the cluster to set monitoring. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMonitoringService() { - // Construct request - const request = { - monitoringService, - }; - - // Run request - const response = await containerClient.setMonitoringService(request); - console.log(response); - } - - callSetMonitoringService(); - // [END container_v1_generated_ClusterManager_SetMonitoringService_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js deleted file mode 100644 index 1e7cf4d7728..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_network_policy.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(networkPolicy) { - // [START container_v1_generated_ClusterManager_SetNetworkPolicy_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. Configuration options for the NetworkPolicy feature. - */ - // const networkPolicy = {} - /** - * The name (project, location, cluster name) of the cluster to set networking - * policy. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNetworkPolicy() { - // Construct request - const request = { - networkPolicy, - }; - - // Run request - const response = await containerClient.setNetworkPolicy(request); - console.log(response); - } - - callSetNetworkPolicy(); - // [END container_v1_generated_ClusterManager_SetNetworkPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js deleted file mode 100644 index 6fc084c3122..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(autoscaling) { - // [START container_v1_generated_ClusterManager_SetNodePoolAutoscaling_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. Autoscaling configuration for the node pool. - */ - // const autoscaling = {} - /** - * The name (project, location, cluster, node pool) of the node pool to set - * autoscaler settings. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolAutoscaling() { - // Construct request - const request = { - autoscaling, - }; - - // Run request - const response = await containerClient.setNodePoolAutoscaling(request); - console.log(response); - } - - callSetNodePoolAutoscaling(); - // [END container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js deleted file mode 100644 index a476987baf4..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_management.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(management) { - // [START container_v1_generated_ClusterManager_SetNodePoolManagement_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. NodeManagement configuration for the node pool. - */ - // const management = {} - /** - * The name (project, location, cluster, node pool id) of the node pool to set - * management properties. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolManagement() { - // Construct request - const request = { - management, - }; - - // Run request - const response = await containerClient.setNodePoolManagement(request); - console.log(response); - } - - callSetNodePoolManagement(); - // [END container_v1_generated_ClusterManager_SetNodePoolManagement_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js deleted file mode 100644 index 5506f38d9a8..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.set_node_pool_size.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(nodeCount) { - // [START container_v1_generated_ClusterManager_SetNodePoolSize_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 desired node count for the pool. - */ - // const nodeCount = 1234 - /** - * The name (project, location, cluster, node pool id) of the node pool to set - * size. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolSize() { - // Construct request - const request = { - nodeCount, - }; - - // Run request - const response = await containerClient.setNodePoolSize(request); - console.log(response); - } - - callSetNodePoolSize(); - // [END container_v1_generated_ClusterManager_SetNodePoolSize_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js deleted file mode 100644 index 03e439c8167..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.start_i_p_rotation.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1_generated_ClusterManager_StartIPRotation_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. - */ - /** - * The name (project, location, cluster name) of the cluster to start IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - /** - * Whether to rotate credentials during IP rotation. - */ - // const rotateCredentials = true - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callStartIPRotation() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.startIPRotation(request); - console.log(response); - } - - callStartIPRotation(); - // [END container_v1_generated_ClusterManager_StartIPRotation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js deleted file mode 100644 index 5aca91359b4..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_cluster.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(update) { - // [START container_v1_generated_ClusterManager_UpdateCluster_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. A description of the update. - */ - // const update = {} - /** - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateCluster() { - // Construct request - const request = { - update, - }; - - // Run request - const response = await containerClient.updateCluster(request); - console.log(response); - } - - callUpdateCluster(); - // [END container_v1_generated_ClusterManager_UpdateCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js deleted file mode 100644 index 223587e64a2..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_master.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(masterVersion) { - // [START container_v1_generated_ClusterManager_UpdateMaster_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 Kubernetes version to change the master to. - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the default Kubernetes version - */ - // const masterVersion = 'abc123' - /** - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateMaster() { - // Construct request - const request = { - masterVersion, - }; - - // Run request - const response = await containerClient.updateMaster(request); - console.log(response); - } - - callUpdateMaster(); - // [END container_v1_generated_ClusterManager_UpdateMaster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js b/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js deleted file mode 100644 index 482516b2a33..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/cluster_manager.update_node_pool.js +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(nodeVersion, imageType) { - // [START container_v1_generated_ClusterManager_UpdateNodePool_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 Kubernetes version to change the nodes to (typically an - * upgrade). - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the Kubernetes master version - */ - // const nodeVersion = 'abc123' - /** - * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. - */ - // const imageType = 'abc123' - /** - * The name (project, location, cluster, node pool) of the node pool to - * update. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - /** - * The desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. - */ - // const locations = ['abc','def'] - /** - * The desired workload metadata config for the node pool. - */ - // const workloadMetadataConfig = {} - /** - * Upgrade settings control disruption and speed of the upgrade. - */ - // const upgradeSettings = {} - /** - * The desired network tags to be applied to all nodes in the node pool. - * If this field is not present, the tags will not be changed. Otherwise, - * the existing network tags will be *replaced* with the provided tags. - */ - // const tags = {} - /** - * The desired node taints to be applied to all nodes in the node pool. - * If this field is not present, the taints will not be changed. Otherwise, - * the existing node taints will be *replaced* with the provided taints. - */ - // const taints = {} - /** - * The desired node labels to be applied to all nodes in the node pool. - * If this field is not present, the labels will not be changed. Otherwise, - * the existing node labels will be *replaced* with the provided labels. - */ - // const labels = {} - /** - * Parameters that can be configured on Linux nodes. - */ - // const linuxNodeConfig = {} - /** - * Node kubelet configs. - */ - // const kubeletConfig = {} - /** - * Node network config. - */ - // const nodeNetworkConfig = {} - /** - * GCFS config. - */ - // const gcfsConfig = {} - /** - * Confidential nodes config. - * All the nodes in the node pool will be Confidential VM once enabled. - */ - // const confidentialNodes = {} - /** - * Enable or disable gvnic on the node pool. - */ - // const gvnic = {} - /** - * The current etag of the node pool. - * If an etag is provided and does not match the current etag of the node - * pool, update will be blocked and an ABORTED error will be returned. - */ - // const etag = 'abc123' - /** - * Enable or disable NCCL fast socket for the node pool. - */ - // const fastSocket = {} - /** - * Logging configuration. - */ - // const loggingConfig = {} - /** - * The resource labels for the node pool to use to annotate any related - * Google Compute Engine resources. - */ - // const resourceLabels = {} - /** - * Parameters that can be configured on Windows nodes. - */ - // const windowsNodeConfig = {} - /** - * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. - */ - // const accelerators = [1,2,3,4] - /** - * Optional. The desired Google Compute Engine machine - * type (https://cloud.google.com/compute/docs/machine-types) for nodes in the - * node pool. Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. - */ - // const machineType = 'abc123' - /** - * Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or - * 'pd-balanced') for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk type. - */ - // const diskType = 'abc123' - /** - * Optional. The desired disk size for nodes in the node pool specified in GB. - * The smallest allowed disk size is 10GB. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk size. - */ - // const diskSizeGb = 1234 - /** - * Desired resource manager tag keys and values to be attached to the nodes - * for managing Compute Engine firewalls using Network Firewall Policies. - * Existing tags will be replaced with new values. - */ - // const resourceManagerTags = {} - /** - * The desired containerd config for nodes in the node pool. - * Initiates an upgrade operation that recreates the nodes with the new - * config. - */ - // const containerdConfig = {} - /** - * Specifies the configuration of queued provisioning. - */ - // const queuedProvisioning = {} - /** - * List of Storage Pools where boot disks are provisioned. - * Existing Storage Pools will be replaced with storage-pools. - */ - // const storagePools = ['abc','def'] - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateNodePool() { - // Construct request - const request = { - nodeVersion, - imageType, - }; - - // Run request - const response = await containerClient.updateNodePool(request); - console.log(response); - } - - callUpdateNodePool(); - // [END container_v1_generated_ClusterManager_UpdateNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json b/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json deleted file mode 100644 index f4bec21d271..00000000000 --- a/owl-bot-staging/google-container/v1/samples/generated/v1/snippet_metadata_google.container.v1.json +++ /dev/null @@ -1,1947 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-container", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.container.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "container_v1_generated_ClusterManager_ListClusters_async", - "title": "ClusterManager listClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists all clusters owned by a project in either the specified zone or all zones.", - "canonical": true, - "file": "cluster_manager.list_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListClusters", - "fullName": "google.container.v1.ClusterManager.ListClusters", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.ListClustersResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "ListClusters", - "fullName": "google.container.v1.ClusterManager.ListClusters", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_GetCluster_async", - "title": "ClusterManager getCluster Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific cluster.", - "canonical": true, - "file": "cluster_manager.get_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCluster", - "fullName": "google.container.v1.ClusterManager.GetCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Cluster", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "GetCluster", - "fullName": "google.container.v1.ClusterManager.GetCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CreateCluster_async", - "title": "ClusterManager createCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", - "canonical": true, - "file": "cluster_manager.create_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCluster", - "fullName": "google.container.v1.ClusterManager.CreateCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": ".google.container.v1.Cluster" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CreateCluster", - "fullName": "google.container.v1.ClusterManager.CreateCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_UpdateCluster_async", - "title": "ClusterManager updateCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a specific cluster.", - "canonical": true, - "file": "cluster_manager.update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCluster", - "fullName": "google.container.v1.ClusterManager.UpdateCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "update", - "type": ".google.container.v1.ClusterUpdate" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateCluster", - "fullName": "google.container.v1.ClusterManager.UpdateCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_UpdateNodePool_async", - "title": "ClusterManager updateNodePool Sample", - "origin": "API_DEFINITION", - "description": " Updates the version and/or image type for the specified node pool.", - "canonical": true, - "file": "cluster_manager.update_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 204, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateNodePool", - "fullName": "google.container.v1.ClusterManager.UpdateNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "node_version", - "type": "TYPE_STRING" - }, - { - "name": "image_type", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "locations", - "type": "TYPE_STRING[]" - }, - { - "name": "workload_metadata_config", - "type": ".google.container.v1.WorkloadMetadataConfig" - }, - { - "name": "upgrade_settings", - "type": ".google.container.v1.NodePool.UpgradeSettings" - }, - { - "name": "tags", - "type": ".google.container.v1.NetworkTags" - }, - { - "name": "taints", - "type": ".google.container.v1.NodeTaints" - }, - { - "name": "labels", - "type": ".google.container.v1.NodeLabels" - }, - { - "name": "linux_node_config", - "type": ".google.container.v1.LinuxNodeConfig" - }, - { - "name": "kubelet_config", - "type": ".google.container.v1.NodeKubeletConfig" - }, - { - "name": "node_network_config", - "type": ".google.container.v1.NodeNetworkConfig" - }, - { - "name": "gcfs_config", - "type": ".google.container.v1.GcfsConfig" - }, - { - "name": "confidential_nodes", - "type": ".google.container.v1.ConfidentialNodes" - }, - { - "name": "gvnic", - "type": ".google.container.v1.VirtualNIC" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "fast_socket", - "type": ".google.container.v1.FastSocket" - }, - { - "name": "logging_config", - "type": ".google.container.v1.NodePoolLoggingConfig" - }, - { - "name": "resource_labels", - "type": ".google.container.v1.ResourceLabels" - }, - { - "name": "windows_node_config", - "type": ".google.container.v1.WindowsNodeConfig" - }, - { - "name": "accelerators", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "machine_type", - "type": "TYPE_STRING" - }, - { - "name": "disk_type", - "type": "TYPE_STRING" - }, - { - "name": "disk_size_gb", - "type": "TYPE_INT64" - }, - { - "name": "resource_manager_tags", - "type": ".google.container.v1.ResourceManagerTags" - }, - { - "name": "containerd_config", - "type": ".google.container.v1.ContainerdConfig" - }, - { - "name": "queued_provisioning", - "type": ".google.container.v1.NodePool.QueuedProvisioning" - }, - { - "name": "storage_pools", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateNodePool", - "fullName": "google.container.v1.ClusterManager.UpdateNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async", - "title": "ClusterManager setNodePoolAutoscaling Sample", - "origin": "API_DEFINITION", - "description": " Sets the autoscaling settings for the specified node pool.", - "canonical": true, - "file": "cluster_manager.set_node_pool_autoscaling.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolAutoscaling", - "fullName": "google.container.v1.ClusterManager.SetNodePoolAutoscaling", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "autoscaling", - "type": ".google.container.v1.NodePoolAutoscaling" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolAutoscaling", - "fullName": "google.container.v1.ClusterManager.SetNodePoolAutoscaling", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetLoggingService_async", - "title": "ClusterManager setLoggingService Sample", - "origin": "API_DEFINITION", - "description": " Sets the logging service for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_logging_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLoggingService", - "fullName": "google.container.v1.ClusterManager.SetLoggingService", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "logging_service", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLoggingService", - "fullName": "google.container.v1.ClusterManager.SetLoggingService", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetMonitoringService_async", - "title": "ClusterManager setMonitoringService Sample", - "origin": "API_DEFINITION", - "description": " Sets the monitoring service for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_monitoring_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMonitoringService", - "fullName": "google.container.v1.ClusterManager.SetMonitoringService", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "monitoring_service", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMonitoringService", - "fullName": "google.container.v1.ClusterManager.SetMonitoringService", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetAddonsConfig_async", - "title": "ClusterManager setAddonsConfig Sample", - "origin": "API_DEFINITION", - "description": " Sets the addons for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_addons_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetAddonsConfig", - "fullName": "google.container.v1.ClusterManager.SetAddonsConfig", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "addons_config", - "type": ".google.container.v1.AddonsConfig" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetAddonsConfig", - "fullName": "google.container.v1.ClusterManager.SetAddonsConfig", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetLocations_async", - "title": "ClusterManager setLocations Sample", - "origin": "API_DEFINITION", - "description": " Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.", - "canonical": true, - "file": "cluster_manager.set_locations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLocations", - "fullName": "google.container.v1.ClusterManager.SetLocations", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "locations", - "type": "TYPE_STRING[]" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLocations", - "fullName": "google.container.v1.ClusterManager.SetLocations", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_UpdateMaster_async", - "title": "ClusterManager updateMaster Sample", - "origin": "API_DEFINITION", - "description": " Updates the master for a specific cluster.", - "canonical": true, - "file": "cluster_manager.update_master.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateMaster", - "fullName": "google.container.v1.ClusterManager.UpdateMaster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "master_version", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateMaster", - "fullName": "google.container.v1.ClusterManager.UpdateMaster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetMasterAuth_async", - "title": "ClusterManager setMasterAuth Sample", - "origin": "API_DEFINITION", - "description": " Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", - "canonical": true, - "file": "cluster_manager.set_master_auth.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMasterAuth", - "fullName": "google.container.v1.ClusterManager.SetMasterAuth", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "action", - "type": ".google.container.v1.SetMasterAuthRequest.Action" - }, - { - "name": "update", - "type": ".google.container.v1.MasterAuth" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMasterAuth", - "fullName": "google.container.v1.ClusterManager.SetMasterAuth", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_DeleteCluster_async", - "title": "ClusterManager deleteCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", - "canonical": true, - "file": "cluster_manager.delete_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCluster", - "fullName": "google.container.v1.ClusterManager.DeleteCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "DeleteCluster", - "fullName": "google.container.v1.ClusterManager.DeleteCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_ListOperations_async", - "title": "ClusterManager listOperations Sample", - "origin": "API_DEFINITION", - "description": " Lists all operations in a project in a specific zone or all zones.", - "canonical": true, - "file": "cluster_manager.list_operations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOperations", - "fullName": "google.container.v1.ClusterManager.ListOperations", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.ListOperationsResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "ListOperations", - "fullName": "google.container.v1.ClusterManager.ListOperations", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_GetOperation_async", - "title": "ClusterManager getOperation Sample", - "origin": "API_DEFINITION", - "description": " Gets the specified operation.", - "canonical": true, - "file": "cluster_manager.get_operation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOperation", - "fullName": "google.container.v1.ClusterManager.GetOperation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "operation_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "GetOperation", - "fullName": "google.container.v1.ClusterManager.GetOperation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CancelOperation_async", - "title": "ClusterManager cancelOperation Sample", - "origin": "API_DEFINITION", - "description": " Cancels the specified operation.", - "canonical": true, - "file": "cluster_manager.cancel_operation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelOperation", - "fullName": "google.container.v1.ClusterManager.CancelOperation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "operation_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CancelOperation", - "fullName": "google.container.v1.ClusterManager.CancelOperation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_GetServerConfig_async", - "title": "ClusterManager getServerConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns configuration info about the Google Kubernetes Engine service.", - "canonical": true, - "file": "cluster_manager.get_server_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetServerConfig", - "fullName": "google.container.v1.ClusterManager.GetServerConfig", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.ServerConfig", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "GetServerConfig", - "fullName": "google.container.v1.ClusterManager.GetServerConfig", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_GetJSONWebKeys_async", - "title": "ClusterManager getJSONWebKeys Sample", - "origin": "API_DEFINITION", - "description": " Gets the public component of the cluster signing keys in JSON Web Key format.", - "canonical": true, - "file": "cluster_manager.get_j_s_o_n_web_keys.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1.ClusterManager.GetJSONWebKeys", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.GetJSONWebKeysResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1.ClusterManager.GetJSONWebKeys", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_ListNodePools_async", - "title": "ClusterManager listNodePools Sample", - "origin": "API_DEFINITION", - "description": " Lists the node pools for a cluster.", - "canonical": true, - "file": "cluster_manager.list_node_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListNodePools", - "fullName": "google.container.v1.ClusterManager.ListNodePools", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.ListNodePoolsResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "ListNodePools", - "fullName": "google.container.v1.ClusterManager.ListNodePools", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_GetNodePool_async", - "title": "ClusterManager getNodePool Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the requested node pool.", - "canonical": true, - "file": "cluster_manager.get_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetNodePool", - "fullName": "google.container.v1.ClusterManager.GetNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.NodePool", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "GetNodePool", - "fullName": "google.container.v1.ClusterManager.GetNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CreateNodePool_async", - "title": "ClusterManager createNodePool Sample", - "origin": "API_DEFINITION", - "description": " Creates a node pool for a cluster.", - "canonical": true, - "file": "cluster_manager.create_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateNodePool", - "fullName": "google.container.v1.ClusterManager.CreateNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool", - "type": ".google.container.v1.NodePool" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CreateNodePool", - "fullName": "google.container.v1.ClusterManager.CreateNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_DeleteNodePool_async", - "title": "ClusterManager deleteNodePool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a node pool from a cluster.", - "canonical": true, - "file": "cluster_manager.delete_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteNodePool", - "fullName": "google.container.v1.ClusterManager.DeleteNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "DeleteNodePool", - "fullName": "google.container.v1.ClusterManager.DeleteNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async", - "title": "ClusterManager completeNodePoolUpgrade Sample", - "origin": "API_DEFINITION", - "description": " CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", - "canonical": true, - "file": "cluster_manager.complete_node_pool_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteNodePoolUpgrade", - "fullName": "google.container.v1.ClusterManager.CompleteNodePoolUpgrade", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CompleteNodePoolUpgrade", - "fullName": "google.container.v1.ClusterManager.CompleteNodePoolUpgrade", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async", - "title": "ClusterManager rollbackNodePoolUpgrade Sample", - "origin": "API_DEFINITION", - "description": " Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", - "canonical": true, - "file": "cluster_manager.rollback_node_pool_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RollbackNodePoolUpgrade", - "fullName": "google.container.v1.ClusterManager.RollbackNodePoolUpgrade", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "respect_pdb", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "RollbackNodePoolUpgrade", - "fullName": "google.container.v1.ClusterManager.RollbackNodePoolUpgrade", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetNodePoolManagement_async", - "title": "ClusterManager setNodePoolManagement Sample", - "origin": "API_DEFINITION", - "description": " Sets the NodeManagement options for a node pool.", - "canonical": true, - "file": "cluster_manager.set_node_pool_management.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolManagement", - "fullName": "google.container.v1.ClusterManager.SetNodePoolManagement", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "management", - "type": ".google.container.v1.NodeManagement" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolManagement", - "fullName": "google.container.v1.ClusterManager.SetNodePoolManagement", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetLabels_async", - "title": "ClusterManager setLabels Sample", - "origin": "API_DEFINITION", - "description": " Sets labels on a cluster.", - "canonical": true, - "file": "cluster_manager.set_labels.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLabels", - "fullName": "google.container.v1.ClusterManager.SetLabels", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "resource_labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "label_fingerprint", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLabels", - "fullName": "google.container.v1.ClusterManager.SetLabels", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetLegacyAbac_async", - "title": "ClusterManager setLegacyAbac Sample", - "origin": "API_DEFINITION", - "description": " Enables or disables the ABAC authorization mechanism on a cluster.", - "canonical": true, - "file": "cluster_manager.set_legacy_abac.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLegacyAbac", - "fullName": "google.container.v1.ClusterManager.SetLegacyAbac", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "enabled", - "type": "TYPE_BOOL" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLegacyAbac", - "fullName": "google.container.v1.ClusterManager.SetLegacyAbac", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_StartIPRotation_async", - "title": "ClusterManager startIPRotation Sample", - "origin": "API_DEFINITION", - "description": " Starts master IP rotation.", - "canonical": true, - "file": "cluster_manager.start_i_p_rotation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StartIPRotation", - "fullName": "google.container.v1.ClusterManager.StartIPRotation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "rotate_credentials", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "StartIPRotation", - "fullName": "google.container.v1.ClusterManager.StartIPRotation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CompleteIPRotation_async", - "title": "ClusterManager completeIPRotation Sample", - "origin": "API_DEFINITION", - "description": " Completes master IP rotation.", - "canonical": true, - "file": "cluster_manager.complete_i_p_rotation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteIPRotation", - "fullName": "google.container.v1.ClusterManager.CompleteIPRotation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CompleteIPRotation", - "fullName": "google.container.v1.ClusterManager.CompleteIPRotation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetNodePoolSize_async", - "title": "ClusterManager setNodePoolSize Sample", - "origin": "API_DEFINITION", - "description": " Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1.NodePool.locations].", - "canonical": true, - "file": "cluster_manager.set_node_pool_size.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolSize", - "fullName": "google.container.v1.ClusterManager.SetNodePoolSize", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "node_count", - "type": "TYPE_INT32" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolSize", - "fullName": "google.container.v1.ClusterManager.SetNodePoolSize", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetNetworkPolicy_async", - "title": "ClusterManager setNetworkPolicy Sample", - "origin": "API_DEFINITION", - "description": " Enables or disables Network Policy for a cluster.", - "canonical": true, - "file": "cluster_manager.set_network_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNetworkPolicy", - "fullName": "google.container.v1.ClusterManager.SetNetworkPolicy", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "network_policy", - "type": ".google.container.v1.NetworkPolicy" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNetworkPolicy", - "fullName": "google.container.v1.ClusterManager.SetNetworkPolicy", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_SetMaintenancePolicy_async", - "title": "ClusterManager setMaintenancePolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the maintenance policy for a cluster.", - "canonical": true, - "file": "cluster_manager.set_maintenance_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMaintenancePolicy", - "fullName": "google.container.v1.ClusterManager.SetMaintenancePolicy", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "maintenance_policy", - "type": ".google.container.v1.MaintenancePolicy" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMaintenancePolicy", - "fullName": "google.container.v1.ClusterManager.SetMaintenancePolicy", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_ListUsableSubnetworks_async", - "title": "ClusterManager listUsableSubnetworks Sample", - "origin": "API_DEFINITION", - "description": " Lists subnetworks that are usable for creating clusters in a project.", - "canonical": true, - "file": "cluster_manager.list_usable_subnetworks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUsableSubnetworks", - "fullName": "google.container.v1.ClusterManager.ListUsableSubnetworks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.ListUsableSubnetworksResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "ListUsableSubnetworks", - "fullName": "google.container.v1.ClusterManager.ListUsableSubnetworks", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async", - "title": "ClusterManager checkAutopilotCompatibility Sample", - "origin": "API_DEFINITION", - "description": " Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.", - "canonical": true, - "file": "cluster_manager.check_autopilot_compatibility.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckAutopilotCompatibility", - "fullName": "google.container.v1.ClusterManager.CheckAutopilotCompatibility", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1.CheckAutopilotCompatibilityResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1.ClusterManagerClient" - }, - "method": { - "shortName": "CheckAutopilotCompatibility", - "fullName": "google.container.v1.ClusterManager.CheckAutopilotCompatibility", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1.ClusterManager" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-container/v1/src/index.ts b/owl-bot-staging/google-container/v1/src/index.ts deleted file mode 100644 index 3052cac4844..00000000000 --- a/owl-bot-staging/google-container/v1/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 ClusterManagerClient = v1.ClusterManagerClient; -type ClusterManagerClient = v1.ClusterManagerClient; -export {v1, ClusterManagerClient}; -export default {v1, ClusterManagerClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts deleted file mode 100644 index 08bababfe0d..00000000000 --- a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client.ts +++ /dev/null @@ -1,3712 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} 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/cluster_manager_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './cluster_manager_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Google Kubernetes Engine Cluster Manager v1 - * @class - * @memberof v1 - */ -export class ClusterManagerClient { - 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}; - private _universeDomain: string; - private _servicePath: string; - 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}; - clusterManagerStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ClusterManagerClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new ClusterManagerClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ClusterManagerClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'container.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._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 = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - caPoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/caPools/{ca_pool}' - ), - cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}' - ), - }; - - // 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 = { - listUsableSubnetworks: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'subnetworks') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.container.v1.ClusterManager', 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.clusterManagerStub) { - return this.clusterManagerStub; - } - - // Put together the "service stub" for - // google.container.v1.ClusterManager. - this.clusterManagerStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.container.v1.ClusterManager') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.container.v1.ClusterManager, - 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 clusterManagerStubMethods = - ['listClusters', 'getCluster', 'createCluster', 'updateCluster', 'updateNodePool', 'setNodePoolAutoscaling', 'setLoggingService', 'setMonitoringService', 'setAddonsConfig', 'setLocations', 'updateMaster', 'setMasterAuth', 'deleteCluster', 'listOperations', 'getOperation', 'cancelOperation', 'getServerConfig', 'getJsonWebKeys', 'listNodePools', 'getNodePool', 'createNodePool', 'deleteNodePool', 'completeNodePoolUpgrade', 'rollbackNodePoolUpgrade', 'setNodePoolManagement', 'setLabels', 'setLegacyAbac', 'startIpRotation', 'completeIpRotation', 'setNodePoolSize', 'setNetworkPolicy', 'setMaintenancePolicy', 'listUsableSubnetworks', 'checkAutopilotCompatibility']; - for (const methodName of clusterManagerStubMethods) { - const callPromise = this.clusterManagerStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.clusterManagerStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'container.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'container.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Lists all clusters owned by a project in either the specified zone or all - * zones. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides, or "-" for all zones. This field has been deprecated and - * replaced by the parent field. - * @param {string} request.parent - * The parent (project and location) where the clusters will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.ListClustersResponse|ListClustersResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.list_clusters.js - * region_tag:container_v1_generated_ClusterManager_ListClusters_async - */ - listClusters( - request?: protos.google.container.v1.IListClustersRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|undefined, {}|undefined - ]>; - listClusters( - request: protos.google.container.v1.IListClustersRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|null|undefined, - {}|null|undefined>): void; - listClusters( - request: protos.google.container.v1.IListClustersRequest, - callback: Callback< - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|null|undefined, - {}|null|undefined>): void; - listClusters( - request?: protos.google.container.v1.IListClustersRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IListClustersResponse, - protos.google.container.v1.IListClustersRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.listClusters(request, options, callback); - } -/** - * Gets the details of a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to retrieve. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Cluster|Cluster}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.get_cluster.js - * region_tag:container_v1_generated_ClusterManager_GetCluster_async - */ - getCluster( - request?: protos.google.container.v1.IGetClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|undefined, {}|undefined - ]>; - getCluster( - request: protos.google.container.v1.IGetClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|null|undefined, - {}|null|undefined>): void; - getCluster( - request: protos.google.container.v1.IGetClusterRequest, - callback: Callback< - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|null|undefined, - {}|null|undefined>): void; - getCluster( - request?: protos.google.container.v1.IGetClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.ICluster, - protos.google.container.v1.IGetClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getCluster(request, options, callback); - } -/** - * Creates a cluster, consisting of the specified number and type of Google - * Compute Engine instances. - * - * By default, the cluster is created in the project's - * [default - * network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - * - * One firewall is added for the cluster. After cluster creation, - * the Kubelet creates routes for each node to allow the containers - * on that node to communicate with all other instances in the - * cluster. - * - * Finally, an entry is added to the project's global metadata indicating - * which CIDR range the cluster is using. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {google.container.v1.Cluster} request.cluster - * Required. A [cluster - * resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) - * @param {string} request.parent - * The parent (project and location) where the cluster will be created. - * Specified in the format `projects/* /locations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.create_cluster.js - * region_tag:container_v1_generated_ClusterManager_CreateCluster_async - */ - createCluster( - request?: protos.google.container.v1.ICreateClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|undefined, {}|undefined - ]>; - createCluster( - request: protos.google.container.v1.ICreateClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): void; - createCluster( - request: protos.google.container.v1.ICreateClusterRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): void; - createCluster( - request?: protos.google.container.v1.ICreateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.createCluster(request, options, callback); - } -/** - * Updates the settings of a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.ClusterUpdate} request.update - * Required. A description of the update. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.update_cluster.js - * region_tag:container_v1_generated_ClusterManager_UpdateCluster_async - */ - updateCluster( - request?: protos.google.container.v1.IUpdateClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|undefined, {}|undefined - ]>; - updateCluster( - request: protos.google.container.v1.IUpdateClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): void; - updateCluster( - request: protos.google.container.v1.IUpdateClusterRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): void; - updateCluster( - request?: protos.google.container.v1.IUpdateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateCluster(request, options, callback); - } -/** - * Updates the version and/or image type for the specified node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodeVersion - * Required. The Kubernetes version to change the nodes to (typically an - * upgrade). - * - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the Kubernetes master version - * @param {string} request.imageType - * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. - * @param {string} request.name - * The name (project, location, cluster, node pool) of the node pool to - * update. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {string[]} request.locations - * The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. - * @param {google.container.v1.WorkloadMetadataConfig} request.workloadMetadataConfig - * The desired workload metadata config for the node pool. - * @param {google.container.v1.NodePool.UpgradeSettings} request.upgradeSettings - * Upgrade settings control disruption and speed of the upgrade. - * @param {google.container.v1.NetworkTags} request.tags - * The desired network tags to be applied to all nodes in the node pool. - * If this field is not present, the tags will not be changed. Otherwise, - * the existing network tags will be *replaced* with the provided tags. - * @param {google.container.v1.NodeTaints} request.taints - * The desired node taints to be applied to all nodes in the node pool. - * If this field is not present, the taints will not be changed. Otherwise, - * the existing node taints will be *replaced* with the provided taints. - * @param {google.container.v1.NodeLabels} request.labels - * The desired node labels to be applied to all nodes in the node pool. - * If this field is not present, the labels will not be changed. Otherwise, - * the existing node labels will be *replaced* with the provided labels. - * @param {google.container.v1.LinuxNodeConfig} request.linuxNodeConfig - * Parameters that can be configured on Linux nodes. - * @param {google.container.v1.NodeKubeletConfig} request.kubeletConfig - * Node kubelet configs. - * @param {google.container.v1.NodeNetworkConfig} request.nodeNetworkConfig - * Node network config. - * @param {google.container.v1.GcfsConfig} request.gcfsConfig - * GCFS config. - * @param {google.container.v1.ConfidentialNodes} request.confidentialNodes - * Confidential nodes config. - * All the nodes in the node pool will be Confidential VM once enabled. - * @param {google.container.v1.VirtualNIC} request.gvnic - * Enable or disable gvnic on the node pool. - * @param {string} request.etag - * The current etag of the node pool. - * If an etag is provided and does not match the current etag of the node - * pool, update will be blocked and an ABORTED error will be returned. - * @param {google.container.v1.FastSocket} request.fastSocket - * Enable or disable NCCL fast socket for the node pool. - * @param {google.container.v1.NodePoolLoggingConfig} request.loggingConfig - * Logging configuration. - * @param {google.container.v1.ResourceLabels} request.resourceLabels - * The resource labels for the node pool to use to annotate any related - * Google Compute Engine resources. - * @param {google.container.v1.WindowsNodeConfig} request.windowsNodeConfig - * Parameters that can be configured on Windows nodes. - * @param {number[]} request.accelerators - * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. - * @param {string} [request.machineType] - * Optional. The desired [Google Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - * node pool. Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. - * @param {string} [request.diskType] - * Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or - * 'pd-balanced') for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk type. - * @param {number} [request.diskSizeGb] - * Optional. The desired disk size for nodes in the node pool specified in GB. - * The smallest allowed disk size is 10GB. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk size. - * @param {google.container.v1.ResourceManagerTags} request.resourceManagerTags - * Desired resource manager tag keys and values to be attached to the nodes - * for managing Compute Engine firewalls using Network Firewall Policies. - * Existing tags will be replaced with new values. - * @param {google.container.v1.ContainerdConfig} request.containerdConfig - * The desired containerd config for nodes in the node pool. - * Initiates an upgrade operation that recreates the nodes with the new - * config. - * @param {google.container.v1.NodePool.QueuedProvisioning} request.queuedProvisioning - * Specifies the configuration of queued provisioning. - * @param {string[]} request.storagePools - * List of Storage Pools where boot disks are provisioned. - * Existing Storage Pools will be replaced with storage-pools. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.update_node_pool.js - * region_tag:container_v1_generated_ClusterManager_UpdateNodePool_async - */ - updateNodePool( - request?: protos.google.container.v1.IUpdateNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|undefined, {}|undefined - ]>; - updateNodePool( - request: protos.google.container.v1.IUpdateNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - updateNodePool( - request: protos.google.container.v1.IUpdateNodePoolRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - updateNodePool( - request?: protos.google.container.v1.IUpdateNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateNodePool(request, options, callback); - } -/** - * Sets the autoscaling settings for the specified node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.NodePoolAutoscaling} request.autoscaling - * Required. Autoscaling configuration for the node pool. - * @param {string} request.name - * The name (project, location, cluster, node pool) of the node pool to set - * autoscaler settings. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js - * region_tag:container_v1_generated_ClusterManager_SetNodePoolAutoscaling_async - */ - setNodePoolAutoscaling( - request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|undefined, {}|undefined - ]>; - setNodePoolAutoscaling( - request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolAutoscaling( - request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolAutoscaling( - request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolAutoscalingRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolAutoscaling(request, options, callback); - } -/** - * Sets the logging service for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.loggingService - * Required. The logging service the cluster should use to write logs. - * Currently available options: - * - * * `logging.googleapis.com/kubernetes` - The Cloud Logging - * service with a Kubernetes-native resource model - * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - * available as of GKE 1.15). - * * `none` - no logs will be exported from the cluster. - * - * If left as an empty string,`logging.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set logging. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_logging_service.js - * region_tag:container_v1_generated_ClusterManager_SetLoggingService_async - */ - setLoggingService( - request?: protos.google.container.v1.ISetLoggingServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|undefined, {}|undefined - ]>; - setLoggingService( - request: protos.google.container.v1.ISetLoggingServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): void; - setLoggingService( - request: protos.google.container.v1.ISetLoggingServiceRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): void; - setLoggingService( - request?: protos.google.container.v1.ISetLoggingServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLoggingServiceRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLoggingService(request, options, callback); - } -/** - * Sets the monitoring service for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.monitoringService - * Required. The monitoring service the cluster should use to write metrics. - * Currently available options: - * - * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - * service with a Kubernetes-native resource model - * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - * longer available as of GKE 1.15). - * * `none` - No metrics will be exported from the cluster. - * - * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set monitoring. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_monitoring_service.js - * region_tag:container_v1_generated_ClusterManager_SetMonitoringService_async - */ - setMonitoringService( - request?: protos.google.container.v1.ISetMonitoringServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|undefined, {}|undefined - ]>; - setMonitoringService( - request: protos.google.container.v1.ISetMonitoringServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): void; - setMonitoringService( - request: protos.google.container.v1.ISetMonitoringServiceRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): void; - setMonitoringService( - request?: protos.google.container.v1.ISetMonitoringServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMonitoringServiceRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMonitoringService(request, options, callback); - } -/** - * Sets the addons for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.AddonsConfig} request.addonsConfig - * Required. The desired configurations for the various addons available to - * run in the cluster. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set addons. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_addons_config.js - * region_tag:container_v1_generated_ClusterManager_SetAddonsConfig_async - */ - setAddonsConfig( - request?: protos.google.container.v1.ISetAddonsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|undefined, {}|undefined - ]>; - setAddonsConfig( - request: protos.google.container.v1.ISetAddonsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): void; - setAddonsConfig( - request: protos.google.container.v1.ISetAddonsConfigRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): void; - setAddonsConfig( - request?: protos.google.container.v1.ISetAddonsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetAddonsConfigRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setAddonsConfig(request, options, callback); - } -/** - * Sets the locations for a specific cluster. - * Deprecated. Use - * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) - * instead. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string[]} request.locations - * Required. The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. - * - * This list must always include the cluster's primary zone. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set locations. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_locations.js - * region_tag:container_v1_generated_ClusterManager_SetLocations_async - * @deprecated SetLocations is deprecated and may be removed in a future version. - */ - setLocations( - request?: protos.google.container.v1.ISetLocationsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|undefined, {}|undefined - ]>; - setLocations( - request: protos.google.container.v1.ISetLocationsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): void; - setLocations( - request: protos.google.container.v1.ISetLocationsRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): void; - setLocations( - request?: protos.google.container.v1.ISetLocationsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLocationsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - this.warn('DEP$ClusterManager-$SetLocations','SetLocations is deprecated and may be removed in a future version.', 'DeprecationWarning'); - return this.innerApiCalls.setLocations(request, options, callback); - } -/** - * Updates the master for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.masterVersion - * Required. The Kubernetes version to change the master to. - * - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the default Kubernetes version - * @param {string} request.name - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.update_master.js - * region_tag:container_v1_generated_ClusterManager_UpdateMaster_async - */ - updateMaster( - request?: protos.google.container.v1.IUpdateMasterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|undefined, {}|undefined - ]>; - updateMaster( - request: protos.google.container.v1.IUpdateMasterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): void; - updateMaster( - request: protos.google.container.v1.IUpdateMasterRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): void; - updateMaster( - request?: protos.google.container.v1.IUpdateMasterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IUpdateMasterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateMaster(request, options, callback); - } -/** - * Sets master auth materials. Currently supports changing the admin password - * or a specific cluster, either via password generation or explicitly setting - * the password. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.SetMasterAuthRequest.Action} request.action - * Required. The exact form of action to be taken on the master auth. - * @param {google.container.v1.MasterAuth} request.update - * Required. A description of the update. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set auth. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_master_auth.js - * region_tag:container_v1_generated_ClusterManager_SetMasterAuth_async - */ - setMasterAuth( - request?: protos.google.container.v1.ISetMasterAuthRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|undefined, {}|undefined - ]>; - setMasterAuth( - request: protos.google.container.v1.ISetMasterAuthRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): void; - setMasterAuth( - request: protos.google.container.v1.ISetMasterAuthRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): void; - setMasterAuth( - request?: protos.google.container.v1.ISetMasterAuthRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMasterAuthRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMasterAuth(request, options, callback); - } -/** - * Deletes the cluster, including the Kubernetes endpoint and all worker - * nodes. - * - * Firewalls and routes that were configured during cluster creation - * are also deleted. - * - * Other Google Compute Engine resources that might be in use by the cluster, - * such as load balancer resources, are not deleted if they weren't present - * when the cluster was initially created. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to delete. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to delete. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.delete_cluster.js - * region_tag:container_v1_generated_ClusterManager_DeleteCluster_async - */ - deleteCluster( - request?: protos.google.container.v1.IDeleteClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|undefined, {}|undefined - ]>; - deleteCluster( - request: protos.google.container.v1.IDeleteClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): void; - deleteCluster( - request: protos.google.container.v1.IDeleteClusterRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): void; - deleteCluster( - request?: protos.google.container.v1.IDeleteClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteCluster(request, options, callback); - } -/** - * Lists all operations in a project in a specific zone or all zones. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for, or `-` for all zones. This field has been deprecated and - * replaced by the parent field. - * @param {string} request.parent - * The parent (project and location) where the operations will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.ListOperationsResponse|ListOperationsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.list_operations.js - * region_tag:container_v1_generated_ClusterManager_ListOperations_async - */ - listOperations( - request?: protos.google.container.v1.IListOperationsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|undefined, {}|undefined - ]>; - listOperations( - request: protos.google.container.v1.IListOperationsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|null|undefined, - {}|null|undefined>): void; - listOperations( - request: protos.google.container.v1.IListOperationsRequest, - callback: Callback< - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|null|undefined, - {}|null|undefined>): void; - listOperations( - request?: protos.google.container.v1.IListOperationsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IListOperationsResponse, - protos.google.container.v1.IListOperationsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.listOperations(request, options, callback); - } -/** - * Gets the specified operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.operationId - * Deprecated. The server-assigned `name` of the operation. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, operation id) of the operation to get. - * Specified in the format `projects/* /locations/* /operations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.get_operation.js - * region_tag:container_v1_generated_ClusterManager_GetOperation_async - */ - getOperation( - request?: protos.google.container.v1.IGetOperationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|undefined, {}|undefined - ]>; - getOperation( - request: protos.google.container.v1.IGetOperationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|null|undefined, - {}|null|undefined>): void; - getOperation( - request: protos.google.container.v1.IGetOperationRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|null|undefined, - {}|null|undefined>): void; - getOperation( - request?: protos.google.container.v1.IGetOperationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IGetOperationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'operation_id': request.operationId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getOperation(request, options, callback); - } -/** - * Cancels the specified operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * operation resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.operationId - * Deprecated. The server-assigned `name` of the operation. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, operation id) of the operation to cancel. - * Specified in the format `projects/* /locations/* /operations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.cancel_operation.js - * region_tag:container_v1_generated_ClusterManager_CancelOperation_async - */ - cancelOperation( - request?: protos.google.container.v1.ICancelOperationRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|undefined, {}|undefined - ]>; - cancelOperation( - request: protos.google.container.v1.ICancelOperationRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): void; - cancelOperation( - request: protos.google.container.v1.ICancelOperationRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): void; - cancelOperation( - request?: protos.google.container.v1.ICancelOperationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICancelOperationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'operation_id': request.operationId ?? '', - }); - this.initialize(); - return this.innerApiCalls.cancelOperation(request, options, callback); - } -/** - * Returns configuration info about the Google Kubernetes Engine service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for. This field has been deprecated and replaced by the name - * field. - * @param {string} request.name - * The name (project and location) of the server config to get, - * specified in the format `projects/* /locations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.ServerConfig|ServerConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.get_server_config.js - * region_tag:container_v1_generated_ClusterManager_GetServerConfig_async - */ - getServerConfig( - request?: protos.google.container.v1.IGetServerConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|undefined, {}|undefined - ]>; - getServerConfig( - request: protos.google.container.v1.IGetServerConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getServerConfig( - request: protos.google.container.v1.IGetServerConfigRequest, - callback: Callback< - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getServerConfig( - request?: protos.google.container.v1.IGetServerConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IServerConfig, - protos.google.container.v1.IGetServerConfigRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.getServerConfig(request, options, callback); - } -/** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The cluster (project, location, cluster name) to get keys for. Specified in - * the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.GetJSONWebKeysResponse|GetJSONWebKeysResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js - * region_tag:container_v1_generated_ClusterManager_GetJSONWebKeys_async - */ - getJSONWebKeys( - request?: protos.google.container.v1.IGetJSONWebKeysRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|undefined, {}|undefined - ]>; - getJSONWebKeys( - request: protos.google.container.v1.IGetJSONWebKeysRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): void; - getJSONWebKeys( - request: protos.google.container.v1.IGetJSONWebKeysRequest, - callback: Callback< - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): void; - getJSONWebKeys( - request?: protos.google.container.v1.IGetJSONWebKeysRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IGetJSONWebKeysResponse, - protos.google.container.v1.IGetJSONWebKeysRequest|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.getJsonWebKeys(request, options, callback); - } -/** - * Lists the node pools for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the parent field. - * @param {string} request.parent - * The parent (project, location, cluster name) where the node pools will be - * listed. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.ListNodePoolsResponse|ListNodePoolsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.list_node_pools.js - * region_tag:container_v1_generated_ClusterManager_ListNodePools_async - */ - listNodePools( - request?: protos.google.container.v1.IListNodePoolsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|undefined, {}|undefined - ]>; - listNodePools( - request: protos.google.container.v1.IListNodePoolsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): void; - listNodePools( - request: protos.google.container.v1.IListNodePoolsRequest, - callback: Callback< - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): void; - listNodePools( - request?: protos.google.container.v1.IListNodePoolsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IListNodePoolsResponse, - protos.google.container.v1.IListNodePoolsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.listNodePools(request, options, callback); - } -/** - * Retrieves the requested node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * get. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.NodePool|NodePool}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.get_node_pool.js - * region_tag:container_v1_generated_ClusterManager_GetNodePool_async - */ - getNodePool( - request?: protos.google.container.v1.IGetNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|undefined, {}|undefined - ]>; - getNodePool( - request: protos.google.container.v1.IGetNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getNodePool( - request: protos.google.container.v1.IGetNodePoolRequest, - callback: Callback< - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getNodePool( - request?: protos.google.container.v1.IGetNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.INodePool, - protos.google.container.v1.IGetNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getNodePool(request, options, callback); - } -/** - * Creates a node pool for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the parent field. - * @param {google.container.v1.NodePool} request.nodePool - * Required. The node pool to create. - * @param {string} request.parent - * The parent (project, location, cluster name) where the node pool will be - * created. Specified in the format - * `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.create_node_pool.js - * region_tag:container_v1_generated_ClusterManager_CreateNodePool_async - */ - createNodePool( - request?: protos.google.container.v1.ICreateNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|undefined, {}|undefined - ]>; - createNodePool( - request: protos.google.container.v1.ICreateNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - createNodePool( - request: protos.google.container.v1.ICreateNodePoolRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - createNodePool( - request?: protos.google.container.v1.ICreateNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICreateNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.createNodePool(request, options, callback); - } -/** - * Deletes a node pool from a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to delete. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * delete. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.delete_node_pool.js - * region_tag:container_v1_generated_ClusterManager_DeleteNodePool_async - */ - deleteNodePool( - request?: protos.google.container.v1.IDeleteNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|undefined, {}|undefined - ]>; - deleteNodePool( - request: protos.google.container.v1.IDeleteNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): void; - deleteNodePool( - request: protos.google.container.v1.IDeleteNodePoolRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): void; - deleteNodePool( - request?: protos.google.container.v1.IDeleteNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IDeleteNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteNodePool(request, options, callback); - } -/** - * CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - * complete. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * complete upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js - * region_tag:container_v1_generated_ClusterManager_CompleteNodePoolUpgrade_async - */ - completeNodePoolUpgrade( - request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|undefined, {}|undefined - ]>; - completeNodePoolUpgrade( - request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - completeNodePoolUpgrade( - request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - completeNodePoolUpgrade( - request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1.ICompleteNodePoolUpgradeRequest|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.completeNodePoolUpgrade(request, options, callback); - } -/** - * Rolls back a previously Aborted or Failed NodePool upgrade. - * This makes no changes if the last upgrade successfully completed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to rollback. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to rollback. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node poll to - * rollback upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {boolean} request.respectPdb - * Option for rollback to ignore the PodDisruptionBudget. - * Default value is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js - * region_tag:container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_async - */ - rollbackNodePoolUpgrade( - request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|undefined, {}|undefined - ]>; - rollbackNodePoolUpgrade( - request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - rollbackNodePoolUpgrade( - request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - rollbackNodePoolUpgrade( - request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IRollbackNodePoolUpgradeRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.rollbackNodePoolUpgrade(request, options, callback); - } -/** - * Sets the NodeManagement options for a node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to update. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.NodeManagement} request.management - * Required. NodeManagement configuration for the node pool. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to set - * management properties. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_node_pool_management.js - * region_tag:container_v1_generated_ClusterManager_SetNodePoolManagement_async - */ - setNodePoolManagement( - request?: protos.google.container.v1.ISetNodePoolManagementRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|undefined, {}|undefined - ]>; - setNodePoolManagement( - request: protos.google.container.v1.ISetNodePoolManagementRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolManagement( - request: protos.google.container.v1.ISetNodePoolManagementRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolManagement( - request?: protos.google.container.v1.ISetNodePoolManagementRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolManagementRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolManagement(request, options, callback); - } -/** - * Sets labels on a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {number[]} request.resourceLabels - * Required. The labels to set for that cluster. - * @param {string} request.labelFingerprint - * Required. The fingerprint of the previous set of labels for this resource, - * used to detect conflicts. The fingerprint is initially generated by - * Kubernetes Engine and changes after every request to modify or update - * labels. You must always provide an up-to-date fingerprint hash when - * updating or changing labels. Make a `get()` request to the - * resource to get the latest fingerprint. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set labels. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_labels.js - * region_tag:container_v1_generated_ClusterManager_SetLabels_async - */ - setLabels( - request?: protos.google.container.v1.ISetLabelsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|undefined, {}|undefined - ]>; - setLabels( - request: protos.google.container.v1.ISetLabelsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): void; - setLabels( - request: protos.google.container.v1.ISetLabelsRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): void; - setLabels( - request?: protos.google.container.v1.ISetLabelsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLabelsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLabels(request, options, callback); - } -/** - * Enables or disables the ABAC authorization mechanism on a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {boolean} request.enabled - * Required. Whether ABAC authorization will be enabled in the cluster. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set legacy - * abac. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_legacy_abac.js - * region_tag:container_v1_generated_ClusterManager_SetLegacyAbac_async - */ - setLegacyAbac( - request?: protos.google.container.v1.ISetLegacyAbacRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|undefined, {}|undefined - ]>; - setLegacyAbac( - request: protos.google.container.v1.ISetLegacyAbacRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): void; - setLegacyAbac( - request: protos.google.container.v1.ISetLegacyAbacRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): void; - setLegacyAbac( - request?: protos.google.container.v1.ISetLegacyAbacRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetLegacyAbacRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLegacyAbac(request, options, callback); - } -/** - * Starts master IP rotation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to start IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {boolean} request.rotateCredentials - * Whether to rotate credentials during IP rotation. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.start_i_p_rotation.js - * region_tag:container_v1_generated_ClusterManager_StartIPRotation_async - */ - startIPRotation( - request?: protos.google.container.v1.IStartIPRotationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|undefined, {}|undefined - ]>; - startIPRotation( - request: protos.google.container.v1.IStartIPRotationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): void; - startIPRotation( - request: protos.google.container.v1.IStartIPRotationRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): void; - startIPRotation( - request?: protos.google.container.v1.IStartIPRotationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.IStartIPRotationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.startIpRotation(request, options, callback); - } -/** - * Completes master IP rotation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to complete IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.complete_i_p_rotation.js - * region_tag:container_v1_generated_ClusterManager_CompleteIPRotation_async - */ - completeIPRotation( - request?: protos.google.container.v1.ICompleteIPRotationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|undefined, {}|undefined - ]>; - completeIPRotation( - request: protos.google.container.v1.ICompleteIPRotationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): void; - completeIPRotation( - request: protos.google.container.v1.ICompleteIPRotationRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): void; - completeIPRotation( - request?: protos.google.container.v1.ICompleteIPRotationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ICompleteIPRotationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.completeIpRotation(request, options, callback); - } -/** - * Sets the size for a specific node pool. The new size will be used for all - * replicas, including future replicas created by modifying - * {@link protos.google.container.v1.NodePool.locations|NodePool.locations}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Deprecated. The name of the node pool to update. - * This field has been deprecated and replaced by the name field. - * @param {number} request.nodeCount - * Required. The desired node count for the pool. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to set - * size. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_node_pool_size.js - * region_tag:container_v1_generated_ClusterManager_SetNodePoolSize_async - */ - setNodePoolSize( - request?: protos.google.container.v1.ISetNodePoolSizeRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|undefined, {}|undefined - ]>; - setNodePoolSize( - request: protos.google.container.v1.ISetNodePoolSizeRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolSize( - request: protos.google.container.v1.ISetNodePoolSizeRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolSize( - request?: protos.google.container.v1.ISetNodePoolSizeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNodePoolSizeRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolSize(request, options, callback); - } -/** - * Enables or disables Network Policy for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1.NetworkPolicy} request.networkPolicy - * Required. Configuration options for the NetworkPolicy feature. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set networking - * policy. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_network_policy.js - * region_tag:container_v1_generated_ClusterManager_SetNetworkPolicy_async - */ - setNetworkPolicy( - request?: protos.google.container.v1.ISetNetworkPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|undefined, {}|undefined - ]>; - setNetworkPolicy( - request: protos.google.container.v1.ISetNetworkPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): void; - setNetworkPolicy( - request: protos.google.container.v1.ISetNetworkPolicyRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): void; - setNetworkPolicy( - request?: protos.google.container.v1.ISetNetworkPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetNetworkPolicyRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNetworkPolicy(request, options, callback); - } -/** - * Sets the maintenance policy for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * @param {string} request.zone - * Required. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. - * @param {string} request.clusterId - * Required. The name of the cluster to update. - * @param {google.container.v1.MaintenancePolicy} request.maintenancePolicy - * Required. The maintenance policy to be set for the cluster. An empty field - * clears the existing maintenance policy. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set - * maintenance policy. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.set_maintenance_policy.js - * region_tag:container_v1_generated_ClusterManager_SetMaintenancePolicy_async - */ - setMaintenancePolicy( - request?: protos.google.container.v1.ISetMaintenancePolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|undefined, {}|undefined - ]>; - setMaintenancePolicy( - request: protos.google.container.v1.ISetMaintenancePolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): void; - setMaintenancePolicy( - request: protos.google.container.v1.ISetMaintenancePolicyRequest, - callback: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): void; - setMaintenancePolicy( - request?: protos.google.container.v1.ISetMaintenancePolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.IOperation, - protos.google.container.v1.ISetMaintenancePolicyRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMaintenancePolicy(request, options, callback); - } -/** - * Checks the cluster compatibility with Autopilot mode, and returns a list of - * compatibility issues. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1.CheckAutopilotCompatibilityResponse|CheckAutopilotCompatibilityResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.check_autopilot_compatibility.js - * region_tag:container_v1_generated_ClusterManager_CheckAutopilotCompatibility_async - */ - checkAutopilotCompatibility( - request?: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|undefined, {}|undefined - ]>; - checkAutopilotCompatibility( - request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkAutopilotCompatibility( - request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, - callback: Callback< - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkAutopilotCompatibility( - request?: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1.ICheckAutopilotCompatibilityRequest|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.checkAutopilotCompatibility(request, options, callback); - } - - /** - * Lists subnetworks that are usable for creating clusters in a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork}. - * 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 `listUsableSubnetworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listUsableSubnetworks( - request?: protos.google.container.v1.IListUsableSubnetworksRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1.IUsableSubnetwork[], - protos.google.container.v1.IListUsableSubnetworksRequest|null, - protos.google.container.v1.IListUsableSubnetworksResponse - ]>; - listUsableSubnetworks( - request: protos.google.container.v1.IListUsableSubnetworksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.container.v1.IListUsableSubnetworksRequest, - protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1.IUsableSubnetwork>): void; - listUsableSubnetworks( - request: protos.google.container.v1.IListUsableSubnetworksRequest, - callback: PaginationCallback< - protos.google.container.v1.IListUsableSubnetworksRequest, - protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1.IUsableSubnetwork>): void; - listUsableSubnetworks( - request?: protos.google.container.v1.IListUsableSubnetworksRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.container.v1.IListUsableSubnetworksRequest, - protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1.IUsableSubnetwork>, - callback?: PaginationCallback< - protos.google.container.v1.IListUsableSubnetworksRequest, - protos.google.container.v1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1.IUsableSubnetwork>): - Promise<[ - protos.google.container.v1.IUsableSubnetwork[], - protos.google.container.v1.IListUsableSubnetworksRequest|null, - protos.google.container.v1.IListUsableSubnetworksResponse - ]>|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.listUsableSubnetworks(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 - * The parent project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork} 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 `listUsableSubnetworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listUsableSubnetworksStream( - request?: protos.google.container.v1.IListUsableSubnetworksRequest, - 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['listUsableSubnetworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUsableSubnetworks.createStream( - this.innerApiCalls.listUsableSubnetworks as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUsableSubnetworks`, 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 - * The parent project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.container.v1.UsableSubnetwork|UsableSubnetwork}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cluster_manager.list_usable_subnetworks.js - * region_tag:container_v1_generated_ClusterManager_ListUsableSubnetworks_async - */ - listUsableSubnetworksAsync( - request?: protos.google.container.v1.IListUsableSubnetworksRequest, - 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['listUsableSubnetworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUsableSubnetworks.asyncIterate( - this.innerApiCalls['listUsableSubnetworks'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified caPool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} ca_pool - * @returns {string} Resource name string. - */ - caPoolPath(project:string,location:string,caPool:string) { - return this.pathTemplates.caPoolPathTemplate.render({ - project: project, - location: location, - ca_pool: caPool, - }); - } - - /** - * Parse the project from CaPool resource. - * - * @param {string} caPoolName - * A fully-qualified path representing CaPool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromCaPoolName(caPoolName: string) { - return this.pathTemplates.caPoolPathTemplate.match(caPoolName).project; - } - - /** - * Parse the location from CaPool resource. - * - * @param {string} caPoolName - * A fully-qualified path representing CaPool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCaPoolName(caPoolName: string) { - return this.pathTemplates.caPoolPathTemplate.match(caPoolName).location; - } - - /** - * Parse the ca_pool from CaPool resource. - * - * @param {string} caPoolName - * A fully-qualified path representing CaPool resource. - * @returns {string} A string representing the ca_pool. - */ - matchCaPoolFromCaPoolName(caPoolName: string) { - return this.pathTemplates.caPoolPathTemplate.match(caPoolName).ca_pool; - } - - /** - * Return a fully-qualified cryptoKeyVersion resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} key_ring - * @param {string} crypto_key - * @param {string} crypto_key_version - * @returns {string} Resource name string. - */ - cryptoKeyVersionPath(project:string,location:string,keyRing:string,cryptoKey:string,cryptoKeyVersion:string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ - project: project, - location: location, - key_ring: keyRing, - crypto_key: cryptoKey, - crypto_key_version: cryptoKeyVersion, - }); - } - - /** - * Parse the project from CryptoKeyVersion resource. - * - * @param {string} cryptoKeyVersionName - * A fully-qualified path representing CryptoKeyVersion resource. - * @returns {string} A string representing the project. - */ - matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).project; - } - - /** - * Parse the location from CryptoKeyVersion resource. - * - * @param {string} cryptoKeyVersionName - * A fully-qualified path representing CryptoKeyVersion resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).location; - } - - /** - * Parse the key_ring from CryptoKeyVersion resource. - * - * @param {string} cryptoKeyVersionName - * A fully-qualified path representing CryptoKeyVersion resource. - * @returns {string} A string representing the key_ring. - */ - matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).key_ring; - } - - /** - * Parse the crypto_key from CryptoKeyVersion resource. - * - * @param {string} cryptoKeyVersionName - * A fully-qualified path representing CryptoKeyVersion resource. - * @returns {string} A string representing the crypto_key. - */ - matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).crypto_key; - } - - /** - * Parse the crypto_key_version from CryptoKeyVersion resource. - * - * @param {string} cryptoKeyVersionName - * A fully-qualified path representing CryptoKeyVersion resource. - * @returns {string} A string representing the crypto_key_version. - */ - matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { - return this.pathTemplates.cryptoKeyVersionPathTemplate.match(cryptoKeyVersionName).crypto_key_version; - } - - /** - * 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.clusterManagerStub && !this._terminated) { - return this.clusterManagerStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json deleted file mode 100644 index 33fb266b6bd..00000000000 --- a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_client_config.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "interfaces": { - "google.container.v1.ClusterManager": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListClusters": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetCluster": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateCluster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCluster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateNodePool": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolAutoscaling": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLoggingService": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMonitoringService": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetAddonsConfig": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLocations": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateMaster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMasterAuth": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteCluster": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListOperations": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetOperation": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CancelOperation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetServerConfig": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetJSONWebKeys": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListNodePools": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetNodePool": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateNodePool": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteNodePool": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CompleteNodePoolUpgrade": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RollbackNodePoolUpgrade": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolManagement": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLabels": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLegacyAbac": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StartIPRotation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CompleteIPRotation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolSize": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNetworkPolicy": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMaintenancePolicy": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUsableSubnetworks": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CheckAutopilotCompatibility": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json b/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json deleted file mode 100644 index aa69748e51b..00000000000 --- a/owl-bot-staging/google-container/v1/src/v1/cluster_manager_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/container/v1/cluster_service.proto" -] diff --git a/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json deleted file mode 100644 index c08b06ded09..00000000000 --- a/owl-bot-staging/google-container/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,367 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.container.v1", - "libraryPackage": "@google-cloud/container", - "services": { - "ClusterManager": { - "clients": { - "grpc": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateNodePool": { - "methods": [ - "updateNodePool" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "setNodePoolAutoscaling" - ] - }, - "SetLoggingService": { - "methods": [ - "setLoggingService" - ] - }, - "SetMonitoringService": { - "methods": [ - "setMonitoringService" - ] - }, - "SetAddonsConfig": { - "methods": [ - "setAddonsConfig" - ] - }, - "SetLocations": { - "methods": [ - "setLocations" - ] - }, - "UpdateMaster": { - "methods": [ - "updateMaster" - ] - }, - "SetMasterAuth": { - "methods": [ - "setMasterAuth" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "ListOperations": { - "methods": [ - "listOperations" - ] - }, - "GetOperation": { - "methods": [ - "getOperation" - ] - }, - "CancelOperation": { - "methods": [ - "cancelOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "getServerConfig" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "getJSONWebKeys" - ] - }, - "ListNodePools": { - "methods": [ - "listNodePools" - ] - }, - "GetNodePool": { - "methods": [ - "getNodePool" - ] - }, - "CreateNodePool": { - "methods": [ - "createNodePool" - ] - }, - "DeleteNodePool": { - "methods": [ - "deleteNodePool" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "completeNodePoolUpgrade" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "rollbackNodePoolUpgrade" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "setNodePoolManagement" - ] - }, - "SetLabels": { - "methods": [ - "setLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "setLegacyAbac" - ] - }, - "StartIPRotation": { - "methods": [ - "startIPRotation" - ] - }, - "CompleteIPRotation": { - "methods": [ - "completeIPRotation" - ] - }, - "SetNodePoolSize": { - "methods": [ - "setNodePoolSize" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "setNetworkPolicy" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "setMaintenancePolicy" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "checkAutopilotCompatibility" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "listUsableSubnetworks", - "listUsableSubnetworksStream", - "listUsableSubnetworksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateNodePool": { - "methods": [ - "updateNodePool" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "setNodePoolAutoscaling" - ] - }, - "SetLoggingService": { - "methods": [ - "setLoggingService" - ] - }, - "SetMonitoringService": { - "methods": [ - "setMonitoringService" - ] - }, - "SetAddonsConfig": { - "methods": [ - "setAddonsConfig" - ] - }, - "SetLocations": { - "methods": [ - "setLocations" - ] - }, - "UpdateMaster": { - "methods": [ - "updateMaster" - ] - }, - "SetMasterAuth": { - "methods": [ - "setMasterAuth" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "ListOperations": { - "methods": [ - "listOperations" - ] - }, - "GetOperation": { - "methods": [ - "getOperation" - ] - }, - "CancelOperation": { - "methods": [ - "cancelOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "getServerConfig" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "getJSONWebKeys" - ] - }, - "ListNodePools": { - "methods": [ - "listNodePools" - ] - }, - "GetNodePool": { - "methods": [ - "getNodePool" - ] - }, - "CreateNodePool": { - "methods": [ - "createNodePool" - ] - }, - "DeleteNodePool": { - "methods": [ - "deleteNodePool" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "completeNodePoolUpgrade" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "rollbackNodePoolUpgrade" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "setNodePoolManagement" - ] - }, - "SetLabels": { - "methods": [ - "setLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "setLegacyAbac" - ] - }, - "StartIPRotation": { - "methods": [ - "startIPRotation" - ] - }, - "CompleteIPRotation": { - "methods": [ - "completeIPRotation" - ] - }, - "SetNodePoolSize": { - "methods": [ - "setNodePoolSize" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "setNetworkPolicy" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "setMaintenancePolicy" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "checkAutopilotCompatibility" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "listUsableSubnetworks", - "listUsableSubnetworksStream", - "listUsableSubnetworksAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-container/v1/src/v1/index.ts b/owl-bot-staging/google-container/v1/src/v1/index.ts deleted file mode 100644 index aa5679ebbc4..00000000000 --- a/owl-bot-staging/google-container/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {ClusterManagerClient} from './cluster_manager_client'; diff --git a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index b200c9d2b4f..00000000000 --- a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 container = require('@google-cloud/container'); - -function main() { - const clusterManagerClient = new container.ClusterManagerClient(); -} - -main(); diff --git a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index e4bc67faf05..00000000000 --- a/owl-bot-staging/google-container/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {ClusterManagerClient} from '@google-cloud/container'; - -// check that the client class type name can be used -function doStuffWithClusterManagerClient(client: ClusterManagerClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const clusterManagerClient = new ClusterManagerClient(); - doStuffWithClusterManagerClient(clusterManagerClient); -} - -main(); diff --git a/owl-bot-staging/google-container/v1/system-test/install.ts b/owl-bot-staging/google-container/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-container/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1/test/gapic_cluster_manager_v1.ts b/owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts deleted file mode 100644 index bc51fc375f7..00000000000 --- a/owl-bot-staging/google-container/v1/test/gapic_cluster_manager_v1.ts +++ /dev/null @@ -1,5305 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 clustermanagerModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.ClusterManagerClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'container.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = clustermanagerModule.v1.ClusterManagerClient.servicePath; - assert.strictEqual(servicePath, 'container.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = clustermanagerModule.v1.ClusterManagerClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'container.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new clustermanagerModule.v1.ClusterManagerClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new clustermanagerModule.v1.ClusterManagerClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new clustermanagerModule.v1.ClusterManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = clustermanagerModule.v1.ClusterManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.clusterManagerStub, undefined); - await client.initialize(); - assert(client.clusterManagerStub); - }); - - it('has close method for the initialized client', done => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.clusterManagerStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.clusterManagerStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new clustermanagerModule.v1.ClusterManagerClient({ - 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 clustermanagerModule.v1.ClusterManagerClient({ - 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('listClusters', () => { - it('invokes listClusters without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListClustersResponse() - ); - client.innerApiCalls.listClusters = stubSimpleCall(expectedResponse); - const [response] = await client.listClusters(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListClustersResponse() - ); - client.innerApiCalls.listClusters = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listClusters( - request, - (err?: Error|null, result?: protos.google.container.v1.IListClustersResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listClusters = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listClusters(request), expectedError); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listClusters(request), expectedError); - }); - }); - - describe('getCluster', () => { - it('invokes getCluster without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Cluster() - ); - client.innerApiCalls.getCluster = stubSimpleCall(expectedResponse); - const [response] = await client.getCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Cluster() - ); - client.innerApiCalls.getCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getCluster( - request, - (err?: Error|null, result?: protos.google.container.v1.ICluster|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getCluster(request), expectedError); - }); - }); - - describe('createCluster', () => { - it('invokes createCluster without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.createCluster = stubSimpleCall(expectedResponse); - const [response] = await client.createCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.createCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createCluster( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createCluster(request), expectedError); - }); - }); - - describe('updateCluster', () => { - it('invokes updateCluster without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateCluster = stubSimpleCall(expectedResponse); - const [response] = await client.updateCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateCluster( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateCluster(request), expectedError); - }); - }); - - describe('updateNodePool', () => { - it('invokes updateNodePool without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.updateNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateNodePool(request), expectedError); - }); - }); - - describe('setNodePoolAutoscaling', () => { - it('invokes setNodePoolAutoscaling without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolAutoscaling(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolAutoscaling( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); - }); - }); - - describe('setLoggingService', () => { - it('invokes setLoggingService without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLoggingService = stubSimpleCall(expectedResponse); - const [response] = await client.setLoggingService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLoggingService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLoggingService( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLoggingService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLoggingService(request), expectedError); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLoggingService(request), expectedError); - }); - }); - - describe('setMonitoringService', () => { - it('invokes setMonitoringService without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMonitoringService = stubSimpleCall(expectedResponse); - const [response] = await client.setMonitoringService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMonitoringService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMonitoringService( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMonitoringService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMonitoringService(request), expectedError); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMonitoringService(request), expectedError); - }); - }); - - describe('setAddonsConfig', () => { - it('invokes setAddonsConfig without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setAddonsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.setAddonsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setAddonsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setAddonsConfig( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setAddonsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setAddonsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setAddonsConfig(request), expectedError); - }); - }); - - describe('setLocations', () => { - it('invokes setLocations without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLocations = stubSimpleCall(expectedResponse); - const [response] = await client.setLocations(request); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLocations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLocations( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLocations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLocations(request), expectedError); - assert(stub.calledOnce); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLocations(request), expectedError); - assert(stub.calledOnce); - }); - }); - - describe('updateMaster', () => { - it('invokes updateMaster without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateMaster = stubSimpleCall(expectedResponse); - const [response] = await client.updateMaster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.updateMaster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateMaster( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateMaster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateMaster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateMaster(request), expectedError); - }); - }); - - describe('setMasterAuth', () => { - it('invokes setMasterAuth without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMasterAuth = stubSimpleCall(expectedResponse); - const [response] = await client.setMasterAuth(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMasterAuth = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMasterAuth( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMasterAuth = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMasterAuth(request), expectedError); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMasterAuth(request), expectedError); - }); - }); - - describe('deleteCluster', () => { - it('invokes deleteCluster without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.deleteCluster = stubSimpleCall(expectedResponse); - const [response] = await client.deleteCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.deleteCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteCluster( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteCluster(request), expectedError); - }); - }); - - describe('listOperations', () => { - it('invokes listOperations without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListOperationsResponse() - ); - client.innerApiCalls.listOperations = stubSimpleCall(expectedResponse); - const [response] = await client.listOperations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListOperationsResponse() - ); - client.innerApiCalls.listOperations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listOperations( - request, - (err?: Error|null, result?: protos.google.container.v1.IListOperationsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listOperations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listOperations(request), expectedError); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listOperations(request), expectedError); - }); - }); - - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.getOperation = stubSimpleCall(expectedResponse); - const [response] = await client.getOperation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.getOperation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getOperation( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getOperation(request), expectedError); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getOperation(request), expectedError); - }); - }); - - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelOperation = stubSimpleCall(expectedResponse); - const [response] = await client.cancelOperation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelOperation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelOperation( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelOperation(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelOperation(request), expectedError); - }); - }); - - describe('getServerConfig', () => { - it('invokes getServerConfig without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ServerConfig() - ); - client.innerApiCalls.getServerConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getServerConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ServerConfig() - ); - client.innerApiCalls.getServerConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getServerConfig( - request, - (err?: Error|null, result?: protos.google.container.v1.IServerConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getServerConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getServerConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getServerConfig(request), expectedError); - }); - }); - - describe('getJSONWebKeys', () => { - it('invokes getJSONWebKeys without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysResponse() - ); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); - const [response] = await client.getJSONWebKeys(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysResponse() - ); - client.innerApiCalls.getJsonWebKeys = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJSONWebKeys( - request, - (err?: Error|null, result?: protos.google.container.v1.IGetJSONWebKeysResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getJSONWebKeys(request), expectedError); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getJSONWebKeys(request), expectedError); - }); - }); - - describe('listNodePools', () => { - it('invokes listNodePools without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsResponse() - ); - client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); - const [response] = await client.listNodePools(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsResponse() - ); - client.innerApiCalls.listNodePools = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listNodePools( - request, - (err?: Error|null, result?: protos.google.container.v1.IListNodePoolsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listNodePools = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listNodePools(request), expectedError); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listNodePools(request), expectedError); - }); - }); - - describe('getNodePool', () => { - it('invokes getNodePool without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.NodePool() - ); - client.innerApiCalls.getNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.getNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.NodePool() - ); - client.innerApiCalls.getNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1.INodePool|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getNodePool(request), expectedError); - }); - }); - - describe('createNodePool', () => { - it('invokes createNodePool without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.createNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.createNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.createNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createNodePool(request), expectedError); - }); - }); - - describe('deleteNodePool', () => { - it('invokes deleteNodePool without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.deleteNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.deleteNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.deleteNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteNodePool(request), expectedError); - }); - }); - - describe('completeNodePoolUpgrade', () => { - it('invokes completeNodePoolUpgrade without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(expectedResponse); - const [response] = await client.completeNodePoolUpgrade(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.completeNodePoolUpgrade( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); - }); - }); - - describe('rollbackNodePoolUpgrade', () => { - it('invokes rollbackNodePoolUpgrade without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(expectedResponse); - const [response] = await client.rollbackNodePoolUpgrade(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rollbackNodePoolUpgrade( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); - }); - }); - - describe('setNodePoolManagement', () => { - it('invokes setNodePoolManagement without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolManagement = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolManagement(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolManagement = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolManagement( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolManagement = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolManagement(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolManagement(request), expectedError); - }); - }); - - describe('setLabels', () => { - it('invokes setLabels without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLabels = stubSimpleCall(expectedResponse); - const [response] = await client.setLabels(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLabels = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLabels( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLabels = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLabels(request), expectedError); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLabels(request), expectedError); - }); - }); - - describe('setLegacyAbac', () => { - it('invokes setLegacyAbac without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLegacyAbac = stubSimpleCall(expectedResponse); - const [response] = await client.setLegacyAbac(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setLegacyAbac = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLegacyAbac( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLegacyAbac = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLegacyAbac(request), expectedError); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLegacyAbac(request), expectedError); - }); - }); - - describe('startIPRotation', () => { - it('invokes startIPRotation without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.startIpRotation = stubSimpleCall(expectedResponse); - const [response] = await client.startIPRotation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.startIpRotation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startIPRotation( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.startIpRotation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.startIPRotation(request), expectedError); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.startIPRotation(request), expectedError); - }); - }); - - describe('completeIPRotation', () => { - it('invokes completeIPRotation without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.completeIpRotation = stubSimpleCall(expectedResponse); - const [response] = await client.completeIPRotation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.completeIpRotation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.completeIPRotation( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.completeIpRotation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.completeIPRotation(request), expectedError); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.completeIPRotation(request), expectedError); - }); - }); - - describe('setNodePoolSize', () => { - it('invokes setNodePoolSize without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolSize = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolSize(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNodePoolSize = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolSize( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolSize = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolSize(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolSize(request), expectedError); - }); - }); - - describe('setNetworkPolicy', () => { - it('invokes setNetworkPolicy without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNetworkPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setNetworkPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setNetworkPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNetworkPolicy( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNetworkPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNetworkPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNetworkPolicy(request), expectedError); - }); - }); - - describe('setMaintenancePolicy', () => { - it('invokes setMaintenancePolicy without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setMaintenancePolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.Operation() - ); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMaintenancePolicy( - request, - (err?: Error|null, result?: protos.google.container.v1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMaintenancePolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMaintenancePolicy(request), expectedError); - }); - }); - - describe('checkAutopilotCompatibility', () => { - it('invokes checkAutopilotCompatibility without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityResponse() - ); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(expectedResponse); - const [response] = await client.checkAutopilotCompatibility(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityResponse() - ); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.checkAutopilotCompatibility( - request, - (err?: Error|null, result?: protos.google.container.v1.ICheckAutopilotCompatibilityResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility with closed client', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); - }); - }); - - describe('listUsableSubnetworks', () => { - it('invokes listUsableSubnetworks without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - ]; - client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(expectedResponse); - const [response] = await client.listUsableSubnetworks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworks without error using callback', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - ]; - client.innerApiCalls.listUsableSubnetworks = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUsableSubnetworks( - request, - (err?: Error|null, result?: protos.google.container.v1.IUsableSubnetwork[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworks with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUsableSubnetworks(request), expectedError); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworksStream without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - ]; - client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUsableSubnetworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.container.v1.UsableSubnetwork[] = []; - stream.on('data', (response: protos.google.container.v1.UsableSubnetwork) => { - 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.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); - assert( - (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUsableSubnetworksStream with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUsableSubnetworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.container.v1.UsableSubnetwork[] = []; - stream.on('data', (response: protos.google.container.v1.UsableSubnetwork) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); - assert( - (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUsableSubnetworks without error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1.UsableSubnetwork()), - ]; - client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.container.v1.IUsableSubnetwork[] = []; - const iterable = client.listUsableSubnetworksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUsableSubnetworks with error', async () => { - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUsableSubnetworksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.container.v1.IUsableSubnetwork[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('caPool', () => { - const fakePath = "/rendered/path/caPool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - ca_pool: "caPoolValue", - }; - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.caPoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.caPoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('caPoolPath', () => { - const result = client.caPoolPath("projectValue", "locationValue", "caPoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.caPoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromCaPoolName', () => { - const result = client.matchProjectFromCaPoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCaPoolName', () => { - const result = client.matchLocationFromCaPoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCaPoolFromCaPoolName', () => { - const result = client.matchCaPoolFromCaPoolName(fakePath); - assert.strictEqual(result, "caPoolValue"); - assert((client.pathTemplates.caPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cryptoKeyVersion', () => { - const fakePath = "/rendered/path/cryptoKeyVersion"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - key_ring: "keyRingValue", - crypto_key: "cryptoKeyValue", - crypto_key_version: "cryptoKeyVersionValue", - }; - const client = new clustermanagerModule.v1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.cryptoKeyVersionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cryptoKeyVersionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cryptoKeyVersionPath', () => { - const result = client.cryptoKeyVersionPath("projectValue", "locationValue", "keyRingValue", "cryptoKeyValue", "cryptoKeyVersionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromCryptoKeyVersionName', () => { - const result = client.matchProjectFromCryptoKeyVersionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCryptoKeyVersionName', () => { - const result = client.matchLocationFromCryptoKeyVersionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchKeyRingFromCryptoKeyVersionName', () => { - const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); - assert.strictEqual(result, "keyRingValue"); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCryptoKeyFromCryptoKeyVersionName', () => { - const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); - assert.strictEqual(result, "cryptoKeyValue"); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { - const result = client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); - assert.strictEqual(result, "cryptoKeyVersionValue"); - assert((client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-container/v1/tsconfig.json b/owl-bot-staging/google-container/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-container/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-container/v1/webpack.config.js b/owl-bot-staging/google-container/v1/webpack.config.js deleted file mode 100644 index 9032271af9d..00000000000 --- a/owl-bot-staging/google-container/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: 'ClusterManager', - filename: './cluster-manager.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/owl-bot-staging/google-container/v1beta1/.eslintignore b/owl-bot-staging/google-container/v1beta1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-container/v1beta1/.eslintrc.json b/owl-bot-staging/google-container/v1beta1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-container/v1beta1/.gitignore b/owl-bot-staging/google-container/v1beta1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.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-container/v1beta1/.jsdoc.js b/owl-bot-staging/google-container/v1beta1/.jsdoc.js deleted file mode 100644 index afb61595735..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/container', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-container/v1beta1/.mocharc.js b/owl-bot-staging/google-container/v1beta1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1beta1/.prettierrc.js b/owl-bot-staging/google-container/v1beta1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-container/v1beta1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1beta1/README.md b/owl-bot-staging/google-container/v1beta1/README.md deleted file mode 100644 index f32441d7e6b..00000000000 --- a/owl-bot-staging/google-container/v1beta1/README.md +++ /dev/null @@ -1 +0,0 @@ -Container: Nodejs Client diff --git a/owl-bot-staging/google-container/v1beta1/package.json b/owl-bot-staging/google-container/v1beta1/package.json deleted file mode 100644 index 6b69752dd23..00000000000 --- a/owl-bot-staging/google-container/v1beta1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/container", - "version": "0.1.0", - "description": "Container client for Node.js", - "repository": "googleapis/nodejs-container", - "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 container", - "container", - "cluster manager" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto b/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto deleted file mode 100644 index 5db56b0c13c..00000000000 --- a/owl-bot-staging/google-container/v1beta1/protos/google/container/v1beta1/cluster_service.proto +++ /dev/null @@ -1,6275 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.container.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/code.proto"; -import "google/rpc/status.proto"; -import "google/type/date.proto"; - -option csharp_namespace = "Google.Cloud.Container.V1Beta1"; -option go_package = "cloud.google.com/go/container/apiv1beta1/containerpb;containerpb"; -option java_multiple_files = true; -option java_outer_classname = "ClusterServiceProto"; -option java_package = "com.google.container.v1beta1"; -option php_namespace = "Google\\Cloud\\Container\\V1beta1"; -option ruby_package = "Google::Cloud::Container::V1beta1"; -option (google.api.resource_definition) = { - type: "pubsub.googleapis.com/Topic" - pattern: "projects/{project}/topics/{topic}" -}; - -// Google Kubernetes Engine Cluster Manager v1beta1 -service ClusterManager { - option (google.api.default_host) = "container.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all clusters owned by a project in either the specified zone or all - // zones. - rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/clusters" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" - } - }; - option (google.api.method_signature) = "project_id,zone"; - } - - // Gets the details for a specific cluster. - rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/clusters/*}" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - } - - // Creates a cluster, consisting of the specified number and type of Google - // Compute Engine instances. - // - // By default, the cluster is created in the project's - // [default - // network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - // - // One firewall is added for the cluster. After cluster creation, - // the Kubelet creates routes for each node to allow the containers - // on that node to communicate with all other instances in the - // cluster. - // - // Finally, an entry is added to the project's global metadata indicating - // which CIDR range the cluster is using. - rpc CreateCluster(CreateClusterRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/clusters" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster"; - } - - // Updates the settings for a specific cluster. - rpc UpdateCluster(UpdateClusterRequest) returns (Operation) { - option (google.api.http) = { - put: "/v1beta1/{name=projects/*/locations/*/clusters/*}" - body: "*" - additional_bindings { - put: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id,update"; - } - - // Updates the version and/or image type of a specific node pool. - rpc UpdateNodePool(UpdateNodePoolRequest) returns (Operation) { - option (google.api.http) = { - put: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update" - body: "*" - } - }; - } - - // Sets the autoscaling settings of a specific node pool. - rpc SetNodePoolAutoscaling(SetNodePoolAutoscalingRequest) - returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling" - body: "*" - } - }; - } - - // Sets the logging service for a specific cluster. - rpc SetLoggingService(SetLoggingServiceRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,logging_service"; - } - - // Sets the monitoring service for a specific cluster. - rpc SetMonitoringService(SetMonitoringServiceRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,monitoring_service"; - } - - // Sets the addons for a specific cluster. - rpc SetAddonsConfig(SetAddonsConfigRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,addons_config"; - } - - // Sets the locations for a specific cluster. - // Deprecated. Use - // [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) - // instead. - rpc SetLocations(SetLocationsRequest) returns (Operation) { - option deprecated = true; - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,locations"; - } - - // Updates the master for a specific cluster. - rpc UpdateMaster(UpdateMasterRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,master_version"; - } - - // Sets master auth materials. Currently supports changing the admin password - // or a specific cluster, either via password generation or explicitly setting - // the password. - rpc SetMasterAuth(SetMasterAuthRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth" - body: "*" - } - }; - } - - // Deletes the cluster, including the Kubernetes endpoint and all worker - // nodes. - // - // Firewalls and routes that were configured during cluster creation - // are also deleted. - // - // Other Google Compute Engine resources that might be in use by the cluster, - // such as load balancer resources, are not deleted if they weren't present - // when the cluster was initially created. - rpc DeleteCluster(DeleteClusterRequest) returns (Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" - additional_bindings { - delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - } - - // Lists all operations in a project in the specified zone or all zones. - rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/operations" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/operations" - } - }; - option (google.api.method_signature) = "project_id,zone"; - } - - // Gets the specified operation. - rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/operations/*}" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" - } - }; - option (google.api.method_signature) = "project_id,zone,operation_id"; - } - - // Cancels the specified operation. - rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,operation_id"; - } - - // Returns configuration info about the Google Kubernetes Engine service. - rpc GetServerConfig(GetServerConfigRequest) returns (ServerConfig) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*}/serverConfig" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" - } - }; - option (google.api.method_signature) = "project_id,zone"; - } - - // Gets the public component of the cluster signing keys in - // JSON Web Key format. - rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - }; - } - - // Lists the node pools for a cluster. - rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - } - - // Retrieves the requested node pool. - rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - additional_bindings { - get: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - } - - // Creates a node pool for a cluster. - rpc CreateNodePool(CreateNodePoolRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool"; - } - - // Deletes a node pool from a cluster. - rpc DeleteNodePool(DeleteNodePoolRequest) returns (Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}" - additional_bindings { - delete: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - } - - // CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - // complete. - rpc CompleteNodePoolUpgrade(CompleteNodePoolUpgradeRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade" - body: "*" - }; - } - - // Rolls back a previously Aborted or Failed NodePool upgrade. - // This makes no changes if the last upgrade successfully completed. - rpc RollbackNodePoolUpgrade(RollbackNodePoolUpgradeRequest) - returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id"; - } - - // Sets the NodeManagement options for a node pool. - rpc SetNodePoolManagement(SetNodePoolManagementRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,node_pool_id,management"; - } - - // Sets labels on a cluster. - rpc SetLabels(SetLabelsRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,resource_labels,label_fingerprint"; - } - - // Enables or disables the ABAC authorization mechanism on a cluster. - rpc SetLegacyAbac(SetLegacyAbacRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id,enabled"; - } - - // Starts master IP rotation. - rpc StartIPRotation(StartIPRotationRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - } - - // Completes master IP rotation. - rpc CompleteIPRotation(CompleteIPRotationRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation" - body: "*" - } - }; - option (google.api.method_signature) = "project_id,zone,cluster_id"; - } - - // SetNodePoolSizeRequest sets the size of a node pool. The new size will be - // used for all replicas, including future replicas created by modifying - // [NodePool.locations][google.container.v1beta1.NodePool.locations]. - rpc SetNodePoolSize(SetNodePoolSizeRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize" - body: "*" - } - }; - } - - // Enables or disables Network Policy for a cluster. - rpc SetNetworkPolicy(SetNetworkPolicyRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,network_policy"; - } - - // Sets the maintenance policy for a cluster. - rpc SetMaintenancePolicy(SetMaintenancePolicyRequest) returns (Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy" - body: "*" - additional_bindings { - post: "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy" - body: "*" - } - }; - option (google.api.method_signature) = - "project_id,zone,cluster_id,maintenance_policy"; - } - - // Lists subnetworks that can be used for creating clusters in a project. - rpc ListUsableSubnetworks(ListUsableSubnetworksRequest) - returns (ListUsableSubnetworksResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" - }; - option (google.api.method_signature) = "parent"; - } - - // Checks the cluster compatibility with Autopilot mode, and returns a list of - // compatibility issues. - rpc CheckAutopilotCompatibility(CheckAutopilotCompatibilityRequest) - returns (CheckAutopilotCompatibilityResponse) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - }; - } - - // Fetches locations that offer Google Kubernetes Engine. - rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*}/locations" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Parameters that can be configured on Linux nodes. -message LinuxNodeConfig { - // Possible cgroup modes that can be used. - enum CgroupMode { - // CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. - // The default for the GKE node OS image will be used. - CGROUP_MODE_UNSPECIFIED = 0; - - // CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on - // the node image. - CGROUP_MODE_V1 = 1; - - // CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on - // the node image. - CGROUP_MODE_V2 = 2; - } - - // Hugepages amount in both 2m and 1g size - message HugepagesConfig { - // Optional. Amount of 2M hugepages - optional int32 hugepage_size2m = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Amount of 1G hugepages - optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The Linux kernel parameters to be applied to the nodes and all pods running - // on the nodes. - // - // The following parameters are supported. - // - // net.core.busy_poll - // net.core.busy_read - // net.core.netdev_max_backlog - // net.core.rmem_max - // net.core.wmem_default - // net.core.wmem_max - // net.core.optmem_max - // net.core.somaxconn - // net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem - // net.ipv4.tcp_tw_reuse - map sysctls = 1; - - // cgroup_mode specifies the cgroup mode to be used on the node. - CgroupMode cgroup_mode = 2; - - // Optional. Amounts for 2M and 1G hugepages - optional HugepagesConfig hugepages = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Parameters that can be configured on Windows nodes. -// Windows Node Config that define the parameters that will be used to -// configure the Windows node pool settings -message WindowsNodeConfig { - // Possible OS version that can be used. - enum OSVersion { - // When OSVersion is not specified - OS_VERSION_UNSPECIFIED = 0; - - // LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image - OS_VERSION_LTSC2019 = 1; - - // LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image - OS_VERSION_LTSC2022 = 2; - } - - // OSVersion specifies the Windows node config to be used on the node - OSVersion os_version = 1; -} - -// Node kubelet configs. -message NodeKubeletConfig { - // Control the CPU management policy on the node. - // See - // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - // - // The following values are allowed. - // * "none": the default, which represents the existing scheduling behavior. - // * "static": allows pods with certain resource characteristics to be granted - // increased CPU affinity and exclusivity on the node. - // The default value is 'none' if unspecified. - string cpu_manager_policy = 1; - - // Enable CPU CFS quota enforcement for containers that specify CPU limits. - // - // This option is enabled by default which makes kubelet use CFS quota - // (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - // enforce container CPU limits. Otherwise, CPU limits will not be enforced at - // all. - // - // Disable this option to mitigate CPU throttling problems while still having - // your pods to be in Guaranteed QoS class by specifying the CPU limits. - // - // The default value is 'true' if unspecified. - google.protobuf.BoolValue cpu_cfs_quota = 2; - - // Set the CPU CFS quota period value 'cpu.cfs_period_us'. - // - // The string must be a sequence of decimal numbers, each with optional - // fraction and a unit suffix, such as "300ms". - // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // The value must be a positive duration. - string cpu_cfs_quota_period = 3; - - // Set the Pod PID limits. See - // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - // - // Controls the maximum number of processes allowed to run in a pod. The value - // must be greater than or equal to 1024 and less than 4194304. - int64 pod_pids_limit = 4; - - // Enable or disable Kubelet read only port. - optional bool insecure_kubelet_readonly_port_enabled = 7; -} - -// Parameters that describe the nodes in a cluster. -// -// GKE Autopilot clusters do not -// recognize parameters in `NodeConfig`. Use -// [AutoprovisioningNodePoolDefaults][google.container.v1beta1.AutoprovisioningNodePoolDefaults] -// instead. -message NodeConfig { - // The name of a Google Compute Engine [machine - // type](https://cloud.google.com/compute/docs/machine-types). - // - // If unspecified, the default machine type is - // `e2-medium`. - string machine_type = 1; - - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - int32 disk_size_gb = 2; - - // The set of Google API scopes to be made available on all of the - // node VMs under the "default" service account. - // - // The following scopes are recommended, but not required, and by default are - // not included: - // - // * `https://www.googleapis.com/auth/compute` is required for mounting - // persistent storage on your nodes. - // * `https://www.googleapis.com/auth/devstorage.read_only` is required for - // communicating with **gcr.io** - // (the [Google Container - // Registry](https://cloud.google.com/container-registry/)). - // - // If unspecified, no scopes are added, unless Cloud Logging or Cloud - // Monitoring are enabled, in which case their required scopes will be added. - repeated string oauth_scopes = 3; - - // The Google Cloud Platform Service Account to be used by the node VMs. - // Specify the email address of the Service Account; otherwise, if no Service - // Account is specified, the "default" service account is used. - string service_account = 9; - - // The metadata key/value pairs assigned to instances in the cluster. - // - // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes - // in length. These are reflected as part of a URL in the metadata server. - // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the reserved keys: - // - // - "cluster-location" - // - "cluster-name" - // - "cluster-uid" - // - "configure-sh" - // - "containerd-configure-sh" - // - "enable-oslogin" - // - "gci-ensure-gke-docker" - // - "gci-metrics-enabled" - // - "gci-update-strategy" - // - "instance-template" - // - "kube-env" - // - "startup-script" - // - "user-data" - // - "disable-address-manager" - // - "windows-startup-script-ps1" - // - "common-psm1" - // - "k8s-node-setup-psm1" - // - "install-ssh-psm1" - // - "user-profile-psm1" - // - // Values are free-form strings, and only have meaning as interpreted by - // the image running in the instance. The only restriction placed on them is - // that each value's size must be less than or equal to 32 KB. - // - // The total size of all keys and values must be less than 512 KB. - map metadata = 4; - - // The image type to use for this node. Note that for a given image type, - // the latest version of it will be used. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 5; - - // The map of Kubernetes labels (key/value pairs) to be applied to each node. - // These will added in addition to any default label(s) that - // Kubernetes may apply to the node. - // In case of conflict in label keys, the applied set may differ depending on - // the Kubernetes version -- it's best to assume the behavior is undefined - // and conflicts should be avoided. - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - map labels = 6; - - // The number of local SSD disks to be attached to the node. - // - // The limit for this value is dependent upon the maximum number of - // disks available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - int32 local_ssd_count = 7; - - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster or node pool creation. Each tag within the list - // must comply with RFC1035. - repeated string tags = 8; - - // Whether the nodes are created as preemptible VM instances. See: - // https://cloud.google.com/compute/docs/instances/preemptible for more - // information about preemptible VM instances. - bool preemptible = 10; - - // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - repeated AcceleratorConfig accelerators = 11; - - // Sandbox configuration for this node. - SandboxConfig sandbox_config = 17; - - // Setting this field will assign instances of this - // pool to run on the specified node group. This is useful for running - // workloads on [sole tenant - // nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). - string node_group = 18; - - // The optional reservation affinity. Setting this field will apply - // the specified [Zonal Compute - // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - // to this node pool. - ReservationAffinity reservation_affinity = 19; - - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - string disk_type = 12; - - // Minimum CPU platform to be used by this instance. The instance may be - // scheduled on the specified or newer CPU platform. Applicable values are the - // friendly names of CPU platforms, such as - // `minCpuPlatform: "Intel Haswell"` or - // `minCpuPlatform: "Intel Sandy Bridge"`. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). - string min_cpu_platform = 13; - - // The workload metadata configuration for this node. - WorkloadMetadataConfig workload_metadata_config = 14; - - // List of kubernetes taints to be applied to each node. - // - // For more information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - repeated NodeTaint taints = 15; - - // - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - string boot_disk_kms_key = 23; - - // Shielded Instance options. - ShieldedInstanceConfig shielded_instance_config = 20; - - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig linux_node_config = 21; - - // Node kubelet configs. - NodeKubeletConfig kubelet_config = 22; - - // Parameters for the ephemeral storage filesystem. - // If unspecified, ephemeral storage is backed by the boot disk. - EphemeralStorageConfig ephemeral_storage_config = 24; - - // GCFS (Google Container File System) configs. - GcfsConfig gcfs_config = 25; - - // Advanced features for the Compute Engine VM. - AdvancedMachineFeatures advanced_machine_features = 26; - - // Enable or disable gvnic on the node pool. - VirtualNIC gvnic = 29; - - // Spot flag for enabling Spot VM, which is a rebrand of - // the existing preemptible flag. - bool spot = 32; - - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 35; - - // Enable or disable NCCL fast socket for the node pool. - optional FastSocket fast_socket = 36; - - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - map resource_labels = 37; - - // Logging configuration. - NodePoolLoggingConfig logging_config = 38; - - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig windows_node_config = 39; - - // Parameters for using raw-block Local NVMe SSDs. - LocalNvmeSsdBlockConfig local_nvme_ssd_block_config = 40; - - // Parameters for the node ephemeral storage using Local SSDs. - // If unspecified, ephemeral storage is backed by the boot disk. - // This field is functionally equivalent to the ephemeral_storage_config - EphemeralStorageLocalSsdConfig ephemeral_storage_local_ssd_config = 41; - - // Parameters for node pools to be backed by shared sole tenant node groups. - SoleTenantConfig sole_tenant_config = 42; - - // Parameters for containerd customization. - ContainerdConfig containerd_config = 43; - - // HostMaintenancePolicy contains the desired maintenance policy for the - // Google Compute Engine hosts. - HostMaintenancePolicy host_maintenance_policy = 44; - - // A map of resource manager tag keys and values to be attached to the nodes. - ResourceManagerTags resource_manager_tags = 45; - - // Optional. Reserved for future use. - bool enable_confidential_storage = 46 - [(google.api.field_behavior) = OPTIONAL]; - - // List of secondary boot disks attached to the nodes. - repeated SecondaryBootDisk secondary_boot_disks = 48; - - // Secondary boot disk update strategy. - optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = - 50; -} - -// Specifies options for controlling advanced machine features. -message AdvancedMachineFeatures { - // The number of threads per physical core. To disable simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number of threads - // supported per core by the underlying processor is assumed. - optional int64 threads_per_core = 1; - - // Whether or not to enable nested virtualization (defaults to false). - optional bool enable_nested_virtualization = 2; -} - -// Parameters for node pool-level network config. -message NodeNetworkConfig { - // Configuration of all network bandwidth tiers - message NetworkPerformanceConfig { - // Node network tier - enum Tier { - // Default value - TIER_UNSPECIFIED = 0; - - // Higher bandwidth, actual values based on VM size. - TIER_1 = 1; - } - - // Specifies the total network bandwidth tier for the NodePool. - optional Tier total_egress_bandwidth_tier = 1; - - // Specifies the network bandwidth tier for the NodePool for traffic to - // external/public IP addresses. - optional Tier external_ip_egress_bandwidth_tier = 2; - } - - // Input only. Whether to create a new range for pod IPs in this node pool. - // Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they - // are not specified. - // - // If neither `create_pod_range` or `pod_range` are specified, the - // cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is - // used. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - bool create_pod_range = 4 [(google.api.field_behavior) = INPUT_ONLY]; - - // The ID of the secondary range for pod IPs. - // If `create_pod_range` is true, this ID is used for the new range. - // If `create_pod_range` is false, uses an existing secondary range with this - // ID. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - string pod_range = 5; - - // The IP address range for pod IPs in this node pool. - // - // Only applicable if `create_pod_range` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) to pick a specific range to use. - // - // Only applicable if `ip_allocation_policy.use_ip_aliases` is true. - // - // This field cannot be changed after the node pool has been created. - string pod_ipv4_cidr_block = 6; - - // Whether nodes have internal IP addresses only. - // If enable_private_nodes is not specified, then the value is derived from - // [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] - optional bool enable_private_nodes = 9; - - // Network bandwidth tier configuration. - optional NetworkPerformanceConfig network_performance_config = 11; - - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the nodepool. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is rounded off to next power of 2 and we then double - // that to get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13; - - // We specify the additional node networks for this node pool using this list. - // Each node network corresponds to an additional interface - repeated AdditionalNodeNetworkConfig additional_node_network_configs = 14; - - // We specify the additional pod networks for this node pool using this list. - // Each pod network corresponds to an additional alias IP range for the node - repeated AdditionalPodNetworkConfig additional_pod_network_configs = 15; - - // Output only. The utilization of the IPv4 range for the pod. - // The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - double pod_ipv4_range_utilization = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// AdditionalNodeNetworkConfig is the configuration for additional node networks -// within the NodeNetworkConfig message -message AdditionalNodeNetworkConfig { - // Name of the VPC where the additional interface belongs - string network = 1; - - // Name of the subnetwork where the additional interface belongs - string subnetwork = 2; -} - -// AdditionalPodNetworkConfig is the configuration for additional pod networks -// within the NodeNetworkConfig message -message AdditionalPodNetworkConfig { - // Name of the subnetwork where the additional pod network belongs. - string subnetwork = 1; - - // The name of the secondary range on the subnet which provides IP address for - // this pod range. - string secondary_pod_range = 2; - - // The maximum number of pods per node which use this pod network. - optional MaxPodsConstraint max_pods_per_node = 3; -} - -// A set of Shielded Instance options. -message ShieldedInstanceConfig { - // Defines whether the instance has Secure Boot enabled. - // - // Secure Boot helps ensure that the system only runs authentic software by - // verifying the digital signature of all boot components, and halting the - // boot process if signature verification fails. - bool enable_secure_boot = 1; - - // Defines whether the instance has integrity monitoring enabled. - // - // Enables monitoring and attestation of the boot integrity of the instance. - // The attestation is performed against the integrity policy baseline. This - // baseline is initially derived from the implicitly trusted boot image when - // the instance is created. - bool enable_integrity_monitoring = 2; -} - -// SandboxConfig contains configurations of the sandbox to use for the node. -message SandboxConfig { - // Possible types of sandboxes. - enum Type { - // Default value. This should not be used. - UNSPECIFIED = 0; - - // Run sandbox using gvisor. - GVISOR = 1; - } - - // Type of the sandbox to use for the node (e.g. 'gvisor') - string sandbox_type = 1 [deprecated = true]; - - // Type of the sandbox to use for the node. - Type type = 2; -} - -// EphemeralStorageConfig contains configuration for the ephemeral storage -// filesystem. -message EphemeralStorageConfig { - // Number of local SSDs to use to back ephemeral storage. Uses NVMe - // interfaces. The limit for this value is dependent upon the maximum number - // of disk available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - int32 local_ssd_count = 1; -} - -// LocalNvmeSsdBlockConfig contains configuration for using raw-block local -// NVMe SSDs -message LocalNvmeSsdBlockConfig { - // Number of local NVMe SSDs to use. The limit for this value is dependent - // upon the maximum number of disk available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - int32 local_ssd_count = 1; -} - -// EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral -// storage using Local SSDs. -message EphemeralStorageLocalSsdConfig { - // Number of local SSDs to use to back ephemeral storage. Uses NVMe - // interfaces. - // - // A zero (or unset) value has different meanings depending on machine type - // being used: - // 1. For pre-Gen3 machines, which support flexible numbers of local ssds, - // zero (or unset) means to disable using local SSDs as ephemeral storage. The - // limit for this value is dependent upon the maximum number of disk - // available on a machine per zone. See: - // https://cloud.google.com/compute/docs/disks/local-ssd - // for more information. - // 2. For Gen3 machines which dictate a specific number of local ssds, zero - // (or unset) means to use the default number of local ssds that goes with - // that machine type. For example, for a c3-standard-8-lssd machine, 2 local - // ssds would be provisioned. For c3-standard-8 (which doesn't support local - // ssds), 0 will be provisioned. See - // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - // for more info. - int32 local_ssd_count = 1; -} - -// GcfsConfig contains configurations of Google Container File System. -message GcfsConfig { - // Whether to use GCFS. - bool enabled = 1; -} - -// [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) -// is the configuration of desired reservation which instances could take -// capacity from. -message ReservationAffinity { - // Indicates whether to consume capacity from a reservation or not. - enum Type { - // Default value. This should not be used. - UNSPECIFIED = 0; - - // Do not consume from any reserved capacity. - NO_RESERVATION = 1; - - // Consume any reservation available. - ANY_RESERVATION = 2; - - // Must consume from a specific reservation. Must specify key value fields - // for specifying the reservations. - SPECIFIC_RESERVATION = 3; - } - - // Corresponds to the type of reservation consumption. - Type consume_reservation_type = 1; - - // Corresponds to the label key of a reservation resource. To target a - // SPECIFIC_RESERVATION by name, specify - // "compute.googleapis.com/reservation-name" as the key and specify the name - // of your reservation as its value. - string key = 2; - - // Corresponds to the label value(s) of reservation resource(s). - repeated string values = 3; -} - -// SoleTenantConfig contains the NodeAffinities to specify what shared sole -// tenant node groups should back the node pool. -message SoleTenantConfig { - // Specifies the NodeAffinity key, values, and affinity operator according to - // [shared sole tenant node group - // affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). - message NodeAffinity { - // Operator allows user to specify affinity or anti-affinity for the - // given key values. - enum Operator { - // Invalid or unspecified affinity operator. - OPERATOR_UNSPECIFIED = 0; - - // Affinity operator. - IN = 1; - - // Anti-affinity operator. - NOT_IN = 2; - } - - // Key for NodeAffinity. - string key = 1; - - // Operator for NodeAffinity. - Operator operator = 2; - - // Values for NodeAffinity. - repeated string values = 3; - } - - // NodeAffinities used to match to a shared sole tenant node group. - repeated NodeAffinity node_affinities = 1; -} - -// ContainerdConfig contains configuration to customize containerd. -message ContainerdConfig { - // PrivateRegistryAccessConfig contains access configuration for - // private container registries. - message PrivateRegistryAccessConfig { - // CertificateAuthorityDomainConfig configures one or more fully qualified - // domain names (FQDN) to a specific certificate. - message CertificateAuthorityDomainConfig { - // GCPSecretManagerCertificateConfig configures a secret from - // [Google Secret Manager](https://cloud.google.com/secret-manager). - message GCPSecretManagerCertificateConfig { - // Secret URI, in the form - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". - // Version can be fixed (e.g. "2") or "latest" - string secret_uri = 1; - } - - // List of fully qualified domain names (FQDN). - // Specifying port is supported. - // Wilcards are NOT supported. - // Examples: - // - my.customdomain.com - // - 10.0.1.2:5000 - repeated string fqdns = 1; - - // Certificate access config. The following are supported: - // - GCPSecretManagerCertificateConfig - oneof certificate_config { - // Google Secret Manager (GCP) certificate configuration. - GCPSecretManagerCertificateConfig - gcp_secret_manager_certificate_config = 2; - } - } - - // Private registry access is enabled. - bool enabled = 1; - - // Private registry access configuration. - repeated CertificateAuthorityDomainConfig - certificate_authority_domain_config = 2; - } - - // PrivateRegistryAccessConfig is used to configure access configuration - // for private container registries. - PrivateRegistryAccessConfig private_registry_access_config = 1; -} - -// HostMaintenancePolicy contains the maintenance policy for the hosts on which -// the GKE VMs run on. -message HostMaintenancePolicy { - // Allows selecting how infrastructure upgrades should be applied to the - // cluster or node pool. - enum MaintenanceInterval { - // The maintenance interval is not explicitly specified. - MAINTENANCE_INTERVAL_UNSPECIFIED = 0; - - // Nodes are eligible to receive infrastructure and hypervisor updates as - // they become available. This may result in more maintenance operations - // (live migrations or terminations) for the node than the PERIODIC option. - AS_NEEDED = 1; - - // Nodes receive infrastructure and hypervisor updates on a periodic basis, - // minimizing the number of maintenance operations (live migrations or - // terminations) on an individual VM. This may mean underlying VMs will - // take longer to receive an update than if it was configured for - // AS_NEEDED. Security updates will still be applied as soon - // as they are available. - PERIODIC = 2; - } - - // Strategy that will trigger maintenance on behalf of the customer. - message OpportunisticMaintenanceStrategy { - // The amount of time that a node can remain idle (no customer owned - // workloads running), before triggering maintenance. - optional google.protobuf.Duration node_idle_time_window = 1; - - // The window of time that opportunistic maintenance can run. Example: A - // setting of 14 days implies that opportunistic maintenance can only be ran - // in the 2 weeks leading up to the scheduled maintenance date. Setting 28 - // days allows opportunistic maintenance to run at any time in the scheduled - // maintenance window (all `PERIODIC` maintenance is set 28 days in - // advance). - optional google.protobuf.Duration maintenance_availability_window = 2; - - // The minimum nodes required to be available in a pool. Blocks maintenance - // if it would cause the number of running nodes to dip below this value. - optional int64 min_nodes_per_pool = 3; - } - - // Specifies the frequency of planned maintenance events. - optional MaintenanceInterval maintenance_interval = 1; - - // Set of host maintenance strategies available to the customer, all require - // the maintenance_interval to be PERIODIC. If no strategy is set, and the - // interval is periodic, customer will be expected to trigger maintenance - // manually or let maintenance trigger at its initial scheduled time. - oneof maintenance_strategy { - // Strategy that will trigger maintenance on behalf of the customer. - OpportunisticMaintenanceStrategy opportunistic_maintenance_strategy = 2; - } -} - -// Kubernetes taint is composed of three fields: key, value, and effect. Effect -// can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. -// -// See -// [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) -// for more information, including usage and the valid values. -message NodeTaint { - // Possible values for Effect in taint. - enum Effect { - // Not set - EFFECT_UNSPECIFIED = 0; - - // NoSchedule - NO_SCHEDULE = 1; - - // PreferNoSchedule - PREFER_NO_SCHEDULE = 2; - - // NoExecute - NO_EXECUTE = 3; - } - - // Key for taint. - string key = 1; - - // Value for taint. - string value = 2; - - // Effect for taint. - Effect effect = 3; -} - -// Collection of Kubernetes [node -// taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). -message NodeTaints { - // List of node taints. - repeated NodeTaint taints = 1; -} - -// Collection of node-level [Kubernetes -// labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). -message NodeLabels { - // Map of node label keys and node label values. - map labels = 1; -} - -// Collection of [GCP -// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). -message ResourceLabels { - // Map of node label keys and node label values. - map labels = 1; -} - -// Collection of Compute Engine network tags that can be applied to a node's -// underlying VM instance. (See `tags` field in -// [`NodeConfig`](/kubernetes-engine/docs/reference/rest/v1/NodeConfig)). -message NetworkTags { - // List of network tags. - repeated string tags = 1; -} - -// The authentication information for accessing the master endpoint. -// Authentication can be done using HTTP basic auth or using client -// certificates. -message MasterAuth { - // The username to use for HTTP basic authentication to the master endpoint. - // For clusters v1.6.0 and later, basic authentication can be disabled by - // leaving username unspecified (or setting it to the empty string). - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - string username = 1 [deprecated = true]; - - // The password to use for HTTP basic authentication to the master endpoint. - // Because the master endpoint is open to the Internet, you should create a - // strong password. If a password is provided for cluster creation, username - // must be non-empty. - // - // Warning: basic authentication is deprecated, and will be removed in GKE - // control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - string password = 2 [deprecated = true]; - - // Configuration for client certificate authentication on the cluster. For - // clusters before v1.12, if no configuration is specified, a client - // certificate is issued. - ClientCertificateConfig client_certificate_config = 3; - - // Output only. Base64-encoded public certificate that is the root of - // trust for the cluster. - string cluster_ca_certificate = 100 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Base64-encoded public certificate used by clients to - // authenticate to the cluster endpoint. - string client_certificate = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Base64-encoded private key used by clients to authenticate - // to the cluster endpoint. - string client_key = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration for client certificates on the cluster. -message ClientCertificateConfig { - // Issue a client certificate. - bool issue_client_certificate = 1; -} - -// Configuration for the addons that can be automatically spun up in the -// cluster, enabling additional functionality. -message AddonsConfig { - // Configuration for the HTTP (L7) load balancing controller addon, which - // makes it easy to set up HTTP load balancers for services in a cluster. - HttpLoadBalancing http_load_balancing = 1; - - // Configuration for the horizontal pod autoscaling feature, which - // increases or decreases the number of replica pods a replication controller - // has based on the resource usage of the existing pods. - HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; - - // Configuration for the Kubernetes Dashboard. - // This addon is deprecated, and will be disabled in 1.15. It is recommended - // to use the Cloud Console to manage and monitor your Kubernetes clusters, - // workloads and applications. For more information, see: - // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards - KubernetesDashboard kubernetes_dashboard = 3 [deprecated = true]; - - // Configuration for NetworkPolicy. This only tracks whether the addon - // is enabled or not on the Master, it does not track whether network policy - // is enabled for the nodes. - NetworkPolicyConfig network_policy_config = 4; - - // Configuration for Istio, an open platform to connect, manage, and secure - // microservices. - IstioConfig istio_config = 5 [deprecated = true]; - - // Configuration for the Cloud Run addon. The `IstioConfig` addon must be - // enabled in order to enable Cloud Run addon. This option can only be enabled - // at cluster creation time. - CloudRunConfig cloud_run_config = 7; - - // Configuration for NodeLocalDNS, a dns cache running on cluster nodes - DnsCacheConfig dns_cache_config = 8; - - // Configuration for the ConfigConnector add-on, a Kubernetes - // extension to manage hosted GCP services through the Kubernetes API - ConfigConnectorConfig config_connector_config = 10; - - // Configuration for the Compute Engine Persistent Disk CSI driver. - GcePersistentDiskCsiDriverConfig gce_persistent_disk_csi_driver_config = 11; - - // Configuration for the KALM addon, which manages the lifecycle of k8s - // applications. - KalmConfig kalm_config = 12 [deprecated = true]; - - // Configuration for the GCP Filestore CSI driver. - GcpFilestoreCsiDriverConfig gcp_filestore_csi_driver_config = 14; - - // Configuration for the Backup for GKE agent addon. - GkeBackupAgentConfig gke_backup_agent_config = 16; - - // Configuration for the Cloud Storage Fuse CSI driver. - GcsFuseCsiDriverConfig gcs_fuse_csi_driver_config = 17; - - // Optional. Configuration for the StatefulHA add-on. - StatefulHAConfig stateful_ha_config = 18 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for Ray Operator addon. - RayOperatorConfig ray_operator_config = 21 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the HTTP (L7) load balancing controller addon, -// which makes it easy to set up HTTP load balancers for services in a cluster. -message HttpLoadBalancing { - // Whether the HTTP Load Balancing controller is enabled in the cluster. - // When enabled, it runs a small pod in the cluster that manages the load - // balancers. - bool disabled = 1; -} - -// Configuration options for the horizontal pod autoscaling feature, which -// increases or decreases the number of replica pods a replication controller -// has based on the resource usage of the existing pods. -message HorizontalPodAutoscaling { - // Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. - // When enabled, it ensures that metrics are collected into Stackdriver - // Monitoring. - bool disabled = 1; -} - -// Configuration for the Kubernetes Dashboard. -message KubernetesDashboard { - // Whether the Kubernetes Dashboard is enabled for this cluster. - bool disabled = 1; -} - -// Configuration for NetworkPolicy. This only tracks whether the addon -// is enabled or not on the Master, it does not track whether network policy -// is enabled for the nodes. -message NetworkPolicyConfig { - // Whether NetworkPolicy is enabled for this cluster. - bool disabled = 1; -} - -// Configuration for NodeLocal DNSCache -message DnsCacheConfig { - // Whether NodeLocal DNSCache is enabled for this cluster. - bool enabled = 1; -} - -// Configuration options for the KALM addon. -message KalmConfig { - // Whether KALM is enabled for this cluster. - bool enabled = 1 [deprecated = true]; -} - -// Configuration for the Backup for GKE Agent. -message GkeBackupAgentConfig { - // Whether the Backup for GKE agent is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Stateful HA add-on. -message StatefulHAConfig { - // Whether the Stateful HA add-on is enabled for this cluster. - bool enabled = 1; -} - -// Configuration options for the Config Connector add-on. -message ConfigConnectorConfig { - // Whether Cloud Connector is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Compute Engine PD CSI driver. -message GcePersistentDiskCsiDriverConfig { - // Whether the Compute Engine PD CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the GCP Filestore CSI driver. -message GcpFilestoreCsiDriverConfig { - // Whether the GCP Filestore CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration for the Cloud Storage Fuse CSI driver. -message GcsFuseCsiDriverConfig { - // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. - bool enabled = 1; -} - -// Configuration options for the Ray Operator add-on. -message RayOperatorConfig { - // Whether the Ray addon is enabled for this cluster. - bool enabled = 1; - - // Optional. Logging configuration for Ray clusters. - RayClusterLoggingConfig ray_cluster_logging_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Monitoring configuration for Ray clusters. - RayClusterMonitoringConfig ray_cluster_monitoring_config = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for controlling master global access settings. -message PrivateClusterMasterGlobalAccessConfig { - // Whenever master is accessible globally or not. - bool enabled = 1; -} - -// Configuration options for private clusters. -message PrivateClusterConfig { - // Whether nodes have internal IP addresses only. If enabled, all nodes are - // given only RFC 1918 private addresses and communicate with the master via - // private networking. - bool enable_private_nodes = 1; - - // Whether the master's internal IP address is used as the cluster endpoint. - bool enable_private_endpoint = 2; - - // The IP range in CIDR notation to use for the hosted master network. This - // range will be used for assigning internal IP addresses to the master or - // set of masters, as well as the ILB VIP. This range must not overlap with - // any other ranges in use within the cluster's network. - string master_ipv4_cidr_block = 3; - - // Output only. The internal IP address of this cluster's master endpoint. - string private_endpoint = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The external IP address of this cluster's master endpoint. - string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The peering name in the customer VPC used by this cluster. - string peering_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Controls master global access settings. - PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8; - - // Subnet to provision the master's private endpoint during cluster creation. - // Specified in projects/*/regions/*/subnetworks/* format. - string private_endpoint_subnetwork = 10; -} - -// Configuration options for Istio addon. -message IstioConfig { - // Istio auth mode, https://istio.io/docs/concepts/security/mutual-tls.html - enum IstioAuthMode { - // auth not enabled - AUTH_NONE = 0; - - // auth mutual TLS enabled - AUTH_MUTUAL_TLS = 1; - } - - // Whether Istio is enabled for this cluster. - bool disabled = 1 [deprecated = true]; - - // The specified Istio auth mode, either none, or mutual TLS. - IstioAuthMode auth = 2 [deprecated = true]; -} - -// Configuration options for the Cloud Run feature. -message CloudRunConfig { - // Load balancer type of ingress service of Cloud Run. - enum LoadBalancerType { - // Load balancer type for Cloud Run is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Install external load balancer for Cloud Run. - LOAD_BALANCER_TYPE_EXTERNAL = 1; - - // Install internal load balancer for Cloud Run. - LOAD_BALANCER_TYPE_INTERNAL = 2; - } - - // Whether Cloud Run addon is enabled for this cluster. - bool disabled = 1; - - // Which load balancer type is installed for Cloud Run. - LoadBalancerType load_balancer_type = 3; -} - -// Configuration options for the master authorized networks feature. Enabled -// master authorized networks will disallow all external traffic to access -// Kubernetes master through HTTPS except traffic from the given CIDR blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -message MasterAuthorizedNetworksConfig { - // CidrBlock contains an optional name and one CIDR block. - message CidrBlock { - // display_name is an optional field for users to identify CIDR blocks. - string display_name = 1; - - // cidr_block must be specified in CIDR notation. - string cidr_block = 2; - } - - // Whether or not master authorized networks is enabled. - bool enabled = 1; - - // cidr_blocks define up to 10 external networks that could access - // Kubernetes master through HTTPS. - repeated CidrBlock cidr_blocks = 2; - - // Whether master is accessbile via Google Compute Engine Public IP addresses. - optional bool gcp_public_cidrs_access_enabled = 3; -} - -// Configuration for the legacy Attribute Based Access Control authorization -// mode. -message LegacyAbac { - // Whether the ABAC authorizer is enabled for this cluster. When enabled, - // identities in the system, including service accounts, nodes, and - // controllers, will have statically granted permissions beyond those - // provided by the RBAC configuration or IAM. - bool enabled = 1; -} - -// Configuration options for the NetworkPolicy feature. -// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ -message NetworkPolicy { - // Allowed Network Policy providers. - enum Provider { - // Not set - PROVIDER_UNSPECIFIED = 0; - - // Tigera (Calico Felix). - CALICO = 1; - } - - // The selected network policy provider. - Provider provider = 1; - - // Whether network policy is enabled on the cluster. - bool enabled = 2; -} - -// [PRIVATE FIELD] -// Config for pod CIDR size overprovisioning. -message PodCIDROverprovisionConfig { - // Whether Pod CIDR overprovisioning is disabled. - // Note: Pod CIDR overprovisioning is enabled by default. - bool disable = 1; -} - -// Configuration for controlling how IPs are allocated in the cluster. -message IPAllocationPolicy { - // Possible values for IP stack type - enum StackType { - // By default, the clusters will be IPV4 only - STACK_TYPE_UNSPECIFIED = 0; - - // The value used if the cluster is a IPV4 only - IPV4 = 1; - - // The value used if the cluster is a dual stack cluster - IPV4_IPV6 = 2; - } - - // IPv6 access type - enum IPv6AccessType { - // Default value, will be defaulted as type external. - IPV6_ACCESS_TYPE_UNSPECIFIED = 0; - - // Access type internal (all v6 addresses are internal IPs) - INTERNAL = 1; - - // Access type external (all v6 addresses are external IPs) - EXTERNAL = 2; - } - - // Whether alias IPs will be used for pod IPs in the cluster. - // This is used in conjunction with use_routes. It cannot - // be true if use_routes is true. If both use_ip_aliases and use_routes are - // false, then the server picks the default IP allocation mode - bool use_ip_aliases = 1; - - // Whether a new subnetwork will be created automatically for the cluster. - // - // This field is only applicable when `use_ip_aliases` is true. - bool create_subnetwork = 2; - - // A custom subnetwork name to be used if `create_subnetwork` is true. If - // this field is empty, then an automatic name will be chosen for the new - // subnetwork. - string subnetwork_name = 3; - - // This field is deprecated, use cluster_ipv4_cidr_block. - string cluster_ipv4_cidr = 4 [deprecated = true]; - - // This field is deprecated, use node_ipv4_cidr_block. - string node_ipv4_cidr = 5 [deprecated = true]; - - // This field is deprecated, use services_ipv4_cidr_block. - string services_ipv4_cidr = 6 [deprecated = true]; - - // The name of the secondary range to be used for the cluster CIDR - // block. The secondary range will be used for pod IP - // addresses. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases and - // create_subnetwork is false. - string cluster_secondary_range_name = 7; - - // The name of the secondary range to be used as for the services - // CIDR block. The secondary range will be used for service - // ClusterIPs. This must be an existing secondary range associated - // with the cluster subnetwork. - // - // This field is only applicable with use_ip_aliases and - // create_subnetwork is false. - string services_secondary_range_name = 8; - - // The IP address range for the cluster pod IPs. If this field is set, then - // `cluster.cluster_ipv4_cidr` must be left blank. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string cluster_ipv4_cidr_block = 9; - - // The IP address range of the instance IPs in this cluster. - // - // This is applicable only if `create_subnetwork` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string node_ipv4_cidr_block = 10; - - // The IP address range of the services IPs in this cluster. If blank, a range - // will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range chosen with the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string services_ipv4_cidr_block = 11; - - // If true, allow allocation of cluster CIDR ranges that overlap with certain - // kinds of network routes. By default we do not allow cluster CIDR ranges to - // intersect with any user declared routes. With allow_route_overlap == true, - // we allow overlapping with CIDR ranges that are larger than the cluster CIDR - // range. - // - // If this field is set to true, then cluster and services CIDRs must be - // fully-specified (e.g. `10.96.0.0/14`, but not `/14`), which means: - // 1) When `use_ip_aliases` is true, `cluster_ipv4_cidr_block` and - // `services_ipv4_cidr_block` must be fully-specified. - // 2) When `use_ip_aliases` is false, `cluster.cluster_ipv4_cidr` muse be - // fully-specified. - bool allow_route_overlap = 12; - - // The IP address range of the Cloud TPUs in this cluster. If unspecified, a - // range will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // If unspecified, the range will use the default size. - // - // Set to /netmask (e.g. `/14`) to have a range chosen with a specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - // This field is deprecated, use cluster.tpu_config.ipv4_cidr_block instead. - string tpu_ipv4_cidr_block = 13; - - // Whether routes will be used for pod IPs in the cluster. - // This is used in conjunction with use_ip_aliases. It cannot be true if - // use_ip_aliases is true. If both use_ip_aliases and use_routes are false, - // then the server picks the default IP allocation mode - bool use_routes = 15; - - // IP stack type - StackType stack_type = 16; - - // The ipv6 access type (internal or external) when create_subnetwork is true - IPv6AccessType ipv6_access_type = 17; - - // [PRIVATE FIELD] - // Pod CIDR size overprovisioning config for the cluster. - // - // Pod CIDR size per node depends on max_pods_per_node. By default, the value - // of max_pods_per_node is doubled and then rounded off to next power of 2 to - // get the size of pod CIDR block per node. - // Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // - // This config can disable the doubling of IPs (we still round off to next - // power of 2) - // Example: max_pods_per_node of 30 will result in 32 IPs (/27) when - // overprovisioning is disabled. - PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21; - - // Output only. The subnet's IPv6 CIDR block used by nodes and pods. - string subnet_ipv6_cidr_block = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The services IPv6 CIDR block for the cluster. - string services_ipv6_cidr_block = 23 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The additional pod ranges that are added to the cluster. - // These pod ranges can be used by new node pools to allocate pod IPs - // automatically. Once the range is removed it will not show up in - // IPAllocationPolicy. - AdditionalPodRangesConfig additional_pod_ranges_config = 24 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The utilization of the cluster default IPv4 range for the - // pod. The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - double default_pod_ipv4_range_utilization = 25 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration for Binary Authorization. -message BinaryAuthorization { - // Binary Authorization mode of operation. - enum EvaluationMode { - // Default value - EVALUATION_MODE_UNSPECIFIED = 0; - - // Disable BinaryAuthorization - DISABLED = 1; - - // Enforce Kubernetes admission requests with BinaryAuthorization using the - // project's singleton policy. This is equivalent to setting the - // enabled boolean to true. - PROJECT_SINGLETON_POLICY_ENFORCE = 2; - - // Use Binary Authorization Continuous Validation with the policies - // specified in policy_bindings. - POLICY_BINDINGS = 5; - - // Use Binary Authorization Continuous Validation with the policies - // specified in policy_bindings and enforce Kubernetes admission requests - // with Binary Authorization using the project's singleton policy. - POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE = 6; - } - - // Binauthz policy that applies to this cluster. - message PolicyBinding { - // The relative resource name of the binauthz platform policy to evaluate. - // GKE platform policies have the following format: - // `projects/{project_number}/platforms/gke/policies/{policy_id}`. - optional string name = 1; - } - - // This field is deprecated. Leave this unset and instead configure - // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to - // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. - bool enabled = 1 [deprecated = true]; - - // Mode of operation for binauthz policy evaluation. If unspecified, defaults - // to DISABLED. - EvaluationMode evaluation_mode = 2; - - // Optional. Binauthz policies that apply to this cluster. - repeated PolicyBinding policy_bindings = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for the PodSecurityPolicy feature. -message PodSecurityPolicyConfig { - // Enable the PodSecurityPolicy controller for this cluster. If enabled, pods - // must be valid under a PodSecurityPolicy to be created. - bool enabled = 1; -} - -// Configuration for returning group information from authenticators. -message AuthenticatorGroupsConfig { - // Whether this cluster should return group membership lookups - // during authentication using a group of security groups. - bool enabled = 1; - - // The name of the security group-of-groups to be used. Only relevant - // if enabled = true. - string security_group = 2; -} - -// Telemetry integration for the cluster. -message ClusterTelemetry { - // Type of the integration. - enum Type { - // Not set. - UNSPECIFIED = 0; - - // Monitoring integration is disabled. - DISABLED = 1; - - // Monitoring integration is enabled. - ENABLED = 2; - - // Only system components are monitored and logged. - SYSTEM_ONLY = 3; - } - - // Type of the integration. - Type type = 1; -} - -// A Google Kubernetes Engine cluster. -message Cluster { - // The current status of the cluster. - enum Status { - // Not set. - STATUS_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 master or node software. Details can - // be found in the `statusMessage` field. - RECONCILING = 3; - - // The STOPPING state indicates the cluster is being deleted. - STOPPING = 4; - - // The ERROR state indicates the cluster may be unusable. Details - // can be found in the `statusMessage` field. - ERROR = 5; - - // The DEGRADED state indicates the cluster requires user action to restore - // full functionality. Details can be found in the `statusMessage` field. - DEGRADED = 6; - } - - // The name of this cluster. The name must be unique within this project - // and location (e.g. zone or region), and can be up to 40 characters with - // the following restrictions: - // - // * Lowercase letters, numbers, and hyphens only. - // * Must start with a letter. - // * Must end with a number or a letter. - string name = 1; - - // An optional description of this cluster. - string description = 2; - - // The number of nodes to create in this cluster. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "node_config") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // - // This field is deprecated, use node_pool.initial_node_count instead. - int32 initial_node_count = 3 [deprecated = true]; - - // Parameters used in creating the cluster's nodes. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with the - // "initial_node_count") will be used to create a "NodePool" object with an - // auto-generated name. Do not use this and a node_pool at the same time. - // For responses, this field will be populated with the node configuration of - // the first node pool. (For configuration of each node pool, see - // `node_pool.config`) - // - // If unspecified, the defaults are used. - // This field is deprecated, use node_pool.config instead. - NodeConfig node_config = 4 [deprecated = true]; - - // The authentication information for accessing the master endpoint. - // If unspecified, the defaults are used: - // For clusters before v1.12, if master_auth is unspecified, `username` will - // be set to "admin", a random password will be generated, and a client - // certificate will be issued. - MasterAuth master_auth = 5; - - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string logging_service = 6; - - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string monitoring_service = 7; - - // The name of the Google Compute Engine - // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. If left unspecified, the `default` - // network will be used. On output this shows the network ID instead of the - // name. - string network = 8; - - // The IP address range of the container pods in this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`). Leave blank to have - // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. - string cluster_ipv4_cidr = 9; - - // Configurations for the various addons available to run in the cluster. - AddonsConfig addons_config = 10; - - // The name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which - // the cluster is connected. On output this shows the subnetwork ID instead of - // the name. - string subnetwork = 11; - - // The node pools associated with this cluster. - // This field should not be set if "node_config" or "initial_node_count" are - // specified. - repeated NodePool node_pools = 12; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. - // - // This field provides a default value if - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // are not specified during node pool creation. - // - // Warning: changing cluster locations will update the - // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // of all node pools and will result in nodes being added and/or removed. - repeated string locations = 13; - - // Kubernetes alpha features are enabled on this cluster. This includes alpha - // API groups (e.g. v1beta1) and features that may not be production ready in - // the kubernetes version of the master and nodes. - // The cluster has no SLA for uptime and master/node upgrades are disabled. - // Alpha enabled clusters are automatically deleted thirty days after - // creation. - bool enable_kubernetes_alpha = 14; - - // Kubernetes open source beta apis enabled on the cluster. Only beta apis. - K8sBetaAPIConfig enable_k8s_beta_apis = 143; - - // The resource labels for the cluster to use to annotate any related - // Google Compute Engine resources. - map resource_labels = 15; - - // The fingerprint of the set of labels for this cluster. - string label_fingerprint = 16; - - // Configuration for the legacy ABAC authorization mode. - LegacyAbac legacy_abac = 18; - - // Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 19; - - // Configuration for cluster IP allocation. - IPAllocationPolicy ip_allocation_policy = 20; - - // The configuration options for master authorized networks feature. - MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; - - // Configure the maintenance policy for this cluster. - MaintenancePolicy maintenance_policy = 23; - - // Configuration for Binary Authorization. - BinaryAuthorization binary_authorization = 24; - - // Configuration for the PodSecurityPolicy feature. - PodSecurityPolicyConfig pod_security_policy_config = 25; - - // Cluster-level autoscaling configuration. - ClusterAutoscaling autoscaling = 26; - - // Configuration for cluster networking. - NetworkConfig network_config = 27; - - // If this is a private cluster setup. Private clusters are clusters that, by - // default have no external IP addresses on the nodes and where nodes and the - // master communicate over private IP addresses. - // This field is deprecated, use private_cluster_config.enable_private_nodes - // instead. - bool private_cluster = 28 [deprecated = true]; - - // The IP prefix in CIDR notation to use for the hosted master network. - // This prefix will be used for assigning private IP addresses to the - // master or set of masters, as well as the ILB VIP. - // This field is deprecated, use - // private_cluster_config.master_ipv4_cidr_block instead. - string master_ipv4_cidr_block = 29 [deprecated = true]; - - // The default constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool of this cluster. Only honored - // if cluster created with IP Alias support. - MaxPodsConstraint default_max_pods_constraint = 30; - - // Configuration for exporting resource usages. Resource usage export is - // disabled when this config unspecified. - ResourceUsageExportConfig resource_usage_export_config = 33; - - // Configuration controlling RBAC group membership information. - AuthenticatorGroupsConfig authenticator_groups_config = 34; - - // Configuration for private cluster. - PrivateClusterConfig private_cluster_config = 37; - - // Cluster-level Vertical Pod Autoscaling configuration. - VerticalPodAutoscaling vertical_pod_autoscaling = 39; - - // Shielded Nodes configuration. - ShieldedNodes shielded_nodes = 40; - - // Release channel configuration. If left unspecified on cluster creation and - // a version is specified, the cluster is enrolled in the most mature release - // channel where the version is available (first checking STABLE, then - // REGULAR, and finally RAPID). Otherwise, if no release channel - // configuration and no version is specified, the cluster is enrolled in the - // REGULAR channel with its default version. - ReleaseChannel release_channel = 41; - - // Configuration for the use of Kubernetes Service Accounts in GCP IAM - // policies. - WorkloadIdentityConfig workload_identity_config = 43; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - WorkloadCertificates workload_certificates = 52; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - MeshCertificates mesh_certificates = 67; - - // Configuration for direct-path (via ALTS) with workload identity. - WorkloadALTSConfig workload_alts_config = 53; - - // Configuration for the fine-grained cost management feature. - CostManagementConfig cost_management_config = 45; - - // Telemetry integration for the cluster. - ClusterTelemetry cluster_telemetry = 46; - - // Configuration for Cloud TPU support; - TpuConfig tpu_config = 47; - - // Notification configuration of the cluster. - NotificationConfig notification_config = 49; - - // Configuration of Confidential Nodes. - // All the nodes in the cluster will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 50; - - // Configuration for Identity Service component. - IdentityServiceConfig identity_service_config = 54; - - // Output only. Server-defined URL for the resource. - string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field is deprecated, use location instead. - string zone = 101 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IP address of this cluster's master endpoint. - // The endpoint can be accessed from the internet at - // `https://username:password@endpoint/`. - // - // See the `masterAuth` property of this resource for username and - // password information. - string endpoint = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The initial Kubernetes version for this cluster. Valid versions are those - // found in validMasterVersions returned by getServerConfig. The version can - // be upgraded over time; such upgrades are reflected in - // currentMasterVersion and currentNodeVersion. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "","-": picks the default Kubernetes version - string initial_cluster_version = 103; - - // Output only. The current software version of the master endpoint. - string current_master_version = 104 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated, use - // [NodePool.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) - // instead. The current version of the node software components. - // If they are currently at multiple versions because they're in the process - // of being upgraded, this reflects the minimum version of all nodes. - string current_node_version = 105 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the cluster was created, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string create_time = 106 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current status of this cluster. - Status status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // cluster, if available. - string status_message = 108 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the address space on each node for hosting - // containers. This is provisioned from within the `container_ipv4_cidr` - // range. This field will only be set when cluster is in route-based network - // mode. - int32 node_ipv4_cidr_size = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IP address range of the Kubernetes services in - // this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). Service addresses are - // typically put in the last `/16` from the container CIDR. - string services_ipv4_cidr = 110 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use node_pools.instance_group_urls. - repeated string instance_group_urls = 111 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of nodes currently in the cluster. Deprecated. - // Call Kubernetes API directly to retrieve node information. - int32 current_node_count = 112 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the cluster will be automatically - // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string expire_time = 113 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - string location = 114 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Enable the ability to use Cloud TPUs in this cluster. - // This field is deprecated, use tpu_config.enabled instead. - bool enable_tpu = 115; - - // Output only. The IP address range of the Cloud TPUs in this cluster, in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `1.2.3.4/29`). - string tpu_ipv4_cidr_block = 116 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration of etcd encryption. - DatabaseEncryption database_encryption = 38; - - // Which conditions caused the current cluster state. - repeated StatusCondition conditions = 118; - - // Configuration for master components. - Master master = 124; - - // Autopilot configuration for the cluster. - Autopilot autopilot = 128; - - // Output only. Unique id for the cluster. - string id = 129 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Default NodePool settings for the entire cluster. These settings are - // overridden if specified on the specific NodePool object. - optional NodePoolDefaults node_pool_defaults = 131; - - // Logging configuration for the cluster. - LoggingConfig logging_config = 132; - - // Monitoring configuration for the cluster. - MonitoringConfig monitoring_config = 133; - - // Node pool configs that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NodePoolAutoConfig node_pool_auto_config = 136; - - // Deprecated: Use SecurityPostureConfig instead. - // Enable/Disable Protect API features for the cluster. - optional ProtectConfig protect_config = 137 [deprecated = true]; - - // This checksum is computed by the server based on the value of cluster - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - string etag = 139; - - // Fleet information for the cluster. - Fleet fleet = 140; - - // Enable/Disable Security Posture API features for the cluster. - SecurityPostureConfig security_posture_config = 145; - - // GKE Enterprise Configuration. - EnterpriseConfig enterprise_config = 149; - - // Secret CSI driver configuration. - SecretManagerConfig secret_manager_config = 150; - - // Enable/Disable Compliance Posture features for the cluster. - CompliancePostureConfig compliance_posture_config = 151; - - // Output only. Reserved for future use. - optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CompliancePostureConfig defines the settings needed to enable/disable -// features for the Compliance Posture. -message CompliancePostureConfig { - // Mode defines enablement mode for Compliance Posture. - enum Mode { - // Default value not specified. - MODE_UNSPECIFIED = 0; - - // Disables Compliance Posture features on the cluster. - DISABLED = 1; - - // Enables Compliance Posture features on the cluster. - ENABLED = 2; - } - - // Defines the details of a compliance standard. - message ComplianceStandard { - // Name of the compliance standard. - optional string standard = 1; - } - - // Defines the enablement mode for Compliance Posture. - optional Mode mode = 1; - - // List of enabled compliance standards. - repeated ComplianceStandard compliance_standards = 2; -} - -// Kubernetes open source beta apis enabled on the cluster. -message K8sBetaAPIConfig { - // api name, e.g. storage.k8s.io/v1beta1/csistoragecapacities. - repeated string enabled_apis = 1; -} - -// WorkloadConfig defines the flags to enable or disable the -// workload configurations for the cluster. -message WorkloadConfig { - // Mode defines how to audit the workload configs. - enum Mode { - // Default value meaning that no mode has been specified. - MODE_UNSPECIFIED = 0; - - // This disables Workload Configuration auditing on the cluster, - // meaning that nothing is surfaced. - DISABLED = 1; - - // Applies the default set of policy auditing to a cluster's workloads. - BASIC = 4; - - // Surfaces configurations that are not in line with the - // Pod Security Standard Baseline policy. - BASELINE = 2 [deprecated = true]; - - // Surfaces configurations that are not in line with the - // Pod Security Standard Restricted policy. - RESTRICTED = 3 [deprecated = true]; - } - - // Sets which mode of auditing should be used for the cluster's workloads. - optional Mode audit_mode = 1; -} - -// ProtectConfig defines the flags needed to enable/disable features for the -// Protect API. -message ProtectConfig { - // WorkloadVulnerabilityMode defines mode to perform vulnerability scanning. - enum WorkloadVulnerabilityMode { - // Default value not specified. - WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED = 0; - - // Disables Workload Vulnerability Scanning feature on the cluster. - DISABLED = 1; - - // Applies basic vulnerability scanning settings for cluster workloads. - BASIC = 2; - } - - // WorkloadConfig defines which actions are enabled for a cluster's workload - // configurations. - optional WorkloadConfig workload_config = 1; - - // Sets which mode to use for Protect workload vulnerability scanning feature. - optional WorkloadVulnerabilityMode workload_vulnerability_mode = 2; -} - -// SecurityPostureConfig defines the flags needed to enable/disable features for -// the Security Posture API. -message SecurityPostureConfig { - // Mode defines enablement mode for GKE Security posture features. - enum Mode { - // Default value not specified. - MODE_UNSPECIFIED = 0; - - // Disables Security Posture features on the cluster. - DISABLED = 1; - - // Applies Security Posture features on the cluster. - BASIC = 2; - - // Applies the Security Posture off cluster Enterprise level features. - ENTERPRISE = 3; - } - - // VulnerabilityMode defines enablement mode for vulnerability scanning. - enum VulnerabilityMode { - // Default value not specified. - VULNERABILITY_MODE_UNSPECIFIED = 0; - - // Disables vulnerability scanning on the cluster. - VULNERABILITY_DISABLED = 1; - - // Applies basic vulnerability scanning on the cluster. - VULNERABILITY_BASIC = 2; - - // Applies the Security Posture's vulnerability on cluster Enterprise level - // features. - VULNERABILITY_ENTERPRISE = 3; - } - - // Sets which mode to use for Security Posture features. - optional Mode mode = 1; - - // Sets which mode to use for vulnerability scanning. - optional VulnerabilityMode vulnerability_mode = 2; -} - -// Subset of Nodepool message that has defaults. -message NodePoolDefaults { - // Subset of NodeConfig message that has defaults. - NodeConfigDefaults node_config_defaults = 1; -} - -// Subset of NodeConfig message that has defaults. -message NodeConfigDefaults { - // GCFS (Google Container File System, also known as Riptide) options. - GcfsConfig gcfs_config = 1; - - // Logging configuration for node pools. - NodePoolLoggingConfig logging_config = 3; - - // Parameters for containerd customization. - ContainerdConfig containerd_config = 4; - - // HostMaintenancePolicy contains the desired maintenance policy for the - // Google Compute Engine hosts. - HostMaintenancePolicy host_maintenance_policy = 5; - - // NodeKubeletConfig controls the defaults for new node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig node_kubelet_config = 6; -} - -// node pool configs that apply to all auto-provisioned node pools -// in autopilot clusters and node auto-provisioning enabled clusters -message NodePoolAutoConfig { - // The list of instance tags applied to all nodes. Tags are used to identify - // valid sources or targets for network firewalls and are specified by - // the client during cluster creation. Each tag within the list - // must comply with RFC1035. - NetworkTags network_tags = 1; - - // Resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - ResourceManagerTags resource_manager_tags = 2; - - // NodeKubeletConfig controls the defaults for autoprovisioned node-pools. - // - // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig node_kubelet_config = 3; -} - -// ClusterUpdate describes an update to the cluster. Exactly one update can -// be applied to a cluster with each request, so at most one field can be -// provided. -message ClusterUpdate { - // The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - string desired_node_version = 4; - - // The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string desired_monitoring_service = 5; - - // Configurations for the various addons available to run in the cluster. - AddonsConfig desired_addons_config = 6; - - // The node pool to be upgraded. This field is mandatory if - // "desired_node_version", "desired_image_family", - // "desired_node_pool_autoscaling", or "desired_workload_metadata_config" - // is specified and there is more than one node pool on the cluster. - string desired_node_pool_id = 7; - - // The desired image type for the node pool. - // NOTE: Set the "desired_node_pool" field as well. - string desired_image_type = 8; - - // Autoscaler configuration for the node pool specified in - // desired_node_pool_id. If there is only one pool in the - // cluster and desired_node_pool_id is not provided then - // the change applies to that single node pool. - NodePoolAutoscaling desired_node_pool_autoscaling = 9; - - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. - // - // This list must always include the cluster's primary zone. - // - // Warning: changing cluster locations will update the locations of all node - // pools and will result in nodes being added and/or removed. - repeated string desired_locations = 10; - - // The desired configuration options for master authorized networks feature. - MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; - - // The desired configuration options for the PodSecurityPolicy feature. - PodSecurityPolicyConfig desired_pod_security_policy_config = 14; - - // Cluster-level autoscaling configuration. - ClusterAutoscaling desired_cluster_autoscaling = 15; - - // The desired configuration options for the Binary Authorization feature. - BinaryAuthorization desired_binary_authorization = 16; - - // The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string desired_logging_service = 19; - - // The desired configuration for exporting resource usage. - ResourceUsageExportConfig desired_resource_usage_export_config = 21; - - // Cluster-level Vertical Pod Autoscaling configuration. - VerticalPodAutoscaling desired_vertical_pod_autoscaling = 22; - - // The desired private cluster configuration. master_global_access_config is - // the only field that can be changed via this field. - // See also - // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1beta1.ClusterUpdate.desired_enable_private_endpoint] - // for modifying other fields within - // [PrivateClusterConfig][google.container.v1beta1.PrivateClusterConfig]. - PrivateClusterConfig desired_private_cluster_config = 25; - - // The desired config of Intra-node visibility. - IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; - - // The desired status of whether to disable default sNAT for this cluster. - DefaultSnatStatus desired_default_snat_status = 28; - - // The desired telemetry integration for the cluster. - ClusterTelemetry desired_cluster_telemetry = 30; - - // The desired release channel configuration. - ReleaseChannel desired_release_channel = 31; - - // The desired private cluster configuration. Has no effect. Use - // [desired_private_cluster_config][google.container.v1beta1.ClusterUpdate.desired_private_cluster_config] - // instead. - PrivateClusterConfig private_cluster_config = 37 [deprecated = true]; - - // The desired Cloud TPU configuration. - TpuConfig desired_tpu_config = 38; - - // The desired L4 Internal Load Balancer Subsetting configuration. - ILBSubsettingConfig desired_l4ilb_subsetting_config = 39; - - // The desired datapath provider for the cluster. - DatapathProvider desired_datapath_provider = 50; - - // The desired state of IPv6 connectivity to Google Services. - PrivateIPv6GoogleAccess desired_private_ipv6_google_access = 51; - - // The desired notification configuration. - NotificationConfig desired_notification_config = 55; - - // The Kubernetes version to change the master to. The only valid value is the - // latest supported version. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - string desired_master_version = 100; - - // The desired GCFS config for the cluster. - GcfsConfig desired_gcfs_config = 109; - - // Configuration of etcd encryption. - DatabaseEncryption desired_database_encryption = 46; - - // Configuration for Workload Identity. - WorkloadIdentityConfig desired_workload_identity_config = 47; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - WorkloadCertificates desired_workload_certificates = 61; - - // Configuration for issuance of mTLS keys and certificates to Kubernetes - // pods. - MeshCertificates desired_mesh_certificates = 67; - - // Configuration for direct-path (via ALTS) with workload identity. - WorkloadALTSConfig desired_workload_alts_config = 62; - - // Configuration for Shielded Nodes. - ShieldedNodes desired_shielded_nodes = 48; - - // The desired configuration for the fine-grained cost management feature. - CostManagementConfig desired_cost_management_config = 49; - - // Configuration for master components. - Master desired_master = 52; - - // DNSConfig contains clusterDNS config for this cluster. - DNSConfig desired_dns_config = 53; - - // ServiceExternalIPsConfig specifies the config for the use of Services with - // ExternalIPs field. - ServiceExternalIPsConfig desired_service_external_ips_config = 60; - - // AuthenticatorGroupsConfig specifies the config for the cluster security - // groups settings. - AuthenticatorGroupsConfig desired_authenticator_groups_config = 63; - - // The desired logging configuration. - LoggingConfig desired_logging_config = 64; - - // The desired monitoring configuration. - MonitoringConfig desired_monitoring_config = 65; - - // The desired Identity Service component configuration. - IdentityServiceConfig desired_identity_service_config = 66; - - // Enable/Disable private endpoint for the cluster's master. - optional bool desired_enable_private_endpoint = 71; - - // The desired network tags that apply to all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NetworkTags desired_node_pool_auto_config_network_tags = 110; - - // Deprecated: Use DesiredSecurityPostureConfig instead. - // Enable/Disable Protect API features for the cluster. - optional ProtectConfig desired_protect_config = 112 [deprecated = true]; - - // The desired config of Gateway API on this cluster. - GatewayAPIConfig desired_gateway_api_config = 114; - - // The current etag of the cluster. - // If an etag is provided and does not match the current etag of the cluster, - // update will be blocked and an ABORTED error will be returned. - string etag = 115; - - // The desired node pool logging configuration defaults for the cluster. - NodePoolLoggingConfig desired_node_pool_logging_config = 116; - - // The desired fleet configuration for the cluster. - Fleet desired_fleet = 117; - - // The desired stack type of the cluster. - // If a stack type is provided and does not match the current stack type of - // the cluster, update will attempt to change the stack type to the new type. - StackType desired_stack_type = 119; - - // The additional pod ranges to be added to the cluster. These pod ranges - // can be used by node pools to allocate pod IPs. - AdditionalPodRangesConfig additional_pod_ranges_config = 120; - - // The additional pod ranges that are to be removed from the cluster. - // The pod ranges specified here must have been specified earlier in the - // 'additional_pod_ranges_config' argument. - AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121; - - // Kubernetes open source beta apis enabled on the cluster. Only beta apis - K8sBetaAPIConfig enable_k8s_beta_apis = 122; - - // Enable/Disable Security Posture API features for the cluster. - SecurityPostureConfig desired_security_posture_config = 124; - - // The desired network performance config. - NetworkConfig.ClusterNetworkPerformanceConfig - desired_network_performance_config = 125; - - // Enable/Disable FQDN Network Policy for the cluster. - optional bool desired_enable_fqdn_network_policy = 126; - - // The desired workload policy configuration for the autopilot cluster. - WorkloadPolicyConfig desired_autopilot_workload_policy_config = 128; - - // Beta APIs enabled for cluster. - K8sBetaAPIConfig desired_k8s_beta_apis = 131; - - // HostMaintenancePolicy contains the desired maintenance policy for the - // Google Compute Engine hosts. - HostMaintenancePolicy desired_host_maintenance_policy = 132; - - // The desired containerd config for the cluster. - ContainerdConfig desired_containerd_config = 134; - - // Enable/Disable Multi-Networking for the cluster - optional bool desired_enable_multi_networking = 135; - - // The desired resource manager tags that apply to all auto-provisioned node - // pools in autopilot clusters and node auto-provisioning enabled clusters. - ResourceManagerTags desired_node_pool_auto_config_resource_manager_tags = 136; - - // Specify the details of in-transit encryption. - // Now named inter-node transparent encryption. - optional InTransitEncryptionConfig desired_in_transit_encryption_config = 137; - - // Enable/Disable Cilium Clusterwide Network Policy for the cluster. - optional bool desired_enable_cilium_clusterwide_network_policy = 138; - - // Enable/Disable Secret Manager Config. - optional SecretManagerConfig desired_secret_manager_config = 139; - - // The desired node kubelet config for the cluster. - NodeKubeletConfig desired_node_kubelet_config = 141; - - // The desired node kubelet config for all auto-provisioned node pools - // in autopilot clusters and node auto-provisioning enabled clusters. - NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; -} - -// AdditionalPodRangesConfig is the configuration for additional pod secondary -// ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig { - // Name for pod secondary ipv4 range which has the actual range defined ahead. - repeated string pod_range_names = 1; - - // Output only. Information for additional pod range. - repeated RangeInfo pod_range_info = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// RangeInfo contains the range name and the range utilization by this cluster. -message RangeInfo { - // Output only. Name of a range. - string range_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The utilization of the range. - double utilization = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// This operation resource represents operations that may have happened or are -// happening on the cluster. All fields are output only. -message Operation { - // Current status of the operation. - enum Status { - // Not set. - STATUS_UNSPECIFIED = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is currently running. - RUNNING = 2; - - // The operation is done, either cancelled or completed. - DONE = 3; - - // The operation is aborting. - ABORTING = 4; - } - - // Operation type categorizes the operation. - enum Type { - // Not set. - TYPE_UNSPECIFIED = 0; - - // The cluster is being created. The cluster should be assumed to be - // unusable until the operation finishes. - // - // In the event of the operation failing, the cluster will enter the [ERROR - // state][Cluster.Status.ERROR] and eventually be deleted. - CREATE_CLUSTER = 1; - - // The cluster is being deleted. The cluster should be assumed to be - // unusable as soon as this operation starts. - // - // In the event of the operation failing, the cluster will enter the [ERROR - // state][Cluster.Status.ERROR] and the deletion will be automatically - // retried until completed. - DELETE_CLUSTER = 2; - - // The [cluster - // version][google.container.v1beta1.ClusterUpdate.desired_master_version] - // is being updated. Note that this includes "upgrades" to the same version, - // which are simply a recreation. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). - // For more details, see [documentation on cluster - // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). - UPGRADE_MASTER = 3; - - // A node pool is being updated. Despite calling this an "upgrade", this - // includes most forms of updates to node pools. This also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). - // - // This operation sets the - // [progress][google.container.v1beta1.Operation.progress] field and may be - // [canceled][google.container.v1beta1.ClusterManager.CancelOperation]. - // - // The upgrade strategy depends on [node pool - // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). - // The nodes are generally still usable during this operation. - UPGRADE_NODES = 4; - - // A problem has been detected with the control plane and is being repaired. - // This operation type is initiated by GKE. For more details, see - // [documentation on - // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - REPAIR_CLUSTER = 5; - - // The cluster is being updated. This is a broad category of operations and - // includes operations that only change metadata as well as those that must - // recreate the entire cluster. If the control plane must be recreated, this - // will cause temporary downtime for zonal clusters. - // - // Some features require recreating the nodes as well. Those will be - // recreated as separate operations and the update may not be completely - // functional until the node pools recreations finish. Node recreations will - // generally follow [maintenance - // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). - // - // Some GKE-initiated operations use this type. This includes certain types - // of auto-upgrades and incident mitigations. - UPDATE_CLUSTER = 6; - - // A node pool is being created. The node pool should be assumed to be - // unusable until this operation finishes. In the event of an error, the - // node pool may be partially created. - // - // If enabled, [node - // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) - // may have automatically initiated such operations. - CREATE_NODE_POOL = 7; - - // The node pool is being deleted. The node pool should be assumed to be - // unusable as soon as this operation starts. - DELETE_NODE_POOL = 8; - - // The node pool's - // [manamagent][google.container.v1beta1.NodePool.management] field is being - // updated. These operations only update metadata and may be concurrent with - // most other operations. - SET_NODE_POOL_MANAGEMENT = 9; - - // A problem has been detected with nodes and [they are being - // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). - // This operation type is initiated by GKE, typically automatically. This - // operation may be concurrent with other operations and there may be - // multiple repairs occurring on the same node pool. - AUTO_REPAIR_NODES = 10; - - // Unused. Automatic node upgrade uses - // [UPGRADE_NODES][google.container.v1beta1.Operation.Type.UPGRADE_NODES]. - AUTO_UPGRADE_NODES = 11 [deprecated = true]; - - // Unused. Updating labels uses - // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. - SET_LABELS = 12 [deprecated = true]; - - // Unused. Updating master auth uses - // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. - SET_MASTER_AUTH = 13 [deprecated = true]; - - // The node pool is being resized. With the exception of resizing to or from - // size zero, the node pool is generally usable during this operation. - SET_NODE_POOL_SIZE = 14; - - // Unused. Updating network policy uses - // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. - SET_NETWORK_POLICY = 15 [deprecated = true]; - - // Unused. Updating maintenance policy uses - // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. - SET_MAINTENANCE_POLICY = 16 [deprecated = true]; - - // The control plane is being resized. This operation type is initiated by - // GKE. These operations are often performed preemptively to ensure that the - // control plane has sufficient resources and is not typically an indication - // of issues. For more details, see - // [documentation on - // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). - RESIZE_CLUSTER = 18; - - // Fleet features of GKE Enterprise are being upgraded. The cluster should - // be assumed to be blocked for other upgrades until the operation finishes. - FLEET_FEATURE_UPGRADE = 19; - } - - // Output only. The server-assigned ID for the operation. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation is taking place. This field is deprecated, use location instead. - string zone = 2 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The operation type. - Type operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current status of the operation. - Status status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detailed operation progress, if available. - string detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If an error has occurred, a textual description of the error. - // Deprecated. Use field error instead. - string status_message = 5 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined URI for the operation. Example: - // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. - string self_link = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined URI for the target of the operation. The format - // of this is a URI to the resource being modified (such as a cluster, node - // pool, or node). For node pool repairs, there may be multiple nodes being - // repaired, but only one will be the target. - // - // Examples: - // - // - - // ## - // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` - // - // ## - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` - // - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` - string target_link = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or - // [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - string location = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation started, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string start_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation completed, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string end_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Progress information for an operation. - OperationProgress progress = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Which conditions caused the current cluster state. - // Deprecated. Use field error instead. - repeated StatusCondition cluster_conditions = 13 [deprecated = true]; - - // Which conditions caused the current node pool state. - // Deprecated. Use field error instead. - repeated StatusCondition nodepool_conditions = 14 [deprecated = true]; - - // The error result of the operation in case of failure. - google.rpc.Status error = 15; -} - -// Information about operation (or operation stage) progress. -message OperationProgress { - // Progress metric is (string, int|float|string) pair. - message Metric { - // Required. Metric name, e.g., "nodes total", "percent done". - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Strictly one of the values is required. - oneof value { - // For metrics with integer value. - int64 int_value = 2; - - // For metrics with floating point value. - double double_value = 3; - - // For metrics with custom values (ratios, visual progress, etc.). - string string_value = 4; - } - } - - // A non-parameterized string describing an operation stage. - // Unset for single-stage operations. - string name = 1; - - // Status of an operation stage. - // Unset for single-stage operations. - Operation.Status status = 2; - - // Progress metric bundle, for example: - // metrics: [{name: "nodes done", int_value: 15}, - // {name: "nodes total", int_value: 32}] - // or - // metrics: [{name: "progress", double_value: 0.56}, - // {name: "progress scale", double_value: 1.0}] - repeated Metric metrics = 3; - - // Substages of an operation or a stage. - repeated OperationProgress stages = 4; -} - -// CreateClusterRequest creates a cluster. -message CreateClusterRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. A [cluster - // resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) - Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; - - // The parent (project and location) where the cluster will be created. - // Specified in the format `projects/*/locations/*`. - string parent = 5; -} - -// GetClusterRequest gets the settings of a cluster. -message GetClusterRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to retrieve. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// UpdateClusterRequest updates the settings of a cluster. -message UpdateClusterRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. A description of the update. - ClusterUpdate update = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// SetNodePoolVersionRequest updates the version of a node pool. -message UpdateNodePoolRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The Kubernetes version to change the nodes to (typically an - // upgrade). - // - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the Kubernetes master version - string node_version = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The desired image type for the node pool. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 6 [(google.api.field_behavior) = REQUIRED]; - - // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // node pool's nodes should be located. Changing the locations for a node pool - // will result in nodes being either created or removed from the node pool, - // depending on whether locations are being added or removed. - repeated string locations = 13; - - // The desired workload metadata config for the node pool. - WorkloadMetadataConfig workload_metadata_config = 14; - - // The name (project, location, cluster, node pool) of the node pool to - // update. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 8; - - // Upgrade settings control disruption and speed of the upgrade. - NodePool.UpgradeSettings upgrade_settings = 15; - - // The desired network tags to be applied to all nodes in the node pool. - // If this field is not present, the tags will not be changed. Otherwise, - // the existing network tags will be *replaced* with the provided tags. - NetworkTags tags = 16; - - // The desired node taints to be applied to all nodes in the node pool. - // If this field is not present, the taints will not be changed. Otherwise, - // the existing node taints will be *replaced* with the provided taints. - NodeTaints taints = 17; - - // The desired node labels to be applied to all nodes in the node pool. - // If this field is not present, the labels will not be changed. Otherwise, - // the existing node labels will be *replaced* with the provided labels. - NodeLabels labels = 18; - - // Parameters that can be configured on Linux nodes. - LinuxNodeConfig linux_node_config = 19; - - // Node kubelet configs. - NodeKubeletConfig kubelet_config = 20; - - // Node network config. - NodeNetworkConfig node_network_config = 21; - - // GCFS config. - GcfsConfig gcfs_config = 22; - - // Confidential nodes config. - // All the nodes in the node pool will be Confidential VM once enabled. - ConfidentialNodes confidential_nodes = 23; - - // Enable or disable gvnic on the node pool. - VirtualNIC gvnic = 29; - - // The current etag of the node pool. - // If an etag is provided and does not match the current etag of the node - // pool, update will be blocked and an ABORTED error will be returned. - string etag = 30; - - // Enable or disable NCCL fast socket for the node pool. - FastSocket fast_socket = 31; - - // Logging configuration. - NodePoolLoggingConfig logging_config = 32; - - // The resource labels for the node pool to use to annotate any related - // Google Compute Engine resources. - ResourceLabels resource_labels = 33; - - // Parameters that can be configured on Windows nodes. - WindowsNodeConfig windows_node_config = 34; - - // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - repeated AcceleratorConfig accelerators = 35; - - // Optional. The desired machine type for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified machine type. - string machine_type = 36 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The desired disk type for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk type. - string disk_type = 37 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The desired disk size for nodes in the node pool. - // Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified disk size. - int64 disk_size_gb = 38 [(google.api.field_behavior) = OPTIONAL]; - - // Desired resource manager tag keys and values to be attached to the nodes - // for managing Compute Engine firewalls using Network Firewall Policies. - // Existing tags will be replaced with new values. - ResourceManagerTags resource_manager_tags = 39; - - // The desired containerd config for nodes in the node pool. - // Initiates an upgrade operation that recreates the nodes with the new - // config. - ContainerdConfig containerd_config = 40; - - // Specifies the configuration of queued provisioning. - NodePool.QueuedProvisioning queued_provisioning = 42; -} - -// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. -message SetNodePoolAutoscalingRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to upgrade. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Autoscaling configuration for the node pool. - NodePoolAutoscaling autoscaling = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool) of the node pool to set - // autoscaler settings. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// SetLoggingServiceRequest sets the logging service of a cluster. -message SetLoggingServiceRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The logging service the cluster should use to write logs. - // Currently available options: - // - // * `logging.googleapis.com/kubernetes` - The Cloud Logging - // service with a Kubernetes-native resource model - // * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). - // * `none` - no logs will be exported from the cluster. - // - // If left as an empty string,`logging.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - string logging_service = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set logging. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// SetMonitoringServiceRequest sets the monitoring service of a cluster. -message SetMonitoringServiceRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The monitoring service the cluster should use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - // service with a Kubernetes-native resource model - // * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - // longer available as of GKE 1.15). - // * `none` - No metrics will be exported from the cluster. - // - // If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - // used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - string monitoring_service = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set monitoring. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetAddonsRequest sets the addons associated with the cluster. -message SetAddonsConfigRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The desired configurations for the various addons available to - // run in the cluster. - AddonsConfig addons_config = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set addons. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetLocationsRequest sets the locations of the cluster. -message SetLocationsRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. Changing the locations a cluster is in - // will result in nodes being either created or removed from the cluster, - // depending on whether locations are being added or removed. - // - // This list must always include the cluster's primary zone. - repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set locations. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// UpdateMasterRequest updates the master of the cluster. -message UpdateMasterRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The Kubernetes version to change the master to. - // - // Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - // - // - "latest": picks the highest valid Kubernetes version - // - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - // - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - // - "1.X.Y-gke.N": picks an explicit Kubernetes version - // - "-": picks the default Kubernetes version - string master_version = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// SetMasterAuthRequest updates the admin password of a cluster. -message SetMasterAuthRequest { - // Operation type: what type update to perform. - enum Action { - // Operation is unknown and will error out. - UNKNOWN = 0; - - // Set the password to a user generated value. - SET_PASSWORD = 1; - - // Generate a new password and set it to that. - GENERATE_PASSWORD = 2; - - // Set the username. If an empty username is provided, basic authentication - // is disabled for the cluster. If a non-empty username is provided, basic - // authentication is enabled, with either a provided password or a generated - // one. - SET_USERNAME = 3; - } - - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to upgrade. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The exact form of action to be taken on the master auth. - Action action = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. A description of the update. - MasterAuth update = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to set auth. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// DeleteClusterRequest deletes a cluster. -message DeleteClusterRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to delete. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster) of the cluster to delete. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 4; -} - -// ListClustersRequest lists clusters. -message ListClustersRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides, or "-" for all zones. This field has been deprecated and - // replaced by the parent field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The parent (project and location) where the clusters will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - string parent = 4; -} - -// ListClustersResponse is the result of ListClustersRequest. -message ListClustersResponse { - // A list of clusters in the project in the specified zone, or - // across all ones. - repeated Cluster clusters = 1; - - // If any zones are listed here, the list of clusters returned - // may be missing those zones. - repeated string missing_zones = 2; -} - -// GetOperationRequest gets a single operation. -message GetOperationRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - string operation_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, operation id) of the operation to get. - // Specified in the format `projects/*/locations/*/operations/*`. - string name = 5; -} - -// ListOperationsRequest lists operations. -message ListOperationsRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for, or `-` for all zones. This field has been deprecated and - // replaced by the parent field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The parent (project and location) where the operations will be listed. - // Specified in the format `projects/*/locations/*`. - // Location "-" matches all zones and all regions. - string parent = 4; -} - -// CancelOperationRequest cancels a single operation. -message CancelOperationRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The server-assigned `name` of the operation. - // This field has been deprecated and replaced by the name field. - string operation_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, operation id) of the operation to cancel. - // Specified in the format `projects/*/locations/*/operations/*`. - string name = 4; -} - -// ListOperationsResponse is the result of ListOperationsRequest. -message ListOperationsResponse { - // A list of operations in the project in the specified zone. - repeated Operation operations = 1; - - // If any zones are listed here, the list of operations returned - // may be missing the operations from those zones. - repeated string missing_zones = 2; -} - -// Gets the current Kubernetes Engine service configuration. -message GetServerConfigRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project and location) of the server config to get, - // specified in the format `projects/*/locations/*`. - string name = 4; -} - -// Kubernetes Engine service configuration. -message ServerConfig { - // ReleaseChannelConfig exposes configuration for a release channel. - message ReleaseChannelConfig { - // Deprecated. - message AvailableVersion { - option deprecated = true; - - // Kubernetes version. - string version = 1; - - // Reason for availability. - string reason = 2; - } - - // The release channel this configuration applies to. - ReleaseChannel.Channel channel = 1; - - // The default version for newly created clusters on the channel. - string default_version = 2; - - // Deprecated. - // This field has been deprecated and replaced with the valid_versions - // field. - repeated AvailableVersion available_versions = 3 [deprecated = true]; - - // List of valid versions for the channel. - repeated string valid_versions = 4; - } - - // Version of Kubernetes the service deploys by default. - string default_cluster_version = 1; - - // List of valid node upgrade target versions, in descending order. - repeated string valid_node_versions = 3; - - // Default image type. - string default_image_type = 4; - - // List of valid image types. - repeated string valid_image_types = 5; - - // List of valid master versions, in descending order. - repeated string valid_master_versions = 6; - - // List of release channel configurations. - repeated ReleaseChannelConfig channels = 9; - - // Maps of Kubernetes version and supported Windows server versions. - map windows_version_maps = 10; -} - -// Best effort provisioning. -message BestEffortProvisioning { - // When this is enabled, cluster/node pool creations will ignore non-fatal - // errors like stockout to best provision as many nodes as possible right now - // and eventually bring up all target number of nodes - bool enabled = 1; - - // Minimum number of nodes to be provisioned to be considered as succeeded, - // and the rest of nodes will be provisioned gradually and eventually when - // stockout issue has been resolved. - int32 min_provision_nodes = 2; -} - -// Windows server versions. -message WindowsVersions { - // Windows server version. - message WindowsVersion { - // Windows server image type - string image_type = 1; - - // Windows server build number - string os_version = 2; - - // Mainstream support end date - google.type.Date support_end_date = 3; - } - - // List of Windows server versions. - repeated WindowsVersion windows_versions = 1; -} - -// CreateNodePoolRequest creates a node pool for a cluster. -message CreateNodePoolRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The node pool to create. - NodePool node_pool = 4 [(google.api.field_behavior) = REQUIRED]; - - // The parent (project, location, cluster name) where the node pool will be - // created. Specified in the format - // `projects/*/locations/*/clusters/*`. - string parent = 6; -} - -// DeleteNodePoolRequest deletes a node pool for a cluster. -message DeleteNodePoolRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to delete. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to - // delete. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// ListNodePoolsRequest lists the node pool(s) for a cluster. -message ListNodePoolsRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the parent field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The parent (project, location, cluster name) where the node pools will be - // listed. Specified in the format `projects/*/locations/*/clusters/*`. - string parent = 5; -} - -// GetNodePoolRequest retrieves a node pool for a cluster. -message GetNodePoolRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to - // get. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; -} - -// Settings for blue-green upgrade. -message BlueGreenSettings { - // Standard rollout policy is the default policy for blue-green. - message StandardRolloutPolicy { - // Blue pool size to drain in a batch. - oneof update_batch_size { - // Percentage of the blue pool nodes to drain in a batch. - // The range of this field should be (0.0, 1.0]. - float batch_percentage = 1; - - // Number of blue nodes to drain in a batch. - int32 batch_node_count = 2; - } - - // Soak time after each batch gets drained. Default to zero. - optional google.protobuf.Duration batch_soak_duration = 3; - } - - // Autoscaled rollout policy uses cluster autoscaler during - // blue-green upgrades to scale both the green and blue pools. - message AutoscaledRolloutPolicy {} - - // The rollout policy controls the general rollout progress of blue-green. - oneof rollout_policy { - // Standard policy for the blue-green upgrade. - StandardRolloutPolicy standard_rollout_policy = 1; - - // Autoscaled policy for cluster autoscaler enabled blue-green upgrade. - AutoscaledRolloutPolicy autoscaled_rollout_policy = 3; - } - - // Time needed after draining entire blue pool. After this period, blue pool - // will be cleaned up. - optional google.protobuf.Duration node_pool_soak_duration = 2; -} - -// NodePool contains the name and configuration for a cluster's node pool. -// Node pools are a set of nodes (i.e. VM's), with a common configuration and -// specification, under the control of the cluster master. They may have a set -// of Kubernetes labels applied to them, which may be used to reference them -// during pod scheduling. They may also be resized up or down, to accommodate -// the workload. -message NodePool { - // These upgrade settings control the level of parallelism and the level of - // disruption caused by an upgrade. - // - // maxUnavailable controls the number of nodes that can be simultaneously - // unavailable. - // - // maxSurge controls the number of additional nodes that can be added to the - // node pool temporarily for the time of the upgrade to increase the number of - // available nodes. - // - // (maxUnavailable + maxSurge) determines the level of parallelism (how many - // nodes are being upgraded at the same time). - // - // Note: upgrades inevitably introduce some disruption since workloads need to - // be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, - // this holds true. (Disruption stays within the limits of - // PodDisruptionBudget, if it is configured.) - // - // Consider a hypothetical node pool with 5 nodes having maxSurge=2, - // maxUnavailable=1. This means the upgrade process upgrades 3 nodes - // simultaneously. It creates 2 additional (upgraded) nodes, then it brings - // down 3 old (not yet upgraded) nodes at the same time. This ensures that - // there are always at least 4 nodes available. - // - // These upgrade settings configure the upgrade strategy for the node pool. - // Use strategy to switch between the strategies applied to the node pool. - // - // If the strategy is SURGE, use max_surge and max_unavailable to control - // the level of parallelism and the level of disruption caused by upgrade. - // 1. maxSurge controls the number of additional nodes that can be added to - // the node pool temporarily for the time of the upgrade to increase the - // number of available nodes. - // 2. maxUnavailable controls the number of nodes that can be simultaneously - // unavailable. - // 3. (maxUnavailable + maxSurge) determines the level of parallelism (how - // many nodes are being upgraded at the same time). - // - // If the strategy is BLUE_GREEN, use blue_green_settings to configure the - // blue-green upgrade related settings. - // 1. standard_rollout_policy is the default policy. The policy is used to - // control the way blue pool gets drained. The draining is executed in the - // batch mode. The batch size could be specified as either percentage of the - // node pool size or the number of nodes. batch_soak_duration is the soak - // time after each batch gets drained. - // 2. node_pool_soak_duration is the soak time after all blue nodes are - // drained. After this period, the blue pool nodes will be deleted. - message UpgradeSettings { - // The maximum number of nodes that can be created beyond the current size - // of the node pool during the upgrade process. - int32 max_surge = 1; - - // The maximum number of nodes that can be simultaneously unavailable during - // the upgrade process. A node is considered available if its status is - // Ready. - int32 max_unavailable = 2; - - // Update strategy of the node pool. - optional NodePoolUpdateStrategy strategy = 3; - - // Settings for blue-green upgrade strategy. - optional BlueGreenSettings blue_green_settings = 4; - } - - // UpdateInfo contains resource (instance groups, etc), status and other - // intermediate information relevant to a node pool upgrade. - message UpdateInfo { - // Information relevant to blue-green upgrade. - message BlueGreenInfo { - // Phase represents the different stages blue-green upgrade is running in. - enum Phase { - // Unspecified phase. - PHASE_UNSPECIFIED = 0; - - // blue-green upgrade has been initiated. - UPDATE_STARTED = 1; - - // Start creating green pool nodes. - CREATING_GREEN_POOL = 2; - - // Start cordoning blue pool nodes. - CORDONING_BLUE_POOL = 3; - - // Start waiting after cordoning the blue pool and before draining it. - WAITING_TO_DRAIN_BLUE_POOL = 8; - - // Start draining blue pool nodes. - DRAINING_BLUE_POOL = 4; - - // Start soaking time after draining entire blue pool. - NODE_POOL_SOAKING = 5; - - // Start deleting blue nodes. - DELETING_BLUE_POOL = 6; - - // Rollback has been initiated. - ROLLBACK_STARTED = 7; - } - - // Current blue-green upgrade phase. - Phase phase = 1; - - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with blue pool. - repeated string blue_instance_group_urls = 2; - - // The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with green pool. - repeated string green_instance_group_urls = 3; - - // Time to start deleting blue pool to complete blue-green upgrade, - // in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string blue_pool_deletion_start_time = 4; - - // Version of green pool. - string green_pool_version = 5; - } - - // Information of a blue-green upgrade. - BlueGreenInfo blue_green_info = 1; - } - - // The current status of the node pool instance. - enum Status { - // Not set. - STATUS_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 RUNNING_WITH_ERROR state indicates the node pool has been created - // and is partially usable. Some error state has occurred and some - // functionality may be impaired. Customer may need to reissue a request - // or trigger a new update. - RUNNING_WITH_ERROR = 3; - - // The RECONCILING state indicates that some work is actively being done on - // the node pool, such as upgrading node software. Details can - // be found in the `statusMessage` field. - RECONCILING = 4; - - // The STOPPING state indicates the node pool is being deleted. - STOPPING = 5; - - // The ERROR state indicates the node pool may be unusable. Details - // can be found in the `statusMessage` field. - ERROR = 6; - } - - // PlacementPolicy defines the placement policy used by the node pool. - message PlacementPolicy { - // Type defines the type of placement policy. - enum Type { - // TYPE_UNSPECIFIED specifies no requirements on nodes - // placement. - TYPE_UNSPECIFIED = 0; - - // COMPACT specifies node placement in the same availability domain to - // ensure low communication latency. - COMPACT = 1; - } - - // The type of placement. - Type type = 1; - - // TPU placement topology for pod slice node pool. - // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies - string tpu_topology = 2; - - // If set, refers to the name of a custom resource policy supplied by the - // user. The resource policy must be in the same project and region as the - // node pool. If not found, InvalidArgument error is returned. - string policy_name = 3; - } - - // QueuedProvisioning defines the queued provisioning used by the node pool. - message QueuedProvisioning { - // Denotes that this nodepool is QRM specific, meaning nodes can be only - // obtained through queuing via the Cluster Autoscaler ProvisioningRequest - // API. - bool enabled = 1; - } - - // The name of the node pool. - string name = 1; - - // The node configuration of the pool. - NodeConfig config = 2; - - // The initial node count for the pool. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - int32 initial_node_count = 3; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes should be located. - // - // If this value is unspecified during node pool creation, the - // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) - // value will be used, instead. - // - // Warning: changing node pool locations will result in nodes being added - // and/or removed. - repeated string locations = 13; - - // Networking configuration for this NodePool. If specified, it overrides the - // cluster-level defaults. - NodeNetworkConfig network_config = 14; - - // Output only. Server-defined URL for the resource. - string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The version of Kubernetes running on this NodePool's nodes. If unspecified, - // it defaults as described - // [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). - string version = 101; - - // Output only. The resource URLs of the [managed instance - // groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with this node pool. - // During the node pool blue-green upgrade operation, the URLs contain both - // blue and green resources. - repeated string instance_group_urls = 102 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The status of the nodes in this pool instance. - Status status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Deprecated. Use conditions instead. - // Additional information about the current status of this - // node pool instance, if available. - string status_message = 104 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - - // Autoscaler configuration for this NodePool. Autoscaler is enabled - // only if a valid configuration is present. - NodePoolAutoscaling autoscaling = 4; - - // NodeManagement configuration for this NodePool. - NodeManagement management = 5; - - // The constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 6; - - // Which conditions caused the current node pool state. - repeated StatusCondition conditions = 105; - - // Output only. The pod CIDR block size per node in this node pool. - int32 pod_ipv4_cidr_size = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Upgrade settings control disruption and speed of the upgrade. - UpgradeSettings upgrade_settings = 107; - - // Specifies the node placement policy. - PlacementPolicy placement_policy = 108; - - // Output only. Update info contains relevant information during a node - // pool update. - UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of node pool - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - string etag = 110; - - // Specifies the configuration of queued provisioning. - QueuedProvisioning queued_provisioning = 112; - - // Enable best effort provisioning for nodes - BestEffortProvisioning best_effort_provisioning = 113; -} - -// NodeManagement defines the set of node management services turned on for the -// node pool. -message NodeManagement { - // Whether the nodes will be automatically upgraded. - bool auto_upgrade = 1; - - // Whether the nodes will be automatically repaired. - bool auto_repair = 2; - - // Specifies the Auto Upgrade knobs for the node pool. - AutoUpgradeOptions upgrade_options = 10; -} - -// AutoUpgradeOptions defines the set of options for the user to control how -// the Auto Upgrades will proceed. -message AutoUpgradeOptions { - // Output only. This field is set when upgrades are about to commence - // with the approximate start time for the upgrades, in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - string auto_upgrade_start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. This field is set when upgrades are about to commence - // with the description of the upgrade. - string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// MaintenancePolicy defines the maintenance policy to be used for the cluster. -message MaintenancePolicy { - // Specifies the maintenance window in which maintenance may be performed. - MaintenanceWindow window = 1; - - // A hash identifying the version of this policy, so that updates to fields of - // the policy won't accidentally undo intermediate changes (and so that users - // of the API unaware of some fields won't accidentally remove other fields). - // Make a `get()` request to the cluster to get the current - // resource version and include it with requests to set the policy. - string resource_version = 3; -} - -// MaintenanceWindow defines the maintenance window to be used for the cluster. -message MaintenanceWindow { - // Unimplemented, reserved for future use. - // HourlyMaintenanceWindow hourly_maintenance_window = 1; - oneof policy { - // DailyMaintenanceWindow specifies a daily maintenance operation window. - DailyMaintenanceWindow daily_maintenance_window = 2; - - // RecurringWindow specifies some number of recurring time periods for - // maintenance to occur. The time windows may be overlapping. If no - // maintenance windows are set, maintenance can occur at any time. - RecurringTimeWindow recurring_window = 3; - } - - // Exceptions to maintenance window. Non-emergency maintenance should not - // occur in these windows. - map maintenance_exclusions = 4; -} - -// Represents an arbitrary window of time. -message TimeWindow { - oneof options { - // MaintenanceExclusionOptions provides maintenance exclusion related - // options. - MaintenanceExclusionOptions maintenance_exclusion_options = 3; - } - - // The time that the window first starts. - google.protobuf.Timestamp start_time = 1; - - // The time that the window ends. The end time should take place after the - // start time. - google.protobuf.Timestamp end_time = 2; -} - -// Represents the Maintenance exclusion option. -message MaintenanceExclusionOptions { - // Scope of exclusion. - enum Scope { - // NO_UPGRADES excludes all upgrades, including patch upgrades and minor - // upgrades across control planes and nodes. This is the default exclusion - // behavior. - NO_UPGRADES = 0; - - // NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only - // patches are allowed. - NO_MINOR_UPGRADES = 1; - - // NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, - // and also exclude all node pool upgrades. Only control - // plane patches are allowed. - NO_MINOR_OR_NODE_UPGRADES = 2; - } - - // Scope specifies the upgrade scope which upgrades are blocked by the - // exclusion. - Scope scope = 1; -} - -// Represents an arbitrary window of time that recurs. -message RecurringTimeWindow { - // The window of the first recurrence. - TimeWindow window = 1; - - // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how - // this window reccurs. They go on for the span of time between the start and - // end time. - // - // For example, to have something repeat every weekday, you'd use: - // `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` - // - // To repeat some window daily (equivalent to the DailyMaintenanceWindow): - // `FREQ=DAILY` - // - // For the first weekend of every month: - // `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` - // - // This specifies how frequently the window starts. Eg, if you wanted to have - // a 9-5 UTC-4 window every weekday, you'd use something like: - // ``` - // start time = 2019-01-01T09:00:00-0400 - // end time = 2019-01-01T17:00:00-0400 - // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR - // ``` - // - // Windows can span multiple days. Eg, to make the window encompass every - // weekend from midnight Saturday till the last minute of Sunday UTC: - // ``` - // start time = 2019-01-05T00:00:00Z - // end time = 2019-01-07T23:59:00Z - // recurrence = FREQ=WEEKLY;BYDAY=SA - // ``` - // - // Note the start and end time's specific dates are largely arbitrary except - // to specify duration of the window and when it first starts. - // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. - string recurrence = 2; -} - -// Time window specified for daily maintenance operations. -message DailyMaintenanceWindow { - // Time within the maintenance window to start the maintenance operations. - // It must be in format "HH:MM", where HH : [00-23] and MM : [00-59] GMT. - string start_time = 2; - - // Output only. Duration of the time window, automatically chosen to be - // smallest possible in the given scenario. - string duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// SetNodePoolManagementRequest sets the node management properties of a node -// pool. -message SetNodePoolManagementRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. NodeManagement configuration for the node pool. - NodeManagement management = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to set - // management properties. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 7; -} - -// SetNodePoolSizeRequest sets the size of a node pool. -message SetNodePoolSizeRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to update. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The desired node count for the pool. - int32 node_count = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node pool to set - // size. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 7; -} - -// CompleteNodePoolUpgradeRequest sets the name of target node pool to complete -// upgrade. -message CompleteNodePoolUpgradeRequest { - // The name (project, location, cluster, node pool id) of the node pool to - // complete upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 1; -} - -// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed -// NodePool upgrade. This will be an no-op if the last upgrade successfully -// completed. -message RollbackNodePoolUpgradeRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to rollback. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the node pool to rollback. - // This field has been deprecated and replaced by the name field. - string node_pool_id = 4 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster, node pool id) of the node poll to - // rollback upgrade. - // Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. - string name = 6; - - // Option for rollback to ignore the PodDisruptionBudget. - // Default value is false. - bool respect_pdb = 7; -} - -// ListNodePoolsResponse is the result of ListNodePoolsRequest. -message ListNodePoolsResponse { - // A list of node pools for a cluster. - repeated NodePool node_pools = 1; -} - -// ClusterAutoscaling contains global, per-cluster information -// required by Cluster Autoscaler to automatically adjust -// the size of the cluster and create/delete -// node pools based on the current needs. -message ClusterAutoscaling { - // Defines possible options for autoscaling_profile field. - enum AutoscalingProfile { - // No change to autoscaling configuration. - PROFILE_UNSPECIFIED = 0; - - // Prioritize optimizing utilization of resources. - OPTIMIZE_UTILIZATION = 1; - - // Use default (balanced) autoscaling configuration. - BALANCED = 2; - } - - // Enables automatic node pool creation and deletion. - bool enable_node_autoprovisioning = 1; - - // Contains global constraints regarding minimum and maximum - // amount of resources in the cluster. - repeated ResourceLimit resource_limits = 2; - - // Defines autoscaling behaviour. - AutoscalingProfile autoscaling_profile = 3; - - // AutoprovisioningNodePoolDefaults contains defaults for a node pool - // created by NAP. - AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; - - // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes can be created by NAP. - repeated string autoprovisioning_locations = 5; -} - -// AutoprovisioningNodePoolDefaults contains defaults for a node pool created -// by NAP. -message AutoprovisioningNodePoolDefaults { - // The set of Google API scopes to be made available on all of the - // node VMs under the "default" service account. - // - // The following scopes are recommended, but not required, and by default are - // not included: - // - // * `https://www.googleapis.com/auth/compute` is required for mounting - // persistent storage on your nodes. - // * `https://www.googleapis.com/auth/devstorage.read_only` is required for - // communicating with **gcr.io** - // (the [Google Container - // Registry](https://cloud.google.com/container-registry/)). - // - // If unspecified, no scopes are added, unless Cloud Logging or Cloud - // Monitoring are enabled, in which case their required scopes will be added. - repeated string oauth_scopes = 1; - - // The Google Cloud Platform Service Account to be used by the node VMs. - // Specify the email address of the Service Account; otherwise, if no Service - // Account is specified, the "default" service account is used. - string service_account = 2; - - // Upgrade settings control disruption and speed of the upgrade. - NodePool.UpgradeSettings upgrade_settings = 3; - - // NodeManagement configuration for this NodePool. - NodeManagement management = 4; - - // Deprecated. Minimum CPU platform to be used for NAP created node pools. - // The instance may be scheduled on the specified or newer CPU platform. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: Intel Haswell or - // minCpuPlatform: Intel Sandy Bridge. For more - // information, read [how to specify min CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). - // This field is deprecated, min_cpu_platform should be specified using - // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. - // To unset the min cpu platform field pass "automatic" - // as field value. - string min_cpu_platform = 5 [deprecated = true]; - - // Size of the disk attached to each node, specified in GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - int32 disk_size_gb = 6; - - // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') - // - // If unspecified, the default disk type is 'pd-standard' - string disk_type = 7; - - // Shielded Instance options. - ShieldedInstanceConfig shielded_instance_config = 8; - - // - // The Customer Managed Encryption Key used to encrypt the boot disk attached - // to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. - // For more information about protecting resources with Cloud KMS Keys please - // see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - string boot_disk_kms_key = 9; - - // The image type to use for NAP created node. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - string image_type = 10; - - // Enable or disable Kubelet read only port. - optional bool insecure_kubelet_readonly_port_enabled = 13; -} - -// Contains information about amount of some resource in the cluster. -// For memory, value should be in GB. -message ResourceLimit { - // Resource name "cpu", "memory" or gpu-specific string. - string resource_type = 1; - - // Minimum amount of the resource in the cluster. - int64 minimum = 2; - - // Maximum amount of the resource in the cluster. - int64 maximum = 3; -} - -// NodePoolAutoscaling contains information required by cluster autoscaler to -// adjust the size of the node pool to the current cluster usage. -message NodePoolAutoscaling { - // Location policy specifies how zones are picked when scaling up the - // nodepool. - enum LocationPolicy { - // Not set. - LOCATION_POLICY_UNSPECIFIED = 0; - - // BALANCED is a best effort policy that aims to balance the sizes of - // different zones. - BALANCED = 1; - - // ANY policy picks zones that have the highest capacity available. - ANY = 2; - } - - // Is autoscaling enabled for this node pool. - bool enabled = 1; - - // Minimum number of nodes for one location in the NodePool. Must be >= 1 and - // <= max_node_count. - int32 min_node_count = 2; - - // Maximum number of nodes for one location in the NodePool. Must be >= - // min_node_count. There has to be enough quota to scale up the cluster. - int32 max_node_count = 3; - - // Can this node pool be deleted automatically. - bool autoprovisioned = 4; - - // Location policy used when scaling up a nodepool. - LocationPolicy location_policy = 5; - - // Minimum number of nodes in the node pool. Must be greater than 1 less than - // total_max_node_count. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - int32 total_min_node_count = 6; - - // Maximum number of nodes in the node pool. Must be greater than - // total_min_node_count. There has to be enough quota to scale up the cluster. - // The total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - int32 total_max_node_count = 7; -} - -// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container -// Engine cluster, which will in turn set them for Google Compute Engine -// resources used by that cluster -message SetLabelsRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. The labels to set for that cluster. - map resource_labels = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The fingerprint of the previous set of labels for this resource, - // used to detect conflicts. The fingerprint is initially generated by - // Kubernetes Engine and changes after every request to modify or update - // labels. You must always provide an up-to-date fingerprint hash when - // updating or changing labels. Make a `get()` request to the - // resource to get the latest fingerprint. - string label_fingerprint = 5 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set labels. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for -// a cluster. -message SetLegacyAbacRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster to update. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Whether ABAC authorization will be enabled in the cluster. - bool enabled = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set legacy - // abac. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// StartIPRotationRequest creates a new IP for the cluster and then performs -// a node upgrade on each node pool to point to the new IP. -message StartIPRotationRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to start IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; - - // Whether to rotate credentials during IP rotation. - bool rotate_credentials = 7; -} - -// CompleteIPRotationRequest moves the cluster master back into single-IP mode. -message CompleteIPRotationRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to complete IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 7; -} - -// AcceleratorConfig represents a Hardware Accelerator request. -message AcceleratorConfig { - // The number of the accelerator cards exposed to an instance. - int64 accelerator_count = 1; - - // The accelerator type resource name. List of supported accelerators - // [here](https://cloud.google.com/compute/docs/gpus) - string accelerator_type = 2; - - // Size of partitions to create on the GPU. Valid values are described in the - // NVIDIA [mig user - // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - string gpu_partition_size = 3; - - // The number of time-shared GPU resources to expose for each physical GPU. - int64 max_time_shared_clients_per_gpu = 4 [deprecated = true]; - - // The configuration for GPU sharing options. - optional GPUSharingConfig gpu_sharing_config = 5; - - // The configuration for auto installation of GPU driver. - optional GPUDriverInstallationConfig gpu_driver_installation_config = 6; -} - -// GPUSharingConfig represents the GPU sharing configuration for Hardware -// Accelerators. -message GPUSharingConfig { - // The type of GPU sharing strategy currently provided. - enum GPUSharingStrategy { - // Default value. - GPU_SHARING_STRATEGY_UNSPECIFIED = 0; - - // GPUs are time-shared between containers. - TIME_SHARING = 1; - - // GPUs are shared between containers with NVIDIA MPS. - MPS = 2; - } - - // The max number of containers that can share a physical GPU. - int64 max_shared_clients_per_gpu = 1; - - // The type of GPU sharing strategy to enable on the GPU node. - optional GPUSharingStrategy gpu_sharing_strategy = 2; -} - -// GPUDriverInstallationConfig specifies the version of GPU driver to be auto -// installed. -message GPUDriverInstallationConfig { - // The GPU driver version to install. - enum GPUDriverVersion { - // Default value is to not install any GPU driver. - GPU_DRIVER_VERSION_UNSPECIFIED = 0; - - // Disable GPU driver auto installation and needs manual installation - INSTALLATION_DISABLED = 1; - - // "Default" GPU driver in COS and Ubuntu. - DEFAULT = 2; - - // "Latest" GPU driver in COS. - LATEST = 3; - } - - // Mode for how the GPU driver is installed. - optional GPUDriverVersion gpu_driver_version = 1; -} - -// ManagedPrometheusConfig defines the configuration for -// Google Cloud Managed Service for Prometheus. -message ManagedPrometheusConfig { - // Enable Managed Collection. - bool enabled = 1; -} - -// WorkloadMetadataConfig defines the metadata configuration to expose to -// workloads on the node pool. -message WorkloadMetadataConfig { - // NodeMetadata is the configuration for if and how to expose the node - // metadata to the workload running on the node. - enum NodeMetadata { - // Not set. - UNSPECIFIED = 0; - - // Prevent workloads not in hostNetwork from accessing certain VM metadata, - // specifically kube-env, which contains Kubelet credentials, and the - // instance identity token. - // - // Metadata concealment is a temporary security solution available while the - // bootstrapping process for cluster nodes is being redesigned with - // significant security improvements. This feature is scheduled to be - // deprecated in the future and later removed. - SECURE = 1; - - // Expose all VM metadata to pods. - EXPOSE = 2; - - // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes - // a metadata API to workloads that is compatible with the V1 Compute - // Metadata APIs exposed by the Compute Engine and App Engine Metadata - // Servers. This feature can only be enabled if Workload Identity is enabled - // at the cluster level. - GKE_METADATA_SERVER = 3; - } - - // Mode is the configuration for how to expose metadata to workloads running - // on the node. - enum Mode { - // Not set. - MODE_UNSPECIFIED = 0; - - // Expose all Compute Engine metadata to pods. - GCE_METADATA = 1; - - // Run the GKE Metadata Server on this node. The GKE Metadata Server exposes - // a metadata API to workloads that is compatible with the V1 Compute - // Metadata APIs exposed by the Compute Engine and App Engine Metadata - // Servers. This feature can only be enabled if Workload Identity is enabled - // at the cluster level. - GKE_METADATA = 2; - } - - // NodeMetadata is the configuration for how to expose metadata to the - // workloads running on the node. - NodeMetadata node_metadata = 1 [deprecated = true]; - - // Mode is the configuration for how to expose metadata to workloads running - // on the node pool. - Mode mode = 2; -} - -// SetNetworkPolicyRequest enables/disables network policy for a cluster. -message SetNetworkPolicyRequest { - // Required. Deprecated. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - string project_id = 1 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. - string zone = 2 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Deprecated. The name of the cluster. - // This field has been deprecated and replaced by the name field. - string cluster_id = 3 - [deprecated = true, (google.api.field_behavior) = REQUIRED]; - - // Required. Configuration options for the NetworkPolicy feature. - NetworkPolicy network_policy = 4 [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set networking - // policy. Specified in the format `projects/*/locations/*/clusters/*`. - string name = 6; -} - -// SetMaintenancePolicyRequest sets the maintenance policy for a cluster. -message SetMaintenancePolicyRequest { - // Required. The Google Developers Console [project ID or project - // number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. - string zone = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the cluster to update. - string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The maintenance policy to be set for the cluster. An empty field - // clears the existing maintenance policy. - MaintenancePolicy maintenance_policy = 4 - [(google.api.field_behavior) = REQUIRED]; - - // The name (project, location, cluster name) of the cluster to set - // maintenance policy. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 5; -} - -// ListLocationsRequest is used to request the locations that offer GKE. -message ListLocationsRequest { - // Required. Contains the name of the resource requested. - // Specified in the format `projects/*`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// ListLocationsResponse returns the list of all GKE locations and their -// recommendation state. -message ListLocationsResponse { - // A full list of GKE locations. - repeated Location locations = 1; - - // Only return ListLocationsResponse that occur after the page_token. This - // value should be populated from the ListLocationsResponse.next_page_token if - // that response token was set (which happens when listing more Locations than - // fit in a single ListLocationsResponse). - string next_page_token = 2; -} - -// Location returns the location name, and if the location is recommended -// for GKE cluster scheduling. -message Location { - // LocationType is the type of GKE location, regional or zonal. - enum LocationType { - // LOCATION_TYPE_UNSPECIFIED means the location type was not determined. - LOCATION_TYPE_UNSPECIFIED = 0; - - // A GKE Location where Zonal clusters can be created. - ZONE = 1; - - // A GKE Location where Regional clusters can be created. - REGION = 2; - } - - // Contains the type of location this Location is for. - // Regional or Zonal. - LocationType type = 1; - - // Contains the name of the resource requested. - // Specified in the format `projects/*/locations/*`. - string name = 2; - - // Whether the location is recommended for GKE cluster scheduling. - bool recommended = 3; -} - -// StatusCondition describes why a cluster or a node pool has a certain status -// (e.g., ERROR or DEGRADED). -message StatusCondition { - // Code for each condition - enum Code { - option deprecated = true; - - // UNKNOWN indicates a generic condition. - UNKNOWN = 0; - - // GCE_STOCKOUT indicates that Google Compute Engine resources are - // temporarily unavailable. - GCE_STOCKOUT = 1; - - // GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot - // service account. - GKE_SERVICE_ACCOUNT_DELETED = 2; - - // Google Compute Engine quota was exceeded. - GCE_QUOTA_EXCEEDED = 3; - - // Cluster state was manually changed by an SRE due to a system logic error. - SET_BY_OPERATOR = 4; - - // Unable to perform an encrypt operation against the CloudKMS key used for - // etcd level encryption. - CLOUD_KMS_KEY_ERROR = 7; - - // Cluster CA is expiring soon. - // More codes TBA - CA_EXPIRING = 9; - } - - // Machine-friendly representation of the condition - // Deprecated. Use canonical_code instead. - Code code = 1 [deprecated = true]; - - // Human-friendly representation of the condition - string message = 2; - - // Canonical code of the condition. - google.rpc.Code canonical_code = 3; -} - -// NetworkConfig reports the relative names of network & subnetwork. -message NetworkConfig { - // Configuration of all network bandwidth tiers - message ClusterNetworkPerformanceConfig { - // Node network tier - enum Tier { - // Default value - TIER_UNSPECIFIED = 0; - - // Higher bandwidth, actual values based on VM size. - TIER_1 = 1; - } - - // Specifies the total network bandwidth tier for the NodePool. - optional Tier total_egress_bandwidth_tier = 1; - } - - // Output only. The relative name of the Google Compute Engine - // [network][google.container.v1beta1.NetworkConfig.network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - // to which the cluster is connected. Example: - // projects/my-project/global/networks/my-network - string network = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The relative name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the - // cluster is connected. Example: - // projects/my-project/regions/us-central1/subnetworks/my-subnet - string subnetwork = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether Intra-node visibility is enabled for this cluster. - // This makes same node pod to pod traffic visible for VPC network. - bool enable_intra_node_visibility = 5; - - // Whether the cluster disables default in-node sNAT rules. In-node sNAT rules - // will be disabled when default_snat_status is disabled. When disabled is set - // to false, default IP masquerade rules will be applied to the nodes to - // prevent sNAT on cluster internal traffic. - DefaultSnatStatus default_snat_status = 7; - - // Whether L4ILB Subsetting is enabled for this cluster. - bool enable_l4ilb_subsetting = 10; - - // The desired datapath provider for this cluster. By default, uses the - // IPTables-based kube-proxy implementation. - DatapathProvider datapath_provider = 11; - - // The desired state of IPv6 connectivity to Google Services. - // By default, no private IPv6 access to or from Google Services (all access - // will be via IPv4) - PrivateIPv6GoogleAccess private_ipv6_google_access = 12; - - // DNSConfig contains clusterDNS config for this cluster. - DNSConfig dns_config = 13; - - // ServiceExternalIPsConfig specifies if services with externalIPs field are - // blocked or not. - ServiceExternalIPsConfig service_external_ips_config = 15; - - // GatewayAPIConfig contains the desired config of Gateway API on this - // cluster. - GatewayAPIConfig gateway_api_config = 16; - - // Whether multi-networking is enabled for this cluster. - bool enable_multi_networking = 17; - - // Network bandwidth tier configuration. - ClusterNetworkPerformanceConfig network_performance_config = 18; - - // Whether FQDN Network Policy is enabled on this cluster. - optional bool enable_fqdn_network_policy = 19; - - // Specify the details of in-transit encryption. - optional InTransitEncryptionConfig in_transit_encryption_config = 20; - - // Whether CiliumClusterWideNetworkPolicy is enabled on this cluster. - optional bool enable_cilium_clusterwide_network_policy = 21; -} - -// GatewayAPIConfig contains the desired config of Gateway API on this cluster. -message GatewayAPIConfig { - // Channel describes if/how Gateway API should be installed and implemented in - // a cluster. - enum Channel { - // Default value. - CHANNEL_UNSPECIFIED = 0; - - // Gateway API support is disabled - CHANNEL_DISABLED = 1; - - // Deprecated: use CHANNEL_STANDARD instead. - // Gateway API support is enabled, experimental CRDs are installed - CHANNEL_EXPERIMENTAL = 3 [deprecated = true]; - - // Gateway API support is enabled, standard CRDs are installed - CHANNEL_STANDARD = 4; - } - - // The Gateway API release channel to use for Gateway API. - Channel channel = 1; -} - -// Config to block services with externalIPs field. -message ServiceExternalIPsConfig { - // Whether Services with ExternalIPs field are allowed or not. - bool enabled = 1; -} - -// ListUsableSubnetworksRequest requests the list of usable subnetworks. -// available to a user for creating clusters. -message ListUsableSubnetworksRequest { - // Required. The parent project where subnetworks are usable. - // Specified in the format `projects/*`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Filtering currently only supports equality on the networkProjectId and must - // be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - // is the project which owns the listed subnetworks. This defaults to the - // parent project ID. - string filter = 2; - - // The max number of results per page that should be returned. If the number - // of available results is larger than `page_size`, a `next_page_token` is - // returned which can be used to get the next page of results in subsequent - // requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - int32 page_size = 3; - - // Specifies a page token to use. Set this to the nextPageToken returned by - // previous list requests to get the next page of results. - string page_token = 4; -} - -// ListUsableSubnetworksResponse is the response of -// ListUsableSubnetworksRequest. -message ListUsableSubnetworksResponse { - // A list of usable subnetworks in the specified network project. - repeated UsableSubnetwork subnetworks = 1; - - // This token allows you to get the next page of results for list requests. - // If the number of results is larger than `page_size`, use the - // `next_page_token` as a value for the query parameter `page_token` in the - // next request. The value will become empty when there are no more pages. - string next_page_token = 2; -} - -// Secondary IP range of a usable subnetwork. -message UsableSubnetworkSecondaryRange { - // Status shows the current usage of a secondary IP range. - enum Status { - // UNKNOWN is the zero value of the Status enum. It's not a valid status. - UNKNOWN = 0; - - // UNUSED denotes that this range is unclaimed by any cluster. - UNUSED = 1; - - // IN_USE_SERVICE denotes that this range is claimed by a cluster for - // services. It cannot be used for other clusters. - IN_USE_SERVICE = 2; - - // IN_USE_SHAREABLE_POD denotes this range was created by the network admin - // and is currently claimed by a cluster for pods. It can only be used by - // other clusters as a pod range. - IN_USE_SHAREABLE_POD = 3; - - // IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed - // for pods. It cannot be used for other clusters. - IN_USE_MANAGED_POD = 4; - } - - // The name associated with this subnetwork secondary range, used when adding - // an alias IP range to a VM instance. - string range_name = 1; - - // The range of IP addresses belonging to this subnetwork secondary range. - string ip_cidr_range = 2; - - // This field is to determine the status of the secondary range programmably. - Status status = 3; -} - -// UsableSubnetwork resource returns the subnetwork name, its associated network -// and the primary CIDR range. -message UsableSubnetwork { - // Subnetwork Name. - // Example: projects/my-project/regions/us-central1/subnetworks/my-subnet - string subnetwork = 1; - - // Network Name. - // Example: projects/my-project/global/networks/my-network - string network = 2; - - // The range of internal addresses that are owned by this subnetwork. - string ip_cidr_range = 3; - - // Secondary IP ranges. - repeated UsableSubnetworkSecondaryRange secondary_ip_ranges = 4; - - // A human readable status message representing the reasons for cases where - // the caller cannot use the secondary ranges under the subnet. For example if - // the secondary_ip_ranges is empty due to a permission issue, an insufficient - // permission message will be given by status_message. - string status_message = 5; -} - -// VerticalPodAutoscaling contains global, per-cluster information -// required by Vertical Pod Autoscaler to automatically adjust -// the resources of pods controlled by it. -message VerticalPodAutoscaling { - // Enables vertical pod autoscaling. - bool enabled = 1; -} - -// DefaultSnatStatus contains the desired state of whether default sNAT should -// be disabled on the cluster. -message DefaultSnatStatus { - // Disables cluster default sNAT rules. - bool disabled = 1; -} - -// IntraNodeVisibilityConfig contains the desired config of the intra-node -// visibility on this cluster. -message IntraNodeVisibilityConfig { - // Enables intra node visibility for this cluster. - bool enabled = 1; -} - -// ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer -// subsetting on this cluster. -message ILBSubsettingConfig { - // Enables l4 ILB subsetting for this cluster - bool enabled = 1; -} - -// DNSConfig contains the desired set of options for configuring clusterDNS. -message DNSConfig { - // Provider lists the various in-cluster DNS providers. - enum Provider { - // Default value - PROVIDER_UNSPECIFIED = 0; - - // Use GKE default DNS provider(kube-dns) for DNS resolution. - PLATFORM_DEFAULT = 1; - - // Use CloudDNS for DNS resolution. - CLOUD_DNS = 2; - - // Use KubeDNS for DNS resolution. - KUBE_DNS = 3; - } - - // DNSScope lists the various scopes of access to cluster DNS records. - enum DNSScope { - // Default value, will be inferred as cluster scope. - DNS_SCOPE_UNSPECIFIED = 0; - - // DNS records are accessible from within the cluster. - CLUSTER_SCOPE = 1; - - // DNS records are accessible from within the VPC. - VPC_SCOPE = 2; - } - - // cluster_dns indicates which in-cluster DNS provider should be used. - Provider cluster_dns = 1; - - // cluster_dns_scope indicates the scope of access to cluster DNS records. - DNSScope cluster_dns_scope = 2; - - // cluster_dns_domain is the suffix used for all cluster service records. - string cluster_dns_domain = 3; - - // Optional. The domain used in Additive VPC scope. - string additive_vpc_scope_dns_domain = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Constraints applied to pods. -message MaxPodsConstraint { - // Constraint enforced on the max num of pods per node. - int64 max_pods_per_node = 1; -} - -// Configuration for the use of Kubernetes Service Accounts in GCP IAM -// policies. -message WorkloadIdentityConfig { - // IAM Identity Namespace to attach all Kubernetes Service Accounts to. - string identity_namespace = 1 [deprecated = true]; - - // The workload pool to attach all Kubernetes service accounts to. - string workload_pool = 2; - - // identity provider is the third party identity provider. - string identity_provider = 3; -} - -// Configuration for direct-path (via ALTS) with workload identity. -message WorkloadALTSConfig { - // enable_alts controls whether the alts handshaker should be enabled or not - // for direct-path. - // - // Requires Workload Identity - // ([workload_pool][google.container.v1beta1.WorkloadIdentityConfig.workload_pool] - // must be non-empty). - google.protobuf.BoolValue enable_alts = 1; -} - -// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. -message WorkloadCertificates { - // enable_certificates controls issuance of workload mTLS certificates. - // - // If set, the GKE Workload Identity Certificates controller and node agent - // will be deployed in the cluster, which can then be configured by creating a - // WorkloadCertificateConfig Custom Resource. - // - // Requires Workload Identity - // ([workload_pool][google.container.v1beta1.WorkloadIdentityConfig.workload_pool] - // must be non-empty). - google.protobuf.BoolValue enable_certificates = 1; -} - -// Configuration for issuance of mTLS keys and certificates to Kubernetes pods. -message MeshCertificates { - // enable_certificates controls issuance of workload mTLS certificates. - // - // If set, the GKE Workload Identity Certificates controller and node agent - // will be deployed in the cluster, which can then be configured by creating a - // WorkloadCertificateConfig Custom Resource. - // - // Requires Workload Identity - // ([workload_pool][google.container.v1alpha1.WorkloadIdentityConfig.workload_pool] - // must be non-empty). - google.protobuf.BoolValue enable_certificates = 1; -} - -// Configuration of etcd encryption. -message DatabaseEncryption { - // State of etcd encryption. - enum State { - // Should never be set - UNKNOWN = 0; - - // Secrets in etcd are encrypted. - ENCRYPTED = 1; - - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - DECRYPTED = 2; - } - - // Current State of etcd encryption. - enum CurrentState { - // Should never be set - CURRENT_STATE_UNSPECIFIED = 0; - - // Secrets in etcd are encrypted. - CURRENT_STATE_ENCRYPTED = 7; - - // Secrets in etcd are stored in plain text (at etcd level) - this is - // unrelated to Compute Engine level full disk encryption. - CURRENT_STATE_DECRYPTED = 2; - - // Encryption (or re-encryption with a different CloudKMS key) - // of Secrets is in progress. - CURRENT_STATE_ENCRYPTION_PENDING = 3; - - // Encryption (or re-encryption with a different CloudKMS key) of Secrets in - // etcd encountered an error. - CURRENT_STATE_ENCRYPTION_ERROR = 4; - - // De-crypting Secrets to plain text in etcd is in progress. - CURRENT_STATE_DECRYPTION_PENDING = 5; - - // De-crypting Secrets to plain text in etcd encountered an error. - CURRENT_STATE_DECRYPTION_ERROR = 6; - } - - // OperationError records errors seen from CloudKMS keys - // encountered during updates to DatabaseEncryption configuration. - message OperationError { - // CloudKMS key resource that had the error. - string key_name = 1; - - // Description of the error seen during the operation. - string error_message = 2; - - // Time when the CloudKMS error was seen. - google.protobuf.Timestamp timestamp = 3; - } - - // Name of CloudKMS key to use for the encryption of secrets in etcd. - // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key - string key_name = 1; - - // The desired state of etcd encryption. - State state = 2; - - // Output only. The current state of etcd encryption. - optional CurrentState current_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Keys in use by the cluster for decrypting - // existing objects, in addition to the key in `key_name`. - // - // Each item is a CloudKMS key resource. - repeated string decryption_keys = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Records errors seen during DatabaseEncryption update - // operations. - repeated OperationError last_operation_errors = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration for exporting cluster resource usages. -message ResourceUsageExportConfig { - // Parameters for using BigQuery as the destination of resource usage export. - message BigQueryDestination { - // The ID of a BigQuery Dataset. - string dataset_id = 1; - } - - // Parameters for controlling consumption metering. - message ConsumptionMeteringConfig { - // Whether to enable consumption metering for this cluster. If enabled, a - // second BigQuery table will be created to hold resource consumption - // records. - bool enabled = 1; - } - - // Configuration to use BigQuery as usage export destination. - BigQueryDestination bigquery_destination = 1; - - // Whether to enable network egress metering for this cluster. If enabled, a - // daemonset will be created in the cluster to meter network egress traffic. - bool enable_network_egress_metering = 2; - - // Configuration to enable resource consumption metering. - ConsumptionMeteringConfig consumption_metering_config = 3; -} - -// Configuration of Shielded Nodes feature. -message ShieldedNodes { - // Whether Shielded Nodes features are enabled on all nodes in this cluster. - bool enabled = 1; -} - -// Configuration of gVNIC feature. -message VirtualNIC { - // Whether gVNIC features are enabled in the node pool. - bool enabled = 1; -} - -// Configuration of Fast Socket feature. -message FastSocket { - // Whether Fast Socket features are enabled in the node pool. - bool enabled = 1; -} - -// GetOpenIDConfigRequest gets the OIDC discovery document for the -// cluster. See the OpenID Connect Discovery 1.0 specification for details. -message GetOpenIDConfigRequest { - // The cluster (project, location, cluster name) to get the discovery document - // for. Specified in the format `projects/*/locations/*/clusters/*`. - string parent = 1; -} - -// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. -// See the OpenID Connect Discovery 1.0 specification for details. -message GetOpenIDConfigResponse { - // OIDC Issuer. - string issuer = 1; - - // JSON Web Key uri. - string jwks_uri = 2; - - // Supported response types. - repeated string response_types_supported = 3; - - // Supported subject types. - repeated string subject_types_supported = 4; - - // supported ID Token signing Algorithms. - repeated string id_token_signing_alg_values_supported = 5; - - // Supported claims. - repeated string claims_supported = 6; - - // Supported grant types. - repeated string grant_types = 7; -} - -// GetJSONWebKeysRequest gets the public component of the keys used by the -// cluster to sign token requests. This will be the jwks_uri for the discover -// document returned by getOpenIDConfig. See the OpenID Connect -// Discovery 1.0 specification for details. -message GetJSONWebKeysRequest { - // The cluster (project, location, cluster name) to get keys for. Specified in - // the format `projects/*/locations/*/clusters/*`. - string parent = 1; -} - -// Jwk is a JSON Web Key as specified in RFC 7517 -message Jwk { - // Key Type. - string kty = 1; - - // Algorithm. - string alg = 2; - - // Permitted uses for the public keys. - string use = 3; - - // Key ID. - string kid = 4; - - // Used for RSA keys. - string n = 5; - - // Used for RSA keys. - string e = 6; - - // Used for ECDSA keys. - string x = 7; - - // Used for ECDSA keys. - string y = 8; - - // Used for ECDSA keys. - string crv = 9; -} - -// GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517 -message GetJSONWebKeysResponse { - // The public component of the keys used by the cluster to sign token - // requests. - repeated Jwk keys = 1; -} - -// CheckAutopilotCompatibilityRequest requests getting the blockers for the -// given operation in the cluster. -message CheckAutopilotCompatibilityRequest { - // The name (project, location, cluster) of the cluster to retrieve. - // Specified in the format `projects/*/locations/*/clusters/*`. - string name = 1; -} - -// AutopilotCompatibilityIssue contains information about a specific -// compatibility issue with Autopilot mode. -message AutopilotCompatibilityIssue { - // The type of the reported issue. - enum IssueType { - // Default value, should not be used. - UNSPECIFIED = 0; - - // Indicates that the issue is a known incompatibility between the - // cluster and Autopilot mode. - INCOMPATIBILITY = 1; - - // Indicates the issue is an incompatibility if customers take no further - // action to resolve. - ADDITIONAL_CONFIG_REQUIRED = 2; - - // Indicates the issue is not an incompatibility, but depending on the - // workloads business logic, there is a potential that they won't work on - // Autopilot. - PASSED_WITH_OPTIONAL_CONFIG = 3; - } - - // The last time when this issue was observed. - google.protobuf.Timestamp last_observation = 1; - - // The constraint type of the issue. - string constraint_type = 2; - - // The incompatibility type of this issue. - IssueType incompatibility_type = 3; - - // The name of the resources which are subject to this issue. - repeated string subjects = 4; - - // A URL to a public documnetation, which addresses resolving this issue. - string documentation_url = 5; - - // The description of the issue. - string description = 6; -} - -// CheckAutopilotCompatibilityResponse has a list of compatibility issues. -message CheckAutopilotCompatibilityResponse { - // The list of issues for the given operation. - repeated AutopilotCompatibilityIssue issues = 1; - - // The summary of the autopilot compatibility response. - string summary = 2; -} - -// ReleaseChannel indicates which release channel a cluster is -// subscribed to. Release channels are arranged in order of risk. -// -// When a cluster is subscribed to a release channel, Google maintains -// both the master version and the node version. Node auto-upgrade -// defaults to true and cannot be disabled. -message ReleaseChannel { - // Possible values for 'channel'. - enum Channel { - // No channel specified. - UNSPECIFIED = 0; - - // RAPID channel is offered on an early access basis for customers who want - // to test new releases. - // - // WARNING: Versions available in the RAPID Channel may be subject to - // unresolved issues with no known workaround and are not subject to any - // SLAs. - RAPID = 1; - - // Clusters subscribed to REGULAR receive versions that are considered GA - // quality. REGULAR is intended for production users who want to take - // advantage of new features. - REGULAR = 2; - - // Clusters subscribed to STABLE receive versions that are known to be - // stable and reliable in production. - STABLE = 3; - - // Clusters subscribed to EXTENDED receive extended support and availability - // for versions which are known to be stable and reliable in production. - EXTENDED = 4; - } - - // channel specifies which release channel the cluster is subscribed to. - Channel channel = 1; -} - -// Configuration for fine-grained cost management feature. -message CostManagementConfig { - // Whether the feature is enabled or not. - bool enabled = 1; -} - -// Configuration for Cloud TPU. -message TpuConfig { - // Whether Cloud TPU integration is enabled or not. - bool enabled = 1; - - // Whether to use service networking for Cloud TPU or not. - bool use_service_networking = 2; - - // IPv4 CIDR block reserved for Cloud TPU in the VPC. - string ipv4_cidr_block = 3; -} - -// PrivateIPv6GoogleAccess controls whether and how the pods can communicate -// with Google Services through gRPC over IPv6. -enum PrivateIPv6GoogleAccess { - // Default value. Same as DISABLED - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - - // No private access to or from Google Services - PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1; - - // Enables private IPv6 access to Google Services from GKE - PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; - - // Enables private IPv6 access to and from Google Services - PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; -} - -// Master is the configuration for components on master. -message Master {} - -// AutopilotConversionStatus represents conversion status. -message AutopilotConversionStatus { - // The current state of the conversion. - enum State { - // STATE_UNSPECIFIED indicates the state is unspecified. - STATE_UNSPECIFIED = 0; - - // DONE indicates the conversion has been completed. Old node pools will - // continue being deleted in the background. - DONE = 5; - } - - // Output only. The current state of the conversion. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Autopilot is the configuration for Autopilot settings on the cluster. -message Autopilot { - // Enable Autopilot - bool enabled = 1; - - // Workload policy configuration for Autopilot. - WorkloadPolicyConfig workload_policy_config = 2; - - // Output only. ConversionStatus shows conversion status. - AutopilotConversionStatus conversion_status = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// WorkloadPolicyConfig is the configuration of workload policy for autopilot -// clusters. -message WorkloadPolicyConfig { - // If true, workloads can use NET_ADMIN capability. - optional bool allow_net_admin = 1; -} - -// NotificationConfig is the configuration of notifications. -message NotificationConfig { - // Types of notifications currently supported. Can be used to filter what - // notifications are sent. - enum EventType { - // Not set, will be ignored. - EVENT_TYPE_UNSPECIFIED = 0; - - // Corresponds with UpgradeAvailableEvent. - UPGRADE_AVAILABLE_EVENT = 1; - - // Corresponds with UpgradeEvent. - UPGRADE_EVENT = 2; - - // Corresponds with SecurityBulletinEvent. - SECURITY_BULLETIN_EVENT = 3; - } - - // Pub/Sub specific notification config. - message PubSub { - // Enable notifications for Pub/Sub. - bool enabled = 1; - - // The desired Pub/Sub topic to which notifications will be - // sent by GKE. Format is `projects/{project}/topics/{topic}`. - string topic = 2 [ - (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } - ]; - - // Allows filtering to one or more specific event types. If no filter is - // specified, or if a filter is specified with no event types, all event - // types will be sent - Filter filter = 3; - } - - // Allows filtering to one or more specific event types. If event types are - // present, those and only those event types will be transmitted to the - // cluster. Other types will be skipped. If no filter is specified, or no - // event types are present, all event types will be sent - message Filter { - // Event types to allowlist. - repeated EventType event_type = 1; - } - - // Notification config for Pub/Sub. - PubSub pubsub = 1; -} - -// ConfidentialNodes is configuration for the confidential nodes feature, which -// makes nodes run on confidential VMs. -message ConfidentialNodes { - // Whether Confidential Nodes feature is enabled. - bool enabled = 1; -} - -// UpgradeResourceType is the resource type that is upgrading. It is used -// in upgrade notifications. -enum UpgradeResourceType { - // Default value. This shouldn't be used. - UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0; - - // Master / control plane - MASTER = 1; - - // Node pool - NODE_POOL = 2; -} - -// UpgradeEvent is a notification sent to customers by the cluster server when -// a resource is upgrading. -message UpgradeEvent { - // The resource type that is upgrading. - UpgradeResourceType resource_type = 1; - - // The operation associated with this upgrade. - string operation = 2; - - // The time when the operation was started. - google.protobuf.Timestamp operation_start_time = 3; - - // The current version before the upgrade. - string current_version = 4; - - // The target version for the upgrade. - string target_version = 5; - - // Optional relative path to the resource. For example in node pool upgrades, - // the relative path of the node pool. - string resource = 6; -} - -// UpgradeAvailableEvent is a notification sent to customers when a new -// available version is released. -message UpgradeAvailableEvent { - // The release version available for upgrade. - string version = 1; - - // The resource type of the release version. - UpgradeResourceType resource_type = 2; - - // The release channel of the version. If empty, it means a non-channel - // release. - ReleaseChannel release_channel = 3; - - // Optional relative path to the resource. For example, the relative path of - // the node pool. - string resource = 4; - - // Windows node versions info. - WindowsVersions windows_versions = 5; -} - -// SecurityBulletinEvent is a notification sent to customers when a security -// bulletin has been posted that they are vulnerable to. -message SecurityBulletinEvent { - // The resource type (node/control plane) that has the vulnerability. Multiple - // notifications (1 notification per resource type) will be sent for a - // vulnerability that affects > 1 resource type. - string resource_type_affected = 1; - - // The ID of the bulletin corresponding to the vulnerability. - string bulletin_id = 2; - - // The CVEs associated with this bulletin. - repeated string cve_ids = 3; - - // The severity of this bulletin as it relates to GKE. - string severity = 4; - - // The URI link to the bulletin on the website for more information. - string bulletin_uri = 5; - - // A brief description of the bulletin. See the bulletin pointed to by the - // bulletin_uri field for an expanded description. - string brief_description = 6; - - // The GKE minor versions affected by this vulnerability. - repeated string affected_supported_minors = 7; - - // The GKE versions where this vulnerability is patched. - repeated string patched_versions = 8; - - // This represents a version selected from the patched_versions field that - // the cluster receiving this notification should most likely want to upgrade - // to based on its current version. Note that if this notification is being - // received by a given cluster, it means that this version is currently - // available as an upgrade target in that cluster's location. - string suggested_upgrade_target = 9; - - // If this field is specified, it means there are manual steps that the user - // must take to make their clusters safe. - bool manual_steps_required = 10; -} - -// IdentityServiceConfig is configuration for Identity Service which allows -// customers to use external identity providers with the K8S API -message IdentityServiceConfig { - // Whether to enable the Identity Service component - bool enabled = 1; -} - -// Strategy used for node pool update. -enum NodePoolUpdateStrategy { - // Default value if unset. GKE internally defaults the update strategy to - // SURGE for unspecified strategies. - NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0; - - // blue-green upgrade. - BLUE_GREEN = 2; - - // SURGE is the traditional way of upgrading a node pool. - // max_surge and max_unavailable determines the level of upgrade parallelism. - SURGE = 3; -} - -// LoggingConfig is cluster logging configuration. -message LoggingConfig { - // Logging components configuration - LoggingComponentConfig component_config = 1; -} - -// LoggingComponentConfig is cluster logging component configuration. -message LoggingComponentConfig { - // GKE components exposing logs - enum Component { - // Default value. This shouldn't be used. - COMPONENT_UNSPECIFIED = 0; - - // system components - SYSTEM_COMPONENTS = 1; - - // workloads - WORKLOADS = 2; - - // kube-apiserver - APISERVER = 3; - - // kube-scheduler - SCHEDULER = 4; - - // kube-controller-manager - CONTROLLER_MANAGER = 5; - } - - // Select components to collect logs. An empty set would disable all logging. - repeated Component enable_components = 1; -} - -// RayClusterLoggingConfig specifies logging configuration for Ray clusters. -message RayClusterLoggingConfig { - // Enable log collection for Ray clusters. - bool enabled = 1; -} - -// MonitoringConfig is cluster monitoring configuration. -message MonitoringConfig { - // Monitoring components configuration - MonitoringComponentConfig component_config = 1; - - // Enable Google Cloud Managed Service for Prometheus - // in the cluster. - ManagedPrometheusConfig managed_prometheus_config = 2; - - // Configuration of Advanced Datapath Observability features. - AdvancedDatapathObservabilityConfig advanced_datapath_observability_config = - 3; -} - -// AdvancedDatapathObservabilityConfig specifies configuration of observability -// features of advanced datapath. -message AdvancedDatapathObservabilityConfig { - // Supported Relay modes - enum RelayMode { - // Default value. This shouldn't be used. - RELAY_MODE_UNSPECIFIED = 0; - - // disabled - DISABLED = 1; - - // exposed via internal load balancer - INTERNAL_VPC_LB = 3; - - // exposed via external load balancer - EXTERNAL_LB = 4; - } - - // Expose flow metrics on nodes - bool enable_metrics = 1; - - // Method used to make Relay available - RelayMode relay_mode = 2; - - // Enable Relay component - optional bool enable_relay = 3; -} - -// RayClusterMonitoringConfig specifies monitoring configuration for Ray -// clusters. -message RayClusterMonitoringConfig { - // Enable metrics collection for Ray clusters. - bool enabled = 1; -} - -// NodePoolLoggingConfig specifies logging configuration for nodepools. -message NodePoolLoggingConfig { - // Logging variant configuration. - LoggingVariantConfig variant_config = 1; -} - -// LoggingVariantConfig specifies the behaviour of the logging component. -message LoggingVariantConfig { - // Logging component variants. - enum Variant { - // Default value. This shouldn't be used. - VARIANT_UNSPECIFIED = 0; - - // default logging variant. - DEFAULT = 1; - - // maximum logging throughput variant. - MAX_THROUGHPUT = 2; - } - - // Logging variant deployed on nodes. - Variant variant = 1; -} - -// MonitoringComponentConfig is cluster monitoring component configuration. -message MonitoringComponentConfig { - // GKE components exposing metrics - enum Component { - // Default value. This shouldn't be used. - COMPONENT_UNSPECIFIED = 0; - - // system components - SYSTEM_COMPONENTS = 1; - - // Deprecated: Use Google Cloud Managed Service for Prometheus. - WORKLOADS = 2 [deprecated = true]; - - // kube-apiserver - APISERVER = 3; - - // kube-scheduler - SCHEDULER = 4; - - // kube-controller-manager - CONTROLLER_MANAGER = 5; - - // Storage - STORAGE = 7; - - // Horizontal Pod Autoscaling - HPA = 8; - - // Pod - POD = 9; - - // DaemonSet - DAEMONSET = 10; - - // Deployment - DEPLOYMENT = 11; - - // Statefulset - STATEFULSET = 12; - - // CADVISOR - CADVISOR = 13; - - // KUBELET - KUBELET = 14; - - // NVIDIA Data Center GPU Manager (DCGM) - DCGM = 15; - } - - // Select components to collect metrics. An empty set would disable all - // monitoring. - repeated Component enable_components = 1; -} - -// The datapath provider selects the implementation of the Kubernetes networking -// model for service resolution and network policy enforcement. -enum DatapathProvider { - // Default value. - DATAPATH_PROVIDER_UNSPECIFIED = 0; - - // Use the IPTables implementation based on kube-proxy. - LEGACY_DATAPATH = 1; - - // Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE - // Dataplane V2 - // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) - // for more. - ADVANCED_DATAPATH = 2; -} - -// Fleet is the fleet configuration for the cluster. -message Fleet { - // The Fleet host project(project ID or project number) where this cluster - // will be registered to. This field cannot be changed after the cluster has - // been registered. - string project = 1; - - // Output only. The full resource name of the registered fleet membership of - // the cluster, in the format - // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. - string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether the cluster has been registered through the fleet - // API. - bool pre_registered = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Possible values for IP stack type -enum StackType { - // By default, the clusters will be IPV4 only - STACK_TYPE_UNSPECIFIED = 0; - - // The value used if the cluster is a IPV4 only - IPV4 = 1; - - // The value used if the cluster is a dual stack cluster - IPV4_IPV6 = 2; -} - -// A map of resource manager tag keys and values to be attached to the nodes -// for managing Compute Engine firewalls using Network Firewall Policies. -// Tags must be according to specifications in -// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. -// A maximum of 5 tag key-value pairs can be specified. -// Existing tags will be replaced with new values. -message ResourceManagerTags { - // Tags must be in one of the following formats ([KEY]=[VALUE]) - // 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` - // 2. `{org_id}/{tag_key_name}={tag_value_name}` - // 3. `{project_id}/{tag_key_name}={tag_value_name}` - map tags = 1; -} - -// EnterpriseConfig is the cluster enterprise configuration. -message EnterpriseConfig { - // Premium tiers for GKE Cluster. - enum ClusterTier { - // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. - CLUSTER_TIER_UNSPECIFIED = 0; - - // STANDARD indicates a standard GKE cluster. - STANDARD = 1; - - // ENTERPRISE indicates a GKE Enterprise cluster. - ENTERPRISE = 2; - } - - // Output only. cluster_tier specifies the premium tier of the cluster. - ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// SecretManagerConfig is config for secret manager enablement. -message SecretManagerConfig { - // Whether the cluster is configured to use secret manager CSI component. - optional bool enabled = 1; -} - -// SecondaryBootDisk represents a persistent disk attached to a node -// with special configurations based on its mode. -message SecondaryBootDisk { - // Mode specifies how the secondary boot disk will be used. - // This triggers mode-specified logic in the control plane. - enum Mode { - // MODE_UNSPECIFIED is when mode is not set. - MODE_UNSPECIFIED = 0; - - // CONTAINER_IMAGE_CACHE is for using the secondary boot disk as - // a container image cache. - CONTAINER_IMAGE_CACHE = 1; - } - - // Disk mode (container image cache, etc.) - Mode mode = 1; - - // Fully-qualified resource ID for an existing disk image. - string disk_image = 2; -} - -// Options for in-transit encryption. -enum InTransitEncryptionConfig { - // Unspecified, will be inferred as default - - // IN_TRANSIT_ENCRYPTION_UNSPECIFIED. - IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0; - - // In-transit encryption is disabled. - IN_TRANSIT_ENCRYPTION_DISABLED = 1; - - // Data in-transit is encrypted using inter-node transparent encryption. - IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2; -} - -// SecondaryBootDiskUpdateStrategy is a placeholder which will be extended -// in the future to define different options for updating secondary boot disks. -message SecondaryBootDiskUpdateStrategy {} diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts deleted file mode 100644 index 8e69f823acf..00000000000 --- a/owl-bot-staging/google-container/v1beta1/protos/protos.d.ts +++ /dev/null @@ -1,33578 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace container. */ - namespace container { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Represents a ClusterManager */ - class ClusterManager extends $protobuf.rpc.Service { - - /** - * Constructs a new ClusterManager 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 ClusterManager 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): ClusterManager; - - /** - * Calls ListClusters. - * @param request ListClustersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListClustersResponse - */ - public listClusters(request: google.container.v1beta1.IListClustersRequest, callback: google.container.v1beta1.ClusterManager.ListClustersCallback): void; - - /** - * Calls ListClusters. - * @param request ListClustersRequest message or plain object - * @returns Promise - */ - public listClusters(request: google.container.v1beta1.IListClustersRequest): Promise; - - /** - * Calls GetCluster. - * @param request GetClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Cluster - */ - public getCluster(request: google.container.v1beta1.IGetClusterRequest, callback: google.container.v1beta1.ClusterManager.GetClusterCallback): void; - - /** - * Calls GetCluster. - * @param request GetClusterRequest message or plain object - * @returns Promise - */ - public getCluster(request: google.container.v1beta1.IGetClusterRequest): Promise; - - /** - * Calls CreateCluster. - * @param request CreateClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createCluster(request: google.container.v1beta1.ICreateClusterRequest, callback: google.container.v1beta1.ClusterManager.CreateClusterCallback): void; - - /** - * Calls CreateCluster. - * @param request CreateClusterRequest message or plain object - * @returns Promise - */ - public createCluster(request: google.container.v1beta1.ICreateClusterRequest): Promise; - - /** - * Calls UpdateCluster. - * @param request UpdateClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateCluster(request: google.container.v1beta1.IUpdateClusterRequest, callback: google.container.v1beta1.ClusterManager.UpdateClusterCallback): void; - - /** - * Calls UpdateCluster. - * @param request UpdateClusterRequest message or plain object - * @returns Promise - */ - public updateCluster(request: google.container.v1beta1.IUpdateClusterRequest): Promise; - - /** - * Calls UpdateNodePool. - * @param request UpdateNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateNodePool(request: google.container.v1beta1.IUpdateNodePoolRequest, callback: google.container.v1beta1.ClusterManager.UpdateNodePoolCallback): void; - - /** - * Calls UpdateNodePool. - * @param request UpdateNodePoolRequest message or plain object - * @returns Promise - */ - public updateNodePool(request: google.container.v1beta1.IUpdateNodePoolRequest): Promise; - - /** - * Calls SetNodePoolAutoscaling. - * @param request SetNodePoolAutoscalingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolAutoscaling(request: google.container.v1beta1.ISetNodePoolAutoscalingRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolAutoscalingCallback): void; - - /** - * Calls SetNodePoolAutoscaling. - * @param request SetNodePoolAutoscalingRequest message or plain object - * @returns Promise - */ - public setNodePoolAutoscaling(request: google.container.v1beta1.ISetNodePoolAutoscalingRequest): Promise; - - /** - * Calls SetLoggingService. - * @param request SetLoggingServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLoggingService(request: google.container.v1beta1.ISetLoggingServiceRequest, callback: google.container.v1beta1.ClusterManager.SetLoggingServiceCallback): void; - - /** - * Calls SetLoggingService. - * @param request SetLoggingServiceRequest message or plain object - * @returns Promise - */ - public setLoggingService(request: google.container.v1beta1.ISetLoggingServiceRequest): Promise; - - /** - * Calls SetMonitoringService. - * @param request SetMonitoringServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMonitoringService(request: google.container.v1beta1.ISetMonitoringServiceRequest, callback: google.container.v1beta1.ClusterManager.SetMonitoringServiceCallback): void; - - /** - * Calls SetMonitoringService. - * @param request SetMonitoringServiceRequest message or plain object - * @returns Promise - */ - public setMonitoringService(request: google.container.v1beta1.ISetMonitoringServiceRequest): Promise; - - /** - * Calls SetAddonsConfig. - * @param request SetAddonsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setAddonsConfig(request: google.container.v1beta1.ISetAddonsConfigRequest, callback: google.container.v1beta1.ClusterManager.SetAddonsConfigCallback): void; - - /** - * Calls SetAddonsConfig. - * @param request SetAddonsConfigRequest message or plain object - * @returns Promise - */ - public setAddonsConfig(request: google.container.v1beta1.ISetAddonsConfigRequest): Promise; - - /** - * Calls SetLocations. - * @param request SetLocationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLocations(request: google.container.v1beta1.ISetLocationsRequest, callback: google.container.v1beta1.ClusterManager.SetLocationsCallback): void; - - /** - * Calls SetLocations. - * @param request SetLocationsRequest message or plain object - * @returns Promise - */ - public setLocations(request: google.container.v1beta1.ISetLocationsRequest): Promise; - - /** - * Calls UpdateMaster. - * @param request UpdateMasterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateMaster(request: google.container.v1beta1.IUpdateMasterRequest, callback: google.container.v1beta1.ClusterManager.UpdateMasterCallback): void; - - /** - * Calls UpdateMaster. - * @param request UpdateMasterRequest message or plain object - * @returns Promise - */ - public updateMaster(request: google.container.v1beta1.IUpdateMasterRequest): Promise; - - /** - * Calls SetMasterAuth. - * @param request SetMasterAuthRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMasterAuth(request: google.container.v1beta1.ISetMasterAuthRequest, callback: google.container.v1beta1.ClusterManager.SetMasterAuthCallback): void; - - /** - * Calls SetMasterAuth. - * @param request SetMasterAuthRequest message or plain object - * @returns Promise - */ - public setMasterAuth(request: google.container.v1beta1.ISetMasterAuthRequest): Promise; - - /** - * Calls DeleteCluster. - * @param request DeleteClusterRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteCluster(request: google.container.v1beta1.IDeleteClusterRequest, callback: google.container.v1beta1.ClusterManager.DeleteClusterCallback): void; - - /** - * Calls DeleteCluster. - * @param request DeleteClusterRequest message or plain object - * @returns Promise - */ - public deleteCluster(request: google.container.v1beta1.IDeleteClusterRequest): Promise; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.container.v1beta1.IListOperationsRequest, callback: google.container.v1beta1.ClusterManager.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.container.v1beta1.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.container.v1beta1.IGetOperationRequest, callback: google.container.v1beta1.ClusterManager.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.container.v1beta1.IGetOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.container.v1beta1.ICancelOperationRequest, callback: google.container.v1beta1.ClusterManager.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.container.v1beta1.ICancelOperationRequest): Promise; - - /** - * Calls GetServerConfig. - * @param request GetServerConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ServerConfig - */ - public getServerConfig(request: google.container.v1beta1.IGetServerConfigRequest, callback: google.container.v1beta1.ClusterManager.GetServerConfigCallback): void; - - /** - * Calls GetServerConfig. - * @param request GetServerConfigRequest message or plain object - * @returns Promise - */ - public getServerConfig(request: google.container.v1beta1.IGetServerConfigRequest): Promise; - - /** - * Calls GetJSONWebKeys. - * @param request GetJSONWebKeysRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse - */ - public getJSONWebKeys(request: google.container.v1beta1.IGetJSONWebKeysRequest, callback: google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback): void; - - /** - * Calls GetJSONWebKeys. - * @param request GetJSONWebKeysRequest message or plain object - * @returns Promise - */ - public getJSONWebKeys(request: google.container.v1beta1.IGetJSONWebKeysRequest): Promise; - - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse - */ - public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest, callback: google.container.v1beta1.ClusterManager.ListNodePoolsCallback): void; - - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @returns Promise - */ - public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest): Promise; - - /** - * Calls GetNodePool. - * @param request GetNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NodePool - */ - public getNodePool(request: google.container.v1beta1.IGetNodePoolRequest, callback: google.container.v1beta1.ClusterManager.GetNodePoolCallback): void; - - /** - * Calls GetNodePool. - * @param request GetNodePoolRequest message or plain object - * @returns Promise - */ - public getNodePool(request: google.container.v1beta1.IGetNodePoolRequest): Promise; - - /** - * Calls CreateNodePool. - * @param request CreateNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createNodePool(request: google.container.v1beta1.ICreateNodePoolRequest, callback: google.container.v1beta1.ClusterManager.CreateNodePoolCallback): void; - - /** - * Calls CreateNodePool. - * @param request CreateNodePoolRequest message or plain object - * @returns Promise - */ - public createNodePool(request: google.container.v1beta1.ICreateNodePoolRequest): Promise; - - /** - * Calls DeleteNodePool. - * @param request DeleteNodePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteNodePool(request: google.container.v1beta1.IDeleteNodePoolRequest, callback: google.container.v1beta1.ClusterManager.DeleteNodePoolCallback): void; - - /** - * Calls DeleteNodePool. - * @param request DeleteNodePoolRequest message or plain object - * @returns Promise - */ - public deleteNodePool(request: google.container.v1beta1.IDeleteNodePoolRequest): Promise; - - /** - * Calls CompleteNodePoolUpgrade. - * @param request CompleteNodePoolUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public completeNodePoolUpgrade(request: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, callback: google.container.v1beta1.ClusterManager.CompleteNodePoolUpgradeCallback): void; - - /** - * Calls CompleteNodePoolUpgrade. - * @param request CompleteNodePoolUpgradeRequest message or plain object - * @returns Promise - */ - public completeNodePoolUpgrade(request: google.container.v1beta1.ICompleteNodePoolUpgradeRequest): Promise; - - /** - * Calls RollbackNodePoolUpgrade. - * @param request RollbackNodePoolUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rollbackNodePoolUpgrade(request: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, callback: google.container.v1beta1.ClusterManager.RollbackNodePoolUpgradeCallback): void; - - /** - * Calls RollbackNodePoolUpgrade. - * @param request RollbackNodePoolUpgradeRequest message or plain object - * @returns Promise - */ - public rollbackNodePoolUpgrade(request: google.container.v1beta1.IRollbackNodePoolUpgradeRequest): Promise; - - /** - * Calls SetNodePoolManagement. - * @param request SetNodePoolManagementRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolManagement(request: google.container.v1beta1.ISetNodePoolManagementRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolManagementCallback): void; - - /** - * Calls SetNodePoolManagement. - * @param request SetNodePoolManagementRequest message or plain object - * @returns Promise - */ - public setNodePoolManagement(request: google.container.v1beta1.ISetNodePoolManagementRequest): Promise; - - /** - * Calls SetLabels. - * @param request SetLabelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLabels(request: google.container.v1beta1.ISetLabelsRequest, callback: google.container.v1beta1.ClusterManager.SetLabelsCallback): void; - - /** - * Calls SetLabels. - * @param request SetLabelsRequest message or plain object - * @returns Promise - */ - public setLabels(request: google.container.v1beta1.ISetLabelsRequest): Promise; - - /** - * Calls SetLegacyAbac. - * @param request SetLegacyAbacRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setLegacyAbac(request: google.container.v1beta1.ISetLegacyAbacRequest, callback: google.container.v1beta1.ClusterManager.SetLegacyAbacCallback): void; - - /** - * Calls SetLegacyAbac. - * @param request SetLegacyAbacRequest message or plain object - * @returns Promise - */ - public setLegacyAbac(request: google.container.v1beta1.ISetLegacyAbacRequest): Promise; - - /** - * Calls StartIPRotation. - * @param request StartIPRotationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public startIPRotation(request: google.container.v1beta1.IStartIPRotationRequest, callback: google.container.v1beta1.ClusterManager.StartIPRotationCallback): void; - - /** - * Calls StartIPRotation. - * @param request StartIPRotationRequest message or plain object - * @returns Promise - */ - public startIPRotation(request: google.container.v1beta1.IStartIPRotationRequest): Promise; - - /** - * Calls CompleteIPRotation. - * @param request CompleteIPRotationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public completeIPRotation(request: google.container.v1beta1.ICompleteIPRotationRequest, callback: google.container.v1beta1.ClusterManager.CompleteIPRotationCallback): void; - - /** - * Calls CompleteIPRotation. - * @param request CompleteIPRotationRequest message or plain object - * @returns Promise - */ - public completeIPRotation(request: google.container.v1beta1.ICompleteIPRotationRequest): Promise; - - /** - * Calls SetNodePoolSize. - * @param request SetNodePoolSizeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNodePoolSize(request: google.container.v1beta1.ISetNodePoolSizeRequest, callback: google.container.v1beta1.ClusterManager.SetNodePoolSizeCallback): void; - - /** - * Calls SetNodePoolSize. - * @param request SetNodePoolSizeRequest message or plain object - * @returns Promise - */ - public setNodePoolSize(request: google.container.v1beta1.ISetNodePoolSizeRequest): Promise; - - /** - * Calls SetNetworkPolicy. - * @param request SetNetworkPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setNetworkPolicy(request: google.container.v1beta1.ISetNetworkPolicyRequest, callback: google.container.v1beta1.ClusterManager.SetNetworkPolicyCallback): void; - - /** - * Calls SetNetworkPolicy. - * @param request SetNetworkPolicyRequest message or plain object - * @returns Promise - */ - public setNetworkPolicy(request: google.container.v1beta1.ISetNetworkPolicyRequest): Promise; - - /** - * Calls SetMaintenancePolicy. - * @param request SetMaintenancePolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setMaintenancePolicy(request: google.container.v1beta1.ISetMaintenancePolicyRequest, callback: google.container.v1beta1.ClusterManager.SetMaintenancePolicyCallback): void; - - /** - * Calls SetMaintenancePolicy. - * @param request SetMaintenancePolicyRequest message or plain object - * @returns Promise - */ - public setMaintenancePolicy(request: google.container.v1beta1.ISetMaintenancePolicyRequest): Promise; - - /** - * Calls ListUsableSubnetworks. - * @param request ListUsableSubnetworksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse - */ - public listUsableSubnetworks(request: google.container.v1beta1.IListUsableSubnetworksRequest, callback: google.container.v1beta1.ClusterManager.ListUsableSubnetworksCallback): void; - - /** - * Calls ListUsableSubnetworks. - * @param request ListUsableSubnetworksRequest message or plain object - * @returns Promise - */ - public listUsableSubnetworks(request: google.container.v1beta1.IListUsableSubnetworksRequest): Promise; - - /** - * Calls CheckAutopilotCompatibility. - * @param request CheckAutopilotCompatibilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse - */ - public checkAutopilotCompatibility(request: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, callback: google.container.v1beta1.ClusterManager.CheckAutopilotCompatibilityCallback): void; - - /** - * Calls CheckAutopilotCompatibility. - * @param request CheckAutopilotCompatibilityRequest message or plain object - * @returns Promise - */ - public checkAutopilotCompatibility(request: google.container.v1beta1.ICheckAutopilotCompatibilityRequest): Promise; - - /** - * Calls ListLocations. - * @param request ListLocationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLocationsResponse - */ - public listLocations(request: google.container.v1beta1.IListLocationsRequest, callback: google.container.v1beta1.ClusterManager.ListLocationsCallback): void; - - /** - * Calls ListLocations. - * @param request ListLocationsRequest message or plain object - * @returns Promise - */ - public listLocations(request: google.container.v1beta1.IListLocationsRequest): Promise; - } - - namespace ClusterManager { - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listClusters}. - * @param error Error, if any - * @param [response] ListClustersResponse - */ - type ListClustersCallback = (error: (Error|null), response?: google.container.v1beta1.ListClustersResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getCluster}. - * @param error Error, if any - * @param [response] Cluster - */ - type GetClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Cluster) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|createCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolAutoscaling}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolAutoscalingCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLoggingService}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLoggingServiceCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMonitoringService}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMonitoringServiceCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setAddonsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type SetAddonsConfigCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLocations}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLocationsCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateMaster}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateMasterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMasterAuth}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMasterAuthCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteCluster}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteClusterCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.container.v1beta1.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getServerConfig}. - * @param error Error, if any - * @param [response] ServerConfig - */ - type GetServerConfigCallback = (error: (Error|null), response?: google.container.v1beta1.ServerConfig) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. - * @param error Error, if any - * @param [response] GetJSONWebKeysResponse - */ - type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1beta1.GetJSONWebKeysResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. - * @param error Error, if any - * @param [response] ListNodePoolsResponse - */ - type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1beta1.ListNodePoolsResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getNodePool}. - * @param error Error, if any - * @param [response] NodePool - */ - type GetNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.NodePool) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|createNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteNodePool}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteNodePoolCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|completeNodePoolUpgrade}. - * @param error Error, if any - * @param [response] Empty - */ - type CompleteNodePoolUpgradeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|rollbackNodePoolUpgrade}. - * @param error Error, if any - * @param [response] Operation - */ - type RollbackNodePoolUpgradeCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolManagement}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolManagementCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLabels}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLabelsCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLegacyAbac}. - * @param error Error, if any - * @param [response] Operation - */ - type SetLegacyAbacCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|startIPRotation}. - * @param error Error, if any - * @param [response] Operation - */ - type StartIPRotationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|completeIPRotation}. - * @param error Error, if any - * @param [response] Operation - */ - type CompleteIPRotationCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolSize}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNodePoolSizeCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNetworkPolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type SetNetworkPolicyCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMaintenancePolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type SetMaintenancePolicyCallback = (error: (Error|null), response?: google.container.v1beta1.Operation) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listUsableSubnetworks}. - * @param error Error, if any - * @param [response] ListUsableSubnetworksResponse - */ - type ListUsableSubnetworksCallback = (error: (Error|null), response?: google.container.v1beta1.ListUsableSubnetworksResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|checkAutopilotCompatibility}. - * @param error Error, if any - * @param [response] CheckAutopilotCompatibilityResponse - */ - type CheckAutopilotCompatibilityCallback = (error: (Error|null), response?: google.container.v1beta1.CheckAutopilotCompatibilityResponse) => void; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listLocations}. - * @param error Error, if any - * @param [response] ListLocationsResponse - */ - type ListLocationsCallback = (error: (Error|null), response?: google.container.v1beta1.ListLocationsResponse) => void; - } - - /** Properties of a LinuxNodeConfig. */ - interface ILinuxNodeConfig { - - /** LinuxNodeConfig sysctls */ - sysctls?: ({ [k: string]: string }|null); - - /** LinuxNodeConfig cgroupMode */ - cgroupMode?: (google.container.v1beta1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1beta1.LinuxNodeConfig.CgroupMode|null); - - /** LinuxNodeConfig hugepages */ - hugepages?: (google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null); - } - - /** Represents a LinuxNodeConfig. */ - class LinuxNodeConfig implements ILinuxNodeConfig { - - /** - * Constructs a new LinuxNodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILinuxNodeConfig); - - /** LinuxNodeConfig sysctls. */ - public sysctls: { [k: string]: string }; - - /** LinuxNodeConfig cgroupMode. */ - public cgroupMode: (google.container.v1beta1.LinuxNodeConfig.CgroupMode|keyof typeof google.container.v1beta1.LinuxNodeConfig.CgroupMode); - - /** LinuxNodeConfig hugepages. */ - public hugepages?: (google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null); - - /** LinuxNodeConfig _hugepages. */ - public _hugepages?: "hugepages"; - - /** - * Creates a new LinuxNodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LinuxNodeConfig instance - */ - public static create(properties?: google.container.v1beta1.ILinuxNodeConfig): google.container.v1beta1.LinuxNodeConfig; - - /** - * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. - * @param message LinuxNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. - * @param message LinuxNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ILinuxNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LinuxNodeConfig; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LinuxNodeConfig; - - /** - * Verifies a LinuxNodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LinuxNodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LinuxNodeConfig; - - /** - * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. - * @param message LinuxNodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.LinuxNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LinuxNodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LinuxNodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LinuxNodeConfig { - - /** CgroupMode enum. */ - enum CgroupMode { - CGROUP_MODE_UNSPECIFIED = 0, - CGROUP_MODE_V1 = 1, - CGROUP_MODE_V2 = 2 - } - - /** Properties of a HugepagesConfig. */ - interface IHugepagesConfig { - - /** HugepagesConfig hugepageSize2m */ - hugepageSize2m?: (number|null); - - /** HugepagesConfig hugepageSize1g */ - hugepageSize1g?: (number|null); - } - - /** Represents a HugepagesConfig. */ - class HugepagesConfig implements IHugepagesConfig { - - /** - * Constructs a new HugepagesConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig); - - /** HugepagesConfig hugepageSize2m. */ - public hugepageSize2m?: (number|null); - - /** HugepagesConfig hugepageSize1g. */ - public hugepageSize1g?: (number|null); - - /** HugepagesConfig _hugepageSize2m. */ - public _hugepageSize2m?: "hugepageSize2m"; - - /** HugepagesConfig _hugepageSize1g. */ - public _hugepageSize1g?: "hugepageSize1g"; - - /** - * Creates a new HugepagesConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns HugepagesConfig instance - */ - public static create(properties?: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; - - /** - * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @param message HugepagesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @param message HugepagesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; - - /** - * Verifies a HugepagesConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HugepagesConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LinuxNodeConfig.HugepagesConfig; - - /** - * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. - * @param message HugepagesConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.LinuxNodeConfig.HugepagesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HugepagesConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HugepagesConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a WindowsNodeConfig. */ - interface IWindowsNodeConfig { - - /** WindowsNodeConfig osVersion */ - osVersion?: (google.container.v1beta1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1beta1.WindowsNodeConfig.OSVersion|null); - } - - /** Represents a WindowsNodeConfig. */ - class WindowsNodeConfig implements IWindowsNodeConfig { - - /** - * Constructs a new WindowsNodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWindowsNodeConfig); - - /** WindowsNodeConfig osVersion. */ - public osVersion: (google.container.v1beta1.WindowsNodeConfig.OSVersion|keyof typeof google.container.v1beta1.WindowsNodeConfig.OSVersion); - - /** - * Creates a new WindowsNodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsNodeConfig instance - */ - public static create(properties?: google.container.v1beta1.IWindowsNodeConfig): google.container.v1beta1.WindowsNodeConfig; - - /** - * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. - * @param message WindowsNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. - * @param message WindowsNodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWindowsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsNodeConfig; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsNodeConfig; - - /** - * Verifies a WindowsNodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsNodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsNodeConfig; - - /** - * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. - * @param message WindowsNodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WindowsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WindowsNodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WindowsNodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WindowsNodeConfig { - - /** OSVersion enum. */ - enum OSVersion { - OS_VERSION_UNSPECIFIED = 0, - OS_VERSION_LTSC2019 = 1, - OS_VERSION_LTSC2022 = 2 - } - } - - /** Properties of a NodeKubeletConfig. */ - interface INodeKubeletConfig { - - /** NodeKubeletConfig cpuManagerPolicy */ - cpuManagerPolicy?: (string|null); - - /** NodeKubeletConfig cpuCfsQuota */ - cpuCfsQuota?: (google.protobuf.IBoolValue|null); - - /** NodeKubeletConfig cpuCfsQuotaPeriod */ - cpuCfsQuotaPeriod?: (string|null); - - /** NodeKubeletConfig podPidsLimit */ - podPidsLimit?: (number|Long|string|null); - - /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled */ - insecureKubeletReadonlyPortEnabled?: (boolean|null); - } - - /** Represents a NodeKubeletConfig. */ - class NodeKubeletConfig implements INodeKubeletConfig { - - /** - * Constructs a new NodeKubeletConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeKubeletConfig); - - /** NodeKubeletConfig cpuManagerPolicy. */ - public cpuManagerPolicy: string; - - /** NodeKubeletConfig cpuCfsQuota. */ - public cpuCfsQuota?: (google.protobuf.IBoolValue|null); - - /** NodeKubeletConfig cpuCfsQuotaPeriod. */ - public cpuCfsQuotaPeriod: string; - - /** NodeKubeletConfig podPidsLimit. */ - public podPidsLimit: (number|Long|string); - - /** NodeKubeletConfig insecureKubeletReadonlyPortEnabled. */ - public insecureKubeletReadonlyPortEnabled?: (boolean|null); - - /** NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. */ - public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; - - /** - * Creates a new NodeKubeletConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeKubeletConfig instance - */ - public static create(properties?: google.container.v1beta1.INodeKubeletConfig): google.container.v1beta1.NodeKubeletConfig; - - /** - * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. - * @param message NodeKubeletConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. - * @param message NodeKubeletConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeKubeletConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeKubeletConfig; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeKubeletConfig; - - /** - * Verifies a NodeKubeletConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeKubeletConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeKubeletConfig; - - /** - * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. - * @param message NodeKubeletConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeKubeletConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeKubeletConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeKubeletConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfig. */ - interface INodeConfig { - - /** NodeConfig machineType */ - machineType?: (string|null); - - /** NodeConfig diskSizeGb */ - diskSizeGb?: (number|null); - - /** NodeConfig oauthScopes */ - oauthScopes?: (string[]|null); - - /** NodeConfig serviceAccount */ - serviceAccount?: (string|null); - - /** NodeConfig metadata */ - metadata?: ({ [k: string]: string }|null); - - /** NodeConfig imageType */ - imageType?: (string|null); - - /** NodeConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** NodeConfig localSsdCount */ - localSsdCount?: (number|null); - - /** NodeConfig tags */ - tags?: (string[]|null); - - /** NodeConfig preemptible */ - preemptible?: (boolean|null); - - /** NodeConfig accelerators */ - accelerators?: (google.container.v1beta1.IAcceleratorConfig[]|null); - - /** NodeConfig sandboxConfig */ - sandboxConfig?: (google.container.v1beta1.ISandboxConfig|null); - - /** NodeConfig nodeGroup */ - nodeGroup?: (string|null); - - /** NodeConfig reservationAffinity */ - reservationAffinity?: (google.container.v1beta1.IReservationAffinity|null); - - /** NodeConfig diskType */ - diskType?: (string|null); - - /** NodeConfig minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** NodeConfig workloadMetadataConfig */ - workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); - - /** NodeConfig taints */ - taints?: (google.container.v1beta1.INodeTaint[]|null); - - /** NodeConfig bootDiskKmsKey */ - bootDiskKmsKey?: (string|null); - - /** NodeConfig shieldedInstanceConfig */ - shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); - - /** NodeConfig linuxNodeConfig */ - linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); - - /** NodeConfig kubeletConfig */ - kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** NodeConfig ephemeralStorageConfig */ - ephemeralStorageConfig?: (google.container.v1beta1.IEphemeralStorageConfig|null); - - /** NodeConfig gcfsConfig */ - gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** NodeConfig advancedMachineFeatures */ - advancedMachineFeatures?: (google.container.v1beta1.IAdvancedMachineFeatures|null); - - /** NodeConfig gvnic */ - gvnic?: (google.container.v1beta1.IVirtualNIC|null); - - /** NodeConfig spot */ - spot?: (boolean|null); - - /** NodeConfig confidentialNodes */ - confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** NodeConfig fastSocket */ - fastSocket?: (google.container.v1beta1.IFastSocket|null); - - /** NodeConfig resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** NodeConfig loggingConfig */ - loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** NodeConfig windowsNodeConfig */ - windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); - - /** NodeConfig localNvmeSsdBlockConfig */ - localNvmeSsdBlockConfig?: (google.container.v1beta1.ILocalNvmeSsdBlockConfig|null); - - /** NodeConfig ephemeralStorageLocalSsdConfig */ - ephemeralStorageLocalSsdConfig?: (google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null); - - /** NodeConfig soleTenantConfig */ - soleTenantConfig?: (google.container.v1beta1.ISoleTenantConfig|null); - - /** NodeConfig containerdConfig */ - containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** NodeConfig hostMaintenancePolicy */ - hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** NodeConfig resourceManagerTags */ - resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** NodeConfig enableConfidentialStorage */ - enableConfidentialStorage?: (boolean|null); - - /** NodeConfig secondaryBootDisks */ - secondaryBootDisks?: (google.container.v1beta1.ISecondaryBootDisk[]|null); - - /** NodeConfig secondaryBootDiskUpdateStrategy */ - secondaryBootDiskUpdateStrategy?: (google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null); - } - - /** Represents a NodeConfig. */ - class NodeConfig implements INodeConfig { - - /** - * Constructs a new NodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeConfig); - - /** NodeConfig machineType. */ - public machineType: string; - - /** NodeConfig diskSizeGb. */ - public diskSizeGb: number; - - /** NodeConfig oauthScopes. */ - public oauthScopes: string[]; - - /** NodeConfig serviceAccount. */ - public serviceAccount: string; - - /** NodeConfig metadata. */ - public metadata: { [k: string]: string }; - - /** NodeConfig imageType. */ - public imageType: string; - - /** NodeConfig labels. */ - public labels: { [k: string]: string }; - - /** NodeConfig localSsdCount. */ - public localSsdCount: number; - - /** NodeConfig tags. */ - public tags: string[]; - - /** NodeConfig preemptible. */ - public preemptible: boolean; - - /** NodeConfig accelerators. */ - public accelerators: google.container.v1beta1.IAcceleratorConfig[]; - - /** NodeConfig sandboxConfig. */ - public sandboxConfig?: (google.container.v1beta1.ISandboxConfig|null); - - /** NodeConfig nodeGroup. */ - public nodeGroup: string; - - /** NodeConfig reservationAffinity. */ - public reservationAffinity?: (google.container.v1beta1.IReservationAffinity|null); - - /** NodeConfig diskType. */ - public diskType: string; - - /** NodeConfig minCpuPlatform. */ - public minCpuPlatform: string; - - /** NodeConfig workloadMetadataConfig. */ - public workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); - - /** NodeConfig taints. */ - public taints: google.container.v1beta1.INodeTaint[]; - - /** NodeConfig bootDiskKmsKey. */ - public bootDiskKmsKey: string; - - /** NodeConfig shieldedInstanceConfig. */ - public shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); - - /** NodeConfig linuxNodeConfig. */ - public linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); - - /** NodeConfig kubeletConfig. */ - public kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** NodeConfig ephemeralStorageConfig. */ - public ephemeralStorageConfig?: (google.container.v1beta1.IEphemeralStorageConfig|null); - - /** NodeConfig gcfsConfig. */ - public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** NodeConfig advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.container.v1beta1.IAdvancedMachineFeatures|null); - - /** NodeConfig gvnic. */ - public gvnic?: (google.container.v1beta1.IVirtualNIC|null); - - /** NodeConfig spot. */ - public spot: boolean; - - /** NodeConfig confidentialNodes. */ - public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** NodeConfig fastSocket. */ - public fastSocket?: (google.container.v1beta1.IFastSocket|null); - - /** NodeConfig resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** NodeConfig loggingConfig. */ - public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** NodeConfig windowsNodeConfig. */ - public windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); - - /** NodeConfig localNvmeSsdBlockConfig. */ - public localNvmeSsdBlockConfig?: (google.container.v1beta1.ILocalNvmeSsdBlockConfig|null); - - /** NodeConfig ephemeralStorageLocalSsdConfig. */ - public ephemeralStorageLocalSsdConfig?: (google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null); - - /** NodeConfig soleTenantConfig. */ - public soleTenantConfig?: (google.container.v1beta1.ISoleTenantConfig|null); - - /** NodeConfig containerdConfig. */ - public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** NodeConfig hostMaintenancePolicy. */ - public hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** NodeConfig resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** NodeConfig enableConfidentialStorage. */ - public enableConfidentialStorage: boolean; - - /** NodeConfig secondaryBootDisks. */ - public secondaryBootDisks: google.container.v1beta1.ISecondaryBootDisk[]; - - /** NodeConfig secondaryBootDiskUpdateStrategy. */ - public secondaryBootDiskUpdateStrategy?: (google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null); - - /** NodeConfig _fastSocket. */ - public _fastSocket?: "fastSocket"; - - /** NodeConfig _secondaryBootDiskUpdateStrategy. */ - public _secondaryBootDiskUpdateStrategy?: "secondaryBootDiskUpdateStrategy"; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfig instance - */ - public static create(properties?: google.container.v1beta1.INodeConfig): google.container.v1beta1.NodeConfig; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeConfig; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeConfig; - - /** - * Verifies a NodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeConfig; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @param message NodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { - - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|Long|string|null); - - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); - } - - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { - - /** - * Constructs a new AdvancedMachineFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|Long|string|null); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance - */ - public static create(properties?: google.container.v1beta1.IAdvancedMachineFeatures): google.container.v1beta1.AdvancedMachineFeatures; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdvancedMachineFeatures; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdvancedMachineFeatures; - - /** - * Verifies an AdvancedMachineFeatures message. - * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedMachineFeatures - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdvancedMachineFeatures; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeNetworkConfig. */ - interface INodeNetworkConfig { - - /** NodeNetworkConfig createPodRange */ - createPodRange?: (boolean|null); - - /** NodeNetworkConfig podRange */ - podRange?: (string|null); - - /** NodeNetworkConfig podIpv4CidrBlock */ - podIpv4CidrBlock?: (string|null); - - /** NodeNetworkConfig enablePrivateNodes */ - enablePrivateNodes?: (boolean|null); - - /** NodeNetworkConfig networkPerformanceConfig */ - networkPerformanceConfig?: (google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null); - - /** NodeNetworkConfig podCidrOverprovisionConfig */ - podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); - - /** NodeNetworkConfig additionalNodeNetworkConfigs */ - additionalNodeNetworkConfigs?: (google.container.v1beta1.IAdditionalNodeNetworkConfig[]|null); - - /** NodeNetworkConfig additionalPodNetworkConfigs */ - additionalPodNetworkConfigs?: (google.container.v1beta1.IAdditionalPodNetworkConfig[]|null); - - /** NodeNetworkConfig podIpv4RangeUtilization */ - podIpv4RangeUtilization?: (number|null); - } - - /** Represents a NodeNetworkConfig. */ - class NodeNetworkConfig implements INodeNetworkConfig { - - /** - * Constructs a new NodeNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeNetworkConfig); - - /** NodeNetworkConfig createPodRange. */ - public createPodRange: boolean; - - /** NodeNetworkConfig podRange. */ - public podRange: string; - - /** NodeNetworkConfig podIpv4CidrBlock. */ - public podIpv4CidrBlock: string; - - /** NodeNetworkConfig enablePrivateNodes. */ - public enablePrivateNodes?: (boolean|null); - - /** NodeNetworkConfig networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null); - - /** NodeNetworkConfig podCidrOverprovisionConfig. */ - public podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); - - /** NodeNetworkConfig additionalNodeNetworkConfigs. */ - public additionalNodeNetworkConfigs: google.container.v1beta1.IAdditionalNodeNetworkConfig[]; - - /** NodeNetworkConfig additionalPodNetworkConfigs. */ - public additionalPodNetworkConfigs: google.container.v1beta1.IAdditionalPodNetworkConfig[]; - - /** NodeNetworkConfig podIpv4RangeUtilization. */ - public podIpv4RangeUtilization: number; - - /** NodeNetworkConfig _enablePrivateNodes. */ - public _enablePrivateNodes?: "enablePrivateNodes"; - - /** NodeNetworkConfig _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** - * Creates a new NodeNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeNetworkConfig instance - */ - public static create(properties?: google.container.v1beta1.INodeNetworkConfig): google.container.v1beta1.NodeNetworkConfig; - - /** - * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. - * @param message NodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. - * @param message NodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeNetworkConfig; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeNetworkConfig; - - /** - * Verifies a NodeNetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeNetworkConfig; - - /** - * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. - * @param message NodeNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeNetworkConfig { - - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { - - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig externalIpEgressBandwidthTier */ - externalIpEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - } - - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { - - /** - * Constructs a new NetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig); - - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig externalIpEgressBandwidthTier. */ - public externalIpEgressBandwidthTier?: (google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** NetworkPerformanceConfig _externalIpEgressBandwidthTier. */ - public _externalIpEgressBandwidthTier?: "externalIpEgressBandwidthTier"; - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance - */ - public static create(properties?: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Verifies a NetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - TIER_1 = 1 - } - } - } - - /** Properties of an AdditionalNodeNetworkConfig. */ - interface IAdditionalNodeNetworkConfig { - - /** AdditionalNodeNetworkConfig network */ - network?: (string|null); - - /** AdditionalNodeNetworkConfig subnetwork */ - subnetwork?: (string|null); - } - - /** Represents an AdditionalNodeNetworkConfig. */ - class AdditionalNodeNetworkConfig implements IAdditionalNodeNetworkConfig { - - /** - * Constructs a new AdditionalNodeNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAdditionalNodeNetworkConfig); - - /** AdditionalNodeNetworkConfig network. */ - public network: string; - - /** AdditionalNodeNetworkConfig subnetwork. */ - public subnetwork: string; - - /** - * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalNodeNetworkConfig instance - */ - public static create(properties?: google.container.v1beta1.IAdditionalNodeNetworkConfig): google.container.v1beta1.AdditionalNodeNetworkConfig; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @param message AdditionalNodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @param message AdditionalNodeNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAdditionalNodeNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalNodeNetworkConfig; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalNodeNetworkConfig; - - /** - * Verifies an AdditionalNodeNetworkConfig message. - * @param message Plain 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 AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalNodeNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalNodeNetworkConfig; - - /** - * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. - * @param message AdditionalNodeNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AdditionalNodeNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalNodeNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalNodeNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdditionalPodNetworkConfig. */ - interface IAdditionalPodNetworkConfig { - - /** AdditionalPodNetworkConfig subnetwork */ - subnetwork?: (string|null); - - /** AdditionalPodNetworkConfig secondaryPodRange */ - secondaryPodRange?: (string|null); - - /** AdditionalPodNetworkConfig maxPodsPerNode */ - maxPodsPerNode?: (google.container.v1beta1.IMaxPodsConstraint|null); - } - - /** Represents an AdditionalPodNetworkConfig. */ - class AdditionalPodNetworkConfig implements IAdditionalPodNetworkConfig { - - /** - * Constructs a new AdditionalPodNetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAdditionalPodNetworkConfig); - - /** AdditionalPodNetworkConfig subnetwork. */ - public subnetwork: string; - - /** AdditionalPodNetworkConfig secondaryPodRange. */ - public secondaryPodRange: string; - - /** AdditionalPodNetworkConfig maxPodsPerNode. */ - public maxPodsPerNode?: (google.container.v1beta1.IMaxPodsConstraint|null); - - /** AdditionalPodNetworkConfig _maxPodsPerNode. */ - public _maxPodsPerNode?: "maxPodsPerNode"; - - /** - * Creates a new AdditionalPodNetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalPodNetworkConfig instance - */ - public static create(properties?: google.container.v1beta1.IAdditionalPodNetworkConfig): google.container.v1beta1.AdditionalPodNetworkConfig; - - /** - * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. - * @param message AdditionalPodNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. - * @param message AdditionalPodNetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAdditionalPodNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalPodNetworkConfig; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalPodNetworkConfig; - - /** - * Verifies an AdditionalPodNetworkConfig message. - * @param message Plain 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 AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalPodNetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalPodNetworkConfig; - - /** - * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. - * @param message AdditionalPodNetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AdditionalPodNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalPodNetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalPodNetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShieldedInstanceConfig. */ - interface IShieldedInstanceConfig { - - /** ShieldedInstanceConfig enableSecureBoot */ - enableSecureBoot?: (boolean|null); - - /** ShieldedInstanceConfig enableIntegrityMonitoring */ - enableIntegrityMonitoring?: (boolean|null); - } - - /** Represents a ShieldedInstanceConfig. */ - class ShieldedInstanceConfig implements IShieldedInstanceConfig { - - /** - * Constructs a new ShieldedInstanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IShieldedInstanceConfig); - - /** ShieldedInstanceConfig enableSecureBoot. */ - public enableSecureBoot: boolean; - - /** ShieldedInstanceConfig enableIntegrityMonitoring. */ - public enableIntegrityMonitoring: boolean; - - /** - * Creates a new ShieldedInstanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ShieldedInstanceConfig instance - */ - public static create(properties?: google.container.v1beta1.IShieldedInstanceConfig): google.container.v1beta1.ShieldedInstanceConfig; - - /** - * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. - * @param message ShieldedInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. - * @param message ShieldedInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IShieldedInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ShieldedInstanceConfig; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ShieldedInstanceConfig; - - /** - * Verifies a ShieldedInstanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShieldedInstanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ShieldedInstanceConfig; - - /** - * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. - * @param message ShieldedInstanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ShieldedInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShieldedInstanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShieldedInstanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SandboxConfig. */ - interface ISandboxConfig { - - /** SandboxConfig sandboxType */ - sandboxType?: (string|null); - - /** SandboxConfig type */ - type?: (google.container.v1beta1.SandboxConfig.Type|keyof typeof google.container.v1beta1.SandboxConfig.Type|null); - } - - /** Represents a SandboxConfig. */ - class SandboxConfig implements ISandboxConfig { - - /** - * Constructs a new SandboxConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISandboxConfig); - - /** SandboxConfig sandboxType. */ - public sandboxType: string; - - /** SandboxConfig type. */ - public type: (google.container.v1beta1.SandboxConfig.Type|keyof typeof google.container.v1beta1.SandboxConfig.Type); - - /** - * Creates a new SandboxConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SandboxConfig instance - */ - public static create(properties?: google.container.v1beta1.ISandboxConfig): google.container.v1beta1.SandboxConfig; - - /** - * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. - * @param message SandboxConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. - * @param message SandboxConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISandboxConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SandboxConfig; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SandboxConfig; - - /** - * Verifies a SandboxConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SandboxConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SandboxConfig; - - /** - * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. - * @param message SandboxConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SandboxConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SandboxConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SandboxConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SandboxConfig { - - /** Type enum. */ - enum Type { - UNSPECIFIED = 0, - GVISOR = 1 - } - } - - /** Properties of an EphemeralStorageConfig. */ - interface IEphemeralStorageConfig { - - /** EphemeralStorageConfig localSsdCount */ - localSsdCount?: (number|null); - } - - /** Represents an EphemeralStorageConfig. */ - class EphemeralStorageConfig implements IEphemeralStorageConfig { - - /** - * Constructs a new EphemeralStorageConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IEphemeralStorageConfig); - - /** EphemeralStorageConfig localSsdCount. */ - public localSsdCount: number; - - /** - * Creates a new EphemeralStorageConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EphemeralStorageConfig instance - */ - public static create(properties?: google.container.v1beta1.IEphemeralStorageConfig): google.container.v1beta1.EphemeralStorageConfig; - - /** - * Encodes the specified EphemeralStorageConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. - * @param message EphemeralStorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IEphemeralStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EphemeralStorageConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. - * @param message EphemeralStorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IEphemeralStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EphemeralStorageConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EphemeralStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EphemeralStorageConfig; - - /** - * Decodes an EphemeralStorageConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EphemeralStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EphemeralStorageConfig; - - /** - * Verifies an EphemeralStorageConfig message. - * @param message Plain 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 EphemeralStorageConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EphemeralStorageConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EphemeralStorageConfig; - - /** - * Creates a plain object from an EphemeralStorageConfig message. Also converts values to other types if specified. - * @param message EphemeralStorageConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.EphemeralStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EphemeralStorageConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EphemeralStorageConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LocalNvmeSsdBlockConfig. */ - interface ILocalNvmeSsdBlockConfig { - - /** LocalNvmeSsdBlockConfig localSsdCount */ - localSsdCount?: (number|null); - } - - /** Represents a LocalNvmeSsdBlockConfig. */ - class LocalNvmeSsdBlockConfig implements ILocalNvmeSsdBlockConfig { - - /** - * Constructs a new LocalNvmeSsdBlockConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILocalNvmeSsdBlockConfig); - - /** LocalNvmeSsdBlockConfig localSsdCount. */ - public localSsdCount: number; - - /** - * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalNvmeSsdBlockConfig instance - */ - public static create(properties?: google.container.v1beta1.ILocalNvmeSsdBlockConfig): google.container.v1beta1.LocalNvmeSsdBlockConfig; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @param message LocalNvmeSsdBlockConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @param message LocalNvmeSsdBlockConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ILocalNvmeSsdBlockConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LocalNvmeSsdBlockConfig; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LocalNvmeSsdBlockConfig; - - /** - * Verifies a LocalNvmeSsdBlockConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalNvmeSsdBlockConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LocalNvmeSsdBlockConfig; - - /** - * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. - * @param message LocalNvmeSsdBlockConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.LocalNvmeSsdBlockConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalNvmeSsdBlockConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalNvmeSsdBlockConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EphemeralStorageLocalSsdConfig. */ - interface IEphemeralStorageLocalSsdConfig { - - /** EphemeralStorageLocalSsdConfig localSsdCount */ - localSsdCount?: (number|null); - } - - /** Represents an EphemeralStorageLocalSsdConfig. */ - class EphemeralStorageLocalSsdConfig implements IEphemeralStorageLocalSsdConfig { - - /** - * Constructs a new EphemeralStorageLocalSsdConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IEphemeralStorageLocalSsdConfig); - - /** EphemeralStorageLocalSsdConfig localSsdCount. */ - public localSsdCount: number; - - /** - * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EphemeralStorageLocalSsdConfig instance - */ - public static create(properties?: google.container.v1beta1.IEphemeralStorageLocalSsdConfig): google.container.v1beta1.EphemeralStorageLocalSsdConfig; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @param message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @param message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IEphemeralStorageLocalSsdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EphemeralStorageLocalSsdConfig; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EphemeralStorageLocalSsdConfig; - - /** - * Verifies an EphemeralStorageLocalSsdConfig message. - * @param message Plain 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 EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EphemeralStorageLocalSsdConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EphemeralStorageLocalSsdConfig; - - /** - * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. - * @param message EphemeralStorageLocalSsdConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.EphemeralStorageLocalSsdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EphemeralStorageLocalSsdConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EphemeralStorageLocalSsdConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcfsConfig. */ - interface IGcfsConfig { - - /** GcfsConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcfsConfig. */ - class GcfsConfig implements IGcfsConfig { - - /** - * Constructs a new GcfsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGcfsConfig); - - /** GcfsConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcfsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcfsConfig instance - */ - public static create(properties?: google.container.v1beta1.IGcfsConfig): google.container.v1beta1.GcfsConfig; - - /** - * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. - * @param message GcfsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. - * @param message GcfsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGcfsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcfsConfig; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcfsConfig; - - /** - * Verifies a GcfsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcfsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcfsConfig; - - /** - * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. - * @param message GcfsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GcfsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcfsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcfsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservationAffinity. */ - interface IReservationAffinity { - - /** ReservationAffinity consumeReservationType */ - consumeReservationType?: (google.container.v1beta1.ReservationAffinity.Type|keyof typeof google.container.v1beta1.ReservationAffinity.Type|null); - - /** ReservationAffinity key */ - key?: (string|null); - - /** ReservationAffinity values */ - values?: (string[]|null); - } - - /** Represents a ReservationAffinity. */ - class ReservationAffinity implements IReservationAffinity { - - /** - * Constructs a new ReservationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IReservationAffinity); - - /** ReservationAffinity consumeReservationType. */ - public consumeReservationType: (google.container.v1beta1.ReservationAffinity.Type|keyof typeof google.container.v1beta1.ReservationAffinity.Type); - - /** ReservationAffinity key. */ - public key: string; - - /** ReservationAffinity values. */ - public values: string[]; - - /** - * Creates a new ReservationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservationAffinity instance - */ - public static create(properties?: google.container.v1beta1.IReservationAffinity): google.container.v1beta1.ReservationAffinity; - - /** - * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. - * @param message ReservationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. - * @param message ReservationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IReservationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ReservationAffinity; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ReservationAffinity; - - /** - * Verifies a ReservationAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ReservationAffinity; - - /** - * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. - * @param message ReservationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ReservationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReservationAffinity { - - /** Type enum. */ - enum Type { - UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } - - /** Properties of a SoleTenantConfig. */ - interface ISoleTenantConfig { - - /** SoleTenantConfig nodeAffinities */ - nodeAffinities?: (google.container.v1beta1.SoleTenantConfig.INodeAffinity[]|null); - } - - /** Represents a SoleTenantConfig. */ - class SoleTenantConfig implements ISoleTenantConfig { - - /** - * Constructs a new SoleTenantConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISoleTenantConfig); - - /** SoleTenantConfig nodeAffinities. */ - public nodeAffinities: google.container.v1beta1.SoleTenantConfig.INodeAffinity[]; - - /** - * Creates a new SoleTenantConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SoleTenantConfig instance - */ - public static create(properties?: google.container.v1beta1.ISoleTenantConfig): google.container.v1beta1.SoleTenantConfig; - - /** - * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. - * @param message SoleTenantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. - * @param message SoleTenantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISoleTenantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SoleTenantConfig; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SoleTenantConfig; - - /** - * Verifies a SoleTenantConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoleTenantConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SoleTenantConfig; - - /** - * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. - * @param message SoleTenantConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SoleTenantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SoleTenantConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SoleTenantConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SoleTenantConfig { - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.SoleTenantConfig.INodeAffinity); - - /** NodeAffinity key. */ - public key: string; - - /** NodeAffinity operator. */ - public operator: (google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|keyof typeof google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator); - - /** NodeAffinity values. */ - public values: string[]; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.container.v1beta1.SoleTenantConfig.INodeAffinity): google.container.v1beta1.SoleTenantConfig.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.SoleTenantConfig.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SoleTenantConfig.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SoleTenantConfig.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SoleTenantConfig.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SoleTenantConfig.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - } - - /** Properties of a ContainerdConfig. */ - interface IContainerdConfig { - - /** ContainerdConfig privateRegistryAccessConfig */ - privateRegistryAccessConfig?: (google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null); - } - - /** Represents a ContainerdConfig. */ - class ContainerdConfig implements IContainerdConfig { - - /** - * Constructs a new ContainerdConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IContainerdConfig); - - /** ContainerdConfig privateRegistryAccessConfig. */ - public privateRegistryAccessConfig?: (google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null); - - /** - * Creates a new ContainerdConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ContainerdConfig instance - */ - public static create(properties?: google.container.v1beta1.IContainerdConfig): google.container.v1beta1.ContainerdConfig; - - /** - * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. - * @param message ContainerdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. - * @param message ContainerdConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IContainerdConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig; - - /** - * Verifies a ContainerdConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContainerdConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig; - - /** - * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. - * @param message ContainerdConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ContainerdConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContainerdConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContainerdConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ContainerdConfig { - - /** Properties of a PrivateRegistryAccessConfig. */ - interface IPrivateRegistryAccessConfig { - - /** PrivateRegistryAccessConfig enabled */ - enabled?: (boolean|null); - - /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig */ - certificateAuthorityDomainConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]|null); - } - - /** Represents a PrivateRegistryAccessConfig. */ - class PrivateRegistryAccessConfig implements IPrivateRegistryAccessConfig { - - /** - * Constructs a new PrivateRegistryAccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig); - - /** PrivateRegistryAccessConfig enabled. */ - public enabled: boolean; - - /** PrivateRegistryAccessConfig certificateAuthorityDomainConfig. */ - public certificateAuthorityDomainConfig: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig[]; - - /** - * Creates a new PrivateRegistryAccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateRegistryAccessConfig instance - */ - public static create(properties?: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @param message PrivateRegistryAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @param message PrivateRegistryAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Verifies a PrivateRegistryAccessConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateRegistryAccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig; - - /** - * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. - * @param message PrivateRegistryAccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateRegistryAccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateRegistryAccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PrivateRegistryAccessConfig { - - /** Properties of a CertificateAuthorityDomainConfig. */ - interface ICertificateAuthorityDomainConfig { - - /** CertificateAuthorityDomainConfig fqdns */ - fqdns?: (string[]|null); - - /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig */ - gcpSecretManagerCertificateConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); - } - - /** Represents a CertificateAuthorityDomainConfig. */ - class CertificateAuthorityDomainConfig implements ICertificateAuthorityDomainConfig { - - /** - * Constructs a new CertificateAuthorityDomainConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig); - - /** CertificateAuthorityDomainConfig fqdns. */ - public fqdns: string[]; - - /** CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. */ - public gcpSecretManagerCertificateConfig?: (google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null); - - /** CertificateAuthorityDomainConfig certificateConfig. */ - public certificateConfig?: "gcpSecretManagerCertificateConfig"; - - /** - * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CertificateAuthorityDomainConfig instance - */ - public static create(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @param message CertificateAuthorityDomainConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @param message CertificateAuthorityDomainConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Verifies a CertificateAuthorityDomainConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CertificateAuthorityDomainConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig; - - /** - * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. - * @param message CertificateAuthorityDomainConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CertificateAuthorityDomainConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CertificateAuthorityDomainConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CertificateAuthorityDomainConfig { - - /** Properties of a GCPSecretManagerCertificateConfig. */ - interface IGCPSecretManagerCertificateConfig { - - /** GCPSecretManagerCertificateConfig secretUri */ - secretUri?: (string|null); - } - - /** Represents a GCPSecretManagerCertificateConfig. */ - class GCPSecretManagerCertificateConfig implements IGCPSecretManagerCertificateConfig { - - /** - * Constructs a new GCPSecretManagerCertificateConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig); - - /** GCPSecretManagerCertificateConfig secretUri. */ - public secretUri: string; - - /** - * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GCPSecretManagerCertificateConfig instance - */ - public static create(properties?: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @param message GCPSecretManagerCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @param message GCPSecretManagerCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Verifies a GCPSecretManagerCertificateConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCPSecretManagerCertificateConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig; - - /** - * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. - * @param message GCPSecretManagerCertificateConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCPSecretManagerCertificateConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCPSecretManagerCertificateConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Properties of a HostMaintenancePolicy. */ - interface IHostMaintenancePolicy { - - /** HostMaintenancePolicy maintenanceInterval */ - maintenanceInterval?: (google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|keyof typeof google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null); - - /** HostMaintenancePolicy opportunisticMaintenanceStrategy */ - opportunisticMaintenanceStrategy?: (google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null); - } - - /** Represents a HostMaintenancePolicy. */ - class HostMaintenancePolicy implements IHostMaintenancePolicy { - - /** - * Constructs a new HostMaintenancePolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IHostMaintenancePolicy); - - /** HostMaintenancePolicy maintenanceInterval. */ - public maintenanceInterval?: (google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|keyof typeof google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null); - - /** HostMaintenancePolicy opportunisticMaintenanceStrategy. */ - public opportunisticMaintenanceStrategy?: (google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null); - - /** HostMaintenancePolicy _maintenanceInterval. */ - public _maintenanceInterval?: "maintenanceInterval"; - - /** HostMaintenancePolicy maintenanceStrategy. */ - public maintenanceStrategy?: "opportunisticMaintenanceStrategy"; - - /** - * Creates a new HostMaintenancePolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns HostMaintenancePolicy instance - */ - public static create(properties?: google.container.v1beta1.IHostMaintenancePolicy): google.container.v1beta1.HostMaintenancePolicy; - - /** - * Encodes the specified HostMaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. - * @param message HostMaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IHostMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HostMaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. - * @param message HostMaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IHostMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HostMaintenancePolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HostMaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HostMaintenancePolicy; - - /** - * Decodes a HostMaintenancePolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HostMaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HostMaintenancePolicy; - - /** - * Verifies a HostMaintenancePolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HostMaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HostMaintenancePolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HostMaintenancePolicy; - - /** - * Creates a plain object from a HostMaintenancePolicy message. Also converts values to other types if specified. - * @param message HostMaintenancePolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.HostMaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HostMaintenancePolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HostMaintenancePolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace HostMaintenancePolicy { - - /** MaintenanceInterval enum. */ - enum MaintenanceInterval { - MAINTENANCE_INTERVAL_UNSPECIFIED = 0, - AS_NEEDED = 1, - PERIODIC = 2 - } - - /** Properties of an OpportunisticMaintenanceStrategy. */ - interface IOpportunisticMaintenanceStrategy { - - /** OpportunisticMaintenanceStrategy nodeIdleTimeWindow */ - nodeIdleTimeWindow?: (google.protobuf.IDuration|null); - - /** OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow */ - maintenanceAvailabilityWindow?: (google.protobuf.IDuration|null); - - /** OpportunisticMaintenanceStrategy minNodesPerPool */ - minNodesPerPool?: (number|Long|string|null); - } - - /** Represents an OpportunisticMaintenanceStrategy. */ - class OpportunisticMaintenanceStrategy implements IOpportunisticMaintenanceStrategy { - - /** - * Constructs a new OpportunisticMaintenanceStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy); - - /** OpportunisticMaintenanceStrategy nodeIdleTimeWindow. */ - public nodeIdleTimeWindow?: (google.protobuf.IDuration|null); - - /** OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow. */ - public maintenanceAvailabilityWindow?: (google.protobuf.IDuration|null); - - /** OpportunisticMaintenanceStrategy minNodesPerPool. */ - public minNodesPerPool?: (number|Long|string|null); - - /** OpportunisticMaintenanceStrategy _nodeIdleTimeWindow. */ - public _nodeIdleTimeWindow?: "nodeIdleTimeWindow"; - - /** OpportunisticMaintenanceStrategy _maintenanceAvailabilityWindow. */ - public _maintenanceAvailabilityWindow?: "maintenanceAvailabilityWindow"; - - /** OpportunisticMaintenanceStrategy _minNodesPerPool. */ - public _minNodesPerPool?: "minNodesPerPool"; - - /** - * Creates a new OpportunisticMaintenanceStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns OpportunisticMaintenanceStrategy instance - */ - public static create(properties?: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; - - /** - * Encodes the specified OpportunisticMaintenanceStrategy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. - * @param message OpportunisticMaintenanceStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OpportunisticMaintenanceStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. - * @param message OpportunisticMaintenanceStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OpportunisticMaintenanceStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; - - /** - * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OpportunisticMaintenanceStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; - - /** - * Verifies an OpportunisticMaintenanceStrategy message. - * @param message Plain 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 OpportunisticMaintenanceStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OpportunisticMaintenanceStrategy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy; - - /** - * Creates a plain object from an OpportunisticMaintenanceStrategy message. Also converts values to other types if specified. - * @param message OpportunisticMaintenanceStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OpportunisticMaintenanceStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OpportunisticMaintenanceStrategy - * @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.container.v1beta1.NodeTaint.Effect|keyof typeof google.container.v1beta1.NodeTaint.Effect|null); - } - - /** Represents a NodeTaint. */ - class NodeTaint implements INodeTaint { - - /** - * Constructs a new NodeTaint. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeTaint); - - /** NodeTaint key. */ - public key: string; - - /** NodeTaint value. */ - public value: string; - - /** NodeTaint effect. */ - public effect: (google.container.v1beta1.NodeTaint.Effect|keyof typeof google.container.v1beta1.NodeTaint.Effect); - - /** - * Creates a new NodeTaint instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeTaint instance - */ - public static create(properties?: google.container.v1beta1.INodeTaint): google.container.v1beta1.NodeTaint; - - /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 NodeTaints. */ - interface INodeTaints { - - /** NodeTaints taints */ - taints?: (google.container.v1beta1.INodeTaint[]|null); - } - - /** Represents a NodeTaints. */ - class NodeTaints implements INodeTaints { - - /** - * Constructs a new NodeTaints. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeTaints); - - /** NodeTaints taints. */ - public taints: google.container.v1beta1.INodeTaint[]; - - /** - * Creates a new NodeTaints instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeTaints instance - */ - public static create(properties?: google.container.v1beta1.INodeTaints): google.container.v1beta1.NodeTaints; - - /** - * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. - * @param message NodeTaints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. - * @param message NodeTaints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeTaints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeTaints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeTaints; - - /** - * Decodes a NodeTaints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeTaints; - - /** - * Verifies a NodeTaints message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeTaints - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeTaints; - - /** - * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. - * @param message NodeTaints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeTaints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeTaints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeTaints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeLabels. */ - interface INodeLabels { - - /** NodeLabels labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a NodeLabels. */ - class NodeLabels implements INodeLabels { - - /** - * Constructs a new NodeLabels. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeLabels); - - /** NodeLabels labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new NodeLabels instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeLabels instance - */ - public static create(properties?: google.container.v1beta1.INodeLabels): google.container.v1beta1.NodeLabels; - - /** - * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. - * @param message NodeLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. - * @param message NodeLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeLabels message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeLabels; - - /** - * Decodes a NodeLabels message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeLabels; - - /** - * Verifies a NodeLabels message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeLabels - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeLabels; - - /** - * Creates a plain object from a NodeLabels message. Also converts values to other types if specified. - * @param message NodeLabels - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeLabels to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeLabels - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceLabels. */ - interface IResourceLabels { - - /** ResourceLabels labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a ResourceLabels. */ - class ResourceLabels implements IResourceLabels { - - /** - * Constructs a new ResourceLabels. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IResourceLabels); - - /** ResourceLabels labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new ResourceLabels instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceLabels instance - */ - public static create(properties?: google.container.v1beta1.IResourceLabels): google.container.v1beta1.ResourceLabels; - - /** - * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. - * @param message ResourceLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. - * @param message ResourceLabels message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IResourceLabels, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceLabels; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceLabels; - - /** - * Verifies a ResourceLabels message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceLabels - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceLabels; - - /** - * Creates a plain object from a ResourceLabels message. Also converts values to other types if specified. - * @param message ResourceLabels - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceLabels to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceLabels - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkTags. */ - interface INetworkTags { - - /** NetworkTags tags */ - tags?: (string[]|null); - } - - /** Represents a NetworkTags. */ - class NetworkTags implements INetworkTags { - - /** - * Constructs a new NetworkTags. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INetworkTags); - - /** NetworkTags tags. */ - public tags: string[]; - - /** - * Creates a new NetworkTags instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkTags instance - */ - public static create(properties?: google.container.v1beta1.INetworkTags): google.container.v1beta1.NetworkTags; - - /** - * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. - * @param message NetworkTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. - * @param message NetworkTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INetworkTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkTags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkTags; - - /** - * Decodes a NetworkTags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkTags; - - /** - * Verifies a NetworkTags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkTags - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkTags; - - /** - * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. - * @param message NetworkTags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NetworkTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkTags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkTags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MasterAuth. */ - interface IMasterAuth { - - /** MasterAuth username */ - username?: (string|null); - - /** MasterAuth password */ - password?: (string|null); - - /** MasterAuth clientCertificateConfig */ - clientCertificateConfig?: (google.container.v1beta1.IClientCertificateConfig|null); - - /** MasterAuth clusterCaCertificate */ - clusterCaCertificate?: (string|null); - - /** MasterAuth clientCertificate */ - clientCertificate?: (string|null); - - /** MasterAuth clientKey */ - clientKey?: (string|null); - } - - /** Represents a MasterAuth. */ - class MasterAuth implements IMasterAuth { - - /** - * Constructs a new MasterAuth. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMasterAuth); - - /** MasterAuth username. */ - public username: string; - - /** MasterAuth password. */ - public password: string; - - /** MasterAuth clientCertificateConfig. */ - public clientCertificateConfig?: (google.container.v1beta1.IClientCertificateConfig|null); - - /** MasterAuth clusterCaCertificate. */ - public clusterCaCertificate: string; - - /** MasterAuth clientCertificate. */ - public clientCertificate: string; - - /** MasterAuth clientKey. */ - public clientKey: string; - - /** - * Creates a new MasterAuth instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuth instance - */ - public static create(properties?: google.container.v1beta1.IMasterAuth): google.container.v1beta1.MasterAuth; - - /** - * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. - * @param message MasterAuth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. - * @param message MasterAuth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMasterAuth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuth; - - /** - * Decodes a MasterAuth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuth; - - /** - * Verifies a MasterAuth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuth - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuth; - - /** - * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. - * @param message MasterAuth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MasterAuth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientCertificateConfig. */ - interface IClientCertificateConfig { - - /** ClientCertificateConfig issueClientCertificate */ - issueClientCertificate?: (boolean|null); - } - - /** Represents a ClientCertificateConfig. */ - class ClientCertificateConfig implements IClientCertificateConfig { - - /** - * Constructs a new ClientCertificateConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IClientCertificateConfig); - - /** ClientCertificateConfig issueClientCertificate. */ - public issueClientCertificate: boolean; - - /** - * Creates a new ClientCertificateConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientCertificateConfig instance - */ - public static create(properties?: google.container.v1beta1.IClientCertificateConfig): google.container.v1beta1.ClientCertificateConfig; - - /** - * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. - * @param message ClientCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. - * @param message ClientCertificateConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IClientCertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClientCertificateConfig; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClientCertificateConfig; - - /** - * Verifies a ClientCertificateConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientCertificateConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClientCertificateConfig; - - /** - * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. - * @param message ClientCertificateConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ClientCertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientCertificateConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientCertificateConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddonsConfig. */ - interface IAddonsConfig { - - /** AddonsConfig httpLoadBalancing */ - httpLoadBalancing?: (google.container.v1beta1.IHttpLoadBalancing|null); - - /** AddonsConfig horizontalPodAutoscaling */ - horizontalPodAutoscaling?: (google.container.v1beta1.IHorizontalPodAutoscaling|null); - - /** AddonsConfig kubernetesDashboard */ - kubernetesDashboard?: (google.container.v1beta1.IKubernetesDashboard|null); - - /** AddonsConfig networkPolicyConfig */ - networkPolicyConfig?: (google.container.v1beta1.INetworkPolicyConfig|null); - - /** AddonsConfig istioConfig */ - istioConfig?: (google.container.v1beta1.IIstioConfig|null); - - /** AddonsConfig cloudRunConfig */ - cloudRunConfig?: (google.container.v1beta1.ICloudRunConfig|null); - - /** AddonsConfig dnsCacheConfig */ - dnsCacheConfig?: (google.container.v1beta1.IDnsCacheConfig|null); - - /** AddonsConfig configConnectorConfig */ - configConnectorConfig?: (google.container.v1beta1.IConfigConnectorConfig|null); - - /** AddonsConfig gcePersistentDiskCsiDriverConfig */ - gcePersistentDiskCsiDriverConfig?: (google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null); - - /** AddonsConfig kalmConfig */ - kalmConfig?: (google.container.v1beta1.IKalmConfig|null); - - /** AddonsConfig gcpFilestoreCsiDriverConfig */ - gcpFilestoreCsiDriverConfig?: (google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null); - - /** AddonsConfig gkeBackupAgentConfig */ - gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); - - /** AddonsConfig gcsFuseCsiDriverConfig */ - gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); - - /** AddonsConfig statefulHaConfig */ - statefulHaConfig?: (google.container.v1beta1.IStatefulHAConfig|null); - - /** AddonsConfig rayOperatorConfig */ - rayOperatorConfig?: (google.container.v1beta1.IRayOperatorConfig|null); - } - - /** Represents an AddonsConfig. */ - class AddonsConfig implements IAddonsConfig { - - /** - * Constructs a new AddonsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAddonsConfig); - - /** AddonsConfig httpLoadBalancing. */ - public httpLoadBalancing?: (google.container.v1beta1.IHttpLoadBalancing|null); - - /** AddonsConfig horizontalPodAutoscaling. */ - public horizontalPodAutoscaling?: (google.container.v1beta1.IHorizontalPodAutoscaling|null); - - /** AddonsConfig kubernetesDashboard. */ - public kubernetesDashboard?: (google.container.v1beta1.IKubernetesDashboard|null); - - /** AddonsConfig networkPolicyConfig. */ - public networkPolicyConfig?: (google.container.v1beta1.INetworkPolicyConfig|null); - - /** AddonsConfig istioConfig. */ - public istioConfig?: (google.container.v1beta1.IIstioConfig|null); - - /** AddonsConfig cloudRunConfig. */ - public cloudRunConfig?: (google.container.v1beta1.ICloudRunConfig|null); - - /** AddonsConfig dnsCacheConfig. */ - public dnsCacheConfig?: (google.container.v1beta1.IDnsCacheConfig|null); - - /** AddonsConfig configConnectorConfig. */ - public configConnectorConfig?: (google.container.v1beta1.IConfigConnectorConfig|null); - - /** AddonsConfig gcePersistentDiskCsiDriverConfig. */ - public gcePersistentDiskCsiDriverConfig?: (google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null); - - /** AddonsConfig kalmConfig. */ - public kalmConfig?: (google.container.v1beta1.IKalmConfig|null); - - /** AddonsConfig gcpFilestoreCsiDriverConfig. */ - public gcpFilestoreCsiDriverConfig?: (google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null); - - /** AddonsConfig gkeBackupAgentConfig. */ - public gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); - - /** AddonsConfig gcsFuseCsiDriverConfig. */ - public gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); - - /** AddonsConfig statefulHaConfig. */ - public statefulHaConfig?: (google.container.v1beta1.IStatefulHAConfig|null); - - /** AddonsConfig rayOperatorConfig. */ - public rayOperatorConfig?: (google.container.v1beta1.IRayOperatorConfig|null); - - /** - * Creates a new AddonsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AddonsConfig instance - */ - public static create(properties?: google.container.v1beta1.IAddonsConfig): google.container.v1beta1.AddonsConfig; - - /** - * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. - * @param message AddonsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. - * @param message AddonsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAddonsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AddonsConfig; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AddonsConfig; - - /** - * Verifies an AddonsConfig message. - * @param message Plain 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 AddonsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddonsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AddonsConfig; - - /** - * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. - * @param message AddonsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AddonsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddonsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddonsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpLoadBalancing. */ - interface IHttpLoadBalancing { - - /** HttpLoadBalancing disabled */ - disabled?: (boolean|null); - } - - /** Represents a HttpLoadBalancing. */ - class HttpLoadBalancing implements IHttpLoadBalancing { - - /** - * Constructs a new HttpLoadBalancing. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IHttpLoadBalancing); - - /** HttpLoadBalancing disabled. */ - public disabled: boolean; - - /** - * Creates a new HttpLoadBalancing instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpLoadBalancing instance - */ - public static create(properties?: google.container.v1beta1.IHttpLoadBalancing): google.container.v1beta1.HttpLoadBalancing; - - /** - * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. - * @param message HttpLoadBalancing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. - * @param message HttpLoadBalancing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IHttpLoadBalancing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HttpLoadBalancing; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HttpLoadBalancing; - - /** - * Verifies a HttpLoadBalancing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpLoadBalancing - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HttpLoadBalancing; - - /** - * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. - * @param message HttpLoadBalancing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.HttpLoadBalancing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpLoadBalancing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpLoadBalancing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HorizontalPodAutoscaling. */ - interface IHorizontalPodAutoscaling { - - /** HorizontalPodAutoscaling disabled */ - disabled?: (boolean|null); - } - - /** Represents a HorizontalPodAutoscaling. */ - class HorizontalPodAutoscaling implements IHorizontalPodAutoscaling { - - /** - * Constructs a new HorizontalPodAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IHorizontalPodAutoscaling); - - /** HorizontalPodAutoscaling disabled. */ - public disabled: boolean; - - /** - * Creates a new HorizontalPodAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns HorizontalPodAutoscaling instance - */ - public static create(properties?: google.container.v1beta1.IHorizontalPodAutoscaling): google.container.v1beta1.HorizontalPodAutoscaling; - - /** - * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. - * @param message HorizontalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. - * @param message HorizontalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IHorizontalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.HorizontalPodAutoscaling; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.HorizontalPodAutoscaling; - - /** - * Verifies a HorizontalPodAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HorizontalPodAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.HorizontalPodAutoscaling; - - /** - * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. - * @param message HorizontalPodAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.HorizontalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HorizontalPodAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HorizontalPodAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KubernetesDashboard. */ - interface IKubernetesDashboard { - - /** KubernetesDashboard disabled */ - disabled?: (boolean|null); - } - - /** Represents a KubernetesDashboard. */ - class KubernetesDashboard implements IKubernetesDashboard { - - /** - * Constructs a new KubernetesDashboard. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IKubernetesDashboard); - - /** KubernetesDashboard disabled. */ - public disabled: boolean; - - /** - * Creates a new KubernetesDashboard instance using the specified properties. - * @param [properties] Properties to set - * @returns KubernetesDashboard instance - */ - public static create(properties?: google.container.v1beta1.IKubernetesDashboard): google.container.v1beta1.KubernetesDashboard; - - /** - * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. - * @param message KubernetesDashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. - * @param message KubernetesDashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IKubernetesDashboard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.KubernetesDashboard; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.KubernetesDashboard; - - /** - * Verifies a KubernetesDashboard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KubernetesDashboard - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.KubernetesDashboard; - - /** - * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. - * @param message KubernetesDashboard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.KubernetesDashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KubernetesDashboard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KubernetesDashboard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkPolicyConfig. */ - interface INetworkPolicyConfig { - - /** NetworkPolicyConfig disabled */ - disabled?: (boolean|null); - } - - /** Represents a NetworkPolicyConfig. */ - class NetworkPolicyConfig implements INetworkPolicyConfig { - - /** - * Constructs a new NetworkPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INetworkPolicyConfig); - - /** NetworkPolicyConfig disabled. */ - public disabled: boolean; - - /** - * Creates a new NetworkPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPolicyConfig instance - */ - public static create(properties?: google.container.v1beta1.INetworkPolicyConfig): google.container.v1beta1.NetworkPolicyConfig; - - /** - * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. - * @param message NetworkPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. - * @param message NetworkPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INetworkPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkPolicyConfig; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkPolicyConfig; - - /** - * Verifies a NetworkPolicyConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkPolicyConfig; - - /** - * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. - * @param message NetworkPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NetworkPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DnsCacheConfig. */ - interface IDnsCacheConfig { - - /** DnsCacheConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a DnsCacheConfig. */ - class DnsCacheConfig implements IDnsCacheConfig { - - /** - * Constructs a new DnsCacheConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDnsCacheConfig); - - /** DnsCacheConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new DnsCacheConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DnsCacheConfig instance - */ - public static create(properties?: google.container.v1beta1.IDnsCacheConfig): google.container.v1beta1.DnsCacheConfig; - - /** - * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. - * @param message DnsCacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. - * @param message DnsCacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDnsCacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DnsCacheConfig; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DnsCacheConfig; - - /** - * Verifies a DnsCacheConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DnsCacheConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DnsCacheConfig; - - /** - * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. - * @param message DnsCacheConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DnsCacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DnsCacheConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DnsCacheConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KalmConfig. */ - interface IKalmConfig { - - /** KalmConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a KalmConfig. */ - class KalmConfig implements IKalmConfig { - - /** - * Constructs a new KalmConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IKalmConfig); - - /** KalmConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new KalmConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns KalmConfig instance - */ - public static create(properties?: google.container.v1beta1.IKalmConfig): google.container.v1beta1.KalmConfig; - - /** - * Encodes the specified KalmConfig message. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. - * @param message KalmConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IKalmConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KalmConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. - * @param message KalmConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IKalmConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KalmConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KalmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.KalmConfig; - - /** - * Decodes a KalmConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KalmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.KalmConfig; - - /** - * Verifies a KalmConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KalmConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KalmConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.KalmConfig; - - /** - * Creates a plain object from a KalmConfig message. Also converts values to other types if specified. - * @param message KalmConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.KalmConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KalmConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KalmConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GkeBackupAgentConfig. */ - interface IGkeBackupAgentConfig { - - /** GkeBackupAgentConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GkeBackupAgentConfig. */ - class GkeBackupAgentConfig implements IGkeBackupAgentConfig { - - /** - * Constructs a new GkeBackupAgentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGkeBackupAgentConfig); - - /** GkeBackupAgentConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GkeBackupAgentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GkeBackupAgentConfig instance - */ - public static create(properties?: google.container.v1beta1.IGkeBackupAgentConfig): google.container.v1beta1.GkeBackupAgentConfig; - - /** - * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. - * @param message GkeBackupAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. - * @param message GkeBackupAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGkeBackupAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GkeBackupAgentConfig; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GkeBackupAgentConfig; - - /** - * Verifies a GkeBackupAgentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GkeBackupAgentConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GkeBackupAgentConfig; - - /** - * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. - * @param message GkeBackupAgentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GkeBackupAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GkeBackupAgentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GkeBackupAgentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StatefulHAConfig. */ - interface IStatefulHAConfig { - - /** StatefulHAConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a StatefulHAConfig. */ - class StatefulHAConfig implements IStatefulHAConfig { - - /** - * Constructs a new StatefulHAConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IStatefulHAConfig); - - /** StatefulHAConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new StatefulHAConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StatefulHAConfig instance - */ - public static create(properties?: google.container.v1beta1.IStatefulHAConfig): google.container.v1beta1.StatefulHAConfig; - - /** - * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. - * @param message StatefulHAConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. - * @param message StatefulHAConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IStatefulHAConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StatefulHAConfig; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StatefulHAConfig; - - /** - * Verifies a StatefulHAConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatefulHAConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StatefulHAConfig; - - /** - * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. - * @param message StatefulHAConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.StatefulHAConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatefulHAConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatefulHAConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfigConnectorConfig. */ - interface IConfigConnectorConfig { - - /** ConfigConnectorConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConfigConnectorConfig. */ - class ConfigConnectorConfig implements IConfigConnectorConfig { - - /** - * Constructs a new ConfigConnectorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IConfigConnectorConfig); - - /** ConfigConnectorConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ConfigConnectorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfigConnectorConfig instance - */ - public static create(properties?: google.container.v1beta1.IConfigConnectorConfig): google.container.v1beta1.ConfigConnectorConfig; - - /** - * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. - * @param message ConfigConnectorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. - * @param message ConfigConnectorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IConfigConnectorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ConfigConnectorConfig; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ConfigConnectorConfig; - - /** - * Verifies a ConfigConnectorConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfigConnectorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ConfigConnectorConfig; - - /** - * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. - * @param message ConfigConnectorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ConfigConnectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfigConnectorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfigConnectorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcePersistentDiskCsiDriverConfig. */ - interface IGcePersistentDiskCsiDriverConfig { - - /** GcePersistentDiskCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcePersistentDiskCsiDriverConfig. */ - class GcePersistentDiskCsiDriverConfig implements IGcePersistentDiskCsiDriverConfig { - - /** - * Constructs a new GcePersistentDiskCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig); - - /** GcePersistentDiskCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcePersistentDiskCsiDriverConfig instance - */ - public static create(properties?: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @param message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGcePersistentDiskCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; - - /** - * Verifies a GcePersistentDiskCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcePersistentDiskCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcePersistentDiskCsiDriverConfig; - - /** - * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcePersistentDiskCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GcePersistentDiskCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcePersistentDiskCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcePersistentDiskCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcpFilestoreCsiDriverConfig. */ - interface IGcpFilestoreCsiDriverConfig { - - /** GcpFilestoreCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcpFilestoreCsiDriverConfig. */ - class GcpFilestoreCsiDriverConfig implements IGcpFilestoreCsiDriverConfig { - - /** - * Constructs a new GcpFilestoreCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGcpFilestoreCsiDriverConfig); - - /** GcpFilestoreCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpFilestoreCsiDriverConfig instance - */ - public static create(properties?: google.container.v1beta1.IGcpFilestoreCsiDriverConfig): google.container.v1beta1.GcpFilestoreCsiDriverConfig; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @param message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @param message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGcpFilestoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcpFilestoreCsiDriverConfig; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcpFilestoreCsiDriverConfig; - - /** - * Verifies a GcpFilestoreCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpFilestoreCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcpFilestoreCsiDriverConfig; - - /** - * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcpFilestoreCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GcpFilestoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpFilestoreCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpFilestoreCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsFuseCsiDriverConfig. */ - interface IGcsFuseCsiDriverConfig { - - /** GcsFuseCsiDriverConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a GcsFuseCsiDriverConfig. */ - class GcsFuseCsiDriverConfig implements IGcsFuseCsiDriverConfig { - - /** - * Constructs a new GcsFuseCsiDriverConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig); - - /** GcsFuseCsiDriverConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFuseCsiDriverConfig instance - */ - public static create(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig): google.container.v1beta1.GcsFuseCsiDriverConfig; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @param message GcsFuseCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @param message GcsFuseCsiDriverConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GcsFuseCsiDriverConfig; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GcsFuseCsiDriverConfig; - - /** - * Verifies a GcsFuseCsiDriverConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFuseCsiDriverConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcsFuseCsiDriverConfig; - - /** - * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. - * @param message GcsFuseCsiDriverConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GcsFuseCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFuseCsiDriverConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFuseCsiDriverConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RayOperatorConfig. */ - interface IRayOperatorConfig { - - /** RayOperatorConfig enabled */ - enabled?: (boolean|null); - - /** RayOperatorConfig rayClusterLoggingConfig */ - rayClusterLoggingConfig?: (google.container.v1beta1.IRayClusterLoggingConfig|null); - - /** RayOperatorConfig rayClusterMonitoringConfig */ - rayClusterMonitoringConfig?: (google.container.v1beta1.IRayClusterMonitoringConfig|null); - } - - /** Represents a RayOperatorConfig. */ - class RayOperatorConfig implements IRayOperatorConfig { - - /** - * Constructs a new RayOperatorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRayOperatorConfig); - - /** RayOperatorConfig enabled. */ - public enabled: boolean; - - /** RayOperatorConfig rayClusterLoggingConfig. */ - public rayClusterLoggingConfig?: (google.container.v1beta1.IRayClusterLoggingConfig|null); - - /** RayOperatorConfig rayClusterMonitoringConfig. */ - public rayClusterMonitoringConfig?: (google.container.v1beta1.IRayClusterMonitoringConfig|null); - - /** - * Creates a new RayOperatorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayOperatorConfig instance - */ - public static create(properties?: google.container.v1beta1.IRayOperatorConfig): google.container.v1beta1.RayOperatorConfig; - - /** - * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. - * @param message RayOperatorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. - * @param message RayOperatorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRayOperatorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayOperatorConfig; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayOperatorConfig; - - /** - * Verifies a RayOperatorConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayOperatorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayOperatorConfig; - - /** - * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. - * @param message RayOperatorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RayOperatorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayOperatorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayOperatorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterMasterGlobalAccessConfig. */ - interface IPrivateClusterMasterGlobalAccessConfig { - - /** PrivateClusterMasterGlobalAccessConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a PrivateClusterMasterGlobalAccessConfig. */ - class PrivateClusterMasterGlobalAccessConfig implements IPrivateClusterMasterGlobalAccessConfig { - - /** - * Constructs a new PrivateClusterMasterGlobalAccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig); - - /** PrivateClusterMasterGlobalAccessConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterMasterGlobalAccessConfig instance - */ - public static create(properties?: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @param message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Verifies a PrivateClusterMasterGlobalAccessConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterMasterGlobalAccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig; - - /** - * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. - * @param message PrivateClusterMasterGlobalAccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterMasterGlobalAccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterConfig. */ - interface IPrivateClusterConfig { - - /** PrivateClusterConfig enablePrivateNodes */ - enablePrivateNodes?: (boolean|null); - - /** PrivateClusterConfig enablePrivateEndpoint */ - enablePrivateEndpoint?: (boolean|null); - - /** PrivateClusterConfig masterIpv4CidrBlock */ - masterIpv4CidrBlock?: (string|null); - - /** PrivateClusterConfig privateEndpoint */ - privateEndpoint?: (string|null); - - /** PrivateClusterConfig publicEndpoint */ - publicEndpoint?: (string|null); - - /** PrivateClusterConfig peeringName */ - peeringName?: (string|null); - - /** PrivateClusterConfig masterGlobalAccessConfig */ - masterGlobalAccessConfig?: (google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null); - - /** PrivateClusterConfig privateEndpointSubnetwork */ - privateEndpointSubnetwork?: (string|null); - } - - /** Represents a PrivateClusterConfig. */ - class PrivateClusterConfig implements IPrivateClusterConfig { - - /** - * Constructs a new PrivateClusterConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IPrivateClusterConfig); - - /** PrivateClusterConfig enablePrivateNodes. */ - public enablePrivateNodes: boolean; - - /** PrivateClusterConfig enablePrivateEndpoint. */ - public enablePrivateEndpoint: boolean; - - /** PrivateClusterConfig masterIpv4CidrBlock. */ - public masterIpv4CidrBlock: string; - - /** PrivateClusterConfig privateEndpoint. */ - public privateEndpoint: string; - - /** PrivateClusterConfig publicEndpoint. */ - public publicEndpoint: string; - - /** PrivateClusterConfig peeringName. */ - public peeringName: string; - - /** PrivateClusterConfig masterGlobalAccessConfig. */ - public masterGlobalAccessConfig?: (google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null); - - /** PrivateClusterConfig privateEndpointSubnetwork. */ - public privateEndpointSubnetwork: string; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterConfig instance - */ - public static create(properties?: google.container.v1beta1.IPrivateClusterConfig): google.container.v1beta1.PrivateClusterConfig; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PrivateClusterConfig; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PrivateClusterConfig; - - /** - * Verifies a PrivateClusterConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PrivateClusterConfig; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @param message PrivateClusterConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IstioConfig. */ - interface IIstioConfig { - - /** IstioConfig disabled */ - disabled?: (boolean|null); - - /** IstioConfig auth */ - auth?: (google.container.v1beta1.IstioConfig.IstioAuthMode|keyof typeof google.container.v1beta1.IstioConfig.IstioAuthMode|null); - } - - /** Represents an IstioConfig. */ - class IstioConfig implements IIstioConfig { - - /** - * Constructs a new IstioConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IIstioConfig); - - /** IstioConfig disabled. */ - public disabled: boolean; - - /** IstioConfig auth. */ - public auth: (google.container.v1beta1.IstioConfig.IstioAuthMode|keyof typeof google.container.v1beta1.IstioConfig.IstioAuthMode); - - /** - * Creates a new IstioConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IstioConfig instance - */ - public static create(properties?: google.container.v1beta1.IIstioConfig): google.container.v1beta1.IstioConfig; - - /** - * Encodes the specified IstioConfig message. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. - * @param message IstioConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IIstioConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IstioConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. - * @param message IstioConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IIstioConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IstioConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IstioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IstioConfig; - - /** - * Decodes an IstioConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IstioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IstioConfig; - - /** - * Verifies an IstioConfig message. - * @param message Plain 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 IstioConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IstioConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IstioConfig; - - /** - * Creates a plain object from an IstioConfig message. Also converts values to other types if specified. - * @param message IstioConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.IstioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IstioConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IstioConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IstioConfig { - - /** IstioAuthMode enum. */ - enum IstioAuthMode { - AUTH_NONE = 0, - AUTH_MUTUAL_TLS = 1 - } - } - - /** Properties of a CloudRunConfig. */ - interface ICloudRunConfig { - - /** CloudRunConfig disabled */ - disabled?: (boolean|null); - - /** CloudRunConfig loadBalancerType */ - loadBalancerType?: (google.container.v1beta1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1beta1.CloudRunConfig.LoadBalancerType|null); - } - - /** Represents a CloudRunConfig. */ - class CloudRunConfig implements ICloudRunConfig { - - /** - * Constructs a new CloudRunConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICloudRunConfig); - - /** CloudRunConfig disabled. */ - public disabled: boolean; - - /** CloudRunConfig loadBalancerType. */ - public loadBalancerType: (google.container.v1beta1.CloudRunConfig.LoadBalancerType|keyof typeof google.container.v1beta1.CloudRunConfig.LoadBalancerType); - - /** - * Creates a new CloudRunConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunConfig instance - */ - public static create(properties?: google.container.v1beta1.ICloudRunConfig): google.container.v1beta1.CloudRunConfig; - - /** - * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. - * @param message CloudRunConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. - * @param message CloudRunConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICloudRunConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CloudRunConfig; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CloudRunConfig; - - /** - * Verifies a CloudRunConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CloudRunConfig; - - /** - * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. - * @param message CloudRunConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CloudRunConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudRunConfig { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - LOAD_BALANCER_TYPE_EXTERNAL = 1, - LOAD_BALANCER_TYPE_INTERNAL = 2 - } - } - - /** Properties of a MasterAuthorizedNetworksConfig. */ - interface IMasterAuthorizedNetworksConfig { - - /** MasterAuthorizedNetworksConfig enabled */ - enabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig cidrBlocks */ - cidrBlocks?: (google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); - - /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled */ - gcpPublicCidrsAccessEnabled?: (boolean|null); - } - - /** Represents a MasterAuthorizedNetworksConfig. */ - class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMasterAuthorizedNetworksConfig); - - /** MasterAuthorizedNetworksConfig enabled. */ - public enabled: boolean; - - /** MasterAuthorizedNetworksConfig cidrBlocks. */ - public cidrBlocks: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]; - - /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. */ - public gcpPublicCidrsAccessEnabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. */ - public _gcpPublicCidrsAccessEnabled?: "gcpPublicCidrsAccessEnabled"; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuthorizedNetworksConfig instance - */ - public static create(properties?: google.container.v1beta1.IMasterAuthorizedNetworksConfig): google.container.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuthorizedNetworksConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @param message MasterAuthorizedNetworksConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MasterAuthorizedNetworksConfig { - - /** Properties of a CidrBlock. */ - interface ICidrBlock { - - /** CidrBlock displayName */ - displayName?: (string|null); - - /** CidrBlock cidrBlock */ - cidrBlock?: (string|null); - } - - /** Represents a CidrBlock. */ - class CidrBlock implements ICidrBlock { - - /** - * Constructs a new CidrBlock. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock); - - /** CidrBlock displayName. */ - public displayName: string; - - /** CidrBlock cidrBlock. */ - public cidrBlock: string; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns CidrBlock instance - */ - public static create(properties?: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Verifies a CidrBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CidrBlock - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @param message CidrBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CidrBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CidrBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a LegacyAbac. */ - interface ILegacyAbac { - - /** LegacyAbac enabled */ - enabled?: (boolean|null); - } - - /** Represents a LegacyAbac. */ - class LegacyAbac implements ILegacyAbac { - - /** - * Constructs a new LegacyAbac. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILegacyAbac); - - /** LegacyAbac enabled. */ - public enabled: boolean; - - /** - * Creates a new LegacyAbac instance using the specified properties. - * @param [properties] Properties to set - * @returns LegacyAbac instance - */ - public static create(properties?: google.container.v1beta1.ILegacyAbac): google.container.v1beta1.LegacyAbac; - - /** - * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. - * @param message LegacyAbac message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. - * @param message LegacyAbac message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ILegacyAbac, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LegacyAbac; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LegacyAbac; - - /** - * Verifies a LegacyAbac message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LegacyAbac - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LegacyAbac; - - /** - * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. - * @param message LegacyAbac - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.LegacyAbac, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LegacyAbac to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LegacyAbac - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkPolicy. */ - interface INetworkPolicy { - - /** NetworkPolicy provider */ - provider?: (google.container.v1beta1.NetworkPolicy.Provider|keyof typeof google.container.v1beta1.NetworkPolicy.Provider|null); - - /** NetworkPolicy enabled */ - enabled?: (boolean|null); - } - - /** Represents a NetworkPolicy. */ - class NetworkPolicy implements INetworkPolicy { - - /** - * Constructs a new NetworkPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INetworkPolicy); - - /** NetworkPolicy provider. */ - public provider: (google.container.v1beta1.NetworkPolicy.Provider|keyof typeof google.container.v1beta1.NetworkPolicy.Provider); - - /** NetworkPolicy enabled. */ - public enabled: boolean; - - /** - * Creates a new NetworkPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPolicy instance - */ - public static create(properties?: google.container.v1beta1.INetworkPolicy): google.container.v1beta1.NetworkPolicy; - - /** - * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. - * @param message NetworkPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. - * @param message NetworkPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INetworkPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkPolicy; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkPolicy; - - /** - * Verifies a NetworkPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkPolicy; - - /** - * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. - * @param message NetworkPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NetworkPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPolicy { - - /** Provider enum. */ - enum Provider { - PROVIDER_UNSPECIFIED = 0, - CALICO = 1 - } - } - - /** Properties of a PodCIDROverprovisionConfig. */ - interface IPodCIDROverprovisionConfig { - - /** PodCIDROverprovisionConfig disable */ - disable?: (boolean|null); - } - - /** Represents a PodCIDROverprovisionConfig. */ - class PodCIDROverprovisionConfig implements IPodCIDROverprovisionConfig { - - /** - * Constructs a new PodCIDROverprovisionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IPodCIDROverprovisionConfig); - - /** PodCIDROverprovisionConfig disable. */ - public disable: boolean; - - /** - * Creates a new PodCIDROverprovisionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PodCIDROverprovisionConfig instance - */ - public static create(properties?: google.container.v1beta1.IPodCIDROverprovisionConfig): google.container.v1beta1.PodCIDROverprovisionConfig; - - /** - * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. - * @param message PodCIDROverprovisionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. - * @param message PodCIDROverprovisionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IPodCIDROverprovisionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PodCIDROverprovisionConfig; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PodCIDROverprovisionConfig; - - /** - * Verifies a PodCIDROverprovisionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PodCIDROverprovisionConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PodCIDROverprovisionConfig; - - /** - * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. - * @param message PodCIDROverprovisionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.PodCIDROverprovisionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PodCIDROverprovisionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PodCIDROverprovisionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a IPAllocationPolicy. */ - interface IIPAllocationPolicy { - - /** IPAllocationPolicy useIpAliases */ - useIpAliases?: (boolean|null); - - /** IPAllocationPolicy createSubnetwork */ - createSubnetwork?: (boolean|null); - - /** IPAllocationPolicy subnetworkName */ - subnetworkName?: (string|null); - - /** IPAllocationPolicy clusterIpv4Cidr */ - clusterIpv4Cidr?: (string|null); - - /** IPAllocationPolicy nodeIpv4Cidr */ - nodeIpv4Cidr?: (string|null); - - /** IPAllocationPolicy servicesIpv4Cidr */ - servicesIpv4Cidr?: (string|null); - - /** IPAllocationPolicy clusterSecondaryRangeName */ - clusterSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy servicesSecondaryRangeName */ - servicesSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy clusterIpv4CidrBlock */ - clusterIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy nodeIpv4CidrBlock */ - nodeIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesIpv4CidrBlock */ - servicesIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy allowRouteOverlap */ - allowRouteOverlap?: (boolean|null); - - /** IPAllocationPolicy tpuIpv4CidrBlock */ - tpuIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy useRoutes */ - useRoutes?: (boolean|null); - - /** IPAllocationPolicy stackType */ - stackType?: (google.container.v1beta1.IPAllocationPolicy.StackType|keyof typeof google.container.v1beta1.IPAllocationPolicy.StackType|null); - - /** IPAllocationPolicy ipv6AccessType */ - ipv6AccessType?: (google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|keyof typeof google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|null); - - /** IPAllocationPolicy podCidrOverprovisionConfig */ - podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); - - /** IPAllocationPolicy subnetIpv6CidrBlock */ - subnetIpv6CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesIpv6CidrBlock */ - servicesIpv6CidrBlock?: (string|null); - - /** IPAllocationPolicy additionalPodRangesConfig */ - additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** IPAllocationPolicy defaultPodIpv4RangeUtilization */ - defaultPodIpv4RangeUtilization?: (number|null); - } - - /** Represents a IPAllocationPolicy. */ - class IPAllocationPolicy implements IIPAllocationPolicy { - - /** - * Constructs a new IPAllocationPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IIPAllocationPolicy); - - /** IPAllocationPolicy useIpAliases. */ - public useIpAliases: boolean; - - /** IPAllocationPolicy createSubnetwork. */ - public createSubnetwork: boolean; - - /** IPAllocationPolicy subnetworkName. */ - public subnetworkName: string; - - /** IPAllocationPolicy clusterIpv4Cidr. */ - public clusterIpv4Cidr: string; - - /** IPAllocationPolicy nodeIpv4Cidr. */ - public nodeIpv4Cidr: string; - - /** IPAllocationPolicy servicesIpv4Cidr. */ - public servicesIpv4Cidr: string; - - /** IPAllocationPolicy clusterSecondaryRangeName. */ - public clusterSecondaryRangeName: string; - - /** IPAllocationPolicy servicesSecondaryRangeName. */ - public servicesSecondaryRangeName: string; - - /** IPAllocationPolicy clusterIpv4CidrBlock. */ - public clusterIpv4CidrBlock: string; - - /** IPAllocationPolicy nodeIpv4CidrBlock. */ - public nodeIpv4CidrBlock: string; - - /** IPAllocationPolicy servicesIpv4CidrBlock. */ - public servicesIpv4CidrBlock: string; - - /** IPAllocationPolicy allowRouteOverlap. */ - public allowRouteOverlap: boolean; - - /** IPAllocationPolicy tpuIpv4CidrBlock. */ - public tpuIpv4CidrBlock: string; - - /** IPAllocationPolicy useRoutes. */ - public useRoutes: boolean; - - /** IPAllocationPolicy stackType. */ - public stackType: (google.container.v1beta1.IPAllocationPolicy.StackType|keyof typeof google.container.v1beta1.IPAllocationPolicy.StackType); - - /** IPAllocationPolicy ipv6AccessType. */ - public ipv6AccessType: (google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|keyof typeof google.container.v1beta1.IPAllocationPolicy.IPv6AccessType); - - /** IPAllocationPolicy podCidrOverprovisionConfig. */ - public podCidrOverprovisionConfig?: (google.container.v1beta1.IPodCIDROverprovisionConfig|null); - - /** IPAllocationPolicy subnetIpv6CidrBlock. */ - public subnetIpv6CidrBlock: string; - - /** IPAllocationPolicy servicesIpv6CidrBlock. */ - public servicesIpv6CidrBlock: string; - - /** IPAllocationPolicy additionalPodRangesConfig. */ - public additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** IPAllocationPolicy defaultPodIpv4RangeUtilization. */ - public defaultPodIpv4RangeUtilization: number; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns IPAllocationPolicy instance - */ - public static create(properties?: google.container.v1beta1.IIPAllocationPolicy): google.container.v1beta1.IPAllocationPolicy; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IPAllocationPolicy; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IPAllocationPolicy; - - /** - * Verifies a IPAllocationPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IPAllocationPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IPAllocationPolicy; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @param message IPAllocationPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IPAllocationPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IPAllocationPolicy { - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4 = 1, - IPV4_IPV6 = 2 - } - - /** IPv6AccessType enum. */ - enum IPv6AccessType { - IPV6_ACCESS_TYPE_UNSPECIFIED = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - } - - /** Properties of a BinaryAuthorization. */ - interface IBinaryAuthorization { - - /** BinaryAuthorization enabled */ - enabled?: (boolean|null); - - /** BinaryAuthorization evaluationMode */ - evaluationMode?: (google.container.v1beta1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1beta1.BinaryAuthorization.EvaluationMode|null); - - /** BinaryAuthorization policyBindings */ - policyBindings?: (google.container.v1beta1.BinaryAuthorization.IPolicyBinding[]|null); - } - - /** Represents a BinaryAuthorization. */ - class BinaryAuthorization implements IBinaryAuthorization { - - /** - * Constructs a new BinaryAuthorization. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IBinaryAuthorization); - - /** BinaryAuthorization enabled. */ - public enabled: boolean; - - /** BinaryAuthorization evaluationMode. */ - public evaluationMode: (google.container.v1beta1.BinaryAuthorization.EvaluationMode|keyof typeof google.container.v1beta1.BinaryAuthorization.EvaluationMode); - - /** BinaryAuthorization policyBindings. */ - public policyBindings: google.container.v1beta1.BinaryAuthorization.IPolicyBinding[]; - - /** - * Creates a new BinaryAuthorization instance using the specified properties. - * @param [properties] Properties to set - * @returns BinaryAuthorization instance - */ - public static create(properties?: google.container.v1beta1.IBinaryAuthorization): google.container.v1beta1.BinaryAuthorization; - - /** - * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. - * @param message BinaryAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. - * @param message BinaryAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IBinaryAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BinaryAuthorization; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BinaryAuthorization; - - /** - * Verifies a BinaryAuthorization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinaryAuthorization - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BinaryAuthorization; - - /** - * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. - * @param message BinaryAuthorization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BinaryAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinaryAuthorization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BinaryAuthorization - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BinaryAuthorization { - - /** EvaluationMode enum. */ - enum EvaluationMode { - EVALUATION_MODE_UNSPECIFIED = 0, - DISABLED = 1, - PROJECT_SINGLETON_POLICY_ENFORCE = 2, - POLICY_BINDINGS = 5, - POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE = 6 - } - - /** Properties of a PolicyBinding. */ - interface IPolicyBinding { - - /** PolicyBinding name */ - name?: (string|null); - } - - /** Represents a PolicyBinding. */ - class PolicyBinding implements IPolicyBinding { - - /** - * Constructs a new PolicyBinding. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.BinaryAuthorization.IPolicyBinding); - - /** PolicyBinding name. */ - public name?: (string|null); - - /** PolicyBinding _name. */ - public _name?: "name"; - - /** - * Creates a new PolicyBinding instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyBinding instance - */ - public static create(properties?: google.container.v1beta1.BinaryAuthorization.IPolicyBinding): google.container.v1beta1.BinaryAuthorization.PolicyBinding; - - /** - * Encodes the specified PolicyBinding message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. - * @param message PolicyBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.BinaryAuthorization.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyBinding message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. - * @param message PolicyBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.BinaryAuthorization.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyBinding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BinaryAuthorization.PolicyBinding; - - /** - * Decodes a PolicyBinding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BinaryAuthorization.PolicyBinding; - - /** - * Verifies a PolicyBinding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyBinding - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BinaryAuthorization.PolicyBinding; - - /** - * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. - * @param message PolicyBinding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BinaryAuthorization.PolicyBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyBinding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyBinding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a PodSecurityPolicyConfig. */ - interface IPodSecurityPolicyConfig { - - /** PodSecurityPolicyConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a PodSecurityPolicyConfig. */ - class PodSecurityPolicyConfig implements IPodSecurityPolicyConfig { - - /** - * Constructs a new PodSecurityPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IPodSecurityPolicyConfig); - - /** PodSecurityPolicyConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new PodSecurityPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PodSecurityPolicyConfig instance - */ - public static create(properties?: google.container.v1beta1.IPodSecurityPolicyConfig): google.container.v1beta1.PodSecurityPolicyConfig; - - /** - * Encodes the specified PodSecurityPolicyConfig message. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. - * @param message PodSecurityPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IPodSecurityPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PodSecurityPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. - * @param message PodSecurityPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IPodSecurityPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PodSecurityPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.PodSecurityPolicyConfig; - - /** - * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PodSecurityPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.PodSecurityPolicyConfig; - - /** - * Verifies a PodSecurityPolicyConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PodSecurityPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PodSecurityPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.PodSecurityPolicyConfig; - - /** - * Creates a plain object from a PodSecurityPolicyConfig message. Also converts values to other types if specified. - * @param message PodSecurityPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.PodSecurityPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PodSecurityPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PodSecurityPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuthenticatorGroupsConfig. */ - interface IAuthenticatorGroupsConfig { - - /** AuthenticatorGroupsConfig enabled */ - enabled?: (boolean|null); - - /** AuthenticatorGroupsConfig securityGroup */ - securityGroup?: (string|null); - } - - /** Represents an AuthenticatorGroupsConfig. */ - class AuthenticatorGroupsConfig implements IAuthenticatorGroupsConfig { - - /** - * Constructs a new AuthenticatorGroupsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAuthenticatorGroupsConfig); - - /** AuthenticatorGroupsConfig enabled. */ - public enabled: boolean; - - /** AuthenticatorGroupsConfig securityGroup. */ - public securityGroup: string; - - /** - * Creates a new AuthenticatorGroupsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthenticatorGroupsConfig instance - */ - public static create(properties?: google.container.v1beta1.IAuthenticatorGroupsConfig): google.container.v1beta1.AuthenticatorGroupsConfig; - - /** - * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. - * @param message AuthenticatorGroupsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. - * @param message AuthenticatorGroupsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAuthenticatorGroupsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AuthenticatorGroupsConfig; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AuthenticatorGroupsConfig; - - /** - * Verifies an AuthenticatorGroupsConfig message. - * @param message Plain 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 AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthenticatorGroupsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AuthenticatorGroupsConfig; - - /** - * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. - * @param message AuthenticatorGroupsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AuthenticatorGroupsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthenticatorGroupsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuthenticatorGroupsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterTelemetry. */ - interface IClusterTelemetry { - - /** ClusterTelemetry type */ - type?: (google.container.v1beta1.ClusterTelemetry.Type|keyof typeof google.container.v1beta1.ClusterTelemetry.Type|null); - } - - /** Represents a ClusterTelemetry. */ - class ClusterTelemetry implements IClusterTelemetry { - - /** - * Constructs a new ClusterTelemetry. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IClusterTelemetry); - - /** ClusterTelemetry type. */ - public type: (google.container.v1beta1.ClusterTelemetry.Type|keyof typeof google.container.v1beta1.ClusterTelemetry.Type); - - /** - * Creates a new ClusterTelemetry instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterTelemetry instance - */ - public static create(properties?: google.container.v1beta1.IClusterTelemetry): google.container.v1beta1.ClusterTelemetry; - - /** - * Encodes the specified ClusterTelemetry message. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. - * @param message ClusterTelemetry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IClusterTelemetry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterTelemetry message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. - * @param message ClusterTelemetry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IClusterTelemetry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterTelemetry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterTelemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterTelemetry; - - /** - * Decodes a ClusterTelemetry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterTelemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterTelemetry; - - /** - * Verifies a ClusterTelemetry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterTelemetry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterTelemetry - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterTelemetry; - - /** - * Creates a plain object from a ClusterTelemetry message. Also converts values to other types if specified. - * @param message ClusterTelemetry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ClusterTelemetry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterTelemetry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterTelemetry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ClusterTelemetry { - - /** Type enum. */ - enum Type { - UNSPECIFIED = 0, - DISABLED = 1, - ENABLED = 2, - SYSTEM_ONLY = 3 - } - } - - /** Properties of a Cluster. */ - interface ICluster { - - /** Cluster name */ - name?: (string|null); - - /** Cluster description */ - description?: (string|null); - - /** Cluster initialNodeCount */ - initialNodeCount?: (number|null); - - /** Cluster nodeConfig */ - nodeConfig?: (google.container.v1beta1.INodeConfig|null); - - /** Cluster masterAuth */ - masterAuth?: (google.container.v1beta1.IMasterAuth|null); - - /** Cluster loggingService */ - loggingService?: (string|null); - - /** Cluster monitoringService */ - monitoringService?: (string|null); - - /** Cluster network */ - network?: (string|null); - - /** Cluster clusterIpv4Cidr */ - clusterIpv4Cidr?: (string|null); - - /** Cluster addonsConfig */ - addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** Cluster subnetwork */ - subnetwork?: (string|null); - - /** Cluster nodePools */ - nodePools?: (google.container.v1beta1.INodePool[]|null); - - /** Cluster locations */ - locations?: (string[]|null); - - /** Cluster enableKubernetesAlpha */ - enableKubernetesAlpha?: (boolean|null); - - /** Cluster enableK8sBetaApis */ - enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** Cluster resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** Cluster labelFingerprint */ - labelFingerprint?: (string|null); - - /** Cluster legacyAbac */ - legacyAbac?: (google.container.v1beta1.ILegacyAbac|null); - - /** Cluster networkPolicy */ - networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); - - /** Cluster ipAllocationPolicy */ - ipAllocationPolicy?: (google.container.v1beta1.IIPAllocationPolicy|null); - - /** Cluster masterAuthorizedNetworksConfig */ - masterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** Cluster maintenancePolicy */ - maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); - - /** Cluster binaryAuthorization */ - binaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); - - /** Cluster podSecurityPolicyConfig */ - podSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); - - /** Cluster autoscaling */ - autoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); - - /** Cluster networkConfig */ - networkConfig?: (google.container.v1beta1.INetworkConfig|null); - - /** Cluster privateCluster */ - privateCluster?: (boolean|null); - - /** Cluster masterIpv4CidrBlock */ - masterIpv4CidrBlock?: (string|null); - - /** Cluster defaultMaxPodsConstraint */ - defaultMaxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); - - /** Cluster resourceUsageExportConfig */ - resourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); - - /** Cluster authenticatorGroupsConfig */ - authenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); - - /** Cluster privateClusterConfig */ - privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** Cluster verticalPodAutoscaling */ - verticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); - - /** Cluster shieldedNodes */ - shieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); - - /** Cluster releaseChannel */ - releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** Cluster workloadIdentityConfig */ - workloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); - - /** Cluster workloadCertificates */ - workloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); - - /** Cluster meshCertificates */ - meshCertificates?: (google.container.v1beta1.IMeshCertificates|null); - - /** Cluster workloadAltsConfig */ - workloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); - - /** Cluster costManagementConfig */ - costManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); - - /** Cluster clusterTelemetry */ - clusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); - - /** Cluster tpuConfig */ - tpuConfig?: (google.container.v1beta1.ITpuConfig|null); - - /** Cluster notificationConfig */ - notificationConfig?: (google.container.v1beta1.INotificationConfig|null); - - /** Cluster confidentialNodes */ - confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** Cluster identityServiceConfig */ - identityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); - - /** Cluster selfLink */ - selfLink?: (string|null); - - /** Cluster zone */ - zone?: (string|null); - - /** Cluster endpoint */ - endpoint?: (string|null); - - /** Cluster initialClusterVersion */ - initialClusterVersion?: (string|null); - - /** Cluster currentMasterVersion */ - currentMasterVersion?: (string|null); - - /** Cluster currentNodeVersion */ - currentNodeVersion?: (string|null); - - /** Cluster createTime */ - createTime?: (string|null); - - /** Cluster status */ - status?: (google.container.v1beta1.Cluster.Status|keyof typeof google.container.v1beta1.Cluster.Status|null); - - /** Cluster statusMessage */ - statusMessage?: (string|null); - - /** Cluster nodeIpv4CidrSize */ - nodeIpv4CidrSize?: (number|null); - - /** Cluster servicesIpv4Cidr */ - servicesIpv4Cidr?: (string|null); - - /** Cluster instanceGroupUrls */ - instanceGroupUrls?: (string[]|null); - - /** Cluster currentNodeCount */ - currentNodeCount?: (number|null); - - /** Cluster expireTime */ - expireTime?: (string|null); - - /** Cluster location */ - location?: (string|null); - - /** Cluster enableTpu */ - enableTpu?: (boolean|null); - - /** Cluster tpuIpv4CidrBlock */ - tpuIpv4CidrBlock?: (string|null); - - /** Cluster databaseEncryption */ - databaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); - - /** Cluster conditions */ - conditions?: (google.container.v1beta1.IStatusCondition[]|null); - - /** Cluster master */ - master?: (google.container.v1beta1.IMaster|null); - - /** Cluster autopilot */ - autopilot?: (google.container.v1beta1.IAutopilot|null); - - /** Cluster id */ - id?: (string|null); - - /** Cluster nodePoolDefaults */ - nodePoolDefaults?: (google.container.v1beta1.INodePoolDefaults|null); - - /** Cluster loggingConfig */ - loggingConfig?: (google.container.v1beta1.ILoggingConfig|null); - - /** Cluster monitoringConfig */ - monitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); - - /** Cluster nodePoolAutoConfig */ - nodePoolAutoConfig?: (google.container.v1beta1.INodePoolAutoConfig|null); - - /** Cluster protectConfig */ - protectConfig?: (google.container.v1beta1.IProtectConfig|null); - - /** Cluster etag */ - etag?: (string|null); - - /** Cluster fleet */ - fleet?: (google.container.v1beta1.IFleet|null); - - /** Cluster securityPostureConfig */ - securityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); - - /** Cluster enterpriseConfig */ - enterpriseConfig?: (google.container.v1beta1.IEnterpriseConfig|null); - - /** Cluster secretManagerConfig */ - secretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); - - /** Cluster compliancePostureConfig */ - compliancePostureConfig?: (google.container.v1beta1.ICompliancePostureConfig|null); - - /** Cluster satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Cluster satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } - - /** Represents a Cluster. */ - class Cluster implements ICluster { - - /** - * Constructs a new Cluster. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICluster); - - /** Cluster name. */ - public name: string; - - /** Cluster description. */ - public description: string; - - /** Cluster initialNodeCount. */ - public initialNodeCount: number; - - /** Cluster nodeConfig. */ - public nodeConfig?: (google.container.v1beta1.INodeConfig|null); - - /** Cluster masterAuth. */ - public masterAuth?: (google.container.v1beta1.IMasterAuth|null); - - /** Cluster loggingService. */ - public loggingService: string; - - /** Cluster monitoringService. */ - public monitoringService: string; - - /** Cluster network. */ - public network: string; - - /** Cluster clusterIpv4Cidr. */ - public clusterIpv4Cidr: string; - - /** Cluster addonsConfig. */ - public addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** Cluster subnetwork. */ - public subnetwork: string; - - /** Cluster nodePools. */ - public nodePools: google.container.v1beta1.INodePool[]; - - /** Cluster locations. */ - public locations: string[]; - - /** Cluster enableKubernetesAlpha. */ - public enableKubernetesAlpha: boolean; - - /** Cluster enableK8sBetaApis. */ - public enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** Cluster resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** Cluster labelFingerprint. */ - public labelFingerprint: string; - - /** Cluster legacyAbac. */ - public legacyAbac?: (google.container.v1beta1.ILegacyAbac|null); - - /** Cluster networkPolicy. */ - public networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); - - /** Cluster ipAllocationPolicy. */ - public ipAllocationPolicy?: (google.container.v1beta1.IIPAllocationPolicy|null); - - /** Cluster masterAuthorizedNetworksConfig. */ - public masterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** Cluster maintenancePolicy. */ - public maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); - - /** Cluster binaryAuthorization. */ - public binaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); - - /** Cluster podSecurityPolicyConfig. */ - public podSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); - - /** Cluster autoscaling. */ - public autoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); - - /** Cluster networkConfig. */ - public networkConfig?: (google.container.v1beta1.INetworkConfig|null); - - /** Cluster privateCluster. */ - public privateCluster: boolean; - - /** Cluster masterIpv4CidrBlock. */ - public masterIpv4CidrBlock: string; - - /** Cluster defaultMaxPodsConstraint. */ - public defaultMaxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); - - /** Cluster resourceUsageExportConfig. */ - public resourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); - - /** Cluster authenticatorGroupsConfig. */ - public authenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); - - /** Cluster privateClusterConfig. */ - public privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** Cluster verticalPodAutoscaling. */ - public verticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); - - /** Cluster shieldedNodes. */ - public shieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); - - /** Cluster releaseChannel. */ - public releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** Cluster workloadIdentityConfig. */ - public workloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); - - /** Cluster workloadCertificates. */ - public workloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); - - /** Cluster meshCertificates. */ - public meshCertificates?: (google.container.v1beta1.IMeshCertificates|null); - - /** Cluster workloadAltsConfig. */ - public workloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); - - /** Cluster costManagementConfig. */ - public costManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); - - /** Cluster clusterTelemetry. */ - public clusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); - - /** Cluster tpuConfig. */ - public tpuConfig?: (google.container.v1beta1.ITpuConfig|null); - - /** Cluster notificationConfig. */ - public notificationConfig?: (google.container.v1beta1.INotificationConfig|null); - - /** Cluster confidentialNodes. */ - public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** Cluster identityServiceConfig. */ - public identityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); - - /** Cluster selfLink. */ - public selfLink: string; - - /** Cluster zone. */ - public zone: string; - - /** Cluster endpoint. */ - public endpoint: string; - - /** Cluster initialClusterVersion. */ - public initialClusterVersion: string; - - /** Cluster currentMasterVersion. */ - public currentMasterVersion: string; - - /** Cluster currentNodeVersion. */ - public currentNodeVersion: string; - - /** Cluster createTime. */ - public createTime: string; - - /** Cluster status. */ - public status: (google.container.v1beta1.Cluster.Status|keyof typeof google.container.v1beta1.Cluster.Status); - - /** Cluster statusMessage. */ - public statusMessage: string; - - /** Cluster nodeIpv4CidrSize. */ - public nodeIpv4CidrSize: number; - - /** Cluster servicesIpv4Cidr. */ - public servicesIpv4Cidr: string; - - /** Cluster instanceGroupUrls. */ - public instanceGroupUrls: string[]; - - /** Cluster currentNodeCount. */ - public currentNodeCount: number; - - /** Cluster expireTime. */ - public expireTime: string; - - /** Cluster location. */ - public location: string; - - /** Cluster enableTpu. */ - public enableTpu: boolean; - - /** Cluster tpuIpv4CidrBlock. */ - public tpuIpv4CidrBlock: string; - - /** Cluster databaseEncryption. */ - public databaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); - - /** Cluster conditions. */ - public conditions: google.container.v1beta1.IStatusCondition[]; - - /** Cluster master. */ - public master?: (google.container.v1beta1.IMaster|null); - - /** Cluster autopilot. */ - public autopilot?: (google.container.v1beta1.IAutopilot|null); - - /** Cluster id. */ - public id: string; - - /** Cluster nodePoolDefaults. */ - public nodePoolDefaults?: (google.container.v1beta1.INodePoolDefaults|null); - - /** Cluster loggingConfig. */ - public loggingConfig?: (google.container.v1beta1.ILoggingConfig|null); - - /** Cluster monitoringConfig. */ - public monitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); - - /** Cluster nodePoolAutoConfig. */ - public nodePoolAutoConfig?: (google.container.v1beta1.INodePoolAutoConfig|null); - - /** Cluster protectConfig. */ - public protectConfig?: (google.container.v1beta1.IProtectConfig|null); - - /** Cluster etag. */ - public etag: string; - - /** Cluster fleet. */ - public fleet?: (google.container.v1beta1.IFleet|null); - - /** Cluster securityPostureConfig. */ - public securityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); - - /** Cluster enterpriseConfig. */ - public enterpriseConfig?: (google.container.v1beta1.IEnterpriseConfig|null); - - /** Cluster secretManagerConfig. */ - public secretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); - - /** Cluster compliancePostureConfig. */ - public compliancePostureConfig?: (google.container.v1beta1.ICompliancePostureConfig|null); - - /** Cluster satisfiesPzs. */ - public satisfiesPzs?: (boolean|null); - - /** Cluster satisfiesPzi. */ - public satisfiesPzi?: (boolean|null); - - /** Cluster _nodePoolDefaults. */ - public _nodePoolDefaults?: "nodePoolDefaults"; - - /** Cluster _protectConfig. */ - public _protectConfig?: "protectConfig"; - - /** Cluster _satisfiesPzs. */ - public _satisfiesPzs?: "satisfiesPzs"; - - /** Cluster _satisfiesPzi. */ - public _satisfiesPzi?: "satisfiesPzi"; - - /** - * Creates a new Cluster instance using the specified properties. - * @param [properties] Properties to set - * @returns Cluster instance - */ - public static create(properties?: google.container.v1beta1.ICluster): google.container.v1beta1.Cluster; - - /** - * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. - * @param message Cluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. - * @param message Cluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cluster message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Cluster; - - /** - * Decodes a Cluster message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Cluster; - - /** - * Verifies a Cluster message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Cluster message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cluster - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Cluster; - - /** - * Creates a plain object from a Cluster message. Also converts values to other types if specified. - * @param message Cluster - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Cluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cluster to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cluster - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Cluster { - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PROVISIONING = 1, - RUNNING = 2, - RECONCILING = 3, - STOPPING = 4, - ERROR = 5, - DEGRADED = 6 - } - } - - /** Properties of a CompliancePostureConfig. */ - interface ICompliancePostureConfig { - - /** CompliancePostureConfig mode */ - mode?: (google.container.v1beta1.CompliancePostureConfig.Mode|keyof typeof google.container.v1beta1.CompliancePostureConfig.Mode|null); - - /** CompliancePostureConfig complianceStandards */ - complianceStandards?: (google.container.v1beta1.CompliancePostureConfig.IComplianceStandard[]|null); - } - - /** Represents a CompliancePostureConfig. */ - class CompliancePostureConfig implements ICompliancePostureConfig { - - /** - * Constructs a new CompliancePostureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICompliancePostureConfig); - - /** CompliancePostureConfig mode. */ - public mode?: (google.container.v1beta1.CompliancePostureConfig.Mode|keyof typeof google.container.v1beta1.CompliancePostureConfig.Mode|null); - - /** CompliancePostureConfig complianceStandards. */ - public complianceStandards: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard[]; - - /** CompliancePostureConfig _mode. */ - public _mode?: "mode"; - - /** - * Creates a new CompliancePostureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CompliancePostureConfig instance - */ - public static create(properties?: google.container.v1beta1.ICompliancePostureConfig): google.container.v1beta1.CompliancePostureConfig; - - /** - * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. - * @param message CompliancePostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. - * @param message CompliancePostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompliancePostureConfig; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompliancePostureConfig; - - /** - * Verifies a CompliancePostureConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompliancePostureConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompliancePostureConfig; - - /** - * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. - * @param message CompliancePostureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompliancePostureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompliancePostureConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CompliancePostureConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - ENABLED = 2 - } - - /** Properties of a ComplianceStandard. */ - interface IComplianceStandard { - - /** ComplianceStandard standard */ - standard?: (string|null); - } - - /** Represents a ComplianceStandard. */ - class ComplianceStandard implements IComplianceStandard { - - /** - * Constructs a new ComplianceStandard. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard); - - /** ComplianceStandard standard. */ - public standard?: (string|null); - - /** ComplianceStandard _standard. */ - public _standard?: "standard"; - - /** - * Creates a new ComplianceStandard instance using the specified properties. - * @param [properties] Properties to set - * @returns ComplianceStandard instance - */ - public static create(properties?: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; - - /** - * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @param message ComplianceStandard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @param message ComplianceStandard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; - - /** - * Verifies a ComplianceStandard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComplianceStandard - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompliancePostureConfig.ComplianceStandard; - - /** - * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. - * @param message ComplianceStandard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComplianceStandard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComplianceStandard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a K8sBetaAPIConfig. */ - interface IK8sBetaAPIConfig { - - /** K8sBetaAPIConfig enabledApis */ - enabledApis?: (string[]|null); - } - - /** Represents a K8sBetaAPIConfig. */ - class K8sBetaAPIConfig implements IK8sBetaAPIConfig { - - /** - * Constructs a new K8sBetaAPIConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IK8sBetaAPIConfig); - - /** K8sBetaAPIConfig enabledApis. */ - public enabledApis: string[]; - - /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns K8sBetaAPIConfig instance - */ - public static create(properties?: google.container.v1beta1.IK8sBetaAPIConfig): google.container.v1beta1.K8sBetaAPIConfig; - - /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.K8sBetaAPIConfig; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.K8sBetaAPIConfig; - - /** - * Verifies a K8sBetaAPIConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns K8sBetaAPIConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.K8sBetaAPIConfig; - - /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. - * @param message K8sBetaAPIConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this K8sBetaAPIConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for K8sBetaAPIConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadConfig. */ - interface IWorkloadConfig { - - /** WorkloadConfig auditMode */ - auditMode?: (google.container.v1beta1.WorkloadConfig.Mode|keyof typeof google.container.v1beta1.WorkloadConfig.Mode|null); - } - - /** Represents a WorkloadConfig. */ - class WorkloadConfig implements IWorkloadConfig { - - /** - * Constructs a new WorkloadConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadConfig); - - /** WorkloadConfig auditMode. */ - public auditMode?: (google.container.v1beta1.WorkloadConfig.Mode|keyof typeof google.container.v1beta1.WorkloadConfig.Mode|null); - - /** WorkloadConfig _auditMode. */ - public _auditMode?: "auditMode"; - - /** - * Creates a new WorkloadConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadConfig instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadConfig): google.container.v1beta1.WorkloadConfig; - - /** - * Encodes the specified WorkloadConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. - * @param message WorkloadConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWorkloadConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. - * @param message WorkloadConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWorkloadConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadConfig; - - /** - * Decodes a WorkloadConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadConfig; - - /** - * Verifies a WorkloadConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadConfig; - - /** - * Creates a plain object from a WorkloadConfig message. Also converts values to other types if specified. - * @param message WorkloadConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WorkloadConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkloadConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - BASIC = 4, - BASELINE = 2, - RESTRICTED = 3 - } - } - - /** Properties of a ProtectConfig. */ - interface IProtectConfig { - - /** ProtectConfig workloadConfig */ - workloadConfig?: (google.container.v1beta1.IWorkloadConfig|null); - - /** ProtectConfig workloadVulnerabilityMode */ - workloadVulnerabilityMode?: (google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|keyof typeof google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null); - } - - /** Represents a ProtectConfig. */ - class ProtectConfig implements IProtectConfig { - - /** - * Constructs a new ProtectConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IProtectConfig); - - /** ProtectConfig workloadConfig. */ - public workloadConfig?: (google.container.v1beta1.IWorkloadConfig|null); - - /** ProtectConfig workloadVulnerabilityMode. */ - public workloadVulnerabilityMode?: (google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|keyof typeof google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null); - - /** ProtectConfig _workloadConfig. */ - public _workloadConfig?: "workloadConfig"; - - /** ProtectConfig _workloadVulnerabilityMode. */ - public _workloadVulnerabilityMode?: "workloadVulnerabilityMode"; - - /** - * Creates a new ProtectConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ProtectConfig instance - */ - public static create(properties?: google.container.v1beta1.IProtectConfig): google.container.v1beta1.ProtectConfig; - - /** - * Encodes the specified ProtectConfig message. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. - * @param message ProtectConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IProtectConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProtectConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. - * @param message ProtectConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IProtectConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProtectConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProtectConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ProtectConfig; - - /** - * Decodes a ProtectConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProtectConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ProtectConfig; - - /** - * Verifies a ProtectConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProtectConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProtectConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ProtectConfig; - - /** - * Creates a plain object from a ProtectConfig message. Also converts values to other types if specified. - * @param message ProtectConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ProtectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProtectConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProtectConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProtectConfig { - - /** WorkloadVulnerabilityMode enum. */ - enum WorkloadVulnerabilityMode { - WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED = 0, - DISABLED = 1, - BASIC = 2 - } - } - - /** Properties of a SecurityPostureConfig. */ - interface ISecurityPostureConfig { - - /** SecurityPostureConfig mode */ - mode?: (google.container.v1beta1.SecurityPostureConfig.Mode|keyof typeof google.container.v1beta1.SecurityPostureConfig.Mode|null); - - /** SecurityPostureConfig vulnerabilityMode */ - vulnerabilityMode?: (google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null); - } - - /** Represents a SecurityPostureConfig. */ - class SecurityPostureConfig implements ISecurityPostureConfig { - - /** - * Constructs a new SecurityPostureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISecurityPostureConfig); - - /** SecurityPostureConfig mode. */ - public mode?: (google.container.v1beta1.SecurityPostureConfig.Mode|keyof typeof google.container.v1beta1.SecurityPostureConfig.Mode|null); - - /** SecurityPostureConfig vulnerabilityMode. */ - public vulnerabilityMode?: (google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null); - - /** SecurityPostureConfig _mode. */ - public _mode?: "mode"; - - /** SecurityPostureConfig _vulnerabilityMode. */ - public _vulnerabilityMode?: "vulnerabilityMode"; - - /** - * Creates a new SecurityPostureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityPostureConfig instance - */ - public static create(properties?: google.container.v1beta1.ISecurityPostureConfig): google.container.v1beta1.SecurityPostureConfig; - - /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecurityPostureConfig; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecurityPostureConfig; - - /** - * Verifies a SecurityPostureConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityPostureConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecurityPostureConfig; - - /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. - * @param message SecurityPostureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityPostureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityPostureConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityPostureConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - BASIC = 2, - ENTERPRISE = 3 - } - - /** VulnerabilityMode enum. */ - enum VulnerabilityMode { - VULNERABILITY_MODE_UNSPECIFIED = 0, - VULNERABILITY_DISABLED = 1, - VULNERABILITY_BASIC = 2, - VULNERABILITY_ENTERPRISE = 3 - } - } - - /** Properties of a NodePoolDefaults. */ - interface INodePoolDefaults { - - /** NodePoolDefaults nodeConfigDefaults */ - nodeConfigDefaults?: (google.container.v1beta1.INodeConfigDefaults|null); - } - - /** Represents a NodePoolDefaults. */ - class NodePoolDefaults implements INodePoolDefaults { - - /** - * Constructs a new NodePoolDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodePoolDefaults); - - /** NodePoolDefaults nodeConfigDefaults. */ - public nodeConfigDefaults?: (google.container.v1beta1.INodeConfigDefaults|null); - - /** - * Creates a new NodePoolDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolDefaults instance - */ - public static create(properties?: google.container.v1beta1.INodePoolDefaults): google.container.v1beta1.NodePoolDefaults; - - /** - * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. - * @param message NodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. - * @param message NodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolDefaults; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolDefaults; - - /** - * Verifies a NodePoolDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolDefaults; - - /** - * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. - * @param message NodePoolDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfigDefaults. */ - interface INodeConfigDefaults { - - /** NodeConfigDefaults gcfsConfig */ - gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** NodeConfigDefaults loggingConfig */ - loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** NodeConfigDefaults containerdConfig */ - containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** NodeConfigDefaults hostMaintenancePolicy */ - hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** NodeConfigDefaults nodeKubeletConfig */ - nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - } - - /** Represents a NodeConfigDefaults. */ - class NodeConfigDefaults implements INodeConfigDefaults { - - /** - * Constructs a new NodeConfigDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeConfigDefaults); - - /** NodeConfigDefaults gcfsConfig. */ - public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** NodeConfigDefaults loggingConfig. */ - public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** NodeConfigDefaults containerdConfig. */ - public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** NodeConfigDefaults hostMaintenancePolicy. */ - public hostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** NodeConfigDefaults nodeKubeletConfig. */ - public nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** - * Creates a new NodeConfigDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfigDefaults instance - */ - public static create(properties?: google.container.v1beta1.INodeConfigDefaults): google.container.v1beta1.NodeConfigDefaults; - - /** - * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. - * @param message NodeConfigDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. - * @param message NodeConfigDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeConfigDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeConfigDefaults; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeConfigDefaults; - - /** - * Verifies a NodeConfigDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfigDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeConfigDefaults; - - /** - * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. - * @param message NodeConfigDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeConfigDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfigDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfigDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolAutoConfig. */ - interface INodePoolAutoConfig { - - /** NodePoolAutoConfig networkTags */ - networkTags?: (google.container.v1beta1.INetworkTags|null); - - /** NodePoolAutoConfig resourceManagerTags */ - resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** NodePoolAutoConfig nodeKubeletConfig */ - nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - } - - /** Represents a NodePoolAutoConfig. */ - class NodePoolAutoConfig implements INodePoolAutoConfig { - - /** - * Constructs a new NodePoolAutoConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodePoolAutoConfig); - - /** NodePoolAutoConfig networkTags. */ - public networkTags?: (google.container.v1beta1.INetworkTags|null); - - /** NodePoolAutoConfig resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** NodePoolAutoConfig nodeKubeletConfig. */ - public nodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** - * Creates a new NodePoolAutoConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolAutoConfig instance - */ - public static create(properties?: google.container.v1beta1.INodePoolAutoConfig): google.container.v1beta1.NodePoolAutoConfig; - - /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolAutoConfig; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolAutoConfig; - - /** - * Verifies a NodePoolAutoConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolAutoConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolAutoConfig; - - /** - * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. - * @param message NodePoolAutoConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePoolAutoConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolAutoConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolAutoConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterUpdate. */ - interface IClusterUpdate { - - /** ClusterUpdate desiredNodeVersion */ - desiredNodeVersion?: (string|null); - - /** ClusterUpdate desiredMonitoringService */ - desiredMonitoringService?: (string|null); - - /** ClusterUpdate desiredAddonsConfig */ - desiredAddonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** ClusterUpdate desiredNodePoolId */ - desiredNodePoolId?: (string|null); - - /** ClusterUpdate desiredImageType */ - desiredImageType?: (string|null); - - /** ClusterUpdate desiredNodePoolAutoscaling */ - desiredNodePoolAutoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** ClusterUpdate desiredLocations */ - desiredLocations?: (string[]|null); - - /** ClusterUpdate desiredMasterAuthorizedNetworksConfig */ - desiredMasterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** ClusterUpdate desiredPodSecurityPolicyConfig */ - desiredPodSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); - - /** ClusterUpdate desiredClusterAutoscaling */ - desiredClusterAutoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); - - /** ClusterUpdate desiredBinaryAuthorization */ - desiredBinaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); - - /** ClusterUpdate desiredLoggingService */ - desiredLoggingService?: (string|null); - - /** ClusterUpdate desiredResourceUsageExportConfig */ - desiredResourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); - - /** ClusterUpdate desiredVerticalPodAutoscaling */ - desiredVerticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); - - /** ClusterUpdate desiredPrivateClusterConfig */ - desiredPrivateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredIntraNodeVisibilityConfig */ - desiredIntraNodeVisibilityConfig?: (google.container.v1beta1.IIntraNodeVisibilityConfig|null); - - /** ClusterUpdate desiredDefaultSnatStatus */ - desiredDefaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); - - /** ClusterUpdate desiredClusterTelemetry */ - desiredClusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); - - /** ClusterUpdate desiredReleaseChannel */ - desiredReleaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** ClusterUpdate privateClusterConfig */ - privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredTpuConfig */ - desiredTpuConfig?: (google.container.v1beta1.ITpuConfig|null); - - /** ClusterUpdate desiredL4ilbSubsettingConfig */ - desiredL4ilbSubsettingConfig?: (google.container.v1beta1.IILBSubsettingConfig|null); - - /** ClusterUpdate desiredDatapathProvider */ - desiredDatapathProvider?: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider|null); - - /** ClusterUpdate desiredPrivateIpv6GoogleAccess */ - desiredPrivateIpv6GoogleAccess?: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess|null); - - /** ClusterUpdate desiredNotificationConfig */ - desiredNotificationConfig?: (google.container.v1beta1.INotificationConfig|null); - - /** ClusterUpdate desiredMasterVersion */ - desiredMasterVersion?: (string|null); - - /** ClusterUpdate desiredGcfsConfig */ - desiredGcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** ClusterUpdate desiredDatabaseEncryption */ - desiredDatabaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); - - /** ClusterUpdate desiredWorkloadIdentityConfig */ - desiredWorkloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); - - /** ClusterUpdate desiredWorkloadCertificates */ - desiredWorkloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); - - /** ClusterUpdate desiredMeshCertificates */ - desiredMeshCertificates?: (google.container.v1beta1.IMeshCertificates|null); - - /** ClusterUpdate desiredWorkloadAltsConfig */ - desiredWorkloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); - - /** ClusterUpdate desiredShieldedNodes */ - desiredShieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); - - /** ClusterUpdate desiredCostManagementConfig */ - desiredCostManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); - - /** ClusterUpdate desiredMaster */ - desiredMaster?: (google.container.v1beta1.IMaster|null); - - /** ClusterUpdate desiredDnsConfig */ - desiredDnsConfig?: (google.container.v1beta1.IDNSConfig|null); - - /** ClusterUpdate desiredServiceExternalIpsConfig */ - desiredServiceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); - - /** ClusterUpdate desiredAuthenticatorGroupsConfig */ - desiredAuthenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); - - /** ClusterUpdate desiredLoggingConfig */ - desiredLoggingConfig?: (google.container.v1beta1.ILoggingConfig|null); - - /** ClusterUpdate desiredMonitoringConfig */ - desiredMonitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); - - /** ClusterUpdate desiredIdentityServiceConfig */ - desiredIdentityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); - - /** ClusterUpdate desiredEnablePrivateEndpoint */ - desiredEnablePrivateEndpoint?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags */ - desiredNodePoolAutoConfigNetworkTags?: (google.container.v1beta1.INetworkTags|null); - - /** ClusterUpdate desiredProtectConfig */ - desiredProtectConfig?: (google.container.v1beta1.IProtectConfig|null); - - /** ClusterUpdate desiredGatewayApiConfig */ - desiredGatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); - - /** ClusterUpdate etag */ - etag?: (string|null); - - /** ClusterUpdate desiredNodePoolLoggingConfig */ - desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** ClusterUpdate desiredFleet */ - desiredFleet?: (google.container.v1beta1.IFleet|null); - - /** ClusterUpdate desiredStackType */ - desiredStackType?: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType|null); - - /** ClusterUpdate additionalPodRangesConfig */ - additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate removedAdditionalPodRangesConfig */ - removedAdditionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate enableK8sBetaApis */ - enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredSecurityPostureConfig */ - desiredSecurityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); - - /** ClusterUpdate desiredNetworkPerformanceConfig */ - desiredNetworkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** ClusterUpdate desiredEnableFqdnNetworkPolicy */ - desiredEnableFqdnNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig */ - desiredAutopilotWorkloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); - - /** ClusterUpdate desiredK8sBetaApis */ - desiredK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredHostMaintenancePolicy */ - desiredHostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** ClusterUpdate desiredContainerdConfig */ - desiredContainerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** ClusterUpdate desiredEnableMultiNetworking */ - desiredEnableMultiNetworking?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags */ - desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** ClusterUpdate desiredInTransitEncryptionConfig */ - desiredInTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); - - /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy */ - desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredSecretManagerConfig */ - desiredSecretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); - - /** ClusterUpdate desiredNodeKubeletConfig */ - desiredNodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig */ - desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - } - - /** Represents a ClusterUpdate. */ - class ClusterUpdate implements IClusterUpdate { - - /** - * Constructs a new ClusterUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IClusterUpdate); - - /** ClusterUpdate desiredNodeVersion. */ - public desiredNodeVersion: string; - - /** ClusterUpdate desiredMonitoringService. */ - public desiredMonitoringService: string; - - /** ClusterUpdate desiredAddonsConfig. */ - public desiredAddonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** ClusterUpdate desiredNodePoolId. */ - public desiredNodePoolId: string; - - /** ClusterUpdate desiredImageType. */ - public desiredImageType: string; - - /** ClusterUpdate desiredNodePoolAutoscaling. */ - public desiredNodePoolAutoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** ClusterUpdate desiredLocations. */ - public desiredLocations: string[]; - - /** ClusterUpdate desiredMasterAuthorizedNetworksConfig. */ - public desiredMasterAuthorizedNetworksConfig?: (google.container.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** ClusterUpdate desiredPodSecurityPolicyConfig. */ - public desiredPodSecurityPolicyConfig?: (google.container.v1beta1.IPodSecurityPolicyConfig|null); - - /** ClusterUpdate desiredClusterAutoscaling. */ - public desiredClusterAutoscaling?: (google.container.v1beta1.IClusterAutoscaling|null); - - /** ClusterUpdate desiredBinaryAuthorization. */ - public desiredBinaryAuthorization?: (google.container.v1beta1.IBinaryAuthorization|null); - - /** ClusterUpdate desiredLoggingService. */ - public desiredLoggingService: string; - - /** ClusterUpdate desiredResourceUsageExportConfig. */ - public desiredResourceUsageExportConfig?: (google.container.v1beta1.IResourceUsageExportConfig|null); - - /** ClusterUpdate desiredVerticalPodAutoscaling. */ - public desiredVerticalPodAutoscaling?: (google.container.v1beta1.IVerticalPodAutoscaling|null); - - /** ClusterUpdate desiredPrivateClusterConfig. */ - public desiredPrivateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredIntraNodeVisibilityConfig. */ - public desiredIntraNodeVisibilityConfig?: (google.container.v1beta1.IIntraNodeVisibilityConfig|null); - - /** ClusterUpdate desiredDefaultSnatStatus. */ - public desiredDefaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); - - /** ClusterUpdate desiredClusterTelemetry. */ - public desiredClusterTelemetry?: (google.container.v1beta1.IClusterTelemetry|null); - - /** ClusterUpdate desiredReleaseChannel. */ - public desiredReleaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** ClusterUpdate privateClusterConfig. */ - public privateClusterConfig?: (google.container.v1beta1.IPrivateClusterConfig|null); - - /** ClusterUpdate desiredTpuConfig. */ - public desiredTpuConfig?: (google.container.v1beta1.ITpuConfig|null); - - /** ClusterUpdate desiredL4ilbSubsettingConfig. */ - public desiredL4ilbSubsettingConfig?: (google.container.v1beta1.IILBSubsettingConfig|null); - - /** ClusterUpdate desiredDatapathProvider. */ - public desiredDatapathProvider: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider); - - /** ClusterUpdate desiredPrivateIpv6GoogleAccess. */ - public desiredPrivateIpv6GoogleAccess: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess); - - /** ClusterUpdate desiredNotificationConfig. */ - public desiredNotificationConfig?: (google.container.v1beta1.INotificationConfig|null); - - /** ClusterUpdate desiredMasterVersion. */ - public desiredMasterVersion: string; - - /** ClusterUpdate desiredGcfsConfig. */ - public desiredGcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** ClusterUpdate desiredDatabaseEncryption. */ - public desiredDatabaseEncryption?: (google.container.v1beta1.IDatabaseEncryption|null); - - /** ClusterUpdate desiredWorkloadIdentityConfig. */ - public desiredWorkloadIdentityConfig?: (google.container.v1beta1.IWorkloadIdentityConfig|null); - - /** ClusterUpdate desiredWorkloadCertificates. */ - public desiredWorkloadCertificates?: (google.container.v1beta1.IWorkloadCertificates|null); - - /** ClusterUpdate desiredMeshCertificates. */ - public desiredMeshCertificates?: (google.container.v1beta1.IMeshCertificates|null); - - /** ClusterUpdate desiredWorkloadAltsConfig. */ - public desiredWorkloadAltsConfig?: (google.container.v1beta1.IWorkloadALTSConfig|null); - - /** ClusterUpdate desiredShieldedNodes. */ - public desiredShieldedNodes?: (google.container.v1beta1.IShieldedNodes|null); - - /** ClusterUpdate desiredCostManagementConfig. */ - public desiredCostManagementConfig?: (google.container.v1beta1.ICostManagementConfig|null); - - /** ClusterUpdate desiredMaster. */ - public desiredMaster?: (google.container.v1beta1.IMaster|null); - - /** ClusterUpdate desiredDnsConfig. */ - public desiredDnsConfig?: (google.container.v1beta1.IDNSConfig|null); - - /** ClusterUpdate desiredServiceExternalIpsConfig. */ - public desiredServiceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); - - /** ClusterUpdate desiredAuthenticatorGroupsConfig. */ - public desiredAuthenticatorGroupsConfig?: (google.container.v1beta1.IAuthenticatorGroupsConfig|null); - - /** ClusterUpdate desiredLoggingConfig. */ - public desiredLoggingConfig?: (google.container.v1beta1.ILoggingConfig|null); - - /** ClusterUpdate desiredMonitoringConfig. */ - public desiredMonitoringConfig?: (google.container.v1beta1.IMonitoringConfig|null); - - /** ClusterUpdate desiredIdentityServiceConfig. */ - public desiredIdentityServiceConfig?: (google.container.v1beta1.IIdentityServiceConfig|null); - - /** ClusterUpdate desiredEnablePrivateEndpoint. */ - public desiredEnablePrivateEndpoint?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigNetworkTags. */ - public desiredNodePoolAutoConfigNetworkTags?: (google.container.v1beta1.INetworkTags|null); - - /** ClusterUpdate desiredProtectConfig. */ - public desiredProtectConfig?: (google.container.v1beta1.IProtectConfig|null); - - /** ClusterUpdate desiredGatewayApiConfig. */ - public desiredGatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); - - /** ClusterUpdate etag. */ - public etag: string; - - /** ClusterUpdate desiredNodePoolLoggingConfig. */ - public desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** ClusterUpdate desiredFleet. */ - public desiredFleet?: (google.container.v1beta1.IFleet|null); - - /** ClusterUpdate desiredStackType. */ - public desiredStackType: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType); - - /** ClusterUpdate additionalPodRangesConfig. */ - public additionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate removedAdditionalPodRangesConfig. */ - public removedAdditionalPodRangesConfig?: (google.container.v1beta1.IAdditionalPodRangesConfig|null); - - /** ClusterUpdate enableK8sBetaApis. */ - public enableK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredSecurityPostureConfig. */ - public desiredSecurityPostureConfig?: (google.container.v1beta1.ISecurityPostureConfig|null); - - /** ClusterUpdate desiredNetworkPerformanceConfig. */ - public desiredNetworkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** ClusterUpdate desiredEnableFqdnNetworkPolicy. */ - public desiredEnableFqdnNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredAutopilotWorkloadPolicyConfig. */ - public desiredAutopilotWorkloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); - - /** ClusterUpdate desiredK8sBetaApis. */ - public desiredK8sBetaApis?: (google.container.v1beta1.IK8sBetaAPIConfig|null); - - /** ClusterUpdate desiredHostMaintenancePolicy. */ - public desiredHostMaintenancePolicy?: (google.container.v1beta1.IHostMaintenancePolicy|null); - - /** ClusterUpdate desiredContainerdConfig. */ - public desiredContainerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** ClusterUpdate desiredEnableMultiNetworking. */ - public desiredEnableMultiNetworking?: (boolean|null); - - /** ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. */ - public desiredNodePoolAutoConfigResourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** ClusterUpdate desiredInTransitEncryptionConfig. */ - public desiredInTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); - - /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. */ - public desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** ClusterUpdate desiredSecretManagerConfig. */ - public desiredSecretManagerConfig?: (google.container.v1beta1.ISecretManagerConfig|null); - - /** ClusterUpdate desiredNodeKubeletConfig. */ - public desiredNodeKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. */ - public desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** ClusterUpdate _desiredEnablePrivateEndpoint. */ - public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; - - /** ClusterUpdate _desiredProtectConfig. */ - public _desiredProtectConfig?: "desiredProtectConfig"; - - /** ClusterUpdate _desiredEnableFqdnNetworkPolicy. */ - public _desiredEnableFqdnNetworkPolicy?: "desiredEnableFqdnNetworkPolicy"; - - /** ClusterUpdate _desiredEnableMultiNetworking. */ - public _desiredEnableMultiNetworking?: "desiredEnableMultiNetworking"; - - /** ClusterUpdate _desiredInTransitEncryptionConfig. */ - public _desiredInTransitEncryptionConfig?: "desiredInTransitEncryptionConfig"; - - /** ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. */ - public _desiredEnableCiliumClusterwideNetworkPolicy?: "desiredEnableCiliumClusterwideNetworkPolicy"; - - /** ClusterUpdate _desiredSecretManagerConfig. */ - public _desiredSecretManagerConfig?: "desiredSecretManagerConfig"; - - /** - * Creates a new ClusterUpdate instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterUpdate instance - */ - public static create(properties?: google.container.v1beta1.IClusterUpdate): google.container.v1beta1.ClusterUpdate; - - /** - * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. - * @param message ClusterUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. - * @param message ClusterUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IClusterUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterUpdate; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterUpdate; - - /** - * Verifies a ClusterUpdate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterUpdate - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterUpdate; - - /** - * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. - * @param message ClusterUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ClusterUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterUpdate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdditionalPodRangesConfig. */ - interface IAdditionalPodRangesConfig { - - /** AdditionalPodRangesConfig podRangeNames */ - podRangeNames?: (string[]|null); - - /** AdditionalPodRangesConfig podRangeInfo */ - podRangeInfo?: (google.container.v1beta1.IRangeInfo[]|null); - } - - /** Represents an AdditionalPodRangesConfig. */ - class AdditionalPodRangesConfig implements IAdditionalPodRangesConfig { - - /** - * Constructs a new AdditionalPodRangesConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAdditionalPodRangesConfig); - - /** AdditionalPodRangesConfig podRangeNames. */ - public podRangeNames: string[]; - - /** AdditionalPodRangesConfig podRangeInfo. */ - public podRangeInfo: google.container.v1beta1.IRangeInfo[]; - - /** - * Creates a new AdditionalPodRangesConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdditionalPodRangesConfig instance - */ - public static create(properties?: google.container.v1beta1.IAdditionalPodRangesConfig): google.container.v1beta1.AdditionalPodRangesConfig; - - /** - * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. - * @param message AdditionalPodRangesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. - * @param message AdditionalPodRangesConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAdditionalPodRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdditionalPodRangesConfig; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdditionalPodRangesConfig; - - /** - * Verifies an AdditionalPodRangesConfig message. - * @param message Plain 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 AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdditionalPodRangesConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdditionalPodRangesConfig; - - /** - * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. - * @param message AdditionalPodRangesConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AdditionalPodRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdditionalPodRangesConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdditionalPodRangesConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RangeInfo. */ - interface IRangeInfo { - - /** RangeInfo rangeName */ - rangeName?: (string|null); - - /** RangeInfo utilization */ - utilization?: (number|null); - } - - /** Represents a RangeInfo. */ - class RangeInfo implements IRangeInfo { - - /** - * Constructs a new RangeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRangeInfo); - - /** RangeInfo rangeName. */ - public rangeName: string; - - /** RangeInfo utilization. */ - public utilization: number; - - /** - * Creates a new RangeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RangeInfo instance - */ - public static create(properties?: google.container.v1beta1.IRangeInfo): google.container.v1beta1.RangeInfo; - - /** - * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. - * @param message RangeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. - * @param message RangeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRangeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RangeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RangeInfo; - - /** - * Decodes a RangeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RangeInfo; - - /** - * Verifies a RangeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RangeInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RangeInfo; - - /** - * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. - * @param message RangeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RangeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RangeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RangeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation zone */ - zone?: (string|null); - - /** Operation operationType */ - operationType?: (google.container.v1beta1.Operation.Type|keyof typeof google.container.v1beta1.Operation.Type|null); - - /** Operation status */ - status?: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status|null); - - /** Operation detail */ - detail?: (string|null); - - /** Operation statusMessage */ - statusMessage?: (string|null); - - /** Operation selfLink */ - selfLink?: (string|null); - - /** Operation targetLink */ - targetLink?: (string|null); - - /** Operation location */ - location?: (string|null); - - /** Operation startTime */ - startTime?: (string|null); - - /** Operation endTime */ - endTime?: (string|null); - - /** Operation progress */ - progress?: (google.container.v1beta1.IOperationProgress|null); - - /** Operation clusterConditions */ - clusterConditions?: (google.container.v1beta1.IStatusCondition[]|null); - - /** Operation nodepoolConditions */ - nodepoolConditions?: (google.container.v1beta1.IStatusCondition[]|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation zone. */ - public zone: string; - - /** Operation operationType. */ - public operationType: (google.container.v1beta1.Operation.Type|keyof typeof google.container.v1beta1.Operation.Type); - - /** Operation status. */ - public status: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status); - - /** Operation detail. */ - public detail: string; - - /** Operation statusMessage. */ - public statusMessage: string; - - /** Operation selfLink. */ - public selfLink: string; - - /** Operation targetLink. */ - public targetLink: string; - - /** Operation location. */ - public location: string; - - /** Operation startTime. */ - public startTime: string; - - /** Operation endTime. */ - public endTime: string; - - /** Operation progress. */ - public progress?: (google.container.v1beta1.IOperationProgress|null); - - /** Operation clusterConditions. */ - public clusterConditions: google.container.v1beta1.IStatusCondition[]; - - /** Operation nodepoolConditions. */ - public nodepoolConditions: google.container.v1beta1.IStatusCondition[]; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.container.v1beta1.IOperation): google.container.v1beta1.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Operation { - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - DONE = 3, - ABORTING = 4 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CREATE_CLUSTER = 1, - DELETE_CLUSTER = 2, - UPGRADE_MASTER = 3, - UPGRADE_NODES = 4, - REPAIR_CLUSTER = 5, - UPDATE_CLUSTER = 6, - CREATE_NODE_POOL = 7, - DELETE_NODE_POOL = 8, - SET_NODE_POOL_MANAGEMENT = 9, - AUTO_REPAIR_NODES = 10, - AUTO_UPGRADE_NODES = 11, - SET_LABELS = 12, - SET_MASTER_AUTH = 13, - SET_NODE_POOL_SIZE = 14, - SET_NETWORK_POLICY = 15, - SET_MAINTENANCE_POLICY = 16, - RESIZE_CLUSTER = 18, - FLEET_FEATURE_UPGRADE = 19 - } - } - - /** Properties of an OperationProgress. */ - interface IOperationProgress { - - /** OperationProgress name */ - name?: (string|null); - - /** OperationProgress status */ - status?: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status|null); - - /** OperationProgress metrics */ - metrics?: (google.container.v1beta1.OperationProgress.IMetric[]|null); - - /** OperationProgress stages */ - stages?: (google.container.v1beta1.IOperationProgress[]|null); - } - - /** Represents an OperationProgress. */ - class OperationProgress implements IOperationProgress { - - /** - * Constructs a new OperationProgress. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IOperationProgress); - - /** OperationProgress name. */ - public name: string; - - /** OperationProgress status. */ - public status: (google.container.v1beta1.Operation.Status|keyof typeof google.container.v1beta1.Operation.Status); - - /** OperationProgress metrics. */ - public metrics: google.container.v1beta1.OperationProgress.IMetric[]; - - /** OperationProgress stages. */ - public stages: google.container.v1beta1.IOperationProgress[]; - - /** - * Creates a new OperationProgress instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationProgress instance - */ - public static create(properties?: google.container.v1beta1.IOperationProgress): google.container.v1beta1.OperationProgress; - - /** - * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. - * @param message OperationProgress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. - * @param message OperationProgress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IOperationProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationProgress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.OperationProgress; - - /** - * Decodes an OperationProgress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.OperationProgress; - - /** - * Verifies an OperationProgress message. - * @param message Plain 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 OperationProgress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationProgress - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.OperationProgress; - - /** - * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. - * @param message OperationProgress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.OperationProgress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationProgress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationProgress - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OperationProgress { - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric intValue */ - intValue?: (number|Long|string|null); - - /** Metric doubleValue */ - doubleValue?: (number|null); - - /** Metric stringValue */ - stringValue?: (string|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.OperationProgress.IMetric); - - /** Metric name. */ - public name: string; - - /** Metric intValue. */ - public intValue?: (number|Long|string|null); - - /** Metric doubleValue. */ - public doubleValue?: (number|null); - - /** Metric stringValue. */ - public stringValue?: (string|null); - - /** Metric value. */ - public value?: ("intValue"|"doubleValue"|"stringValue"); - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.container.v1beta1.OperationProgress.IMetric): google.container.v1beta1.OperationProgress.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.OperationProgress.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.OperationProgress.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.OperationProgress.Metric; - - /** - * Verifies a Metric message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.OperationProgress.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.OperationProgress.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateClusterRequest. */ - interface ICreateClusterRequest { - - /** CreateClusterRequest projectId */ - projectId?: (string|null); - - /** CreateClusterRequest zone */ - zone?: (string|null); - - /** CreateClusterRequest cluster */ - cluster?: (google.container.v1beta1.ICluster|null); - - /** CreateClusterRequest parent */ - parent?: (string|null); - } - - /** Represents a CreateClusterRequest. */ - class CreateClusterRequest implements ICreateClusterRequest { - - /** - * Constructs a new CreateClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICreateClusterRequest); - - /** CreateClusterRequest projectId. */ - public projectId: string; - - /** CreateClusterRequest zone. */ - public zone: string; - - /** CreateClusterRequest cluster. */ - public cluster?: (google.container.v1beta1.ICluster|null); - - /** CreateClusterRequest parent. */ - public parent: string; - - /** - * Creates a new CreateClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateClusterRequest instance - */ - public static create(properties?: google.container.v1beta1.ICreateClusterRequest): google.container.v1beta1.CreateClusterRequest; - - /** - * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. - * @param message CreateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. - * @param message CreateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICreateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CreateClusterRequest; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CreateClusterRequest; - - /** - * Verifies a CreateClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CreateClusterRequest; - - /** - * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. - * @param message CreateClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CreateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetClusterRequest. */ - interface IGetClusterRequest { - - /** GetClusterRequest projectId */ - projectId?: (string|null); - - /** GetClusterRequest zone */ - zone?: (string|null); - - /** GetClusterRequest clusterId */ - clusterId?: (string|null); - - /** GetClusterRequest name */ - name?: (string|null); - } - - /** Represents a GetClusterRequest. */ - class GetClusterRequest implements IGetClusterRequest { - - /** - * Constructs a new GetClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetClusterRequest); - - /** GetClusterRequest projectId. */ - public projectId: string; - - /** GetClusterRequest zone. */ - public zone: string; - - /** GetClusterRequest clusterId. */ - public clusterId: string; - - /** GetClusterRequest name. */ - public name: string; - - /** - * Creates a new GetClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetClusterRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetClusterRequest): google.container.v1beta1.GetClusterRequest; - - /** - * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. - * @param message GetClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. - * @param message GetClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetClusterRequest; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetClusterRequest; - - /** - * Verifies a GetClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetClusterRequest; - - /** - * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. - * @param message GetClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateClusterRequest. */ - interface IUpdateClusterRequest { - - /** UpdateClusterRequest projectId */ - projectId?: (string|null); - - /** UpdateClusterRequest zone */ - zone?: (string|null); - - /** UpdateClusterRequest clusterId */ - clusterId?: (string|null); - - /** UpdateClusterRequest update */ - update?: (google.container.v1beta1.IClusterUpdate|null); - - /** UpdateClusterRequest name */ - name?: (string|null); - } - - /** Represents an UpdateClusterRequest. */ - class UpdateClusterRequest implements IUpdateClusterRequest { - - /** - * Constructs a new UpdateClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUpdateClusterRequest); - - /** UpdateClusterRequest projectId. */ - public projectId: string; - - /** UpdateClusterRequest zone. */ - public zone: string; - - /** UpdateClusterRequest clusterId. */ - public clusterId: string; - - /** UpdateClusterRequest update. */ - public update?: (google.container.v1beta1.IClusterUpdate|null); - - /** UpdateClusterRequest name. */ - public name: string; - - /** - * Creates a new UpdateClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateClusterRequest instance - */ - public static create(properties?: google.container.v1beta1.IUpdateClusterRequest): google.container.v1beta1.UpdateClusterRequest; - - /** - * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. - * @param message UpdateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. - * @param message UpdateClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateClusterRequest; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateClusterRequest; - - /** - * Verifies an UpdateClusterRequest message. - * @param message Plain 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 UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateClusterRequest; - - /** - * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. - * @param message UpdateClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateNodePoolRequest. */ - interface IUpdateNodePoolRequest { - - /** UpdateNodePoolRequest projectId */ - projectId?: (string|null); - - /** UpdateNodePoolRequest zone */ - zone?: (string|null); - - /** UpdateNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** UpdateNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** UpdateNodePoolRequest nodeVersion */ - nodeVersion?: (string|null); - - /** UpdateNodePoolRequest imageType */ - imageType?: (string|null); - - /** UpdateNodePoolRequest locations */ - locations?: (string[]|null); - - /** UpdateNodePoolRequest workloadMetadataConfig */ - workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); - - /** UpdateNodePoolRequest name */ - name?: (string|null); - - /** UpdateNodePoolRequest upgradeSettings */ - upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** UpdateNodePoolRequest tags */ - tags?: (google.container.v1beta1.INetworkTags|null); - - /** UpdateNodePoolRequest taints */ - taints?: (google.container.v1beta1.INodeTaints|null); - - /** UpdateNodePoolRequest labels */ - labels?: (google.container.v1beta1.INodeLabels|null); - - /** UpdateNodePoolRequest linuxNodeConfig */ - linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); - - /** UpdateNodePoolRequest kubeletConfig */ - kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** UpdateNodePoolRequest nodeNetworkConfig */ - nodeNetworkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); - - /** UpdateNodePoolRequest gcfsConfig */ - gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** UpdateNodePoolRequest confidentialNodes */ - confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** UpdateNodePoolRequest gvnic */ - gvnic?: (google.container.v1beta1.IVirtualNIC|null); - - /** UpdateNodePoolRequest etag */ - etag?: (string|null); - - /** UpdateNodePoolRequest fastSocket */ - fastSocket?: (google.container.v1beta1.IFastSocket|null); - - /** UpdateNodePoolRequest loggingConfig */ - loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** UpdateNodePoolRequest resourceLabels */ - resourceLabels?: (google.container.v1beta1.IResourceLabels|null); - - /** UpdateNodePoolRequest windowsNodeConfig */ - windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); - - /** UpdateNodePoolRequest accelerators */ - accelerators?: (google.container.v1beta1.IAcceleratorConfig[]|null); - - /** UpdateNodePoolRequest machineType */ - machineType?: (string|null); - - /** UpdateNodePoolRequest diskType */ - diskType?: (string|null); - - /** UpdateNodePoolRequest diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** UpdateNodePoolRequest resourceManagerTags */ - resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** UpdateNodePoolRequest containerdConfig */ - containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** UpdateNodePoolRequest queuedProvisioning */ - queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); - } - - /** Represents an UpdateNodePoolRequest. */ - class UpdateNodePoolRequest implements IUpdateNodePoolRequest { - - /** - * Constructs a new UpdateNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUpdateNodePoolRequest); - - /** UpdateNodePoolRequest projectId. */ - public projectId: string; - - /** UpdateNodePoolRequest zone. */ - public zone: string; - - /** UpdateNodePoolRequest clusterId. */ - public clusterId: string; - - /** UpdateNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** UpdateNodePoolRequest nodeVersion. */ - public nodeVersion: string; - - /** UpdateNodePoolRequest imageType. */ - public imageType: string; - - /** UpdateNodePoolRequest locations. */ - public locations: string[]; - - /** UpdateNodePoolRequest workloadMetadataConfig. */ - public workloadMetadataConfig?: (google.container.v1beta1.IWorkloadMetadataConfig|null); - - /** UpdateNodePoolRequest name. */ - public name: string; - - /** UpdateNodePoolRequest upgradeSettings. */ - public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** UpdateNodePoolRequest tags. */ - public tags?: (google.container.v1beta1.INetworkTags|null); - - /** UpdateNodePoolRequest taints. */ - public taints?: (google.container.v1beta1.INodeTaints|null); - - /** UpdateNodePoolRequest labels. */ - public labels?: (google.container.v1beta1.INodeLabels|null); - - /** UpdateNodePoolRequest linuxNodeConfig. */ - public linuxNodeConfig?: (google.container.v1beta1.ILinuxNodeConfig|null); - - /** UpdateNodePoolRequest kubeletConfig. */ - public kubeletConfig?: (google.container.v1beta1.INodeKubeletConfig|null); - - /** UpdateNodePoolRequest nodeNetworkConfig. */ - public nodeNetworkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); - - /** UpdateNodePoolRequest gcfsConfig. */ - public gcfsConfig?: (google.container.v1beta1.IGcfsConfig|null); - - /** UpdateNodePoolRequest confidentialNodes. */ - public confidentialNodes?: (google.container.v1beta1.IConfidentialNodes|null); - - /** UpdateNodePoolRequest gvnic. */ - public gvnic?: (google.container.v1beta1.IVirtualNIC|null); - - /** UpdateNodePoolRequest etag. */ - public etag: string; - - /** UpdateNodePoolRequest fastSocket. */ - public fastSocket?: (google.container.v1beta1.IFastSocket|null); - - /** UpdateNodePoolRequest loggingConfig. */ - public loggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); - - /** UpdateNodePoolRequest resourceLabels. */ - public resourceLabels?: (google.container.v1beta1.IResourceLabels|null); - - /** UpdateNodePoolRequest windowsNodeConfig. */ - public windowsNodeConfig?: (google.container.v1beta1.IWindowsNodeConfig|null); - - /** UpdateNodePoolRequest accelerators. */ - public accelerators: google.container.v1beta1.IAcceleratorConfig[]; - - /** UpdateNodePoolRequest machineType. */ - public machineType: string; - - /** UpdateNodePoolRequest diskType. */ - public diskType: string; - - /** UpdateNodePoolRequest diskSizeGb. */ - public diskSizeGb: (number|Long|string); - - /** UpdateNodePoolRequest resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1beta1.IResourceManagerTags|null); - - /** UpdateNodePoolRequest containerdConfig. */ - public containerdConfig?: (google.container.v1beta1.IContainerdConfig|null); - - /** UpdateNodePoolRequest queuedProvisioning. */ - public queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); - - /** - * Creates a new UpdateNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateNodePoolRequest instance - */ - public static create(properties?: google.container.v1beta1.IUpdateNodePoolRequest): google.container.v1beta1.UpdateNodePoolRequest; - - /** - * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. - * @param message UpdateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. - * @param message UpdateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUpdateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateNodePoolRequest; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateNodePoolRequest; - - /** - * Verifies an UpdateNodePoolRequest message. - * @param message Plain 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 UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateNodePoolRequest; - - /** - * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. - * @param message UpdateNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UpdateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolAutoscalingRequest. */ - interface ISetNodePoolAutoscalingRequest { - - /** SetNodePoolAutoscalingRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolAutoscalingRequest zone */ - zone?: (string|null); - - /** SetNodePoolAutoscalingRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolAutoscalingRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolAutoscalingRequest autoscaling */ - autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** SetNodePoolAutoscalingRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolAutoscalingRequest. */ - class SetNodePoolAutoscalingRequest implements ISetNodePoolAutoscalingRequest { - - /** - * Constructs a new SetNodePoolAutoscalingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetNodePoolAutoscalingRequest); - - /** SetNodePoolAutoscalingRequest projectId. */ - public projectId: string; - - /** SetNodePoolAutoscalingRequest zone. */ - public zone: string; - - /** SetNodePoolAutoscalingRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolAutoscalingRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolAutoscalingRequest autoscaling. */ - public autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** SetNodePoolAutoscalingRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolAutoscalingRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetNodePoolAutoscalingRequest): google.container.v1beta1.SetNodePoolAutoscalingRequest; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @param message SetNodePoolAutoscalingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @param message SetNodePoolAutoscalingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolAutoscalingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolAutoscalingRequest; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolAutoscalingRequest; - - /** - * Verifies a SetNodePoolAutoscalingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolAutoscalingRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolAutoscalingRequest; - - /** - * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. - * @param message SetNodePoolAutoscalingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetNodePoolAutoscalingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolAutoscalingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolAutoscalingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLoggingServiceRequest. */ - interface ISetLoggingServiceRequest { - - /** SetLoggingServiceRequest projectId */ - projectId?: (string|null); - - /** SetLoggingServiceRequest zone */ - zone?: (string|null); - - /** SetLoggingServiceRequest clusterId */ - clusterId?: (string|null); - - /** SetLoggingServiceRequest loggingService */ - loggingService?: (string|null); - - /** SetLoggingServiceRequest name */ - name?: (string|null); - } - - /** Represents a SetLoggingServiceRequest. */ - class SetLoggingServiceRequest implements ISetLoggingServiceRequest { - - /** - * Constructs a new SetLoggingServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetLoggingServiceRequest); - - /** SetLoggingServiceRequest projectId. */ - public projectId: string; - - /** SetLoggingServiceRequest zone. */ - public zone: string; - - /** SetLoggingServiceRequest clusterId. */ - public clusterId: string; - - /** SetLoggingServiceRequest loggingService. */ - public loggingService: string; - - /** SetLoggingServiceRequest name. */ - public name: string; - - /** - * Creates a new SetLoggingServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLoggingServiceRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetLoggingServiceRequest): google.container.v1beta1.SetLoggingServiceRequest; - - /** - * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. - * @param message SetLoggingServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. - * @param message SetLoggingServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetLoggingServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLoggingServiceRequest; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLoggingServiceRequest; - - /** - * Verifies a SetLoggingServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLoggingServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLoggingServiceRequest; - - /** - * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. - * @param message SetLoggingServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetLoggingServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLoggingServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLoggingServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMonitoringServiceRequest. */ - interface ISetMonitoringServiceRequest { - - /** SetMonitoringServiceRequest projectId */ - projectId?: (string|null); - - /** SetMonitoringServiceRequest zone */ - zone?: (string|null); - - /** SetMonitoringServiceRequest clusterId */ - clusterId?: (string|null); - - /** SetMonitoringServiceRequest monitoringService */ - monitoringService?: (string|null); - - /** SetMonitoringServiceRequest name */ - name?: (string|null); - } - - /** Represents a SetMonitoringServiceRequest. */ - class SetMonitoringServiceRequest implements ISetMonitoringServiceRequest { - - /** - * Constructs a new SetMonitoringServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetMonitoringServiceRequest); - - /** SetMonitoringServiceRequest projectId. */ - public projectId: string; - - /** SetMonitoringServiceRequest zone. */ - public zone: string; - - /** SetMonitoringServiceRequest clusterId. */ - public clusterId: string; - - /** SetMonitoringServiceRequest monitoringService. */ - public monitoringService: string; - - /** SetMonitoringServiceRequest name. */ - public name: string; - - /** - * Creates a new SetMonitoringServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMonitoringServiceRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetMonitoringServiceRequest): google.container.v1beta1.SetMonitoringServiceRequest; - - /** - * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. - * @param message SetMonitoringServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. - * @param message SetMonitoringServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetMonitoringServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMonitoringServiceRequest; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMonitoringServiceRequest; - - /** - * Verifies a SetMonitoringServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMonitoringServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMonitoringServiceRequest; - - /** - * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. - * @param message SetMonitoringServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetMonitoringServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMonitoringServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMonitoringServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetAddonsConfigRequest. */ - interface ISetAddonsConfigRequest { - - /** SetAddonsConfigRequest projectId */ - projectId?: (string|null); - - /** SetAddonsConfigRequest zone */ - zone?: (string|null); - - /** SetAddonsConfigRequest clusterId */ - clusterId?: (string|null); - - /** SetAddonsConfigRequest addonsConfig */ - addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** SetAddonsConfigRequest name */ - name?: (string|null); - } - - /** Represents a SetAddonsConfigRequest. */ - class SetAddonsConfigRequest implements ISetAddonsConfigRequest { - - /** - * Constructs a new SetAddonsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetAddonsConfigRequest); - - /** SetAddonsConfigRequest projectId. */ - public projectId: string; - - /** SetAddonsConfigRequest zone. */ - public zone: string; - - /** SetAddonsConfigRequest clusterId. */ - public clusterId: string; - - /** SetAddonsConfigRequest addonsConfig. */ - public addonsConfig?: (google.container.v1beta1.IAddonsConfig|null); - - /** SetAddonsConfigRequest name. */ - public name: string; - - /** - * Creates a new SetAddonsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetAddonsConfigRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetAddonsConfigRequest): google.container.v1beta1.SetAddonsConfigRequest; - - /** - * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. - * @param message SetAddonsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. - * @param message SetAddonsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetAddonsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetAddonsConfigRequest; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetAddonsConfigRequest; - - /** - * Verifies a SetAddonsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetAddonsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetAddonsConfigRequest; - - /** - * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. - * @param message SetAddonsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetAddonsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetAddonsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetAddonsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLocationsRequest. */ - interface ISetLocationsRequest { - - /** SetLocationsRequest projectId */ - projectId?: (string|null); - - /** SetLocationsRequest zone */ - zone?: (string|null); - - /** SetLocationsRequest clusterId */ - clusterId?: (string|null); - - /** SetLocationsRequest locations */ - locations?: (string[]|null); - - /** SetLocationsRequest name */ - name?: (string|null); - } - - /** Represents a SetLocationsRequest. */ - class SetLocationsRequest implements ISetLocationsRequest { - - /** - * Constructs a new SetLocationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetLocationsRequest); - - /** SetLocationsRequest projectId. */ - public projectId: string; - - /** SetLocationsRequest zone. */ - public zone: string; - - /** SetLocationsRequest clusterId. */ - public clusterId: string; - - /** SetLocationsRequest locations. */ - public locations: string[]; - - /** SetLocationsRequest name. */ - public name: string; - - /** - * Creates a new SetLocationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLocationsRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetLocationsRequest): google.container.v1beta1.SetLocationsRequest; - - /** - * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. - * @param message SetLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. - * @param message SetLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLocationsRequest; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLocationsRequest; - - /** - * Verifies a SetLocationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLocationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLocationsRequest; - - /** - * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. - * @param message SetLocationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLocationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLocationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateMasterRequest. */ - interface IUpdateMasterRequest { - - /** UpdateMasterRequest projectId */ - projectId?: (string|null); - - /** UpdateMasterRequest zone */ - zone?: (string|null); - - /** UpdateMasterRequest clusterId */ - clusterId?: (string|null); - - /** UpdateMasterRequest masterVersion */ - masterVersion?: (string|null); - - /** UpdateMasterRequest name */ - name?: (string|null); - } - - /** Represents an UpdateMasterRequest. */ - class UpdateMasterRequest implements IUpdateMasterRequest { - - /** - * Constructs a new UpdateMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUpdateMasterRequest); - - /** UpdateMasterRequest projectId. */ - public projectId: string; - - /** UpdateMasterRequest zone. */ - public zone: string; - - /** UpdateMasterRequest clusterId. */ - public clusterId: string; - - /** UpdateMasterRequest masterVersion. */ - public masterVersion: string; - - /** UpdateMasterRequest name. */ - public name: string; - - /** - * Creates a new UpdateMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateMasterRequest instance - */ - public static create(properties?: google.container.v1beta1.IUpdateMasterRequest): google.container.v1beta1.UpdateMasterRequest; - - /** - * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. - * @param message UpdateMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. - * @param message UpdateMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUpdateMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpdateMasterRequest; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpdateMasterRequest; - - /** - * Verifies an UpdateMasterRequest message. - * @param message Plain 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 UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateMasterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpdateMasterRequest; - - /** - * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. - * @param message UpdateMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UpdateMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateMasterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMasterAuthRequest. */ - interface ISetMasterAuthRequest { - - /** SetMasterAuthRequest projectId */ - projectId?: (string|null); - - /** SetMasterAuthRequest zone */ - zone?: (string|null); - - /** SetMasterAuthRequest clusterId */ - clusterId?: (string|null); - - /** SetMasterAuthRequest action */ - action?: (google.container.v1beta1.SetMasterAuthRequest.Action|keyof typeof google.container.v1beta1.SetMasterAuthRequest.Action|null); - - /** SetMasterAuthRequest update */ - update?: (google.container.v1beta1.IMasterAuth|null); - - /** SetMasterAuthRequest name */ - name?: (string|null); - } - - /** Represents a SetMasterAuthRequest. */ - class SetMasterAuthRequest implements ISetMasterAuthRequest { - - /** - * Constructs a new SetMasterAuthRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetMasterAuthRequest); - - /** SetMasterAuthRequest projectId. */ - public projectId: string; - - /** SetMasterAuthRequest zone. */ - public zone: string; - - /** SetMasterAuthRequest clusterId. */ - public clusterId: string; - - /** SetMasterAuthRequest action. */ - public action: (google.container.v1beta1.SetMasterAuthRequest.Action|keyof typeof google.container.v1beta1.SetMasterAuthRequest.Action); - - /** SetMasterAuthRequest update. */ - public update?: (google.container.v1beta1.IMasterAuth|null); - - /** SetMasterAuthRequest name. */ - public name: string; - - /** - * Creates a new SetMasterAuthRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMasterAuthRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetMasterAuthRequest): google.container.v1beta1.SetMasterAuthRequest; - - /** - * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. - * @param message SetMasterAuthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. - * @param message SetMasterAuthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetMasterAuthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMasterAuthRequest; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMasterAuthRequest; - - /** - * Verifies a SetMasterAuthRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMasterAuthRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMasterAuthRequest; - - /** - * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. - * @param message SetMasterAuthRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetMasterAuthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMasterAuthRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMasterAuthRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SetMasterAuthRequest { - - /** Action enum. */ - enum Action { - UNKNOWN = 0, - SET_PASSWORD = 1, - GENERATE_PASSWORD = 2, - SET_USERNAME = 3 - } - } - - /** Properties of a DeleteClusterRequest. */ - interface IDeleteClusterRequest { - - /** DeleteClusterRequest projectId */ - projectId?: (string|null); - - /** DeleteClusterRequest zone */ - zone?: (string|null); - - /** DeleteClusterRequest clusterId */ - clusterId?: (string|null); - - /** DeleteClusterRequest name */ - name?: (string|null); - } - - /** Represents a DeleteClusterRequest. */ - class DeleteClusterRequest implements IDeleteClusterRequest { - - /** - * Constructs a new DeleteClusterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDeleteClusterRequest); - - /** DeleteClusterRequest projectId. */ - public projectId: string; - - /** DeleteClusterRequest zone. */ - public zone: string; - - /** DeleteClusterRequest clusterId. */ - public clusterId: string; - - /** DeleteClusterRequest name. */ - public name: string; - - /** - * Creates a new DeleteClusterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteClusterRequest instance - */ - public static create(properties?: google.container.v1beta1.IDeleteClusterRequest): google.container.v1beta1.DeleteClusterRequest; - - /** - * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. - * @param message DeleteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. - * @param message DeleteClusterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDeleteClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DeleteClusterRequest; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DeleteClusterRequest; - - /** - * Verifies a DeleteClusterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteClusterRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DeleteClusterRequest; - - /** - * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. - * @param message DeleteClusterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DeleteClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteClusterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteClusterRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersRequest. */ - interface IListClustersRequest { - - /** ListClustersRequest projectId */ - projectId?: (string|null); - - /** ListClustersRequest zone */ - zone?: (string|null); - - /** ListClustersRequest parent */ - parent?: (string|null); - } - - /** Represents a ListClustersRequest. */ - class ListClustersRequest implements IListClustersRequest { - - /** - * Constructs a new ListClustersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListClustersRequest); - - /** ListClustersRequest projectId. */ - public projectId: string; - - /** ListClustersRequest zone. */ - public zone: string; - - /** ListClustersRequest parent. */ - public parent: string; - - /** - * Creates a new ListClustersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersRequest instance - */ - public static create(properties?: google.container.v1beta1.IListClustersRequest): google.container.v1beta1.ListClustersRequest; - - /** - * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. - * @param message ListClustersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListClustersRequest; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListClustersRequest; - - /** - * Verifies a ListClustersRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListClustersRequest; - - /** - * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. - * @param message ListClustersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListClustersResponse. */ - interface IListClustersResponse { - - /** ListClustersResponse clusters */ - clusters?: (google.container.v1beta1.ICluster[]|null); - - /** ListClustersResponse missingZones */ - missingZones?: (string[]|null); - } - - /** Represents a ListClustersResponse. */ - class ListClustersResponse implements IListClustersResponse { - - /** - * Constructs a new ListClustersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListClustersResponse); - - /** ListClustersResponse clusters. */ - public clusters: google.container.v1beta1.ICluster[]; - - /** ListClustersResponse missingZones. */ - public missingZones: string[]; - - /** - * Creates a new ListClustersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListClustersResponse instance - */ - public static create(properties?: google.container.v1beta1.IListClustersResponse): google.container.v1beta1.ListClustersResponse; - - /** - * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. - * @param message ListClustersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListClustersResponse; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListClustersResponse; - - /** - * Verifies a ListClustersResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListClustersResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListClustersResponse; - - /** - * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. - * @param message ListClustersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListClustersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListClustersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest projectId */ - projectId?: (string|null); - - /** GetOperationRequest zone */ - zone?: (string|null); - - /** GetOperationRequest operationId */ - operationId?: (string|null); - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetOperationRequest); - - /** GetOperationRequest projectId. */ - public projectId: string; - - /** GetOperationRequest zone. */ - public zone: string; - - /** GetOperationRequest operationId. */ - public operationId: string; - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetOperationRequest): google.container.v1beta1.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest projectId */ - projectId?: (string|null); - - /** ListOperationsRequest zone */ - zone?: (string|null); - - /** ListOperationsRequest parent */ - parent?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListOperationsRequest); - - /** ListOperationsRequest projectId. */ - public projectId: string; - - /** ListOperationsRequest zone. */ - public zone: string; - - /** ListOperationsRequest parent. */ - public parent: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.container.v1beta1.IListOperationsRequest): google.container.v1beta1.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest projectId */ - projectId?: (string|null); - - /** CancelOperationRequest zone */ - zone?: (string|null); - - /** CancelOperationRequest operationId */ - operationId?: (string|null); - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICancelOperationRequest); - - /** CancelOperationRequest projectId. */ - public projectId: string; - - /** CancelOperationRequest zone. */ - public zone: string; - - /** CancelOperationRequest operationId. */ - public operationId: string; - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.container.v1beta1.ICancelOperationRequest): google.container.v1beta1.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.container.v1beta1.IOperation[]|null); - - /** ListOperationsResponse missingZones */ - missingZones?: (string[]|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.container.v1beta1.IOperation[]; - - /** ListOperationsResponse missingZones. */ - public missingZones: string[]; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.container.v1beta1.IListOperationsResponse): google.container.v1beta1.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetServerConfigRequest. */ - interface IGetServerConfigRequest { - - /** GetServerConfigRequest projectId */ - projectId?: (string|null); - - /** GetServerConfigRequest zone */ - zone?: (string|null); - - /** GetServerConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetServerConfigRequest. */ - class GetServerConfigRequest implements IGetServerConfigRequest { - - /** - * Constructs a new GetServerConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetServerConfigRequest); - - /** GetServerConfigRequest projectId. */ - public projectId: string; - - /** GetServerConfigRequest zone. */ - public zone: string; - - /** GetServerConfigRequest name. */ - public name: string; - - /** - * Creates a new GetServerConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServerConfigRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetServerConfigRequest): google.container.v1beta1.GetServerConfigRequest; - - /** - * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. - * @param message GetServerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. - * @param message GetServerConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetServerConfigRequest; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetServerConfigRequest; - - /** - * Verifies a GetServerConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServerConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetServerConfigRequest; - - /** - * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. - * @param message GetServerConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetServerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetServerConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetServerConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerConfig. */ - interface IServerConfig { - - /** ServerConfig defaultClusterVersion */ - defaultClusterVersion?: (string|null); - - /** ServerConfig validNodeVersions */ - validNodeVersions?: (string[]|null); - - /** ServerConfig defaultImageType */ - defaultImageType?: (string|null); - - /** ServerConfig validImageTypes */ - validImageTypes?: (string[]|null); - - /** ServerConfig validMasterVersions */ - validMasterVersions?: (string[]|null); - - /** ServerConfig channels */ - channels?: (google.container.v1beta1.ServerConfig.IReleaseChannelConfig[]|null); - - /** ServerConfig windowsVersionMaps */ - windowsVersionMaps?: ({ [k: string]: google.container.v1beta1.IWindowsVersions }|null); - } - - /** Represents a ServerConfig. */ - class ServerConfig implements IServerConfig { - - /** - * Constructs a new ServerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IServerConfig); - - /** ServerConfig defaultClusterVersion. */ - public defaultClusterVersion: string; - - /** ServerConfig validNodeVersions. */ - public validNodeVersions: string[]; - - /** ServerConfig defaultImageType. */ - public defaultImageType: string; - - /** ServerConfig validImageTypes. */ - public validImageTypes: string[]; - - /** ServerConfig validMasterVersions. */ - public validMasterVersions: string[]; - - /** ServerConfig channels. */ - public channels: google.container.v1beta1.ServerConfig.IReleaseChannelConfig[]; - - /** ServerConfig windowsVersionMaps. */ - public windowsVersionMaps: { [k: string]: google.container.v1beta1.IWindowsVersions }; - - /** - * Creates a new ServerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerConfig instance - */ - public static create(properties?: google.container.v1beta1.IServerConfig): google.container.v1beta1.ServerConfig; - - /** - * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. - * @param message ServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. - * @param message ServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig; - - /** - * Decodes a ServerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig; - - /** - * Verifies a ServerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig; - - /** - * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. - * @param message ServerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ServerConfig { - - /** Properties of a ReleaseChannelConfig. */ - interface IReleaseChannelConfig { - - /** ReleaseChannelConfig channel */ - channel?: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel|null); - - /** ReleaseChannelConfig defaultVersion */ - defaultVersion?: (string|null); - - /** ReleaseChannelConfig availableVersions */ - availableVersions?: (google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion[]|null); - - /** ReleaseChannelConfig validVersions */ - validVersions?: (string[]|null); - } - - /** Represents a ReleaseChannelConfig. */ - class ReleaseChannelConfig implements IReleaseChannelConfig { - - /** - * Constructs a new ReleaseChannelConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ServerConfig.IReleaseChannelConfig); - - /** ReleaseChannelConfig channel. */ - public channel: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel); - - /** ReleaseChannelConfig defaultVersion. */ - public defaultVersion: string; - - /** ReleaseChannelConfig availableVersions. */ - public availableVersions: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion[]; - - /** ReleaseChannelConfig validVersions. */ - public validVersions: string[]; - - /** - * Creates a new ReleaseChannelConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseChannelConfig instance - */ - public static create(properties?: google.container.v1beta1.ServerConfig.IReleaseChannelConfig): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; - - /** - * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @param message ReleaseChannelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @param message ReleaseChannelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ServerConfig.IReleaseChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; - - /** - * Verifies a ReleaseChannelConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseChannelConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig.ReleaseChannelConfig; - - /** - * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. - * @param message ReleaseChannelConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseChannelConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReleaseChannelConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReleaseChannelConfig { - - /** Properties of an AvailableVersion. */ - interface IAvailableVersion { - - /** AvailableVersion version */ - version?: (string|null); - - /** AvailableVersion reason */ - reason?: (string|null); - } - - /** Represents an AvailableVersion. */ - class AvailableVersion implements IAvailableVersion { - - /** - * Constructs a new AvailableVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion); - - /** AvailableVersion version. */ - public version: string; - - /** AvailableVersion reason. */ - public reason: string; - - /** - * Creates a new AvailableVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns AvailableVersion instance - */ - public static create(properties?: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; - - /** - * Encodes the specified AvailableVersion message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. - * @param message AvailableVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvailableVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. - * @param message AvailableVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvailableVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvailableVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; - - /** - * Decodes an AvailableVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvailableVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; - - /** - * Verifies an AvailableVersion message. - * @param message Plain 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 AvailableVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvailableVersion - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion; - - /** - * Creates a plain object from an AvailableVersion message. Also converts values to other types if specified. - * @param message AvailableVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvailableVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvailableVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a BestEffortProvisioning. */ - interface IBestEffortProvisioning { - - /** BestEffortProvisioning enabled */ - enabled?: (boolean|null); - - /** BestEffortProvisioning minProvisionNodes */ - minProvisionNodes?: (number|null); - } - - /** Represents a BestEffortProvisioning. */ - class BestEffortProvisioning implements IBestEffortProvisioning { - - /** - * Constructs a new BestEffortProvisioning. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IBestEffortProvisioning); - - /** BestEffortProvisioning enabled. */ - public enabled: boolean; - - /** BestEffortProvisioning minProvisionNodes. */ - public minProvisionNodes: number; - - /** - * Creates a new BestEffortProvisioning instance using the specified properties. - * @param [properties] Properties to set - * @returns BestEffortProvisioning instance - */ - public static create(properties?: google.container.v1beta1.IBestEffortProvisioning): google.container.v1beta1.BestEffortProvisioning; - - /** - * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. - * @param message BestEffortProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. - * @param message BestEffortProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IBestEffortProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BestEffortProvisioning; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BestEffortProvisioning; - - /** - * Verifies a BestEffortProvisioning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BestEffortProvisioning - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BestEffortProvisioning; - - /** - * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. - * @param message BestEffortProvisioning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BestEffortProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BestEffortProvisioning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BestEffortProvisioning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WindowsVersions. */ - interface IWindowsVersions { - - /** WindowsVersions windowsVersions */ - windowsVersions?: (google.container.v1beta1.WindowsVersions.IWindowsVersion[]|null); - } - - /** Represents a WindowsVersions. */ - class WindowsVersions implements IWindowsVersions { - - /** - * Constructs a new WindowsVersions. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWindowsVersions); - - /** WindowsVersions windowsVersions. */ - public windowsVersions: google.container.v1beta1.WindowsVersions.IWindowsVersion[]; - - /** - * Creates a new WindowsVersions instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsVersions instance - */ - public static create(properties?: google.container.v1beta1.IWindowsVersions): google.container.v1beta1.WindowsVersions; - - /** - * Encodes the specified WindowsVersions message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. - * @param message WindowsVersions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWindowsVersions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WindowsVersions message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. - * @param message WindowsVersions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWindowsVersions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WindowsVersions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsVersions; - - /** - * Decodes a WindowsVersions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsVersions; - - /** - * Verifies a WindowsVersions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WindowsVersions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsVersions - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsVersions; - - /** - * Creates a plain object from a WindowsVersions message. Also converts values to other types if specified. - * @param message WindowsVersions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WindowsVersions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WindowsVersions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WindowsVersions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WindowsVersions { - - /** Properties of a WindowsVersion. */ - interface IWindowsVersion { - - /** WindowsVersion imageType */ - imageType?: (string|null); - - /** WindowsVersion osVersion */ - osVersion?: (string|null); - - /** WindowsVersion supportEndDate */ - supportEndDate?: (google.type.IDate|null); - } - - /** Represents a WindowsVersion. */ - class WindowsVersion implements IWindowsVersion { - - /** - * Constructs a new WindowsVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.WindowsVersions.IWindowsVersion); - - /** WindowsVersion imageType. */ - public imageType: string; - - /** WindowsVersion osVersion. */ - public osVersion: string; - - /** WindowsVersion supportEndDate. */ - public supportEndDate?: (google.type.IDate|null); - - /** - * Creates a new WindowsVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsVersion instance - */ - public static create(properties?: google.container.v1beta1.WindowsVersions.IWindowsVersion): google.container.v1beta1.WindowsVersions.WindowsVersion; - - /** - * Encodes the specified WindowsVersion message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. - * @param message WindowsVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.WindowsVersions.IWindowsVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WindowsVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. - * @param message WindowsVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.WindowsVersions.IWindowsVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WindowsVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WindowsVersions.WindowsVersion; - - /** - * Decodes a WindowsVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WindowsVersions.WindowsVersion; - - /** - * Verifies a WindowsVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WindowsVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsVersion - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WindowsVersions.WindowsVersion; - - /** - * Creates a plain object from a WindowsVersion message. Also converts values to other types if specified. - * @param message WindowsVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WindowsVersions.WindowsVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WindowsVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WindowsVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateNodePoolRequest. */ - interface ICreateNodePoolRequest { - - /** CreateNodePoolRequest projectId */ - projectId?: (string|null); - - /** CreateNodePoolRequest zone */ - zone?: (string|null); - - /** CreateNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** CreateNodePoolRequest nodePool */ - nodePool?: (google.container.v1beta1.INodePool|null); - - /** CreateNodePoolRequest parent */ - parent?: (string|null); - } - - /** Represents a CreateNodePoolRequest. */ - class CreateNodePoolRequest implements ICreateNodePoolRequest { - - /** - * Constructs a new CreateNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICreateNodePoolRequest); - - /** CreateNodePoolRequest projectId. */ - public projectId: string; - - /** CreateNodePoolRequest zone. */ - public zone: string; - - /** CreateNodePoolRequest clusterId. */ - public clusterId: string; - - /** CreateNodePoolRequest nodePool. */ - public nodePool?: (google.container.v1beta1.INodePool|null); - - /** CreateNodePoolRequest parent. */ - public parent: string; - - /** - * Creates a new CreateNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNodePoolRequest instance - */ - public static create(properties?: google.container.v1beta1.ICreateNodePoolRequest): google.container.v1beta1.CreateNodePoolRequest; - - /** - * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. - * @param message CreateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. - * @param message CreateNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICreateNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CreateNodePoolRequest; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CreateNodePoolRequest; - - /** - * Verifies a CreateNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CreateNodePoolRequest; - - /** - * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. - * @param message CreateNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CreateNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteNodePoolRequest. */ - interface IDeleteNodePoolRequest { - - /** DeleteNodePoolRequest projectId */ - projectId?: (string|null); - - /** DeleteNodePoolRequest zone */ - zone?: (string|null); - - /** DeleteNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** DeleteNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** DeleteNodePoolRequest name */ - name?: (string|null); - } - - /** Represents a DeleteNodePoolRequest. */ - class DeleteNodePoolRequest implements IDeleteNodePoolRequest { - - /** - * Constructs a new DeleteNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDeleteNodePoolRequest); - - /** DeleteNodePoolRequest projectId. */ - public projectId: string; - - /** DeleteNodePoolRequest zone. */ - public zone: string; - - /** DeleteNodePoolRequest clusterId. */ - public clusterId: string; - - /** DeleteNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** DeleteNodePoolRequest name. */ - public name: string; - - /** - * Creates a new DeleteNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteNodePoolRequest instance - */ - public static create(properties?: google.container.v1beta1.IDeleteNodePoolRequest): google.container.v1beta1.DeleteNodePoolRequest; - - /** - * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. - * @param message DeleteNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. - * @param message DeleteNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDeleteNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DeleteNodePoolRequest; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DeleteNodePoolRequest; - - /** - * Verifies a DeleteNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DeleteNodePoolRequest; - - /** - * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. - * @param message DeleteNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DeleteNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNodePoolsRequest. */ - interface IListNodePoolsRequest { - - /** ListNodePoolsRequest projectId */ - projectId?: (string|null); - - /** ListNodePoolsRequest zone */ - zone?: (string|null); - - /** ListNodePoolsRequest clusterId */ - clusterId?: (string|null); - - /** ListNodePoolsRequest parent */ - parent?: (string|null); - } - - /** Represents a ListNodePoolsRequest. */ - class ListNodePoolsRequest implements IListNodePoolsRequest { - - /** - * Constructs a new ListNodePoolsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListNodePoolsRequest); - - /** ListNodePoolsRequest projectId. */ - public projectId: string; - - /** ListNodePoolsRequest zone. */ - public zone: string; - - /** ListNodePoolsRequest clusterId. */ - public clusterId: string; - - /** ListNodePoolsRequest parent. */ - public parent: string; - - /** - * Creates a new ListNodePoolsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodePoolsRequest instance - */ - public static create(properties?: google.container.v1beta1.IListNodePoolsRequest): google.container.v1beta1.ListNodePoolsRequest; - - /** - * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. - * @param message ListNodePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. - * @param message ListNodePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListNodePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListNodePoolsRequest; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListNodePoolsRequest; - - /** - * Verifies a ListNodePoolsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNodePoolsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListNodePoolsRequest; - - /** - * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. - * @param message ListNodePoolsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListNodePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNodePoolsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNodePoolsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetNodePoolRequest. */ - interface IGetNodePoolRequest { - - /** GetNodePoolRequest projectId */ - projectId?: (string|null); - - /** GetNodePoolRequest zone */ - zone?: (string|null); - - /** GetNodePoolRequest clusterId */ - clusterId?: (string|null); - - /** GetNodePoolRequest nodePoolId */ - nodePoolId?: (string|null); - - /** GetNodePoolRequest name */ - name?: (string|null); - } - - /** Represents a GetNodePoolRequest. */ - class GetNodePoolRequest implements IGetNodePoolRequest { - - /** - * Constructs a new GetNodePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetNodePoolRequest); - - /** GetNodePoolRequest projectId. */ - public projectId: string; - - /** GetNodePoolRequest zone. */ - public zone: string; - - /** GetNodePoolRequest clusterId. */ - public clusterId: string; - - /** GetNodePoolRequest nodePoolId. */ - public nodePoolId: string; - - /** GetNodePoolRequest name. */ - public name: string; - - /** - * Creates a new GetNodePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetNodePoolRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetNodePoolRequest): google.container.v1beta1.GetNodePoolRequest; - - /** - * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. - * @param message GetNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. - * @param message GetNodePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetNodePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetNodePoolRequest; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetNodePoolRequest; - - /** - * Verifies a GetNodePoolRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetNodePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetNodePoolRequest; - - /** - * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. - * @param message GetNodePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetNodePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetNodePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetNodePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BlueGreenSettings. */ - interface IBlueGreenSettings { - - /** BlueGreenSettings standardRolloutPolicy */ - standardRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null); - - /** BlueGreenSettings autoscaledRolloutPolicy */ - autoscaledRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null); - - /** BlueGreenSettings nodePoolSoakDuration */ - nodePoolSoakDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a BlueGreenSettings. */ - class BlueGreenSettings implements IBlueGreenSettings { - - /** - * Constructs a new BlueGreenSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IBlueGreenSettings); - - /** BlueGreenSettings standardRolloutPolicy. */ - public standardRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null); - - /** BlueGreenSettings autoscaledRolloutPolicy. */ - public autoscaledRolloutPolicy?: (google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null); - - /** BlueGreenSettings nodePoolSoakDuration. */ - public nodePoolSoakDuration?: (google.protobuf.IDuration|null); - - /** BlueGreenSettings rolloutPolicy. */ - public rolloutPolicy?: ("standardRolloutPolicy"|"autoscaledRolloutPolicy"); - - /** BlueGreenSettings _nodePoolSoakDuration. */ - public _nodePoolSoakDuration?: "nodePoolSoakDuration"; - - /** - * Creates a new BlueGreenSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns BlueGreenSettings instance - */ - public static create(properties?: google.container.v1beta1.IBlueGreenSettings): google.container.v1beta1.BlueGreenSettings; - - /** - * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. - * @param message BlueGreenSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. - * @param message BlueGreenSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IBlueGreenSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings; - - /** - * Verifies a BlueGreenSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlueGreenSettings - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings; - - /** - * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. - * @param message BlueGreenSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BlueGreenSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlueGreenSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlueGreenSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BlueGreenSettings { - - /** Properties of a StandardRolloutPolicy. */ - interface IStandardRolloutPolicy { - - /** StandardRolloutPolicy batchPercentage */ - batchPercentage?: (number|null); - - /** StandardRolloutPolicy batchNodeCount */ - batchNodeCount?: (number|null); - - /** StandardRolloutPolicy batchSoakDuration */ - batchSoakDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a StandardRolloutPolicy. */ - class StandardRolloutPolicy implements IStandardRolloutPolicy { - - /** - * Constructs a new StandardRolloutPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy); - - /** StandardRolloutPolicy batchPercentage. */ - public batchPercentage?: (number|null); - - /** StandardRolloutPolicy batchNodeCount. */ - public batchNodeCount?: (number|null); - - /** StandardRolloutPolicy batchSoakDuration. */ - public batchSoakDuration?: (google.protobuf.IDuration|null); - - /** StandardRolloutPolicy updateBatchSize. */ - public updateBatchSize?: ("batchPercentage"|"batchNodeCount"); - - /** StandardRolloutPolicy _batchSoakDuration. */ - public _batchSoakDuration?: "batchSoakDuration"; - - /** - * Creates a new StandardRolloutPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns StandardRolloutPolicy instance - */ - public static create(properties?: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @param message StandardRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @param message StandardRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Verifies a StandardRolloutPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StandardRolloutPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy; - - /** - * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. - * @param message StandardRolloutPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StandardRolloutPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StandardRolloutPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutoscaledRolloutPolicy. */ - interface IAutoscaledRolloutPolicy { - } - - /** Represents an AutoscaledRolloutPolicy. */ - class AutoscaledRolloutPolicy implements IAutoscaledRolloutPolicy { - - /** - * Constructs a new AutoscaledRolloutPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy); - - /** - * Creates a new AutoscaledRolloutPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoscaledRolloutPolicy instance - */ - public static create(properties?: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; - - /** - * Encodes the specified AutoscaledRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. - * @param message AutoscaledRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoscaledRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. - * @param message AutoscaledRolloutPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoscaledRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; - - /** - * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoscaledRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; - - /** - * Verifies an AutoscaledRolloutPolicy message. - * @param message Plain 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 AutoscaledRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoscaledRolloutPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy; - - /** - * Creates a plain object from an AutoscaledRolloutPolicy message. Also converts values to other types if specified. - * @param message AutoscaledRolloutPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoscaledRolloutPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoscaledRolloutPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodePool. */ - interface INodePool { - - /** NodePool name */ - name?: (string|null); - - /** NodePool config */ - config?: (google.container.v1beta1.INodeConfig|null); - - /** NodePool initialNodeCount */ - initialNodeCount?: (number|null); - - /** NodePool locations */ - locations?: (string[]|null); - - /** NodePool networkConfig */ - networkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); - - /** NodePool selfLink */ - selfLink?: (string|null); - - /** NodePool version */ - version?: (string|null); - - /** NodePool instanceGroupUrls */ - instanceGroupUrls?: (string[]|null); - - /** NodePool status */ - status?: (google.container.v1beta1.NodePool.Status|keyof typeof google.container.v1beta1.NodePool.Status|null); - - /** NodePool statusMessage */ - statusMessage?: (string|null); - - /** NodePool autoscaling */ - autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** NodePool management */ - management?: (google.container.v1beta1.INodeManagement|null); - - /** NodePool maxPodsConstraint */ - maxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); - - /** NodePool conditions */ - conditions?: (google.container.v1beta1.IStatusCondition[]|null); - - /** NodePool podIpv4CidrSize */ - podIpv4CidrSize?: (number|null); - - /** NodePool upgradeSettings */ - upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** NodePool placementPolicy */ - placementPolicy?: (google.container.v1beta1.NodePool.IPlacementPolicy|null); - - /** NodePool updateInfo */ - updateInfo?: (google.container.v1beta1.NodePool.IUpdateInfo|null); - - /** NodePool etag */ - etag?: (string|null); - - /** NodePool queuedProvisioning */ - queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); - - /** NodePool bestEffortProvisioning */ - bestEffortProvisioning?: (google.container.v1beta1.IBestEffortProvisioning|null); - } - - /** Represents a NodePool. */ - class NodePool implements INodePool { - - /** - * Constructs a new NodePool. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodePool); - - /** NodePool name. */ - public name: string; - - /** NodePool config. */ - public config?: (google.container.v1beta1.INodeConfig|null); - - /** NodePool initialNodeCount. */ - public initialNodeCount: number; - - /** NodePool locations. */ - public locations: string[]; - - /** NodePool networkConfig. */ - public networkConfig?: (google.container.v1beta1.INodeNetworkConfig|null); - - /** NodePool selfLink. */ - public selfLink: string; - - /** NodePool version. */ - public version: string; - - /** NodePool instanceGroupUrls. */ - public instanceGroupUrls: string[]; - - /** NodePool status. */ - public status: (google.container.v1beta1.NodePool.Status|keyof typeof google.container.v1beta1.NodePool.Status); - - /** NodePool statusMessage. */ - public statusMessage: string; - - /** NodePool autoscaling. */ - public autoscaling?: (google.container.v1beta1.INodePoolAutoscaling|null); - - /** NodePool management. */ - public management?: (google.container.v1beta1.INodeManagement|null); - - /** NodePool maxPodsConstraint. */ - public maxPodsConstraint?: (google.container.v1beta1.IMaxPodsConstraint|null); - - /** NodePool conditions. */ - public conditions: google.container.v1beta1.IStatusCondition[]; - - /** NodePool podIpv4CidrSize. */ - public podIpv4CidrSize: number; - - /** NodePool upgradeSettings. */ - public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** NodePool placementPolicy. */ - public placementPolicy?: (google.container.v1beta1.NodePool.IPlacementPolicy|null); - - /** NodePool updateInfo. */ - public updateInfo?: (google.container.v1beta1.NodePool.IUpdateInfo|null); - - /** NodePool etag. */ - public etag: string; - - /** NodePool queuedProvisioning. */ - public queuedProvisioning?: (google.container.v1beta1.NodePool.IQueuedProvisioning|null); - - /** NodePool bestEffortProvisioning. */ - public bestEffortProvisioning?: (google.container.v1beta1.IBestEffortProvisioning|null); - - /** - * Creates a new NodePool instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePool instance - */ - public static create(properties?: google.container.v1beta1.INodePool): google.container.v1beta1.NodePool; - - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool; - - /** - * Verifies a NodePool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePool - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @param message NodePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePool - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodePool { - - /** Properties of an UpgradeSettings. */ - interface IUpgradeSettings { - - /** UpgradeSettings maxSurge */ - maxSurge?: (number|null); - - /** UpgradeSettings maxUnavailable */ - maxUnavailable?: (number|null); - - /** UpgradeSettings strategy */ - strategy?: (google.container.v1beta1.NodePoolUpdateStrategy|keyof typeof google.container.v1beta1.NodePoolUpdateStrategy|null); - - /** UpgradeSettings blueGreenSettings */ - blueGreenSettings?: (google.container.v1beta1.IBlueGreenSettings|null); - } - - /** Represents an UpgradeSettings. */ - class UpgradeSettings implements IUpgradeSettings { - - /** - * Constructs a new UpgradeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodePool.IUpgradeSettings); - - /** UpgradeSettings maxSurge. */ - public maxSurge: number; - - /** UpgradeSettings maxUnavailable. */ - public maxUnavailable: number; - - /** UpgradeSettings strategy. */ - public strategy?: (google.container.v1beta1.NodePoolUpdateStrategy|keyof typeof google.container.v1beta1.NodePoolUpdateStrategy|null); - - /** UpgradeSettings blueGreenSettings. */ - public blueGreenSettings?: (google.container.v1beta1.IBlueGreenSettings|null); - - /** UpgradeSettings _strategy. */ - public _strategy?: "strategy"; - - /** UpgradeSettings _blueGreenSettings. */ - public _blueGreenSettings?: "blueGreenSettings"; - - /** - * Creates a new UpgradeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeSettings instance - */ - public static create(properties?: google.container.v1beta1.NodePool.IUpgradeSettings): google.container.v1beta1.NodePool.UpgradeSettings; - - /** - * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. - * @param message UpgradeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. - * @param message UpgradeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodePool.IUpgradeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpgradeSettings; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpgradeSettings; - - /** - * Verifies an UpgradeSettings message. - * @param message Plain 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 UpgradeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeSettings - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpgradeSettings; - - /** - * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. - * @param message UpgradeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool.UpgradeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateInfo. */ - interface IUpdateInfo { - - /** UpdateInfo blueGreenInfo */ - blueGreenInfo?: (google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null); - } - - /** Represents an UpdateInfo. */ - class UpdateInfo implements IUpdateInfo { - - /** - * Constructs a new UpdateInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodePool.IUpdateInfo); - - /** UpdateInfo blueGreenInfo. */ - public blueGreenInfo?: (google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null); - - /** - * Creates a new UpdateInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateInfo instance - */ - public static create(properties?: google.container.v1beta1.NodePool.IUpdateInfo): google.container.v1beta1.NodePool.UpdateInfo; - - /** - * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. - * @param message UpdateInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. - * @param message UpdateInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodePool.IUpdateInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpdateInfo; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpdateInfo; - - /** - * Verifies an UpdateInfo message. - * @param message Plain 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 UpdateInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpdateInfo; - - /** - * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. - * @param message UpdateInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool.UpdateInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UpdateInfo { - - /** Properties of a BlueGreenInfo. */ - interface IBlueGreenInfo { - - /** BlueGreenInfo phase */ - phase?: (google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null); - - /** BlueGreenInfo blueInstanceGroupUrls */ - blueInstanceGroupUrls?: (string[]|null); - - /** BlueGreenInfo greenInstanceGroupUrls */ - greenInstanceGroupUrls?: (string[]|null); - - /** BlueGreenInfo bluePoolDeletionStartTime */ - bluePoolDeletionStartTime?: (string|null); - - /** BlueGreenInfo greenPoolVersion */ - greenPoolVersion?: (string|null); - } - - /** Represents a BlueGreenInfo. */ - class BlueGreenInfo implements IBlueGreenInfo { - - /** - * Constructs a new BlueGreenInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo); - - /** BlueGreenInfo phase. */ - public phase: (google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|keyof typeof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase); - - /** BlueGreenInfo blueInstanceGroupUrls. */ - public blueInstanceGroupUrls: string[]; - - /** BlueGreenInfo greenInstanceGroupUrls. */ - public greenInstanceGroupUrls: string[]; - - /** BlueGreenInfo bluePoolDeletionStartTime. */ - public bluePoolDeletionStartTime: string; - - /** BlueGreenInfo greenPoolVersion. */ - public greenPoolVersion: string; - - /** - * Creates a new BlueGreenInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BlueGreenInfo instance - */ - public static create(properties?: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @param message BlueGreenInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @param message BlueGreenInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Verifies a BlueGreenInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlueGreenInfo - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo; - - /** - * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. - * @param message BlueGreenInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlueGreenInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlueGreenInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BlueGreenInfo { - - /** Phase enum. */ - enum Phase { - PHASE_UNSPECIFIED = 0, - UPDATE_STARTED = 1, - CREATING_GREEN_POOL = 2, - CORDONING_BLUE_POOL = 3, - WAITING_TO_DRAIN_BLUE_POOL = 8, - DRAINING_BLUE_POOL = 4, - NODE_POOL_SOAKING = 5, - DELETING_BLUE_POOL = 6, - ROLLBACK_STARTED = 7 - } - } - } - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, - PROVISIONING = 1, - RUNNING = 2, - RUNNING_WITH_ERROR = 3, - RECONCILING = 4, - STOPPING = 5, - ERROR = 6 - } - - /** Properties of a PlacementPolicy. */ - interface IPlacementPolicy { - - /** PlacementPolicy type */ - type?: (google.container.v1beta1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1beta1.NodePool.PlacementPolicy.Type|null); - - /** PlacementPolicy tpuTopology */ - tpuTopology?: (string|null); - - /** PlacementPolicy policyName */ - policyName?: (string|null); - } - - /** Represents a PlacementPolicy. */ - class PlacementPolicy implements IPlacementPolicy { - - /** - * Constructs a new PlacementPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodePool.IPlacementPolicy); - - /** PlacementPolicy type. */ - public type: (google.container.v1beta1.NodePool.PlacementPolicy.Type|keyof typeof google.container.v1beta1.NodePool.PlacementPolicy.Type); - - /** PlacementPolicy tpuTopology. */ - public tpuTopology: string; - - /** PlacementPolicy policyName. */ - public policyName: string; - - /** - * Creates a new PlacementPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns PlacementPolicy instance - */ - public static create(properties?: google.container.v1beta1.NodePool.IPlacementPolicy): google.container.v1beta1.NodePool.PlacementPolicy; - - /** - * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. - * @param message PlacementPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. - * @param message PlacementPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodePool.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.PlacementPolicy; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.PlacementPolicy; - - /** - * Verifies a PlacementPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlacementPolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.PlacementPolicy; - - /** - * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. - * @param message PlacementPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlacementPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlacementPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PlacementPolicy { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - COMPACT = 1 - } - } - - /** Properties of a QueuedProvisioning. */ - interface IQueuedProvisioning { - - /** QueuedProvisioning enabled */ - enabled?: (boolean|null); - } - - /** Represents a QueuedProvisioning. */ - class QueuedProvisioning implements IQueuedProvisioning { - - /** - * Constructs a new QueuedProvisioning. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NodePool.IQueuedProvisioning); - - /** QueuedProvisioning enabled. */ - public enabled: boolean; - - /** - * Creates a new QueuedProvisioning instance using the specified properties. - * @param [properties] Properties to set - * @returns QueuedProvisioning instance - */ - public static create(properties?: google.container.v1beta1.NodePool.IQueuedProvisioning): google.container.v1beta1.NodePool.QueuedProvisioning; - - /** - * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. - * @param message QueuedProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. - * @param message QueuedProvisioning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NodePool.IQueuedProvisioning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePool.QueuedProvisioning; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePool.QueuedProvisioning; - - /** - * Verifies a QueuedProvisioning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueuedProvisioning - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePool.QueuedProvisioning; - - /** - * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. - * @param message QueuedProvisioning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePool.QueuedProvisioning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueuedProvisioning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueuedProvisioning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodeManagement. */ - interface INodeManagement { - - /** NodeManagement autoUpgrade */ - autoUpgrade?: (boolean|null); - - /** NodeManagement autoRepair */ - autoRepair?: (boolean|null); - - /** NodeManagement upgradeOptions */ - upgradeOptions?: (google.container.v1beta1.IAutoUpgradeOptions|null); - } - - /** Represents a NodeManagement. */ - class NodeManagement implements INodeManagement { - - /** - * Constructs a new NodeManagement. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodeManagement); - - /** NodeManagement autoUpgrade. */ - public autoUpgrade: boolean; - - /** NodeManagement autoRepair. */ - public autoRepair: boolean; - - /** NodeManagement upgradeOptions. */ - public upgradeOptions?: (google.container.v1beta1.IAutoUpgradeOptions|null); - - /** - * Creates a new NodeManagement instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeManagement instance - */ - public static create(properties?: google.container.v1beta1.INodeManagement): google.container.v1beta1.NodeManagement; - - /** - * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. - * @param message NodeManagement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. - * @param message NodeManagement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodeManagement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeManagement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodeManagement; - - /** - * Decodes a NodeManagement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodeManagement; - - /** - * Verifies a NodeManagement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeManagement - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodeManagement; - - /** - * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. - * @param message NodeManagement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodeManagement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeManagement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeManagement - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutoUpgradeOptions. */ - interface IAutoUpgradeOptions { - - /** AutoUpgradeOptions autoUpgradeStartTime */ - autoUpgradeStartTime?: (string|null); - - /** AutoUpgradeOptions description */ - description?: (string|null); - } - - /** Represents an AutoUpgradeOptions. */ - class AutoUpgradeOptions implements IAutoUpgradeOptions { - - /** - * Constructs a new AutoUpgradeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAutoUpgradeOptions); - - /** AutoUpgradeOptions autoUpgradeStartTime. */ - public autoUpgradeStartTime: string; - - /** AutoUpgradeOptions description. */ - public description: string; - - /** - * Creates a new AutoUpgradeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoUpgradeOptions instance - */ - public static create(properties?: google.container.v1beta1.IAutoUpgradeOptions): google.container.v1beta1.AutoUpgradeOptions; - - /** - * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. - * @param message AutoUpgradeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. - * @param message AutoUpgradeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAutoUpgradeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutoUpgradeOptions; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutoUpgradeOptions; - - /** - * Verifies an AutoUpgradeOptions message. - * @param message Plain 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 AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoUpgradeOptions - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutoUpgradeOptions; - - /** - * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. - * @param message AutoUpgradeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AutoUpgradeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoUpgradeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoUpgradeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenancePolicy. */ - interface IMaintenancePolicy { - - /** MaintenancePolicy window */ - window?: (google.container.v1beta1.IMaintenanceWindow|null); - - /** MaintenancePolicy resourceVersion */ - resourceVersion?: (string|null); - } - - /** Represents a MaintenancePolicy. */ - class MaintenancePolicy implements IMaintenancePolicy { - - /** - * Constructs a new MaintenancePolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMaintenancePolicy); - - /** MaintenancePolicy window. */ - public window?: (google.container.v1beta1.IMaintenanceWindow|null); - - /** MaintenancePolicy resourceVersion. */ - public resourceVersion: string; - - /** - * Creates a new MaintenancePolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenancePolicy instance - */ - public static create(properties?: google.container.v1beta1.IMaintenancePolicy): google.container.v1beta1.MaintenancePolicy; - - /** - * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. - * @param message MaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. - * @param message MaintenancePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMaintenancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenancePolicy; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenancePolicy; - - /** - * Verifies a MaintenancePolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenancePolicy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenancePolicy; - - /** - * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. - * @param message MaintenancePolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MaintenancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenancePolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenancePolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { - - /** MaintenanceWindow dailyMaintenanceWindow */ - dailyMaintenanceWindow?: (google.container.v1beta1.IDailyMaintenanceWindow|null); - - /** MaintenanceWindow recurringWindow */ - recurringWindow?: (google.container.v1beta1.IRecurringTimeWindow|null); - - /** MaintenanceWindow maintenanceExclusions */ - maintenanceExclusions?: ({ [k: string]: google.container.v1beta1.ITimeWindow }|null); - } - - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { - - /** - * Constructs a new MaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMaintenanceWindow); - - /** MaintenanceWindow dailyMaintenanceWindow. */ - public dailyMaintenanceWindow?: (google.container.v1beta1.IDailyMaintenanceWindow|null); - - /** MaintenanceWindow recurringWindow. */ - public recurringWindow?: (google.container.v1beta1.IRecurringTimeWindow|null); - - /** MaintenanceWindow maintenanceExclusions. */ - public maintenanceExclusions: { [k: string]: google.container.v1beta1.ITimeWindow }; - - /** MaintenanceWindow policy. */ - public policy?: ("dailyMaintenanceWindow"|"recurringWindow"); - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceWindow instance - */ - public static create(properties?: google.container.v1beta1.IMaintenanceWindow): google.container.v1beta1.MaintenanceWindow; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenanceWindow; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenanceWindow; - - /** - * Verifies a MaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenanceWindow; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeWindow. */ - interface ITimeWindow { - - /** TimeWindow maintenanceExclusionOptions */ - maintenanceExclusionOptions?: (google.container.v1beta1.IMaintenanceExclusionOptions|null); - - /** TimeWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimeWindow. */ - class TimeWindow implements ITimeWindow { - - /** - * Constructs a new TimeWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ITimeWindow); - - /** TimeWindow maintenanceExclusionOptions. */ - public maintenanceExclusionOptions?: (google.container.v1beta1.IMaintenanceExclusionOptions|null); - - /** TimeWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow options. */ - public options?: "maintenanceExclusionOptions"; - - /** - * Creates a new TimeWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeWindow instance - */ - public static create(properties?: google.container.v1beta1.ITimeWindow): google.container.v1beta1.TimeWindow; - - /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.TimeWindow; - - /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.TimeWindow; - - /** - * Verifies a TimeWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.TimeWindow; - - /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @param message TimeWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceExclusionOptions. */ - interface IMaintenanceExclusionOptions { - - /** MaintenanceExclusionOptions scope */ - scope?: (google.container.v1beta1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1beta1.MaintenanceExclusionOptions.Scope|null); - } - - /** Represents a MaintenanceExclusionOptions. */ - class MaintenanceExclusionOptions implements IMaintenanceExclusionOptions { - - /** - * Constructs a new MaintenanceExclusionOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMaintenanceExclusionOptions); - - /** MaintenanceExclusionOptions scope. */ - public scope: (google.container.v1beta1.MaintenanceExclusionOptions.Scope|keyof typeof google.container.v1beta1.MaintenanceExclusionOptions.Scope); - - /** - * Creates a new MaintenanceExclusionOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceExclusionOptions instance - */ - public static create(properties?: google.container.v1beta1.IMaintenanceExclusionOptions): google.container.v1beta1.MaintenanceExclusionOptions; - - /** - * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. - * @param message MaintenanceExclusionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. - * @param message MaintenanceExclusionOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMaintenanceExclusionOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MaintenanceExclusionOptions; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MaintenanceExclusionOptions; - - /** - * Verifies a MaintenanceExclusionOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceExclusionOptions - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MaintenanceExclusionOptions; - - /** - * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. - * @param message MaintenanceExclusionOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MaintenanceExclusionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceExclusionOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceExclusionOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MaintenanceExclusionOptions { - - /** Scope enum. */ - enum Scope { - NO_UPGRADES = 0, - NO_MINOR_UPGRADES = 1, - NO_MINOR_OR_NODE_UPGRADES = 2 - } - } - - /** Properties of a RecurringTimeWindow. */ - interface IRecurringTimeWindow { - - /** RecurringTimeWindow window */ - window?: (google.container.v1beta1.ITimeWindow|null); - - /** RecurringTimeWindow recurrence */ - recurrence?: (string|null); - } - - /** Represents a RecurringTimeWindow. */ - class RecurringTimeWindow implements IRecurringTimeWindow { - - /** - * Constructs a new RecurringTimeWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRecurringTimeWindow); - - /** RecurringTimeWindow window. */ - public window?: (google.container.v1beta1.ITimeWindow|null); - - /** RecurringTimeWindow recurrence. */ - public recurrence: string; - - /** - * Creates a new RecurringTimeWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns RecurringTimeWindow instance - */ - public static create(properties?: google.container.v1beta1.IRecurringTimeWindow): google.container.v1beta1.RecurringTimeWindow; - - /** - * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. - * @param message RecurringTimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. - * @param message RecurringTimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRecurringTimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RecurringTimeWindow; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RecurringTimeWindow; - - /** - * Verifies a RecurringTimeWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecurringTimeWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RecurringTimeWindow; - - /** - * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. - * @param message RecurringTimeWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RecurringTimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecurringTimeWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecurringTimeWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DailyMaintenanceWindow. */ - interface IDailyMaintenanceWindow { - - /** DailyMaintenanceWindow startTime */ - startTime?: (string|null); - - /** DailyMaintenanceWindow duration */ - duration?: (string|null); - } - - /** Represents a DailyMaintenanceWindow. */ - class DailyMaintenanceWindow implements IDailyMaintenanceWindow { - - /** - * Constructs a new DailyMaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDailyMaintenanceWindow); - - /** DailyMaintenanceWindow startTime. */ - public startTime: string; - - /** DailyMaintenanceWindow duration. */ - public duration: string; - - /** - * Creates a new DailyMaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns DailyMaintenanceWindow instance - */ - public static create(properties?: google.container.v1beta1.IDailyMaintenanceWindow): google.container.v1beta1.DailyMaintenanceWindow; - - /** - * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. - * @param message DailyMaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. - * @param message DailyMaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDailyMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DailyMaintenanceWindow; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DailyMaintenanceWindow; - - /** - * Verifies a DailyMaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DailyMaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DailyMaintenanceWindow; - - /** - * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. - * @param message DailyMaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DailyMaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DailyMaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DailyMaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolManagementRequest. */ - interface ISetNodePoolManagementRequest { - - /** SetNodePoolManagementRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolManagementRequest zone */ - zone?: (string|null); - - /** SetNodePoolManagementRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolManagementRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolManagementRequest management */ - management?: (google.container.v1beta1.INodeManagement|null); - - /** SetNodePoolManagementRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolManagementRequest. */ - class SetNodePoolManagementRequest implements ISetNodePoolManagementRequest { - - /** - * Constructs a new SetNodePoolManagementRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetNodePoolManagementRequest); - - /** SetNodePoolManagementRequest projectId. */ - public projectId: string; - - /** SetNodePoolManagementRequest zone. */ - public zone: string; - - /** SetNodePoolManagementRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolManagementRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolManagementRequest management. */ - public management?: (google.container.v1beta1.INodeManagement|null); - - /** SetNodePoolManagementRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolManagementRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolManagementRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetNodePoolManagementRequest): google.container.v1beta1.SetNodePoolManagementRequest; - - /** - * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. - * @param message SetNodePoolManagementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. - * @param message SetNodePoolManagementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolManagementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolManagementRequest; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolManagementRequest; - - /** - * Verifies a SetNodePoolManagementRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolManagementRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolManagementRequest; - - /** - * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. - * @param message SetNodePoolManagementRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetNodePoolManagementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolManagementRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolManagementRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetNodePoolSizeRequest. */ - interface ISetNodePoolSizeRequest { - - /** SetNodePoolSizeRequest projectId */ - projectId?: (string|null); - - /** SetNodePoolSizeRequest zone */ - zone?: (string|null); - - /** SetNodePoolSizeRequest clusterId */ - clusterId?: (string|null); - - /** SetNodePoolSizeRequest nodePoolId */ - nodePoolId?: (string|null); - - /** SetNodePoolSizeRequest nodeCount */ - nodeCount?: (number|null); - - /** SetNodePoolSizeRequest name */ - name?: (string|null); - } - - /** Represents a SetNodePoolSizeRequest. */ - class SetNodePoolSizeRequest implements ISetNodePoolSizeRequest { - - /** - * Constructs a new SetNodePoolSizeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetNodePoolSizeRequest); - - /** SetNodePoolSizeRequest projectId. */ - public projectId: string; - - /** SetNodePoolSizeRequest zone. */ - public zone: string; - - /** SetNodePoolSizeRequest clusterId. */ - public clusterId: string; - - /** SetNodePoolSizeRequest nodePoolId. */ - public nodePoolId: string; - - /** SetNodePoolSizeRequest nodeCount. */ - public nodeCount: number; - - /** SetNodePoolSizeRequest name. */ - public name: string; - - /** - * Creates a new SetNodePoolSizeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNodePoolSizeRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetNodePoolSizeRequest): google.container.v1beta1.SetNodePoolSizeRequest; - - /** - * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. - * @param message SetNodePoolSizeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. - * @param message SetNodePoolSizeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetNodePoolSizeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNodePoolSizeRequest; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNodePoolSizeRequest; - - /** - * Verifies a SetNodePoolSizeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNodePoolSizeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNodePoolSizeRequest; - - /** - * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. - * @param message SetNodePoolSizeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetNodePoolSizeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNodePoolSizeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNodePoolSizeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteNodePoolUpgradeRequest. */ - interface ICompleteNodePoolUpgradeRequest { - - /** CompleteNodePoolUpgradeRequest name */ - name?: (string|null); - } - - /** Represents a CompleteNodePoolUpgradeRequest. */ - class CompleteNodePoolUpgradeRequest implements ICompleteNodePoolUpgradeRequest { - - /** - * Constructs a new CompleteNodePoolUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICompleteNodePoolUpgradeRequest); - - /** CompleteNodePoolUpgradeRequest name. */ - public name: string; - - /** - * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteNodePoolUpgradeRequest instance - */ - public static create(properties?: google.container.v1beta1.ICompleteNodePoolUpgradeRequest): google.container.v1beta1.CompleteNodePoolUpgradeRequest; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @param message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @param message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICompleteNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompleteNodePoolUpgradeRequest; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompleteNodePoolUpgradeRequest; - - /** - * Verifies a CompleteNodePoolUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteNodePoolUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompleteNodePoolUpgradeRequest; - - /** - * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @param message CompleteNodePoolUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CompleteNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteNodePoolUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteNodePoolUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RollbackNodePoolUpgradeRequest. */ - interface IRollbackNodePoolUpgradeRequest { - - /** RollbackNodePoolUpgradeRequest projectId */ - projectId?: (string|null); - - /** RollbackNodePoolUpgradeRequest zone */ - zone?: (string|null); - - /** RollbackNodePoolUpgradeRequest clusterId */ - clusterId?: (string|null); - - /** RollbackNodePoolUpgradeRequest nodePoolId */ - nodePoolId?: (string|null); - - /** RollbackNodePoolUpgradeRequest name */ - name?: (string|null); - - /** RollbackNodePoolUpgradeRequest respectPdb */ - respectPdb?: (boolean|null); - } - - /** Represents a RollbackNodePoolUpgradeRequest. */ - class RollbackNodePoolUpgradeRequest implements IRollbackNodePoolUpgradeRequest { - - /** - * Constructs a new RollbackNodePoolUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRollbackNodePoolUpgradeRequest); - - /** RollbackNodePoolUpgradeRequest projectId. */ - public projectId: string; - - /** RollbackNodePoolUpgradeRequest zone. */ - public zone: string; - - /** RollbackNodePoolUpgradeRequest clusterId. */ - public clusterId: string; - - /** RollbackNodePoolUpgradeRequest nodePoolId. */ - public nodePoolId: string; - - /** RollbackNodePoolUpgradeRequest name. */ - public name: string; - - /** RollbackNodePoolUpgradeRequest respectPdb. */ - public respectPdb: boolean; - - /** - * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackNodePoolUpgradeRequest instance - */ - public static create(properties?: google.container.v1beta1.IRollbackNodePoolUpgradeRequest): google.container.v1beta1.RollbackNodePoolUpgradeRequest; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @param message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @param message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRollbackNodePoolUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RollbackNodePoolUpgradeRequest; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RollbackNodePoolUpgradeRequest; - - /** - * Verifies a RollbackNodePoolUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackNodePoolUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RollbackNodePoolUpgradeRequest; - - /** - * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @param message RollbackNodePoolUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RollbackNodePoolUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackNodePoolUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RollbackNodePoolUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListNodePoolsResponse. */ - interface IListNodePoolsResponse { - - /** ListNodePoolsResponse nodePools */ - nodePools?: (google.container.v1beta1.INodePool[]|null); - } - - /** Represents a ListNodePoolsResponse. */ - class ListNodePoolsResponse implements IListNodePoolsResponse { - - /** - * Constructs a new ListNodePoolsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListNodePoolsResponse); - - /** ListNodePoolsResponse nodePools. */ - public nodePools: google.container.v1beta1.INodePool[]; - - /** - * Creates a new ListNodePoolsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodePoolsResponse instance - */ - public static create(properties?: google.container.v1beta1.IListNodePoolsResponse): google.container.v1beta1.ListNodePoolsResponse; - - /** - * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. - * @param message ListNodePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. - * @param message ListNodePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListNodePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListNodePoolsResponse; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListNodePoolsResponse; - - /** - * Verifies a ListNodePoolsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNodePoolsResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListNodePoolsResponse; - - /** - * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. - * @param message ListNodePoolsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListNodePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListNodePoolsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListNodePoolsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterAutoscaling. */ - interface IClusterAutoscaling { - - /** ClusterAutoscaling enableNodeAutoprovisioning */ - enableNodeAutoprovisioning?: (boolean|null); - - /** ClusterAutoscaling resourceLimits */ - resourceLimits?: (google.container.v1beta1.IResourceLimit[]|null); - - /** ClusterAutoscaling autoscalingProfile */ - autoscalingProfile?: (google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|null); - - /** ClusterAutoscaling autoprovisioningNodePoolDefaults */ - autoprovisioningNodePoolDefaults?: (google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null); - - /** ClusterAutoscaling autoprovisioningLocations */ - autoprovisioningLocations?: (string[]|null); - } - - /** Represents a ClusterAutoscaling. */ - class ClusterAutoscaling implements IClusterAutoscaling { - - /** - * Constructs a new ClusterAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IClusterAutoscaling); - - /** ClusterAutoscaling enableNodeAutoprovisioning. */ - public enableNodeAutoprovisioning: boolean; - - /** ClusterAutoscaling resourceLimits. */ - public resourceLimits: google.container.v1beta1.IResourceLimit[]; - - /** ClusterAutoscaling autoscalingProfile. */ - public autoscalingProfile: (google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|keyof typeof google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile); - - /** ClusterAutoscaling autoprovisioningNodePoolDefaults. */ - public autoprovisioningNodePoolDefaults?: (google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null); - - /** ClusterAutoscaling autoprovisioningLocations. */ - public autoprovisioningLocations: string[]; - - /** - * Creates a new ClusterAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterAutoscaling instance - */ - public static create(properties?: google.container.v1beta1.IClusterAutoscaling): google.container.v1beta1.ClusterAutoscaling; - - /** - * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. - * @param message ClusterAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. - * @param message ClusterAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IClusterAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ClusterAutoscaling; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ClusterAutoscaling; - - /** - * Verifies a ClusterAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ClusterAutoscaling; - - /** - * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. - * @param message ClusterAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ClusterAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ClusterAutoscaling { - - /** AutoscalingProfile enum. */ - enum AutoscalingProfile { - PROFILE_UNSPECIFIED = 0, - OPTIMIZE_UTILIZATION = 1, - BALANCED = 2 - } - } - - /** Properties of an AutoprovisioningNodePoolDefaults. */ - interface IAutoprovisioningNodePoolDefaults { - - /** AutoprovisioningNodePoolDefaults oauthScopes */ - oauthScopes?: (string[]|null); - - /** AutoprovisioningNodePoolDefaults serviceAccount */ - serviceAccount?: (string|null); - - /** AutoprovisioningNodePoolDefaults upgradeSettings */ - upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** AutoprovisioningNodePoolDefaults management */ - management?: (google.container.v1beta1.INodeManagement|null); - - /** AutoprovisioningNodePoolDefaults minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** AutoprovisioningNodePoolDefaults diskSizeGb */ - diskSizeGb?: (number|null); - - /** AutoprovisioningNodePoolDefaults diskType */ - diskType?: (string|null); - - /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig */ - shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); - - /** AutoprovisioningNodePoolDefaults bootDiskKmsKey */ - bootDiskKmsKey?: (string|null); - - /** AutoprovisioningNodePoolDefaults imageType */ - imageType?: (string|null); - - /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled */ - insecureKubeletReadonlyPortEnabled?: (boolean|null); - } - - /** Represents an AutoprovisioningNodePoolDefaults. */ - class AutoprovisioningNodePoolDefaults implements IAutoprovisioningNodePoolDefaults { - - /** - * Constructs a new AutoprovisioningNodePoolDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAutoprovisioningNodePoolDefaults); - - /** AutoprovisioningNodePoolDefaults oauthScopes. */ - public oauthScopes: string[]; - - /** AutoprovisioningNodePoolDefaults serviceAccount. */ - public serviceAccount: string; - - /** AutoprovisioningNodePoolDefaults upgradeSettings. */ - public upgradeSettings?: (google.container.v1beta1.NodePool.IUpgradeSettings|null); - - /** AutoprovisioningNodePoolDefaults management. */ - public management?: (google.container.v1beta1.INodeManagement|null); - - /** AutoprovisioningNodePoolDefaults minCpuPlatform. */ - public minCpuPlatform: string; - - /** AutoprovisioningNodePoolDefaults diskSizeGb. */ - public diskSizeGb: number; - - /** AutoprovisioningNodePoolDefaults diskType. */ - public diskType: string; - - /** AutoprovisioningNodePoolDefaults shieldedInstanceConfig. */ - public shieldedInstanceConfig?: (google.container.v1beta1.IShieldedInstanceConfig|null); - - /** AutoprovisioningNodePoolDefaults bootDiskKmsKey. */ - public bootDiskKmsKey: string; - - /** AutoprovisioningNodePoolDefaults imageType. */ - public imageType: string; - - /** AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. */ - public insecureKubeletReadonlyPortEnabled?: (boolean|null); - - /** AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. */ - public _insecureKubeletReadonlyPortEnabled?: "insecureKubeletReadonlyPortEnabled"; - - /** - * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoprovisioningNodePoolDefaults instance - */ - public static create(properties?: google.container.v1beta1.IAutoprovisioningNodePoolDefaults): google.container.v1beta1.AutoprovisioningNodePoolDefaults; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @param message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @param message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAutoprovisioningNodePoolDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutoprovisioningNodePoolDefaults; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutoprovisioningNodePoolDefaults; - - /** - * Verifies an AutoprovisioningNodePoolDefaults message. - * @param message Plain 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 AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoprovisioningNodePoolDefaults - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutoprovisioningNodePoolDefaults; - - /** - * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. - * @param message AutoprovisioningNodePoolDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AutoprovisioningNodePoolDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoprovisioningNodePoolDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoprovisioningNodePoolDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceLimit. */ - interface IResourceLimit { - - /** ResourceLimit resourceType */ - resourceType?: (string|null); - - /** ResourceLimit minimum */ - minimum?: (number|Long|string|null); - - /** ResourceLimit maximum */ - maximum?: (number|Long|string|null); - } - - /** Represents a ResourceLimit. */ - class ResourceLimit implements IResourceLimit { - - /** - * Constructs a new ResourceLimit. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IResourceLimit); - - /** ResourceLimit resourceType. */ - public resourceType: string; - - /** ResourceLimit minimum. */ - public minimum: (number|Long|string); - - /** ResourceLimit maximum. */ - public maximum: (number|Long|string); - - /** - * Creates a new ResourceLimit instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceLimit instance - */ - public static create(properties?: google.container.v1beta1.IResourceLimit): google.container.v1beta1.ResourceLimit; - - /** - * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. - * @param message ResourceLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. - * @param message ResourceLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IResourceLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceLimit; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceLimit; - - /** - * Verifies a ResourceLimit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceLimit - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceLimit; - - /** - * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. - * @param message ResourceLimit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceLimit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceLimit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolAutoscaling. */ - interface INodePoolAutoscaling { - - /** NodePoolAutoscaling enabled */ - enabled?: (boolean|null); - - /** NodePoolAutoscaling minNodeCount */ - minNodeCount?: (number|null); - - /** NodePoolAutoscaling maxNodeCount */ - maxNodeCount?: (number|null); - - /** NodePoolAutoscaling autoprovisioned */ - autoprovisioned?: (boolean|null); - - /** NodePoolAutoscaling locationPolicy */ - locationPolicy?: (google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|null); - - /** NodePoolAutoscaling totalMinNodeCount */ - totalMinNodeCount?: (number|null); - - /** NodePoolAutoscaling totalMaxNodeCount */ - totalMaxNodeCount?: (number|null); - } - - /** Represents a NodePoolAutoscaling. */ - class NodePoolAutoscaling implements INodePoolAutoscaling { - - /** - * Constructs a new NodePoolAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodePoolAutoscaling); - - /** NodePoolAutoscaling enabled. */ - public enabled: boolean; - - /** NodePoolAutoscaling minNodeCount. */ - public minNodeCount: number; - - /** NodePoolAutoscaling maxNodeCount. */ - public maxNodeCount: number; - - /** NodePoolAutoscaling autoprovisioned. */ - public autoprovisioned: boolean; - - /** NodePoolAutoscaling locationPolicy. */ - public locationPolicy: (google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|keyof typeof google.container.v1beta1.NodePoolAutoscaling.LocationPolicy); - - /** NodePoolAutoscaling totalMinNodeCount. */ - public totalMinNodeCount: number; - - /** NodePoolAutoscaling totalMaxNodeCount. */ - public totalMaxNodeCount: number; - - /** - * Creates a new NodePoolAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolAutoscaling instance - */ - public static create(properties?: google.container.v1beta1.INodePoolAutoscaling): google.container.v1beta1.NodePoolAutoscaling; - - /** - * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. - * @param message NodePoolAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. - * @param message NodePoolAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolAutoscaling; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolAutoscaling; - - /** - * Verifies a NodePoolAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolAutoscaling; - - /** - * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. - * @param message NodePoolAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodePoolAutoscaling { - - /** LocationPolicy enum. */ - enum LocationPolicy { - LOCATION_POLICY_UNSPECIFIED = 0, - BALANCED = 1, - ANY = 2 - } - } - - /** Properties of a SetLabelsRequest. */ - interface ISetLabelsRequest { - - /** SetLabelsRequest projectId */ - projectId?: (string|null); - - /** SetLabelsRequest zone */ - zone?: (string|null); - - /** SetLabelsRequest clusterId */ - clusterId?: (string|null); - - /** SetLabelsRequest resourceLabels */ - resourceLabels?: ({ [k: string]: string }|null); - - /** SetLabelsRequest labelFingerprint */ - labelFingerprint?: (string|null); - - /** SetLabelsRequest name */ - name?: (string|null); - } - - /** Represents a SetLabelsRequest. */ - class SetLabelsRequest implements ISetLabelsRequest { - - /** - * Constructs a new SetLabelsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetLabelsRequest); - - /** SetLabelsRequest projectId. */ - public projectId: string; - - /** SetLabelsRequest zone. */ - public zone: string; - - /** SetLabelsRequest clusterId. */ - public clusterId: string; - - /** SetLabelsRequest resourceLabels. */ - public resourceLabels: { [k: string]: string }; - - /** SetLabelsRequest labelFingerprint. */ - public labelFingerprint: string; - - /** SetLabelsRequest name. */ - public name: string; - - /** - * Creates a new SetLabelsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLabelsRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetLabelsRequest): google.container.v1beta1.SetLabelsRequest; - - /** - * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. - * @param message SetLabelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. - * @param message SetLabelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLabelsRequest; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLabelsRequest; - - /** - * Verifies a SetLabelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLabelsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLabelsRequest; - - /** - * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. - * @param message SetLabelsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLabelsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLabelsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetLegacyAbacRequest. */ - interface ISetLegacyAbacRequest { - - /** SetLegacyAbacRequest projectId */ - projectId?: (string|null); - - /** SetLegacyAbacRequest zone */ - zone?: (string|null); - - /** SetLegacyAbacRequest clusterId */ - clusterId?: (string|null); - - /** SetLegacyAbacRequest enabled */ - enabled?: (boolean|null); - - /** SetLegacyAbacRequest name */ - name?: (string|null); - } - - /** Represents a SetLegacyAbacRequest. */ - class SetLegacyAbacRequest implements ISetLegacyAbacRequest { - - /** - * Constructs a new SetLegacyAbacRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetLegacyAbacRequest); - - /** SetLegacyAbacRequest projectId. */ - public projectId: string; - - /** SetLegacyAbacRequest zone. */ - public zone: string; - - /** SetLegacyAbacRequest clusterId. */ - public clusterId: string; - - /** SetLegacyAbacRequest enabled. */ - public enabled: boolean; - - /** SetLegacyAbacRequest name. */ - public name: string; - - /** - * Creates a new SetLegacyAbacRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetLegacyAbacRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetLegacyAbacRequest): google.container.v1beta1.SetLegacyAbacRequest; - - /** - * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. - * @param message SetLegacyAbacRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. - * @param message SetLegacyAbacRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetLegacyAbacRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetLegacyAbacRequest; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetLegacyAbacRequest; - - /** - * Verifies a SetLegacyAbacRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetLegacyAbacRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetLegacyAbacRequest; - - /** - * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. - * @param message SetLegacyAbacRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetLegacyAbacRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetLegacyAbacRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetLegacyAbacRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartIPRotationRequest. */ - interface IStartIPRotationRequest { - - /** StartIPRotationRequest projectId */ - projectId?: (string|null); - - /** StartIPRotationRequest zone */ - zone?: (string|null); - - /** StartIPRotationRequest clusterId */ - clusterId?: (string|null); - - /** StartIPRotationRequest name */ - name?: (string|null); - - /** StartIPRotationRequest rotateCredentials */ - rotateCredentials?: (boolean|null); - } - - /** Represents a StartIPRotationRequest. */ - class StartIPRotationRequest implements IStartIPRotationRequest { - - /** - * Constructs a new StartIPRotationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IStartIPRotationRequest); - - /** StartIPRotationRequest projectId. */ - public projectId: string; - - /** StartIPRotationRequest zone. */ - public zone: string; - - /** StartIPRotationRequest clusterId. */ - public clusterId: string; - - /** StartIPRotationRequest name. */ - public name: string; - - /** StartIPRotationRequest rotateCredentials. */ - public rotateCredentials: boolean; - - /** - * Creates a new StartIPRotationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartIPRotationRequest instance - */ - public static create(properties?: google.container.v1beta1.IStartIPRotationRequest): google.container.v1beta1.StartIPRotationRequest; - - /** - * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. - * @param message StartIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. - * @param message StartIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IStartIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StartIPRotationRequest; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StartIPRotationRequest; - - /** - * Verifies a StartIPRotationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartIPRotationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StartIPRotationRequest; - - /** - * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. - * @param message StartIPRotationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.StartIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartIPRotationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartIPRotationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CompleteIPRotationRequest. */ - interface ICompleteIPRotationRequest { - - /** CompleteIPRotationRequest projectId */ - projectId?: (string|null); - - /** CompleteIPRotationRequest zone */ - zone?: (string|null); - - /** CompleteIPRotationRequest clusterId */ - clusterId?: (string|null); - - /** CompleteIPRotationRequest name */ - name?: (string|null); - } - - /** Represents a CompleteIPRotationRequest. */ - class CompleteIPRotationRequest implements ICompleteIPRotationRequest { - - /** - * Constructs a new CompleteIPRotationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICompleteIPRotationRequest); - - /** CompleteIPRotationRequest projectId. */ - public projectId: string; - - /** CompleteIPRotationRequest zone. */ - public zone: string; - - /** CompleteIPRotationRequest clusterId. */ - public clusterId: string; - - /** CompleteIPRotationRequest name. */ - public name: string; - - /** - * Creates a new CompleteIPRotationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CompleteIPRotationRequest instance - */ - public static create(properties?: google.container.v1beta1.ICompleteIPRotationRequest): google.container.v1beta1.CompleteIPRotationRequest; - - /** - * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. - * @param message CompleteIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. - * @param message CompleteIPRotationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICompleteIPRotationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CompleteIPRotationRequest; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CompleteIPRotationRequest; - - /** - * Verifies a CompleteIPRotationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompleteIPRotationRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CompleteIPRotationRequest; - - /** - * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. - * @param message CompleteIPRotationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CompleteIPRotationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompleteIPRotationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompleteIPRotationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|Long|string|null); - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); - - /** AcceleratorConfig gpuPartitionSize */ - gpuPartitionSize?: (string|null); - - /** AcceleratorConfig maxTimeSharedClientsPerGpu */ - maxTimeSharedClientsPerGpu?: (number|Long|string|null); - - /** AcceleratorConfig gpuSharingConfig */ - gpuSharingConfig?: (google.container.v1beta1.IGPUSharingConfig|null); - - /** AcceleratorConfig gpuDriverInstallationConfig */ - gpuDriverInstallationConfig?: (google.container.v1beta1.IGPUDriverInstallationConfig|null); - } - - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { - - /** - * Constructs a new AcceleratorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount: (number|Long|string); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType: string; - - /** AcceleratorConfig gpuPartitionSize. */ - public gpuPartitionSize: string; - - /** AcceleratorConfig maxTimeSharedClientsPerGpu. */ - public maxTimeSharedClientsPerGpu: (number|Long|string); - - /** AcceleratorConfig gpuSharingConfig. */ - public gpuSharingConfig?: (google.container.v1beta1.IGPUSharingConfig|null); - - /** AcceleratorConfig gpuDriverInstallationConfig. */ - public gpuDriverInstallationConfig?: (google.container.v1beta1.IGPUDriverInstallationConfig|null); - - /** AcceleratorConfig _gpuSharingConfig. */ - public _gpuSharingConfig?: "gpuSharingConfig"; - - /** AcceleratorConfig _gpuDriverInstallationConfig. */ - public _gpuDriverInstallationConfig?: "gpuDriverInstallationConfig"; - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AcceleratorConfig instance - */ - public static create(properties?: google.container.v1beta1.IAcceleratorConfig): google.container.v1beta1.AcceleratorConfig; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AcceleratorConfig; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AcceleratorConfig; - - /** - * Verifies an AcceleratorConfig message. - * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcceleratorConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AcceleratorConfig; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcceleratorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcceleratorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GPUSharingConfig. */ - interface IGPUSharingConfig { - - /** GPUSharingConfig maxSharedClientsPerGpu */ - maxSharedClientsPerGpu?: (number|Long|string|null); - - /** GPUSharingConfig gpuSharingStrategy */ - gpuSharingStrategy?: (google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null); - } - - /** Represents a GPUSharingConfig. */ - class GPUSharingConfig implements IGPUSharingConfig { - - /** - * Constructs a new GPUSharingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGPUSharingConfig); - - /** GPUSharingConfig maxSharedClientsPerGpu. */ - public maxSharedClientsPerGpu: (number|Long|string); - - /** GPUSharingConfig gpuSharingStrategy. */ - public gpuSharingStrategy?: (google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|keyof typeof google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null); - - /** GPUSharingConfig _gpuSharingStrategy. */ - public _gpuSharingStrategy?: "gpuSharingStrategy"; - - /** - * Creates a new GPUSharingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GPUSharingConfig instance - */ - public static create(properties?: google.container.v1beta1.IGPUSharingConfig): google.container.v1beta1.GPUSharingConfig; - - /** - * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. - * @param message GPUSharingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. - * @param message GPUSharingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGPUSharingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GPUSharingConfig; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GPUSharingConfig; - - /** - * Verifies a GPUSharingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GPUSharingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GPUSharingConfig; - - /** - * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. - * @param message GPUSharingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GPUSharingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GPUSharingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GPUSharingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GPUSharingConfig { - - /** GPUSharingStrategy enum. */ - enum GPUSharingStrategy { - GPU_SHARING_STRATEGY_UNSPECIFIED = 0, - TIME_SHARING = 1, - MPS = 2 - } - } - - /** Properties of a GPUDriverInstallationConfig. */ - interface IGPUDriverInstallationConfig { - - /** GPUDriverInstallationConfig gpuDriverVersion */ - gpuDriverVersion?: (google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null); - } - - /** Represents a GPUDriverInstallationConfig. */ - class GPUDriverInstallationConfig implements IGPUDriverInstallationConfig { - - /** - * Constructs a new GPUDriverInstallationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGPUDriverInstallationConfig); - - /** GPUDriverInstallationConfig gpuDriverVersion. */ - public gpuDriverVersion?: (google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|keyof typeof google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null); - - /** GPUDriverInstallationConfig _gpuDriverVersion. */ - public _gpuDriverVersion?: "gpuDriverVersion"; - - /** - * Creates a new GPUDriverInstallationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GPUDriverInstallationConfig instance - */ - public static create(properties?: google.container.v1beta1.IGPUDriverInstallationConfig): google.container.v1beta1.GPUDriverInstallationConfig; - - /** - * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. - * @param message GPUDriverInstallationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. - * @param message GPUDriverInstallationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGPUDriverInstallationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GPUDriverInstallationConfig; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GPUDriverInstallationConfig; - - /** - * Verifies a GPUDriverInstallationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GPUDriverInstallationConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GPUDriverInstallationConfig; - - /** - * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. - * @param message GPUDriverInstallationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GPUDriverInstallationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GPUDriverInstallationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GPUDriverInstallationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GPUDriverInstallationConfig { - - /** GPUDriverVersion enum. */ - enum GPUDriverVersion { - GPU_DRIVER_VERSION_UNSPECIFIED = 0, - INSTALLATION_DISABLED = 1, - DEFAULT = 2, - LATEST = 3 - } - } - - /** 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.container.v1beta1.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.container.v1beta1.IManagedPrometheusConfig): google.container.v1beta1.ManagedPrometheusConfig; - - /** - * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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; - } - - /** Properties of a WorkloadMetadataConfig. */ - interface IWorkloadMetadataConfig { - - /** WorkloadMetadataConfig nodeMetadata */ - nodeMetadata?: (google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|null); - - /** WorkloadMetadataConfig mode */ - mode?: (google.container.v1beta1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.Mode|null); - } - - /** Represents a WorkloadMetadataConfig. */ - class WorkloadMetadataConfig implements IWorkloadMetadataConfig { - - /** - * Constructs a new WorkloadMetadataConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadMetadataConfig); - - /** WorkloadMetadataConfig nodeMetadata. */ - public nodeMetadata: (google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata); - - /** WorkloadMetadataConfig mode. */ - public mode: (google.container.v1beta1.WorkloadMetadataConfig.Mode|keyof typeof google.container.v1beta1.WorkloadMetadataConfig.Mode); - - /** - * Creates a new WorkloadMetadataConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadMetadataConfig instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadMetadataConfig): google.container.v1beta1.WorkloadMetadataConfig; - - /** - * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. - * @param message WorkloadMetadataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. - * @param message WorkloadMetadataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWorkloadMetadataConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadMetadataConfig; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadMetadataConfig; - - /** - * Verifies a WorkloadMetadataConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadMetadataConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadMetadataConfig; - - /** - * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. - * @param message WorkloadMetadataConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WorkloadMetadataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadMetadataConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadMetadataConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkloadMetadataConfig { - - /** NodeMetadata enum. */ - enum NodeMetadata { - UNSPECIFIED = 0, - SECURE = 1, - EXPOSE = 2, - GKE_METADATA_SERVER = 3 - } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - GCE_METADATA = 1, - GKE_METADATA = 2 - } - } - - /** Properties of a SetNetworkPolicyRequest. */ - interface ISetNetworkPolicyRequest { - - /** SetNetworkPolicyRequest projectId */ - projectId?: (string|null); - - /** SetNetworkPolicyRequest zone */ - zone?: (string|null); - - /** SetNetworkPolicyRequest clusterId */ - clusterId?: (string|null); - - /** SetNetworkPolicyRequest networkPolicy */ - networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); - - /** SetNetworkPolicyRequest name */ - name?: (string|null); - } - - /** Represents a SetNetworkPolicyRequest. */ - class SetNetworkPolicyRequest implements ISetNetworkPolicyRequest { - - /** - * Constructs a new SetNetworkPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetNetworkPolicyRequest); - - /** SetNetworkPolicyRequest projectId. */ - public projectId: string; - - /** SetNetworkPolicyRequest zone. */ - public zone: string; - - /** SetNetworkPolicyRequest clusterId. */ - public clusterId: string; - - /** SetNetworkPolicyRequest networkPolicy. */ - public networkPolicy?: (google.container.v1beta1.INetworkPolicy|null); - - /** SetNetworkPolicyRequest name. */ - public name: string; - - /** - * Creates a new SetNetworkPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetNetworkPolicyRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetNetworkPolicyRequest): google.container.v1beta1.SetNetworkPolicyRequest; - - /** - * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. - * @param message SetNetworkPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. - * @param message SetNetworkPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetNetworkPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetNetworkPolicyRequest; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetNetworkPolicyRequest; - - /** - * Verifies a SetNetworkPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetNetworkPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetNetworkPolicyRequest; - - /** - * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. - * @param message SetNetworkPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetNetworkPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetNetworkPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetNetworkPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetMaintenancePolicyRequest. */ - interface ISetMaintenancePolicyRequest { - - /** SetMaintenancePolicyRequest projectId */ - projectId?: (string|null); - - /** SetMaintenancePolicyRequest zone */ - zone?: (string|null); - - /** SetMaintenancePolicyRequest clusterId */ - clusterId?: (string|null); - - /** SetMaintenancePolicyRequest maintenancePolicy */ - maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); - - /** SetMaintenancePolicyRequest name */ - name?: (string|null); - } - - /** Represents a SetMaintenancePolicyRequest. */ - class SetMaintenancePolicyRequest implements ISetMaintenancePolicyRequest { - - /** - * Constructs a new SetMaintenancePolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISetMaintenancePolicyRequest); - - /** SetMaintenancePolicyRequest projectId. */ - public projectId: string; - - /** SetMaintenancePolicyRequest zone. */ - public zone: string; - - /** SetMaintenancePolicyRequest clusterId. */ - public clusterId: string; - - /** SetMaintenancePolicyRequest maintenancePolicy. */ - public maintenancePolicy?: (google.container.v1beta1.IMaintenancePolicy|null); - - /** SetMaintenancePolicyRequest name. */ - public name: string; - - /** - * Creates a new SetMaintenancePolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMaintenancePolicyRequest instance - */ - public static create(properties?: google.container.v1beta1.ISetMaintenancePolicyRequest): google.container.v1beta1.SetMaintenancePolicyRequest; - - /** - * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. - * @param message SetMaintenancePolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. - * @param message SetMaintenancePolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISetMaintenancePolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SetMaintenancePolicyRequest; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SetMaintenancePolicyRequest; - - /** - * Verifies a SetMaintenancePolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMaintenancePolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SetMaintenancePolicyRequest; - - /** - * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. - * @param message SetMaintenancePolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SetMaintenancePolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMaintenancePolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetMaintenancePolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListLocationsRequest. */ - interface IListLocationsRequest { - - /** ListLocationsRequest parent */ - parent?: (string|null); - } - - /** Represents a ListLocationsRequest. */ - class ListLocationsRequest implements IListLocationsRequest { - - /** - * Constructs a new ListLocationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListLocationsRequest); - - /** ListLocationsRequest parent. */ - public parent: string; - - /** - * Creates a new ListLocationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLocationsRequest instance - */ - public static create(properties?: google.container.v1beta1.IListLocationsRequest): google.container.v1beta1.ListLocationsRequest; - - /** - * Encodes the specified ListLocationsRequest message. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. - * @param message ListLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. - * @param message ListLocationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListLocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLocationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListLocationsRequest; - - /** - * Decodes a ListLocationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListLocationsRequest; - - /** - * Verifies a ListLocationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLocationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListLocationsRequest; - - /** - * Creates a plain object from a ListLocationsRequest message. Also converts values to other types if specified. - * @param message ListLocationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListLocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLocationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListLocationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListLocationsResponse. */ - interface IListLocationsResponse { - - /** ListLocationsResponse locations */ - locations?: (google.container.v1beta1.ILocation[]|null); - - /** ListLocationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListLocationsResponse. */ - class ListLocationsResponse implements IListLocationsResponse { - - /** - * Constructs a new ListLocationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListLocationsResponse); - - /** ListLocationsResponse locations. */ - public locations: google.container.v1beta1.ILocation[]; - - /** ListLocationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListLocationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLocationsResponse instance - */ - public static create(properties?: google.container.v1beta1.IListLocationsResponse): google.container.v1beta1.ListLocationsResponse; - - /** - * Encodes the specified ListLocationsResponse message. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. - * @param message ListLocationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListLocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLocationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. - * @param message ListLocationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListLocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLocationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLocationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListLocationsResponse; - - /** - * Decodes a ListLocationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLocationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListLocationsResponse; - - /** - * Verifies a ListLocationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLocationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLocationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListLocationsResponse; - - /** - * Creates a plain object from a ListLocationsResponse message. Also converts values to other types if specified. - * @param message ListLocationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListLocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLocationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListLocationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Location. */ - interface ILocation { - - /** Location type */ - type?: (google.container.v1beta1.Location.LocationType|keyof typeof google.container.v1beta1.Location.LocationType|null); - - /** Location name */ - name?: (string|null); - - /** Location recommended */ - recommended?: (boolean|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILocation); - - /** Location type. */ - public type: (google.container.v1beta1.Location.LocationType|keyof typeof google.container.v1beta1.Location.LocationType); - - /** Location name. */ - public name: string; - - /** Location recommended. */ - public recommended: boolean; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.container.v1beta1.ILocation): google.container.v1beta1.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Location { - - /** LocationType enum. */ - enum LocationType { - LOCATION_TYPE_UNSPECIFIED = 0, - ZONE = 1, - REGION = 2 - } - } - - /** Properties of a StatusCondition. */ - interface IStatusCondition { - - /** StatusCondition code */ - code?: (google.container.v1beta1.StatusCondition.Code|keyof typeof google.container.v1beta1.StatusCondition.Code|null); - - /** StatusCondition message */ - message?: (string|null); - - /** StatusCondition canonicalCode */ - canonicalCode?: (google.rpc.Code|keyof typeof google.rpc.Code|null); - } - - /** Represents a StatusCondition. */ - class StatusCondition implements IStatusCondition { - - /** - * Constructs a new StatusCondition. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IStatusCondition); - - /** StatusCondition code. */ - public code: (google.container.v1beta1.StatusCondition.Code|keyof typeof google.container.v1beta1.StatusCondition.Code); - - /** StatusCondition message. */ - public message: string; - - /** StatusCondition canonicalCode. */ - public canonicalCode: (google.rpc.Code|keyof typeof google.rpc.Code); - - /** - * Creates a new StatusCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns StatusCondition instance - */ - public static create(properties?: google.container.v1beta1.IStatusCondition): google.container.v1beta1.StatusCondition; - - /** - * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. - * @param message StatusCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. - * @param message StatusCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IStatusCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatusCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.StatusCondition; - - /** - * Decodes a StatusCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.StatusCondition; - - /** - * Verifies a StatusCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatusCondition - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.StatusCondition; - - /** - * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. - * @param message StatusCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.StatusCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatusCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatusCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StatusCondition { - - /** Code enum. */ - enum Code { - UNKNOWN = 0, - GCE_STOCKOUT = 1, - GKE_SERVICE_ACCOUNT_DELETED = 2, - GCE_QUOTA_EXCEEDED = 3, - SET_BY_OPERATOR = 4, - CLOUD_KMS_KEY_ERROR = 7, - CA_EXPIRING = 9 - } - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig subnetwork */ - subnetwork?: (string|null); - - /** NetworkConfig enableIntraNodeVisibility */ - enableIntraNodeVisibility?: (boolean|null); - - /** NetworkConfig defaultSnatStatus */ - defaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); - - /** NetworkConfig enableL4ilbSubsetting */ - enableL4ilbSubsetting?: (boolean|null); - - /** NetworkConfig datapathProvider */ - datapathProvider?: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider|null); - - /** NetworkConfig privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess|null); - - /** NetworkConfig dnsConfig */ - dnsConfig?: (google.container.v1beta1.IDNSConfig|null); - - /** NetworkConfig serviceExternalIpsConfig */ - serviceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); - - /** NetworkConfig gatewayApiConfig */ - gatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); - - /** NetworkConfig enableMultiNetworking */ - enableMultiNetworking?: (boolean|null); - - /** NetworkConfig networkPerformanceConfig */ - networkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** NetworkConfig enableFqdnNetworkPolicy */ - enableFqdnNetworkPolicy?: (boolean|null); - - /** NetworkConfig inTransitEncryptionConfig */ - inTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); - - /** NetworkConfig enableCiliumClusterwideNetworkPolicy */ - enableCiliumClusterwideNetworkPolicy?: (boolean|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INetworkConfig); - - /** NetworkConfig network. */ - public network: string; - - /** NetworkConfig subnetwork. */ - public subnetwork: string; - - /** NetworkConfig enableIntraNodeVisibility. */ - public enableIntraNodeVisibility: boolean; - - /** NetworkConfig defaultSnatStatus. */ - public defaultSnatStatus?: (google.container.v1beta1.IDefaultSnatStatus|null); - - /** NetworkConfig enableL4ilbSubsetting. */ - public enableL4ilbSubsetting: boolean; - - /** NetworkConfig datapathProvider. */ - public datapathProvider: (google.container.v1beta1.DatapathProvider|keyof typeof google.container.v1beta1.DatapathProvider); - - /** NetworkConfig privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess: (google.container.v1beta1.PrivateIPv6GoogleAccess|keyof typeof google.container.v1beta1.PrivateIPv6GoogleAccess); - - /** NetworkConfig dnsConfig. */ - public dnsConfig?: (google.container.v1beta1.IDNSConfig|null); - - /** NetworkConfig serviceExternalIpsConfig. */ - public serviceExternalIpsConfig?: (google.container.v1beta1.IServiceExternalIPsConfig|null); - - /** NetworkConfig gatewayApiConfig. */ - public gatewayApiConfig?: (google.container.v1beta1.IGatewayAPIConfig|null); - - /** NetworkConfig enableMultiNetworking. */ - public enableMultiNetworking: boolean; - - /** NetworkConfig networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null); - - /** NetworkConfig enableFqdnNetworkPolicy. */ - public enableFqdnNetworkPolicy?: (boolean|null); - - /** NetworkConfig inTransitEncryptionConfig. */ - public inTransitEncryptionConfig?: (google.container.v1beta1.InTransitEncryptionConfig|keyof typeof google.container.v1beta1.InTransitEncryptionConfig|null); - - /** NetworkConfig enableCiliumClusterwideNetworkPolicy. */ - public enableCiliumClusterwideNetworkPolicy?: (boolean|null); - - /** NetworkConfig _enableFqdnNetworkPolicy. */ - public _enableFqdnNetworkPolicy?: "enableFqdnNetworkPolicy"; - - /** NetworkConfig _inTransitEncryptionConfig. */ - public _inTransitEncryptionConfig?: "inTransitEncryptionConfig"; - - /** NetworkConfig _enableCiliumClusterwideNetworkPolicy. */ - public _enableCiliumClusterwideNetworkPolicy?: "enableCiliumClusterwideNetworkPolicy"; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: google.container.v1beta1.INetworkConfig): google.container.v1beta1.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** Properties of a ClusterNetworkPerformanceConfig. */ - interface IClusterNetworkPerformanceConfig { - - /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); - } - - /** Represents a ClusterNetworkPerformanceConfig. */ - class ClusterNetworkPerformanceConfig implements IClusterNetworkPerformanceConfig { - - /** - * Constructs a new ClusterNetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig); - - /** ClusterNetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|keyof typeof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null); - - /** ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterNetworkPerformanceConfig instance - */ - public static create(properties?: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @param message ClusterNetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @param message ClusterNetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Verifies a ClusterNetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterNetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig; - - /** - * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message ClusterNetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterNetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterNetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ClusterNetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - TIER_1 = 1 - } - } - } - - /** Properties of a GatewayAPIConfig. */ - interface IGatewayAPIConfig { - - /** GatewayAPIConfig channel */ - channel?: (google.container.v1beta1.GatewayAPIConfig.Channel|keyof typeof google.container.v1beta1.GatewayAPIConfig.Channel|null); - } - - /** Represents a GatewayAPIConfig. */ - class GatewayAPIConfig implements IGatewayAPIConfig { - - /** - * Constructs a new GatewayAPIConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGatewayAPIConfig); - - /** GatewayAPIConfig channel. */ - public channel: (google.container.v1beta1.GatewayAPIConfig.Channel|keyof typeof google.container.v1beta1.GatewayAPIConfig.Channel); - - /** - * Creates a new GatewayAPIConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GatewayAPIConfig instance - */ - public static create(properties?: google.container.v1beta1.IGatewayAPIConfig): google.container.v1beta1.GatewayAPIConfig; - - /** - * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. - * @param message GatewayAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. - * @param message GatewayAPIConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGatewayAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GatewayAPIConfig; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GatewayAPIConfig; - - /** - * Verifies a GatewayAPIConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GatewayAPIConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GatewayAPIConfig; - - /** - * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. - * @param message GatewayAPIConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GatewayAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GatewayAPIConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GatewayAPIConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GatewayAPIConfig { - - /** Channel enum. */ - enum Channel { - CHANNEL_UNSPECIFIED = 0, - CHANNEL_DISABLED = 1, - CHANNEL_EXPERIMENTAL = 3, - CHANNEL_STANDARD = 4 - } - } - - /** Properties of a ServiceExternalIPsConfig. */ - interface IServiceExternalIPsConfig { - - /** ServiceExternalIPsConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ServiceExternalIPsConfig. */ - class ServiceExternalIPsConfig implements IServiceExternalIPsConfig { - - /** - * Constructs a new ServiceExternalIPsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IServiceExternalIPsConfig); - - /** ServiceExternalIPsConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ServiceExternalIPsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceExternalIPsConfig instance - */ - public static create(properties?: google.container.v1beta1.IServiceExternalIPsConfig): google.container.v1beta1.ServiceExternalIPsConfig; - - /** - * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. - * @param message ServiceExternalIPsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. - * @param message ServiceExternalIPsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IServiceExternalIPsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ServiceExternalIPsConfig; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ServiceExternalIPsConfig; - - /** - * Verifies a ServiceExternalIPsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceExternalIPsConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ServiceExternalIPsConfig; - - /** - * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. - * @param message ServiceExternalIPsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ServiceExternalIPsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceExternalIPsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceExternalIPsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUsableSubnetworksRequest. */ - interface IListUsableSubnetworksRequest { - - /** ListUsableSubnetworksRequest parent */ - parent?: (string|null); - - /** ListUsableSubnetworksRequest filter */ - filter?: (string|null); - - /** ListUsableSubnetworksRequest pageSize */ - pageSize?: (number|null); - - /** ListUsableSubnetworksRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUsableSubnetworksRequest. */ - class ListUsableSubnetworksRequest implements IListUsableSubnetworksRequest { - - /** - * Constructs a new ListUsableSubnetworksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListUsableSubnetworksRequest); - - /** ListUsableSubnetworksRequest parent. */ - public parent: string; - - /** ListUsableSubnetworksRequest filter. */ - public filter: string; - - /** ListUsableSubnetworksRequest pageSize. */ - public pageSize: number; - - /** ListUsableSubnetworksRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUsableSubnetworksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUsableSubnetworksRequest instance - */ - public static create(properties?: google.container.v1beta1.IListUsableSubnetworksRequest): google.container.v1beta1.ListUsableSubnetworksRequest; - - /** - * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. - * @param message ListUsableSubnetworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. - * @param message ListUsableSubnetworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListUsableSubnetworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListUsableSubnetworksRequest; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListUsableSubnetworksRequest; - - /** - * Verifies a ListUsableSubnetworksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUsableSubnetworksRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListUsableSubnetworksRequest; - - /** - * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. - * @param message ListUsableSubnetworksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListUsableSubnetworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUsableSubnetworksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUsableSubnetworksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUsableSubnetworksResponse. */ - interface IListUsableSubnetworksResponse { - - /** ListUsableSubnetworksResponse subnetworks */ - subnetworks?: (google.container.v1beta1.IUsableSubnetwork[]|null); - - /** ListUsableSubnetworksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUsableSubnetworksResponse. */ - class ListUsableSubnetworksResponse implements IListUsableSubnetworksResponse { - - /** - * Constructs a new ListUsableSubnetworksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IListUsableSubnetworksResponse); - - /** ListUsableSubnetworksResponse subnetworks. */ - public subnetworks: google.container.v1beta1.IUsableSubnetwork[]; - - /** ListUsableSubnetworksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUsableSubnetworksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUsableSubnetworksResponse instance - */ - public static create(properties?: google.container.v1beta1.IListUsableSubnetworksResponse): google.container.v1beta1.ListUsableSubnetworksResponse; - - /** - * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. - * @param message ListUsableSubnetworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. - * @param message ListUsableSubnetworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IListUsableSubnetworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ListUsableSubnetworksResponse; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ListUsableSubnetworksResponse; - - /** - * Verifies a ListUsableSubnetworksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUsableSubnetworksResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ListUsableSubnetworksResponse; - - /** - * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. - * @param message ListUsableSubnetworksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ListUsableSubnetworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUsableSubnetworksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUsableSubnetworksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UsableSubnetworkSecondaryRange. */ - interface IUsableSubnetworkSecondaryRange { - - /** UsableSubnetworkSecondaryRange rangeName */ - rangeName?: (string|null); - - /** UsableSubnetworkSecondaryRange ipCidrRange */ - ipCidrRange?: (string|null); - - /** UsableSubnetworkSecondaryRange status */ - status?: (google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|null); - } - - /** Represents a UsableSubnetworkSecondaryRange. */ - class UsableSubnetworkSecondaryRange implements IUsableSubnetworkSecondaryRange { - - /** - * Constructs a new UsableSubnetworkSecondaryRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUsableSubnetworkSecondaryRange); - - /** UsableSubnetworkSecondaryRange rangeName. */ - public rangeName: string; - - /** UsableSubnetworkSecondaryRange ipCidrRange. */ - public ipCidrRange: string; - - /** UsableSubnetworkSecondaryRange status. */ - public status: (google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|keyof typeof google.container.v1beta1.UsableSubnetworkSecondaryRange.Status); - - /** - * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. - * @param [properties] Properties to set - * @returns UsableSubnetworkSecondaryRange instance - */ - public static create(properties?: google.container.v1beta1.IUsableSubnetworkSecondaryRange): google.container.v1beta1.UsableSubnetworkSecondaryRange; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @param message UsableSubnetworkSecondaryRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @param message UsableSubnetworkSecondaryRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUsableSubnetworkSecondaryRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UsableSubnetworkSecondaryRange; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UsableSubnetworkSecondaryRange; - - /** - * Verifies a UsableSubnetworkSecondaryRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsableSubnetworkSecondaryRange - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UsableSubnetworkSecondaryRange; - - /** - * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. - * @param message UsableSubnetworkSecondaryRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UsableSubnetworkSecondaryRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsableSubnetworkSecondaryRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsableSubnetworkSecondaryRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UsableSubnetworkSecondaryRange { - - /** Status enum. */ - enum Status { - UNKNOWN = 0, - UNUSED = 1, - IN_USE_SERVICE = 2, - IN_USE_SHAREABLE_POD = 3, - IN_USE_MANAGED_POD = 4 - } - } - - /** Properties of a UsableSubnetwork. */ - interface IUsableSubnetwork { - - /** UsableSubnetwork subnetwork */ - subnetwork?: (string|null); - - /** UsableSubnetwork network */ - network?: (string|null); - - /** UsableSubnetwork ipCidrRange */ - ipCidrRange?: (string|null); - - /** UsableSubnetwork secondaryIpRanges */ - secondaryIpRanges?: (google.container.v1beta1.IUsableSubnetworkSecondaryRange[]|null); - - /** UsableSubnetwork statusMessage */ - statusMessage?: (string|null); - } - - /** Represents a UsableSubnetwork. */ - class UsableSubnetwork implements IUsableSubnetwork { - - /** - * Constructs a new UsableSubnetwork. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUsableSubnetwork); - - /** UsableSubnetwork subnetwork. */ - public subnetwork: string; - - /** UsableSubnetwork network. */ - public network: string; - - /** UsableSubnetwork ipCidrRange. */ - public ipCidrRange: string; - - /** UsableSubnetwork secondaryIpRanges. */ - public secondaryIpRanges: google.container.v1beta1.IUsableSubnetworkSecondaryRange[]; - - /** UsableSubnetwork statusMessage. */ - public statusMessage: string; - - /** - * Creates a new UsableSubnetwork instance using the specified properties. - * @param [properties] Properties to set - * @returns UsableSubnetwork instance - */ - public static create(properties?: google.container.v1beta1.IUsableSubnetwork): google.container.v1beta1.UsableSubnetwork; - - /** - * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. - * @param message UsableSubnetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. - * @param message UsableSubnetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUsableSubnetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UsableSubnetwork; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UsableSubnetwork; - - /** - * Verifies a UsableSubnetwork message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsableSubnetwork - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UsableSubnetwork; - - /** - * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. - * @param message UsableSubnetwork - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UsableSubnetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsableSubnetwork to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsableSubnetwork - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VerticalPodAutoscaling. */ - interface IVerticalPodAutoscaling { - - /** VerticalPodAutoscaling enabled */ - enabled?: (boolean|null); - } - - /** Represents a VerticalPodAutoscaling. */ - class VerticalPodAutoscaling implements IVerticalPodAutoscaling { - - /** - * Constructs a new VerticalPodAutoscaling. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IVerticalPodAutoscaling); - - /** VerticalPodAutoscaling enabled. */ - public enabled: boolean; - - /** - * Creates a new VerticalPodAutoscaling instance using the specified properties. - * @param [properties] Properties to set - * @returns VerticalPodAutoscaling instance - */ - public static create(properties?: google.container.v1beta1.IVerticalPodAutoscaling): google.container.v1beta1.VerticalPodAutoscaling; - - /** - * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. - * @param message VerticalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. - * @param message VerticalPodAutoscaling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IVerticalPodAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.VerticalPodAutoscaling; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.VerticalPodAutoscaling; - - /** - * Verifies a VerticalPodAutoscaling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerticalPodAutoscaling - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.VerticalPodAutoscaling; - - /** - * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. - * @param message VerticalPodAutoscaling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.VerticalPodAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerticalPodAutoscaling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VerticalPodAutoscaling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DefaultSnatStatus. */ - interface IDefaultSnatStatus { - - /** DefaultSnatStatus disabled */ - disabled?: (boolean|null); - } - - /** Represents a DefaultSnatStatus. */ - class DefaultSnatStatus implements IDefaultSnatStatus { - - /** - * Constructs a new DefaultSnatStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDefaultSnatStatus); - - /** DefaultSnatStatus disabled. */ - public disabled: boolean; - - /** - * Creates a new DefaultSnatStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns DefaultSnatStatus instance - */ - public static create(properties?: google.container.v1beta1.IDefaultSnatStatus): google.container.v1beta1.DefaultSnatStatus; - - /** - * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. - * @param message DefaultSnatStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. - * @param message DefaultSnatStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDefaultSnatStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DefaultSnatStatus; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DefaultSnatStatus; - - /** - * Verifies a DefaultSnatStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DefaultSnatStatus - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DefaultSnatStatus; - - /** - * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. - * @param message DefaultSnatStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DefaultSnatStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DefaultSnatStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DefaultSnatStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IntraNodeVisibilityConfig. */ - interface IIntraNodeVisibilityConfig { - - /** IntraNodeVisibilityConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents an IntraNodeVisibilityConfig. */ - class IntraNodeVisibilityConfig implements IIntraNodeVisibilityConfig { - - /** - * Constructs a new IntraNodeVisibilityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IIntraNodeVisibilityConfig); - - /** IntraNodeVisibilityConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new IntraNodeVisibilityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IntraNodeVisibilityConfig instance - */ - public static create(properties?: google.container.v1beta1.IIntraNodeVisibilityConfig): google.container.v1beta1.IntraNodeVisibilityConfig; - - /** - * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. - * @param message IntraNodeVisibilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. - * @param message IntraNodeVisibilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IIntraNodeVisibilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IntraNodeVisibilityConfig; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IntraNodeVisibilityConfig; - - /** - * Verifies an IntraNodeVisibilityConfig message. - * @param message Plain 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 IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntraNodeVisibilityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IntraNodeVisibilityConfig; - - /** - * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. - * @param message IntraNodeVisibilityConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.IntraNodeVisibilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntraNodeVisibilityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IntraNodeVisibilityConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ILBSubsettingConfig. */ - interface IILBSubsettingConfig { - - /** ILBSubsettingConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ILBSubsettingConfig. */ - class ILBSubsettingConfig implements IILBSubsettingConfig { - - /** - * Constructs a new ILBSubsettingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IILBSubsettingConfig); - - /** ILBSubsettingConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ILBSubsettingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ILBSubsettingConfig instance - */ - public static create(properties?: google.container.v1beta1.IILBSubsettingConfig): google.container.v1beta1.ILBSubsettingConfig; - - /** - * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. - * @param message ILBSubsettingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. - * @param message ILBSubsettingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IILBSubsettingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ILBSubsettingConfig; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ILBSubsettingConfig; - - /** - * Verifies a ILBSubsettingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ILBSubsettingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ILBSubsettingConfig; - - /** - * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. - * @param message ILBSubsettingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ILBSubsettingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ILBSubsettingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ILBSubsettingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DNSConfig. */ - interface IDNSConfig { - - /** DNSConfig clusterDns */ - clusterDns?: (google.container.v1beta1.DNSConfig.Provider|keyof typeof google.container.v1beta1.DNSConfig.Provider|null); - - /** DNSConfig clusterDnsScope */ - clusterDnsScope?: (google.container.v1beta1.DNSConfig.DNSScope|keyof typeof google.container.v1beta1.DNSConfig.DNSScope|null); - - /** DNSConfig clusterDnsDomain */ - clusterDnsDomain?: (string|null); - - /** DNSConfig additiveVpcScopeDnsDomain */ - additiveVpcScopeDnsDomain?: (string|null); - } - - /** Represents a DNSConfig. */ - class DNSConfig implements IDNSConfig { - - /** - * Constructs a new DNSConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDNSConfig); - - /** DNSConfig clusterDns. */ - public clusterDns: (google.container.v1beta1.DNSConfig.Provider|keyof typeof google.container.v1beta1.DNSConfig.Provider); - - /** DNSConfig clusterDnsScope. */ - public clusterDnsScope: (google.container.v1beta1.DNSConfig.DNSScope|keyof typeof google.container.v1beta1.DNSConfig.DNSScope); - - /** DNSConfig clusterDnsDomain. */ - public clusterDnsDomain: string; - - /** DNSConfig additiveVpcScopeDnsDomain. */ - public additiveVpcScopeDnsDomain: string; - - /** - * Creates a new DNSConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DNSConfig instance - */ - public static create(properties?: google.container.v1beta1.IDNSConfig): google.container.v1beta1.DNSConfig; - - /** - * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. - * @param message DNSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. - * @param message DNSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDNSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DNSConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DNSConfig; - - /** - * Decodes a DNSConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DNSConfig; - - /** - * Verifies a DNSConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DNSConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DNSConfig; - - /** - * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. - * @param message DNSConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DNSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DNSConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DNSConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DNSConfig { - - /** Provider enum. */ - enum Provider { - PROVIDER_UNSPECIFIED = 0, - PLATFORM_DEFAULT = 1, - CLOUD_DNS = 2, - KUBE_DNS = 3 - } - - /** DNSScope enum. */ - enum DNSScope { - DNS_SCOPE_UNSPECIFIED = 0, - CLUSTER_SCOPE = 1, - VPC_SCOPE = 2 - } - } - - /** Properties of a MaxPodsConstraint. */ - interface IMaxPodsConstraint { - - /** MaxPodsConstraint maxPodsPerNode */ - maxPodsPerNode?: (number|Long|string|null); - } - - /** Represents a MaxPodsConstraint. */ - class MaxPodsConstraint implements IMaxPodsConstraint { - - /** - * Constructs a new MaxPodsConstraint. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMaxPodsConstraint); - - /** MaxPodsConstraint maxPodsPerNode. */ - public maxPodsPerNode: (number|Long|string); - - /** - * Creates a new MaxPodsConstraint instance using the specified properties. - * @param [properties] Properties to set - * @returns MaxPodsConstraint instance - */ - public static create(properties?: google.container.v1beta1.IMaxPodsConstraint): google.container.v1beta1.MaxPodsConstraint; - - /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.container.v1beta1.MaxPodsConstraint; - - /** - * 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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 a WorkloadIdentityConfig. */ - interface IWorkloadIdentityConfig { - - /** WorkloadIdentityConfig identityNamespace */ - identityNamespace?: (string|null); - - /** WorkloadIdentityConfig workloadPool */ - workloadPool?: (string|null); - - /** WorkloadIdentityConfig identityProvider */ - identityProvider?: (string|null); - } - - /** Represents a WorkloadIdentityConfig. */ - class WorkloadIdentityConfig implements IWorkloadIdentityConfig { - - /** - * Constructs a new WorkloadIdentityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadIdentityConfig); - - /** WorkloadIdentityConfig identityNamespace. */ - public identityNamespace: string; - - /** WorkloadIdentityConfig workloadPool. */ - public workloadPool: string; - - /** WorkloadIdentityConfig identityProvider. */ - public identityProvider: string; - - /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadIdentityConfig instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadIdentityConfig): google.container.v1beta1.WorkloadIdentityConfig; - - /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.container.v1beta1.WorkloadIdentityConfig; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.container.v1beta1.WorkloadIdentityConfig; - - /** - * 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadIdentityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadIdentityConfig; - - /** - * 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.container.v1beta1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadIdentityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 a WorkloadALTSConfig. */ - interface IWorkloadALTSConfig { - - /** WorkloadALTSConfig enableAlts */ - enableAlts?: (google.protobuf.IBoolValue|null); - } - - /** Represents a WorkloadALTSConfig. */ - class WorkloadALTSConfig implements IWorkloadALTSConfig { - - /** - * Constructs a new WorkloadALTSConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadALTSConfig); - - /** WorkloadALTSConfig enableAlts. */ - public enableAlts?: (google.protobuf.IBoolValue|null); - - /** - * Creates a new WorkloadALTSConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadALTSConfig instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadALTSConfig): google.container.v1beta1.WorkloadALTSConfig; - - /** - * Encodes the specified WorkloadALTSConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. - * @param message WorkloadALTSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWorkloadALTSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadALTSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. - * @param message WorkloadALTSConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWorkloadALTSConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadALTSConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadALTSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadALTSConfig; - - /** - * Decodes a WorkloadALTSConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadALTSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadALTSConfig; - - /** - * Verifies a WorkloadALTSConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadALTSConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadALTSConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadALTSConfig; - - /** - * Creates a plain object from a WorkloadALTSConfig message. Also converts values to other types if specified. - * @param message WorkloadALTSConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WorkloadALTSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadALTSConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadALTSConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadCertificates. */ - interface IWorkloadCertificates { - - /** WorkloadCertificates enableCertificates */ - enableCertificates?: (google.protobuf.IBoolValue|null); - } - - /** Represents a WorkloadCertificates. */ - class WorkloadCertificates implements IWorkloadCertificates { - - /** - * Constructs a new WorkloadCertificates. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadCertificates); - - /** WorkloadCertificates enableCertificates. */ - public enableCertificates?: (google.protobuf.IBoolValue|null); - - /** - * Creates a new WorkloadCertificates instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadCertificates instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadCertificates): google.container.v1beta1.WorkloadCertificates; - - /** - * Encodes the specified WorkloadCertificates message. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. - * @param message WorkloadCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWorkloadCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. - * @param message WorkloadCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWorkloadCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadCertificates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadCertificates; - - /** - * Decodes a WorkloadCertificates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadCertificates; - - /** - * Verifies a WorkloadCertificates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadCertificates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadCertificates - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadCertificates; - - /** - * Creates a plain object from a WorkloadCertificates message. Also converts values to other types if specified. - * @param message WorkloadCertificates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WorkloadCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadCertificates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadCertificates - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MeshCertificates. */ - interface IMeshCertificates { - - /** MeshCertificates enableCertificates */ - enableCertificates?: (google.protobuf.IBoolValue|null); - } - - /** Represents a MeshCertificates. */ - class MeshCertificates implements IMeshCertificates { - - /** - * Constructs a new MeshCertificates. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMeshCertificates); - - /** MeshCertificates enableCertificates. */ - public enableCertificates?: (google.protobuf.IBoolValue|null); - - /** - * Creates a new MeshCertificates instance using the specified properties. - * @param [properties] Properties to set - * @returns MeshCertificates instance - */ - public static create(properties?: google.container.v1beta1.IMeshCertificates): google.container.v1beta1.MeshCertificates; - - /** - * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. - * @param message MeshCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. - * @param message MeshCertificates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMeshCertificates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MeshCertificates; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MeshCertificates; - - /** - * Verifies a MeshCertificates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MeshCertificates - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MeshCertificates; - - /** - * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. - * @param message MeshCertificates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MeshCertificates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MeshCertificates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MeshCertificates - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseEncryption. */ - interface IDatabaseEncryption { - - /** DatabaseEncryption keyName */ - keyName?: (string|null); - - /** DatabaseEncryption state */ - state?: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State|null); - - /** DatabaseEncryption currentState */ - currentState?: (google.container.v1beta1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1beta1.DatabaseEncryption.CurrentState|null); - - /** DatabaseEncryption decryptionKeys */ - decryptionKeys?: (string[]|null); - - /** DatabaseEncryption lastOperationErrors */ - lastOperationErrors?: (google.container.v1beta1.DatabaseEncryption.IOperationError[]|null); - } - - /** Represents a DatabaseEncryption. */ - class DatabaseEncryption implements IDatabaseEncryption { - - /** - * Constructs a new DatabaseEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IDatabaseEncryption); - - /** DatabaseEncryption keyName. */ - public keyName: string; - - /** DatabaseEncryption state. */ - public state: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State); - - /** DatabaseEncryption currentState. */ - public currentState?: (google.container.v1beta1.DatabaseEncryption.CurrentState|keyof typeof google.container.v1beta1.DatabaseEncryption.CurrentState|null); - - /** DatabaseEncryption decryptionKeys. */ - public decryptionKeys: string[]; - - /** DatabaseEncryption lastOperationErrors. */ - public lastOperationErrors: google.container.v1beta1.DatabaseEncryption.IOperationError[]; - - /** DatabaseEncryption _currentState. */ - public _currentState?: "currentState"; - - /** - * Creates a new DatabaseEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseEncryption instance - */ - public static create(properties?: google.container.v1beta1.IDatabaseEncryption): google.container.v1beta1.DatabaseEncryption; - - /** - * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. - * @param message DatabaseEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. - * @param message DatabaseEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DatabaseEncryption; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DatabaseEncryption; - - /** - * Verifies a DatabaseEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseEncryption - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DatabaseEncryption; - - /** - * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. - * @param message DatabaseEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseEncryption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DatabaseEncryption { - - /** State enum. */ - enum State { - UNKNOWN = 0, - ENCRYPTED = 1, - DECRYPTED = 2 - } - - /** CurrentState enum. */ - enum CurrentState { - CURRENT_STATE_UNSPECIFIED = 0, - CURRENT_STATE_ENCRYPTED = 7, - CURRENT_STATE_DECRYPTED = 2, - CURRENT_STATE_ENCRYPTION_PENDING = 3, - CURRENT_STATE_ENCRYPTION_ERROR = 4, - CURRENT_STATE_DECRYPTION_PENDING = 5, - CURRENT_STATE_DECRYPTION_ERROR = 6 - } - - /** Properties of an OperationError. */ - interface IOperationError { - - /** OperationError keyName */ - keyName?: (string|null); - - /** OperationError errorMessage */ - errorMessage?: (string|null); - - /** OperationError timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents an OperationError. */ - class OperationError implements IOperationError { - - /** - * Constructs a new OperationError. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.DatabaseEncryption.IOperationError); - - /** OperationError keyName. */ - public keyName: string; - - /** OperationError errorMessage. */ - public errorMessage: string; - - /** OperationError timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new OperationError instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationError instance - */ - public static create(properties?: google.container.v1beta1.DatabaseEncryption.IOperationError): google.container.v1beta1.DatabaseEncryption.OperationError; - - /** - * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. - * @param message OperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. - * @param message OperationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.DatabaseEncryption.IOperationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.DatabaseEncryption.OperationError; - - /** - * Decodes an OperationError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.DatabaseEncryption.OperationError; - - /** - * Verifies an OperationError message. - * @param message Plain 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 OperationError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationError - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.DatabaseEncryption.OperationError; - - /** - * Creates a plain object from an OperationError message. Also converts values to other types if specified. - * @param message OperationError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.DatabaseEncryption.OperationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ResourceUsageExportConfig. */ - interface IResourceUsageExportConfig { - - /** ResourceUsageExportConfig bigqueryDestination */ - bigqueryDestination?: (google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null); - - /** ResourceUsageExportConfig enableNetworkEgressMetering */ - enableNetworkEgressMetering?: (boolean|null); - - /** ResourceUsageExportConfig consumptionMeteringConfig */ - consumptionMeteringConfig?: (google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); - } - - /** Represents a ResourceUsageExportConfig. */ - class ResourceUsageExportConfig implements IResourceUsageExportConfig { - - /** - * Constructs a new ResourceUsageExportConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IResourceUsageExportConfig); - - /** ResourceUsageExportConfig bigqueryDestination. */ - public bigqueryDestination?: (google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null); - - /** ResourceUsageExportConfig enableNetworkEgressMetering. */ - public enableNetworkEgressMetering: boolean; - - /** ResourceUsageExportConfig consumptionMeteringConfig. */ - public consumptionMeteringConfig?: (google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null); - - /** - * Creates a new ResourceUsageExportConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceUsageExportConfig instance - */ - public static create(properties?: google.container.v1beta1.IResourceUsageExportConfig): google.container.v1beta1.ResourceUsageExportConfig; - - /** - * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. - * @param message ResourceUsageExportConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. - * @param message ResourceUsageExportConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IResourceUsageExportConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig; - - /** - * Verifies a ResourceUsageExportConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceUsageExportConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig; - - /** - * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. - * @param message ResourceUsageExportConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceUsageExportConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceUsageExportConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceUsageExportConfig { - - /** Properties of a BigQueryDestination. */ - interface IBigQueryDestination { - - /** BigQueryDestination datasetId */ - datasetId?: (string|null); - } - - /** Represents a BigQueryDestination. */ - class BigQueryDestination implements IBigQueryDestination { - - /** - * Constructs a new BigQueryDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination); - - /** BigQueryDestination datasetId. */ - public datasetId: string; - - /** - * Creates a new BigQueryDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDestination instance - */ - public static create(properties?: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Verifies a BigQueryDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDestination - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination; - - /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @param message BigQueryDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConsumptionMeteringConfig. */ - interface IConsumptionMeteringConfig { - - /** ConsumptionMeteringConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConsumptionMeteringConfig. */ - class ConsumptionMeteringConfig implements IConsumptionMeteringConfig { - - /** - * Constructs a new ConsumptionMeteringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig); - - /** ConsumptionMeteringConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new ConsumptionMeteringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConsumptionMeteringConfig instance - */ - public static create(properties?: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @param message ConsumptionMeteringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @param message ConsumptionMeteringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Verifies a ConsumptionMeteringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsumptionMeteringConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig; - - /** - * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. - * @param message ConsumptionMeteringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsumptionMeteringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConsumptionMeteringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ShieldedNodes. */ - interface IShieldedNodes { - - /** ShieldedNodes enabled */ - enabled?: (boolean|null); - } - - /** Represents a ShieldedNodes. */ - class ShieldedNodes implements IShieldedNodes { - - /** - * Constructs a new ShieldedNodes. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IShieldedNodes); - - /** ShieldedNodes enabled. */ - public enabled: boolean; - - /** - * Creates a new ShieldedNodes instance using the specified properties. - * @param [properties] Properties to set - * @returns ShieldedNodes instance - */ - public static create(properties?: google.container.v1beta1.IShieldedNodes): google.container.v1beta1.ShieldedNodes; - - /** - * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. - * @param message ShieldedNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. - * @param message ShieldedNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IShieldedNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ShieldedNodes; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ShieldedNodes; - - /** - * Verifies a ShieldedNodes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShieldedNodes - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ShieldedNodes; - - /** - * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. - * @param message ShieldedNodes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ShieldedNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShieldedNodes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShieldedNodes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VirtualNIC. */ - interface IVirtualNIC { - - /** VirtualNIC enabled */ - enabled?: (boolean|null); - } - - /** Represents a VirtualNIC. */ - class VirtualNIC implements IVirtualNIC { - - /** - * Constructs a new VirtualNIC. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IVirtualNIC); - - /** VirtualNIC enabled. */ - public enabled: boolean; - - /** - * Creates a new VirtualNIC instance using the specified properties. - * @param [properties] Properties to set - * @returns VirtualNIC instance - */ - public static create(properties?: google.container.v1beta1.IVirtualNIC): google.container.v1beta1.VirtualNIC; - - /** - * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. - * @param message VirtualNIC message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. - * @param message VirtualNIC message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IVirtualNIC, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.VirtualNIC; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.VirtualNIC; - - /** - * Verifies a VirtualNIC message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VirtualNIC - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.VirtualNIC; - - /** - * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. - * @param message VirtualNIC - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.VirtualNIC, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VirtualNIC to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VirtualNIC - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FastSocket. */ - interface IFastSocket { - - /** FastSocket enabled */ - enabled?: (boolean|null); - } - - /** Represents a FastSocket. */ - class FastSocket implements IFastSocket { - - /** - * Constructs a new FastSocket. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IFastSocket); - - /** FastSocket enabled. */ - public enabled: boolean; - - /** - * Creates a new FastSocket instance using the specified properties. - * @param [properties] Properties to set - * @returns FastSocket instance - */ - public static create(properties?: google.container.v1beta1.IFastSocket): google.container.v1beta1.FastSocket; - - /** - * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. - * @param message FastSocket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. - * @param message FastSocket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IFastSocket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FastSocket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.FastSocket; - - /** - * Decodes a FastSocket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.FastSocket; - - /** - * Verifies a FastSocket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FastSocket - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.FastSocket; - - /** - * Creates a plain object from a FastSocket message. Also converts values to other types if specified. - * @param message FastSocket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.FastSocket, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FastSocket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FastSocket - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOpenIDConfigRequest. */ - interface IGetOpenIDConfigRequest { - - /** GetOpenIDConfigRequest parent */ - parent?: (string|null); - } - - /** Represents a GetOpenIDConfigRequest. */ - class GetOpenIDConfigRequest implements IGetOpenIDConfigRequest { - - /** - * Constructs a new GetOpenIDConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetOpenIDConfigRequest); - - /** GetOpenIDConfigRequest parent. */ - public parent: string; - - /** - * Creates a new GetOpenIDConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOpenIDConfigRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetOpenIDConfigRequest): google.container.v1beta1.GetOpenIDConfigRequest; - - /** - * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. - * @param message GetOpenIDConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. - * @param message GetOpenIDConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOpenIDConfigRequest; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOpenIDConfigRequest; - - /** - * Verifies a GetOpenIDConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOpenIDConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOpenIDConfigRequest; - - /** - * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. - * @param message GetOpenIDConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetOpenIDConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOpenIDConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOpenIDConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOpenIDConfigResponse. */ - interface IGetOpenIDConfigResponse { - - /** GetOpenIDConfigResponse issuer */ - issuer?: (string|null); - - /** GetOpenIDConfigResponse jwksUri */ - jwksUri?: (string|null); - - /** GetOpenIDConfigResponse responseTypesSupported */ - responseTypesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse subjectTypesSupported */ - subjectTypesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported */ - idTokenSigningAlgValuesSupported?: (string[]|null); - - /** GetOpenIDConfigResponse claimsSupported */ - claimsSupported?: (string[]|null); - - /** GetOpenIDConfigResponse grantTypes */ - grantTypes?: (string[]|null); - } - - /** Represents a GetOpenIDConfigResponse. */ - class GetOpenIDConfigResponse implements IGetOpenIDConfigResponse { - - /** - * Constructs a new GetOpenIDConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetOpenIDConfigResponse); - - /** GetOpenIDConfigResponse issuer. */ - public issuer: string; - - /** GetOpenIDConfigResponse jwksUri. */ - public jwksUri: string; - - /** GetOpenIDConfigResponse responseTypesSupported. */ - public responseTypesSupported: string[]; - - /** GetOpenIDConfigResponse subjectTypesSupported. */ - public subjectTypesSupported: string[]; - - /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. */ - public idTokenSigningAlgValuesSupported: string[]; - - /** GetOpenIDConfigResponse claimsSupported. */ - public claimsSupported: string[]; - - /** GetOpenIDConfigResponse grantTypes. */ - public grantTypes: string[]; - - /** - * Creates a new GetOpenIDConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOpenIDConfigResponse instance - */ - public static create(properties?: google.container.v1beta1.IGetOpenIDConfigResponse): google.container.v1beta1.GetOpenIDConfigResponse; - - /** - * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. - * @param message GetOpenIDConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. - * @param message GetOpenIDConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetOpenIDConfigResponse; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetOpenIDConfigResponse; - - /** - * Verifies a GetOpenIDConfigResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOpenIDConfigResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetOpenIDConfigResponse; - - /** - * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. - * @param message GetOpenIDConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetOpenIDConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOpenIDConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOpenIDConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJSONWebKeysRequest. */ - interface IGetJSONWebKeysRequest { - - /** GetJSONWebKeysRequest parent */ - parent?: (string|null); - } - - /** Represents a GetJSONWebKeysRequest. */ - class GetJSONWebKeysRequest implements IGetJSONWebKeysRequest { - - /** - * Constructs a new GetJSONWebKeysRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetJSONWebKeysRequest); - - /** GetJSONWebKeysRequest parent. */ - public parent: string; - - /** - * Creates a new GetJSONWebKeysRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJSONWebKeysRequest instance - */ - public static create(properties?: google.container.v1beta1.IGetJSONWebKeysRequest): google.container.v1beta1.GetJSONWebKeysRequest; - - /** - * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. - * @param message GetJSONWebKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. - * @param message GetJSONWebKeysRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetJSONWebKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetJSONWebKeysRequest; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetJSONWebKeysRequest; - - /** - * Verifies a GetJSONWebKeysRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJSONWebKeysRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetJSONWebKeysRequest; - - /** - * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. - * @param message GetJSONWebKeysRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetJSONWebKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJSONWebKeysRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetJSONWebKeysRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Jwk. */ - interface IJwk { - - /** Jwk kty */ - kty?: (string|null); - - /** Jwk alg */ - alg?: (string|null); - - /** Jwk use */ - use?: (string|null); - - /** Jwk kid */ - kid?: (string|null); - - /** Jwk n */ - n?: (string|null); - - /** Jwk e */ - e?: (string|null); - - /** Jwk x */ - x?: (string|null); - - /** Jwk y */ - y?: (string|null); - - /** Jwk crv */ - crv?: (string|null); - } - - /** Represents a Jwk. */ - class Jwk implements IJwk { - - /** - * Constructs a new Jwk. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IJwk); - - /** Jwk kty. */ - public kty: string; - - /** Jwk alg. */ - public alg: string; - - /** Jwk use. */ - public use: string; - - /** Jwk kid. */ - public kid: string; - - /** Jwk n. */ - public n: string; - - /** Jwk e. */ - public e: string; - - /** Jwk x. */ - public x: string; - - /** Jwk y. */ - public y: string; - - /** Jwk crv. */ - public crv: string; - - /** - * Creates a new Jwk instance using the specified properties. - * @param [properties] Properties to set - * @returns Jwk instance - */ - public static create(properties?: google.container.v1beta1.IJwk): google.container.v1beta1.Jwk; - - /** - * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. - * @param message Jwk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. - * @param message Jwk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IJwk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Jwk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Jwk; - - /** - * Decodes a Jwk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Jwk; - - /** - * Verifies a Jwk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Jwk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Jwk - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Jwk; - - /** - * Creates a plain object from a Jwk message. Also converts values to other types if specified. - * @param message Jwk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Jwk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Jwk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Jwk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJSONWebKeysResponse. */ - interface IGetJSONWebKeysResponse { - - /** GetJSONWebKeysResponse keys */ - keys?: (google.container.v1beta1.IJwk[]|null); - } - - /** Represents a GetJSONWebKeysResponse. */ - class GetJSONWebKeysResponse implements IGetJSONWebKeysResponse { - - /** - * Constructs a new GetJSONWebKeysResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IGetJSONWebKeysResponse); - - /** GetJSONWebKeysResponse keys. */ - public keys: google.container.v1beta1.IJwk[]; - - /** - * Creates a new GetJSONWebKeysResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJSONWebKeysResponse instance - */ - public static create(properties?: google.container.v1beta1.IGetJSONWebKeysResponse): google.container.v1beta1.GetJSONWebKeysResponse; - - /** - * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. - * @param message GetJSONWebKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. - * @param message GetJSONWebKeysResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IGetJSONWebKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.GetJSONWebKeysResponse; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.GetJSONWebKeysResponse; - - /** - * Verifies a GetJSONWebKeysResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJSONWebKeysResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GetJSONWebKeysResponse; - - /** - * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. - * @param message GetJSONWebKeysResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.GetJSONWebKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJSONWebKeysResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetJSONWebKeysResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CheckAutopilotCompatibilityRequest. */ - interface ICheckAutopilotCompatibilityRequest { - - /** CheckAutopilotCompatibilityRequest name */ - name?: (string|null); - } - - /** Represents a CheckAutopilotCompatibilityRequest. */ - class CheckAutopilotCompatibilityRequest implements ICheckAutopilotCompatibilityRequest { - - /** - * Constructs a new CheckAutopilotCompatibilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityRequest); - - /** CheckAutopilotCompatibilityRequest name. */ - public name: string; - - /** - * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckAutopilotCompatibilityRequest instance - */ - public static create(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityRequest): google.container.v1beta1.CheckAutopilotCompatibilityRequest; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @param message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @param message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICheckAutopilotCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CheckAutopilotCompatibilityRequest; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CheckAutopilotCompatibilityRequest; - - /** - * Verifies a CheckAutopilotCompatibilityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckAutopilotCompatibilityRequest - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CheckAutopilotCompatibilityRequest; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. - * @param message CheckAutopilotCompatibilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CheckAutopilotCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckAutopilotCompatibilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutopilotCompatibilityIssue. */ - interface IAutopilotCompatibilityIssue { - - /** AutopilotCompatibilityIssue lastObservation */ - lastObservation?: (google.protobuf.ITimestamp|null); - - /** AutopilotCompatibilityIssue constraintType */ - constraintType?: (string|null); - - /** AutopilotCompatibilityIssue incompatibilityType */ - incompatibilityType?: (google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|null); - - /** AutopilotCompatibilityIssue subjects */ - subjects?: (string[]|null); - - /** AutopilotCompatibilityIssue documentationUrl */ - documentationUrl?: (string|null); - - /** AutopilotCompatibilityIssue description */ - description?: (string|null); - } - - /** Represents an AutopilotCompatibilityIssue. */ - class AutopilotCompatibilityIssue implements IAutopilotCompatibilityIssue { - - /** - * Constructs a new AutopilotCompatibilityIssue. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAutopilotCompatibilityIssue); - - /** AutopilotCompatibilityIssue lastObservation. */ - public lastObservation?: (google.protobuf.ITimestamp|null); - - /** AutopilotCompatibilityIssue constraintType. */ - public constraintType: string; - - /** AutopilotCompatibilityIssue incompatibilityType. */ - public incompatibilityType: (google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|keyof typeof google.container.v1beta1.AutopilotCompatibilityIssue.IssueType); - - /** AutopilotCompatibilityIssue subjects. */ - public subjects: string[]; - - /** AutopilotCompatibilityIssue documentationUrl. */ - public documentationUrl: string; - - /** AutopilotCompatibilityIssue description. */ - public description: string; - - /** - * Creates a new AutopilotCompatibilityIssue instance using the specified properties. - * @param [properties] Properties to set - * @returns AutopilotCompatibilityIssue instance - */ - public static create(properties?: google.container.v1beta1.IAutopilotCompatibilityIssue): google.container.v1beta1.AutopilotCompatibilityIssue; - - /** - * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. - * @param message AutopilotCompatibilityIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. - * @param message AutopilotCompatibilityIssue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAutopilotCompatibilityIssue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutopilotCompatibilityIssue; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutopilotCompatibilityIssue; - - /** - * Verifies an AutopilotCompatibilityIssue message. - * @param message Plain 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 AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutopilotCompatibilityIssue - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutopilotCompatibilityIssue; - - /** - * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. - * @param message AutopilotCompatibilityIssue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AutopilotCompatibilityIssue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutopilotCompatibilityIssue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutopilotCompatibilityIssue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AutopilotCompatibilityIssue { - - /** IssueType enum. */ - enum IssueType { - UNSPECIFIED = 0, - INCOMPATIBILITY = 1, - ADDITIONAL_CONFIG_REQUIRED = 2, - PASSED_WITH_OPTIONAL_CONFIG = 3 - } - } - - /** Properties of a CheckAutopilotCompatibilityResponse. */ - interface ICheckAutopilotCompatibilityResponse { - - /** CheckAutopilotCompatibilityResponse issues */ - issues?: (google.container.v1beta1.IAutopilotCompatibilityIssue[]|null); - - /** CheckAutopilotCompatibilityResponse summary */ - summary?: (string|null); - } - - /** Represents a CheckAutopilotCompatibilityResponse. */ - class CheckAutopilotCompatibilityResponse implements ICheckAutopilotCompatibilityResponse { - - /** - * Constructs a new CheckAutopilotCompatibilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityResponse); - - /** CheckAutopilotCompatibilityResponse issues. */ - public issues: google.container.v1beta1.IAutopilotCompatibilityIssue[]; - - /** CheckAutopilotCompatibilityResponse summary. */ - public summary: string; - - /** - * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckAutopilotCompatibilityResponse instance - */ - public static create(properties?: google.container.v1beta1.ICheckAutopilotCompatibilityResponse): google.container.v1beta1.CheckAutopilotCompatibilityResponse; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @param message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @param message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICheckAutopilotCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CheckAutopilotCompatibilityResponse; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CheckAutopilotCompatibilityResponse; - - /** - * Verifies a CheckAutopilotCompatibilityResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckAutopilotCompatibilityResponse - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CheckAutopilotCompatibilityResponse; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. - * @param message CheckAutopilotCompatibilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CheckAutopilotCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckAutopilotCompatibilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReleaseChannel. */ - interface IReleaseChannel { - - /** ReleaseChannel channel */ - channel?: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel|null); - } - - /** Represents a ReleaseChannel. */ - class ReleaseChannel implements IReleaseChannel { - - /** - * Constructs a new ReleaseChannel. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IReleaseChannel); - - /** ReleaseChannel channel. */ - public channel: (google.container.v1beta1.ReleaseChannel.Channel|keyof typeof google.container.v1beta1.ReleaseChannel.Channel); - - /** - * Creates a new ReleaseChannel instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseChannel instance - */ - public static create(properties?: google.container.v1beta1.IReleaseChannel): google.container.v1beta1.ReleaseChannel; - - /** - * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. - * @param message ReleaseChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. - * @param message ReleaseChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IReleaseChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ReleaseChannel; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ReleaseChannel; - - /** - * Verifies a ReleaseChannel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseChannel - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ReleaseChannel; - - /** - * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. - * @param message ReleaseChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ReleaseChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseChannel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReleaseChannel - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReleaseChannel { - - /** Channel enum. */ - enum Channel { - UNSPECIFIED = 0, - RAPID = 1, - REGULAR = 2, - STABLE = 3, - EXTENDED = 4 - } - } - - /** Properties of a CostManagementConfig. */ - interface ICostManagementConfig { - - /** CostManagementConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a CostManagementConfig. */ - class CostManagementConfig implements ICostManagementConfig { - - /** - * Constructs a new CostManagementConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ICostManagementConfig); - - /** CostManagementConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new CostManagementConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CostManagementConfig instance - */ - public static create(properties?: google.container.v1beta1.ICostManagementConfig): google.container.v1beta1.CostManagementConfig; - - /** - * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. - * @param message CostManagementConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. - * @param message CostManagementConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ICostManagementConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.CostManagementConfig; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.CostManagementConfig; - - /** - * Verifies a CostManagementConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CostManagementConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.CostManagementConfig; - - /** - * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. - * @param message CostManagementConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.CostManagementConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CostManagementConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CostManagementConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TpuConfig. */ - interface ITpuConfig { - - /** TpuConfig enabled */ - enabled?: (boolean|null); - - /** TpuConfig useServiceNetworking */ - useServiceNetworking?: (boolean|null); - - /** TpuConfig ipv4CidrBlock */ - ipv4CidrBlock?: (string|null); - } - - /** Represents a TpuConfig. */ - class TpuConfig implements ITpuConfig { - - /** - * Constructs a new TpuConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ITpuConfig); - - /** TpuConfig enabled. */ - public enabled: boolean; - - /** TpuConfig useServiceNetworking. */ - public useServiceNetworking: boolean; - - /** TpuConfig ipv4CidrBlock. */ - public ipv4CidrBlock: string; - - /** - * Creates a new TpuConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TpuConfig instance - */ - public static create(properties?: google.container.v1beta1.ITpuConfig): google.container.v1beta1.TpuConfig; - - /** - * Encodes the specified TpuConfig message. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. - * @param message TpuConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ITpuConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TpuConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. - * @param message TpuConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ITpuConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TpuConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TpuConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.TpuConfig; - - /** - * Decodes a TpuConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TpuConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.TpuConfig; - - /** - * Verifies a TpuConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TpuConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TpuConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.TpuConfig; - - /** - * Creates a plain object from a TpuConfig message. Also converts values to other types if specified. - * @param message TpuConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.TpuConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TpuConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TpuConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PrivateIPv6GoogleAccess enum. */ - enum PrivateIPv6GoogleAccess { - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED = 1, - PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2, - PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3 - } - - /** Properties of a Master. */ - interface IMaster { - } - - /** Represents a Master. */ - class Master implements IMaster { - - /** - * Constructs a new Master. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMaster); - - /** - * Creates a new Master instance using the specified properties. - * @param [properties] Properties to set - * @returns Master instance - */ - public static create(properties?: google.container.v1beta1.IMaster): google.container.v1beta1.Master; - - /** - * Encodes the specified Master message. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. - * @param message Master message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMaster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Master message, length delimited. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. - * @param message Master message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMaster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Master message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Master - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Master; - - /** - * Decodes a Master message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Master - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Master; - - /** - * Verifies a Master message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Master message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Master - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Master; - - /** - * Creates a plain object from a Master message. Also converts values to other types if specified. - * @param message Master - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Master, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Master to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Master - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutopilotConversionStatus. */ - interface IAutopilotConversionStatus { - - /** AutopilotConversionStatus state */ - state?: (google.container.v1beta1.AutopilotConversionStatus.State|keyof typeof google.container.v1beta1.AutopilotConversionStatus.State|null); - } - - /** Represents an AutopilotConversionStatus. */ - class AutopilotConversionStatus implements IAutopilotConversionStatus { - - /** - * Constructs a new AutopilotConversionStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAutopilotConversionStatus); - - /** AutopilotConversionStatus state. */ - public state: (google.container.v1beta1.AutopilotConversionStatus.State|keyof typeof google.container.v1beta1.AutopilotConversionStatus.State); - - /** - * Creates a new AutopilotConversionStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns AutopilotConversionStatus instance - */ - public static create(properties?: google.container.v1beta1.IAutopilotConversionStatus): google.container.v1beta1.AutopilotConversionStatus; - - /** - * Encodes the specified AutopilotConversionStatus message. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. - * @param message AutopilotConversionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAutopilotConversionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutopilotConversionStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. - * @param message AutopilotConversionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAutopilotConversionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutopilotConversionStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutopilotConversionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AutopilotConversionStatus; - - /** - * Decodes an AutopilotConversionStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutopilotConversionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AutopilotConversionStatus; - - /** - * Verifies an AutopilotConversionStatus message. - * @param message Plain 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 AutopilotConversionStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutopilotConversionStatus - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AutopilotConversionStatus; - - /** - * Creates a plain object from an AutopilotConversionStatus message. Also converts values to other types if specified. - * @param message AutopilotConversionStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AutopilotConversionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutopilotConversionStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutopilotConversionStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AutopilotConversionStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - DONE = 5 - } - } - - /** Properties of an Autopilot. */ - interface IAutopilot { - - /** Autopilot enabled */ - enabled?: (boolean|null); - - /** Autopilot workloadPolicyConfig */ - workloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); - - /** Autopilot conversionStatus */ - conversionStatus?: (google.container.v1beta1.IAutopilotConversionStatus|null); - } - - /** Represents an Autopilot. */ - class Autopilot implements IAutopilot { - - /** - * Constructs a new Autopilot. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAutopilot); - - /** Autopilot enabled. */ - public enabled: boolean; - - /** Autopilot workloadPolicyConfig. */ - public workloadPolicyConfig?: (google.container.v1beta1.IWorkloadPolicyConfig|null); - - /** Autopilot conversionStatus. */ - public conversionStatus?: (google.container.v1beta1.IAutopilotConversionStatus|null); - - /** - * Creates a new Autopilot instance using the specified properties. - * @param [properties] Properties to set - * @returns Autopilot instance - */ - public static create(properties?: google.container.v1beta1.IAutopilot): google.container.v1beta1.Autopilot; - - /** - * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. - * @param message Autopilot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. - * @param message Autopilot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAutopilot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Autopilot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.Autopilot; - - /** - * Decodes an Autopilot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.Autopilot; - - /** - * Verifies an Autopilot message. - * @param message Plain 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 Autopilot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Autopilot - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.Autopilot; - - /** - * Creates a plain object from an Autopilot message. Also converts values to other types if specified. - * @param message Autopilot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.Autopilot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Autopilot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Autopilot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadPolicyConfig. */ - interface IWorkloadPolicyConfig { - - /** WorkloadPolicyConfig allowNetAdmin */ - allowNetAdmin?: (boolean|null); - } - - /** Represents a WorkloadPolicyConfig. */ - class WorkloadPolicyConfig implements IWorkloadPolicyConfig { - - /** - * Constructs a new WorkloadPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IWorkloadPolicyConfig); - - /** WorkloadPolicyConfig allowNetAdmin. */ - public allowNetAdmin?: (boolean|null); - - /** WorkloadPolicyConfig _allowNetAdmin. */ - public _allowNetAdmin?: "allowNetAdmin"; - - /** - * Creates a new WorkloadPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadPolicyConfig instance - */ - public static create(properties?: google.container.v1beta1.IWorkloadPolicyConfig): google.container.v1beta1.WorkloadPolicyConfig; - - /** - * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. - * @param message WorkloadPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. - * @param message WorkloadPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IWorkloadPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.WorkloadPolicyConfig; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.WorkloadPolicyConfig; - - /** - * Verifies a WorkloadPolicyConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.WorkloadPolicyConfig; - - /** - * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. - * @param message WorkloadPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.WorkloadPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NotificationConfig. */ - interface INotificationConfig { - - /** NotificationConfig pubsub */ - pubsub?: (google.container.v1beta1.NotificationConfig.IPubSub|null); - } - - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { - - /** - * Constructs a new NotificationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INotificationConfig); - - /** NotificationConfig pubsub. */ - public pubsub?: (google.container.v1beta1.NotificationConfig.IPubSub|null); - - /** - * Creates a new NotificationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NotificationConfig instance - */ - public static create(properties?: google.container.v1beta1.INotificationConfig): google.container.v1beta1.NotificationConfig; - - /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig; - - /** - * Verifies a NotificationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotificationConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig; - - /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotificationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotificationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NotificationConfig { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - UPGRADE_AVAILABLE_EVENT = 1, - UPGRADE_EVENT = 2, - SECURITY_BULLETIN_EVENT = 3 - } - - /** Properties of a PubSub. */ - interface IPubSub { - - /** PubSub enabled */ - enabled?: (boolean|null); - - /** PubSub topic */ - topic?: (string|null); - - /** PubSub filter */ - filter?: (google.container.v1beta1.NotificationConfig.IFilter|null); - } - - /** Represents a PubSub. */ - class PubSub implements IPubSub { - - /** - * Constructs a new PubSub. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NotificationConfig.IPubSub); - - /** PubSub enabled. */ - public enabled: boolean; - - /** PubSub topic. */ - public topic: string; - - /** PubSub filter. */ - public filter?: (google.container.v1beta1.NotificationConfig.IFilter|null); - - /** - * Creates a new PubSub instance using the specified properties. - * @param [properties] Properties to set - * @returns PubSub instance - */ - public static create(properties?: google.container.v1beta1.NotificationConfig.IPubSub): google.container.v1beta1.NotificationConfig.PubSub; - - /** - * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. - * @param message PubSub message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. - * @param message PubSub message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NotificationConfig.IPubSub, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubSub message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig.PubSub; - - /** - * Decodes a PubSub message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig.PubSub; - - /** - * Verifies a PubSub message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubSub message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubSub - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig.PubSub; - - /** - * Creates a plain object from a PubSub message. Also converts values to other types if specified. - * @param message PubSub - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NotificationConfig.PubSub, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubSub to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubSub - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter eventType */ - eventType?: (google.container.v1beta1.NotificationConfig.EventType[]|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.NotificationConfig.IFilter); - - /** Filter eventType. */ - public eventType: google.container.v1beta1.NotificationConfig.EventType[]; - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.container.v1beta1.NotificationConfig.IFilter): google.container.v1beta1.NotificationConfig.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.NotificationConfig.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NotificationConfig.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NotificationConfig.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NotificationConfig.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NotificationConfig.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ConfidentialNodes. */ - interface IConfidentialNodes { - - /** ConfidentialNodes enabled */ - enabled?: (boolean|null); - } - - /** Represents a ConfidentialNodes. */ - class ConfidentialNodes implements IConfidentialNodes { - - /** - * Constructs a new ConfidentialNodes. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IConfidentialNodes); - - /** ConfidentialNodes enabled. */ - public enabled: boolean; - - /** - * Creates a new ConfidentialNodes instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidentialNodes instance - */ - public static create(properties?: google.container.v1beta1.IConfidentialNodes): google.container.v1beta1.ConfidentialNodes; - - /** - * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. - * @param message ConfidentialNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. - * @param message ConfidentialNodes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IConfidentialNodes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ConfidentialNodes; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ConfidentialNodes; - - /** - * Verifies a ConfidentialNodes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidentialNodes - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ConfidentialNodes; - - /** - * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. - * @param message ConfidentialNodes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ConfidentialNodes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidentialNodes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidentialNodes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UpgradeResourceType enum. */ - enum UpgradeResourceType { - UPGRADE_RESOURCE_TYPE_UNSPECIFIED = 0, - MASTER = 1, - NODE_POOL = 2 - } - - /** Properties of an UpgradeEvent. */ - interface IUpgradeEvent { - - /** UpgradeEvent resourceType */ - resourceType?: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType|null); - - /** UpgradeEvent operation */ - operation?: (string|null); - - /** UpgradeEvent operationStartTime */ - operationStartTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeEvent currentVersion */ - currentVersion?: (string|null); - - /** UpgradeEvent targetVersion */ - targetVersion?: (string|null); - - /** UpgradeEvent resource */ - resource?: (string|null); - } - - /** Represents an UpgradeEvent. */ - class UpgradeEvent implements IUpgradeEvent { - - /** - * Constructs a new UpgradeEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUpgradeEvent); - - /** UpgradeEvent resourceType. */ - public resourceType: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType); - - /** UpgradeEvent operation. */ - public operation: string; - - /** UpgradeEvent operationStartTime. */ - public operationStartTime?: (google.protobuf.ITimestamp|null); - - /** UpgradeEvent currentVersion. */ - public currentVersion: string; - - /** UpgradeEvent targetVersion. */ - public targetVersion: string; - - /** UpgradeEvent resource. */ - public resource: string; - - /** - * Creates a new UpgradeEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeEvent instance - */ - public static create(properties?: google.container.v1beta1.IUpgradeEvent): google.container.v1beta1.UpgradeEvent; - - /** - * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. - * @param message UpgradeEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. - * @param message UpgradeEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUpgradeEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpgradeEvent; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpgradeEvent; - - /** - * Verifies an UpgradeEvent message. - * @param message Plain 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 UpgradeEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpgradeEvent; - - /** - * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. - * @param message UpgradeEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UpgradeEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpgradeAvailableEvent. */ - interface IUpgradeAvailableEvent { - - /** UpgradeAvailableEvent version */ - version?: (string|null); - - /** UpgradeAvailableEvent resourceType */ - resourceType?: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType|null); - - /** UpgradeAvailableEvent releaseChannel */ - releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** UpgradeAvailableEvent resource */ - resource?: (string|null); - - /** UpgradeAvailableEvent windowsVersions */ - windowsVersions?: (google.container.v1beta1.IWindowsVersions|null); - } - - /** Represents an UpgradeAvailableEvent. */ - class UpgradeAvailableEvent implements IUpgradeAvailableEvent { - - /** - * Constructs a new UpgradeAvailableEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IUpgradeAvailableEvent); - - /** UpgradeAvailableEvent version. */ - public version: string; - - /** UpgradeAvailableEvent resourceType. */ - public resourceType: (google.container.v1beta1.UpgradeResourceType|keyof typeof google.container.v1beta1.UpgradeResourceType); - - /** UpgradeAvailableEvent releaseChannel. */ - public releaseChannel?: (google.container.v1beta1.IReleaseChannel|null); - - /** UpgradeAvailableEvent resource. */ - public resource: string; - - /** UpgradeAvailableEvent windowsVersions. */ - public windowsVersions?: (google.container.v1beta1.IWindowsVersions|null); - - /** - * Creates a new UpgradeAvailableEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns UpgradeAvailableEvent instance - */ - public static create(properties?: google.container.v1beta1.IUpgradeAvailableEvent): google.container.v1beta1.UpgradeAvailableEvent; - - /** - * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. - * @param message UpgradeAvailableEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. - * @param message UpgradeAvailableEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IUpgradeAvailableEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.UpgradeAvailableEvent; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.UpgradeAvailableEvent; - - /** - * Verifies an UpgradeAvailableEvent message. - * @param message Plain 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 UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeAvailableEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.UpgradeAvailableEvent; - - /** - * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. - * @param message UpgradeAvailableEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.UpgradeAvailableEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeAvailableEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpgradeAvailableEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecurityBulletinEvent. */ - interface ISecurityBulletinEvent { - - /** SecurityBulletinEvent resourceTypeAffected */ - resourceTypeAffected?: (string|null); - - /** SecurityBulletinEvent bulletinId */ - bulletinId?: (string|null); - - /** SecurityBulletinEvent cveIds */ - cveIds?: (string[]|null); - - /** SecurityBulletinEvent severity */ - severity?: (string|null); - - /** SecurityBulletinEvent bulletinUri */ - bulletinUri?: (string|null); - - /** SecurityBulletinEvent briefDescription */ - briefDescription?: (string|null); - - /** SecurityBulletinEvent affectedSupportedMinors */ - affectedSupportedMinors?: (string[]|null); - - /** SecurityBulletinEvent patchedVersions */ - patchedVersions?: (string[]|null); - - /** SecurityBulletinEvent suggestedUpgradeTarget */ - suggestedUpgradeTarget?: (string|null); - - /** SecurityBulletinEvent manualStepsRequired */ - manualStepsRequired?: (boolean|null); - } - - /** Represents a SecurityBulletinEvent. */ - class SecurityBulletinEvent implements ISecurityBulletinEvent { - - /** - * Constructs a new SecurityBulletinEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISecurityBulletinEvent); - - /** SecurityBulletinEvent resourceTypeAffected. */ - public resourceTypeAffected: string; - - /** SecurityBulletinEvent bulletinId. */ - public bulletinId: string; - - /** SecurityBulletinEvent cveIds. */ - public cveIds: string[]; - - /** SecurityBulletinEvent severity. */ - public severity: string; - - /** SecurityBulletinEvent bulletinUri. */ - public bulletinUri: string; - - /** SecurityBulletinEvent briefDescription. */ - public briefDescription: string; - - /** SecurityBulletinEvent affectedSupportedMinors. */ - public affectedSupportedMinors: string[]; - - /** SecurityBulletinEvent patchedVersions. */ - public patchedVersions: string[]; - - /** SecurityBulletinEvent suggestedUpgradeTarget. */ - public suggestedUpgradeTarget: string; - - /** SecurityBulletinEvent manualStepsRequired. */ - public manualStepsRequired: boolean; - - /** - * Creates a new SecurityBulletinEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityBulletinEvent instance - */ - public static create(properties?: google.container.v1beta1.ISecurityBulletinEvent): google.container.v1beta1.SecurityBulletinEvent; - - /** - * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. - * @param message SecurityBulletinEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. - * @param message SecurityBulletinEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISecurityBulletinEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecurityBulletinEvent; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecurityBulletinEvent; - - /** - * Verifies a SecurityBulletinEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityBulletinEvent - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecurityBulletinEvent; - - /** - * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. - * @param message SecurityBulletinEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SecurityBulletinEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityBulletinEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityBulletinEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IdentityServiceConfig. */ - interface IIdentityServiceConfig { - - /** IdentityServiceConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents an IdentityServiceConfig. */ - class IdentityServiceConfig implements IIdentityServiceConfig { - - /** - * Constructs a new IdentityServiceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IIdentityServiceConfig); - - /** IdentityServiceConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new IdentityServiceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns IdentityServiceConfig instance - */ - public static create(properties?: google.container.v1beta1.IIdentityServiceConfig): google.container.v1beta1.IdentityServiceConfig; - - /** - * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. - * @param message IdentityServiceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. - * @param message IdentityServiceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IIdentityServiceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.IdentityServiceConfig; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.IdentityServiceConfig; - - /** - * Verifies an IdentityServiceConfig message. - * @param message Plain 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 IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentityServiceConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.IdentityServiceConfig; - - /** - * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. - * @param message IdentityServiceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.IdentityServiceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentityServiceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IdentityServiceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NodePoolUpdateStrategy enum. */ - enum NodePoolUpdateStrategy { - NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED = 0, - BLUE_GREEN = 2, - SURGE = 3 - } - - /** Properties of a LoggingConfig. */ - interface ILoggingConfig { - - /** LoggingConfig componentConfig */ - componentConfig?: (google.container.v1beta1.ILoggingComponentConfig|null); - } - - /** Represents a LoggingConfig. */ - class LoggingConfig implements ILoggingConfig { - - /** - * Constructs a new LoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILoggingConfig); - - /** LoggingConfig componentConfig. */ - public componentConfig?: (google.container.v1beta1.ILoggingComponentConfig|null); - - /** - * Creates a new LoggingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LoggingConfig instance - */ - public static create(properties?: google.container.v1beta1.ILoggingConfig): google.container.v1beta1.LoggingConfig; - - /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.LoggingComponentConfig.Component[]|null); - } - - /** Represents a LoggingComponentConfig. */ - class LoggingComponentConfig implements ILoggingComponentConfig { - - /** - * Constructs a new LoggingComponentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILoggingComponentConfig); - - /** LoggingComponentConfig enableComponents. */ - public enableComponents: google.container.v1beta1.LoggingComponentConfig.Component[]; - - /** - * Creates a new LoggingComponentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LoggingComponentConfig instance - */ - public static create(properties?: google.container.v1beta1.ILoggingComponentConfig): google.container.v1beta1.LoggingComponentConfig; - - /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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, - APISERVER = 3, - SCHEDULER = 4, - CONTROLLER_MANAGER = 5 - } - } - - /** Properties of a RayClusterLoggingConfig. */ - interface IRayClusterLoggingConfig { - - /** RayClusterLoggingConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a RayClusterLoggingConfig. */ - class RayClusterLoggingConfig implements IRayClusterLoggingConfig { - - /** - * Constructs a new RayClusterLoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRayClusterLoggingConfig); - - /** RayClusterLoggingConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new RayClusterLoggingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayClusterLoggingConfig instance - */ - public static create(properties?: google.container.v1beta1.IRayClusterLoggingConfig): google.container.v1beta1.RayClusterLoggingConfig; - - /** - * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. - * @param message RayClusterLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. - * @param message RayClusterLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRayClusterLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayClusterLoggingConfig; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayClusterLoggingConfig; - - /** - * Verifies a RayClusterLoggingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayClusterLoggingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayClusterLoggingConfig; - - /** - * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. - * @param message RayClusterLoggingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RayClusterLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayClusterLoggingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayClusterLoggingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MonitoringConfig. */ - interface IMonitoringConfig { - - /** MonitoringConfig componentConfig */ - componentConfig?: (google.container.v1beta1.IMonitoringComponentConfig|null); - - /** MonitoringConfig managedPrometheusConfig */ - managedPrometheusConfig?: (google.container.v1beta1.IManagedPrometheusConfig|null); - - /** MonitoringConfig advancedDatapathObservabilityConfig */ - advancedDatapathObservabilityConfig?: (google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null); - } - - /** Represents a MonitoringConfig. */ - class MonitoringConfig implements IMonitoringConfig { - - /** - * Constructs a new MonitoringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMonitoringConfig); - - /** MonitoringConfig componentConfig. */ - public componentConfig?: (google.container.v1beta1.IMonitoringComponentConfig|null); - - /** MonitoringConfig managedPrometheusConfig. */ - public managedPrometheusConfig?: (google.container.v1beta1.IManagedPrometheusConfig|null); - - /** MonitoringConfig advancedDatapathObservabilityConfig. */ - public advancedDatapathObservabilityConfig?: (google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null); - - /** - * Creates a new MonitoringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoringConfig instance - */ - public static create(properties?: google.container.v1beta1.IMonitoringConfig): google.container.v1beta1.MonitoringConfig; - - /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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 an AdvancedDatapathObservabilityConfig. */ - interface IAdvancedDatapathObservabilityConfig { - - /** AdvancedDatapathObservabilityConfig enableMetrics */ - enableMetrics?: (boolean|null); - - /** AdvancedDatapathObservabilityConfig relayMode */ - relayMode?: (google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|null); - - /** AdvancedDatapathObservabilityConfig enableRelay */ - enableRelay?: (boolean|null); - } - - /** Represents an AdvancedDatapathObservabilityConfig. */ - class AdvancedDatapathObservabilityConfig implements IAdvancedDatapathObservabilityConfig { - - /** - * Constructs a new AdvancedDatapathObservabilityConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IAdvancedDatapathObservabilityConfig); - - /** AdvancedDatapathObservabilityConfig enableMetrics. */ - public enableMetrics: boolean; - - /** AdvancedDatapathObservabilityConfig relayMode. */ - public relayMode: (google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|keyof typeof google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode); - - /** AdvancedDatapathObservabilityConfig enableRelay. */ - public enableRelay?: (boolean|null); - - /** AdvancedDatapathObservabilityConfig _enableRelay. */ - public _enableRelay?: "enableRelay"; - - /** - * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedDatapathObservabilityConfig instance - */ - public static create(properties?: google.container.v1beta1.IAdvancedDatapathObservabilityConfig): google.container.v1beta1.AdvancedDatapathObservabilityConfig; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @param message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @param message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IAdvancedDatapathObservabilityConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.AdvancedDatapathObservabilityConfig; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.AdvancedDatapathObservabilityConfig; - - /** - * Verifies an AdvancedDatapathObservabilityConfig message. - * @param message Plain 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 AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedDatapathObservabilityConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.AdvancedDatapathObservabilityConfig; - - /** - * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. - * @param message AdvancedDatapathObservabilityConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.AdvancedDatapathObservabilityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedDatapathObservabilityConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedDatapathObservabilityConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AdvancedDatapathObservabilityConfig { - - /** RelayMode enum. */ - enum RelayMode { - RELAY_MODE_UNSPECIFIED = 0, - DISABLED = 1, - INTERNAL_VPC_LB = 3, - EXTERNAL_LB = 4 - } - } - - /** Properties of a RayClusterMonitoringConfig. */ - interface IRayClusterMonitoringConfig { - - /** RayClusterMonitoringConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a RayClusterMonitoringConfig. */ - class RayClusterMonitoringConfig implements IRayClusterMonitoringConfig { - - /** - * Constructs a new RayClusterMonitoringConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IRayClusterMonitoringConfig); - - /** RayClusterMonitoringConfig enabled. */ - public enabled: boolean; - - /** - * Creates a new RayClusterMonitoringConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RayClusterMonitoringConfig instance - */ - public static create(properties?: google.container.v1beta1.IRayClusterMonitoringConfig): google.container.v1beta1.RayClusterMonitoringConfig; - - /** - * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. - * @param message RayClusterMonitoringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. - * @param message RayClusterMonitoringConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IRayClusterMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.RayClusterMonitoringConfig; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.RayClusterMonitoringConfig; - - /** - * Verifies a RayClusterMonitoringConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RayClusterMonitoringConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.RayClusterMonitoringConfig; - - /** - * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. - * @param message RayClusterMonitoringConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.RayClusterMonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RayClusterMonitoringConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RayClusterMonitoringConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodePoolLoggingConfig. */ - interface INodePoolLoggingConfig { - - /** NodePoolLoggingConfig variantConfig */ - variantConfig?: (google.container.v1beta1.ILoggingVariantConfig|null); - } - - /** Represents a NodePoolLoggingConfig. */ - class NodePoolLoggingConfig implements INodePoolLoggingConfig { - - /** - * Constructs a new NodePoolLoggingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.INodePoolLoggingConfig); - - /** NodePoolLoggingConfig variantConfig. */ - public variantConfig?: (google.container.v1beta1.ILoggingVariantConfig|null); - - /** - * Creates a new NodePoolLoggingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePoolLoggingConfig instance - */ - public static create(properties?: google.container.v1beta1.INodePoolLoggingConfig): google.container.v1beta1.NodePoolLoggingConfig; - - /** - * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. - * @param message NodePoolLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. - * @param message NodePoolLoggingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.INodePoolLoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.NodePoolLoggingConfig; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.NodePoolLoggingConfig; - - /** - * Verifies a NodePoolLoggingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePoolLoggingConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.NodePoolLoggingConfig; - - /** - * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. - * @param message NodePoolLoggingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.NodePoolLoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodePoolLoggingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodePoolLoggingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoggingVariantConfig. */ - interface ILoggingVariantConfig { - - /** LoggingVariantConfig variant */ - variant?: (google.container.v1beta1.LoggingVariantConfig.Variant|keyof typeof google.container.v1beta1.LoggingVariantConfig.Variant|null); - } - - /** Represents a LoggingVariantConfig. */ - class LoggingVariantConfig implements ILoggingVariantConfig { - - /** - * Constructs a new LoggingVariantConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ILoggingVariantConfig); - - /** LoggingVariantConfig variant. */ - public variant: (google.container.v1beta1.LoggingVariantConfig.Variant|keyof typeof google.container.v1beta1.LoggingVariantConfig.Variant); - - /** - * Creates a new LoggingVariantConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LoggingVariantConfig instance - */ - public static create(properties?: google.container.v1beta1.ILoggingVariantConfig): google.container.v1beta1.LoggingVariantConfig; - - /** - * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. - * @param message LoggingVariantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. - * @param message LoggingVariantConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ILoggingVariantConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.LoggingVariantConfig; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.LoggingVariantConfig; - - /** - * Verifies a LoggingVariantConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoggingVariantConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.LoggingVariantConfig; - - /** - * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. - * @param message LoggingVariantConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.LoggingVariantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoggingVariantConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoggingVariantConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoggingVariantConfig { - - /** Variant enum. */ - enum Variant { - VARIANT_UNSPECIFIED = 0, - DEFAULT = 1, - MAX_THROUGHPUT = 2 - } - } - - /** Properties of a MonitoringComponentConfig. */ - interface IMonitoringComponentConfig { - - /** MonitoringComponentConfig enableComponents */ - enableComponents?: (google.container.v1beta1.MonitoringComponentConfig.Component[]|null); - } - - /** Represents a MonitoringComponentConfig. */ - class MonitoringComponentConfig implements IMonitoringComponentConfig { - - /** - * Constructs a new MonitoringComponentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IMonitoringComponentConfig); - - /** MonitoringComponentConfig enableComponents. */ - public enableComponents: google.container.v1beta1.MonitoringComponentConfig.Component[]; - - /** - * Creates a new MonitoringComponentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoringComponentConfig instance - */ - public static create(properties?: google.container.v1beta1.IMonitoringComponentConfig): google.container.v1beta1.MonitoringComponentConfig; - - /** - * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. - * @param message MonitoringComponentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. - * @param message MonitoringComponentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IMonitoringComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.MonitoringComponentConfig; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.MonitoringComponentConfig; - - /** - * Verifies a MonitoringComponentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoringComponentConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.MonitoringComponentConfig; - - /** - * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. - * @param message MonitoringComponentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.MonitoringComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonitoringComponentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MonitoringComponentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MonitoringComponentConfig { - - /** Component enum. */ - enum Component { - COMPONENT_UNSPECIFIED = 0, - SYSTEM_COMPONENTS = 1, - WORKLOADS = 2, - APISERVER = 3, - SCHEDULER = 4, - CONTROLLER_MANAGER = 5, - STORAGE = 7, - HPA = 8, - POD = 9, - DAEMONSET = 10, - DEPLOYMENT = 11, - STATEFULSET = 12, - CADVISOR = 13, - KUBELET = 14, - DCGM = 15 - } - } - - /** DatapathProvider enum. */ - enum DatapathProvider { - DATAPATH_PROVIDER_UNSPECIFIED = 0, - LEGACY_DATAPATH = 1, - ADVANCED_DATAPATH = 2 - } - - /** Properties of a Fleet. */ - interface IFleet { - - /** Fleet project */ - project?: (string|null); - - /** Fleet membership */ - membership?: (string|null); - - /** Fleet preRegistered */ - preRegistered?: (boolean|null); - } - - /** Represents a Fleet. */ - class Fleet implements IFleet { - - /** - * Constructs a new Fleet. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IFleet); - - /** Fleet project. */ - public project: string; - - /** Fleet membership. */ - public membership: string; - - /** Fleet preRegistered. */ - public preRegistered: boolean; - - /** - * Creates a new Fleet instance using the specified properties. - * @param [properties] Properties to set - * @returns Fleet instance - */ - public static create(properties?: google.container.v1beta1.IFleet): google.container.v1beta1.Fleet; - - /** - * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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.container.v1beta1.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; - } - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4 = 1, - IPV4_IPV6 = 2 - } - - /** Properties of a ResourceManagerTags. */ - interface IResourceManagerTags { - - /** ResourceManagerTags tags */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a ResourceManagerTags. */ - class ResourceManagerTags implements IResourceManagerTags { - - /** - * Constructs a new ResourceManagerTags. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IResourceManagerTags); - - /** ResourceManagerTags tags. */ - public tags: { [k: string]: string }; - - /** - * Creates a new ResourceManagerTags instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceManagerTags instance - */ - public static create(properties?: google.container.v1beta1.IResourceManagerTags): google.container.v1beta1.ResourceManagerTags; - - /** - * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. - * @param message ResourceManagerTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. - * @param message ResourceManagerTags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IResourceManagerTags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.ResourceManagerTags; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.ResourceManagerTags; - - /** - * Verifies a ResourceManagerTags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceManagerTags - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.ResourceManagerTags; - - /** - * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. - * @param message ResourceManagerTags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.ResourceManagerTags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceManagerTags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceManagerTags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnterpriseConfig. */ - interface IEnterpriseConfig { - - /** EnterpriseConfig clusterTier */ - clusterTier?: (google.container.v1beta1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1beta1.EnterpriseConfig.ClusterTier|null); - } - - /** Represents an EnterpriseConfig. */ - class EnterpriseConfig implements IEnterpriseConfig { - - /** - * Constructs a new EnterpriseConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.IEnterpriseConfig); - - /** EnterpriseConfig clusterTier. */ - public clusterTier: (google.container.v1beta1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1beta1.EnterpriseConfig.ClusterTier); - - /** - * Creates a new EnterpriseConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EnterpriseConfig instance - */ - public static create(properties?: google.container.v1beta1.IEnterpriseConfig): google.container.v1beta1.EnterpriseConfig; - - /** - * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. - * @param message EnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. - * @param message EnterpriseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.IEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.EnterpriseConfig; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.EnterpriseConfig; - - /** - * Verifies an EnterpriseConfig message. - * @param message Plain 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 EnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnterpriseConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.EnterpriseConfig; - - /** - * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. - * @param message EnterpriseConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.EnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnterpriseConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnterpriseConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnterpriseConfig { - - /** ClusterTier enum. */ - enum ClusterTier { - CLUSTER_TIER_UNSPECIFIED = 0, - STANDARD = 1, - ENTERPRISE = 2 - } - } - - /** Properties of a SecretManagerConfig. */ - interface ISecretManagerConfig { - - /** SecretManagerConfig enabled */ - enabled?: (boolean|null); - } - - /** Represents a SecretManagerConfig. */ - class SecretManagerConfig implements ISecretManagerConfig { - - /** - * Constructs a new SecretManagerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISecretManagerConfig); - - /** SecretManagerConfig enabled. */ - public enabled?: (boolean|null); - - /** SecretManagerConfig _enabled. */ - public _enabled?: "enabled"; - - /** - * Creates a new SecretManagerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SecretManagerConfig instance - */ - public static create(properties?: google.container.v1beta1.ISecretManagerConfig): google.container.v1beta1.SecretManagerConfig; - - /** - * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. - * @param message SecretManagerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. - * @param message SecretManagerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecretManagerConfig; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecretManagerConfig; - - /** - * Verifies a SecretManagerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecretManagerConfig - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecretManagerConfig; - - /** - * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. - * @param message SecretManagerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SecretManagerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecretManagerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecretManagerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecondaryBootDisk. */ - interface ISecondaryBootDisk { - - /** SecondaryBootDisk mode */ - mode?: (google.container.v1beta1.SecondaryBootDisk.Mode|keyof typeof google.container.v1beta1.SecondaryBootDisk.Mode|null); - - /** SecondaryBootDisk diskImage */ - diskImage?: (string|null); - } - - /** Represents a SecondaryBootDisk. */ - class SecondaryBootDisk implements ISecondaryBootDisk { - - /** - * Constructs a new SecondaryBootDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISecondaryBootDisk); - - /** SecondaryBootDisk mode. */ - public mode: (google.container.v1beta1.SecondaryBootDisk.Mode|keyof typeof google.container.v1beta1.SecondaryBootDisk.Mode); - - /** SecondaryBootDisk diskImage. */ - public diskImage: string; - - /** - * Creates a new SecondaryBootDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns SecondaryBootDisk instance - */ - public static create(properties?: google.container.v1beta1.ISecondaryBootDisk): google.container.v1beta1.SecondaryBootDisk; - - /** - * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. - * @param message SecondaryBootDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. - * @param message SecondaryBootDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISecondaryBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecondaryBootDisk; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecondaryBootDisk; - - /** - * Verifies a SecondaryBootDisk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecondaryBootDisk - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecondaryBootDisk; - - /** - * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. - * @param message SecondaryBootDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SecondaryBootDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecondaryBootDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecondaryBootDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecondaryBootDisk { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - CONTAINER_IMAGE_CACHE = 1 - } - } - - /** InTransitEncryptionConfig enum. */ - enum InTransitEncryptionConfig { - IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED = 0, - IN_TRANSIT_ENCRYPTION_DISABLED = 1, - IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT = 2 - } - - /** Properties of a SecondaryBootDiskUpdateStrategy. */ - interface ISecondaryBootDiskUpdateStrategy { - } - - /** Represents a SecondaryBootDiskUpdateStrategy. */ - class SecondaryBootDiskUpdateStrategy implements ISecondaryBootDiskUpdateStrategy { - - /** - * Constructs a new SecondaryBootDiskUpdateStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy); - - /** - * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns SecondaryBootDiskUpdateStrategy instance - */ - public static create(properties?: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @param message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.container.v1beta1.ISecondaryBootDiskUpdateStrategy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; - - /** - * Verifies a SecondaryBootDiskUpdateStrategy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecondaryBootDiskUpdateStrategy - */ - public static fromObject(object: { [k: string]: any }): google.container.v1beta1.SecondaryBootDiskUpdateStrategy; - - /** - * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. - * @param message SecondaryBootDiskUpdateStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.container.v1beta1.SecondaryBootDiskUpdateStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecondaryBootDiskUpdateStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecondaryBootDiskUpdateStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Code enum. */ - enum Code { - OK = 0, - CANCELLED = 1, - UNKNOWN = 2, - INVALID_ARGUMENT = 3, - DEADLINE_EXCEEDED = 4, - NOT_FOUND = 5, - ALREADY_EXISTS = 6, - PERMISSION_DENIED = 7, - UNAUTHENTICATED = 16, - RESOURCE_EXHAUSTED = 8, - FAILED_PRECONDITION = 9, - ABORTED = 10, - OUT_OF_RANGE = 11, - UNIMPLEMENTED = 12, - INTERNAL = 13, - UNAVAILABLE = 14, - DATA_LOSS = 15 - } - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; - - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.js b/owl-bot-staging/google-container/v1beta1/protos/protos.js deleted file mode 100644 index c8e98ad1c12..00000000000 --- a/owl-bot-staging/google-container/v1beta1/protos/protos.js +++ /dev/null @@ -1,86801 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_container_protos || ($protobuf.roots._google_cloud_container_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.container = (function() { - - /** - * Namespace container. - * @memberof google - * @namespace - */ - var container = {}; - - container.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.container - * @namespace - */ - var v1beta1 = {}; - - v1beta1.ClusterManager = (function() { - - /** - * Constructs a new ClusterManager service. - * @memberof google.container.v1beta1 - * @classdesc Represents a ClusterManager - * @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 ClusterManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ClusterManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ClusterManager; - - /** - * Creates new ClusterManager service using the specified rpc implementation. - * @function create - * @memberof google.container.v1beta1.ClusterManager - * @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 {ClusterManager} RPC service. Useful where requests and/or responses are streamed. - */ - ClusterManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listClusters}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef ListClustersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListClustersResponse} [response] ListClustersResponse - */ - - /** - * Calls ListClusters. - * @function listClusters - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListClustersRequest} request ListClustersRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListClustersCallback} callback Node-style callback called with the error, if any, and ListClustersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listClusters = function listClusters(request, callback) { - return this.rpcCall(listClusters, $root.google.container.v1beta1.ListClustersRequest, $root.google.container.v1beta1.ListClustersResponse, request, callback); - }, "name", { value: "ListClusters" }); - - /** - * Calls ListClusters. - * @function listClusters - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListClustersRequest} request ListClustersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getCluster}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef GetClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Cluster} [response] Cluster - */ - - /** - * Calls GetCluster. - * @function getCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetClusterRequest} request GetClusterRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetClusterCallback} callback Node-style callback called with the error, if any, and Cluster - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getCluster = function getCluster(request, callback) { - return this.rpcCall(getCluster, $root.google.container.v1beta1.GetClusterRequest, $root.google.container.v1beta1.Cluster, request, callback); - }, "name", { value: "GetCluster" }); - - /** - * Calls GetCluster. - * @function getCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetClusterRequest} request GetClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|createCluster}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CreateClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls CreateCluster. - * @function createCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICreateClusterRequest} request CreateClusterRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CreateClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.createCluster = function createCluster(request, callback) { - return this.rpcCall(createCluster, $root.google.container.v1beta1.CreateClusterRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "CreateCluster" }); - - /** - * Calls CreateCluster. - * @function createCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICreateClusterRequest} request CreateClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateCluster}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef UpdateClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls UpdateCluster. - * @function updateCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.UpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateCluster = function updateCluster(request, callback) { - return this.rpcCall(updateCluster, $root.google.container.v1beta1.UpdateClusterRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "UpdateCluster" }); - - /** - * Calls UpdateCluster. - * @function updateCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateClusterRequest} request UpdateClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateNodePool}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef UpdateNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls UpdateNodePool. - * @function updateNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.UpdateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateNodePool = function updateNodePool(request, callback) { - return this.rpcCall(updateNodePool, $root.google.container.v1beta1.UpdateNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "UpdateNodePool" }); - - /** - * Calls UpdateNodePool. - * @function updateNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateNodePoolRequest} request UpdateNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolAutoscaling}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetNodePoolAutoscalingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolAutoscaling. - * @function setNodePoolAutoscaling - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetNodePoolAutoscalingCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolAutoscaling = function setNodePoolAutoscaling(request, callback) { - return this.rpcCall(setNodePoolAutoscaling, $root.google.container.v1beta1.SetNodePoolAutoscalingRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetNodePoolAutoscaling" }); - - /** - * Calls SetNodePoolAutoscaling. - * @function setNodePoolAutoscaling - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} request SetNodePoolAutoscalingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLoggingService}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetLoggingServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetLoggingService. - * @function setLoggingService - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetLoggingServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLoggingService = function setLoggingService(request, callback) { - return this.rpcCall(setLoggingService, $root.google.container.v1beta1.SetLoggingServiceRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetLoggingService" }); - - /** - * Calls SetLoggingService. - * @function setLoggingService - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLoggingServiceRequest} request SetLoggingServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMonitoringService}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetMonitoringServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetMonitoringService. - * @function setMonitoringService - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetMonitoringServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMonitoringService = function setMonitoringService(request, callback) { - return this.rpcCall(setMonitoringService, $root.google.container.v1beta1.SetMonitoringServiceRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetMonitoringService" }); - - /** - * Calls SetMonitoringService. - * @function setMonitoringService - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMonitoringServiceRequest} request SetMonitoringServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setAddonsConfig}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetAddonsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetAddonsConfig. - * @function setAddonsConfig - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetAddonsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setAddonsConfig = function setAddonsConfig(request, callback) { - return this.rpcCall(setAddonsConfig, $root.google.container.v1beta1.SetAddonsConfigRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetAddonsConfig" }); - - /** - * Calls SetAddonsConfig. - * @function setAddonsConfig - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetAddonsConfigRequest} request SetAddonsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLocations}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetLocationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetLocations. - * @function setLocations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLocationsRequest} request SetLocationsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetLocationsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLocations = function setLocations(request, callback) { - return this.rpcCall(setLocations, $root.google.container.v1beta1.SetLocationsRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetLocations" }); - - /** - * Calls SetLocations. - * @function setLocations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLocationsRequest} request SetLocationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|updateMaster}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef UpdateMasterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls UpdateMaster. - * @function updateMaster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.UpdateMasterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.updateMaster = function updateMaster(request, callback) { - return this.rpcCall(updateMaster, $root.google.container.v1beta1.UpdateMasterRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "UpdateMaster" }); - - /** - * Calls UpdateMaster. - * @function updateMaster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IUpdateMasterRequest} request UpdateMasterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMasterAuth}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetMasterAuthCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetMasterAuth. - * @function setMasterAuth - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetMasterAuthCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMasterAuth = function setMasterAuth(request, callback) { - return this.rpcCall(setMasterAuth, $root.google.container.v1beta1.SetMasterAuthRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetMasterAuth" }); - - /** - * Calls SetMasterAuth. - * @function setMasterAuth - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMasterAuthRequest} request SetMasterAuthRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteCluster}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef DeleteClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls DeleteCluster. - * @function deleteCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.DeleteClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.deleteCluster = function deleteCluster(request, callback) { - return this.rpcCall(deleteCluster, $root.google.container.v1beta1.DeleteClusterRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "DeleteCluster" }); - - /** - * Calls DeleteCluster. - * @function deleteCluster - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IDeleteClusterRequest} request DeleteClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listOperations}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.container.v1beta1.ListOperationsRequest, $root.google.container.v1beta1.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getOperation}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.container.v1beta1.GetOperationRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|cancelOperation}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.container.v1beta1.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getServerConfig}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef GetServerConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ServerConfig} [response] ServerConfig - */ - - /** - * Calls GetServerConfig. - * @function getServerConfig - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetServerConfigCallback} callback Node-style callback called with the error, if any, and ServerConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getServerConfig = function getServerConfig(request, callback) { - return this.rpcCall(getServerConfig, $root.google.container.v1beta1.GetServerConfigRequest, $root.google.container.v1beta1.ServerConfig, request, callback); - }, "name", { value: "GetServerConfig" }); - - /** - * Calls GetServerConfig. - * @function getServerConfig - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetServerConfigRequest} request GetServerConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef GetJSONWebKeysCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse - */ - - /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { - return this.rpcCall(getJSONWebKeys, $root.google.container.v1beta1.GetJSONWebKeysRequest, $root.google.container.v1beta1.GetJSONWebKeysResponse, request, callback); - }, "name", { value: "GetJSONWebKeys" }); - - /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef ListNodePoolsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListNodePoolsResponse} [response] ListNodePoolsResponse - */ - - /** - * Calls ListNodePools. - * @function listNodePools - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { - return this.rpcCall(listNodePools, $root.google.container.v1beta1.ListNodePoolsRequest, $root.google.container.v1beta1.ListNodePoolsResponse, request, callback); - }, "name", { value: "ListNodePools" }); - - /** - * Calls ListNodePools. - * @function listNodePools - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getNodePool}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef GetNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.NodePool} [response] NodePool - */ - - /** - * Calls GetNodePool. - * @function getNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetNodePoolCallback} callback Node-style callback called with the error, if any, and NodePool - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.getNodePool = function getNodePool(request, callback) { - return this.rpcCall(getNodePool, $root.google.container.v1beta1.GetNodePoolRequest, $root.google.container.v1beta1.NodePool, request, callback); - }, "name", { value: "GetNodePool" }); - - /** - * Calls GetNodePool. - * @function getNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IGetNodePoolRequest} request GetNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|createNodePool}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CreateNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls CreateNodePool. - * @function createNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CreateNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.createNodePool = function createNodePool(request, callback) { - return this.rpcCall(createNodePool, $root.google.container.v1beta1.CreateNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "CreateNodePool" }); - - /** - * Calls CreateNodePool. - * @function createNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICreateNodePoolRequest} request CreateNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|deleteNodePool}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef DeleteNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls DeleteNodePool. - * @function deleteNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.DeleteNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.deleteNodePool = function deleteNodePool(request, callback) { - return this.rpcCall(deleteNodePool, $root.google.container.v1beta1.DeleteNodePoolRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "DeleteNodePool" }); - - /** - * Calls DeleteNodePool. - * @function deleteNodePool - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IDeleteNodePoolRequest} request DeleteNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|completeNodePoolUpgrade}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CompleteNodePoolUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CompleteNodePoolUpgrade. - * @function completeNodePoolUpgrade - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CompleteNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.completeNodePoolUpgrade = function completeNodePoolUpgrade(request, callback) { - return this.rpcCall(completeNodePoolUpgrade, $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CompleteNodePoolUpgrade" }); - - /** - * Calls CompleteNodePoolUpgrade. - * @function completeNodePoolUpgrade - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} request CompleteNodePoolUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|rollbackNodePoolUpgrade}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef RollbackNodePoolUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls RollbackNodePoolUpgrade. - * @function rollbackNodePoolUpgrade - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.RollbackNodePoolUpgradeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.rollbackNodePoolUpgrade = function rollbackNodePoolUpgrade(request, callback) { - return this.rpcCall(rollbackNodePoolUpgrade, $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "RollbackNodePoolUpgrade" }); - - /** - * Calls RollbackNodePoolUpgrade. - * @function rollbackNodePoolUpgrade - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} request RollbackNodePoolUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolManagement}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetNodePoolManagementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolManagement. - * @function setNodePoolManagement - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetNodePoolManagementCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolManagement = function setNodePoolManagement(request, callback) { - return this.rpcCall(setNodePoolManagement, $root.google.container.v1beta1.SetNodePoolManagementRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetNodePoolManagement" }); - - /** - * Calls SetNodePoolManagement. - * @function setNodePoolManagement - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolManagementRequest} request SetNodePoolManagementRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLabels}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetLabelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetLabels. - * @function setLabels - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLabelsRequest} request SetLabelsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetLabelsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLabels = function setLabels(request, callback) { - return this.rpcCall(setLabels, $root.google.container.v1beta1.SetLabelsRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetLabels" }); - - /** - * Calls SetLabels. - * @function setLabels - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLabelsRequest} request SetLabelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setLegacyAbac}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetLegacyAbacCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetLegacyAbac. - * @function setLegacyAbac - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetLegacyAbacCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setLegacyAbac = function setLegacyAbac(request, callback) { - return this.rpcCall(setLegacyAbac, $root.google.container.v1beta1.SetLegacyAbacRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetLegacyAbac" }); - - /** - * Calls SetLegacyAbac. - * @function setLegacyAbac - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetLegacyAbacRequest} request SetLegacyAbacRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|startIPRotation}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef StartIPRotationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls StartIPRotation. - * @function startIPRotation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.StartIPRotationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.startIPRotation = function startIPRotation(request, callback) { - return this.rpcCall(startIPRotation, $root.google.container.v1beta1.StartIPRotationRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "StartIPRotation" }); - - /** - * Calls StartIPRotation. - * @function startIPRotation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IStartIPRotationRequest} request StartIPRotationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|completeIPRotation}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CompleteIPRotationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls CompleteIPRotation. - * @function completeIPRotation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CompleteIPRotationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.completeIPRotation = function completeIPRotation(request, callback) { - return this.rpcCall(completeIPRotation, $root.google.container.v1beta1.CompleteIPRotationRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "CompleteIPRotation" }); - - /** - * Calls CompleteIPRotation. - * @function completeIPRotation - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICompleteIPRotationRequest} request CompleteIPRotationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNodePoolSize}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetNodePoolSizeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetNodePoolSize. - * @function setNodePoolSize - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetNodePoolSizeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNodePoolSize = function setNodePoolSize(request, callback) { - return this.rpcCall(setNodePoolSize, $root.google.container.v1beta1.SetNodePoolSizeRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetNodePoolSize" }); - - /** - * Calls SetNodePoolSize. - * @function setNodePoolSize - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNodePoolSizeRequest} request SetNodePoolSizeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setNetworkPolicy}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetNetworkPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetNetworkPolicy. - * @function setNetworkPolicy - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetNetworkPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setNetworkPolicy = function setNetworkPolicy(request, callback) { - return this.rpcCall(setNetworkPolicy, $root.google.container.v1beta1.SetNetworkPolicyRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetNetworkPolicy" }); - - /** - * Calls SetNetworkPolicy. - * @function setNetworkPolicy - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetNetworkPolicyRequest} request SetNetworkPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|setMaintenancePolicy}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef SetMaintenancePolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.Operation} [response] Operation - */ - - /** - * Calls SetMaintenancePolicy. - * @function setMaintenancePolicy - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.SetMaintenancePolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.setMaintenancePolicy = function setMaintenancePolicy(request, callback) { - return this.rpcCall(setMaintenancePolicy, $root.google.container.v1beta1.SetMaintenancePolicyRequest, $root.google.container.v1beta1.Operation, request, callback); - }, "name", { value: "SetMaintenancePolicy" }); - - /** - * Calls SetMaintenancePolicy. - * @function setMaintenancePolicy - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} request SetMaintenancePolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listUsableSubnetworks}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef ListUsableSubnetworksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListUsableSubnetworksResponse} [response] ListUsableSubnetworksResponse - */ - - /** - * Calls ListUsableSubnetworks. - * @function listUsableSubnetworks - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListUsableSubnetworksCallback} callback Node-style callback called with the error, if any, and ListUsableSubnetworksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listUsableSubnetworks = function listUsableSubnetworks(request, callback) { - return this.rpcCall(listUsableSubnetworks, $root.google.container.v1beta1.ListUsableSubnetworksRequest, $root.google.container.v1beta1.ListUsableSubnetworksResponse, request, callback); - }, "name", { value: "ListUsableSubnetworks" }); - - /** - * Calls ListUsableSubnetworks. - * @function listUsableSubnetworks - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListUsableSubnetworksRequest} request ListUsableSubnetworksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|checkAutopilotCompatibility}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef CheckAutopilotCompatibilityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.CheckAutopilotCompatibilityResponse} [response] CheckAutopilotCompatibilityResponse - */ - - /** - * Calls CheckAutopilotCompatibility. - * @function checkAutopilotCompatibility - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.CheckAutopilotCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckAutopilotCompatibilityResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.checkAutopilotCompatibility = function checkAutopilotCompatibility(request, callback) { - return this.rpcCall(checkAutopilotCompatibility, $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest, $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse, request, callback); - }, "name", { value: "CheckAutopilotCompatibility" }); - - /** - * Calls CheckAutopilotCompatibility. - * @function checkAutopilotCompatibility - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} request CheckAutopilotCompatibilityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listLocations}. - * @memberof google.container.v1beta1.ClusterManager - * @typedef ListLocationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListLocationsResponse} [response] ListLocationsResponse - */ - - /** - * Calls ListLocations. - * @function listLocations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListLocationsRequest} request ListLocationsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListLocationsCallback} callback Node-style callback called with the error, if any, and ListLocationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ClusterManager.prototype.listLocations = function listLocations(request, callback) { - return this.rpcCall(listLocations, $root.google.container.v1beta1.ListLocationsRequest, $root.google.container.v1beta1.ListLocationsResponse, request, callback); - }, "name", { value: "ListLocations" }); - - /** - * Calls ListLocations. - * @function listLocations - * @memberof google.container.v1beta1.ClusterManager - * @instance - * @param {google.container.v1beta1.IListLocationsRequest} request ListLocationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ClusterManager; - })(); - - v1beta1.LinuxNodeConfig = (function() { - - /** - * Properties of a LinuxNodeConfig. - * @memberof google.container.v1beta1 - * @interface ILinuxNodeConfig - * @property {Object.|null} [sysctls] LinuxNodeConfig sysctls - * @property {google.container.v1beta1.LinuxNodeConfig.CgroupMode|null} [cgroupMode] LinuxNodeConfig cgroupMode - * @property {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null} [hugepages] LinuxNodeConfig hugepages - */ - - /** - * Constructs a new LinuxNodeConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a LinuxNodeConfig. - * @implements ILinuxNodeConfig - * @constructor - * @param {google.container.v1beta1.ILinuxNodeConfig=} [properties] Properties to set - */ - function LinuxNodeConfig(properties) { - this.sysctls = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LinuxNodeConfig sysctls. - * @member {Object.} sysctls - * @memberof google.container.v1beta1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.sysctls = $util.emptyObject; - - /** - * LinuxNodeConfig cgroupMode. - * @member {google.container.v1beta1.LinuxNodeConfig.CgroupMode} cgroupMode - * @memberof google.container.v1beta1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.cgroupMode = 0; - - /** - * LinuxNodeConfig hugepages. - * @member {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig|null|undefined} hugepages - * @memberof google.container.v1beta1.LinuxNodeConfig - * @instance - */ - LinuxNodeConfig.prototype.hugepages = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LinuxNodeConfig _hugepages. - * @member {"hugepages"|undefined} _hugepages - * @memberof google.container.v1beta1.LinuxNodeConfig - * @instance - */ - Object.defineProperty(LinuxNodeConfig.prototype, "_hugepages", { - get: $util.oneOfGetter($oneOfFields = ["hugepages"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LinuxNodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {google.container.v1beta1.ILinuxNodeConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig instance - */ - LinuxNodeConfig.create = function create(properties) { - return new LinuxNodeConfig(properties); - }; - - /** - * Encodes the specified LinuxNodeConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {google.container.v1beta1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinuxNodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sysctls != null && Object.hasOwnProperty.call(message, "sysctls")) - for (var keys = Object.keys(message.sysctls), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.sysctls[keys[i]]).ldelim(); - if (message.cgroupMode != null && Object.hasOwnProperty.call(message, "cgroupMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cgroupMode); - if (message.hugepages != null && Object.hasOwnProperty.call(message, "hugepages")) - $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.encode(message.hugepages, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LinuxNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {google.container.v1beta1.ILinuxNodeConfig} message LinuxNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinuxNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinuxNodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LinuxNodeConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.sysctls === $util.emptyObject) - message.sysctls = {}; - 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.sysctls[key] = value; - break; - } - case 2: { - message.cgroupMode = reader.int32(); - break; - } - case 3: { - message.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LinuxNodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinuxNodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LinuxNodeConfig message. - * @function verify - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LinuxNodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sysctls != null && message.hasOwnProperty("sysctls")) { - if (!$util.isObject(message.sysctls)) - return "sysctls: object expected"; - var key = Object.keys(message.sysctls); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.sysctls[key[i]])) - return "sysctls: string{k:string} expected"; - } - if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) - switch (message.cgroupMode) { - default: - return "cgroupMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.hugepages != null && message.hasOwnProperty("hugepages")) { - properties._hugepages = 1; - { - var error = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify(message.hugepages); - if (error) - return "hugepages." + error; - } - } - return null; - }; - - /** - * Creates a LinuxNodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LinuxNodeConfig} LinuxNodeConfig - */ - LinuxNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LinuxNodeConfig) - return object; - var message = new $root.google.container.v1beta1.LinuxNodeConfig(); - if (object.sysctls) { - if (typeof object.sysctls !== "object") - throw TypeError(".google.container.v1beta1.LinuxNodeConfig.sysctls: object expected"); - message.sysctls = {}; - for (var keys = Object.keys(object.sysctls), i = 0; i < keys.length; ++i) - message.sysctls[keys[i]] = String(object.sysctls[keys[i]]); - } - switch (object.cgroupMode) { - default: - if (typeof object.cgroupMode === "number") { - message.cgroupMode = object.cgroupMode; - break; - } - break; - case "CGROUP_MODE_UNSPECIFIED": - case 0: - message.cgroupMode = 0; - break; - case "CGROUP_MODE_V1": - case 1: - message.cgroupMode = 1; - break; - case "CGROUP_MODE_V2": - case 2: - message.cgroupMode = 2; - break; - } - if (object.hugepages != null) { - if (typeof object.hugepages !== "object") - throw TypeError(".google.container.v1beta1.LinuxNodeConfig.hugepages: object expected"); - message.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.fromObject(object.hugepages); - } - return message; - }; - - /** - * Creates a plain object from a LinuxNodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {google.container.v1beta1.LinuxNodeConfig} message LinuxNodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LinuxNodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.sysctls = {}; - if (options.defaults) - object.cgroupMode = options.enums === String ? "CGROUP_MODE_UNSPECIFIED" : 0; - var keys2; - if (message.sysctls && (keys2 = Object.keys(message.sysctls)).length) { - object.sysctls = {}; - for (var j = 0; j < keys2.length; ++j) - object.sysctls[keys2[j]] = message.sysctls[keys2[j]]; - } - if (message.cgroupMode != null && message.hasOwnProperty("cgroupMode")) - object.cgroupMode = options.enums === String ? $root.google.container.v1beta1.LinuxNodeConfig.CgroupMode[message.cgroupMode] === undefined ? message.cgroupMode : $root.google.container.v1beta1.LinuxNodeConfig.CgroupMode[message.cgroupMode] : message.cgroupMode; - if (message.hugepages != null && message.hasOwnProperty("hugepages")) { - object.hugepages = $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.toObject(message.hugepages, options); - if (options.oneofs) - object._hugepages = "hugepages"; - } - return object; - }; - - /** - * Converts this LinuxNodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LinuxNodeConfig - * @instance - * @returns {Object.} JSON object - */ - LinuxNodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LinuxNodeConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LinuxNodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LinuxNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LinuxNodeConfig"; - }; - - /** - * CgroupMode enum. - * @name google.container.v1beta1.LinuxNodeConfig.CgroupMode - * @enum {number} - * @property {number} CGROUP_MODE_UNSPECIFIED=0 CGROUP_MODE_UNSPECIFIED value - * @property {number} CGROUP_MODE_V1=1 CGROUP_MODE_V1 value - * @property {number} CGROUP_MODE_V2=2 CGROUP_MODE_V2 value - */ - LinuxNodeConfig.CgroupMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CGROUP_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CGROUP_MODE_V1"] = 1; - values[valuesById[2] = "CGROUP_MODE_V2"] = 2; - return values; - })(); - - LinuxNodeConfig.HugepagesConfig = (function() { - - /** - * Properties of a HugepagesConfig. - * @memberof google.container.v1beta1.LinuxNodeConfig - * @interface IHugepagesConfig - * @property {number|null} [hugepageSize2m] HugepagesConfig hugepageSize2m - * @property {number|null} [hugepageSize1g] HugepagesConfig hugepageSize1g - */ - - /** - * Constructs a new HugepagesConfig. - * @memberof google.container.v1beta1.LinuxNodeConfig - * @classdesc Represents a HugepagesConfig. - * @implements IHugepagesConfig - * @constructor - * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set - */ - function HugepagesConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HugepagesConfig hugepageSize2m. - * @member {number|null|undefined} hugepageSize2m - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - HugepagesConfig.prototype.hugepageSize2m = null; - - /** - * HugepagesConfig hugepageSize1g. - * @member {number|null|undefined} hugepageSize1g - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - HugepagesConfig.prototype.hugepageSize1g = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HugepagesConfig _hugepageSize2m. - * @member {"hugepageSize2m"|undefined} _hugepageSize2m - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize2m", { - get: $util.oneOfGetter($oneOfFields = ["hugepageSize2m"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * HugepagesConfig _hugepageSize1g. - * @member {"hugepageSize1g"|undefined} _hugepageSize1g - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @instance - */ - Object.defineProperty(HugepagesConfig.prototype, "_hugepageSize1g", { - get: $util.oneOfGetter($oneOfFields = ["hugepageSize1g"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HugepagesConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig instance - */ - HugepagesConfig.create = function create(properties) { - return new HugepagesConfig(properties); - }; - - /** - * Encodes the specified HugepagesConfig message. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HugepagesConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hugepageSize2m != null && Object.hasOwnProperty.call(message, "hugepageSize2m")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hugepageSize2m); - if (message.hugepageSize1g != null && Object.hasOwnProperty.call(message, "hugepageSize1g")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hugepageSize1g); - return writer; - }; - - /** - * Encodes the specified HugepagesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LinuxNodeConfig.HugepagesConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1beta1.LinuxNodeConfig.IHugepagesConfig} message HugepagesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HugepagesConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HugepagesConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hugepageSize2m = reader.int32(); - break; - } - case 2: { - message.hugepageSize1g = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HugepagesConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HugepagesConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HugepagesConfig message. - * @function verify - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HugepagesConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { - properties._hugepageSize2m = 1; - if (!$util.isInteger(message.hugepageSize2m)) - return "hugepageSize2m: integer expected"; - } - if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { - properties._hugepageSize1g = 1; - if (!$util.isInteger(message.hugepageSize1g)) - return "hugepageSize1g: integer expected"; - } - return null; - }; - - /** - * Creates a HugepagesConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} HugepagesConfig - */ - HugepagesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig) - return object; - var message = new $root.google.container.v1beta1.LinuxNodeConfig.HugepagesConfig(); - if (object.hugepageSize2m != null) - message.hugepageSize2m = object.hugepageSize2m | 0; - if (object.hugepageSize1g != null) - message.hugepageSize1g = object.hugepageSize1g | 0; - return message; - }; - - /** - * Creates a plain object from a HugepagesConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {google.container.v1beta1.LinuxNodeConfig.HugepagesConfig} message HugepagesConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HugepagesConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.hugepageSize2m != null && message.hasOwnProperty("hugepageSize2m")) { - object.hugepageSize2m = message.hugepageSize2m; - if (options.oneofs) - object._hugepageSize2m = "hugepageSize2m"; - } - if (message.hugepageSize1g != null && message.hasOwnProperty("hugepageSize1g")) { - object.hugepageSize1g = message.hugepageSize1g; - if (options.oneofs) - object._hugepageSize1g = "hugepageSize1g"; - } - return object; - }; - - /** - * Converts this HugepagesConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @instance - * @returns {Object.} JSON object - */ - HugepagesConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HugepagesConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LinuxNodeConfig.HugepagesConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HugepagesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LinuxNodeConfig.HugepagesConfig"; - }; - - return HugepagesConfig; - })(); - - return LinuxNodeConfig; - })(); - - v1beta1.WindowsNodeConfig = (function() { - - /** - * Properties of a WindowsNodeConfig. - * @memberof google.container.v1beta1 - * @interface IWindowsNodeConfig - * @property {google.container.v1beta1.WindowsNodeConfig.OSVersion|null} [osVersion] WindowsNodeConfig osVersion - */ - - /** - * Constructs a new WindowsNodeConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WindowsNodeConfig. - * @implements IWindowsNodeConfig - * @constructor - * @param {google.container.v1beta1.IWindowsNodeConfig=} [properties] Properties to set - */ - function WindowsNodeConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsNodeConfig osVersion. - * @member {google.container.v1beta1.WindowsNodeConfig.OSVersion} osVersion - * @memberof google.container.v1beta1.WindowsNodeConfig - * @instance - */ - WindowsNodeConfig.prototype.osVersion = 0; - - /** - * Creates a new WindowsNodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {google.container.v1beta1.IWindowsNodeConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig instance - */ - WindowsNodeConfig.create = function create(properties) { - return new WindowsNodeConfig(properties); - }; - - /** - * Encodes the specified WindowsNodeConfig message. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {google.container.v1beta1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsNodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.osVersion); - return writer; - }; - - /** - * Encodes the specified WindowsNodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsNodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {google.container.v1beta1.IWindowsNodeConfig} message WindowsNodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsNodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsNodeConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.osVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsNodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsNodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsNodeConfig message. - * @function verify - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsNodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - switch (message.osVersion) { - default: - return "osVersion: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a WindowsNodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WindowsNodeConfig} WindowsNodeConfig - */ - WindowsNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WindowsNodeConfig) - return object; - var message = new $root.google.container.v1beta1.WindowsNodeConfig(); - switch (object.osVersion) { - default: - if (typeof object.osVersion === "number") { - message.osVersion = object.osVersion; - break; - } - break; - case "OS_VERSION_UNSPECIFIED": - case 0: - message.osVersion = 0; - break; - case "OS_VERSION_LTSC2019": - case 1: - message.osVersion = 1; - break; - case "OS_VERSION_LTSC2022": - case 2: - message.osVersion = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a WindowsNodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {google.container.v1beta1.WindowsNodeConfig} message WindowsNodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsNodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.osVersion = options.enums === String ? "OS_VERSION_UNSPECIFIED" : 0; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = options.enums === String ? $root.google.container.v1beta1.WindowsNodeConfig.OSVersion[message.osVersion] === undefined ? message.osVersion : $root.google.container.v1beta1.WindowsNodeConfig.OSVersion[message.osVersion] : message.osVersion; - return object; - }; - - /** - * Converts this WindowsNodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WindowsNodeConfig - * @instance - * @returns {Object.} JSON object - */ - WindowsNodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WindowsNodeConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WindowsNodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WindowsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WindowsNodeConfig"; - }; - - /** - * OSVersion enum. - * @name google.container.v1beta1.WindowsNodeConfig.OSVersion - * @enum {number} - * @property {number} OS_VERSION_UNSPECIFIED=0 OS_VERSION_UNSPECIFIED value - * @property {number} OS_VERSION_LTSC2019=1 OS_VERSION_LTSC2019 value - * @property {number} OS_VERSION_LTSC2022=2 OS_VERSION_LTSC2022 value - */ - WindowsNodeConfig.OSVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OS_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "OS_VERSION_LTSC2019"] = 1; - values[valuesById[2] = "OS_VERSION_LTSC2022"] = 2; - return values; - })(); - - return WindowsNodeConfig; - })(); - - v1beta1.NodeKubeletConfig = (function() { - - /** - * Properties of a NodeKubeletConfig. - * @memberof google.container.v1beta1 - * @interface INodeKubeletConfig - * @property {string|null} [cpuManagerPolicy] NodeKubeletConfig cpuManagerPolicy - * @property {google.protobuf.IBoolValue|null} [cpuCfsQuota] NodeKubeletConfig cpuCfsQuota - * @property {string|null} [cpuCfsQuotaPeriod] NodeKubeletConfig cpuCfsQuotaPeriod - * @property {number|Long|null} [podPidsLimit] NodeKubeletConfig podPidsLimit - * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] NodeKubeletConfig insecureKubeletReadonlyPortEnabled - */ - - /** - * Constructs a new NodeKubeletConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeKubeletConfig. - * @implements INodeKubeletConfig - * @constructor - * @param {google.container.v1beta1.INodeKubeletConfig=} [properties] Properties to set - */ - function NodeKubeletConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeKubeletConfig cpuManagerPolicy. - * @member {string} cpuManagerPolicy - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuManagerPolicy = ""; - - /** - * NodeKubeletConfig cpuCfsQuota. - * @member {google.protobuf.IBoolValue|null|undefined} cpuCfsQuota - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuCfsQuota = null; - - /** - * NodeKubeletConfig cpuCfsQuotaPeriod. - * @member {string} cpuCfsQuotaPeriod - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.cpuCfsQuotaPeriod = ""; - - /** - * NodeKubeletConfig podPidsLimit. - * @member {number|Long} podPidsLimit - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.podPidsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * NodeKubeletConfig insecureKubeletReadonlyPortEnabled. - * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - NodeKubeletConfig.prototype.insecureKubeletReadonlyPortEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeKubeletConfig _insecureKubeletReadonlyPortEnabled. - * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - */ - Object.defineProperty(NodeKubeletConfig.prototype, "_insecureKubeletReadonlyPortEnabled", { - get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeKubeletConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {google.container.v1beta1.INodeKubeletConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig instance - */ - NodeKubeletConfig.create = function create(properties) { - return new NodeKubeletConfig(properties); - }; - - /** - * Encodes the specified NodeKubeletConfig message. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {google.container.v1beta1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeKubeletConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpuManagerPolicy != null && Object.hasOwnProperty.call(message, "cpuManagerPolicy")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cpuManagerPolicy); - if (message.cpuCfsQuota != null && Object.hasOwnProperty.call(message, "cpuCfsQuota")) - $root.google.protobuf.BoolValue.encode(message.cpuCfsQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cpuCfsQuotaPeriod != null && Object.hasOwnProperty.call(message, "cpuCfsQuotaPeriod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cpuCfsQuotaPeriod); - if (message.podPidsLimit != null && Object.hasOwnProperty.call(message, "podPidsLimit")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.podPidsLimit); - if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.insecureKubeletReadonlyPortEnabled); - return writer; - }; - - /** - * Encodes the specified NodeKubeletConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeKubeletConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {google.container.v1beta1.INodeKubeletConfig} message NodeKubeletConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeKubeletConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeKubeletConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeKubeletConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpuManagerPolicy = reader.string(); - break; - } - case 2: { - message.cpuCfsQuota = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cpuCfsQuotaPeriod = reader.string(); - break; - } - case 4: { - message.podPidsLimit = reader.int64(); - break; - } - case 7: { - message.insecureKubeletReadonlyPortEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeKubeletConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeKubeletConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeKubeletConfig message. - * @function verify - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeKubeletConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) - if (!$util.isString(message.cpuManagerPolicy)) - return "cpuManagerPolicy: string expected"; - if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) { - var error = $root.google.protobuf.BoolValue.verify(message.cpuCfsQuota); - if (error) - return "cpuCfsQuota." + error; - } - if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) - if (!$util.isString(message.cpuCfsQuotaPeriod)) - return "cpuCfsQuotaPeriod: string expected"; - if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) - if (!$util.isInteger(message.podPidsLimit) && !(message.podPidsLimit && $util.isInteger(message.podPidsLimit.low) && $util.isInteger(message.podPidsLimit.high))) - return "podPidsLimit: integer|Long expected"; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - properties._insecureKubeletReadonlyPortEnabled = 1; - if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") - return "insecureKubeletReadonlyPortEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a NodeKubeletConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeKubeletConfig} NodeKubeletConfig - */ - NodeKubeletConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeKubeletConfig) - return object; - var message = new $root.google.container.v1beta1.NodeKubeletConfig(); - if (object.cpuManagerPolicy != null) - message.cpuManagerPolicy = String(object.cpuManagerPolicy); - if (object.cpuCfsQuota != null) { - if (typeof object.cpuCfsQuota !== "object") - throw TypeError(".google.container.v1beta1.NodeKubeletConfig.cpuCfsQuota: object expected"); - message.cpuCfsQuota = $root.google.protobuf.BoolValue.fromObject(object.cpuCfsQuota); - } - if (object.cpuCfsQuotaPeriod != null) - message.cpuCfsQuotaPeriod = String(object.cpuCfsQuotaPeriod); - if (object.podPidsLimit != null) - if ($util.Long) - (message.podPidsLimit = $util.Long.fromValue(object.podPidsLimit)).unsigned = false; - else if (typeof object.podPidsLimit === "string") - message.podPidsLimit = parseInt(object.podPidsLimit, 10); - else if (typeof object.podPidsLimit === "number") - message.podPidsLimit = object.podPidsLimit; - else if (typeof object.podPidsLimit === "object") - message.podPidsLimit = new $util.LongBits(object.podPidsLimit.low >>> 0, object.podPidsLimit.high >>> 0).toNumber(); - if (object.insecureKubeletReadonlyPortEnabled != null) - message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); - return message; - }; - - /** - * Creates a plain object from a NodeKubeletConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {google.container.v1beta1.NodeKubeletConfig} message NodeKubeletConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeKubeletConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpuManagerPolicy = ""; - object.cpuCfsQuota = null; - object.cpuCfsQuotaPeriod = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.podPidsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.podPidsLimit = options.longs === String ? "0" : 0; - } - if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) - object.cpuManagerPolicy = message.cpuManagerPolicy; - if (message.cpuCfsQuota != null && message.hasOwnProperty("cpuCfsQuota")) - object.cpuCfsQuota = $root.google.protobuf.BoolValue.toObject(message.cpuCfsQuota, options); - if (message.cpuCfsQuotaPeriod != null && message.hasOwnProperty("cpuCfsQuotaPeriod")) - object.cpuCfsQuotaPeriod = message.cpuCfsQuotaPeriod; - if (message.podPidsLimit != null && message.hasOwnProperty("podPidsLimit")) - if (typeof message.podPidsLimit === "number") - object.podPidsLimit = options.longs === String ? String(message.podPidsLimit) : message.podPidsLimit; - else - object.podPidsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.podPidsLimit) : options.longs === Number ? new $util.LongBits(message.podPidsLimit.low >>> 0, message.podPidsLimit.high >>> 0).toNumber() : message.podPidsLimit; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; - if (options.oneofs) - object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; - } - return object; - }; - - /** - * Converts this NodeKubeletConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeKubeletConfig - * @instance - * @returns {Object.} JSON object - */ - NodeKubeletConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeKubeletConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeKubeletConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeKubeletConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeKubeletConfig"; - }; - - return NodeKubeletConfig; - })(); - - v1beta1.NodeConfig = (function() { - - /** - * Properties of a NodeConfig. - * @memberof google.container.v1beta1 - * @interface INodeConfig - * @property {string|null} [machineType] NodeConfig machineType - * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb - * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes - * @property {string|null} [serviceAccount] NodeConfig serviceAccount - * @property {Object.|null} [metadata] NodeConfig metadata - * @property {string|null} [imageType] NodeConfig imageType - * @property {Object.|null} [labels] NodeConfig labels - * @property {number|null} [localSsdCount] NodeConfig localSsdCount - * @property {Array.|null} [tags] NodeConfig tags - * @property {boolean|null} [preemptible] NodeConfig preemptible - * @property {Array.|null} [accelerators] NodeConfig accelerators - * @property {google.container.v1beta1.ISandboxConfig|null} [sandboxConfig] NodeConfig sandboxConfig - * @property {string|null} [nodeGroup] NodeConfig nodeGroup - * @property {google.container.v1beta1.IReservationAffinity|null} [reservationAffinity] NodeConfig reservationAffinity - * @property {string|null} [diskType] NodeConfig diskType - * @property {string|null} [minCpuPlatform] NodeConfig minCpuPlatform - * @property {google.container.v1beta1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] NodeConfig workloadMetadataConfig - * @property {Array.|null} [taints] NodeConfig taints - * @property {string|null} [bootDiskKmsKey] NodeConfig bootDiskKmsKey - * @property {google.container.v1beta1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] NodeConfig shieldedInstanceConfig - * @property {google.container.v1beta1.ILinuxNodeConfig|null} [linuxNodeConfig] NodeConfig linuxNodeConfig - * @property {google.container.v1beta1.INodeKubeletConfig|null} [kubeletConfig] NodeConfig kubeletConfig - * @property {google.container.v1beta1.IEphemeralStorageConfig|null} [ephemeralStorageConfig] NodeConfig ephemeralStorageConfig - * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] NodeConfig gcfsConfig - * @property {google.container.v1beta1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] NodeConfig advancedMachineFeatures - * @property {google.container.v1beta1.IVirtualNIC|null} [gvnic] NodeConfig gvnic - * @property {boolean|null} [spot] NodeConfig spot - * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] NodeConfig confidentialNodes - * @property {google.container.v1beta1.IFastSocket|null} [fastSocket] NodeConfig fastSocket - * @property {Object.|null} [resourceLabels] NodeConfig resourceLabels - * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfig loggingConfig - * @property {google.container.v1beta1.IWindowsNodeConfig|null} [windowsNodeConfig] NodeConfig windowsNodeConfig - * @property {google.container.v1beta1.ILocalNvmeSsdBlockConfig|null} [localNvmeSsdBlockConfig] NodeConfig localNvmeSsdBlockConfig - * @property {google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null} [ephemeralStorageLocalSsdConfig] NodeConfig ephemeralStorageLocalSsdConfig - * @property {google.container.v1beta1.ISoleTenantConfig|null} [soleTenantConfig] NodeConfig soleTenantConfig - * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] NodeConfig containerdConfig - * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [hostMaintenancePolicy] NodeConfig hostMaintenancePolicy - * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] NodeConfig resourceManagerTags - * @property {boolean|null} [enableConfidentialStorage] NodeConfig enableConfidentialStorage - * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks - * @property {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy - */ - - /** - * Constructs a new NodeConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeConfig. - * @implements INodeConfig - * @constructor - * @param {google.container.v1beta1.INodeConfig=} [properties] Properties to set - */ - function NodeConfig(properties) { - this.oauthScopes = []; - this.metadata = {}; - this.labels = {}; - this.tags = []; - this.accelerators = []; - this.taints = []; - this.resourceLabels = {}; - this.secondaryBootDisks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfig machineType. - * @member {string} machineType - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.machineType = ""; - - /** - * NodeConfig diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskSizeGb = 0; - - /** - * NodeConfig oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.oauthScopes = $util.emptyArray; - - /** - * NodeConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.serviceAccount = ""; - - /** - * NodeConfig metadata. - * @member {Object.} metadata - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.metadata = $util.emptyObject; - - /** - * NodeConfig imageType. - * @member {string} imageType - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.imageType = ""; - - /** - * NodeConfig labels. - * @member {Object.} labels - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.labels = $util.emptyObject; - - /** - * NodeConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.localSsdCount = 0; - - /** - * NodeConfig tags. - * @member {Array.} tags - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.tags = $util.emptyArray; - - /** - * NodeConfig preemptible. - * @member {boolean} preemptible - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.preemptible = false; - - /** - * NodeConfig accelerators. - * @member {Array.} accelerators - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.accelerators = $util.emptyArray; - - /** - * NodeConfig sandboxConfig. - * @member {google.container.v1beta1.ISandboxConfig|null|undefined} sandboxConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.sandboxConfig = null; - - /** - * NodeConfig nodeGroup. - * @member {string} nodeGroup - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.nodeGroup = ""; - - /** - * NodeConfig reservationAffinity. - * @member {google.container.v1beta1.IReservationAffinity|null|undefined} reservationAffinity - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.reservationAffinity = null; - - /** - * NodeConfig diskType. - * @member {string} diskType - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskType = ""; - - /** - * NodeConfig minCpuPlatform. - * @member {string} minCpuPlatform - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.minCpuPlatform = ""; - - /** - * NodeConfig workloadMetadataConfig. - * @member {google.container.v1beta1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.workloadMetadataConfig = null; - - /** - * NodeConfig taints. - * @member {Array.} taints - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.taints = $util.emptyArray; - - /** - * NodeConfig bootDiskKmsKey. - * @member {string} bootDiskKmsKey - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.bootDiskKmsKey = ""; - - /** - * NodeConfig shieldedInstanceConfig. - * @member {google.container.v1beta1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.shieldedInstanceConfig = null; - - /** - * NodeConfig linuxNodeConfig. - * @member {google.container.v1beta1.ILinuxNodeConfig|null|undefined} linuxNodeConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.linuxNodeConfig = null; - - /** - * NodeConfig kubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} kubeletConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.kubeletConfig = null; - - /** - * NodeConfig ephemeralStorageConfig. - * @member {google.container.v1beta1.IEphemeralStorageConfig|null|undefined} ephemeralStorageConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.ephemeralStorageConfig = null; - - /** - * NodeConfig gcfsConfig. - * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.gcfsConfig = null; - - /** - * NodeConfig advancedMachineFeatures. - * @member {google.container.v1beta1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.advancedMachineFeatures = null; - - /** - * NodeConfig gvnic. - * @member {google.container.v1beta1.IVirtualNIC|null|undefined} gvnic - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.gvnic = null; - - /** - * NodeConfig spot. - * @member {boolean} spot - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.spot = false; - - /** - * NodeConfig confidentialNodes. - * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.confidentialNodes = null; - - /** - * NodeConfig fastSocket. - * @member {google.container.v1beta1.IFastSocket|null|undefined} fastSocket - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.fastSocket = null; - - /** - * NodeConfig resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.resourceLabels = $util.emptyObject; - - /** - * NodeConfig loggingConfig. - * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.loggingConfig = null; - - /** - * NodeConfig windowsNodeConfig. - * @member {google.container.v1beta1.IWindowsNodeConfig|null|undefined} windowsNodeConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.windowsNodeConfig = null; - - /** - * NodeConfig localNvmeSsdBlockConfig. - * @member {google.container.v1beta1.ILocalNvmeSsdBlockConfig|null|undefined} localNvmeSsdBlockConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.localNvmeSsdBlockConfig = null; - - /** - * NodeConfig ephemeralStorageLocalSsdConfig. - * @member {google.container.v1beta1.IEphemeralStorageLocalSsdConfig|null|undefined} ephemeralStorageLocalSsdConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.ephemeralStorageLocalSsdConfig = null; - - /** - * NodeConfig soleTenantConfig. - * @member {google.container.v1beta1.ISoleTenantConfig|null|undefined} soleTenantConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.soleTenantConfig = null; - - /** - * NodeConfig containerdConfig. - * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.containerdConfig = null; - - /** - * NodeConfig hostMaintenancePolicy. - * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} hostMaintenancePolicy - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.hostMaintenancePolicy = null; - - /** - * NodeConfig resourceManagerTags. - * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.resourceManagerTags = null; - - /** - * NodeConfig enableConfidentialStorage. - * @member {boolean} enableConfidentialStorage - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.enableConfidentialStorage = false; - - /** - * NodeConfig secondaryBootDisks. - * @member {Array.} secondaryBootDisks - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.secondaryBootDisks = $util.emptyArray; - - /** - * NodeConfig secondaryBootDiskUpdateStrategy. - * @member {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy|null|undefined} secondaryBootDiskUpdateStrategy - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeConfig _fastSocket. - * @member {"fastSocket"|undefined} _fastSocket - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - Object.defineProperty(NodeConfig.prototype, "_fastSocket", { - get: $util.oneOfGetter($oneOfFields = ["fastSocket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeConfig _secondaryBootDiskUpdateStrategy. - * @member {"secondaryBootDiskUpdateStrategy"|undefined} _secondaryBootDiskUpdateStrategy - * @memberof google.container.v1beta1.NodeConfig - * @instance - */ - Object.defineProperty(NodeConfig.prototype, "_secondaryBootDiskUpdateStrategy", { - get: $util.oneOfGetter($oneOfFields = ["secondaryBootDiskUpdateStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {google.container.v1beta1.INodeConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeConfig} NodeConfig instance - */ - NodeConfig.create = function create(properties) { - return new NodeConfig(properties); - }; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {google.container.v1beta1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.diskSizeGb); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.oauthScopes[i]); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageType); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.localSsdCount); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.preemptible); - if (message.accelerators != null && message.accelerators.length) - for (var i = 0; i < message.accelerators.length; ++i) - $root.google.container.v1beta1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.diskType); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.minCpuPlatform); - if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) - $root.google.container.v1beta1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.container.v1beta1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.sandboxConfig != null && Object.hasOwnProperty.call(message, "sandboxConfig")) - $root.google.container.v1beta1.SandboxConfig.encode(message.sandboxConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.nodeGroup != null && Object.hasOwnProperty.call(message, "nodeGroup")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.nodeGroup); - if (message.reservationAffinity != null && Object.hasOwnProperty.call(message, "reservationAffinity")) - $root.google.container.v1beta1.ReservationAffinity.encode(message.reservationAffinity, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) - $root.google.container.v1beta1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) - $root.google.container.v1beta1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.bootDiskKmsKey); - if (message.ephemeralStorageConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageConfig")) - $root.google.container.v1beta1.EphemeralStorageConfig.encode(message.ephemeralStorageConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.container.v1beta1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) - $root.google.container.v1beta1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.spot != null && Object.hasOwnProperty.call(message, "spot")) - writer.uint32(/* id 32, wireType 0 =*/256).bool(message.spot); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) - $root.google.container.v1beta1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 37, wireType 2 =*/298).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) - $root.google.container.v1beta1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.localNvmeSsdBlockConfig != null && Object.hasOwnProperty.call(message, "localNvmeSsdBlockConfig")) - $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.encode(message.localNvmeSsdBlockConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.ephemeralStorageLocalSsdConfig != null && Object.hasOwnProperty.call(message, "ephemeralStorageLocalSsdConfig")) - $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.encode(message.ephemeralStorageLocalSsdConfig, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.soleTenantConfig != null && Object.hasOwnProperty.call(message, "soleTenantConfig")) - $root.google.container.v1beta1.SoleTenantConfig.encode(message.soleTenantConfig, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.hostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "hostMaintenancePolicy")) - $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.hostMaintenancePolicy, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.enableConfidentialStorage != null && Object.hasOwnProperty.call(message, "enableConfidentialStorage")) - writer.uint32(/* id 46, wireType 0 =*/368).bool(message.enableConfidentialStorage); - if (message.secondaryBootDisks != null && message.secondaryBootDisks.length) - for (var i = 0; i < message.secondaryBootDisks.length; ++i) - $root.google.container.v1beta1.SecondaryBootDisk.encode(message.secondaryBootDisks[i], writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) - $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {google.container.v1beta1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - case 2: { - message.diskSizeGb = reader.int32(); - break; - } - case 3: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 9: { - message.serviceAccount = reader.string(); - break; - } - case 4: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; - break; - } - case 5: { - message.imageType = reader.string(); - break; - } - case 6: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 7: { - message.localSsdCount = reader.int32(); - break; - } - case 8: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 10: { - message.preemptible = reader.bool(); - break; - } - case 11: { - if (!(message.accelerators && message.accelerators.length)) - message.accelerators = []; - message.accelerators.push($root.google.container.v1beta1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 17: { - message.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.nodeGroup = reader.string(); - break; - } - case 19: { - message.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.decode(reader, reader.uint32()); - break; - } - case 12: { - message.diskType = reader.string(); - break; - } - case 13: { - message.minCpuPlatform = reader.string(); - break; - } - case 14: { - message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.container.v1beta1.NodeTaint.decode(reader, reader.uint32())); - break; - } - case 23: { - message.bootDiskKmsKey = reader.string(); - break; - } - case 20: { - message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 24: { - message.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.decode(reader, reader.uint32()); - break; - } - case 25: { - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 26: { - message.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 29: { - message.gvnic = $root.google.container.v1beta1.VirtualNIC.decode(reader, reader.uint32()); - break; - } - case 32: { - message.spot = reader.bool(); - break; - } - case 35: { - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 36: { - message.fastSocket = $root.google.container.v1beta1.FastSocket.decode(reader, reader.uint32()); - break; - } - case 37: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 38: { - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 39: { - message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.decode(reader, reader.uint32()); - break; - } - case 40: { - message.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.decode(reader, reader.uint32()); - break; - } - case 41: { - message.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.decode(reader, reader.uint32()); - break; - } - case 42: { - message.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.decode(reader, reader.uint32()); - break; - } - case 43: { - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 44: { - message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 45: { - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 46: { - message.enableConfidentialStorage = reader.bool(); - break; - } - case 48: { - if (!(message.secondaryBootDisks && message.secondaryBootDisks.length)) - message.secondaryBootDisks = []; - message.secondaryBootDisks.push($root.google.container.v1beta1.SecondaryBootDisk.decode(reader, reader.uint32())); - break; - } - case 50: { - message.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfig message. - * @function verify - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - if (message.accelerators != null && message.hasOwnProperty("accelerators")) { - if (!Array.isArray(message.accelerators)) - return "accelerators: array expected"; - for (var i = 0; i < message.accelerators.length; ++i) { - var error = $root.google.container.v1beta1.AcceleratorConfig.verify(message.accelerators[i]); - if (error) - return "accelerators." + error; - } - } - if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) { - var error = $root.google.container.v1beta1.SandboxConfig.verify(message.sandboxConfig); - if (error) - return "sandboxConfig." + error; - } - if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) - if (!$util.isString(message.nodeGroup)) - return "nodeGroup: string expected"; - if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) { - var error = $root.google.container.v1beta1.ReservationAffinity.verify(message.reservationAffinity); - if (error) - return "reservationAffinity." + error; - } - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { - var error = $root.google.container.v1beta1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); - if (error) - return "workloadMetadataConfig." + 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.container.v1beta1.NodeTaint.verify(message.taints[i]); - if (error) - return "taints." + error; - } - } - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - if (!$util.isString(message.bootDiskKmsKey)) - return "bootDiskKmsKey: string expected"; - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { - var error = $root.google.container.v1beta1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); - if (error) - return "shieldedInstanceConfig." + error; - } - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { - var error = $root.google.container.v1beta1.LinuxNodeConfig.verify(message.linuxNodeConfig); - if (error) - return "linuxNodeConfig." + error; - } - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.kubeletConfig); - if (error) - return "kubeletConfig." + error; - } - if (message.ephemeralStorageConfig != null && message.hasOwnProperty("ephemeralStorageConfig")) { - var error = $root.google.container.v1beta1.EphemeralStorageConfig.verify(message.ephemeralStorageConfig); - if (error) - return "ephemeralStorageConfig." + error; - } - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - var error = $root.google.container.v1beta1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); - if (error) - return "advancedMachineFeatures." + error; - } - if (message.gvnic != null && message.hasOwnProperty("gvnic")) { - var error = $root.google.container.v1beta1.VirtualNIC.verify(message.gvnic); - if (error) - return "gvnic." + error; - } - if (message.spot != null && message.hasOwnProperty("spot")) - if (typeof message.spot !== "boolean") - return "spot: boolean expected"; - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - properties._fastSocket = 1; - { - var error = $root.google.container.v1beta1.FastSocket.verify(message.fastSocket); - if (error) - return "fastSocket." + error; - } - } - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { - var error = $root.google.container.v1beta1.WindowsNodeConfig.verify(message.windowsNodeConfig); - if (error) - return "windowsNodeConfig." + error; - } - if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) { - var error = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.verify(message.localNvmeSsdBlockConfig); - if (error) - return "localNvmeSsdBlockConfig." + error; - } - if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) { - var error = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify(message.ephemeralStorageLocalSsdConfig); - if (error) - return "ephemeralStorageLocalSsdConfig." + error; - } - if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) { - var error = $root.google.container.v1beta1.SoleTenantConfig.verify(message.soleTenantConfig); - if (error) - return "soleTenantConfig." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) { - var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.hostMaintenancePolicy); - if (error) - return "hostMaintenancePolicy." + error; - } - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) - if (typeof message.enableConfidentialStorage !== "boolean") - return "enableConfidentialStorage: boolean expected"; - if (message.secondaryBootDisks != null && message.hasOwnProperty("secondaryBootDisks")) { - if (!Array.isArray(message.secondaryBootDisks)) - return "secondaryBootDisks: array expected"; - for (var i = 0; i < message.secondaryBootDisks.length; ++i) { - var error = $root.google.container.v1beta1.SecondaryBootDisk.verify(message.secondaryBootDisks[i]); - if (error) - return "secondaryBootDisks." + error; - } - } - if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { - properties._secondaryBootDiskUpdateStrategy = 1; - { - var error = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify(message.secondaryBootDiskUpdateStrategy); - if (error) - return "secondaryBootDiskUpdateStrategy." + error; - } - } - return null; - }; - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeConfig} NodeConfig - */ - NodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeConfig) - return object; - var message = new $root.google.container.v1beta1.NodeConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.container.v1beta1.NodeConfig.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.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.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.container.v1beta1.NodeConfig.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.accelerators) { - if (!Array.isArray(object.accelerators)) - throw TypeError(".google.container.v1beta1.NodeConfig.accelerators: array expected"); - message.accelerators = []; - for (var i = 0; i < object.accelerators.length; ++i) { - if (typeof object.accelerators[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.accelerators: object expected"); - message.accelerators[i] = $root.google.container.v1beta1.AcceleratorConfig.fromObject(object.accelerators[i]); - } - } - if (object.sandboxConfig != null) { - if (typeof object.sandboxConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.sandboxConfig: object expected"); - message.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.fromObject(object.sandboxConfig); - } - if (object.nodeGroup != null) - message.nodeGroup = String(object.nodeGroup); - if (object.reservationAffinity != null) { - if (typeof object.reservationAffinity !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.reservationAffinity: object expected"); - message.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.fromObject(object.reservationAffinity); - } - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.workloadMetadataConfig != null) { - if (typeof object.workloadMetadataConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.workloadMetadataConfig: object expected"); - message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); - } - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.container.v1beta1.NodeConfig.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.taints: object expected"); - message.taints[i] = $root.google.container.v1beta1.NodeTaint.fromObject(object.taints[i]); - } - } - if (object.bootDiskKmsKey != null) - message.bootDiskKmsKey = String(object.bootDiskKmsKey); - if (object.shieldedInstanceConfig != null) { - if (typeof object.shieldedInstanceConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.shieldedInstanceConfig: object expected"); - message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); - } - if (object.linuxNodeConfig != null) { - if (typeof object.linuxNodeConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.linuxNodeConfig: object expected"); - message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); - } - if (object.kubeletConfig != null) { - if (typeof object.kubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.kubeletConfig: object expected"); - message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.kubeletConfig); - } - if (object.ephemeralStorageConfig != null) { - if (typeof object.ephemeralStorageConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.ephemeralStorageConfig: object expected"); - message.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.fromObject(object.ephemeralStorageConfig); - } - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.gvnic != null) { - if (typeof object.gvnic !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.gvnic: object expected"); - message.gvnic = $root.google.container.v1beta1.VirtualNIC.fromObject(object.gvnic); - } - if (object.spot != null) - message.spot = Boolean(object.spot); - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.fastSocket != null) { - if (typeof object.fastSocket !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.fastSocket: object expected"); - message.fastSocket = $root.google.container.v1beta1.FastSocket.fromObject(object.fastSocket); - } - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.windowsNodeConfig != null) { - if (typeof object.windowsNodeConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.windowsNodeConfig: object expected"); - message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); - } - if (object.localNvmeSsdBlockConfig != null) { - if (typeof object.localNvmeSsdBlockConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.localNvmeSsdBlockConfig: object expected"); - message.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.fromObject(object.localNvmeSsdBlockConfig); - } - if (object.ephemeralStorageLocalSsdConfig != null) { - if (typeof object.ephemeralStorageLocalSsdConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.ephemeralStorageLocalSsdConfig: object expected"); - message.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.fromObject(object.ephemeralStorageLocalSsdConfig); - } - if (object.soleTenantConfig != null) { - if (typeof object.soleTenantConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.soleTenantConfig: object expected"); - message.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.fromObject(object.soleTenantConfig); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.hostMaintenancePolicy != null) { - if (typeof object.hostMaintenancePolicy !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.hostMaintenancePolicy: object expected"); - message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.hostMaintenancePolicy); - } - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.enableConfidentialStorage != null) - message.enableConfidentialStorage = Boolean(object.enableConfidentialStorage); - if (object.secondaryBootDisks) { - if (!Array.isArray(object.secondaryBootDisks)) - throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDisks: array expected"); - message.secondaryBootDisks = []; - for (var i = 0; i < object.secondaryBootDisks.length; ++i) { - if (typeof object.secondaryBootDisks[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDisks: object expected"); - message.secondaryBootDisks[i] = $root.google.container.v1beta1.SecondaryBootDisk.fromObject(object.secondaryBootDisks[i]); - } - } - if (object.secondaryBootDiskUpdateStrategy != null) { - if (typeof object.secondaryBootDiskUpdateStrategy !== "object") - throw TypeError(".google.container.v1beta1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); - message.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); - } - return message; - }; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {google.container.v1beta1.NodeConfig} message NodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.oauthScopes = []; - object.tags = []; - object.accelerators = []; - object.taints = []; - object.secondaryBootDisks = []; - } - if (options.objects || options.defaults) { - object.metadata = {}; - object.labels = {}; - object.resourceLabels = {}; - } - if (options.defaults) { - object.machineType = ""; - object.diskSizeGb = 0; - object.imageType = ""; - object.localSsdCount = 0; - object.serviceAccount = ""; - object.preemptible = false; - object.diskType = ""; - object.minCpuPlatform = ""; - object.workloadMetadataConfig = null; - object.sandboxConfig = null; - object.nodeGroup = ""; - object.reservationAffinity = null; - object.shieldedInstanceConfig = null; - object.linuxNodeConfig = null; - object.kubeletConfig = null; - object.bootDiskKmsKey = ""; - object.ephemeralStorageConfig = null; - object.gcfsConfig = null; - object.advancedMachineFeatures = null; - object.gvnic = null; - object.spot = false; - object.confidentialNodes = null; - object.loggingConfig = null; - object.windowsNodeConfig = null; - object.localNvmeSsdBlockConfig = null; - object.ephemeralStorageLocalSsdConfig = null; - object.soleTenantConfig = null; - object.containerdConfig = null; - object.hostMaintenancePolicy = null; - object.resourceManagerTags = null; - object.enableConfidentialStorage = false; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - 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.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.preemptible != null && message.hasOwnProperty("preemptible")) - object.preemptible = message.preemptible; - if (message.accelerators && message.accelerators.length) { - object.accelerators = []; - for (var j = 0; j < message.accelerators.length; ++j) - object.accelerators[j] = $root.google.container.v1beta1.AcceleratorConfig.toObject(message.accelerators[j], options); - } - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - object.minCpuPlatform = message.minCpuPlatform; - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) - object.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.container.v1beta1.NodeTaint.toObject(message.taints[j], options); - } - if (message.sandboxConfig != null && message.hasOwnProperty("sandboxConfig")) - object.sandboxConfig = $root.google.container.v1beta1.SandboxConfig.toObject(message.sandboxConfig, options); - if (message.nodeGroup != null && message.hasOwnProperty("nodeGroup")) - object.nodeGroup = message.nodeGroup; - if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) - object.reservationAffinity = $root.google.container.v1beta1.ReservationAffinity.toObject(message.reservationAffinity, options); - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) - object.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) - object.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) - object.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.kubeletConfig, options); - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - object.bootDiskKmsKey = message.bootDiskKmsKey; - if (message.ephemeralStorageConfig != null && message.hasOwnProperty("ephemeralStorageConfig")) - object.ephemeralStorageConfig = $root.google.container.v1beta1.EphemeralStorageConfig.toObject(message.ephemeralStorageConfig, options); - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) - object.advancedMachineFeatures = $root.google.container.v1beta1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (message.gvnic != null && message.hasOwnProperty("gvnic")) - object.gvnic = $root.google.container.v1beta1.VirtualNIC.toObject(message.gvnic, options); - if (message.spot != null && message.hasOwnProperty("spot")) - object.spot = message.spot; - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - object.fastSocket = $root.google.container.v1beta1.FastSocket.toObject(message.fastSocket, options); - if (options.oneofs) - object._fastSocket = "fastSocket"; - } - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) - object.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); - if (message.localNvmeSsdBlockConfig != null && message.hasOwnProperty("localNvmeSsdBlockConfig")) - object.localNvmeSsdBlockConfig = $root.google.container.v1beta1.LocalNvmeSsdBlockConfig.toObject(message.localNvmeSsdBlockConfig, options); - if (message.ephemeralStorageLocalSsdConfig != null && message.hasOwnProperty("ephemeralStorageLocalSsdConfig")) - object.ephemeralStorageLocalSsdConfig = $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig.toObject(message.ephemeralStorageLocalSsdConfig, options); - if (message.soleTenantConfig != null && message.hasOwnProperty("soleTenantConfig")) - object.soleTenantConfig = $root.google.container.v1beta1.SoleTenantConfig.toObject(message.soleTenantConfig, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) - object.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.hostMaintenancePolicy, options); - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.enableConfidentialStorage != null && message.hasOwnProperty("enableConfidentialStorage")) - object.enableConfidentialStorage = message.enableConfidentialStorage; - if (message.secondaryBootDisks && message.secondaryBootDisks.length) { - object.secondaryBootDisks = []; - for (var j = 0; j < message.secondaryBootDisks.length; ++j) - object.secondaryBootDisks[j] = $root.google.container.v1beta1.SecondaryBootDisk.toObject(message.secondaryBootDisks[j], options); - } - if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { - object.secondaryBootDiskUpdateStrategy = $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy.toObject(message.secondaryBootDiskUpdateStrategy, options); - if (options.oneofs) - object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; - } - return object; - }; - - /** - * Converts this NodeConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeConfig - * @instance - * @returns {Object.} JSON object - */ - NodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeConfig"; - }; - - return NodeConfig; - })(); - - v1beta1.AdvancedMachineFeatures = (function() { - - /** - * Properties of an AdvancedMachineFeatures. - * @memberof google.container.v1beta1 - * @interface IAdvancedMachineFeatures - * @property {number|Long|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - */ - - /** - * Constructs a new AdvancedMachineFeatures. - * @memberof google.container.v1beta1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures - * @constructor - * @param {google.container.v1beta1.IAdvancedMachineFeatures=} [properties] Properties to set - */ - function AdvancedMachineFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|Long|null|undefined} threadsPerCore - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {google.container.v1beta1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures instance - */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); - }; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {google.container.v1beta1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.threadsPerCore); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNestedVirtualization); - return writer; - }; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedMachineFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {google.container.v1beta1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdvancedMachineFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.threadsPerCore = reader.int64(); - break; - } - case 2: { - message.enableNestedVirtualization = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedMachineFeatures message. - * @function verify - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedMachineFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore) && !(message.threadsPerCore && $util.isInteger(message.threadsPerCore.low) && $util.isInteger(message.threadsPerCore.high))) - return "threadsPerCore: integer|Long expected"; - } - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AdvancedMachineFeatures} AdvancedMachineFeatures - */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AdvancedMachineFeatures) - return object; - var message = new $root.google.container.v1beta1.AdvancedMachineFeatures(); - if (object.threadsPerCore != null) - if ($util.Long) - (message.threadsPerCore = $util.Long.fromValue(object.threadsPerCore)).unsigned = false; - else if (typeof object.threadsPerCore === "string") - message.threadsPerCore = parseInt(object.threadsPerCore, 10); - else if (typeof object.threadsPerCore === "number") - message.threadsPerCore = object.threadsPerCore; - else if (typeof object.threadsPerCore === "object") - message.threadsPerCore = new $util.LongBits(object.threadsPerCore.low >>> 0, object.threadsPerCore.high >>> 0).toNumber(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - return message; - }; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {google.container.v1beta1.AdvancedMachineFeatures} message AdvancedMachineFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - if (typeof message.threadsPerCore === "number") - object.threadsPerCore = options.longs === String ? String(message.threadsPerCore) : message.threadsPerCore; - else - object.threadsPerCore = options.longs === String ? $util.Long.prototype.toString.call(message.threadsPerCore) : options.longs === Number ? new $util.LongBits(message.threadsPerCore.low >>> 0, message.threadsPerCore.high >>> 0).toNumber() : message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - return object; - }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @instance - * @returns {Object.} JSON object - */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @function getTypeUrl - * @memberof google.container.v1beta1.AdvancedMachineFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AdvancedMachineFeatures"; - }; - - return AdvancedMachineFeatures; - })(); - - v1beta1.NodeNetworkConfig = (function() { - - /** - * Properties of a NodeNetworkConfig. - * @memberof google.container.v1beta1 - * @interface INodeNetworkConfig - * @property {boolean|null} [createPodRange] NodeNetworkConfig createPodRange - * @property {string|null} [podRange] NodeNetworkConfig podRange - * @property {string|null} [podIpv4CidrBlock] NodeNetworkConfig podIpv4CidrBlock - * @property {boolean|null} [enablePrivateNodes] NodeNetworkConfig enablePrivateNodes - * @property {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null} [networkPerformanceConfig] NodeNetworkConfig networkPerformanceConfig - * @property {google.container.v1beta1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] NodeNetworkConfig podCidrOverprovisionConfig - * @property {Array.|null} [additionalNodeNetworkConfigs] NodeNetworkConfig additionalNodeNetworkConfigs - * @property {Array.|null} [additionalPodNetworkConfigs] NodeNetworkConfig additionalPodNetworkConfigs - * @property {number|null} [podIpv4RangeUtilization] NodeNetworkConfig podIpv4RangeUtilization - */ - - /** - * Constructs a new NodeNetworkConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeNetworkConfig. - * @implements INodeNetworkConfig - * @constructor - * @param {google.container.v1beta1.INodeNetworkConfig=} [properties] Properties to set - */ - function NodeNetworkConfig(properties) { - this.additionalNodeNetworkConfigs = []; - this.additionalPodNetworkConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeNetworkConfig createPodRange. - * @member {boolean} createPodRange - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.createPodRange = false; - - /** - * NodeNetworkConfig podRange. - * @member {string} podRange - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podRange = ""; - - /** - * NodeNetworkConfig podIpv4CidrBlock. - * @member {string} podIpv4CidrBlock - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podIpv4CidrBlock = ""; - - /** - * NodeNetworkConfig enablePrivateNodes. - * @member {boolean|null|undefined} enablePrivateNodes - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.enablePrivateNodes = null; - - /** - * NodeNetworkConfig networkPerformanceConfig. - * @member {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.networkPerformanceConfig = null; - - /** - * NodeNetworkConfig podCidrOverprovisionConfig. - * @member {google.container.v1beta1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podCidrOverprovisionConfig = null; - - /** - * NodeNetworkConfig additionalNodeNetworkConfigs. - * @member {Array.} additionalNodeNetworkConfigs - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.additionalNodeNetworkConfigs = $util.emptyArray; - - /** - * NodeNetworkConfig additionalPodNetworkConfigs. - * @member {Array.} additionalPodNetworkConfigs - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.additionalPodNetworkConfigs = $util.emptyArray; - - /** - * NodeNetworkConfig podIpv4RangeUtilization. - * @member {number} podIpv4RangeUtilization - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - NodeNetworkConfig.prototype.podIpv4RangeUtilization = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeNetworkConfig _enablePrivateNodes. - * @member {"enablePrivateNodes"|undefined} _enablePrivateNodes - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - Object.defineProperty(NodeNetworkConfig.prototype, "_enablePrivateNodes", { - get: $util.oneOfGetter($oneOfFields = ["enablePrivateNodes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeNetworkConfig _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - */ - Object.defineProperty(NodeNetworkConfig.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {google.container.v1beta1.INodeNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig instance - */ - NodeNetworkConfig.create = function create(properties) { - return new NodeNetworkConfig(properties); - }; - - /** - * Encodes the specified NodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {google.container.v1beta1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createPodRange != null && Object.hasOwnProperty.call(message, "createPodRange")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.createPodRange); - if (message.podRange != null && Object.hasOwnProperty.call(message, "podRange")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.podRange); - if (message.podIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "podIpv4CidrBlock")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.podIpv4CidrBlock); - if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enablePrivateNodes); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) - $root.google.container.v1beta1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.additionalNodeNetworkConfigs != null && message.additionalNodeNetworkConfigs.length) - for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) - $root.google.container.v1beta1.AdditionalNodeNetworkConfig.encode(message.additionalNodeNetworkConfigs[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.additionalPodNetworkConfigs != null && message.additionalPodNetworkConfigs.length) - for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) - $root.google.container.v1beta1.AdditionalPodNetworkConfig.encode(message.additionalPodNetworkConfigs[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.podIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "podIpv4RangeUtilization")) - writer.uint32(/* id 16, wireType 1 =*/129).double(message.podIpv4RangeUtilization); - return writer; - }; - - /** - * Encodes the specified NodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {google.container.v1beta1.INodeNetworkConfig} message NodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.createPodRange = reader.bool(); - break; - } - case 5: { - message.podRange = reader.string(); - break; - } - case 6: { - message.podIpv4CidrBlock = reader.string(); - break; - } - case 9: { - message.enablePrivateNodes = reader.bool(); - break; - } - case 11: { - message.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 13: { - message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - if (!(message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length)) - message.additionalNodeNetworkConfigs = []; - message.additionalNodeNetworkConfigs.push($root.google.container.v1beta1.AdditionalNodeNetworkConfig.decode(reader, reader.uint32())); - break; - } - case 15: { - if (!(message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length)) - message.additionalPodNetworkConfigs = []; - message.additionalPodNetworkConfigs.push($root.google.container.v1beta1.AdditionalPodNetworkConfig.decode(reader, reader.uint32())); - break; - } - case 16: { - message.podIpv4RangeUtilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeNetworkConfig message. - * @function verify - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) - if (typeof message.createPodRange !== "boolean") - return "createPodRange: boolean expected"; - if (message.podRange != null && message.hasOwnProperty("podRange")) - if (!$util.isString(message.podRange)) - return "podRange: string expected"; - if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) - if (!$util.isString(message.podIpv4CidrBlock)) - return "podIpv4CidrBlock: string expected"; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { - properties._enablePrivateNodes = 1; - if (typeof message.enablePrivateNodes !== "boolean") - return "enablePrivateNodes: boolean expected"; - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { - var error = $root.google.container.v1beta1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); - if (error) - return "podCidrOverprovisionConfig." + error; - } - if (message.additionalNodeNetworkConfigs != null && message.hasOwnProperty("additionalNodeNetworkConfigs")) { - if (!Array.isArray(message.additionalNodeNetworkConfigs)) - return "additionalNodeNetworkConfigs: array expected"; - for (var i = 0; i < message.additionalNodeNetworkConfigs.length; ++i) { - var error = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.verify(message.additionalNodeNetworkConfigs[i]); - if (error) - return "additionalNodeNetworkConfigs." + error; - } - } - if (message.additionalPodNetworkConfigs != null && message.hasOwnProperty("additionalPodNetworkConfigs")) { - if (!Array.isArray(message.additionalPodNetworkConfigs)) - return "additionalPodNetworkConfigs: array expected"; - for (var i = 0; i < message.additionalPodNetworkConfigs.length; ++i) { - var error = $root.google.container.v1beta1.AdditionalPodNetworkConfig.verify(message.additionalPodNetworkConfigs[i]); - if (error) - return "additionalPodNetworkConfigs." + error; - } - } - if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) - if (typeof message.podIpv4RangeUtilization !== "number") - return "podIpv4RangeUtilization: number expected"; - return null; - }; - - /** - * Creates a NodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeNetworkConfig} NodeNetworkConfig - */ - NodeNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeNetworkConfig) - return object; - var message = new $root.google.container.v1beta1.NodeNetworkConfig(); - if (object.createPodRange != null) - message.createPodRange = Boolean(object.createPodRange); - if (object.podRange != null) - message.podRange = String(object.podRange); - if (object.podIpv4CidrBlock != null) - message.podIpv4CidrBlock = String(object.podIpv4CidrBlock); - if (object.enablePrivateNodes != null) - message.enablePrivateNodes = Boolean(object.enablePrivateNodes); - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.podCidrOverprovisionConfig != null) { - if (typeof object.podCidrOverprovisionConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.podCidrOverprovisionConfig: object expected"); - message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); - } - if (object.additionalNodeNetworkConfigs) { - if (!Array.isArray(object.additionalNodeNetworkConfigs)) - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalNodeNetworkConfigs: array expected"); - message.additionalNodeNetworkConfigs = []; - for (var i = 0; i < object.additionalNodeNetworkConfigs.length; ++i) { - if (typeof object.additionalNodeNetworkConfigs[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalNodeNetworkConfigs: object expected"); - message.additionalNodeNetworkConfigs[i] = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.fromObject(object.additionalNodeNetworkConfigs[i]); - } - } - if (object.additionalPodNetworkConfigs) { - if (!Array.isArray(object.additionalPodNetworkConfigs)) - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalPodNetworkConfigs: array expected"); - message.additionalPodNetworkConfigs = []; - for (var i = 0; i < object.additionalPodNetworkConfigs.length; ++i) { - if (typeof object.additionalPodNetworkConfigs[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeNetworkConfig.additionalPodNetworkConfigs: object expected"); - message.additionalPodNetworkConfigs[i] = $root.google.container.v1beta1.AdditionalPodNetworkConfig.fromObject(object.additionalPodNetworkConfigs[i]); - } - } - if (object.podIpv4RangeUtilization != null) - message.podIpv4RangeUtilization = Number(object.podIpv4RangeUtilization); - return message; - }; - - /** - * Creates a plain object from a NodeNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {google.container.v1beta1.NodeNetworkConfig} message NodeNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.additionalNodeNetworkConfigs = []; - object.additionalPodNetworkConfigs = []; - } - if (options.defaults) { - object.createPodRange = false; - object.podRange = ""; - object.podIpv4CidrBlock = ""; - object.podCidrOverprovisionConfig = null; - object.podIpv4RangeUtilization = 0; - } - if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) - object.createPodRange = message.createPodRange; - if (message.podRange != null && message.hasOwnProperty("podRange")) - object.podRange = message.podRange; - if (message.podIpv4CidrBlock != null && message.hasOwnProperty("podIpv4CidrBlock")) - object.podIpv4CidrBlock = message.podIpv4CidrBlock; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) { - object.enablePrivateNodes = message.enablePrivateNodes; - if (options.oneofs) - object._enablePrivateNodes = "enablePrivateNodes"; - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) - object.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); - if (message.additionalNodeNetworkConfigs && message.additionalNodeNetworkConfigs.length) { - object.additionalNodeNetworkConfigs = []; - for (var j = 0; j < message.additionalNodeNetworkConfigs.length; ++j) - object.additionalNodeNetworkConfigs[j] = $root.google.container.v1beta1.AdditionalNodeNetworkConfig.toObject(message.additionalNodeNetworkConfigs[j], options); - } - if (message.additionalPodNetworkConfigs && message.additionalPodNetworkConfigs.length) { - object.additionalPodNetworkConfigs = []; - for (var j = 0; j < message.additionalPodNetworkConfigs.length; ++j) - object.additionalPodNetworkConfigs[j] = $root.google.container.v1beta1.AdditionalPodNetworkConfig.toObject(message.additionalPodNetworkConfigs[j], options); - } - if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) - object.podIpv4RangeUtilization = options.json && !isFinite(message.podIpv4RangeUtilization) ? String(message.podIpv4RangeUtilization) : message.podIpv4RangeUtilization; - return object; - }; - - /** - * Converts this NodeNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NodeNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeNetworkConfig"; - }; - - NodeNetworkConfig.NetworkPerformanceConfig = (function() { - - /** - * Properties of a NetworkPerformanceConfig. - * @memberof google.container.v1beta1.NodeNetworkConfig - * @interface INetworkPerformanceConfig - * @property {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier - * @property {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null} [externalIpEgressBandwidthTier] NetworkPerformanceConfig externalIpEgressBandwidthTier - */ - - /** - * Constructs a new NetworkPerformanceConfig. - * @memberof google.container.v1beta1.NodeNetworkConfig - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig - * @constructor - * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set - */ - function NetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - /** - * NetworkPerformanceConfig externalIpEgressBandwidthTier. - * @member {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier|null|undefined} externalIpEgressBandwidthTier - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.externalIpEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkPerformanceConfig _externalIpEgressBandwidthTier. - * @member {"externalIpEgressBandwidthTier"|undefined} _externalIpEgressBandwidthTier - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_externalIpEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["externalIpEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig instance - */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - if (message.externalIpEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "externalIpEgressBandwidthTier")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.externalIpEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NodeNetworkConfig.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - case 2: { - message.externalIpEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPerformanceConfig message. - * @function verify - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.externalIpEgressBandwidthTier != null && message.hasOwnProperty("externalIpEgressBandwidthTier")) { - properties._externalIpEgressBandwidthTier = 1; - switch (message.externalIpEgressBandwidthTier) { - default: - return "externalIpEgressBandwidthTier: enum value expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} NetworkPerformanceConfig - */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig) - return object; - var message = new $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "TIER_1": - case 1: - message.totalEgressBandwidthTier = 1; - break; - } - switch (object.externalIpEgressBandwidthTier) { - default: - if (typeof object.externalIpEgressBandwidthTier === "number") { - message.externalIpEgressBandwidthTier = object.externalIpEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.externalIpEgressBandwidthTier = 0; - break; - case "TIER_1": - case 1: - message.externalIpEgressBandwidthTier = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig} message NetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - if (message.externalIpEgressBandwidthTier != null && message.hasOwnProperty("externalIpEgressBandwidthTier")) { - object.externalIpEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.externalIpEgressBandwidthTier] === undefined ? message.externalIpEgressBandwidthTier : $root.google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier[message.externalIpEgressBandwidthTier] : message.externalIpEgressBandwidthTier; - if (options.oneofs) - object._externalIpEgressBandwidthTier = "externalIpEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.container.v1beta1.NodeNetworkConfig.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} TIER_1=1 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIER_1"] = 1; - return values; - })(); - - return NetworkPerformanceConfig; - })(); - - return NodeNetworkConfig; - })(); - - v1beta1.AdditionalNodeNetworkConfig = (function() { - - /** - * Properties of an AdditionalNodeNetworkConfig. - * @memberof google.container.v1beta1 - * @interface IAdditionalNodeNetworkConfig - * @property {string|null} [network] AdditionalNodeNetworkConfig network - * @property {string|null} [subnetwork] AdditionalNodeNetworkConfig subnetwork - */ - - /** - * Constructs a new AdditionalNodeNetworkConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AdditionalNodeNetworkConfig. - * @implements IAdditionalNodeNetworkConfig - * @constructor - * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig=} [properties] Properties to set - */ - function AdditionalNodeNetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalNodeNetworkConfig network. - * @member {string} network - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @instance - */ - AdditionalNodeNetworkConfig.prototype.network = ""; - - /** - * AdditionalNodeNetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @instance - */ - AdditionalNodeNetworkConfig.prototype.subnetwork = ""; - - /** - * Creates a new AdditionalNodeNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig instance - */ - AdditionalNodeNetworkConfig.create = function create(properties) { - return new AdditionalNodeNetworkConfig(properties); - }; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalNodeNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - return writer; - }; - - /** - * Encodes the specified AdditionalNodeNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalNodeNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalNodeNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalNodeNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalNodeNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalNodeNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalNodeNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalNodeNetworkConfig message. - * @function verify - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalNodeNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - return null; - }; - - /** - * Creates an AdditionalNodeNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AdditionalNodeNetworkConfig} AdditionalNodeNetworkConfig - */ - AdditionalNodeNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AdditionalNodeNetworkConfig) - return object; - var message = new $root.google.container.v1beta1.AdditionalNodeNetworkConfig(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - return message; - }; - - /** - * Creates a plain object from an AdditionalNodeNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {google.container.v1beta1.AdditionalNodeNetworkConfig} message AdditionalNodeNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalNodeNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.subnetwork = ""; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - return object; - }; - - /** - * Converts this AdditionalNodeNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalNodeNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalNodeNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AdditionalNodeNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalNodeNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AdditionalNodeNetworkConfig"; - }; - - return AdditionalNodeNetworkConfig; - })(); - - v1beta1.AdditionalPodNetworkConfig = (function() { - - /** - * Properties of an AdditionalPodNetworkConfig. - * @memberof google.container.v1beta1 - * @interface IAdditionalPodNetworkConfig - * @property {string|null} [subnetwork] AdditionalPodNetworkConfig subnetwork - * @property {string|null} [secondaryPodRange] AdditionalPodNetworkConfig secondaryPodRange - * @property {google.container.v1beta1.IMaxPodsConstraint|null} [maxPodsPerNode] AdditionalPodNetworkConfig maxPodsPerNode - */ - - /** - * Constructs a new AdditionalPodNetworkConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AdditionalPodNetworkConfig. - * @implements IAdditionalPodNetworkConfig - * @constructor - * @param {google.container.v1beta1.IAdditionalPodNetworkConfig=} [properties] Properties to set - */ - function AdditionalPodNetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalPodNetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.subnetwork = ""; - - /** - * AdditionalPodNetworkConfig secondaryPodRange. - * @member {string} secondaryPodRange - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.secondaryPodRange = ""; - - /** - * AdditionalPodNetworkConfig maxPodsPerNode. - * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} maxPodsPerNode - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @instance - */ - AdditionalPodNetworkConfig.prototype.maxPodsPerNode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdditionalPodNetworkConfig _maxPodsPerNode. - * @member {"maxPodsPerNode"|undefined} _maxPodsPerNode - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @instance - */ - Object.defineProperty(AdditionalPodNetworkConfig.prototype, "_maxPodsPerNode", { - get: $util.oneOfGetter($oneOfFields = ["maxPodsPerNode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdditionalPodNetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodNetworkConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig instance - */ - AdditionalPodNetworkConfig.create = function create(properties) { - return new AdditionalPodNetworkConfig(properties); - }; - - /** - * Encodes the specified AdditionalPodNetworkConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodNetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); - if (message.secondaryPodRange != null && Object.hasOwnProperty.call(message, "secondaryPodRange")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryPodRange); - if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) - $root.google.container.v1beta1.MaxPodsConstraint.encode(message.maxPodsPerNode, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AdditionalPodNetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodNetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodNetworkConfig} message AdditionalPodNetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodNetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalPodNetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.subnetwork = reader.string(); - break; - } - case 2: { - message.secondaryPodRange = reader.string(); - break; - } - case 3: { - message.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalPodNetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodNetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalPodNetworkConfig message. - * @function verify - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalPodNetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) - if (!$util.isString(message.secondaryPodRange)) - return "secondaryPodRange: string expected"; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { - properties._maxPodsPerNode = 1; - { - var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.maxPodsPerNode); - if (error) - return "maxPodsPerNode." + error; - } - } - return null; - }; - - /** - * Creates an AdditionalPodNetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AdditionalPodNetworkConfig} AdditionalPodNetworkConfig - */ - AdditionalPodNetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AdditionalPodNetworkConfig) - return object; - var message = new $root.google.container.v1beta1.AdditionalPodNetworkConfig(); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.secondaryPodRange != null) - message.secondaryPodRange = String(object.secondaryPodRange); - if (object.maxPodsPerNode != null) { - if (typeof object.maxPodsPerNode !== "object") - throw TypeError(".google.container.v1beta1.AdditionalPodNetworkConfig.maxPodsPerNode: object expected"); - message.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.maxPodsPerNode); - } - return message; - }; - - /** - * Creates a plain object from an AdditionalPodNetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {google.container.v1beta1.AdditionalPodNetworkConfig} message AdditionalPodNetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalPodNetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.subnetwork = ""; - object.secondaryPodRange = ""; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.secondaryPodRange != null && message.hasOwnProperty("secondaryPodRange")) - object.secondaryPodRange = message.secondaryPodRange; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) { - object.maxPodsPerNode = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.maxPodsPerNode, options); - if (options.oneofs) - object._maxPodsPerNode = "maxPodsPerNode"; - } - return object; - }; - - /** - * Converts this AdditionalPodNetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalPodNetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalPodNetworkConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AdditionalPodNetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalPodNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AdditionalPodNetworkConfig"; - }; - - return AdditionalPodNetworkConfig; - })(); - - v1beta1.ShieldedInstanceConfig = (function() { - - /** - * Properties of a ShieldedInstanceConfig. - * @memberof google.container.v1beta1 - * @interface IShieldedInstanceConfig - * @property {boolean|null} [enableSecureBoot] ShieldedInstanceConfig enableSecureBoot - * @property {boolean|null} [enableIntegrityMonitoring] ShieldedInstanceConfig enableIntegrityMonitoring - */ - - /** - * Constructs a new ShieldedInstanceConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ShieldedInstanceConfig. - * @implements IShieldedInstanceConfig - * @constructor - * @param {google.container.v1beta1.IShieldedInstanceConfig=} [properties] Properties to set - */ - function ShieldedInstanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShieldedInstanceConfig enableSecureBoot. - * @member {boolean} enableSecureBoot - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @instance - */ - ShieldedInstanceConfig.prototype.enableSecureBoot = false; - - /** - * ShieldedInstanceConfig enableIntegrityMonitoring. - * @member {boolean} enableIntegrityMonitoring - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @instance - */ - ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = false; - - /** - * Creates a new ShieldedInstanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {google.container.v1beta1.IShieldedInstanceConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig instance - */ - ShieldedInstanceConfig.create = function create(properties) { - return new ShieldedInstanceConfig(properties); - }; - - /** - * Encodes the specified ShieldedInstanceConfig message. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {google.container.v1beta1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedInstanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableSecureBoot != null && Object.hasOwnProperty.call(message, "enableSecureBoot")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSecureBoot); - if (message.enableIntegrityMonitoring != null && Object.hasOwnProperty.call(message, "enableIntegrityMonitoring")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableIntegrityMonitoring); - return writer; - }; - - /** - * Encodes the specified ShieldedInstanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedInstanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {google.container.v1beta1.IShieldedInstanceConfig} message ShieldedInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedInstanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ShieldedInstanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableSecureBoot = reader.bool(); - break; - } - case 2: { - message.enableIntegrityMonitoring = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShieldedInstanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedInstanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShieldedInstanceConfig message. - * @function verify - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShieldedInstanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) - if (typeof message.enableSecureBoot !== "boolean") - return "enableSecureBoot: boolean expected"; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) - if (typeof message.enableIntegrityMonitoring !== "boolean") - return "enableIntegrityMonitoring: boolean expected"; - return null; - }; - - /** - * Creates a ShieldedInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ShieldedInstanceConfig} ShieldedInstanceConfig - */ - ShieldedInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ShieldedInstanceConfig) - return object; - var message = new $root.google.container.v1beta1.ShieldedInstanceConfig(); - if (object.enableSecureBoot != null) - message.enableSecureBoot = Boolean(object.enableSecureBoot); - if (object.enableIntegrityMonitoring != null) - message.enableIntegrityMonitoring = Boolean(object.enableIntegrityMonitoring); - return message; - }; - - /** - * Creates a plain object from a ShieldedInstanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {google.container.v1beta1.ShieldedInstanceConfig} message ShieldedInstanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShieldedInstanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableSecureBoot = false; - object.enableIntegrityMonitoring = false; - } - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) - object.enableSecureBoot = message.enableSecureBoot; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) - object.enableIntegrityMonitoring = message.enableIntegrityMonitoring; - return object; - }; - - /** - * Converts this ShieldedInstanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @instance - * @returns {Object.} JSON object - */ - ShieldedInstanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShieldedInstanceConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ShieldedInstanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShieldedInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ShieldedInstanceConfig"; - }; - - return ShieldedInstanceConfig; - })(); - - v1beta1.SandboxConfig = (function() { - - /** - * Properties of a SandboxConfig. - * @memberof google.container.v1beta1 - * @interface ISandboxConfig - * @property {string|null} [sandboxType] SandboxConfig sandboxType - * @property {google.container.v1beta1.SandboxConfig.Type|null} [type] SandboxConfig type - */ - - /** - * Constructs a new SandboxConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a SandboxConfig. - * @implements ISandboxConfig - * @constructor - * @param {google.container.v1beta1.ISandboxConfig=} [properties] Properties to set - */ - function SandboxConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SandboxConfig sandboxType. - * @member {string} sandboxType - * @memberof google.container.v1beta1.SandboxConfig - * @instance - */ - SandboxConfig.prototype.sandboxType = ""; - - /** - * SandboxConfig type. - * @member {google.container.v1beta1.SandboxConfig.Type} type - * @memberof google.container.v1beta1.SandboxConfig - * @instance - */ - SandboxConfig.prototype.type = 0; - - /** - * Creates a new SandboxConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {google.container.v1beta1.ISandboxConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig instance - */ - SandboxConfig.create = function create(properties) { - return new SandboxConfig(properties); - }; - - /** - * Encodes the specified SandboxConfig message. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {google.container.v1beta1.ISandboxConfig} message SandboxConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SandboxConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sandboxType != null && Object.hasOwnProperty.call(message, "sandboxType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sandboxType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified SandboxConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SandboxConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {google.container.v1beta1.ISandboxConfig} message SandboxConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SandboxConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SandboxConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SandboxConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sandboxType = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SandboxConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SandboxConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SandboxConfig message. - * @function verify - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SandboxConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sandboxType != null && message.hasOwnProperty("sandboxType")) - if (!$util.isString(message.sandboxType)) - return "sandboxType: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a SandboxConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SandboxConfig} SandboxConfig - */ - SandboxConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SandboxConfig) - return object; - var message = new $root.google.container.v1beta1.SandboxConfig(); - if (object.sandboxType != null) - message.sandboxType = String(object.sandboxType); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.type = 0; - break; - case "GVISOR": - case 1: - message.type = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a SandboxConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {google.container.v1beta1.SandboxConfig} message SandboxConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SandboxConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sandboxType = ""; - object.type = options.enums === String ? "UNSPECIFIED" : 0; - } - if (message.sandboxType != null && message.hasOwnProperty("sandboxType")) - object.sandboxType = message.sandboxType; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1beta1.SandboxConfig.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.SandboxConfig.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this SandboxConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SandboxConfig - * @instance - * @returns {Object.} JSON object - */ - SandboxConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SandboxConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.SandboxConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SandboxConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SandboxConfig"; - }; - - /** - * Type enum. - * @name google.container.v1beta1.SandboxConfig.Type - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} GVISOR=1 GVISOR value - */ - SandboxConfig.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "GVISOR"] = 1; - return values; - })(); - - return SandboxConfig; - })(); - - v1beta1.EphemeralStorageConfig = (function() { - - /** - * Properties of an EphemeralStorageConfig. - * @memberof google.container.v1beta1 - * @interface IEphemeralStorageConfig - * @property {number|null} [localSsdCount] EphemeralStorageConfig localSsdCount - */ - - /** - * Constructs a new EphemeralStorageConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an EphemeralStorageConfig. - * @implements IEphemeralStorageConfig - * @constructor - * @param {google.container.v1beta1.IEphemeralStorageConfig=} [properties] Properties to set - */ - function EphemeralStorageConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EphemeralStorageConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @instance - */ - EphemeralStorageConfig.prototype.localSsdCount = 0; - - /** - * Creates a new EphemeralStorageConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig instance - */ - EphemeralStorageConfig.create = function create(properties) { - return new EphemeralStorageConfig(properties); - }; - - /** - * Encodes the specified EphemeralStorageConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageConfig} message EphemeralStorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); - return writer; - }; - - /** - * Encodes the specified EphemeralStorageConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageConfig} message EphemeralStorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EphemeralStorageConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EphemeralStorageConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.localSsdCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EphemeralStorageConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EphemeralStorageConfig message. - * @function verify - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EphemeralStorageConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - return null; - }; - - /** - * Creates an EphemeralStorageConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.EphemeralStorageConfig} EphemeralStorageConfig - */ - EphemeralStorageConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.EphemeralStorageConfig) - return object; - var message = new $root.google.container.v1beta1.EphemeralStorageConfig(); - if (object.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - return message; - }; - - /** - * Creates a plain object from an EphemeralStorageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {google.container.v1beta1.EphemeralStorageConfig} message EphemeralStorageConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EphemeralStorageConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localSsdCount = 0; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - return object; - }; - - /** - * Converts this EphemeralStorageConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @instance - * @returns {Object.} JSON object - */ - EphemeralStorageConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EphemeralStorageConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.EphemeralStorageConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EphemeralStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.EphemeralStorageConfig"; - }; - - return EphemeralStorageConfig; - })(); - - v1beta1.LocalNvmeSsdBlockConfig = (function() { - - /** - * Properties of a LocalNvmeSsdBlockConfig. - * @memberof google.container.v1beta1 - * @interface ILocalNvmeSsdBlockConfig - * @property {number|null} [localSsdCount] LocalNvmeSsdBlockConfig localSsdCount - */ - - /** - * Constructs a new LocalNvmeSsdBlockConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a LocalNvmeSsdBlockConfig. - * @implements ILocalNvmeSsdBlockConfig - * @constructor - * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set - */ - function LocalNvmeSsdBlockConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocalNvmeSsdBlockConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @instance - */ - LocalNvmeSsdBlockConfig.prototype.localSsdCount = 0; - - /** - * Creates a new LocalNvmeSsdBlockConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig instance - */ - LocalNvmeSsdBlockConfig.create = function create(properties) { - return new LocalNvmeSsdBlockConfig(properties); - }; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalNvmeSsdBlockConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); - return writer; - }; - - /** - * Encodes the specified LocalNvmeSsdBlockConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LocalNvmeSsdBlockConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1beta1.ILocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalNvmeSsdBlockConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalNvmeSsdBlockConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LocalNvmeSsdBlockConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.localSsdCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocalNvmeSsdBlockConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalNvmeSsdBlockConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocalNvmeSsdBlockConfig message. - * @function verify - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalNvmeSsdBlockConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - return null; - }; - - /** - * Creates a LocalNvmeSsdBlockConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LocalNvmeSsdBlockConfig} LocalNvmeSsdBlockConfig - */ - LocalNvmeSsdBlockConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LocalNvmeSsdBlockConfig) - return object; - var message = new $root.google.container.v1beta1.LocalNvmeSsdBlockConfig(); - if (object.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - return message; - }; - - /** - * Creates a plain object from a LocalNvmeSsdBlockConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {google.container.v1beta1.LocalNvmeSsdBlockConfig} message LocalNvmeSsdBlockConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalNvmeSsdBlockConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localSsdCount = 0; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - return object; - }; - - /** - * Converts this LocalNvmeSsdBlockConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @instance - * @returns {Object.} JSON object - */ - LocalNvmeSsdBlockConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocalNvmeSsdBlockConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LocalNvmeSsdBlockConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocalNvmeSsdBlockConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LocalNvmeSsdBlockConfig"; - }; - - return LocalNvmeSsdBlockConfig; - })(); - - v1beta1.EphemeralStorageLocalSsdConfig = (function() { - - /** - * Properties of an EphemeralStorageLocalSsdConfig. - * @memberof google.container.v1beta1 - * @interface IEphemeralStorageLocalSsdConfig - * @property {number|null} [localSsdCount] EphemeralStorageLocalSsdConfig localSsdCount - */ - - /** - * Constructs a new EphemeralStorageLocalSsdConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an EphemeralStorageLocalSsdConfig. - * @implements IEphemeralStorageLocalSsdConfig - * @constructor - * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set - */ - function EphemeralStorageLocalSsdConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EphemeralStorageLocalSsdConfig localSsdCount. - * @member {number} localSsdCount - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @instance - */ - EphemeralStorageLocalSsdConfig.prototype.localSsdCount = 0; - - /** - * Creates a new EphemeralStorageLocalSsdConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig instance - */ - EphemeralStorageLocalSsdConfig.create = function create(properties) { - return new EphemeralStorageLocalSsdConfig(properties); - }; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageLocalSsdConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localSsdCount != null && Object.hasOwnProperty.call(message, "localSsdCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localSsdCount); - return writer; - }; - - /** - * Encodes the specified EphemeralStorageLocalSsdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EphemeralStorageLocalSsdConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1beta1.IEphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EphemeralStorageLocalSsdConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageLocalSsdConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.localSsdCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EphemeralStorageLocalSsdConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EphemeralStorageLocalSsdConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EphemeralStorageLocalSsdConfig message. - * @function verify - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EphemeralStorageLocalSsdConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - if (!$util.isInteger(message.localSsdCount)) - return "localSsdCount: integer expected"; - return null; - }; - - /** - * Creates an EphemeralStorageLocalSsdConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.EphemeralStorageLocalSsdConfig} EphemeralStorageLocalSsdConfig - */ - EphemeralStorageLocalSsdConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig) - return object; - var message = new $root.google.container.v1beta1.EphemeralStorageLocalSsdConfig(); - if (object.localSsdCount != null) - message.localSsdCount = object.localSsdCount | 0; - return message; - }; - - /** - * Creates a plain object from an EphemeralStorageLocalSsdConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {google.container.v1beta1.EphemeralStorageLocalSsdConfig} message EphemeralStorageLocalSsdConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EphemeralStorageLocalSsdConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localSsdCount = 0; - if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) - object.localSsdCount = message.localSsdCount; - return object; - }; - - /** - * Converts this EphemeralStorageLocalSsdConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @instance - * @returns {Object.} JSON object - */ - EphemeralStorageLocalSsdConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EphemeralStorageLocalSsdConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.EphemeralStorageLocalSsdConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EphemeralStorageLocalSsdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.EphemeralStorageLocalSsdConfig"; - }; - - return EphemeralStorageLocalSsdConfig; - })(); - - v1beta1.GcfsConfig = (function() { - - /** - * Properties of a GcfsConfig. - * @memberof google.container.v1beta1 - * @interface IGcfsConfig - * @property {boolean|null} [enabled] GcfsConfig enabled - */ - - /** - * Constructs a new GcfsConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GcfsConfig. - * @implements IGcfsConfig - * @constructor - * @param {google.container.v1beta1.IGcfsConfig=} [properties] Properties to set - */ - function GcfsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcfsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.GcfsConfig - * @instance - */ - GcfsConfig.prototype.enabled = false; - - /** - * Creates a new GcfsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {google.container.v1beta1.IGcfsConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig instance - */ - GcfsConfig.create = function create(properties) { - return new GcfsConfig(properties); - }; - - /** - * Encodes the specified GcfsConfig message. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {google.container.v1beta1.IGcfsConfig} message GcfsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcfsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcfsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcfsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {google.container.v1beta1.IGcfsConfig} message GcfsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcfsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcfsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcfsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcfsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcfsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcfsConfig message. - * @function verify - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcfsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcfsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GcfsConfig} GcfsConfig - */ - GcfsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GcfsConfig) - return object; - var message = new $root.google.container.v1beta1.GcfsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcfsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {google.container.v1beta1.GcfsConfig} message GcfsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcfsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcfsConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GcfsConfig - * @instance - * @returns {Object.} JSON object - */ - GcfsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcfsConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GcfsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcfsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GcfsConfig"; - }; - - return GcfsConfig; - })(); - - v1beta1.ReservationAffinity = (function() { - - /** - * Properties of a ReservationAffinity. - * @memberof google.container.v1beta1 - * @interface IReservationAffinity - * @property {google.container.v1beta1.ReservationAffinity.Type|null} [consumeReservationType] ReservationAffinity consumeReservationType - * @property {string|null} [key] ReservationAffinity key - * @property {Array.|null} [values] ReservationAffinity values - */ - - /** - * Constructs a new ReservationAffinity. - * @memberof google.container.v1beta1 - * @classdesc Represents a ReservationAffinity. - * @implements IReservationAffinity - * @constructor - * @param {google.container.v1beta1.IReservationAffinity=} [properties] Properties to set - */ - function ReservationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservationAffinity consumeReservationType. - * @member {google.container.v1beta1.ReservationAffinity.Type} consumeReservationType - * @memberof google.container.v1beta1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.consumeReservationType = 0; - - /** - * ReservationAffinity key. - * @member {string} key - * @memberof google.container.v1beta1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.key = ""; - - /** - * ReservationAffinity values. - * @member {Array.} values - * @memberof google.container.v1beta1.ReservationAffinity - * @instance - */ - ReservationAffinity.prototype.values = $util.emptyArray; - - /** - * Creates a new ReservationAffinity instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {google.container.v1beta1.IReservationAffinity=} [properties] Properties to set - * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity instance - */ - ReservationAffinity.create = function create(properties) { - return new ReservationAffinity(properties); - }; - - /** - * Encodes the specified ReservationAffinity message. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {google.container.v1beta1.IReservationAffinity} message ReservationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeReservationType != null && Object.hasOwnProperty.call(message, "consumeReservationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeReservationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified ReservationAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.ReservationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {google.container.v1beta1.IReservationAffinity} message ReservationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservationAffinity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ReservationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeReservationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservationAffinity message. - * @function verify - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) - switch (message.consumeReservationType) { - default: - return "consumeReservationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a ReservationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ReservationAffinity} ReservationAffinity - */ - ReservationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ReservationAffinity) - return object; - var message = new $root.google.container.v1beta1.ReservationAffinity(); - switch (object.consumeReservationType) { - default: - if (typeof object.consumeReservationType === "number") { - message.consumeReservationType = object.consumeReservationType; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.consumeReservationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeReservationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeReservationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeReservationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.container.v1beta1.ReservationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReservationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {google.container.v1beta1.ReservationAffinity} message ReservationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.consumeReservationType = options.enums === String ? "UNSPECIFIED" : 0; - object.key = ""; - } - if (message.consumeReservationType != null && message.hasOwnProperty("consumeReservationType")) - object.consumeReservationType = options.enums === String ? $root.google.container.v1beta1.ReservationAffinity.Type[message.consumeReservationType] === undefined ? message.consumeReservationType : $root.google.container.v1beta1.ReservationAffinity.Type[message.consumeReservationType] : message.consumeReservationType; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this ReservationAffinity to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ReservationAffinity - * @instance - * @returns {Object.} JSON object - */ - ReservationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservationAffinity - * @function getTypeUrl - * @memberof google.container.v1beta1.ReservationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ReservationAffinity"; - }; - - /** - * Type enum. - * @name google.container.v1beta1.ReservationAffinity.Type - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - ReservationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return ReservationAffinity; - })(); - - v1beta1.SoleTenantConfig = (function() { - - /** - * Properties of a SoleTenantConfig. - * @memberof google.container.v1beta1 - * @interface ISoleTenantConfig - * @property {Array.|null} [nodeAffinities] SoleTenantConfig nodeAffinities - */ - - /** - * Constructs a new SoleTenantConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a SoleTenantConfig. - * @implements ISoleTenantConfig - * @constructor - * @param {google.container.v1beta1.ISoleTenantConfig=} [properties] Properties to set - */ - function SoleTenantConfig(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SoleTenantConfig nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.container.v1beta1.SoleTenantConfig - * @instance - */ - SoleTenantConfig.prototype.nodeAffinities = $util.emptyArray; - - /** - * Creates a new SoleTenantConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {google.container.v1beta1.ISoleTenantConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig instance - */ - SoleTenantConfig.create = function create(properties) { - return new SoleTenantConfig(properties); - }; - - /** - * Encodes the specified SoleTenantConfig message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {google.container.v1beta1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoleTenantConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SoleTenantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {google.container.v1beta1.ISoleTenantConfig} message SoleTenantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoleTenantConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoleTenantConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SoleTenantConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SoleTenantConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoleTenantConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SoleTenantConfig message. - * @function verify - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoleTenantConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - return null; - }; - - /** - * Creates a SoleTenantConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SoleTenantConfig} SoleTenantConfig - */ - SoleTenantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SoleTenantConfig) - return object; - var message = new $root.google.container.v1beta1.SoleTenantConfig(); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.container.v1beta1.SoleTenantConfig.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.container.v1beta1.SoleTenantConfig.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SoleTenantConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {google.container.v1beta1.SoleTenantConfig} message SoleTenantConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoleTenantConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - return object; - }; - - /** - * Converts this SoleTenantConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SoleTenantConfig - * @instance - * @returns {Object.} JSON object - */ - SoleTenantConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SoleTenantConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.SoleTenantConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SoleTenantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SoleTenantConfig"; - }; - - SoleTenantConfig.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.container.v1beta1.SoleTenantConfig - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.container.v1beta1.SoleTenantConfig - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string} key - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = ""; - - /** - * NodeAffinity operator. - * @member {google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator} operator - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = 0; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity=} [properties] Properties to set - * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.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.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.container.v1beta1.SoleTenantConfig.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1beta1.SoleTenantConfig.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.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.operator != null && message.hasOwnProperty("operator")) - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SoleTenantConfig.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity) - return object; - var message = new $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.container.v1beta1.SoleTenantConfig.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {google.container.v1beta1.SoleTenantConfig.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.key = ""; - object.operator = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.operator != null && message.hasOwnProperty("operator")) - object.operator = options.enums === String ? $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator[message.operator] : message.operator; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.container.v1beta1.SoleTenantConfig.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SoleTenantConfig.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.container.v1beta1.SoleTenantConfig.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - return SoleTenantConfig; - })(); - - v1beta1.ContainerdConfig = (function() { - - /** - * Properties of a ContainerdConfig. - * @memberof google.container.v1beta1 - * @interface IContainerdConfig - * @property {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null} [privateRegistryAccessConfig] ContainerdConfig privateRegistryAccessConfig - */ - - /** - * Constructs a new ContainerdConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ContainerdConfig. - * @implements IContainerdConfig - * @constructor - * @param {google.container.v1beta1.IContainerdConfig=} [properties] Properties to set - */ - function ContainerdConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContainerdConfig privateRegistryAccessConfig. - * @member {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig|null|undefined} privateRegistryAccessConfig - * @memberof google.container.v1beta1.ContainerdConfig - * @instance - */ - ContainerdConfig.prototype.privateRegistryAccessConfig = null; - - /** - * Creates a new ContainerdConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {google.container.v1beta1.IContainerdConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig instance - */ - ContainerdConfig.create = function create(properties) { - return new ContainerdConfig(properties); - }; - - /** - * Encodes the specified ContainerdConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {google.container.v1beta1.IContainerdConfig} message ContainerdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerdConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.privateRegistryAccessConfig != null && Object.hasOwnProperty.call(message, "privateRegistryAccessConfig")) - $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.encode(message.privateRegistryAccessConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContainerdConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {google.container.v1beta1.IContainerdConfig} message ContainerdConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerdConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerdConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContainerdConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerdConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContainerdConfig message. - * @function verify - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContainerdConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) { - var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify(message.privateRegistryAccessConfig); - if (error) - return "privateRegistryAccessConfig." + error; - } - return null; - }; - - /** - * Creates a ContainerdConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ContainerdConfig} ContainerdConfig - */ - ContainerdConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ContainerdConfig) - return object; - var message = new $root.google.container.v1beta1.ContainerdConfig(); - if (object.privateRegistryAccessConfig != null) { - if (typeof object.privateRegistryAccessConfig !== "object") - throw TypeError(".google.container.v1beta1.ContainerdConfig.privateRegistryAccessConfig: object expected"); - message.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.fromObject(object.privateRegistryAccessConfig); - } - return message; - }; - - /** - * Creates a plain object from a ContainerdConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig} message ContainerdConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContainerdConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.privateRegistryAccessConfig = null; - if (message.privateRegistryAccessConfig != null && message.hasOwnProperty("privateRegistryAccessConfig")) - object.privateRegistryAccessConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.toObject(message.privateRegistryAccessConfig, options); - return object; - }; - - /** - * Converts this ContainerdConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ContainerdConfig - * @instance - * @returns {Object.} JSON object - */ - ContainerdConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContainerdConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ContainerdConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContainerdConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig"; - }; - - ContainerdConfig.PrivateRegistryAccessConfig = (function() { - - /** - * Properties of a PrivateRegistryAccessConfig. - * @memberof google.container.v1beta1.ContainerdConfig - * @interface IPrivateRegistryAccessConfig - * @property {boolean|null} [enabled] PrivateRegistryAccessConfig enabled - * @property {Array.|null} [certificateAuthorityDomainConfig] PrivateRegistryAccessConfig certificateAuthorityDomainConfig - */ - - /** - * Constructs a new PrivateRegistryAccessConfig. - * @memberof google.container.v1beta1.ContainerdConfig - * @classdesc Represents a PrivateRegistryAccessConfig. - * @implements IPrivateRegistryAccessConfig - * @constructor - * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set - */ - function PrivateRegistryAccessConfig(properties) { - this.certificateAuthorityDomainConfig = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateRegistryAccessConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - */ - PrivateRegistryAccessConfig.prototype.enabled = false; - - /** - * PrivateRegistryAccessConfig certificateAuthorityDomainConfig. - * @member {Array.} certificateAuthorityDomainConfig - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - */ - PrivateRegistryAccessConfig.prototype.certificateAuthorityDomainConfig = $util.emptyArray; - - /** - * Creates a new PrivateRegistryAccessConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig instance - */ - PrivateRegistryAccessConfig.create = function create(properties) { - return new PrivateRegistryAccessConfig(properties); - }; - - /** - * Encodes the specified PrivateRegistryAccessConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateRegistryAccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.certificateAuthorityDomainConfig != null && message.certificateAuthorityDomainConfig.length) - for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) - $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.encode(message.certificateAuthorityDomainConfig[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PrivateRegistryAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.IPrivateRegistryAccessConfig} message PrivateRegistryAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateRegistryAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateRegistryAccessConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length)) - message.certificateAuthorityDomainConfig = []; - message.certificateAuthorityDomainConfig.push($root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateRegistryAccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateRegistryAccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateRegistryAccessConfig message. - * @function verify - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateRegistryAccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.certificateAuthorityDomainConfig != null && message.hasOwnProperty("certificateAuthorityDomainConfig")) { - if (!Array.isArray(message.certificateAuthorityDomainConfig)) - return "certificateAuthorityDomainConfig: array expected"; - for (var i = 0; i < message.certificateAuthorityDomainConfig.length; ++i) { - var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify(message.certificateAuthorityDomainConfig[i]); - if (error) - return "certificateAuthorityDomainConfig." + error; - } - } - return null; - }; - - /** - * Creates a PrivateRegistryAccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} PrivateRegistryAccessConfig - */ - PrivateRegistryAccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig) - return object; - var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.certificateAuthorityDomainConfig) { - if (!Array.isArray(object.certificateAuthorityDomainConfig)) - throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: array expected"); - message.certificateAuthorityDomainConfig = []; - for (var i = 0; i < object.certificateAuthorityDomainConfig.length; ++i) { - if (typeof object.certificateAuthorityDomainConfig[i] !== "object") - throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.certificateAuthorityDomainConfig: object expected"); - message.certificateAuthorityDomainConfig[i] = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fromObject(object.certificateAuthorityDomainConfig[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PrivateRegistryAccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig} message PrivateRegistryAccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateRegistryAccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.certificateAuthorityDomainConfig = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.certificateAuthorityDomainConfig && message.certificateAuthorityDomainConfig.length) { - object.certificateAuthorityDomainConfig = []; - for (var j = 0; j < message.certificateAuthorityDomainConfig.length; ++j) - object.certificateAuthorityDomainConfig[j] = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.toObject(message.certificateAuthorityDomainConfig[j], options); - } - return object; - }; - - /** - * Converts this PrivateRegistryAccessConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateRegistryAccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateRegistryAccessConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateRegistryAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig"; - }; - - PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig = (function() { - - /** - * Properties of a CertificateAuthorityDomainConfig. - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @interface ICertificateAuthorityDomainConfig - * @property {Array.|null} [fqdns] CertificateAuthorityDomainConfig fqdns - * @property {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null} [gcpSecretManagerCertificateConfig] CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig - */ - - /** - * Constructs a new CertificateAuthorityDomainConfig. - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig - * @classdesc Represents a CertificateAuthorityDomainConfig. - * @implements ICertificateAuthorityDomainConfig - * @constructor - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set - */ - function CertificateAuthorityDomainConfig(properties) { - this.fqdns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CertificateAuthorityDomainConfig fqdns. - * @member {Array.} fqdns - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - CertificateAuthorityDomainConfig.prototype.fqdns = $util.emptyArray; - - /** - * CertificateAuthorityDomainConfig gcpSecretManagerCertificateConfig. - * @member {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig|null|undefined} gcpSecretManagerCertificateConfig - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - CertificateAuthorityDomainConfig.prototype.gcpSecretManagerCertificateConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CertificateAuthorityDomainConfig certificateConfig. - * @member {"gcpSecretManagerCertificateConfig"|undefined} certificateConfig - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - */ - Object.defineProperty(CertificateAuthorityDomainConfig.prototype, "certificateConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpSecretManagerCertificateConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CertificateAuthorityDomainConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig instance - */ - CertificateAuthorityDomainConfig.create = function create(properties) { - return new CertificateAuthorityDomainConfig(properties); - }; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertificateAuthorityDomainConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fqdns != null && message.fqdns.length) - for (var i = 0; i < message.fqdns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fqdns[i]); - if (message.gcpSecretManagerCertificateConfig != null && Object.hasOwnProperty.call(message, "gcpSecretManagerCertificateConfig")) - $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.encode(message.gcpSecretManagerCertificateConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CertificateAuthorityDomainConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.ICertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertificateAuthorityDomainConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertificateAuthorityDomainConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fqdns && message.fqdns.length)) - message.fqdns = []; - message.fqdns.push(reader.string()); - break; - } - case 2: { - message.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CertificateAuthorityDomainConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertificateAuthorityDomainConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CertificateAuthorityDomainConfig message. - * @function verify - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CertificateAuthorityDomainConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fqdns != null && message.hasOwnProperty("fqdns")) { - if (!Array.isArray(message.fqdns)) - return "fqdns: array expected"; - for (var i = 0; i < message.fqdns.length; ++i) - if (!$util.isString(message.fqdns[i])) - return "fqdns: string[] expected"; - } - if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { - properties.certificateConfig = 1; - { - var error = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify(message.gcpSecretManagerCertificateConfig); - if (error) - return "gcpSecretManagerCertificateConfig." + error; - } - } - return null; - }; - - /** - * Creates a CertificateAuthorityDomainConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} CertificateAuthorityDomainConfig - */ - CertificateAuthorityDomainConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig) - return object; - var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig(); - if (object.fqdns) { - if (!Array.isArray(object.fqdns)) - throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.fqdns: array expected"); - message.fqdns = []; - for (var i = 0; i < object.fqdns.length; ++i) - message.fqdns[i] = String(object.fqdns[i]); - } - if (object.gcpSecretManagerCertificateConfig != null) { - if (typeof object.gcpSecretManagerCertificateConfig !== "object") - throw TypeError(".google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig: object expected"); - message.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.fromObject(object.gcpSecretManagerCertificateConfig); - } - return message; - }; - - /** - * Creates a plain object from a CertificateAuthorityDomainConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig} message CertificateAuthorityDomainConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CertificateAuthorityDomainConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fqdns = []; - if (message.fqdns && message.fqdns.length) { - object.fqdns = []; - for (var j = 0; j < message.fqdns.length; ++j) - object.fqdns[j] = message.fqdns[j]; - } - if (message.gcpSecretManagerCertificateConfig != null && message.hasOwnProperty("gcpSecretManagerCertificateConfig")) { - object.gcpSecretManagerCertificateConfig = $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.toObject(message.gcpSecretManagerCertificateConfig, options); - if (options.oneofs) - object.certificateConfig = "gcpSecretManagerCertificateConfig"; - } - return object; - }; - - /** - * Converts this CertificateAuthorityDomainConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @instance - * @returns {Object.} JSON object - */ - CertificateAuthorityDomainConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CertificateAuthorityDomainConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CertificateAuthorityDomainConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig"; - }; - - CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig = (function() { - - /** - * Properties of a GCPSecretManagerCertificateConfig. - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @interface IGCPSecretManagerCertificateConfig - * @property {string|null} [secretUri] GCPSecretManagerCertificateConfig secretUri - */ - - /** - * Constructs a new GCPSecretManagerCertificateConfig. - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig - * @classdesc Represents a GCPSecretManagerCertificateConfig. - * @implements IGCPSecretManagerCertificateConfig - * @constructor - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set - */ - function GCPSecretManagerCertificateConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GCPSecretManagerCertificateConfig secretUri. - * @member {string} secretUri - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @instance - */ - GCPSecretManagerCertificateConfig.prototype.secretUri = ""; - - /** - * Creates a new GCPSecretManagerCertificateConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig instance - */ - GCPSecretManagerCertificateConfig.create = function create(properties) { - return new GCPSecretManagerCertificateConfig(properties); - }; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPSecretManagerCertificateConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.secretUri != null && Object.hasOwnProperty.call(message, "secretUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretUri); - return writer; - }; - - /** - * Encodes the specified GCPSecretManagerCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.IGCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPSecretManagerCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPSecretManagerCertificateConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.secretUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GCPSecretManagerCertificateConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPSecretManagerCertificateConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GCPSecretManagerCertificateConfig message. - * @function verify - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPSecretManagerCertificateConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.secretUri != null && message.hasOwnProperty("secretUri")) - if (!$util.isString(message.secretUri)) - return "secretUri: string expected"; - return null; - }; - - /** - * Creates a GCPSecretManagerCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} GCPSecretManagerCertificateConfig - */ - GCPSecretManagerCertificateConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig) - return object; - var message = new $root.google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig(); - if (object.secretUri != null) - message.secretUri = String(object.secretUri); - return message; - }; - - /** - * Creates a plain object from a GCPSecretManagerCertificateConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig} message GCPSecretManagerCertificateConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPSecretManagerCertificateConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.secretUri = ""; - if (message.secretUri != null && message.hasOwnProperty("secretUri")) - object.secretUri = message.secretUri; - return object; - }; - - /** - * Converts this GCPSecretManagerCertificateConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @instance - * @returns {Object.} JSON object - */ - GCPSecretManagerCertificateConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GCPSecretManagerCertificateConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPSecretManagerCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig.GCPSecretManagerCertificateConfig"; - }; - - return GCPSecretManagerCertificateConfig; - })(); - - return CertificateAuthorityDomainConfig; - })(); - - return PrivateRegistryAccessConfig; - })(); - - return ContainerdConfig; - })(); - - v1beta1.HostMaintenancePolicy = (function() { - - /** - * Properties of a HostMaintenancePolicy. - * @memberof google.container.v1beta1 - * @interface IHostMaintenancePolicy - * @property {google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null} [maintenanceInterval] HostMaintenancePolicy maintenanceInterval - * @property {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null} [opportunisticMaintenanceStrategy] HostMaintenancePolicy opportunisticMaintenanceStrategy - */ - - /** - * Constructs a new HostMaintenancePolicy. - * @memberof google.container.v1beta1 - * @classdesc Represents a HostMaintenancePolicy. - * @implements IHostMaintenancePolicy - * @constructor - * @param {google.container.v1beta1.IHostMaintenancePolicy=} [properties] Properties to set - */ - function HostMaintenancePolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HostMaintenancePolicy maintenanceInterval. - * @member {google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval|null|undefined} maintenanceInterval - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @instance - */ - HostMaintenancePolicy.prototype.maintenanceInterval = null; - - /** - * HostMaintenancePolicy opportunisticMaintenanceStrategy. - * @member {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy|null|undefined} opportunisticMaintenanceStrategy - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @instance - */ - HostMaintenancePolicy.prototype.opportunisticMaintenanceStrategy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HostMaintenancePolicy _maintenanceInterval. - * @member {"maintenanceInterval"|undefined} _maintenanceInterval - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @instance - */ - Object.defineProperty(HostMaintenancePolicy.prototype, "_maintenanceInterval", { - get: $util.oneOfGetter($oneOfFields = ["maintenanceInterval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * HostMaintenancePolicy maintenanceStrategy. - * @member {"opportunisticMaintenanceStrategy"|undefined} maintenanceStrategy - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @instance - */ - Object.defineProperty(HostMaintenancePolicy.prototype, "maintenanceStrategy", { - get: $util.oneOfGetter($oneOfFields = ["opportunisticMaintenanceStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HostMaintenancePolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {google.container.v1beta1.IHostMaintenancePolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy instance - */ - HostMaintenancePolicy.create = function create(properties) { - return new HostMaintenancePolicy(properties); - }; - - /** - * Encodes the specified HostMaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {google.container.v1beta1.IHostMaintenancePolicy} message HostMaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostMaintenancePolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maintenanceInterval != null && Object.hasOwnProperty.call(message, "maintenanceInterval")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maintenanceInterval); - if (message.opportunisticMaintenanceStrategy != null && Object.hasOwnProperty.call(message, "opportunisticMaintenanceStrategy")) - $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.encode(message.opportunisticMaintenanceStrategy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HostMaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {google.container.v1beta1.IHostMaintenancePolicy} message HostMaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostMaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HostMaintenancePolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostMaintenancePolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HostMaintenancePolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maintenanceInterval = reader.int32(); - break; - } - case 2: { - message.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HostMaintenancePolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostMaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HostMaintenancePolicy message. - * @function verify - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HostMaintenancePolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maintenanceInterval != null && message.hasOwnProperty("maintenanceInterval")) { - properties._maintenanceInterval = 1; - switch (message.maintenanceInterval) { - default: - return "maintenanceInterval: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.opportunisticMaintenanceStrategy != null && message.hasOwnProperty("opportunisticMaintenanceStrategy")) { - properties.maintenanceStrategy = 1; - { - var error = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify(message.opportunisticMaintenanceStrategy); - if (error) - return "opportunisticMaintenanceStrategy." + error; - } - } - return null; - }; - - /** - * Creates a HostMaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.HostMaintenancePolicy} HostMaintenancePolicy - */ - HostMaintenancePolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.HostMaintenancePolicy) - return object; - var message = new $root.google.container.v1beta1.HostMaintenancePolicy(); - switch (object.maintenanceInterval) { - default: - if (typeof object.maintenanceInterval === "number") { - message.maintenanceInterval = object.maintenanceInterval; - break; - } - break; - case "MAINTENANCE_INTERVAL_UNSPECIFIED": - case 0: - message.maintenanceInterval = 0; - break; - case "AS_NEEDED": - case 1: - message.maintenanceInterval = 1; - break; - case "PERIODIC": - case 2: - message.maintenanceInterval = 2; - break; - } - if (object.opportunisticMaintenanceStrategy != null) { - if (typeof object.opportunisticMaintenanceStrategy !== "object") - throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.opportunisticMaintenanceStrategy: object expected"); - message.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.fromObject(object.opportunisticMaintenanceStrategy); - } - return message; - }; - - /** - * Creates a plain object from a HostMaintenancePolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {google.container.v1beta1.HostMaintenancePolicy} message HostMaintenancePolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HostMaintenancePolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.maintenanceInterval != null && message.hasOwnProperty("maintenanceInterval")) { - object.maintenanceInterval = options.enums === String ? $root.google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval[message.maintenanceInterval] === undefined ? message.maintenanceInterval : $root.google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval[message.maintenanceInterval] : message.maintenanceInterval; - if (options.oneofs) - object._maintenanceInterval = "maintenanceInterval"; - } - if (message.opportunisticMaintenanceStrategy != null && message.hasOwnProperty("opportunisticMaintenanceStrategy")) { - object.opportunisticMaintenanceStrategy = $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.toObject(message.opportunisticMaintenanceStrategy, options); - if (options.oneofs) - object.maintenanceStrategy = "opportunisticMaintenanceStrategy"; - } - return object; - }; - - /** - * Converts this HostMaintenancePolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @instance - * @returns {Object.} JSON object - */ - HostMaintenancePolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HostMaintenancePolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HostMaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.HostMaintenancePolicy"; - }; - - /** - * MaintenanceInterval enum. - * @name google.container.v1beta1.HostMaintenancePolicy.MaintenanceInterval - * @enum {number} - * @property {number} MAINTENANCE_INTERVAL_UNSPECIFIED=0 MAINTENANCE_INTERVAL_UNSPECIFIED value - * @property {number} AS_NEEDED=1 AS_NEEDED value - * @property {number} PERIODIC=2 PERIODIC value - */ - HostMaintenancePolicy.MaintenanceInterval = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MAINTENANCE_INTERVAL_UNSPECIFIED"] = 0; - values[valuesById[1] = "AS_NEEDED"] = 1; - values[valuesById[2] = "PERIODIC"] = 2; - return values; - })(); - - HostMaintenancePolicy.OpportunisticMaintenanceStrategy = (function() { - - /** - * Properties of an OpportunisticMaintenanceStrategy. - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @interface IOpportunisticMaintenanceStrategy - * @property {google.protobuf.IDuration|null} [nodeIdleTimeWindow] OpportunisticMaintenanceStrategy nodeIdleTimeWindow - * @property {google.protobuf.IDuration|null} [maintenanceAvailabilityWindow] OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow - * @property {number|Long|null} [minNodesPerPool] OpportunisticMaintenanceStrategy minNodesPerPool - */ - - /** - * Constructs a new OpportunisticMaintenanceStrategy. - * @memberof google.container.v1beta1.HostMaintenancePolicy - * @classdesc Represents an OpportunisticMaintenanceStrategy. - * @implements IOpportunisticMaintenanceStrategy - * @constructor - * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy=} [properties] Properties to set - */ - function OpportunisticMaintenanceStrategy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OpportunisticMaintenanceStrategy nodeIdleTimeWindow. - * @member {google.protobuf.IDuration|null|undefined} nodeIdleTimeWindow - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - OpportunisticMaintenanceStrategy.prototype.nodeIdleTimeWindow = null; - - /** - * OpportunisticMaintenanceStrategy maintenanceAvailabilityWindow. - * @member {google.protobuf.IDuration|null|undefined} maintenanceAvailabilityWindow - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - OpportunisticMaintenanceStrategy.prototype.maintenanceAvailabilityWindow = null; - - /** - * OpportunisticMaintenanceStrategy minNodesPerPool. - * @member {number|Long|null|undefined} minNodesPerPool - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - OpportunisticMaintenanceStrategy.prototype.minNodesPerPool = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OpportunisticMaintenanceStrategy _nodeIdleTimeWindow. - * @member {"nodeIdleTimeWindow"|undefined} _nodeIdleTimeWindow - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_nodeIdleTimeWindow", { - get: $util.oneOfGetter($oneOfFields = ["nodeIdleTimeWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * OpportunisticMaintenanceStrategy _maintenanceAvailabilityWindow. - * @member {"maintenanceAvailabilityWindow"|undefined} _maintenanceAvailabilityWindow - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_maintenanceAvailabilityWindow", { - get: $util.oneOfGetter($oneOfFields = ["maintenanceAvailabilityWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * OpportunisticMaintenanceStrategy _minNodesPerPool. - * @member {"minNodesPerPool"|undefined} _minNodesPerPool - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - */ - Object.defineProperty(OpportunisticMaintenanceStrategy.prototype, "_minNodesPerPool", { - get: $util.oneOfGetter($oneOfFields = ["minNodesPerPool"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OpportunisticMaintenanceStrategy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy=} [properties] Properties to set - * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy instance - */ - OpportunisticMaintenanceStrategy.create = function create(properties) { - return new OpportunisticMaintenanceStrategy(properties); - }; - - /** - * Encodes the specified OpportunisticMaintenanceStrategy message. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpportunisticMaintenanceStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeIdleTimeWindow != null && Object.hasOwnProperty.call(message, "nodeIdleTimeWindow")) - $root.google.protobuf.Duration.encode(message.nodeIdleTimeWindow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.maintenanceAvailabilityWindow != null && Object.hasOwnProperty.call(message, "maintenanceAvailabilityWindow")) - $root.google.protobuf.Duration.encode(message.maintenanceAvailabilityWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.minNodesPerPool != null && Object.hasOwnProperty.call(message, "minNodesPerPool")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.minNodesPerPool); - return writer; - }; - - /** - * Encodes the specified OpportunisticMaintenanceStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {google.container.v1beta1.HostMaintenancePolicy.IOpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpportunisticMaintenanceStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpportunisticMaintenanceStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nodeIdleTimeWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.minNodesPerPool = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OpportunisticMaintenanceStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpportunisticMaintenanceStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OpportunisticMaintenanceStrategy message. - * @function verify - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OpportunisticMaintenanceStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nodeIdleTimeWindow != null && message.hasOwnProperty("nodeIdleTimeWindow")) { - properties._nodeIdleTimeWindow = 1; - { - var error = $root.google.protobuf.Duration.verify(message.nodeIdleTimeWindow); - if (error) - return "nodeIdleTimeWindow." + error; - } - } - if (message.maintenanceAvailabilityWindow != null && message.hasOwnProperty("maintenanceAvailabilityWindow")) { - properties._maintenanceAvailabilityWindow = 1; - { - var error = $root.google.protobuf.Duration.verify(message.maintenanceAvailabilityWindow); - if (error) - return "maintenanceAvailabilityWindow." + error; - } - } - if (message.minNodesPerPool != null && message.hasOwnProperty("minNodesPerPool")) { - properties._minNodesPerPool = 1; - if (!$util.isInteger(message.minNodesPerPool) && !(message.minNodesPerPool && $util.isInteger(message.minNodesPerPool.low) && $util.isInteger(message.minNodesPerPool.high))) - return "minNodesPerPool: integer|Long expected"; - } - return null; - }; - - /** - * Creates an OpportunisticMaintenanceStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} OpportunisticMaintenanceStrategy - */ - OpportunisticMaintenanceStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy) - return object; - var message = new $root.google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy(); - if (object.nodeIdleTimeWindow != null) { - if (typeof object.nodeIdleTimeWindow !== "object") - throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.nodeIdleTimeWindow: object expected"); - message.nodeIdleTimeWindow = $root.google.protobuf.Duration.fromObject(object.nodeIdleTimeWindow); - } - if (object.maintenanceAvailabilityWindow != null) { - if (typeof object.maintenanceAvailabilityWindow !== "object") - throw TypeError(".google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy.maintenanceAvailabilityWindow: object expected"); - message.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.fromObject(object.maintenanceAvailabilityWindow); - } - if (object.minNodesPerPool != null) - if ($util.Long) - (message.minNodesPerPool = $util.Long.fromValue(object.minNodesPerPool)).unsigned = false; - else if (typeof object.minNodesPerPool === "string") - message.minNodesPerPool = parseInt(object.minNodesPerPool, 10); - else if (typeof object.minNodesPerPool === "number") - message.minNodesPerPool = object.minNodesPerPool; - else if (typeof object.minNodesPerPool === "object") - message.minNodesPerPool = new $util.LongBits(object.minNodesPerPool.low >>> 0, object.minNodesPerPool.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an OpportunisticMaintenanceStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy} message OpportunisticMaintenanceStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OpportunisticMaintenanceStrategy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nodeIdleTimeWindow != null && message.hasOwnProperty("nodeIdleTimeWindow")) { - object.nodeIdleTimeWindow = $root.google.protobuf.Duration.toObject(message.nodeIdleTimeWindow, options); - if (options.oneofs) - object._nodeIdleTimeWindow = "nodeIdleTimeWindow"; - } - if (message.maintenanceAvailabilityWindow != null && message.hasOwnProperty("maintenanceAvailabilityWindow")) { - object.maintenanceAvailabilityWindow = $root.google.protobuf.Duration.toObject(message.maintenanceAvailabilityWindow, options); - if (options.oneofs) - object._maintenanceAvailabilityWindow = "maintenanceAvailabilityWindow"; - } - if (message.minNodesPerPool != null && message.hasOwnProperty("minNodesPerPool")) { - if (typeof message.minNodesPerPool === "number") - object.minNodesPerPool = options.longs === String ? String(message.minNodesPerPool) : message.minNodesPerPool; - else - object.minNodesPerPool = options.longs === String ? $util.Long.prototype.toString.call(message.minNodesPerPool) : options.longs === Number ? new $util.LongBits(message.minNodesPerPool.low >>> 0, message.minNodesPerPool.high >>> 0).toNumber() : message.minNodesPerPool; - if (options.oneofs) - object._minNodesPerPool = "minNodesPerPool"; - } - return object; - }; - - /** - * Converts this OpportunisticMaintenanceStrategy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @instance - * @returns {Object.} JSON object - */ - OpportunisticMaintenanceStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OpportunisticMaintenanceStrategy - * @function getTypeUrl - * @memberof google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OpportunisticMaintenanceStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.HostMaintenancePolicy.OpportunisticMaintenanceStrategy"; - }; - - return OpportunisticMaintenanceStrategy; - })(); - - return HostMaintenancePolicy; - })(); - - v1beta1.NodeTaint = (function() { - - /** - * Properties of a NodeTaint. - * @memberof google.container.v1beta1 - * @interface INodeTaint - * @property {string|null} [key] NodeTaint key - * @property {string|null} [value] NodeTaint value - * @property {google.container.v1beta1.NodeTaint.Effect|null} [effect] NodeTaint effect - */ - - /** - * Constructs a new NodeTaint. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeTaint. - * @implements INodeTaint - * @constructor - * @param {google.container.v1beta1.INodeTaint=} [properties] Properties to set - */ - function NodeTaint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeTaint key. - * @member {string} key - * @memberof google.container.v1beta1.NodeTaint - * @instance - */ - NodeTaint.prototype.key = ""; - - /** - * NodeTaint value. - * @member {string} value - * @memberof google.container.v1beta1.NodeTaint - * @instance - */ - NodeTaint.prototype.value = ""; - - /** - * NodeTaint effect. - * @member {google.container.v1beta1.NodeTaint.Effect} effect - * @memberof google.container.v1beta1.NodeTaint - * @instance - */ - NodeTaint.prototype.effect = 0; - - /** - * Creates a new NodeTaint instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {google.container.v1beta1.INodeTaint=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeTaint} NodeTaint instance - */ - NodeTaint.create = function create(properties) { - return new NodeTaint(properties); - }; - - /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.container.v1beta1.NodeTaint.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {google.container.v1beta1.INodeTaint} message NodeTaint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaint.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); - return writer; - }; - - /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {google.container.v1beta1.INodeTaint} message NodeTaint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeTaint message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeTaint} NodeTaint - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeTaint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.effect = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeTaint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeTaint} NodeTaint - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeTaint message. - * @function verify - * @memberof google.container.v1beta1.NodeTaint - * @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) { - 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; - } - return null; - }; - - /** - * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeTaint} NodeTaint - */ - NodeTaint.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeTaint) - return object; - var message = new $root.google.container.v1beta1.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; - } - return message; - }; - - /** - * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {google.container.v1beta1.NodeTaint} message NodeTaint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeTaint.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; - } - 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.container.v1beta1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.container.v1beta1.NodeTaint.Effect[message.effect] : message.effect; - return object; - }; - - /** - * Converts this NodeTaint to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeTaint - * @instance - * @returns {Object.} JSON object - */ - NodeTaint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeTaint - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeTaint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeTaint"; - }; - - /** - * Effect enum. - * @name google.container.v1beta1.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; - })(); - - v1beta1.NodeTaints = (function() { - - /** - * Properties of a NodeTaints. - * @memberof google.container.v1beta1 - * @interface INodeTaints - * @property {Array.|null} [taints] NodeTaints taints - */ - - /** - * Constructs a new NodeTaints. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeTaints. - * @implements INodeTaints - * @constructor - * @param {google.container.v1beta1.INodeTaints=} [properties] Properties to set - */ - function NodeTaints(properties) { - this.taints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeTaints taints. - * @member {Array.} taints - * @memberof google.container.v1beta1.NodeTaints - * @instance - */ - NodeTaints.prototype.taints = $util.emptyArray; - - /** - * Creates a new NodeTaints instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {google.container.v1beta1.INodeTaints=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeTaints} NodeTaints instance - */ - NodeTaints.create = function create(properties) { - return new NodeTaints(properties); - }; - - /** - * Encodes the specified NodeTaints message. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {google.container.v1beta1.INodeTaints} message NodeTaints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.container.v1beta1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeTaints message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeTaints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {google.container.v1beta1.INodeTaints} message NodeTaints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeTaints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeTaints message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeTaints} NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeTaints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeTaints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.container.v1beta1.NodeTaint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeTaints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeTaints} NodeTaints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeTaints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeTaints message. - * @function verify - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeTaints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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.container.v1beta1.NodeTaint.verify(message.taints[i]); - if (error) - return "taints." + error; - } - } - return null; - }; - - /** - * Creates a NodeTaints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeTaints} NodeTaints - */ - NodeTaints.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeTaints) - return object; - var message = new $root.google.container.v1beta1.NodeTaints(); - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.container.v1beta1.NodeTaints.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.container.v1beta1.NodeTaints.taints: object expected"); - message.taints[i] = $root.google.container.v1beta1.NodeTaint.fromObject(object.taints[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a NodeTaints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {google.container.v1beta1.NodeTaints} message NodeTaints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeTaints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taints = []; - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.container.v1beta1.NodeTaint.toObject(message.taints[j], options); - } - return object; - }; - - /** - * Converts this NodeTaints to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeTaints - * @instance - * @returns {Object.} JSON object - */ - NodeTaints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeTaints - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeTaints - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeTaints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeTaints"; - }; - - return NodeTaints; - })(); - - v1beta1.NodeLabels = (function() { - - /** - * Properties of a NodeLabels. - * @memberof google.container.v1beta1 - * @interface INodeLabels - * @property {Object.|null} [labels] NodeLabels labels - */ - - /** - * Constructs a new NodeLabels. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeLabels. - * @implements INodeLabels - * @constructor - * @param {google.container.v1beta1.INodeLabels=} [properties] Properties to set - */ - function NodeLabels(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeLabels labels. - * @member {Object.} labels - * @memberof google.container.v1beta1.NodeLabels - * @instance - */ - NodeLabels.prototype.labels = $util.emptyObject; - - /** - * Creates a new NodeLabels instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {google.container.v1beta1.INodeLabels=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeLabels} NodeLabels instance - */ - NodeLabels.create = function create(properties) { - return new NodeLabels(properties); - }; - - /** - * Encodes the specified NodeLabels message. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {google.container.v1beta1.INodeLabels} message NodeLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeLabels.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeLabels.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {google.container.v1beta1.INodeLabels} message NodeLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeLabels.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeLabels message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeLabels} NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeLabels.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeLabels(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeLabels message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeLabels} NodeLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeLabels.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeLabels message. - * @function verify - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeLabels.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a NodeLabels message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeLabels} NodeLabels - */ - NodeLabels.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeLabels) - return object; - var message = new $root.google.container.v1beta1.NodeLabels(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1beta1.NodeLabels.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 a NodeLabels message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {google.container.v1beta1.NodeLabels} message NodeLabels - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeLabels.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this NodeLabels to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeLabels - * @instance - * @returns {Object.} JSON object - */ - NodeLabels.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeLabels - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeLabels - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeLabels"; - }; - - return NodeLabels; - })(); - - v1beta1.ResourceLabels = (function() { - - /** - * Properties of a ResourceLabels. - * @memberof google.container.v1beta1 - * @interface IResourceLabels - * @property {Object.|null} [labels] ResourceLabels labels - */ - - /** - * Constructs a new ResourceLabels. - * @memberof google.container.v1beta1 - * @classdesc Represents a ResourceLabels. - * @implements IResourceLabels - * @constructor - * @param {google.container.v1beta1.IResourceLabels=} [properties] Properties to set - */ - function ResourceLabels(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceLabels labels. - * @member {Object.} labels - * @memberof google.container.v1beta1.ResourceLabels - * @instance - */ - ResourceLabels.prototype.labels = $util.emptyObject; - - /** - * Creates a new ResourceLabels instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {google.container.v1beta1.IResourceLabels=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels instance - */ - ResourceLabels.create = function create(properties) { - return new ResourceLabels(properties); - }; - - /** - * Encodes the specified ResourceLabels message. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {google.container.v1beta1.IResourceLabels} message ResourceLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLabels.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceLabels message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLabels.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {google.container.v1beta1.IResourceLabels} message ResourceLabels message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLabels.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLabels.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceLabels(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceLabels message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLabels.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceLabels message. - * @function verify - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceLabels.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ResourceLabels message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceLabels} ResourceLabels - */ - ResourceLabels.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceLabels) - return object; - var message = new $root.google.container.v1beta1.ResourceLabels(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1beta1.ResourceLabels.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 a ResourceLabels message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {google.container.v1beta1.ResourceLabels} message ResourceLabels - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceLabels.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this ResourceLabels to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceLabels - * @instance - * @returns {Object.} JSON object - */ - ResourceLabels.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceLabels - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceLabels - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceLabels"; - }; - - return ResourceLabels; - })(); - - v1beta1.NetworkTags = (function() { - - /** - * Properties of a NetworkTags. - * @memberof google.container.v1beta1 - * @interface INetworkTags - * @property {Array.|null} [tags] NetworkTags tags - */ - - /** - * Constructs a new NetworkTags. - * @memberof google.container.v1beta1 - * @classdesc Represents a NetworkTags. - * @implements INetworkTags - * @constructor - * @param {google.container.v1beta1.INetworkTags=} [properties] Properties to set - */ - function NetworkTags(properties) { - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkTags tags. - * @member {Array.} tags - * @memberof google.container.v1beta1.NetworkTags - * @instance - */ - NetworkTags.prototype.tags = $util.emptyArray; - - /** - * Creates a new NetworkTags instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {google.container.v1beta1.INetworkTags=} [properties] Properties to set - * @returns {google.container.v1beta1.NetworkTags} NetworkTags instance - */ - NetworkTags.create = function create(properties) { - return new NetworkTags(properties); - }; - - /** - * Encodes the specified NetworkTags message. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {google.container.v1beta1.INetworkTags} message NetworkTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkTags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tags[i]); - return writer; - }; - - /** - * Encodes the specified NetworkTags message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkTags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {google.container.v1beta1.INetworkTags} message NetworkTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkTags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkTags message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NetworkTags} NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkTags.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkTags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkTags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NetworkTags} NetworkTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkTags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkTags message. - * @function verify - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkTags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - return null; - }; - - /** - * Creates a NetworkTags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NetworkTags} NetworkTags - */ - NetworkTags.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NetworkTags) - return object; - var message = new $root.google.container.v1beta1.NetworkTags(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.container.v1beta1.NetworkTags.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - return message; - }; - - /** - * Creates a plain object from a NetworkTags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {google.container.v1beta1.NetworkTags} message NetworkTags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkTags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - return object; - }; - - /** - * Converts this NetworkTags to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NetworkTags - * @instance - * @returns {Object.} JSON object - */ - NetworkTags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkTags - * @function getTypeUrl - * @memberof google.container.v1beta1.NetworkTags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NetworkTags"; - }; - - return NetworkTags; - })(); - - v1beta1.MasterAuth = (function() { - - /** - * Properties of a MasterAuth. - * @memberof google.container.v1beta1 - * @interface IMasterAuth - * @property {string|null} [username] MasterAuth username - * @property {string|null} [password] MasterAuth password - * @property {google.container.v1beta1.IClientCertificateConfig|null} [clientCertificateConfig] MasterAuth clientCertificateConfig - * @property {string|null} [clusterCaCertificate] MasterAuth clusterCaCertificate - * @property {string|null} [clientCertificate] MasterAuth clientCertificate - * @property {string|null} [clientKey] MasterAuth clientKey - */ - - /** - * Constructs a new MasterAuth. - * @memberof google.container.v1beta1 - * @classdesc Represents a MasterAuth. - * @implements IMasterAuth - * @constructor - * @param {google.container.v1beta1.IMasterAuth=} [properties] Properties to set - */ - function MasterAuth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuth username. - * @member {string} username - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.username = ""; - - /** - * MasterAuth password. - * @member {string} password - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.password = ""; - - /** - * MasterAuth clientCertificateConfig. - * @member {google.container.v1beta1.IClientCertificateConfig|null|undefined} clientCertificateConfig - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientCertificateConfig = null; - - /** - * MasterAuth clusterCaCertificate. - * @member {string} clusterCaCertificate - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.clusterCaCertificate = ""; - - /** - * MasterAuth clientCertificate. - * @member {string} clientCertificate - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientCertificate = ""; - - /** - * MasterAuth clientKey. - * @member {string} clientKey - * @memberof google.container.v1beta1.MasterAuth - * @instance - */ - MasterAuth.prototype.clientKey = ""; - - /** - * Creates a new MasterAuth instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {google.container.v1beta1.IMasterAuth=} [properties] Properties to set - * @returns {google.container.v1beta1.MasterAuth} MasterAuth instance - */ - MasterAuth.create = function create(properties) { - return new MasterAuth(properties); - }; - - /** - * Encodes the specified MasterAuth message. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {google.container.v1beta1.IMasterAuth} message MasterAuth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuth.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.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); - if (message.clientCertificateConfig != null && Object.hasOwnProperty.call(message, "clientCertificateConfig")) - $root.google.container.v1beta1.ClientCertificateConfig.encode(message.clientCertificateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.clusterCaCertificate); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.clientCertificate); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.clientKey); - return writer; - }; - - /** - * Encodes the specified MasterAuth message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {google.container.v1beta1.IMasterAuth} message MasterAuth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuth message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MasterAuth} MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuth.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.username = reader.string(); - break; - } - case 2: { - message.password = reader.string(); - break; - } - case 3: { - message.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.clusterCaCertificate = reader.string(); - break; - } - case 101: { - message.clientCertificate = reader.string(); - break; - } - case 102: { - message.clientKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MasterAuth} MasterAuth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuth message. - * @function verify - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuth.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.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) { - var error = $root.google.container.v1beta1.ClientCertificateConfig.verify(message.clientCertificateConfig); - if (error) - return "clientCertificateConfig." + error; - } - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - if (!$util.isString(message.clusterCaCertificate)) - return "clusterCaCertificate: string expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - return null; - }; - - /** - * Creates a MasterAuth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MasterAuth} MasterAuth - */ - MasterAuth.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MasterAuth) - return object; - var message = new $root.google.container.v1beta1.MasterAuth(); - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.clientCertificateConfig != null) { - if (typeof object.clientCertificateConfig !== "object") - throw TypeError(".google.container.v1beta1.MasterAuth.clientCertificateConfig: object expected"); - message.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.fromObject(object.clientCertificateConfig); - } - if (object.clusterCaCertificate != null) - message.clusterCaCertificate = String(object.clusterCaCertificate); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - return message; - }; - - /** - * Creates a plain object from a MasterAuth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {google.container.v1beta1.MasterAuth} message MasterAuth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.username = ""; - object.password = ""; - object.clientCertificateConfig = null; - object.clusterCaCertificate = ""; - object.clientCertificate = ""; - object.clientKey = ""; - } - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.clientCertificateConfig != null && message.hasOwnProperty("clientCertificateConfig")) - object.clientCertificateConfig = $root.google.container.v1beta1.ClientCertificateConfig.toObject(message.clientCertificateConfig, options); - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - object.clusterCaCertificate = message.clusterCaCertificate; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - return object; - }; - - /** - * Converts this MasterAuth to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MasterAuth - * @instance - * @returns {Object.} JSON object - */ - MasterAuth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuth - * @function getTypeUrl - * @memberof google.container.v1beta1.MasterAuth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MasterAuth"; - }; - - return MasterAuth; - })(); - - v1beta1.ClientCertificateConfig = (function() { - - /** - * Properties of a ClientCertificateConfig. - * @memberof google.container.v1beta1 - * @interface IClientCertificateConfig - * @property {boolean|null} [issueClientCertificate] ClientCertificateConfig issueClientCertificate - */ - - /** - * Constructs a new ClientCertificateConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ClientCertificateConfig. - * @implements IClientCertificateConfig - * @constructor - * @param {google.container.v1beta1.IClientCertificateConfig=} [properties] Properties to set - */ - function ClientCertificateConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientCertificateConfig issueClientCertificate. - * @member {boolean} issueClientCertificate - * @memberof google.container.v1beta1.ClientCertificateConfig - * @instance - */ - ClientCertificateConfig.prototype.issueClientCertificate = false; - - /** - * Creates a new ClientCertificateConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {google.container.v1beta1.IClientCertificateConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig instance - */ - ClientCertificateConfig.create = function create(properties) { - return new ClientCertificateConfig(properties); - }; - - /** - * Encodes the specified ClientCertificateConfig message. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {google.container.v1beta1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientCertificateConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issueClientCertificate != null && Object.hasOwnProperty.call(message, "issueClientCertificate")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.issueClientCertificate); - return writer; - }; - - /** - * Encodes the specified ClientCertificateConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ClientCertificateConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {google.container.v1beta1.IClientCertificateConfig} message ClientCertificateConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientCertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientCertificateConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClientCertificateConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issueClientCertificate = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientCertificateConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientCertificateConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientCertificateConfig message. - * @function verify - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientCertificateConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) - if (typeof message.issueClientCertificate !== "boolean") - return "issueClientCertificate: boolean expected"; - return null; - }; - - /** - * Creates a ClientCertificateConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ClientCertificateConfig} ClientCertificateConfig - */ - ClientCertificateConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ClientCertificateConfig) - return object; - var message = new $root.google.container.v1beta1.ClientCertificateConfig(); - if (object.issueClientCertificate != null) - message.issueClientCertificate = Boolean(object.issueClientCertificate); - return message; - }; - - /** - * Creates a plain object from a ClientCertificateConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {google.container.v1beta1.ClientCertificateConfig} message ClientCertificateConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientCertificateConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.issueClientCertificate = false; - if (message.issueClientCertificate != null && message.hasOwnProperty("issueClientCertificate")) - object.issueClientCertificate = message.issueClientCertificate; - return object; - }; - - /** - * Converts this ClientCertificateConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ClientCertificateConfig - * @instance - * @returns {Object.} JSON object - */ - ClientCertificateConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientCertificateConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ClientCertificateConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientCertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ClientCertificateConfig"; - }; - - return ClientCertificateConfig; - })(); - - v1beta1.AddonsConfig = (function() { - - /** - * Properties of an AddonsConfig. - * @memberof google.container.v1beta1 - * @interface IAddonsConfig - * @property {google.container.v1beta1.IHttpLoadBalancing|null} [httpLoadBalancing] AddonsConfig httpLoadBalancing - * @property {google.container.v1beta1.IHorizontalPodAutoscaling|null} [horizontalPodAutoscaling] AddonsConfig horizontalPodAutoscaling - * @property {google.container.v1beta1.IKubernetesDashboard|null} [kubernetesDashboard] AddonsConfig kubernetesDashboard - * @property {google.container.v1beta1.INetworkPolicyConfig|null} [networkPolicyConfig] AddonsConfig networkPolicyConfig - * @property {google.container.v1beta1.IIstioConfig|null} [istioConfig] AddonsConfig istioConfig - * @property {google.container.v1beta1.ICloudRunConfig|null} [cloudRunConfig] AddonsConfig cloudRunConfig - * @property {google.container.v1beta1.IDnsCacheConfig|null} [dnsCacheConfig] AddonsConfig dnsCacheConfig - * @property {google.container.v1beta1.IConfigConnectorConfig|null} [configConnectorConfig] AddonsConfig configConnectorConfig - * @property {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null} [gcePersistentDiskCsiDriverConfig] AddonsConfig gcePersistentDiskCsiDriverConfig - * @property {google.container.v1beta1.IKalmConfig|null} [kalmConfig] AddonsConfig kalmConfig - * @property {google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null} [gcpFilestoreCsiDriverConfig] AddonsConfig gcpFilestoreCsiDriverConfig - * @property {google.container.v1beta1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig - * @property {google.container.v1beta1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig - * @property {google.container.v1beta1.IStatefulHAConfig|null} [statefulHaConfig] AddonsConfig statefulHaConfig - * @property {google.container.v1beta1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig - */ - - /** - * Constructs a new AddonsConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AddonsConfig. - * @implements IAddonsConfig - * @constructor - * @param {google.container.v1beta1.IAddonsConfig=} [properties] Properties to set - */ - function AddonsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AddonsConfig httpLoadBalancing. - * @member {google.container.v1beta1.IHttpLoadBalancing|null|undefined} httpLoadBalancing - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.httpLoadBalancing = null; - - /** - * AddonsConfig horizontalPodAutoscaling. - * @member {google.container.v1beta1.IHorizontalPodAutoscaling|null|undefined} horizontalPodAutoscaling - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.horizontalPodAutoscaling = null; - - /** - * AddonsConfig kubernetesDashboard. - * @member {google.container.v1beta1.IKubernetesDashboard|null|undefined} kubernetesDashboard - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.kubernetesDashboard = null; - - /** - * AddonsConfig networkPolicyConfig. - * @member {google.container.v1beta1.INetworkPolicyConfig|null|undefined} networkPolicyConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.networkPolicyConfig = null; - - /** - * AddonsConfig istioConfig. - * @member {google.container.v1beta1.IIstioConfig|null|undefined} istioConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.istioConfig = null; - - /** - * AddonsConfig cloudRunConfig. - * @member {google.container.v1beta1.ICloudRunConfig|null|undefined} cloudRunConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.cloudRunConfig = null; - - /** - * AddonsConfig dnsCacheConfig. - * @member {google.container.v1beta1.IDnsCacheConfig|null|undefined} dnsCacheConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.dnsCacheConfig = null; - - /** - * AddonsConfig configConnectorConfig. - * @member {google.container.v1beta1.IConfigConnectorConfig|null|undefined} configConnectorConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.configConnectorConfig = null; - - /** - * AddonsConfig gcePersistentDiskCsiDriverConfig. - * @member {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig|null|undefined} gcePersistentDiskCsiDriverConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcePersistentDiskCsiDriverConfig = null; - - /** - * AddonsConfig kalmConfig. - * @member {google.container.v1beta1.IKalmConfig|null|undefined} kalmConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.kalmConfig = null; - - /** - * AddonsConfig gcpFilestoreCsiDriverConfig. - * @member {google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null|undefined} gcpFilestoreCsiDriverConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcpFilestoreCsiDriverConfig = null; - - /** - * AddonsConfig gkeBackupAgentConfig. - * @member {google.container.v1beta1.IGkeBackupAgentConfig|null|undefined} gkeBackupAgentConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gkeBackupAgentConfig = null; - - /** - * AddonsConfig gcsFuseCsiDriverConfig. - * @member {google.container.v1beta1.IGcsFuseCsiDriverConfig|null|undefined} gcsFuseCsiDriverConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.gcsFuseCsiDriverConfig = null; - - /** - * AddonsConfig statefulHaConfig. - * @member {google.container.v1beta1.IStatefulHAConfig|null|undefined} statefulHaConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.statefulHaConfig = null; - - /** - * AddonsConfig rayOperatorConfig. - * @member {google.container.v1beta1.IRayOperatorConfig|null|undefined} rayOperatorConfig - * @memberof google.container.v1beta1.AddonsConfig - * @instance - */ - AddonsConfig.prototype.rayOperatorConfig = null; - - /** - * Creates a new AddonsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {google.container.v1beta1.IAddonsConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig instance - */ - AddonsConfig.create = function create(properties) { - return new AddonsConfig(properties); - }; - - /** - * Encodes the specified AddonsConfig message. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {google.container.v1beta1.IAddonsConfig} message AddonsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddonsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.httpLoadBalancing != null && Object.hasOwnProperty.call(message, "httpLoadBalancing")) - $root.google.container.v1beta1.HttpLoadBalancing.encode(message.httpLoadBalancing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.horizontalPodAutoscaling != null && Object.hasOwnProperty.call(message, "horizontalPodAutoscaling")) - $root.google.container.v1beta1.HorizontalPodAutoscaling.encode(message.horizontalPodAutoscaling, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.kubernetesDashboard != null && Object.hasOwnProperty.call(message, "kubernetesDashboard")) - $root.google.container.v1beta1.KubernetesDashboard.encode(message.kubernetesDashboard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.networkPolicyConfig != null && Object.hasOwnProperty.call(message, "networkPolicyConfig")) - $root.google.container.v1beta1.NetworkPolicyConfig.encode(message.networkPolicyConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.istioConfig != null && Object.hasOwnProperty.call(message, "istioConfig")) - $root.google.container.v1beta1.IstioConfig.encode(message.istioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.cloudRunConfig != null && Object.hasOwnProperty.call(message, "cloudRunConfig")) - $root.google.container.v1beta1.CloudRunConfig.encode(message.cloudRunConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.dnsCacheConfig != null && Object.hasOwnProperty.call(message, "dnsCacheConfig")) - $root.google.container.v1beta1.DnsCacheConfig.encode(message.dnsCacheConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.configConnectorConfig != null && Object.hasOwnProperty.call(message, "configConnectorConfig")) - $root.google.container.v1beta1.ConfigConnectorConfig.encode(message.configConnectorConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.gcePersistentDiskCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcePersistentDiskCsiDriverConfig")) - $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.encode(message.gcePersistentDiskCsiDriverConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.kalmConfig != null && Object.hasOwnProperty.call(message, "kalmConfig")) - $root.google.container.v1beta1.KalmConfig.encode(message.kalmConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.gcpFilestoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcpFilestoreCsiDriverConfig")) - $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.encode(message.gcpFilestoreCsiDriverConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.gkeBackupAgentConfig != null && Object.hasOwnProperty.call(message, "gkeBackupAgentConfig")) - $root.google.container.v1beta1.GkeBackupAgentConfig.encode(message.gkeBackupAgentConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.gcsFuseCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcsFuseCsiDriverConfig")) - $root.google.container.v1beta1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.statefulHaConfig != null && Object.hasOwnProperty.call(message, "statefulHaConfig")) - $root.google.container.v1beta1.StatefulHAConfig.encode(message.statefulHaConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.rayOperatorConfig != null && Object.hasOwnProperty.call(message, "rayOperatorConfig")) - $root.google.container.v1beta1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AddonsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AddonsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {google.container.v1beta1.IAddonsConfig} message AddonsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddonsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddonsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AddonsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.decode(reader, reader.uint32()); - break; - } - case 2: { - message.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 3: { - message.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.decode(reader, reader.uint32()); - break; - } - case 4: { - message.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.istioConfig = $root.google.container.v1beta1.IstioConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 12: { - message.kalmConfig = $root.google.container.v1beta1.KalmConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - message.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddonsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddonsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddonsConfig message. - * @function verify - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddonsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) { - var error = $root.google.container.v1beta1.HttpLoadBalancing.verify(message.httpLoadBalancing); - if (error) - return "httpLoadBalancing." + error; - } - if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) { - var error = $root.google.container.v1beta1.HorizontalPodAutoscaling.verify(message.horizontalPodAutoscaling); - if (error) - return "horizontalPodAutoscaling." + error; - } - if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) { - var error = $root.google.container.v1beta1.KubernetesDashboard.verify(message.kubernetesDashboard); - if (error) - return "kubernetesDashboard." + error; - } - if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) { - var error = $root.google.container.v1beta1.NetworkPolicyConfig.verify(message.networkPolicyConfig); - if (error) - return "networkPolicyConfig." + error; - } - if (message.istioConfig != null && message.hasOwnProperty("istioConfig")) { - var error = $root.google.container.v1beta1.IstioConfig.verify(message.istioConfig); - if (error) - return "istioConfig." + error; - } - if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) { - var error = $root.google.container.v1beta1.CloudRunConfig.verify(message.cloudRunConfig); - if (error) - return "cloudRunConfig." + error; - } - if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) { - var error = $root.google.container.v1beta1.DnsCacheConfig.verify(message.dnsCacheConfig); - if (error) - return "dnsCacheConfig." + error; - } - if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) { - var error = $root.google.container.v1beta1.ConfigConnectorConfig.verify(message.configConnectorConfig); - if (error) - return "configConnectorConfig." + error; - } - if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) { - var error = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify(message.gcePersistentDiskCsiDriverConfig); - if (error) - return "gcePersistentDiskCsiDriverConfig." + error; - } - if (message.kalmConfig != null && message.hasOwnProperty("kalmConfig")) { - var error = $root.google.container.v1beta1.KalmConfig.verify(message.kalmConfig); - if (error) - return "kalmConfig." + error; - } - if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) { - var error = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify(message.gcpFilestoreCsiDriverConfig); - if (error) - return "gcpFilestoreCsiDriverConfig." + error; - } - if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) { - var error = $root.google.container.v1beta1.GkeBackupAgentConfig.verify(message.gkeBackupAgentConfig); - if (error) - return "gkeBackupAgentConfig." + error; - } - if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) { - var error = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.verify(message.gcsFuseCsiDriverConfig); - if (error) - return "gcsFuseCsiDriverConfig." + error; - } - if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) { - var error = $root.google.container.v1beta1.StatefulHAConfig.verify(message.statefulHaConfig); - if (error) - return "statefulHaConfig." + error; - } - if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) { - var error = $root.google.container.v1beta1.RayOperatorConfig.verify(message.rayOperatorConfig); - if (error) - return "rayOperatorConfig." + error; - } - return null; - }; - - /** - * Creates an AddonsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AddonsConfig} AddonsConfig - */ - AddonsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AddonsConfig) - return object; - var message = new $root.google.container.v1beta1.AddonsConfig(); - if (object.httpLoadBalancing != null) { - if (typeof object.httpLoadBalancing !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.httpLoadBalancing: object expected"); - message.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.fromObject(object.httpLoadBalancing); - } - if (object.horizontalPodAutoscaling != null) { - if (typeof object.horizontalPodAutoscaling !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.horizontalPodAutoscaling: object expected"); - message.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.fromObject(object.horizontalPodAutoscaling); - } - if (object.kubernetesDashboard != null) { - if (typeof object.kubernetesDashboard !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.kubernetesDashboard: object expected"); - message.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.fromObject(object.kubernetesDashboard); - } - if (object.networkPolicyConfig != null) { - if (typeof object.networkPolicyConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.networkPolicyConfig: object expected"); - message.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.fromObject(object.networkPolicyConfig); - } - if (object.istioConfig != null) { - if (typeof object.istioConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.istioConfig: object expected"); - message.istioConfig = $root.google.container.v1beta1.IstioConfig.fromObject(object.istioConfig); - } - if (object.cloudRunConfig != null) { - if (typeof object.cloudRunConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.cloudRunConfig: object expected"); - message.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.fromObject(object.cloudRunConfig); - } - if (object.dnsCacheConfig != null) { - if (typeof object.dnsCacheConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.dnsCacheConfig: object expected"); - message.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.fromObject(object.dnsCacheConfig); - } - if (object.configConnectorConfig != null) { - if (typeof object.configConnectorConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.configConnectorConfig: object expected"); - message.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.fromObject(object.configConnectorConfig); - } - if (object.gcePersistentDiskCsiDriverConfig != null) { - if (typeof object.gcePersistentDiskCsiDriverConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.gcePersistentDiskCsiDriverConfig: object expected"); - message.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.fromObject(object.gcePersistentDiskCsiDriverConfig); - } - if (object.kalmConfig != null) { - if (typeof object.kalmConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.kalmConfig: object expected"); - message.kalmConfig = $root.google.container.v1beta1.KalmConfig.fromObject(object.kalmConfig); - } - if (object.gcpFilestoreCsiDriverConfig != null) { - if (typeof object.gcpFilestoreCsiDriverConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.gcpFilestoreCsiDriverConfig: object expected"); - message.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.fromObject(object.gcpFilestoreCsiDriverConfig); - } - if (object.gkeBackupAgentConfig != null) { - if (typeof object.gkeBackupAgentConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.gkeBackupAgentConfig: object expected"); - message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.fromObject(object.gkeBackupAgentConfig); - } - if (object.gcsFuseCsiDriverConfig != null) { - if (typeof object.gcsFuseCsiDriverConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.gcsFuseCsiDriverConfig: object expected"); - message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.fromObject(object.gcsFuseCsiDriverConfig); - } - if (object.statefulHaConfig != null) { - if (typeof object.statefulHaConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.statefulHaConfig: object expected"); - message.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.fromObject(object.statefulHaConfig); - } - if (object.rayOperatorConfig != null) { - if (typeof object.rayOperatorConfig !== "object") - throw TypeError(".google.container.v1beta1.AddonsConfig.rayOperatorConfig: object expected"); - message.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.fromObject(object.rayOperatorConfig); - } - return message; - }; - - /** - * Creates a plain object from an AddonsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {google.container.v1beta1.AddonsConfig} message AddonsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddonsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.httpLoadBalancing = null; - object.horizontalPodAutoscaling = null; - object.kubernetesDashboard = null; - object.networkPolicyConfig = null; - object.istioConfig = null; - object.cloudRunConfig = null; - object.dnsCacheConfig = null; - object.configConnectorConfig = null; - object.gcePersistentDiskCsiDriverConfig = null; - object.kalmConfig = null; - object.gcpFilestoreCsiDriverConfig = null; - object.gkeBackupAgentConfig = null; - object.gcsFuseCsiDriverConfig = null; - object.statefulHaConfig = null; - object.rayOperatorConfig = null; - } - if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) - object.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); - if (message.horizontalPodAutoscaling != null && message.hasOwnProperty("horizontalPodAutoscaling")) - object.horizontalPodAutoscaling = $root.google.container.v1beta1.HorizontalPodAutoscaling.toObject(message.horizontalPodAutoscaling, options); - if (message.kubernetesDashboard != null && message.hasOwnProperty("kubernetesDashboard")) - object.kubernetesDashboard = $root.google.container.v1beta1.KubernetesDashboard.toObject(message.kubernetesDashboard, options); - if (message.networkPolicyConfig != null && message.hasOwnProperty("networkPolicyConfig")) - object.networkPolicyConfig = $root.google.container.v1beta1.NetworkPolicyConfig.toObject(message.networkPolicyConfig, options); - if (message.istioConfig != null && message.hasOwnProperty("istioConfig")) - object.istioConfig = $root.google.container.v1beta1.IstioConfig.toObject(message.istioConfig, options); - if (message.cloudRunConfig != null && message.hasOwnProperty("cloudRunConfig")) - object.cloudRunConfig = $root.google.container.v1beta1.CloudRunConfig.toObject(message.cloudRunConfig, options); - if (message.dnsCacheConfig != null && message.hasOwnProperty("dnsCacheConfig")) - object.dnsCacheConfig = $root.google.container.v1beta1.DnsCacheConfig.toObject(message.dnsCacheConfig, options); - if (message.configConnectorConfig != null && message.hasOwnProperty("configConnectorConfig")) - object.configConnectorConfig = $root.google.container.v1beta1.ConfigConnectorConfig.toObject(message.configConnectorConfig, options); - if (message.gcePersistentDiskCsiDriverConfig != null && message.hasOwnProperty("gcePersistentDiskCsiDriverConfig")) - object.gcePersistentDiskCsiDriverConfig = $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig.toObject(message.gcePersistentDiskCsiDriverConfig, options); - if (message.kalmConfig != null && message.hasOwnProperty("kalmConfig")) - object.kalmConfig = $root.google.container.v1beta1.KalmConfig.toObject(message.kalmConfig, options); - if (message.gcpFilestoreCsiDriverConfig != null && message.hasOwnProperty("gcpFilestoreCsiDriverConfig")) - object.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.toObject(message.gcpFilestoreCsiDriverConfig, options); - if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) - object.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.toObject(message.gkeBackupAgentConfig, options); - if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) - object.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); - if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) - object.statefulHaConfig = $root.google.container.v1beta1.StatefulHAConfig.toObject(message.statefulHaConfig, options); - if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) - object.rayOperatorConfig = $root.google.container.v1beta1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); - return object; - }; - - /** - * Converts this AddonsConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AddonsConfig - * @instance - * @returns {Object.} JSON object - */ - AddonsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddonsConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AddonsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddonsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AddonsConfig"; - }; - - return AddonsConfig; - })(); - - v1beta1.HttpLoadBalancing = (function() { - - /** - * Properties of a HttpLoadBalancing. - * @memberof google.container.v1beta1 - * @interface IHttpLoadBalancing - * @property {boolean|null} [disabled] HttpLoadBalancing disabled - */ - - /** - * Constructs a new HttpLoadBalancing. - * @memberof google.container.v1beta1 - * @classdesc Represents a HttpLoadBalancing. - * @implements IHttpLoadBalancing - * @constructor - * @param {google.container.v1beta1.IHttpLoadBalancing=} [properties] Properties to set - */ - function HttpLoadBalancing(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpLoadBalancing disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.HttpLoadBalancing - * @instance - */ - HttpLoadBalancing.prototype.disabled = false; - - /** - * Creates a new HttpLoadBalancing instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {google.container.v1beta1.IHttpLoadBalancing=} [properties] Properties to set - * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing instance - */ - HttpLoadBalancing.create = function create(properties) { - return new HttpLoadBalancing(properties); - }; - - /** - * Encodes the specified HttpLoadBalancing message. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {google.container.v1beta1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpLoadBalancing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified HttpLoadBalancing message, length delimited. Does not implicitly {@link google.container.v1beta1.HttpLoadBalancing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {google.container.v1beta1.IHttpLoadBalancing} message HttpLoadBalancing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpLoadBalancing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpLoadBalancing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HttpLoadBalancing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpLoadBalancing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpLoadBalancing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpLoadBalancing message. - * @function verify - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpLoadBalancing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a HttpLoadBalancing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.HttpLoadBalancing} HttpLoadBalancing - */ - HttpLoadBalancing.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.HttpLoadBalancing) - return object; - var message = new $root.google.container.v1beta1.HttpLoadBalancing(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a HttpLoadBalancing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {google.container.v1beta1.HttpLoadBalancing} message HttpLoadBalancing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpLoadBalancing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this HttpLoadBalancing to JSON. - * @function toJSON - * @memberof google.container.v1beta1.HttpLoadBalancing - * @instance - * @returns {Object.} JSON object - */ - HttpLoadBalancing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpLoadBalancing - * @function getTypeUrl - * @memberof google.container.v1beta1.HttpLoadBalancing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpLoadBalancing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.HttpLoadBalancing"; - }; - - return HttpLoadBalancing; - })(); - - v1beta1.HorizontalPodAutoscaling = (function() { - - /** - * Properties of a HorizontalPodAutoscaling. - * @memberof google.container.v1beta1 - * @interface IHorizontalPodAutoscaling - * @property {boolean|null} [disabled] HorizontalPodAutoscaling disabled - */ - - /** - * Constructs a new HorizontalPodAutoscaling. - * @memberof google.container.v1beta1 - * @classdesc Represents a HorizontalPodAutoscaling. - * @implements IHorizontalPodAutoscaling - * @constructor - * @param {google.container.v1beta1.IHorizontalPodAutoscaling=} [properties] Properties to set - */ - function HorizontalPodAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HorizontalPodAutoscaling disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @instance - */ - HorizontalPodAutoscaling.prototype.disabled = false; - - /** - * Creates a new HorizontalPodAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1beta1.IHorizontalPodAutoscaling=} [properties] Properties to set - * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling instance - */ - HorizontalPodAutoscaling.create = function create(properties) { - return new HorizontalPodAutoscaling(properties); - }; - - /** - * Encodes the specified HorizontalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1beta1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HorizontalPodAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified HorizontalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.HorizontalPodAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1beta1.IHorizontalPodAutoscaling} message HorizontalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HorizontalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HorizontalPodAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.HorizontalPodAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HorizontalPodAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HorizontalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HorizontalPodAutoscaling message. - * @function verify - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HorizontalPodAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a HorizontalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.HorizontalPodAutoscaling} HorizontalPodAutoscaling - */ - HorizontalPodAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.HorizontalPodAutoscaling) - return object; - var message = new $root.google.container.v1beta1.HorizontalPodAutoscaling(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a HorizontalPodAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {google.container.v1beta1.HorizontalPodAutoscaling} message HorizontalPodAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HorizontalPodAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this HorizontalPodAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @instance - * @returns {Object.} JSON object - */ - HorizontalPodAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HorizontalPodAutoscaling - * @function getTypeUrl - * @memberof google.container.v1beta1.HorizontalPodAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HorizontalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.HorizontalPodAutoscaling"; - }; - - return HorizontalPodAutoscaling; - })(); - - v1beta1.KubernetesDashboard = (function() { - - /** - * Properties of a KubernetesDashboard. - * @memberof google.container.v1beta1 - * @interface IKubernetesDashboard - * @property {boolean|null} [disabled] KubernetesDashboard disabled - */ - - /** - * Constructs a new KubernetesDashboard. - * @memberof google.container.v1beta1 - * @classdesc Represents a KubernetesDashboard. - * @implements IKubernetesDashboard - * @constructor - * @param {google.container.v1beta1.IKubernetesDashboard=} [properties] Properties to set - */ - function KubernetesDashboard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KubernetesDashboard disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.KubernetesDashboard - * @instance - */ - KubernetesDashboard.prototype.disabled = false; - - /** - * Creates a new KubernetesDashboard instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {google.container.v1beta1.IKubernetesDashboard=} [properties] Properties to set - * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard instance - */ - KubernetesDashboard.create = function create(properties) { - return new KubernetesDashboard(properties); - }; - - /** - * Encodes the specified KubernetesDashboard message. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {google.container.v1beta1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KubernetesDashboard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified KubernetesDashboard message, length delimited. Does not implicitly {@link google.container.v1beta1.KubernetesDashboard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {google.container.v1beta1.IKubernetesDashboard} message KubernetesDashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KubernetesDashboard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KubernetesDashboard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.KubernetesDashboard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KubernetesDashboard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KubernetesDashboard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KubernetesDashboard message. - * @function verify - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KubernetesDashboard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a KubernetesDashboard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.KubernetesDashboard} KubernetesDashboard - */ - KubernetesDashboard.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.KubernetesDashboard) - return object; - var message = new $root.google.container.v1beta1.KubernetesDashboard(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a KubernetesDashboard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {google.container.v1beta1.KubernetesDashboard} message KubernetesDashboard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KubernetesDashboard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this KubernetesDashboard to JSON. - * @function toJSON - * @memberof google.container.v1beta1.KubernetesDashboard - * @instance - * @returns {Object.} JSON object - */ - KubernetesDashboard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KubernetesDashboard - * @function getTypeUrl - * @memberof google.container.v1beta1.KubernetesDashboard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KubernetesDashboard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.KubernetesDashboard"; - }; - - return KubernetesDashboard; - })(); - - v1beta1.NetworkPolicyConfig = (function() { - - /** - * Properties of a NetworkPolicyConfig. - * @memberof google.container.v1beta1 - * @interface INetworkPolicyConfig - * @property {boolean|null} [disabled] NetworkPolicyConfig disabled - */ - - /** - * Constructs a new NetworkPolicyConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NetworkPolicyConfig. - * @implements INetworkPolicyConfig - * @constructor - * @param {google.container.v1beta1.INetworkPolicyConfig=} [properties] Properties to set - */ - function NetworkPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPolicyConfig disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @instance - */ - NetworkPolicyConfig.prototype.disabled = false; - - /** - * Creates a new NetworkPolicyConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {google.container.v1beta1.INetworkPolicyConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig instance - */ - NetworkPolicyConfig.create = function create(properties) { - return new NetworkPolicyConfig(properties); - }; - - /** - * Encodes the specified NetworkPolicyConfig message. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {google.container.v1beta1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified NetworkPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {google.container.v1beta1.INetworkPolicyConfig} message NetworkPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPolicyConfig message. - * @function verify - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a NetworkPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NetworkPolicyConfig} NetworkPolicyConfig - */ - NetworkPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NetworkPolicyConfig) - return object; - var message = new $root.google.container.v1beta1.NetworkPolicyConfig(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a NetworkPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {google.container.v1beta1.NetworkPolicyConfig} message NetworkPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this NetworkPolicyConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPolicyConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NetworkPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NetworkPolicyConfig"; - }; - - return NetworkPolicyConfig; - })(); - - v1beta1.DnsCacheConfig = (function() { - - /** - * Properties of a DnsCacheConfig. - * @memberof google.container.v1beta1 - * @interface IDnsCacheConfig - * @property {boolean|null} [enabled] DnsCacheConfig enabled - */ - - /** - * Constructs a new DnsCacheConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a DnsCacheConfig. - * @implements IDnsCacheConfig - * @constructor - * @param {google.container.v1beta1.IDnsCacheConfig=} [properties] Properties to set - */ - function DnsCacheConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DnsCacheConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.DnsCacheConfig - * @instance - */ - DnsCacheConfig.prototype.enabled = false; - - /** - * Creates a new DnsCacheConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {google.container.v1beta1.IDnsCacheConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig instance - */ - DnsCacheConfig.create = function create(properties) { - return new DnsCacheConfig(properties); - }; - - /** - * Encodes the specified DnsCacheConfig message. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {google.container.v1beta1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DnsCacheConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified DnsCacheConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DnsCacheConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {google.container.v1beta1.IDnsCacheConfig} message DnsCacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DnsCacheConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DnsCacheConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DnsCacheConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DnsCacheConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DnsCacheConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DnsCacheConfig message. - * @function verify - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DnsCacheConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a DnsCacheConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DnsCacheConfig} DnsCacheConfig - */ - DnsCacheConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DnsCacheConfig) - return object; - var message = new $root.google.container.v1beta1.DnsCacheConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a DnsCacheConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {google.container.v1beta1.DnsCacheConfig} message DnsCacheConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DnsCacheConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this DnsCacheConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DnsCacheConfig - * @instance - * @returns {Object.} JSON object - */ - DnsCacheConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DnsCacheConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.DnsCacheConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DnsCacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DnsCacheConfig"; - }; - - return DnsCacheConfig; - })(); - - v1beta1.KalmConfig = (function() { - - /** - * Properties of a KalmConfig. - * @memberof google.container.v1beta1 - * @interface IKalmConfig - * @property {boolean|null} [enabled] KalmConfig enabled - */ - - /** - * Constructs a new KalmConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a KalmConfig. - * @implements IKalmConfig - * @constructor - * @param {google.container.v1beta1.IKalmConfig=} [properties] Properties to set - */ - function KalmConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KalmConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.KalmConfig - * @instance - */ - KalmConfig.prototype.enabled = false; - - /** - * Creates a new KalmConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {google.container.v1beta1.IKalmConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.KalmConfig} KalmConfig instance - */ - KalmConfig.create = function create(properties) { - return new KalmConfig(properties); - }; - - /** - * Encodes the specified KalmConfig message. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {google.container.v1beta1.IKalmConfig} message KalmConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KalmConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified KalmConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.KalmConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {google.container.v1beta1.IKalmConfig} message KalmConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KalmConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KalmConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.KalmConfig} KalmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KalmConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.KalmConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KalmConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.KalmConfig} KalmConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KalmConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KalmConfig message. - * @function verify - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KalmConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a KalmConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.KalmConfig} KalmConfig - */ - KalmConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.KalmConfig) - return object; - var message = new $root.google.container.v1beta1.KalmConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a KalmConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {google.container.v1beta1.KalmConfig} message KalmConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KalmConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this KalmConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.KalmConfig - * @instance - * @returns {Object.} JSON object - */ - KalmConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KalmConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.KalmConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KalmConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.KalmConfig"; - }; - - return KalmConfig; - })(); - - v1beta1.GkeBackupAgentConfig = (function() { - - /** - * Properties of a GkeBackupAgentConfig. - * @memberof google.container.v1beta1 - * @interface IGkeBackupAgentConfig - * @property {boolean|null} [enabled] GkeBackupAgentConfig enabled - */ - - /** - * Constructs a new GkeBackupAgentConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GkeBackupAgentConfig. - * @implements IGkeBackupAgentConfig - * @constructor - * @param {google.container.v1beta1.IGkeBackupAgentConfig=} [properties] Properties to set - */ - function GkeBackupAgentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GkeBackupAgentConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @instance - */ - GkeBackupAgentConfig.prototype.enabled = false; - - /** - * Creates a new GkeBackupAgentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {google.container.v1beta1.IGkeBackupAgentConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig instance - */ - GkeBackupAgentConfig.create = function create(properties) { - return new GkeBackupAgentConfig(properties); - }; - - /** - * Encodes the specified GkeBackupAgentConfig message. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {google.container.v1beta1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GkeBackupAgentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GkeBackupAgentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GkeBackupAgentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {google.container.v1beta1.IGkeBackupAgentConfig} message GkeBackupAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GkeBackupAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GkeBackupAgentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GkeBackupAgentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GkeBackupAgentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GkeBackupAgentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GkeBackupAgentConfig message. - * @function verify - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GkeBackupAgentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GkeBackupAgentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GkeBackupAgentConfig} GkeBackupAgentConfig - */ - GkeBackupAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GkeBackupAgentConfig) - return object; - var message = new $root.google.container.v1beta1.GkeBackupAgentConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GkeBackupAgentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {google.container.v1beta1.GkeBackupAgentConfig} message GkeBackupAgentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GkeBackupAgentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GkeBackupAgentConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @instance - * @returns {Object.} JSON object - */ - GkeBackupAgentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GkeBackupAgentConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GkeBackupAgentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GkeBackupAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GkeBackupAgentConfig"; - }; - - return GkeBackupAgentConfig; - })(); - - v1beta1.StatefulHAConfig = (function() { - - /** - * Properties of a StatefulHAConfig. - * @memberof google.container.v1beta1 - * @interface IStatefulHAConfig - * @property {boolean|null} [enabled] StatefulHAConfig enabled - */ - - /** - * Constructs a new StatefulHAConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a StatefulHAConfig. - * @implements IStatefulHAConfig - * @constructor - * @param {google.container.v1beta1.IStatefulHAConfig=} [properties] Properties to set - */ - function StatefulHAConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatefulHAConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.StatefulHAConfig - * @instance - */ - StatefulHAConfig.prototype.enabled = false; - - /** - * Creates a new StatefulHAConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {google.container.v1beta1.IStatefulHAConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig instance - */ - StatefulHAConfig.create = function create(properties) { - return new StatefulHAConfig(properties); - }; - - /** - * Encodes the specified StatefulHAConfig message. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {google.container.v1beta1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatefulHAConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified StatefulHAConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.StatefulHAConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {google.container.v1beta1.IStatefulHAConfig} message StatefulHAConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatefulHAConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatefulHAConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StatefulHAConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StatefulHAConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatefulHAConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatefulHAConfig message. - * @function verify - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatefulHAConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a StatefulHAConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.StatefulHAConfig} StatefulHAConfig - */ - StatefulHAConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.StatefulHAConfig) - return object; - var message = new $root.google.container.v1beta1.StatefulHAConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a StatefulHAConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {google.container.v1beta1.StatefulHAConfig} message StatefulHAConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatefulHAConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this StatefulHAConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.StatefulHAConfig - * @instance - * @returns {Object.} JSON object - */ - StatefulHAConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StatefulHAConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.StatefulHAConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StatefulHAConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.StatefulHAConfig"; - }; - - return StatefulHAConfig; - })(); - - v1beta1.ConfigConnectorConfig = (function() { - - /** - * Properties of a ConfigConnectorConfig. - * @memberof google.container.v1beta1 - * @interface IConfigConnectorConfig - * @property {boolean|null} [enabled] ConfigConnectorConfig enabled - */ - - /** - * Constructs a new ConfigConnectorConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ConfigConnectorConfig. - * @implements IConfigConnectorConfig - * @constructor - * @param {google.container.v1beta1.IConfigConnectorConfig=} [properties] Properties to set - */ - function ConfigConnectorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfigConnectorConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @instance - */ - ConfigConnectorConfig.prototype.enabled = false; - - /** - * Creates a new ConfigConnectorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {google.container.v1beta1.IConfigConnectorConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig instance - */ - ConfigConnectorConfig.create = function create(properties) { - return new ConfigConnectorConfig(properties); - }; - - /** - * Encodes the specified ConfigConnectorConfig message. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {google.container.v1beta1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigConnectorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConfigConnectorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfigConnectorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {google.container.v1beta1.IConfigConnectorConfig} message ConfigConnectorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigConnectorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigConnectorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ConfigConnectorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfigConnectorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigConnectorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfigConnectorConfig message. - * @function verify - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfigConnectorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConfigConnectorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ConfigConnectorConfig} ConfigConnectorConfig - */ - ConfigConnectorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ConfigConnectorConfig) - return object; - var message = new $root.google.container.v1beta1.ConfigConnectorConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConfigConnectorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {google.container.v1beta1.ConfigConnectorConfig} message ConfigConnectorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfigConnectorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConfigConnectorConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @instance - * @returns {Object.} JSON object - */ - ConfigConnectorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfigConnectorConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ConfigConnectorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfigConnectorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ConfigConnectorConfig"; - }; - - return ConfigConnectorConfig; - })(); - - v1beta1.GcePersistentDiskCsiDriverConfig = (function() { - - /** - * Properties of a GcePersistentDiskCsiDriverConfig. - * @memberof google.container.v1beta1 - * @interface IGcePersistentDiskCsiDriverConfig - * @property {boolean|null} [enabled] GcePersistentDiskCsiDriverConfig enabled - */ - - /** - * Constructs a new GcePersistentDiskCsiDriverConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GcePersistentDiskCsiDriverConfig. - * @implements IGcePersistentDiskCsiDriverConfig - * @constructor - * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set - */ - function GcePersistentDiskCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcePersistentDiskCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @instance - */ - GcePersistentDiskCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcePersistentDiskCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig instance - */ - GcePersistentDiskCsiDriverConfig.create = function create(properties) { - return new GcePersistentDiskCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcePersistentDiskCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcePersistentDiskCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcePersistentDiskCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcePersistentDiskCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcePersistentDiskCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcePersistentDiskCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcePersistentDiskCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcePersistentDiskCsiDriverConfig message. - * @function verify - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcePersistentDiskCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcePersistentDiskCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} GcePersistentDiskCsiDriverConfig - */ - GcePersistentDiskCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig) - return object; - var message = new $root.google.container.v1beta1.GcePersistentDiskCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcePersistentDiskCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {google.container.v1beta1.GcePersistentDiskCsiDriverConfig} message GcePersistentDiskCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcePersistentDiskCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcePersistentDiskCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcePersistentDiskCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcePersistentDiskCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GcePersistentDiskCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcePersistentDiskCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GcePersistentDiskCsiDriverConfig"; - }; - - return GcePersistentDiskCsiDriverConfig; - })(); - - v1beta1.GcpFilestoreCsiDriverConfig = (function() { - - /** - * Properties of a GcpFilestoreCsiDriverConfig. - * @memberof google.container.v1beta1 - * @interface IGcpFilestoreCsiDriverConfig - * @property {boolean|null} [enabled] GcpFilestoreCsiDriverConfig enabled - */ - - /** - * Constructs a new GcpFilestoreCsiDriverConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GcpFilestoreCsiDriverConfig. - * @implements IGcpFilestoreCsiDriverConfig - * @constructor - * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set - */ - function GcpFilestoreCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpFilestoreCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @instance - */ - GcpFilestoreCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcpFilestoreCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig instance - */ - GcpFilestoreCsiDriverConfig.create = function create(properties) { - return new GcpFilestoreCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpFilestoreCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcpFilestoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcpFilestoreCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpFilestoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpFilestoreCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpFilestoreCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpFilestoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpFilestoreCsiDriverConfig message. - * @function verify - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpFilestoreCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcpFilestoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GcpFilestoreCsiDriverConfig} GcpFilestoreCsiDriverConfig - */ - GcpFilestoreCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig) - return object; - var message = new $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcpFilestoreCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {google.container.v1beta1.GcpFilestoreCsiDriverConfig} message GcpFilestoreCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpFilestoreCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcpFilestoreCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcpFilestoreCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpFilestoreCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GcpFilestoreCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpFilestoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GcpFilestoreCsiDriverConfig"; - }; - - return GcpFilestoreCsiDriverConfig; - })(); - - v1beta1.GcsFuseCsiDriverConfig = (function() { - - /** - * Properties of a GcsFuseCsiDriverConfig. - * @memberof google.container.v1beta1 - * @interface IGcsFuseCsiDriverConfig - * @property {boolean|null} [enabled] GcsFuseCsiDriverConfig enabled - */ - - /** - * Constructs a new GcsFuseCsiDriverConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GcsFuseCsiDriverConfig. - * @implements IGcsFuseCsiDriverConfig - * @constructor - * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set - */ - function GcsFuseCsiDriverConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFuseCsiDriverConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @instance - */ - GcsFuseCsiDriverConfig.prototype.enabled = false; - - /** - * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig instance - */ - GcsFuseCsiDriverConfig.create = function create(properties) { - return new GcsFuseCsiDriverConfig(properties); - }; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFuseCsiDriverConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFuseCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFuseCsiDriverConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFuseCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFuseCsiDriverConfig message. - * @function verify - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFuseCsiDriverConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig - */ - GcsFuseCsiDriverConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GcsFuseCsiDriverConfig) - return object; - var message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {google.container.v1beta1.GcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFuseCsiDriverConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this GcsFuseCsiDriverConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @instance - * @returns {Object.} JSON object - */ - GcsFuseCsiDriverConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFuseCsiDriverConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFuseCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GcsFuseCsiDriverConfig"; - }; - - return GcsFuseCsiDriverConfig; - })(); - - v1beta1.RayOperatorConfig = (function() { - - /** - * Properties of a RayOperatorConfig. - * @memberof google.container.v1beta1 - * @interface IRayOperatorConfig - * @property {boolean|null} [enabled] RayOperatorConfig enabled - * @property {google.container.v1beta1.IRayClusterLoggingConfig|null} [rayClusterLoggingConfig] RayOperatorConfig rayClusterLoggingConfig - * @property {google.container.v1beta1.IRayClusterMonitoringConfig|null} [rayClusterMonitoringConfig] RayOperatorConfig rayClusterMonitoringConfig - */ - - /** - * Constructs a new RayOperatorConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a RayOperatorConfig. - * @implements IRayOperatorConfig - * @constructor - * @param {google.container.v1beta1.IRayOperatorConfig=} [properties] Properties to set - */ - function RayOperatorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayOperatorConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.enabled = false; - - /** - * RayOperatorConfig rayClusterLoggingConfig. - * @member {google.container.v1beta1.IRayClusterLoggingConfig|null|undefined} rayClusterLoggingConfig - * @memberof google.container.v1beta1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.rayClusterLoggingConfig = null; - - /** - * RayOperatorConfig rayClusterMonitoringConfig. - * @member {google.container.v1beta1.IRayClusterMonitoringConfig|null|undefined} rayClusterMonitoringConfig - * @memberof google.container.v1beta1.RayOperatorConfig - * @instance - */ - RayOperatorConfig.prototype.rayClusterMonitoringConfig = null; - - /** - * Creates a new RayOperatorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {google.container.v1beta1.IRayOperatorConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig instance - */ - RayOperatorConfig.create = function create(properties) { - return new RayOperatorConfig(properties); - }; - - /** - * Encodes the specified RayOperatorConfig message. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {google.container.v1beta1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayOperatorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.rayClusterLoggingConfig != null && Object.hasOwnProperty.call(message, "rayClusterLoggingConfig")) - $root.google.container.v1beta1.RayClusterLoggingConfig.encode(message.rayClusterLoggingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rayClusterMonitoringConfig != null && Object.hasOwnProperty.call(message, "rayClusterMonitoringConfig")) - $root.google.container.v1beta1.RayClusterMonitoringConfig.encode(message.rayClusterMonitoringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RayOperatorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayOperatorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {google.container.v1beta1.IRayOperatorConfig} message RayOperatorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayOperatorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayOperatorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayOperatorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayOperatorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayOperatorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayOperatorConfig message. - * @function verify - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayOperatorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) { - var error = $root.google.container.v1beta1.RayClusterLoggingConfig.verify(message.rayClusterLoggingConfig); - if (error) - return "rayClusterLoggingConfig." + error; - } - if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) { - var error = $root.google.container.v1beta1.RayClusterMonitoringConfig.verify(message.rayClusterMonitoringConfig); - if (error) - return "rayClusterMonitoringConfig." + error; - } - return null; - }; - - /** - * Creates a RayOperatorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RayOperatorConfig} RayOperatorConfig - */ - RayOperatorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RayOperatorConfig) - return object; - var message = new $root.google.container.v1beta1.RayOperatorConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.rayClusterLoggingConfig != null) { - if (typeof object.rayClusterLoggingConfig !== "object") - throw TypeError(".google.container.v1beta1.RayOperatorConfig.rayClusterLoggingConfig: object expected"); - message.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.fromObject(object.rayClusterLoggingConfig); - } - if (object.rayClusterMonitoringConfig != null) { - if (typeof object.rayClusterMonitoringConfig !== "object") - throw TypeError(".google.container.v1beta1.RayOperatorConfig.rayClusterMonitoringConfig: object expected"); - message.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.fromObject(object.rayClusterMonitoringConfig); - } - return message; - }; - - /** - * Creates a plain object from a RayOperatorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {google.container.v1beta1.RayOperatorConfig} message RayOperatorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayOperatorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.rayClusterLoggingConfig = null; - object.rayClusterMonitoringConfig = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.rayClusterLoggingConfig != null && message.hasOwnProperty("rayClusterLoggingConfig")) - object.rayClusterLoggingConfig = $root.google.container.v1beta1.RayClusterLoggingConfig.toObject(message.rayClusterLoggingConfig, options); - if (message.rayClusterMonitoringConfig != null && message.hasOwnProperty("rayClusterMonitoringConfig")) - object.rayClusterMonitoringConfig = $root.google.container.v1beta1.RayClusterMonitoringConfig.toObject(message.rayClusterMonitoringConfig, options); - return object; - }; - - /** - * Converts this RayOperatorConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RayOperatorConfig - * @instance - * @returns {Object.} JSON object - */ - RayOperatorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayOperatorConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.RayOperatorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayOperatorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RayOperatorConfig"; - }; - - return RayOperatorConfig; - })(); - - v1beta1.PrivateClusterMasterGlobalAccessConfig = (function() { - - /** - * Properties of a PrivateClusterMasterGlobalAccessConfig. - * @memberof google.container.v1beta1 - * @interface IPrivateClusterMasterGlobalAccessConfig - * @property {boolean|null} [enabled] PrivateClusterMasterGlobalAccessConfig enabled - */ - - /** - * Constructs a new PrivateClusterMasterGlobalAccessConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a PrivateClusterMasterGlobalAccessConfig. - * @implements IPrivateClusterMasterGlobalAccessConfig - * @constructor - * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set - */ - function PrivateClusterMasterGlobalAccessConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterMasterGlobalAccessConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @instance - */ - PrivateClusterMasterGlobalAccessConfig.prototype.enabled = false; - - /** - * Creates a new PrivateClusterMasterGlobalAccessConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig instance - */ - PrivateClusterMasterGlobalAccessConfig.create = function create(properties) { - return new PrivateClusterMasterGlobalAccessConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterMasterGlobalAccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified PrivateClusterMasterGlobalAccessConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterMasterGlobalAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterMasterGlobalAccessConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterMasterGlobalAccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterMasterGlobalAccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterMasterGlobalAccessConfig message. - * @function verify - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterMasterGlobalAccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a PrivateClusterMasterGlobalAccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} PrivateClusterMasterGlobalAccessConfig - */ - PrivateClusterMasterGlobalAccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig) - return object; - var message = new $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterMasterGlobalAccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig} message PrivateClusterMasterGlobalAccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterMasterGlobalAccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this PrivateClusterMasterGlobalAccessConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterMasterGlobalAccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterMasterGlobalAccessConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterMasterGlobalAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig"; - }; - - return PrivateClusterMasterGlobalAccessConfig; - })(); - - v1beta1.PrivateClusterConfig = (function() { - - /** - * Properties of a PrivateClusterConfig. - * @memberof google.container.v1beta1 - * @interface IPrivateClusterConfig - * @property {boolean|null} [enablePrivateNodes] PrivateClusterConfig enablePrivateNodes - * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint - * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock - * @property {string|null} [privateEndpoint] PrivateClusterConfig privateEndpoint - * @property {string|null} [publicEndpoint] PrivateClusterConfig publicEndpoint - * @property {string|null} [peeringName] PrivateClusterConfig peeringName - * @property {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null} [masterGlobalAccessConfig] PrivateClusterConfig masterGlobalAccessConfig - * @property {string|null} [privateEndpointSubnetwork] PrivateClusterConfig privateEndpointSubnetwork - */ - - /** - * Constructs a new PrivateClusterConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a PrivateClusterConfig. - * @implements IPrivateClusterConfig - * @constructor - * @param {google.container.v1beta1.IPrivateClusterConfig=} [properties] Properties to set - */ - function PrivateClusterConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterConfig enablePrivateNodes. - * @member {boolean} enablePrivateNodes - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateNodes = false; - - /** - * PrivateClusterConfig enablePrivateEndpoint. - * @member {boolean} enablePrivateEndpoint - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateEndpoint = false; - - /** - * PrivateClusterConfig masterIpv4CidrBlock. - * @member {string} masterIpv4CidrBlock - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; - - /** - * PrivateClusterConfig privateEndpoint. - * @member {string} privateEndpoint - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.privateEndpoint = ""; - - /** - * PrivateClusterConfig publicEndpoint. - * @member {string} publicEndpoint - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.publicEndpoint = ""; - - /** - * PrivateClusterConfig peeringName. - * @member {string} peeringName - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.peeringName = ""; - - /** - * PrivateClusterConfig masterGlobalAccessConfig. - * @member {google.container.v1beta1.IPrivateClusterMasterGlobalAccessConfig|null|undefined} masterGlobalAccessConfig - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterGlobalAccessConfig = null; - - /** - * PrivateClusterConfig privateEndpointSubnetwork. - * @member {string} privateEndpointSubnetwork - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.privateEndpointSubnetwork = ""; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig instance - */ - PrivateClusterConfig.create = function create(properties) { - return new PrivateClusterConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateNodes != null && Object.hasOwnProperty.call(message, "enablePrivateNodes")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateNodes); - if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePrivateEndpoint); - if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4CidrBlock); - if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.privateEndpoint); - if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); - if (message.peeringName != null && Object.hasOwnProperty.call(message, "peeringName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.peeringName); - if (message.masterGlobalAccessConfig != null && Object.hasOwnProperty.call(message, "masterGlobalAccessConfig")) - $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.encode(message.masterGlobalAccessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.privateEndpointSubnetwork); - return writer; - }; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {google.container.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PrivateClusterConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateNodes = reader.bool(); - break; - } - case 2: { - message.enablePrivateEndpoint = reader.bool(); - break; - } - case 3: { - message.masterIpv4CidrBlock = reader.string(); - break; - } - case 4: { - message.privateEndpoint = reader.string(); - break; - } - case 5: { - message.publicEndpoint = reader.string(); - break; - } - case 7: { - message.peeringName = reader.string(); - break; - } - case 8: { - message.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.privateEndpointSubnetwork = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterConfig message. - * @function verify - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) - if (typeof message.enablePrivateNodes !== "boolean") - return "enablePrivateNodes: boolean expected"; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - if (typeof message.enablePrivateEndpoint !== "boolean") - return "enablePrivateEndpoint: boolean expected"; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - if (!$util.isString(message.masterIpv4CidrBlock)) - return "masterIpv4CidrBlock: string expected"; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - if (!$util.isString(message.privateEndpoint)) - return "privateEndpoint: string expected"; - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - if (!$util.isString(message.publicEndpoint)) - return "publicEndpoint: string expected"; - if (message.peeringName != null && message.hasOwnProperty("peeringName")) - if (!$util.isString(message.peeringName)) - return "peeringName: string expected"; - if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) { - var error = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.verify(message.masterGlobalAccessConfig); - if (error) - return "masterGlobalAccessConfig." + error; - } - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - if (!$util.isString(message.privateEndpointSubnetwork)) - return "privateEndpointSubnetwork: string expected"; - return null; - }; - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.PrivateClusterConfig} PrivateClusterConfig - */ - PrivateClusterConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.PrivateClusterConfig) - return object; - var message = new $root.google.container.v1beta1.PrivateClusterConfig(); - if (object.enablePrivateNodes != null) - message.enablePrivateNodes = Boolean(object.enablePrivateNodes); - if (object.enablePrivateEndpoint != null) - message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); - if (object.masterIpv4CidrBlock != null) - message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); - if (object.privateEndpoint != null) - message.privateEndpoint = String(object.privateEndpoint); - if (object.publicEndpoint != null) - message.publicEndpoint = String(object.publicEndpoint); - if (object.peeringName != null) - message.peeringName = String(object.peeringName); - if (object.masterGlobalAccessConfig != null) { - if (typeof object.masterGlobalAccessConfig !== "object") - throw TypeError(".google.container.v1beta1.PrivateClusterConfig.masterGlobalAccessConfig: object expected"); - message.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.fromObject(object.masterGlobalAccessConfig); - } - if (object.privateEndpointSubnetwork != null) - message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {google.container.v1beta1.PrivateClusterConfig} message PrivateClusterConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateNodes = false; - object.enablePrivateEndpoint = false; - object.masterIpv4CidrBlock = ""; - object.privateEndpoint = ""; - object.publicEndpoint = ""; - object.peeringName = ""; - object.masterGlobalAccessConfig = null; - object.privateEndpointSubnetwork = ""; - } - if (message.enablePrivateNodes != null && message.hasOwnProperty("enablePrivateNodes")) - object.enablePrivateNodes = message.enablePrivateNodes; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - object.enablePrivateEndpoint = message.enablePrivateEndpoint; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; - if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) - object.privateEndpoint = message.privateEndpoint; - if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) - object.publicEndpoint = message.publicEndpoint; - if (message.peeringName != null && message.hasOwnProperty("peeringName")) - object.peeringName = message.peeringName; - if (message.masterGlobalAccessConfig != null && message.hasOwnProperty("masterGlobalAccessConfig")) - object.masterGlobalAccessConfig = $root.google.container.v1beta1.PrivateClusterMasterGlobalAccessConfig.toObject(message.masterGlobalAccessConfig, options); - if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) - object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; - return object; - }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.PrivateClusterConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.PrivateClusterConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.PrivateClusterConfig"; - }; - - return PrivateClusterConfig; - })(); - - v1beta1.IstioConfig = (function() { - - /** - * Properties of an IstioConfig. - * @memberof google.container.v1beta1 - * @interface IIstioConfig - * @property {boolean|null} [disabled] IstioConfig disabled - * @property {google.container.v1beta1.IstioConfig.IstioAuthMode|null} [auth] IstioConfig auth - */ - - /** - * Constructs a new IstioConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an IstioConfig. - * @implements IIstioConfig - * @constructor - * @param {google.container.v1beta1.IIstioConfig=} [properties] Properties to set - */ - function IstioConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IstioConfig disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.IstioConfig - * @instance - */ - IstioConfig.prototype.disabled = false; - - /** - * IstioConfig auth. - * @member {google.container.v1beta1.IstioConfig.IstioAuthMode} auth - * @memberof google.container.v1beta1.IstioConfig - * @instance - */ - IstioConfig.prototype.auth = 0; - - /** - * Creates a new IstioConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {google.container.v1beta1.IIstioConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.IstioConfig} IstioConfig instance - */ - IstioConfig.create = function create(properties) { - return new IstioConfig(properties); - }; - - /** - * Encodes the specified IstioConfig message. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {google.container.v1beta1.IIstioConfig} message IstioConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IstioConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - if (message.auth != null && Object.hasOwnProperty.call(message, "auth")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.auth); - return writer; - }; - - /** - * Encodes the specified IstioConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IstioConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {google.container.v1beta1.IIstioConfig} message IstioConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IstioConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IstioConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.IstioConfig} IstioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IstioConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IstioConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - case 2: { - message.auth = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IstioConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.IstioConfig} IstioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IstioConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IstioConfig message. - * @function verify - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IstioConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.auth != null && message.hasOwnProperty("auth")) - switch (message.auth) { - default: - return "auth: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an IstioConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.IstioConfig} IstioConfig - */ - IstioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.IstioConfig) - return object; - var message = new $root.google.container.v1beta1.IstioConfig(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - switch (object.auth) { - default: - if (typeof object.auth === "number") { - message.auth = object.auth; - break; - } - break; - case "AUTH_NONE": - case 0: - message.auth = 0; - break; - case "AUTH_MUTUAL_TLS": - case 1: - message.auth = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an IstioConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {google.container.v1beta1.IstioConfig} message IstioConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IstioConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disabled = false; - object.auth = options.enums === String ? "AUTH_NONE" : 0; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.auth != null && message.hasOwnProperty("auth")) - object.auth = options.enums === String ? $root.google.container.v1beta1.IstioConfig.IstioAuthMode[message.auth] === undefined ? message.auth : $root.google.container.v1beta1.IstioConfig.IstioAuthMode[message.auth] : message.auth; - return object; - }; - - /** - * Converts this IstioConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.IstioConfig - * @instance - * @returns {Object.} JSON object - */ - IstioConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IstioConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.IstioConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IstioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.IstioConfig"; - }; - - /** - * IstioAuthMode enum. - * @name google.container.v1beta1.IstioConfig.IstioAuthMode - * @enum {number} - * @property {number} AUTH_NONE=0 AUTH_NONE value - * @property {number} AUTH_MUTUAL_TLS=1 AUTH_MUTUAL_TLS value - */ - IstioConfig.IstioAuthMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTH_NONE"] = 0; - values[valuesById[1] = "AUTH_MUTUAL_TLS"] = 1; - return values; - })(); - - return IstioConfig; - })(); - - v1beta1.CloudRunConfig = (function() { - - /** - * Properties of a CloudRunConfig. - * @memberof google.container.v1beta1 - * @interface ICloudRunConfig - * @property {boolean|null} [disabled] CloudRunConfig disabled - * @property {google.container.v1beta1.CloudRunConfig.LoadBalancerType|null} [loadBalancerType] CloudRunConfig loadBalancerType - */ - - /** - * Constructs a new CloudRunConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a CloudRunConfig. - * @implements ICloudRunConfig - * @constructor - * @param {google.container.v1beta1.ICloudRunConfig=} [properties] Properties to set - */ - function CloudRunConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunConfig disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.CloudRunConfig - * @instance - */ - CloudRunConfig.prototype.disabled = false; - - /** - * CloudRunConfig loadBalancerType. - * @member {google.container.v1beta1.CloudRunConfig.LoadBalancerType} loadBalancerType - * @memberof google.container.v1beta1.CloudRunConfig - * @instance - */ - CloudRunConfig.prototype.loadBalancerType = 0; - - /** - * Creates a new CloudRunConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {google.container.v1beta1.ICloudRunConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig instance - */ - CloudRunConfig.create = function create(properties) { - return new CloudRunConfig(properties); - }; - - /** - * Encodes the specified CloudRunConfig message. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {google.container.v1beta1.ICloudRunConfig} message CloudRunConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.loadBalancerType); - return writer; - }; - - /** - * Encodes the specified CloudRunConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CloudRunConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {google.container.v1beta1.ICloudRunConfig} message CloudRunConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CloudRunConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - case 3: { - message.loadBalancerType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunConfig message. - * @function verify - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a CloudRunConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CloudRunConfig} CloudRunConfig - */ - CloudRunConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CloudRunConfig) - return object; - var message = new $root.google.container.v1beta1.CloudRunConfig(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "LOAD_BALANCER_TYPE_EXTERNAL": - case 1: - message.loadBalancerType = 1; - break; - case "LOAD_BALANCER_TYPE_INTERNAL": - case 2: - message.loadBalancerType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a CloudRunConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {google.container.v1beta1.CloudRunConfig} message CloudRunConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disabled = false; - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.container.v1beta1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.container.v1beta1.CloudRunConfig.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - return object; - }; - - /** - * Converts this CloudRunConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CloudRunConfig - * @instance - * @returns {Object.} JSON object - */ - CloudRunConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.CloudRunConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CloudRunConfig"; - }; - - /** - * LoadBalancerType enum. - * @name google.container.v1beta1.CloudRunConfig.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} LOAD_BALANCER_TYPE_EXTERNAL=1 LOAD_BALANCER_TYPE_EXTERNAL value - * @property {number} LOAD_BALANCER_TYPE_INTERNAL=2 LOAD_BALANCER_TYPE_INTERNAL value - */ - CloudRunConfig.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOAD_BALANCER_TYPE_EXTERNAL"] = 1; - values[valuesById[2] = "LOAD_BALANCER_TYPE_INTERNAL"] = 2; - return values; - })(); - - return CloudRunConfig; - })(); - - v1beta1.MasterAuthorizedNetworksConfig = (function() { - - /** - * Properties of a MasterAuthorizedNetworksConfig. - * @memberof google.container.v1beta1 - * @interface IMasterAuthorizedNetworksConfig - * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled - * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks - * @property {boolean|null} [gcpPublicCidrsAccessEnabled] MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled - */ - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a MasterAuthorizedNetworksConfig. - * @implements IMasterAuthorizedNetworksConfig - * @constructor - * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - */ - function MasterAuthorizedNetworksConfig(properties) { - this.cidrBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuthorizedNetworksConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.enabled = false; - - /** - * MasterAuthorizedNetworksConfig cidrBlocks. - * @member {Array.} cidrBlocks - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; - - /** - * MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. - * @member {boolean|null|undefined} gcpPublicCidrsAccessEnabled - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.gcpPublicCidrsAccessEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. - * @member {"gcpPublicCidrsAccessEnabled"|undefined} _gcpPublicCidrsAccessEnabled - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_gcpPublicCidrsAccessEnabled", { - get: $util.oneOfGetter($oneOfFields = ["gcpPublicCidrsAccessEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance - */ - MasterAuthorizedNetworksConfig.create = function create(properties) { - return new MasterAuthorizedNetworksConfig(properties); - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.cidrBlocks != null && message.cidrBlocks.length) - for (var i = 0; i < message.cidrBlocks.length; ++i) - $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcpPublicCidrsAccessEnabled != null && Object.hasOwnProperty.call(message, "gcpPublicCidrsAccessEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.gcpPublicCidrsAccessEnabled); - return writer; - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.cidrBlocks && message.cidrBlocks.length)) - message.cidrBlocks = []; - message.cidrBlocks.push($root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); - break; - } - case 3: { - message.gcpPublicCidrsAccessEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @function verify - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuthorizedNetworksConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { - if (!Array.isArray(message.cidrBlocks)) - return "cidrBlocks: array expected"; - for (var i = 0; i < message.cidrBlocks.length; ++i) { - var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); - if (error) - return "cidrBlocks." + error; - } - } - if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { - properties._gcpPublicCidrsAccessEnabled = 1; - if (typeof message.gcpPublicCidrsAccessEnabled !== "boolean") - return "gcpPublicCidrsAccessEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - */ - MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MasterAuthorizedNetworksConfig) - return object; - var message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.cidrBlocks) { - if (!Array.isArray(object.cidrBlocks)) - throw TypeError(".google.container.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); - message.cidrBlocks = []; - for (var i = 0; i < object.cidrBlocks.length; ++i) { - if (typeof object.cidrBlocks[i] !== "object") - throw TypeError(".google.container.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); - message.cidrBlocks[i] = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); - } - } - if (object.gcpPublicCidrsAccessEnabled != null) - message.gcpPublicCidrsAccessEnabled = Boolean(object.gcpPublicCidrsAccessEnabled); - return message; - }; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cidrBlocks = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.cidrBlocks && message.cidrBlocks.length) { - object.cidrBlocks = []; - for (var j = 0; j < message.cidrBlocks.length; ++j) - object.cidrBlocks[j] = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); - } - if (message.gcpPublicCidrsAccessEnabled != null && message.hasOwnProperty("gcpPublicCidrsAccessEnabled")) { - object.gcpPublicCidrsAccessEnabled = message.gcpPublicCidrsAccessEnabled; - if (options.oneofs) - object._gcpPublicCidrsAccessEnabled = "gcpPublicCidrsAccessEnabled"; - } - return object; - }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @instance - * @returns {Object.} JSON object - */ - MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MasterAuthorizedNetworksConfig"; - }; - - MasterAuthorizedNetworksConfig.CidrBlock = (function() { - - /** - * Properties of a CidrBlock. - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @interface ICidrBlock - * @property {string|null} [displayName] CidrBlock displayName - * @property {string|null} [cidrBlock] CidrBlock cidrBlock - */ - - /** - * Constructs a new CidrBlock. - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig - * @classdesc Represents a CidrBlock. - * @implements ICidrBlock - * @constructor - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - */ - function CidrBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CidrBlock displayName. - * @member {string} displayName - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.displayName = ""; - - /** - * CidrBlock cidrBlock. - * @member {string} cidrBlock - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.cidrBlock = ""; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance - */ - CidrBlock.create = function create(properties) { - return new CidrBlock(properties); - }; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); - return writer; - }; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.cidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CidrBlock message. - * @function verify - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CidrBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - if (!$util.isString(message.cidrBlock)) - return "cidrBlock: string expected"; - return null; - }; - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - */ - CidrBlock.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) - return object; - var message = new $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.cidrBlock != null) - message.cidrBlock = String(object.cidrBlock); - return message; - }; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CidrBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.cidrBlock = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - object.cidrBlock = message.cidrBlock; - return object; - }; - - /** - * Converts this CidrBlock to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - * @returns {Object.} JSON object - */ - CidrBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CidrBlock - * @function getTypeUrl - * @memberof google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock"; - }; - - return CidrBlock; - })(); - - return MasterAuthorizedNetworksConfig; - })(); - - v1beta1.LegacyAbac = (function() { - - /** - * Properties of a LegacyAbac. - * @memberof google.container.v1beta1 - * @interface ILegacyAbac - * @property {boolean|null} [enabled] LegacyAbac enabled - */ - - /** - * Constructs a new LegacyAbac. - * @memberof google.container.v1beta1 - * @classdesc Represents a LegacyAbac. - * @implements ILegacyAbac - * @constructor - * @param {google.container.v1beta1.ILegacyAbac=} [properties] Properties to set - */ - function LegacyAbac(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LegacyAbac enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.LegacyAbac - * @instance - */ - LegacyAbac.prototype.enabled = false; - - /** - * Creates a new LegacyAbac instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {google.container.v1beta1.ILegacyAbac=} [properties] Properties to set - * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac instance - */ - LegacyAbac.create = function create(properties) { - return new LegacyAbac(properties); - }; - - /** - * Encodes the specified LegacyAbac message. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {google.container.v1beta1.ILegacyAbac} message LegacyAbac message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LegacyAbac.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified LegacyAbac message, length delimited. Does not implicitly {@link google.container.v1beta1.LegacyAbac.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {google.container.v1beta1.ILegacyAbac} message LegacyAbac message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LegacyAbac.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LegacyAbac.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LegacyAbac(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LegacyAbac message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LegacyAbac.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LegacyAbac message. - * @function verify - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LegacyAbac.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a LegacyAbac message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LegacyAbac} LegacyAbac - */ - LegacyAbac.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LegacyAbac) - return object; - var message = new $root.google.container.v1beta1.LegacyAbac(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a LegacyAbac message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {google.container.v1beta1.LegacyAbac} message LegacyAbac - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LegacyAbac.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this LegacyAbac to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LegacyAbac - * @instance - * @returns {Object.} JSON object - */ - LegacyAbac.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LegacyAbac - * @function getTypeUrl - * @memberof google.container.v1beta1.LegacyAbac - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LegacyAbac.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LegacyAbac"; - }; - - return LegacyAbac; - })(); - - v1beta1.NetworkPolicy = (function() { - - /** - * Properties of a NetworkPolicy. - * @memberof google.container.v1beta1 - * @interface INetworkPolicy - * @property {google.container.v1beta1.NetworkPolicy.Provider|null} [provider] NetworkPolicy provider - * @property {boolean|null} [enabled] NetworkPolicy enabled - */ - - /** - * Constructs a new NetworkPolicy. - * @memberof google.container.v1beta1 - * @classdesc Represents a NetworkPolicy. - * @implements INetworkPolicy - * @constructor - * @param {google.container.v1beta1.INetworkPolicy=} [properties] Properties to set - */ - function NetworkPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPolicy provider. - * @member {google.container.v1beta1.NetworkPolicy.Provider} provider - * @memberof google.container.v1beta1.NetworkPolicy - * @instance - */ - NetworkPolicy.prototype.provider = 0; - - /** - * NetworkPolicy enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.NetworkPolicy - * @instance - */ - NetworkPolicy.prototype.enabled = false; - - /** - * Creates a new NetworkPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {google.container.v1beta1.INetworkPolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy instance - */ - NetworkPolicy.create = function create(properties) { - return new NetworkPolicy(properties); - }; - - /** - * Encodes the specified NetworkPolicy message. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {google.container.v1beta1.INetworkPolicy} message NetworkPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified NetworkPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {google.container.v1beta1.INetworkPolicy} message NetworkPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.provider = reader.int32(); - break; - } - case 2: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPolicy message. - * @function verify - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - switch (message.provider) { - default: - return "provider: enum value expected"; - case 0: - case 1: - break; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a NetworkPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NetworkPolicy} NetworkPolicy - */ - NetworkPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NetworkPolicy) - return object; - var message = new $root.google.container.v1beta1.NetworkPolicy(); - switch (object.provider) { - default: - if (typeof object.provider === "number") { - message.provider = object.provider; - break; - } - break; - case "PROVIDER_UNSPECIFIED": - case 0: - message.provider = 0; - break; - case "CALICO": - case 1: - message.provider = 1; - break; - } - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a NetworkPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {google.container.v1beta1.NetworkPolicy} message NetworkPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.provider = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; - object.enabled = false; - } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = options.enums === String ? $root.google.container.v1beta1.NetworkPolicy.Provider[message.provider] === undefined ? message.provider : $root.google.container.v1beta1.NetworkPolicy.Provider[message.provider] : message.provider; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this NetworkPolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NetworkPolicy - * @instance - * @returns {Object.} JSON object - */ - NetworkPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.NetworkPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NetworkPolicy"; - }; - - /** - * Provider enum. - * @name google.container.v1beta1.NetworkPolicy.Provider - * @enum {number} - * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value - * @property {number} CALICO=1 CALICO value - */ - NetworkPolicy.Provider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "CALICO"] = 1; - return values; - })(); - - return NetworkPolicy; - })(); - - v1beta1.PodCIDROverprovisionConfig = (function() { - - /** - * Properties of a PodCIDROverprovisionConfig. - * @memberof google.container.v1beta1 - * @interface IPodCIDROverprovisionConfig - * @property {boolean|null} [disable] PodCIDROverprovisionConfig disable - */ - - /** - * Constructs a new PodCIDROverprovisionConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a PodCIDROverprovisionConfig. - * @implements IPodCIDROverprovisionConfig - * @constructor - * @param {google.container.v1beta1.IPodCIDROverprovisionConfig=} [properties] Properties to set - */ - function PodCIDROverprovisionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PodCIDROverprovisionConfig disable. - * @member {boolean} disable - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @instance - */ - PodCIDROverprovisionConfig.prototype.disable = false; - - /** - * Creates a new PodCIDROverprovisionConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1beta1.IPodCIDROverprovisionConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig instance - */ - PodCIDROverprovisionConfig.create = function create(properties) { - return new PodCIDROverprovisionConfig(properties); - }; - - /** - * Encodes the specified PodCIDROverprovisionConfig message. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1beta1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodCIDROverprovisionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); - return writer; - }; - - /** - * Encodes the specified PodCIDROverprovisionConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodCIDROverprovisionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1beta1.IPodCIDROverprovisionConfig} message PodCIDROverprovisionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodCIDROverprovisionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodCIDROverprovisionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PodCIDROverprovisionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disable = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PodCIDROverprovisionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodCIDROverprovisionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PodCIDROverprovisionConfig message. - * @function verify - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PodCIDROverprovisionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disable != null && message.hasOwnProperty("disable")) - if (typeof message.disable !== "boolean") - return "disable: boolean expected"; - return null; - }; - - /** - * Creates a PodCIDROverprovisionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.PodCIDROverprovisionConfig} PodCIDROverprovisionConfig - */ - PodCIDROverprovisionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.PodCIDROverprovisionConfig) - return object; - var message = new $root.google.container.v1beta1.PodCIDROverprovisionConfig(); - if (object.disable != null) - message.disable = Boolean(object.disable); - return message; - }; - - /** - * Creates a plain object from a PodCIDROverprovisionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {google.container.v1beta1.PodCIDROverprovisionConfig} message PodCIDROverprovisionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PodCIDROverprovisionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disable = false; - if (message.disable != null && message.hasOwnProperty("disable")) - object.disable = message.disable; - return object; - }; - - /** - * Converts this PodCIDROverprovisionConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @instance - * @returns {Object.} JSON object - */ - PodCIDROverprovisionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PodCIDROverprovisionConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.PodCIDROverprovisionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PodCIDROverprovisionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.PodCIDROverprovisionConfig"; - }; - - return PodCIDROverprovisionConfig; - })(); - - v1beta1.IPAllocationPolicy = (function() { - - /** - * Properties of a IPAllocationPolicy. - * @memberof google.container.v1beta1 - * @interface IIPAllocationPolicy - * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases - * @property {boolean|null} [createSubnetwork] IPAllocationPolicy createSubnetwork - * @property {string|null} [subnetworkName] IPAllocationPolicy subnetworkName - * @property {string|null} [clusterIpv4Cidr] IPAllocationPolicy clusterIpv4Cidr - * @property {string|null} [nodeIpv4Cidr] IPAllocationPolicy nodeIpv4Cidr - * @property {string|null} [servicesIpv4Cidr] IPAllocationPolicy servicesIpv4Cidr - * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName - * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName - * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock - * @property {string|null} [nodeIpv4CidrBlock] IPAllocationPolicy nodeIpv4CidrBlock - * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock - * @property {boolean|null} [allowRouteOverlap] IPAllocationPolicy allowRouteOverlap - * @property {string|null} [tpuIpv4CidrBlock] IPAllocationPolicy tpuIpv4CidrBlock - * @property {boolean|null} [useRoutes] IPAllocationPolicy useRoutes - * @property {google.container.v1beta1.IPAllocationPolicy.StackType|null} [stackType] IPAllocationPolicy stackType - * @property {google.container.v1beta1.IPAllocationPolicy.IPv6AccessType|null} [ipv6AccessType] IPAllocationPolicy ipv6AccessType - * @property {google.container.v1beta1.IPodCIDROverprovisionConfig|null} [podCidrOverprovisionConfig] IPAllocationPolicy podCidrOverprovisionConfig - * @property {string|null} [subnetIpv6CidrBlock] IPAllocationPolicy subnetIpv6CidrBlock - * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock - * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] IPAllocationPolicy additionalPodRangesConfig - * @property {number|null} [defaultPodIpv4RangeUtilization] IPAllocationPolicy defaultPodIpv4RangeUtilization - */ - - /** - * Constructs a new IPAllocationPolicy. - * @memberof google.container.v1beta1 - * @classdesc Represents a IPAllocationPolicy. - * @implements IIPAllocationPolicy - * @constructor - * @param {google.container.v1beta1.IIPAllocationPolicy=} [properties] Properties to set - */ - function IPAllocationPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IPAllocationPolicy useIpAliases. - * @member {boolean} useIpAliases - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useIpAliases = false; - - /** - * IPAllocationPolicy createSubnetwork. - * @member {boolean} createSubnetwork - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.createSubnetwork = false; - - /** - * IPAllocationPolicy subnetworkName. - * @member {string} subnetworkName - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.subnetworkName = ""; - - /** - * IPAllocationPolicy clusterIpv4Cidr. - * @member {string} clusterIpv4Cidr - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4Cidr = ""; - - /** - * IPAllocationPolicy nodeIpv4Cidr. - * @member {string} nodeIpv4Cidr - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.nodeIpv4Cidr = ""; - - /** - * IPAllocationPolicy servicesIpv4Cidr. - * @member {string} servicesIpv4Cidr - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4Cidr = ""; - - /** - * IPAllocationPolicy clusterSecondaryRangeName. - * @member {string} clusterSecondaryRangeName - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; - - /** - * IPAllocationPolicy servicesSecondaryRangeName. - * @member {string} servicesSecondaryRangeName - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; - - /** - * IPAllocationPolicy clusterIpv4CidrBlock. - * @member {string} clusterIpv4CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy nodeIpv4CidrBlock. - * @member {string} nodeIpv4CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.nodeIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy servicesIpv4CidrBlock. - * @member {string} servicesIpv4CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy allowRouteOverlap. - * @member {boolean} allowRouteOverlap - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.allowRouteOverlap = false; - - /** - * IPAllocationPolicy tpuIpv4CidrBlock. - * @member {string} tpuIpv4CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.tpuIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy useRoutes. - * @member {boolean} useRoutes - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useRoutes = false; - - /** - * IPAllocationPolicy stackType. - * @member {google.container.v1beta1.IPAllocationPolicy.StackType} stackType - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.stackType = 0; - - /** - * IPAllocationPolicy ipv6AccessType. - * @member {google.container.v1beta1.IPAllocationPolicy.IPv6AccessType} ipv6AccessType - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.ipv6AccessType = 0; - - /** - * IPAllocationPolicy podCidrOverprovisionConfig. - * @member {google.container.v1beta1.IPodCIDROverprovisionConfig|null|undefined} podCidrOverprovisionConfig - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.podCidrOverprovisionConfig = null; - - /** - * IPAllocationPolicy subnetIpv6CidrBlock. - * @member {string} subnetIpv6CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.subnetIpv6CidrBlock = ""; - - /** - * IPAllocationPolicy servicesIpv6CidrBlock. - * @member {string} servicesIpv6CidrBlock - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv6CidrBlock = ""; - - /** - * IPAllocationPolicy additionalPodRangesConfig. - * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.additionalPodRangesConfig = null; - - /** - * IPAllocationPolicy defaultPodIpv4RangeUtilization. - * @member {number} defaultPodIpv4RangeUtilization - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.defaultPodIpv4RangeUtilization = 0; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {google.container.v1beta1.IIPAllocationPolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy instance - */ - IPAllocationPolicy.create = function create(properties) { - return new IPAllocationPolicy(properties); - }; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {google.container.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); - if (message.createSubnetwork != null && Object.hasOwnProperty.call(message, "createSubnetwork")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.createSubnetwork); - if (message.subnetworkName != null && Object.hasOwnProperty.call(message, "subnetworkName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetworkName); - if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4Cidr); - if (message.nodeIpv4Cidr != null && Object.hasOwnProperty.call(message, "nodeIpv4Cidr")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeIpv4Cidr); - if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.servicesIpv4Cidr); - if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.clusterSecondaryRangeName); - if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.servicesSecondaryRangeName); - if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4CidrBlock); - if (message.nodeIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrBlock")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.nodeIpv4CidrBlock); - if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.servicesIpv4CidrBlock); - if (message.allowRouteOverlap != null && Object.hasOwnProperty.call(message, "allowRouteOverlap")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.allowRouteOverlap); - if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.tpuIpv4CidrBlock); - if (message.useRoutes != null && Object.hasOwnProperty.call(message, "useRoutes")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.useRoutes); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ipv6AccessType); - if (message.podCidrOverprovisionConfig != null && Object.hasOwnProperty.call(message, "podCidrOverprovisionConfig")) - $root.google.container.v1beta1.PodCIDROverprovisionConfig.encode(message.podCidrOverprovisionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.subnetIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "subnetIpv6CidrBlock")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.subnetIpv6CidrBlock); - if (message.servicesIpv6CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv6CidrBlock")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.servicesIpv6CidrBlock); - if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) - $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.defaultPodIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "defaultPodIpv4RangeUtilization")) - writer.uint32(/* id 25, wireType 1 =*/201).double(message.defaultPodIpv4RangeUtilization); - return writer; - }; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {google.container.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IPAllocationPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.useIpAliases = reader.bool(); - break; - } - case 2: { - message.createSubnetwork = reader.bool(); - break; - } - case 3: { - message.subnetworkName = reader.string(); - break; - } - case 4: { - message.clusterIpv4Cidr = reader.string(); - break; - } - case 5: { - message.nodeIpv4Cidr = reader.string(); - break; - } - case 6: { - message.servicesIpv4Cidr = reader.string(); - break; - } - case 7: { - message.clusterSecondaryRangeName = reader.string(); - break; - } - case 8: { - message.servicesSecondaryRangeName = reader.string(); - break; - } - case 9: { - message.clusterIpv4CidrBlock = reader.string(); - break; - } - case 10: { - message.nodeIpv4CidrBlock = reader.string(); - break; - } - case 11: { - message.servicesIpv4CidrBlock = reader.string(); - break; - } - case 12: { - message.allowRouteOverlap = reader.bool(); - break; - } - case 13: { - message.tpuIpv4CidrBlock = reader.string(); - break; - } - case 15: { - message.useRoutes = reader.bool(); - break; - } - case 16: { - message.stackType = reader.int32(); - break; - } - case 17: { - message.ipv6AccessType = reader.int32(); - break; - } - case 21: { - message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.subnetIpv6CidrBlock = reader.string(); - break; - } - case 23: { - message.servicesIpv6CidrBlock = reader.string(); - break; - } - case 24: { - message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 25: { - message.defaultPodIpv4RangeUtilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a IPAllocationPolicy message. - * @function verify - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IPAllocationPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - if (typeof message.useIpAliases !== "boolean") - return "useIpAliases: boolean expected"; - if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) - if (typeof message.createSubnetwork !== "boolean") - return "createSubnetwork: boolean expected"; - if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) - if (!$util.isString(message.subnetworkName)) - return "subnetworkName: string expected"; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - if (!$util.isString(message.clusterIpv4Cidr)) - return "clusterIpv4Cidr: string expected"; - if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) - if (!$util.isString(message.nodeIpv4Cidr)) - return "nodeIpv4Cidr: string expected"; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - if (!$util.isString(message.servicesIpv4Cidr)) - return "servicesIpv4Cidr: string expected"; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - if (!$util.isString(message.clusterSecondaryRangeName)) - return "clusterSecondaryRangeName: string expected"; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - if (!$util.isString(message.servicesSecondaryRangeName)) - return "servicesSecondaryRangeName: string expected"; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - if (!$util.isString(message.clusterIpv4CidrBlock)) - return "clusterIpv4CidrBlock: string expected"; - if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) - if (!$util.isString(message.nodeIpv4CidrBlock)) - return "nodeIpv4CidrBlock: string expected"; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - if (!$util.isString(message.servicesIpv4CidrBlock)) - return "servicesIpv4CidrBlock: string expected"; - if (message.allowRouteOverlap != null && message.hasOwnProperty("allowRouteOverlap")) - if (typeof message.allowRouteOverlap !== "boolean") - return "allowRouteOverlap: boolean expected"; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - if (!$util.isString(message.tpuIpv4CidrBlock)) - return "tpuIpv4CidrBlock: string expected"; - if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) - if (typeof message.useRoutes !== "boolean") - return "useRoutes: boolean expected"; - if (message.stackType != null && message.hasOwnProperty("stackType")) - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) { - var error = $root.google.container.v1beta1.PodCIDROverprovisionConfig.verify(message.podCidrOverprovisionConfig); - if (error) - return "podCidrOverprovisionConfig." + error; - } - if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) - if (!$util.isString(message.subnetIpv6CidrBlock)) - return "subnetIpv6CidrBlock: string expected"; - if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) - if (!$util.isString(message.servicesIpv6CidrBlock)) - return "servicesIpv6CidrBlock: string expected"; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { - var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); - if (error) - return "additionalPodRangesConfig." + error; - } - if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) - if (typeof message.defaultPodIpv4RangeUtilization !== "number") - return "defaultPodIpv4RangeUtilization: number expected"; - return null; - }; - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.IPAllocationPolicy} IPAllocationPolicy - */ - IPAllocationPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.IPAllocationPolicy) - return object; - var message = new $root.google.container.v1beta1.IPAllocationPolicy(); - if (object.useIpAliases != null) - message.useIpAliases = Boolean(object.useIpAliases); - if (object.createSubnetwork != null) - message.createSubnetwork = Boolean(object.createSubnetwork); - if (object.subnetworkName != null) - message.subnetworkName = String(object.subnetworkName); - if (object.clusterIpv4Cidr != null) - message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); - if (object.nodeIpv4Cidr != null) - message.nodeIpv4Cidr = String(object.nodeIpv4Cidr); - if (object.servicesIpv4Cidr != null) - message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); - if (object.clusterSecondaryRangeName != null) - message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); - if (object.servicesSecondaryRangeName != null) - message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); - if (object.clusterIpv4CidrBlock != null) - message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); - if (object.nodeIpv4CidrBlock != null) - message.nodeIpv4CidrBlock = String(object.nodeIpv4CidrBlock); - if (object.servicesIpv4CidrBlock != null) - message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); - if (object.allowRouteOverlap != null) - message.allowRouteOverlap = Boolean(object.allowRouteOverlap); - if (object.tpuIpv4CidrBlock != null) - message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); - if (object.useRoutes != null) - message.useRoutes = Boolean(object.useRoutes); - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "IPV6_ACCESS_TYPE_UNSPECIFIED": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.podCidrOverprovisionConfig != null) { - if (typeof object.podCidrOverprovisionConfig !== "object") - throw TypeError(".google.container.v1beta1.IPAllocationPolicy.podCidrOverprovisionConfig: object expected"); - message.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.fromObject(object.podCidrOverprovisionConfig); - } - if (object.subnetIpv6CidrBlock != null) - message.subnetIpv6CidrBlock = String(object.subnetIpv6CidrBlock); - if (object.servicesIpv6CidrBlock != null) - message.servicesIpv6CidrBlock = String(object.servicesIpv6CidrBlock); - if (object.additionalPodRangesConfig != null) { - if (typeof object.additionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1beta1.IPAllocationPolicy.additionalPodRangesConfig: object expected"); - message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); - } - if (object.defaultPodIpv4RangeUtilization != null) - message.defaultPodIpv4RangeUtilization = Number(object.defaultPodIpv4RangeUtilization); - return message; - }; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {google.container.v1beta1.IPAllocationPolicy} message IPAllocationPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IPAllocationPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.useIpAliases = false; - object.createSubnetwork = false; - object.subnetworkName = ""; - object.clusterIpv4Cidr = ""; - object.nodeIpv4Cidr = ""; - object.servicesIpv4Cidr = ""; - object.clusterSecondaryRangeName = ""; - object.servicesSecondaryRangeName = ""; - object.clusterIpv4CidrBlock = ""; - object.nodeIpv4CidrBlock = ""; - object.servicesIpv4CidrBlock = ""; - object.allowRouteOverlap = false; - object.tpuIpv4CidrBlock = ""; - object.useRoutes = false; - object.stackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; - object.ipv6AccessType = options.enums === String ? "IPV6_ACCESS_TYPE_UNSPECIFIED" : 0; - object.podCidrOverprovisionConfig = null; - object.subnetIpv6CidrBlock = ""; - object.servicesIpv6CidrBlock = ""; - object.additionalPodRangesConfig = null; - object.defaultPodIpv4RangeUtilization = 0; - } - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - object.useIpAliases = message.useIpAliases; - if (message.createSubnetwork != null && message.hasOwnProperty("createSubnetwork")) - object.createSubnetwork = message.createSubnetwork; - if (message.subnetworkName != null && message.hasOwnProperty("subnetworkName")) - object.subnetworkName = message.subnetworkName; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - object.clusterIpv4Cidr = message.clusterIpv4Cidr; - if (message.nodeIpv4Cidr != null && message.hasOwnProperty("nodeIpv4Cidr")) - object.nodeIpv4Cidr = message.nodeIpv4Cidr; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - object.servicesIpv4Cidr = message.servicesIpv4Cidr; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; - if (message.nodeIpv4CidrBlock != null && message.hasOwnProperty("nodeIpv4CidrBlock")) - object.nodeIpv4CidrBlock = message.nodeIpv4CidrBlock; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; - if (message.allowRouteOverlap != null && message.hasOwnProperty("allowRouteOverlap")) - object.allowRouteOverlap = message.allowRouteOverlap; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; - if (message.useRoutes != null && message.hasOwnProperty("useRoutes")) - object.useRoutes = message.useRoutes; - if (message.stackType != null && message.hasOwnProperty("stackType")) - object.stackType = options.enums === String ? $root.google.container.v1beta1.IPAllocationPolicy.StackType[message.stackType] === undefined ? message.stackType : $root.google.container.v1beta1.IPAllocationPolicy.StackType[message.stackType] : message.stackType; - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) - object.ipv6AccessType = options.enums === String ? $root.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.container.v1beta1.IPAllocationPolicy.IPv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (message.podCidrOverprovisionConfig != null && message.hasOwnProperty("podCidrOverprovisionConfig")) - object.podCidrOverprovisionConfig = $root.google.container.v1beta1.PodCIDROverprovisionConfig.toObject(message.podCidrOverprovisionConfig, options); - if (message.subnetIpv6CidrBlock != null && message.hasOwnProperty("subnetIpv6CidrBlock")) - object.subnetIpv6CidrBlock = message.subnetIpv6CidrBlock; - if (message.servicesIpv6CidrBlock != null && message.hasOwnProperty("servicesIpv6CidrBlock")) - object.servicesIpv6CidrBlock = message.servicesIpv6CidrBlock; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) - object.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); - if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) - object.defaultPodIpv4RangeUtilization = options.json && !isFinite(message.defaultPodIpv4RangeUtilization) ? String(message.defaultPodIpv4RangeUtilization) : message.defaultPodIpv4RangeUtilization; - return object; - }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.IPAllocationPolicy - * @instance - * @returns {Object.} JSON object - */ - IPAllocationPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IPAllocationPolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.IPAllocationPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.IPAllocationPolicy"; - }; - - /** - * StackType enum. - * @name google.container.v1beta1.IPAllocationPolicy.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4=1 IPV4 value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - IPAllocationPolicy.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - /** - * IPv6AccessType enum. - * @name google.container.v1beta1.IPAllocationPolicy.IPv6AccessType - * @enum {number} - * @property {number} IPV6_ACCESS_TYPE_UNSPECIFIED=0 IPV6_ACCESS_TYPE_UNSPECIFIED value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - IPAllocationPolicy.IPv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IPV6_ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - return IPAllocationPolicy; - })(); - - v1beta1.BinaryAuthorization = (function() { - - /** - * Properties of a BinaryAuthorization. - * @memberof google.container.v1beta1 - * @interface IBinaryAuthorization - * @property {boolean|null} [enabled] BinaryAuthorization enabled - * @property {google.container.v1beta1.BinaryAuthorization.EvaluationMode|null} [evaluationMode] BinaryAuthorization evaluationMode - * @property {Array.|null} [policyBindings] BinaryAuthorization policyBindings - */ - - /** - * Constructs a new BinaryAuthorization. - * @memberof google.container.v1beta1 - * @classdesc Represents a BinaryAuthorization. - * @implements IBinaryAuthorization - * @constructor - * @param {google.container.v1beta1.IBinaryAuthorization=} [properties] Properties to set - */ - function BinaryAuthorization(properties) { - this.policyBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BinaryAuthorization enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.BinaryAuthorization - * @instance - */ - BinaryAuthorization.prototype.enabled = false; - - /** - * BinaryAuthorization evaluationMode. - * @member {google.container.v1beta1.BinaryAuthorization.EvaluationMode} evaluationMode - * @memberof google.container.v1beta1.BinaryAuthorization - * @instance - */ - BinaryAuthorization.prototype.evaluationMode = 0; - - /** - * BinaryAuthorization policyBindings. - * @member {Array.} policyBindings - * @memberof google.container.v1beta1.BinaryAuthorization - * @instance - */ - BinaryAuthorization.prototype.policyBindings = $util.emptyArray; - - /** - * Creates a new BinaryAuthorization instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {google.container.v1beta1.IBinaryAuthorization=} [properties] Properties to set - * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization instance - */ - BinaryAuthorization.create = function create(properties) { - return new BinaryAuthorization(properties); - }; - - /** - * Encodes the specified BinaryAuthorization message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {google.container.v1beta1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryAuthorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.evaluationMode != null && Object.hasOwnProperty.call(message, "evaluationMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationMode); - if (message.policyBindings != null && message.policyBindings.length) - for (var i = 0; i < message.policyBindings.length; ++i) - $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.encode(message.policyBindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BinaryAuthorization message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {google.container.v1beta1.IBinaryAuthorization} message BinaryAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinaryAuthorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryAuthorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BinaryAuthorization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.evaluationMode = reader.int32(); - break; - } - case 5: { - if (!(message.policyBindings && message.policyBindings.length)) - message.policyBindings = []; - message.policyBindings.push($root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinaryAuthorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinaryAuthorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinaryAuthorization message. - * @function verify - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinaryAuthorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) - switch (message.evaluationMode) { - default: - return "evaluationMode: enum value expected"; - case 0: - case 1: - case 2: - case 5: - case 6: - break; - } - if (message.policyBindings != null && message.hasOwnProperty("policyBindings")) { - if (!Array.isArray(message.policyBindings)) - return "policyBindings: array expected"; - for (var i = 0; i < message.policyBindings.length; ++i) { - var error = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify(message.policyBindings[i]); - if (error) - return "policyBindings." + error; - } - } - return null; - }; - - /** - * Creates a BinaryAuthorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BinaryAuthorization} BinaryAuthorization - */ - BinaryAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BinaryAuthorization) - return object; - var message = new $root.google.container.v1beta1.BinaryAuthorization(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - switch (object.evaluationMode) { - default: - if (typeof object.evaluationMode === "number") { - message.evaluationMode = object.evaluationMode; - break; - } - break; - case "EVALUATION_MODE_UNSPECIFIED": - case 0: - message.evaluationMode = 0; - break; - case "DISABLED": - case 1: - message.evaluationMode = 1; - break; - case "PROJECT_SINGLETON_POLICY_ENFORCE": - case 2: - message.evaluationMode = 2; - break; - case "POLICY_BINDINGS": - case 5: - message.evaluationMode = 5; - break; - case "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE": - case 6: - message.evaluationMode = 6; - break; - } - if (object.policyBindings) { - if (!Array.isArray(object.policyBindings)) - throw TypeError(".google.container.v1beta1.BinaryAuthorization.policyBindings: array expected"); - message.policyBindings = []; - for (var i = 0; i < object.policyBindings.length; ++i) { - if (typeof object.policyBindings[i] !== "object") - throw TypeError(".google.container.v1beta1.BinaryAuthorization.policyBindings: object expected"); - message.policyBindings[i] = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.fromObject(object.policyBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BinaryAuthorization message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {google.container.v1beta1.BinaryAuthorization} message BinaryAuthorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinaryAuthorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.policyBindings = []; - if (options.defaults) { - object.enabled = false; - object.evaluationMode = options.enums === String ? "EVALUATION_MODE_UNSPECIFIED" : 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) - object.evaluationMode = options.enums === String ? $root.google.container.v1beta1.BinaryAuthorization.EvaluationMode[message.evaluationMode] === undefined ? message.evaluationMode : $root.google.container.v1beta1.BinaryAuthorization.EvaluationMode[message.evaluationMode] : message.evaluationMode; - if (message.policyBindings && message.policyBindings.length) { - object.policyBindings = []; - for (var j = 0; j < message.policyBindings.length; ++j) - object.policyBindings[j] = $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding.toObject(message.policyBindings[j], options); - } - return object; - }; - - /** - * Converts this BinaryAuthorization to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BinaryAuthorization - * @instance - * @returns {Object.} JSON object - */ - BinaryAuthorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BinaryAuthorization - * @function getTypeUrl - * @memberof google.container.v1beta1.BinaryAuthorization - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BinaryAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BinaryAuthorization"; - }; - - /** - * EvaluationMode enum. - * @name google.container.v1beta1.BinaryAuthorization.EvaluationMode - * @enum {number} - * @property {number} EVALUATION_MODE_UNSPECIFIED=0 EVALUATION_MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} PROJECT_SINGLETON_POLICY_ENFORCE=2 PROJECT_SINGLETON_POLICY_ENFORCE value - * @property {number} POLICY_BINDINGS=5 POLICY_BINDINGS value - * @property {number} POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE=6 POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE value - */ - BinaryAuthorization.EvaluationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVALUATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "PROJECT_SINGLETON_POLICY_ENFORCE"] = 2; - values[valuesById[5] = "POLICY_BINDINGS"] = 5; - values[valuesById[6] = "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE"] = 6; - return values; - })(); - - BinaryAuthorization.PolicyBinding = (function() { - - /** - * Properties of a PolicyBinding. - * @memberof google.container.v1beta1.BinaryAuthorization - * @interface IPolicyBinding - * @property {string|null} [name] PolicyBinding name - */ - - /** - * Constructs a new PolicyBinding. - * @memberof google.container.v1beta1.BinaryAuthorization - * @classdesc Represents a PolicyBinding. - * @implements IPolicyBinding - * @constructor - * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding=} [properties] Properties to set - */ - function PolicyBinding(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyBinding name. - * @member {string|null|undefined} name - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @instance - */ - PolicyBinding.prototype.name = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PolicyBinding _name. - * @member {"name"|undefined} _name - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @instance - */ - Object.defineProperty(PolicyBinding.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PolicyBinding instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding=} [properties] Properties to set - * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding instance - */ - PolicyBinding.create = function create(properties) { - return new PolicyBinding(properties); - }; - - /** - * Encodes the specified PolicyBinding message. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding} message PolicyBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyBinding.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 PolicyBinding message, length delimited. Does not implicitly {@link google.container.v1beta1.BinaryAuthorization.PolicyBinding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {google.container.v1beta1.BinaryAuthorization.IPolicyBinding} message PolicyBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyBinding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyBinding message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyBinding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding(); - 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 PolicyBinding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyBinding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyBinding message. - * @function verify - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyBinding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - return null; - }; - - /** - * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BinaryAuthorization.PolicyBinding} PolicyBinding - */ - PolicyBinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding) - return object; - var message = new $root.google.container.v1beta1.BinaryAuthorization.PolicyBinding(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {google.container.v1beta1.BinaryAuthorization.PolicyBinding} message PolicyBinding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyBinding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - return object; - }; - - /** - * Converts this PolicyBinding to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @instance - * @returns {Object.} JSON object - */ - PolicyBinding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyBinding - * @function getTypeUrl - * @memberof google.container.v1beta1.BinaryAuthorization.PolicyBinding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BinaryAuthorization.PolicyBinding"; - }; - - return PolicyBinding; - })(); - - return BinaryAuthorization; - })(); - - v1beta1.PodSecurityPolicyConfig = (function() { - - /** - * Properties of a PodSecurityPolicyConfig. - * @memberof google.container.v1beta1 - * @interface IPodSecurityPolicyConfig - * @property {boolean|null} [enabled] PodSecurityPolicyConfig enabled - */ - - /** - * Constructs a new PodSecurityPolicyConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a PodSecurityPolicyConfig. - * @implements IPodSecurityPolicyConfig - * @constructor - * @param {google.container.v1beta1.IPodSecurityPolicyConfig=} [properties] Properties to set - */ - function PodSecurityPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PodSecurityPolicyConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @instance - */ - PodSecurityPolicyConfig.prototype.enabled = false; - - /** - * Creates a new PodSecurityPolicyConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {google.container.v1beta1.IPodSecurityPolicyConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig instance - */ - PodSecurityPolicyConfig.create = function create(properties) { - return new PodSecurityPolicyConfig(properties); - }; - - /** - * Encodes the specified PodSecurityPolicyConfig message. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {google.container.v1beta1.IPodSecurityPolicyConfig} message PodSecurityPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodSecurityPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified PodSecurityPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.PodSecurityPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {google.container.v1beta1.IPodSecurityPolicyConfig} message PodSecurityPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PodSecurityPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodSecurityPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.PodSecurityPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PodSecurityPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PodSecurityPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PodSecurityPolicyConfig message. - * @function verify - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PodSecurityPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a PodSecurityPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.PodSecurityPolicyConfig} PodSecurityPolicyConfig - */ - PodSecurityPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.PodSecurityPolicyConfig) - return object; - var message = new $root.google.container.v1beta1.PodSecurityPolicyConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a PodSecurityPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {google.container.v1beta1.PodSecurityPolicyConfig} message PodSecurityPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PodSecurityPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this PodSecurityPolicyConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - PodSecurityPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PodSecurityPolicyConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.PodSecurityPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PodSecurityPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.PodSecurityPolicyConfig"; - }; - - return PodSecurityPolicyConfig; - })(); - - v1beta1.AuthenticatorGroupsConfig = (function() { - - /** - * Properties of an AuthenticatorGroupsConfig. - * @memberof google.container.v1beta1 - * @interface IAuthenticatorGroupsConfig - * @property {boolean|null} [enabled] AuthenticatorGroupsConfig enabled - * @property {string|null} [securityGroup] AuthenticatorGroupsConfig securityGroup - */ - - /** - * Constructs a new AuthenticatorGroupsConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AuthenticatorGroupsConfig. - * @implements IAuthenticatorGroupsConfig - * @constructor - * @param {google.container.v1beta1.IAuthenticatorGroupsConfig=} [properties] Properties to set - */ - function AuthenticatorGroupsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuthenticatorGroupsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @instance - */ - AuthenticatorGroupsConfig.prototype.enabled = false; - - /** - * AuthenticatorGroupsConfig securityGroup. - * @member {string} securityGroup - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @instance - */ - AuthenticatorGroupsConfig.prototype.securityGroup = ""; - - /** - * Creates a new AuthenticatorGroupsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1beta1.IAuthenticatorGroupsConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig instance - */ - AuthenticatorGroupsConfig.create = function create(properties) { - return new AuthenticatorGroupsConfig(properties); - }; - - /** - * Encodes the specified AuthenticatorGroupsConfig message. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1beta1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthenticatorGroupsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.securityGroup != null && Object.hasOwnProperty.call(message, "securityGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.securityGroup); - return writer; - }; - - /** - * Encodes the specified AuthenticatorGroupsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AuthenticatorGroupsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1beta1.IAuthenticatorGroupsConfig} message AuthenticatorGroupsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthenticatorGroupsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthenticatorGroupsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AuthenticatorGroupsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.securityGroup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuthenticatorGroupsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthenticatorGroupsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuthenticatorGroupsConfig message. - * @function verify - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuthenticatorGroupsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) - if (!$util.isString(message.securityGroup)) - return "securityGroup: string expected"; - return null; - }; - - /** - * Creates an AuthenticatorGroupsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AuthenticatorGroupsConfig} AuthenticatorGroupsConfig - */ - AuthenticatorGroupsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AuthenticatorGroupsConfig) - return object; - var message = new $root.google.container.v1beta1.AuthenticatorGroupsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.securityGroup != null) - message.securityGroup = String(object.securityGroup); - return message; - }; - - /** - * Creates a plain object from an AuthenticatorGroupsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {google.container.v1beta1.AuthenticatorGroupsConfig} message AuthenticatorGroupsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuthenticatorGroupsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.securityGroup = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.securityGroup != null && message.hasOwnProperty("securityGroup")) - object.securityGroup = message.securityGroup; - return object; - }; - - /** - * Converts this AuthenticatorGroupsConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @instance - * @returns {Object.} JSON object - */ - AuthenticatorGroupsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuthenticatorGroupsConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AuthenticatorGroupsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuthenticatorGroupsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AuthenticatorGroupsConfig"; - }; - - return AuthenticatorGroupsConfig; - })(); - - v1beta1.ClusterTelemetry = (function() { - - /** - * Properties of a ClusterTelemetry. - * @memberof google.container.v1beta1 - * @interface IClusterTelemetry - * @property {google.container.v1beta1.ClusterTelemetry.Type|null} [type] ClusterTelemetry type - */ - - /** - * Constructs a new ClusterTelemetry. - * @memberof google.container.v1beta1 - * @classdesc Represents a ClusterTelemetry. - * @implements IClusterTelemetry - * @constructor - * @param {google.container.v1beta1.IClusterTelemetry=} [properties] Properties to set - */ - function ClusterTelemetry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterTelemetry type. - * @member {google.container.v1beta1.ClusterTelemetry.Type} type - * @memberof google.container.v1beta1.ClusterTelemetry - * @instance - */ - ClusterTelemetry.prototype.type = 0; - - /** - * Creates a new ClusterTelemetry instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {google.container.v1beta1.IClusterTelemetry=} [properties] Properties to set - * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry instance - */ - ClusterTelemetry.create = function create(properties) { - return new ClusterTelemetry(properties); - }; - - /** - * Encodes the specified ClusterTelemetry message. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {google.container.v1beta1.IClusterTelemetry} message ClusterTelemetry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterTelemetry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - return writer; - }; - - /** - * Encodes the specified ClusterTelemetry message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterTelemetry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {google.container.v1beta1.IClusterTelemetry} message ClusterTelemetry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterTelemetry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterTelemetry message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterTelemetry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterTelemetry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterTelemetry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterTelemetry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterTelemetry message. - * @function verify - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterTelemetry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a ClusterTelemetry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ClusterTelemetry} ClusterTelemetry - */ - ClusterTelemetry.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ClusterTelemetry) - return object; - var message = new $root.google.container.v1beta1.ClusterTelemetry(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DISABLED": - case 1: - message.type = 1; - break; - case "ENABLED": - case 2: - message.type = 2; - break; - case "SYSTEM_ONLY": - case 3: - message.type = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a ClusterTelemetry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {google.container.v1beta1.ClusterTelemetry} message ClusterTelemetry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterTelemetry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = options.enums === String ? "UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1beta1.ClusterTelemetry.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.ClusterTelemetry.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this ClusterTelemetry to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ClusterTelemetry - * @instance - * @returns {Object.} JSON object - */ - ClusterTelemetry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterTelemetry - * @function getTypeUrl - * @memberof google.container.v1beta1.ClusterTelemetry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterTelemetry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ClusterTelemetry"; - }; - - /** - * Type enum. - * @name google.container.v1beta1.ClusterTelemetry.Type - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} ENABLED=2 ENABLED value - * @property {number} SYSTEM_ONLY=3 SYSTEM_ONLY value - */ - ClusterTelemetry.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "ENABLED"] = 2; - values[valuesById[3] = "SYSTEM_ONLY"] = 3; - return values; - })(); - - return ClusterTelemetry; - })(); - - v1beta1.Cluster = (function() { - - /** - * Properties of a Cluster. - * @memberof google.container.v1beta1 - * @interface ICluster - * @property {string|null} [name] Cluster name - * @property {string|null} [description] Cluster description - * @property {number|null} [initialNodeCount] Cluster initialNodeCount - * @property {google.container.v1beta1.INodeConfig|null} [nodeConfig] Cluster nodeConfig - * @property {google.container.v1beta1.IMasterAuth|null} [masterAuth] Cluster masterAuth - * @property {string|null} [loggingService] Cluster loggingService - * @property {string|null} [monitoringService] Cluster monitoringService - * @property {string|null} [network] Cluster network - * @property {string|null} [clusterIpv4Cidr] Cluster clusterIpv4Cidr - * @property {google.container.v1beta1.IAddonsConfig|null} [addonsConfig] Cluster addonsConfig - * @property {string|null} [subnetwork] Cluster subnetwork - * @property {Array.|null} [nodePools] Cluster nodePools - * @property {Array.|null} [locations] Cluster locations - * @property {boolean|null} [enableKubernetesAlpha] Cluster enableKubernetesAlpha - * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] Cluster enableK8sBetaApis - * @property {Object.|null} [resourceLabels] Cluster resourceLabels - * @property {string|null} [labelFingerprint] Cluster labelFingerprint - * @property {google.container.v1beta1.ILegacyAbac|null} [legacyAbac] Cluster legacyAbac - * @property {google.container.v1beta1.INetworkPolicy|null} [networkPolicy] Cluster networkPolicy - * @property {google.container.v1beta1.IIPAllocationPolicy|null} [ipAllocationPolicy] Cluster ipAllocationPolicy - * @property {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] Cluster masterAuthorizedNetworksConfig - * @property {google.container.v1beta1.IMaintenancePolicy|null} [maintenancePolicy] Cluster maintenancePolicy - * @property {google.container.v1beta1.IBinaryAuthorization|null} [binaryAuthorization] Cluster binaryAuthorization - * @property {google.container.v1beta1.IPodSecurityPolicyConfig|null} [podSecurityPolicyConfig] Cluster podSecurityPolicyConfig - * @property {google.container.v1beta1.IClusterAutoscaling|null} [autoscaling] Cluster autoscaling - * @property {google.container.v1beta1.INetworkConfig|null} [networkConfig] Cluster networkConfig - * @property {boolean|null} [privateCluster] Cluster privateCluster - * @property {string|null} [masterIpv4CidrBlock] Cluster masterIpv4CidrBlock - * @property {google.container.v1beta1.IMaxPodsConstraint|null} [defaultMaxPodsConstraint] Cluster defaultMaxPodsConstraint - * @property {google.container.v1beta1.IResourceUsageExportConfig|null} [resourceUsageExportConfig] Cluster resourceUsageExportConfig - * @property {google.container.v1beta1.IAuthenticatorGroupsConfig|null} [authenticatorGroupsConfig] Cluster authenticatorGroupsConfig - * @property {google.container.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] Cluster privateClusterConfig - * @property {google.container.v1beta1.IVerticalPodAutoscaling|null} [verticalPodAutoscaling] Cluster verticalPodAutoscaling - * @property {google.container.v1beta1.IShieldedNodes|null} [shieldedNodes] Cluster shieldedNodes - * @property {google.container.v1beta1.IReleaseChannel|null} [releaseChannel] Cluster releaseChannel - * @property {google.container.v1beta1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] Cluster workloadIdentityConfig - * @property {google.container.v1beta1.IWorkloadCertificates|null} [workloadCertificates] Cluster workloadCertificates - * @property {google.container.v1beta1.IMeshCertificates|null} [meshCertificates] Cluster meshCertificates - * @property {google.container.v1beta1.IWorkloadALTSConfig|null} [workloadAltsConfig] Cluster workloadAltsConfig - * @property {google.container.v1beta1.ICostManagementConfig|null} [costManagementConfig] Cluster costManagementConfig - * @property {google.container.v1beta1.IClusterTelemetry|null} [clusterTelemetry] Cluster clusterTelemetry - * @property {google.container.v1beta1.ITpuConfig|null} [tpuConfig] Cluster tpuConfig - * @property {google.container.v1beta1.INotificationConfig|null} [notificationConfig] Cluster notificationConfig - * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] Cluster confidentialNodes - * @property {google.container.v1beta1.IIdentityServiceConfig|null} [identityServiceConfig] Cluster identityServiceConfig - * @property {string|null} [selfLink] Cluster selfLink - * @property {string|null} [zone] Cluster zone - * @property {string|null} [endpoint] Cluster endpoint - * @property {string|null} [initialClusterVersion] Cluster initialClusterVersion - * @property {string|null} [currentMasterVersion] Cluster currentMasterVersion - * @property {string|null} [currentNodeVersion] Cluster currentNodeVersion - * @property {string|null} [createTime] Cluster createTime - * @property {google.container.v1beta1.Cluster.Status|null} [status] Cluster status - * @property {string|null} [statusMessage] Cluster statusMessage - * @property {number|null} [nodeIpv4CidrSize] Cluster nodeIpv4CidrSize - * @property {string|null} [servicesIpv4Cidr] Cluster servicesIpv4Cidr - * @property {Array.|null} [instanceGroupUrls] Cluster instanceGroupUrls - * @property {number|null} [currentNodeCount] Cluster currentNodeCount - * @property {string|null} [expireTime] Cluster expireTime - * @property {string|null} [location] Cluster location - * @property {boolean|null} [enableTpu] Cluster enableTpu - * @property {string|null} [tpuIpv4CidrBlock] Cluster tpuIpv4CidrBlock - * @property {google.container.v1beta1.IDatabaseEncryption|null} [databaseEncryption] Cluster databaseEncryption - * @property {Array.|null} [conditions] Cluster conditions - * @property {google.container.v1beta1.IMaster|null} [master] Cluster master - * @property {google.container.v1beta1.IAutopilot|null} [autopilot] Cluster autopilot - * @property {string|null} [id] Cluster id - * @property {google.container.v1beta1.INodePoolDefaults|null} [nodePoolDefaults] Cluster nodePoolDefaults - * @property {google.container.v1beta1.ILoggingConfig|null} [loggingConfig] Cluster loggingConfig - * @property {google.container.v1beta1.IMonitoringConfig|null} [monitoringConfig] Cluster monitoringConfig - * @property {google.container.v1beta1.INodePoolAutoConfig|null} [nodePoolAutoConfig] Cluster nodePoolAutoConfig - * @property {google.container.v1beta1.IProtectConfig|null} [protectConfig] Cluster protectConfig - * @property {string|null} [etag] Cluster etag - * @property {google.container.v1beta1.IFleet|null} [fleet] Cluster fleet - * @property {google.container.v1beta1.ISecurityPostureConfig|null} [securityPostureConfig] Cluster securityPostureConfig - * @property {google.container.v1beta1.IEnterpriseConfig|null} [enterpriseConfig] Cluster enterpriseConfig - * @property {google.container.v1beta1.ISecretManagerConfig|null} [secretManagerConfig] Cluster secretManagerConfig - * @property {google.container.v1beta1.ICompliancePostureConfig|null} [compliancePostureConfig] Cluster compliancePostureConfig - * @property {boolean|null} [satisfiesPzs] Cluster satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi - */ - - /** - * Constructs a new Cluster. - * @memberof google.container.v1beta1 - * @classdesc Represents a Cluster. - * @implements ICluster - * @constructor - * @param {google.container.v1beta1.ICluster=} [properties] Properties to set - */ - function Cluster(properties) { - this.nodePools = []; - this.locations = []; - this.resourceLabels = {}; - this.instanceGroupUrls = []; - this.conditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Cluster name. - * @member {string} name - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.name = ""; - - /** - * Cluster description. - * @member {string} description - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.description = ""; - - /** - * Cluster initialNodeCount. - * @member {number} initialNodeCount - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.initialNodeCount = 0; - - /** - * Cluster nodeConfig. - * @member {google.container.v1beta1.INodeConfig|null|undefined} nodeConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.nodeConfig = null; - - /** - * Cluster masterAuth. - * @member {google.container.v1beta1.IMasterAuth|null|undefined} masterAuth - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.masterAuth = null; - - /** - * Cluster loggingService. - * @member {string} loggingService - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.loggingService = ""; - - /** - * Cluster monitoringService. - * @member {string} monitoringService - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.monitoringService = ""; - - /** - * Cluster network. - * @member {string} network - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.network = ""; - - /** - * Cluster clusterIpv4Cidr. - * @member {string} clusterIpv4Cidr - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.clusterIpv4Cidr = ""; - - /** - * Cluster addonsConfig. - * @member {google.container.v1beta1.IAddonsConfig|null|undefined} addonsConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.addonsConfig = null; - - /** - * Cluster subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.subnetwork = ""; - - /** - * Cluster nodePools. - * @member {Array.} nodePools - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.nodePools = $util.emptyArray; - - /** - * Cluster locations. - * @member {Array.} locations - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.locations = $util.emptyArray; - - /** - * Cluster enableKubernetesAlpha. - * @member {boolean} enableKubernetesAlpha - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.enableKubernetesAlpha = false; - - /** - * Cluster enableK8sBetaApis. - * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.enableK8sBetaApis = null; - - /** - * Cluster resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.resourceLabels = $util.emptyObject; - - /** - * Cluster labelFingerprint. - * @member {string} labelFingerprint - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.labelFingerprint = ""; - - /** - * Cluster legacyAbac. - * @member {google.container.v1beta1.ILegacyAbac|null|undefined} legacyAbac - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.legacyAbac = null; - - /** - * Cluster networkPolicy. - * @member {google.container.v1beta1.INetworkPolicy|null|undefined} networkPolicy - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.networkPolicy = null; - - /** - * Cluster ipAllocationPolicy. - * @member {google.container.v1beta1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.ipAllocationPolicy = null; - - /** - * Cluster masterAuthorizedNetworksConfig. - * @member {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.masterAuthorizedNetworksConfig = null; - - /** - * Cluster maintenancePolicy. - * @member {google.container.v1beta1.IMaintenancePolicy|null|undefined} maintenancePolicy - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.maintenancePolicy = null; - - /** - * Cluster binaryAuthorization. - * @member {google.container.v1beta1.IBinaryAuthorization|null|undefined} binaryAuthorization - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.binaryAuthorization = null; - - /** - * Cluster podSecurityPolicyConfig. - * @member {google.container.v1beta1.IPodSecurityPolicyConfig|null|undefined} podSecurityPolicyConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.podSecurityPolicyConfig = null; - - /** - * Cluster autoscaling. - * @member {google.container.v1beta1.IClusterAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.autoscaling = null; - - /** - * Cluster networkConfig. - * @member {google.container.v1beta1.INetworkConfig|null|undefined} networkConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.networkConfig = null; - - /** - * Cluster privateCluster. - * @member {boolean} privateCluster - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.privateCluster = false; - - /** - * Cluster masterIpv4CidrBlock. - * @member {string} masterIpv4CidrBlock - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.masterIpv4CidrBlock = ""; - - /** - * Cluster defaultMaxPodsConstraint. - * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} defaultMaxPodsConstraint - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.defaultMaxPodsConstraint = null; - - /** - * Cluster resourceUsageExportConfig. - * @member {google.container.v1beta1.IResourceUsageExportConfig|null|undefined} resourceUsageExportConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.resourceUsageExportConfig = null; - - /** - * Cluster authenticatorGroupsConfig. - * @member {google.container.v1beta1.IAuthenticatorGroupsConfig|null|undefined} authenticatorGroupsConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.authenticatorGroupsConfig = null; - - /** - * Cluster privateClusterConfig. - * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.privateClusterConfig = null; - - /** - * Cluster verticalPodAutoscaling. - * @member {google.container.v1beta1.IVerticalPodAutoscaling|null|undefined} verticalPodAutoscaling - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.verticalPodAutoscaling = null; - - /** - * Cluster shieldedNodes. - * @member {google.container.v1beta1.IShieldedNodes|null|undefined} shieldedNodes - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.shieldedNodes = null; - - /** - * Cluster releaseChannel. - * @member {google.container.v1beta1.IReleaseChannel|null|undefined} releaseChannel - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.releaseChannel = null; - - /** - * Cluster workloadIdentityConfig. - * @member {google.container.v1beta1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.workloadIdentityConfig = null; - - /** - * Cluster workloadCertificates. - * @member {google.container.v1beta1.IWorkloadCertificates|null|undefined} workloadCertificates - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.workloadCertificates = null; - - /** - * Cluster meshCertificates. - * @member {google.container.v1beta1.IMeshCertificates|null|undefined} meshCertificates - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.meshCertificates = null; - - /** - * Cluster workloadAltsConfig. - * @member {google.container.v1beta1.IWorkloadALTSConfig|null|undefined} workloadAltsConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.workloadAltsConfig = null; - - /** - * Cluster costManagementConfig. - * @member {google.container.v1beta1.ICostManagementConfig|null|undefined} costManagementConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.costManagementConfig = null; - - /** - * Cluster clusterTelemetry. - * @member {google.container.v1beta1.IClusterTelemetry|null|undefined} clusterTelemetry - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.clusterTelemetry = null; - - /** - * Cluster tpuConfig. - * @member {google.container.v1beta1.ITpuConfig|null|undefined} tpuConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.tpuConfig = null; - - /** - * Cluster notificationConfig. - * @member {google.container.v1beta1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.notificationConfig = null; - - /** - * Cluster confidentialNodes. - * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.confidentialNodes = null; - - /** - * Cluster identityServiceConfig. - * @member {google.container.v1beta1.IIdentityServiceConfig|null|undefined} identityServiceConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.identityServiceConfig = null; - - /** - * Cluster selfLink. - * @member {string} selfLink - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.selfLink = ""; - - /** - * Cluster zone. - * @member {string} zone - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.zone = ""; - - /** - * Cluster endpoint. - * @member {string} endpoint - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.endpoint = ""; - - /** - * Cluster initialClusterVersion. - * @member {string} initialClusterVersion - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.initialClusterVersion = ""; - - /** - * Cluster currentMasterVersion. - * @member {string} currentMasterVersion - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.currentMasterVersion = ""; - - /** - * Cluster currentNodeVersion. - * @member {string} currentNodeVersion - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.currentNodeVersion = ""; - - /** - * Cluster createTime. - * @member {string} createTime - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.createTime = ""; - - /** - * Cluster status. - * @member {google.container.v1beta1.Cluster.Status} status - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.status = 0; - - /** - * Cluster statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.statusMessage = ""; - - /** - * Cluster nodeIpv4CidrSize. - * @member {number} nodeIpv4CidrSize - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.nodeIpv4CidrSize = 0; - - /** - * Cluster servicesIpv4Cidr. - * @member {string} servicesIpv4Cidr - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.servicesIpv4Cidr = ""; - - /** - * Cluster instanceGroupUrls. - * @member {Array.} instanceGroupUrls - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.instanceGroupUrls = $util.emptyArray; - - /** - * Cluster currentNodeCount. - * @member {number} currentNodeCount - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.currentNodeCount = 0; - - /** - * Cluster expireTime. - * @member {string} expireTime - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.expireTime = ""; - - /** - * Cluster location. - * @member {string} location - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.location = ""; - - /** - * Cluster enableTpu. - * @member {boolean} enableTpu - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.enableTpu = false; - - /** - * Cluster tpuIpv4CidrBlock. - * @member {string} tpuIpv4CidrBlock - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.tpuIpv4CidrBlock = ""; - - /** - * Cluster databaseEncryption. - * @member {google.container.v1beta1.IDatabaseEncryption|null|undefined} databaseEncryption - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.databaseEncryption = null; - - /** - * Cluster conditions. - * @member {Array.} conditions - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.conditions = $util.emptyArray; - - /** - * Cluster master. - * @member {google.container.v1beta1.IMaster|null|undefined} master - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.master = null; - - /** - * Cluster autopilot. - * @member {google.container.v1beta1.IAutopilot|null|undefined} autopilot - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.autopilot = null; - - /** - * Cluster id. - * @member {string} id - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.id = ""; - - /** - * Cluster nodePoolDefaults. - * @member {google.container.v1beta1.INodePoolDefaults|null|undefined} nodePoolDefaults - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.nodePoolDefaults = null; - - /** - * Cluster loggingConfig. - * @member {google.container.v1beta1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.loggingConfig = null; - - /** - * Cluster monitoringConfig. - * @member {google.container.v1beta1.IMonitoringConfig|null|undefined} monitoringConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.monitoringConfig = null; - - /** - * Cluster nodePoolAutoConfig. - * @member {google.container.v1beta1.INodePoolAutoConfig|null|undefined} nodePoolAutoConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.nodePoolAutoConfig = null; - - /** - * Cluster protectConfig. - * @member {google.container.v1beta1.IProtectConfig|null|undefined} protectConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.protectConfig = null; - - /** - * Cluster etag. - * @member {string} etag - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.etag = ""; - - /** - * Cluster fleet. - * @member {google.container.v1beta1.IFleet|null|undefined} fleet - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.fleet = null; - - /** - * Cluster securityPostureConfig. - * @member {google.container.v1beta1.ISecurityPostureConfig|null|undefined} securityPostureConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.securityPostureConfig = null; - - /** - * Cluster enterpriseConfig. - * @member {google.container.v1beta1.IEnterpriseConfig|null|undefined} enterpriseConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.enterpriseConfig = null; - - /** - * Cluster secretManagerConfig. - * @member {google.container.v1beta1.ISecretManagerConfig|null|undefined} secretManagerConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.secretManagerConfig = null; - - /** - * Cluster compliancePostureConfig. - * @member {google.container.v1beta1.ICompliancePostureConfig|null|undefined} compliancePostureConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.compliancePostureConfig = null; - - /** - * Cluster satisfiesPzs. - * @member {boolean|null|undefined} satisfiesPzs - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.satisfiesPzs = null; - - /** - * Cluster satisfiesPzi. - * @member {boolean|null|undefined} satisfiesPzi - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Cluster.prototype.satisfiesPzi = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Cluster _nodePoolDefaults. - * @member {"nodePoolDefaults"|undefined} _nodePoolDefaults - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_nodePoolDefaults", { - get: $util.oneOfGetter($oneOfFields = ["nodePoolDefaults"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _protectConfig. - * @member {"protectConfig"|undefined} _protectConfig - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_protectConfig", { - get: $util.oneOfGetter($oneOfFields = ["protectConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _satisfiesPzs. - * @member {"satisfiesPzs"|undefined} _satisfiesPzs - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_satisfiesPzs", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Cluster _satisfiesPzi. - * @member {"satisfiesPzi"|undefined} _satisfiesPzi - * @memberof google.container.v1beta1.Cluster - * @instance - */ - Object.defineProperty(Cluster.prototype, "_satisfiesPzi", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Cluster instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Cluster - * @static - * @param {google.container.v1beta1.ICluster=} [properties] Properties to set - * @returns {google.container.v1beta1.Cluster} Cluster instance - */ - Cluster.create = function create(properties) { - return new Cluster(properties); - }; - - /** - * Encodes the specified Cluster message. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Cluster - * @static - * @param {google.container.v1beta1.ICluster} message Cluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cluster.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.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); - if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) - $root.google.container.v1beta1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.masterAuth != null && Object.hasOwnProperty.call(message, "masterAuth")) - $root.google.container.v1beta1.MasterAuth.encode(message.masterAuth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.loggingService); - if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.monitoringService); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); - if (message.clusterIpv4Cidr != null && Object.hasOwnProperty.call(message, "clusterIpv4Cidr")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.clusterIpv4Cidr); - if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) - $root.google.container.v1beta1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.subnetwork); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.container.v1beta1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.enableKubernetesAlpha != null && Object.hasOwnProperty.call(message, "enableKubernetesAlpha")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableKubernetesAlpha); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); - if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.labelFingerprint); - if (message.legacyAbac != null && Object.hasOwnProperty.call(message, "legacyAbac")) - $root.google.container.v1beta1.LegacyAbac.encode(message.legacyAbac, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) - $root.google.container.v1beta1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) - $root.google.container.v1beta1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) - $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) - $root.google.container.v1beta1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.binaryAuthorization != null && Object.hasOwnProperty.call(message, "binaryAuthorization")) - $root.google.container.v1beta1.BinaryAuthorization.encode(message.binaryAuthorization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.podSecurityPolicyConfig != null && Object.hasOwnProperty.call(message, "podSecurityPolicyConfig")) - $root.google.container.v1beta1.PodSecurityPolicyConfig.encode(message.podSecurityPolicyConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1beta1.ClusterAutoscaling.encode(message.autoscaling, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.container.v1beta1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.privateCluster != null && Object.hasOwnProperty.call(message, "privateCluster")) - writer.uint32(/* id 28, wireType 0 =*/224).bool(message.privateCluster); - if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.masterIpv4CidrBlock); - if (message.defaultMaxPodsConstraint != null && Object.hasOwnProperty.call(message, "defaultMaxPodsConstraint")) - $root.google.container.v1beta1.MaxPodsConstraint.encode(message.defaultMaxPodsConstraint, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.resourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "resourceUsageExportConfig")) - $root.google.container.v1beta1.ResourceUsageExportConfig.encode(message.resourceUsageExportConfig, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.authenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "authenticatorGroupsConfig")) - $root.google.container.v1beta1.AuthenticatorGroupsConfig.encode(message.authenticatorGroupsConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) - $root.google.container.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) - $root.google.container.v1beta1.DatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.verticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "verticalPodAutoscaling")) - $root.google.container.v1beta1.VerticalPodAutoscaling.encode(message.verticalPodAutoscaling, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.shieldedNodes != null && Object.hasOwnProperty.call(message, "shieldedNodes")) - $root.google.container.v1beta1.ShieldedNodes.encode(message.shieldedNodes, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - $root.google.container.v1beta1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) - $root.google.container.v1beta1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.costManagementConfig != null && Object.hasOwnProperty.call(message, "costManagementConfig")) - $root.google.container.v1beta1.CostManagementConfig.encode(message.costManagementConfig, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.clusterTelemetry != null && Object.hasOwnProperty.call(message, "clusterTelemetry")) - $root.google.container.v1beta1.ClusterTelemetry.encode(message.clusterTelemetry, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.tpuConfig != null && Object.hasOwnProperty.call(message, "tpuConfig")) - $root.google.container.v1beta1.TpuConfig.encode(message.tpuConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.container.v1beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.workloadCertificates != null && Object.hasOwnProperty.call(message, "workloadCertificates")) - $root.google.container.v1beta1.WorkloadCertificates.encode(message.workloadCertificates, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.workloadAltsConfig != null && Object.hasOwnProperty.call(message, "workloadAltsConfig")) - $root.google.container.v1beta1.WorkloadALTSConfig.encode(message.workloadAltsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.identityServiceConfig != null && Object.hasOwnProperty.call(message, "identityServiceConfig")) - $root.google.container.v1beta1.IdentityServiceConfig.encode(message.identityServiceConfig, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); - if (message.meshCertificates != null && Object.hasOwnProperty.call(message, "meshCertificates")) - $root.google.container.v1beta1.MeshCertificates.encode(message.meshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.zone); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.endpoint); - if (message.initialClusterVersion != null && Object.hasOwnProperty.call(message, "initialClusterVersion")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.initialClusterVersion); - if (message.currentMasterVersion != null && Object.hasOwnProperty.call(message, "currentMasterVersion")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.currentMasterVersion); - if (message.currentNodeVersion != null && Object.hasOwnProperty.call(message, "currentNodeVersion")) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.currentNodeVersion); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.createTime); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 108, wireType 2 =*/866).string(message.statusMessage); - if (message.nodeIpv4CidrSize != null && Object.hasOwnProperty.call(message, "nodeIpv4CidrSize")) - writer.uint32(/* id 109, wireType 0 =*/872).int32(message.nodeIpv4CidrSize); - if (message.servicesIpv4Cidr != null && Object.hasOwnProperty.call(message, "servicesIpv4Cidr")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.servicesIpv4Cidr); - if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.instanceGroupUrls[i]); - if (message.currentNodeCount != null && Object.hasOwnProperty.call(message, "currentNodeCount")) - writer.uint32(/* id 112, wireType 0 =*/896).int32(message.currentNodeCount); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - writer.uint32(/* id 113, wireType 2 =*/906).string(message.expireTime); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 114, wireType 2 =*/914).string(message.location); - if (message.enableTpu != null && Object.hasOwnProperty.call(message, "enableTpu")) - writer.uint32(/* id 115, wireType 0 =*/920).bool(message.enableTpu); - if (message.tpuIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "tpuIpv4CidrBlock")) - writer.uint32(/* id 116, wireType 2 =*/930).string(message.tpuIpv4CidrBlock); - if (message.conditions != null && message.conditions.length) - for (var i = 0; i < message.conditions.length; ++i) - $root.google.container.v1beta1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 118, wireType 2 =*/946).fork()).ldelim(); - if (message.master != null && Object.hasOwnProperty.call(message, "master")) - $root.google.container.v1beta1.Master.encode(message.master, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); - if (message.autopilot != null && Object.hasOwnProperty.call(message, "autopilot")) - $root.google.container.v1beta1.Autopilot.encode(message.autopilot, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 129, wireType 2 =*/1034).string(message.id); - if (message.nodePoolDefaults != null && Object.hasOwnProperty.call(message, "nodePoolDefaults")) - $root.google.container.v1beta1.NodePoolDefaults.encode(message.nodePoolDefaults, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1beta1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); - if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) - $root.google.container.v1beta1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 133, wireType 2 =*/1066).fork()).ldelim(); - if (message.nodePoolAutoConfig != null && Object.hasOwnProperty.call(message, "nodePoolAutoConfig")) - $root.google.container.v1beta1.NodePoolAutoConfig.encode(message.nodePoolAutoConfig, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); - if (message.protectConfig != null && Object.hasOwnProperty.call(message, "protectConfig")) - $root.google.container.v1beta1.ProtectConfig.encode(message.protectConfig, writer.uint32(/* id 137, wireType 2 =*/1098).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 139, wireType 2 =*/1114).string(message.etag); - if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) - $root.google.container.v1beta1.Fleet.encode(message.fleet, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); - if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) - $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); - if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) - $root.google.container.v1beta1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); - if (message.enterpriseConfig != null && Object.hasOwnProperty.call(message, "enterpriseConfig")) - $root.google.container.v1beta1.EnterpriseConfig.encode(message.enterpriseConfig, writer.uint32(/* id 149, wireType 2 =*/1194).fork()).ldelim(); - if (message.secretManagerConfig != null && Object.hasOwnProperty.call(message, "secretManagerConfig")) - $root.google.container.v1beta1.SecretManagerConfig.encode(message.secretManagerConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) - $root.google.container.v1beta1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 151, wireType 2 =*/1210).fork()).ldelim(); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 152, wireType 0 =*/1216).bool(message.satisfiesPzs); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 153, wireType 0 =*/1224).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.container.v1beta1.Cluster.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Cluster - * @static - * @param {google.container.v1beta1.ICluster} message Cluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Cluster message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Cluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Cluster} Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cluster.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Cluster(), 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.initialNodeCount = reader.int32(); - break; - } - case 4: { - message.nodeConfig = $root.google.container.v1beta1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.masterAuth = $root.google.container.v1beta1.MasterAuth.decode(reader, reader.uint32()); - break; - } - case 6: { - message.loggingService = reader.string(); - break; - } - case 7: { - message.monitoringService = reader.string(); - break; - } - case 8: { - message.network = reader.string(); - break; - } - case 9: { - message.clusterIpv4Cidr = reader.string(); - break; - } - case 10: { - message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.subnetwork = reader.string(); - break; - } - case 12: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.container.v1beta1.NodePool.decode(reader, reader.uint32())); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.enableKubernetesAlpha = reader.bool(); - break; - } - case 143: { - message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 16: { - message.labelFingerprint = reader.string(); - break; - } - case 18: { - message.legacyAbac = $root.google.container.v1beta1.LegacyAbac.decode(reader, reader.uint32()); - break; - } - case 19: { - message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.decode(reader, reader.uint32()); - break; - } - case 20: { - message.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; - } - case 22: { - message.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 23: { - message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 24: { - message.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.decode(reader, reader.uint32()); - break; - } - case 25: { - message.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 26: { - message.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.decode(reader, reader.uint32()); - break; - } - case 27: { - message.networkConfig = $root.google.container.v1beta1.NetworkConfig.decode(reader, reader.uint32()); - break; - } - case 28: { - message.privateCluster = reader.bool(); - break; - } - case 29: { - message.masterIpv4CidrBlock = reader.string(); - break; - } - case 30: { - message.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - case 33: { - message.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.decode(reader, reader.uint32()); - break; - } - case 34: { - message.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); - break; - } - case 37: { - message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 39: { - message.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 40: { - message.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.decode(reader, reader.uint32()); - break; - } - case 41: { - message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 43: { - message.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.decode(reader, reader.uint32()); - break; - } - case 52: { - message.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.decode(reader, reader.uint32()); - break; - } - case 67: { - message.meshCertificates = $root.google.container.v1beta1.MeshCertificates.decode(reader, reader.uint32()); - break; - } - case 53: { - message.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.decode(reader, reader.uint32()); - break; - } - case 45: { - message.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.decode(reader, reader.uint32()); - break; - } - case 46: { - message.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.decode(reader, reader.uint32()); - break; - } - case 47: { - message.tpuConfig = $root.google.container.v1beta1.TpuConfig.decode(reader, reader.uint32()); - break; - } - case 49: { - message.notificationConfig = $root.google.container.v1beta1.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 50: { - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 54: { - message.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.selfLink = reader.string(); - break; - } - case 101: { - message.zone = reader.string(); - break; - } - case 102: { - message.endpoint = reader.string(); - break; - } - case 103: { - message.initialClusterVersion = reader.string(); - break; - } - case 104: { - message.currentMasterVersion = reader.string(); - break; - } - case 105: { - message.currentNodeVersion = reader.string(); - break; - } - case 106: { - message.createTime = reader.string(); - break; - } - case 107: { - message.status = reader.int32(); - break; - } - case 108: { - message.statusMessage = reader.string(); - break; - } - case 109: { - message.nodeIpv4CidrSize = reader.int32(); - break; - } - case 110: { - message.servicesIpv4Cidr = reader.string(); - break; - } - case 111: { - if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) - message.instanceGroupUrls = []; - message.instanceGroupUrls.push(reader.string()); - break; - } - case 112: { - message.currentNodeCount = reader.int32(); - break; - } - case 113: { - message.expireTime = reader.string(); - break; - } - case 114: { - message.location = reader.string(); - break; - } - case 115: { - message.enableTpu = reader.bool(); - break; - } - case 116: { - message.tpuIpv4CidrBlock = reader.string(); - break; - } - case 38: { - message.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 118: { - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 124: { - message.master = $root.google.container.v1beta1.Master.decode(reader, reader.uint32()); - break; - } - case 128: { - message.autopilot = $root.google.container.v1beta1.Autopilot.decode(reader, reader.uint32()); - break; - } - case 129: { - message.id = reader.string(); - break; - } - case 131: { - message.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.decode(reader, reader.uint32()); - break; - } - case 132: { - message.loggingConfig = $root.google.container.v1beta1.LoggingConfig.decode(reader, reader.uint32()); - break; - } - case 133: { - message.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.decode(reader, reader.uint32()); - break; - } - case 136: { - message.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.decode(reader, reader.uint32()); - break; - } - case 137: { - message.protectConfig = $root.google.container.v1beta1.ProtectConfig.decode(reader, reader.uint32()); - break; - } - case 139: { - message.etag = reader.string(); - break; - } - case 140: { - message.fleet = $root.google.container.v1beta1.Fleet.decode(reader, reader.uint32()); - break; - } - case 145: { - message.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.decode(reader, reader.uint32()); - break; - } - case 149: { - message.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.decode(reader, reader.uint32()); - break; - } - case 150: { - message.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.decode(reader, reader.uint32()); - break; - } - case 151: { - message.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.decode(reader, reader.uint32()); - break; - } - case 152: { - message.satisfiesPzs = reader.bool(); - break; - } - case 153: { - message.satisfiesPzi = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Cluster message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Cluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Cluster} Cluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cluster.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cluster message. - * @function verify - * @memberof google.container.v1beta1.Cluster - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cluster.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - if (!$util.isInteger(message.initialNodeCount)) - return "initialNodeCount: integer expected"; - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { - var error = $root.google.container.v1beta1.NodeConfig.verify(message.nodeConfig); - if (error) - return "nodeConfig." + error; - } - if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) { - var error = $root.google.container.v1beta1.MasterAuth.verify(message.masterAuth); - if (error) - return "masterAuth." + error; - } - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - if (!$util.isString(message.loggingService)) - return "loggingService: string expected"; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - if (!$util.isString(message.monitoringService)) - return "monitoringService: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - if (!$util.isString(message.clusterIpv4Cidr)) - return "clusterIpv4Cidr: string expected"; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { - var error = $root.google.container.v1beta1.AddonsConfig.verify(message.addonsConfig); - if (error) - return "addonsConfig." + error; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.container.v1beta1.NodePool.verify(message.nodePools[i]); - if (error) - return "nodePools." + error; - } - } - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) - if (typeof message.enableKubernetesAlpha !== "boolean") - return "enableKubernetesAlpha: boolean expected"; - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { - var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); - if (error) - return "enableK8sBetaApis." + error; - } - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - if (!$util.isString(message.labelFingerprint)) - return "labelFingerprint: string expected"; - if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) { - var error = $root.google.container.v1beta1.LegacyAbac.verify(message.legacyAbac); - if (error) - return "legacyAbac." + error; - } - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { - var error = $root.google.container.v1beta1.NetworkPolicy.verify(message.networkPolicy); - if (error) - return "networkPolicy." + error; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { - var error = $root.google.container.v1beta1.IPAllocationPolicy.verify(message.ipAllocationPolicy); - if (error) - return "ipAllocationPolicy." + error; - } - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { - var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); - if (error) - return "masterAuthorizedNetworksConfig." + error; - } - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { - var error = $root.google.container.v1beta1.MaintenancePolicy.verify(message.maintenancePolicy); - if (error) - return "maintenancePolicy." + error; - } - if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) { - var error = $root.google.container.v1beta1.BinaryAuthorization.verify(message.binaryAuthorization); - if (error) - return "binaryAuthorization." + error; - } - if (message.podSecurityPolicyConfig != null && message.hasOwnProperty("podSecurityPolicyConfig")) { - var error = $root.google.container.v1beta1.PodSecurityPolicyConfig.verify(message.podSecurityPolicyConfig); - if (error) - return "podSecurityPolicyConfig." + error; - } - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1beta1.ClusterAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.container.v1beta1.NetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - if (message.privateCluster != null && message.hasOwnProperty("privateCluster")) - if (typeof message.privateCluster !== "boolean") - return "privateCluster: boolean expected"; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - if (!$util.isString(message.masterIpv4CidrBlock)) - return "masterIpv4CidrBlock: string expected"; - if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) { - var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.defaultMaxPodsConstraint); - if (error) - return "defaultMaxPodsConstraint." + error; - } - if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) { - var error = $root.google.container.v1beta1.ResourceUsageExportConfig.verify(message.resourceUsageExportConfig); - if (error) - return "resourceUsageExportConfig." + error; - } - if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) { - var error = $root.google.container.v1beta1.AuthenticatorGroupsConfig.verify(message.authenticatorGroupsConfig); - if (error) - return "authenticatorGroupsConfig." + error; - } - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { - var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); - if (error) - return "privateClusterConfig." + error; - } - if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) { - var error = $root.google.container.v1beta1.VerticalPodAutoscaling.verify(message.verticalPodAutoscaling); - if (error) - return "verticalPodAutoscaling." + error; - } - if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) { - var error = $root.google.container.v1beta1.ShieldedNodes.verify(message.shieldedNodes); - if (error) - return "shieldedNodes." + error; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { - var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.releaseChannel); - if (error) - return "releaseChannel." + error; - } - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { - var error = $root.google.container.v1beta1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); - if (error) - return "workloadIdentityConfig." + error; - } - if (message.workloadCertificates != null && message.hasOwnProperty("workloadCertificates")) { - var error = $root.google.container.v1beta1.WorkloadCertificates.verify(message.workloadCertificates); - if (error) - return "workloadCertificates." + error; - } - if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) { - var error = $root.google.container.v1beta1.MeshCertificates.verify(message.meshCertificates); - if (error) - return "meshCertificates." + error; - } - if (message.workloadAltsConfig != null && message.hasOwnProperty("workloadAltsConfig")) { - var error = $root.google.container.v1beta1.WorkloadALTSConfig.verify(message.workloadAltsConfig); - if (error) - return "workloadAltsConfig." + error; - } - if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) { - var error = $root.google.container.v1beta1.CostManagementConfig.verify(message.costManagementConfig); - if (error) - return "costManagementConfig." + error; - } - if (message.clusterTelemetry != null && message.hasOwnProperty("clusterTelemetry")) { - var error = $root.google.container.v1beta1.ClusterTelemetry.verify(message.clusterTelemetry); - if (error) - return "clusterTelemetry." + error; - } - if (message.tpuConfig != null && message.hasOwnProperty("tpuConfig")) { - var error = $root.google.container.v1beta1.TpuConfig.verify(message.tpuConfig); - if (error) - return "tpuConfig." + error; - } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.container.v1beta1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) { - var error = $root.google.container.v1beta1.IdentityServiceConfig.verify(message.identityServiceConfig); - if (error) - return "identityServiceConfig." + error; - } - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) - if (!$util.isString(message.initialClusterVersion)) - return "initialClusterVersion: string expected"; - if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) - if (!$util.isString(message.currentMasterVersion)) - return "currentMasterVersion: string expected"; - if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) - if (!$util.isString(message.currentNodeVersion)) - return "currentNodeVersion: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) - if (!$util.isString(message.createTime)) - return "createTime: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) - if (!$util.isInteger(message.nodeIpv4CidrSize)) - return "nodeIpv4CidrSize: integer expected"; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - if (!$util.isString(message.servicesIpv4Cidr)) - return "servicesIpv4Cidr: string expected"; - if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { - if (!Array.isArray(message.instanceGroupUrls)) - return "instanceGroupUrls: array expected"; - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - if (!$util.isString(message.instanceGroupUrls[i])) - return "instanceGroupUrls: string[] expected"; - } - if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) - if (!$util.isInteger(message.currentNodeCount)) - return "currentNodeCount: integer expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - if (!$util.isString(message.expireTime)) - return "expireTime: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) - if (typeof message.enableTpu !== "boolean") - return "enableTpu: boolean expected"; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - if (!$util.isString(message.tpuIpv4CidrBlock)) - return "tpuIpv4CidrBlock: string expected"; - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { - var error = $root.google.container.v1beta1.DatabaseEncryption.verify(message.databaseEncryption); - if (error) - return "databaseEncryption." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) - return "conditions: array expected"; - for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.google.container.v1beta1.StatusCondition.verify(message.conditions[i]); - if (error) - return "conditions." + error; - } - } - if (message.master != null && message.hasOwnProperty("master")) { - var error = $root.google.container.v1beta1.Master.verify(message.master); - if (error) - return "master." + error; - } - if (message.autopilot != null && message.hasOwnProperty("autopilot")) { - var error = $root.google.container.v1beta1.Autopilot.verify(message.autopilot); - if (error) - return "autopilot." + error; - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { - properties._nodePoolDefaults = 1; - { - var error = $root.google.container.v1beta1.NodePoolDefaults.verify(message.nodePoolDefaults); - if (error) - return "nodePoolDefaults." + error; - } - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1beta1.LoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { - var error = $root.google.container.v1beta1.MonitoringConfig.verify(message.monitoringConfig); - if (error) - return "monitoringConfig." + error; - } - if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) { - var error = $root.google.container.v1beta1.NodePoolAutoConfig.verify(message.nodePoolAutoConfig); - if (error) - return "nodePoolAutoConfig." + error; - } - if (message.protectConfig != null && message.hasOwnProperty("protectConfig")) { - properties._protectConfig = 1; - { - var error = $root.google.container.v1beta1.ProtectConfig.verify(message.protectConfig); - if (error) - return "protectConfig." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.fleet != null && message.hasOwnProperty("fleet")) { - var error = $root.google.container.v1beta1.Fleet.verify(message.fleet); - if (error) - return "fleet." + error; - } - if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) { - var error = $root.google.container.v1beta1.SecurityPostureConfig.verify(message.securityPostureConfig); - if (error) - return "securityPostureConfig." + error; - } - if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) { - var error = $root.google.container.v1beta1.EnterpriseConfig.verify(message.enterpriseConfig); - if (error) - return "enterpriseConfig." + error; - } - if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) { - var error = $root.google.container.v1beta1.SecretManagerConfig.verify(message.secretManagerConfig); - if (error) - return "secretManagerConfig." + error; - } - if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { - var error = $root.google.container.v1beta1.CompliancePostureConfig.verify(message.compliancePostureConfig); - if (error) - return "compliancePostureConfig." + error; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - properties._satisfiesPzs = 1; - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - properties._satisfiesPzi = 1; - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - } - return null; - }; - - /** - * Creates a Cluster message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Cluster - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Cluster} Cluster - */ - Cluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Cluster) - return object; - var message = new $root.google.container.v1beta1.Cluster(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.initialNodeCount != null) - message.initialNodeCount = object.initialNodeCount | 0; - if (object.nodeConfig != null) { - if (typeof object.nodeConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.nodeConfig: object expected"); - message.nodeConfig = $root.google.container.v1beta1.NodeConfig.fromObject(object.nodeConfig); - } - if (object.masterAuth != null) { - if (typeof object.masterAuth !== "object") - throw TypeError(".google.container.v1beta1.Cluster.masterAuth: object expected"); - message.masterAuth = $root.google.container.v1beta1.MasterAuth.fromObject(object.masterAuth); - } - if (object.loggingService != null) - message.loggingService = String(object.loggingService); - if (object.monitoringService != null) - message.monitoringService = String(object.monitoringService); - if (object.network != null) - message.network = String(object.network); - if (object.clusterIpv4Cidr != null) - message.clusterIpv4Cidr = String(object.clusterIpv4Cidr); - if (object.addonsConfig != null) { - if (typeof object.addonsConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.addonsConfig: object expected"); - message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.addonsConfig); - } - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.container.v1beta1.Cluster.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.container.v1beta1.Cluster.nodePools: object expected"); - message.nodePools[i] = $root.google.container.v1beta1.NodePool.fromObject(object.nodePools[i]); - } - } - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1beta1.Cluster.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.enableKubernetesAlpha != null) - message.enableKubernetesAlpha = Boolean(object.enableKubernetesAlpha); - if (object.enableK8sBetaApis != null) { - if (typeof object.enableK8sBetaApis !== "object") - throw TypeError(".google.container.v1beta1.Cluster.enableK8sBetaApis: object expected"); - message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); - } - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1beta1.Cluster.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.labelFingerprint != null) - message.labelFingerprint = String(object.labelFingerprint); - if (object.legacyAbac != null) { - if (typeof object.legacyAbac !== "object") - throw TypeError(".google.container.v1beta1.Cluster.legacyAbac: object expected"); - message.legacyAbac = $root.google.container.v1beta1.LegacyAbac.fromObject(object.legacyAbac); - } - if (object.networkPolicy != null) { - if (typeof object.networkPolicy !== "object") - throw TypeError(".google.container.v1beta1.Cluster.networkPolicy: object expected"); - message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.fromObject(object.networkPolicy); - } - if (object.ipAllocationPolicy != null) { - if (typeof object.ipAllocationPolicy !== "object") - throw TypeError(".google.container.v1beta1.Cluster.ipAllocationPolicy: object expected"); - message.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); - } - if (object.masterAuthorizedNetworksConfig != null) { - if (typeof object.masterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.masterAuthorizedNetworksConfig: object expected"); - message.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); - } - if (object.maintenancePolicy != null) { - if (typeof object.maintenancePolicy !== "object") - throw TypeError(".google.container.v1beta1.Cluster.maintenancePolicy: object expected"); - message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.fromObject(object.maintenancePolicy); - } - if (object.binaryAuthorization != null) { - if (typeof object.binaryAuthorization !== "object") - throw TypeError(".google.container.v1beta1.Cluster.binaryAuthorization: object expected"); - message.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.fromObject(object.binaryAuthorization); - } - if (object.podSecurityPolicyConfig != null) { - if (typeof object.podSecurityPolicyConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.podSecurityPolicyConfig: object expected"); - message.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.fromObject(object.podSecurityPolicyConfig); - } - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1beta1.Cluster.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.fromObject(object.autoscaling); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.networkConfig: object expected"); - message.networkConfig = $root.google.container.v1beta1.NetworkConfig.fromObject(object.networkConfig); - } - if (object.privateCluster != null) - message.privateCluster = Boolean(object.privateCluster); - if (object.masterIpv4CidrBlock != null) - message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); - if (object.defaultMaxPodsConstraint != null) { - if (typeof object.defaultMaxPodsConstraint !== "object") - throw TypeError(".google.container.v1beta1.Cluster.defaultMaxPodsConstraint: object expected"); - message.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.defaultMaxPodsConstraint); - } - if (object.resourceUsageExportConfig != null) { - if (typeof object.resourceUsageExportConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.resourceUsageExportConfig: object expected"); - message.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.fromObject(object.resourceUsageExportConfig); - } - if (object.authenticatorGroupsConfig != null) { - if (typeof object.authenticatorGroupsConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.authenticatorGroupsConfig: object expected"); - message.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.fromObject(object.authenticatorGroupsConfig); - } - if (object.privateClusterConfig != null) { - if (typeof object.privateClusterConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.privateClusterConfig: object expected"); - message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); - } - if (object.verticalPodAutoscaling != null) { - if (typeof object.verticalPodAutoscaling !== "object") - throw TypeError(".google.container.v1beta1.Cluster.verticalPodAutoscaling: object expected"); - message.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.fromObject(object.verticalPodAutoscaling); - } - if (object.shieldedNodes != null) { - if (typeof object.shieldedNodes !== "object") - throw TypeError(".google.container.v1beta1.Cluster.shieldedNodes: object expected"); - message.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.fromObject(object.shieldedNodes); - } - if (object.releaseChannel != null) { - if (typeof object.releaseChannel !== "object") - throw TypeError(".google.container.v1beta1.Cluster.releaseChannel: object expected"); - message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.releaseChannel); - } - if (object.workloadIdentityConfig != null) { - if (typeof object.workloadIdentityConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.workloadIdentityConfig: object expected"); - message.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); - } - if (object.workloadCertificates != null) { - if (typeof object.workloadCertificates !== "object") - throw TypeError(".google.container.v1beta1.Cluster.workloadCertificates: object expected"); - message.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.fromObject(object.workloadCertificates); - } - if (object.meshCertificates != null) { - if (typeof object.meshCertificates !== "object") - throw TypeError(".google.container.v1beta1.Cluster.meshCertificates: object expected"); - message.meshCertificates = $root.google.container.v1beta1.MeshCertificates.fromObject(object.meshCertificates); - } - if (object.workloadAltsConfig != null) { - if (typeof object.workloadAltsConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.workloadAltsConfig: object expected"); - message.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.fromObject(object.workloadAltsConfig); - } - if (object.costManagementConfig != null) { - if (typeof object.costManagementConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.costManagementConfig: object expected"); - message.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.fromObject(object.costManagementConfig); - } - if (object.clusterTelemetry != null) { - if (typeof object.clusterTelemetry !== "object") - throw TypeError(".google.container.v1beta1.Cluster.clusterTelemetry: object expected"); - message.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.fromObject(object.clusterTelemetry); - } - if (object.tpuConfig != null) { - if (typeof object.tpuConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.tpuConfig: object expected"); - message.tpuConfig = $root.google.container.v1beta1.TpuConfig.fromObject(object.tpuConfig); - } - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.notificationConfig: object expected"); - message.notificationConfig = $root.google.container.v1beta1.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1beta1.Cluster.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.identityServiceConfig != null) { - if (typeof object.identityServiceConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.identityServiceConfig: object expected"); - message.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.fromObject(object.identityServiceConfig); - } - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.zone != null) - message.zone = String(object.zone); - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.initialClusterVersion != null) - message.initialClusterVersion = String(object.initialClusterVersion); - if (object.currentMasterVersion != null) - message.currentMasterVersion = String(object.currentMasterVersion); - if (object.currentNodeVersion != null) - message.currentNodeVersion = String(object.currentNodeVersion); - if (object.createTime != null) - message.createTime = String(object.createTime); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PROVISIONING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "RECONCILING": - case 3: - message.status = 3; - break; - case "STOPPING": - case 4: - message.status = 4; - break; - case "ERROR": - case 5: - message.status = 5; - break; - case "DEGRADED": - case 6: - message.status = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.nodeIpv4CidrSize != null) - message.nodeIpv4CidrSize = object.nodeIpv4CidrSize | 0; - if (object.servicesIpv4Cidr != null) - message.servicesIpv4Cidr = String(object.servicesIpv4Cidr); - if (object.instanceGroupUrls) { - if (!Array.isArray(object.instanceGroupUrls)) - throw TypeError(".google.container.v1beta1.Cluster.instanceGroupUrls: array expected"); - message.instanceGroupUrls = []; - for (var i = 0; i < object.instanceGroupUrls.length; ++i) - message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); - } - if (object.currentNodeCount != null) - message.currentNodeCount = object.currentNodeCount | 0; - if (object.expireTime != null) - message.expireTime = String(object.expireTime); - if (object.location != null) - message.location = String(object.location); - if (object.enableTpu != null) - message.enableTpu = Boolean(object.enableTpu); - if (object.tpuIpv4CidrBlock != null) - message.tpuIpv4CidrBlock = String(object.tpuIpv4CidrBlock); - if (object.databaseEncryption != null) { - if (typeof object.databaseEncryption !== "object") - throw TypeError(".google.container.v1beta1.Cluster.databaseEncryption: object expected"); - message.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.fromObject(object.databaseEncryption); - } - if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".google.container.v1beta1.Cluster.conditions: array expected"); - message.conditions = []; - for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".google.container.v1beta1.Cluster.conditions: object expected"); - message.conditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.conditions[i]); - } - } - if (object.master != null) { - if (typeof object.master !== "object") - throw TypeError(".google.container.v1beta1.Cluster.master: object expected"); - message.master = $root.google.container.v1beta1.Master.fromObject(object.master); - } - if (object.autopilot != null) { - if (typeof object.autopilot !== "object") - throw TypeError(".google.container.v1beta1.Cluster.autopilot: object expected"); - message.autopilot = $root.google.container.v1beta1.Autopilot.fromObject(object.autopilot); - } - if (object.id != null) - message.id = String(object.id); - if (object.nodePoolDefaults != null) { - if (typeof object.nodePoolDefaults !== "object") - throw TypeError(".google.container.v1beta1.Cluster.nodePoolDefaults: object expected"); - message.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.fromObject(object.nodePoolDefaults); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1beta1.LoggingConfig.fromObject(object.loggingConfig); - } - if (object.monitoringConfig != null) { - if (typeof object.monitoringConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.monitoringConfig: object expected"); - message.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.fromObject(object.monitoringConfig); - } - if (object.nodePoolAutoConfig != null) { - if (typeof object.nodePoolAutoConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.nodePoolAutoConfig: object expected"); - message.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.fromObject(object.nodePoolAutoConfig); - } - if (object.protectConfig != null) { - if (typeof object.protectConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.protectConfig: object expected"); - message.protectConfig = $root.google.container.v1beta1.ProtectConfig.fromObject(object.protectConfig); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.fleet != null) { - if (typeof object.fleet !== "object") - throw TypeError(".google.container.v1beta1.Cluster.fleet: object expected"); - message.fleet = $root.google.container.v1beta1.Fleet.fromObject(object.fleet); - } - if (object.securityPostureConfig != null) { - if (typeof object.securityPostureConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.securityPostureConfig: object expected"); - message.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.fromObject(object.securityPostureConfig); - } - if (object.enterpriseConfig != null) { - if (typeof object.enterpriseConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.enterpriseConfig: object expected"); - message.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.fromObject(object.enterpriseConfig); - } - if (object.secretManagerConfig != null) { - if (typeof object.secretManagerConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.secretManagerConfig: object expected"); - message.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.fromObject(object.secretManagerConfig); - } - if (object.compliancePostureConfig != null) { - if (typeof object.compliancePostureConfig !== "object") - throw TypeError(".google.container.v1beta1.Cluster.compliancePostureConfig: object expected"); - message.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); - } - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - return message; - }; - - /** - * Creates a plain object from a Cluster message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Cluster - * @static - * @param {google.container.v1beta1.Cluster} message Cluster - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Cluster.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.nodePools = []; - object.locations = []; - object.instanceGroupUrls = []; - object.conditions = []; - } - if (options.objects || options.defaults) - object.resourceLabels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.initialNodeCount = 0; - object.nodeConfig = null; - object.masterAuth = null; - object.loggingService = ""; - object.monitoringService = ""; - object.network = ""; - object.clusterIpv4Cidr = ""; - object.addonsConfig = null; - object.subnetwork = ""; - object.enableKubernetesAlpha = false; - object.labelFingerprint = ""; - object.legacyAbac = null; - object.networkPolicy = null; - object.ipAllocationPolicy = null; - object.masterAuthorizedNetworksConfig = null; - object.maintenancePolicy = null; - object.binaryAuthorization = null; - object.podSecurityPolicyConfig = null; - object.autoscaling = null; - object.networkConfig = null; - object.privateCluster = false; - object.masterIpv4CidrBlock = ""; - object.defaultMaxPodsConstraint = null; - object.resourceUsageExportConfig = null; - object.authenticatorGroupsConfig = null; - object.privateClusterConfig = null; - object.databaseEncryption = null; - object.verticalPodAutoscaling = null; - object.shieldedNodes = null; - object.releaseChannel = null; - object.workloadIdentityConfig = null; - object.costManagementConfig = null; - object.clusterTelemetry = null; - object.tpuConfig = null; - object.notificationConfig = null; - object.confidentialNodes = null; - object.workloadCertificates = null; - object.workloadAltsConfig = null; - object.identityServiceConfig = null; - object.meshCertificates = null; - object.selfLink = ""; - object.zone = ""; - object.endpoint = ""; - object.initialClusterVersion = ""; - object.currentMasterVersion = ""; - object.currentNodeVersion = ""; - object.createTime = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.nodeIpv4CidrSize = 0; - object.servicesIpv4Cidr = ""; - object.currentNodeCount = 0; - object.expireTime = ""; - object.location = ""; - object.enableTpu = false; - object.tpuIpv4CidrBlock = ""; - object.master = null; - object.autopilot = null; - object.id = ""; - object.loggingConfig = null; - object.monitoringConfig = null; - object.nodePoolAutoConfig = null; - object.etag = ""; - object.fleet = null; - object.enableK8sBetaApis = null; - object.securityPostureConfig = null; - object.enterpriseConfig = null; - object.secretManagerConfig = null; - object.compliancePostureConfig = 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.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - object.initialNodeCount = message.initialNodeCount; - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) - object.nodeConfig = $root.google.container.v1beta1.NodeConfig.toObject(message.nodeConfig, options); - if (message.masterAuth != null && message.hasOwnProperty("masterAuth")) - object.masterAuth = $root.google.container.v1beta1.MasterAuth.toObject(message.masterAuth, options); - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - object.loggingService = message.loggingService; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - object.monitoringService = message.monitoringService; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.clusterIpv4Cidr != null && message.hasOwnProperty("clusterIpv4Cidr")) - object.clusterIpv4Cidr = message.clusterIpv4Cidr; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) - object.addonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.addonsConfig, options); - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.container.v1beta1.NodePool.toObject(message.nodePools[j], options); - } - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.enableKubernetesAlpha != null && message.hasOwnProperty("enableKubernetesAlpha")) - object.enableKubernetesAlpha = message.enableKubernetesAlpha; - var keys2; - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - object.labelFingerprint = message.labelFingerprint; - if (message.legacyAbac != null && message.hasOwnProperty("legacyAbac")) - object.legacyAbac = $root.google.container.v1beta1.LegacyAbac.toObject(message.legacyAbac, options); - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) - object.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.toObject(message.networkPolicy, options); - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) - object.ipAllocationPolicy = $root.google.container.v1beta1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) - object.masterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) - object.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.toObject(message.maintenancePolicy, options); - if (message.binaryAuthorization != null && message.hasOwnProperty("binaryAuthorization")) - object.binaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.toObject(message.binaryAuthorization, options); - if (message.podSecurityPolicyConfig != null && message.hasOwnProperty("podSecurityPolicyConfig")) - object.podSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.toObject(message.podSecurityPolicyConfig, options); - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1beta1.ClusterAutoscaling.toObject(message.autoscaling, options); - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.container.v1beta1.NetworkConfig.toObject(message.networkConfig, options); - if (message.privateCluster != null && message.hasOwnProperty("privateCluster")) - object.privateCluster = message.privateCluster; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; - if (message.defaultMaxPodsConstraint != null && message.hasOwnProperty("defaultMaxPodsConstraint")) - object.defaultMaxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.defaultMaxPodsConstraint, options); - if (message.resourceUsageExportConfig != null && message.hasOwnProperty("resourceUsageExportConfig")) - object.resourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.toObject(message.resourceUsageExportConfig, options); - if (message.authenticatorGroupsConfig != null && message.hasOwnProperty("authenticatorGroupsConfig")) - object.authenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.toObject(message.authenticatorGroupsConfig, options); - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) - object.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) - object.databaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.toObject(message.databaseEncryption, options); - if (message.verticalPodAutoscaling != null && message.hasOwnProperty("verticalPodAutoscaling")) - object.verticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.toObject(message.verticalPodAutoscaling, options); - if (message.shieldedNodes != null && message.hasOwnProperty("shieldedNodes")) - object.shieldedNodes = $root.google.container.v1beta1.ShieldedNodes.toObject(message.shieldedNodes, options); - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.releaseChannel, options); - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) - object.workloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); - if (message.costManagementConfig != null && message.hasOwnProperty("costManagementConfig")) - object.costManagementConfig = $root.google.container.v1beta1.CostManagementConfig.toObject(message.costManagementConfig, options); - if (message.clusterTelemetry != null && message.hasOwnProperty("clusterTelemetry")) - object.clusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.toObject(message.clusterTelemetry, options); - if (message.tpuConfig != null && message.hasOwnProperty("tpuConfig")) - object.tpuConfig = $root.google.container.v1beta1.TpuConfig.toObject(message.tpuConfig, options); - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.container.v1beta1.NotificationConfig.toObject(message.notificationConfig, options); - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.workloadCertificates != null && message.hasOwnProperty("workloadCertificates")) - object.workloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.toObject(message.workloadCertificates, options); - if (message.workloadAltsConfig != null && message.hasOwnProperty("workloadAltsConfig")) - object.workloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.toObject(message.workloadAltsConfig, options); - if (message.identityServiceConfig != null && message.hasOwnProperty("identityServiceConfig")) - object.identityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.toObject(message.identityServiceConfig, options); - if (message.meshCertificates != null && message.hasOwnProperty("meshCertificates")) - object.meshCertificates = $root.google.container.v1beta1.MeshCertificates.toObject(message.meshCertificates, options); - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - if (message.initialClusterVersion != null && message.hasOwnProperty("initialClusterVersion")) - object.initialClusterVersion = message.initialClusterVersion; - if (message.currentMasterVersion != null && message.hasOwnProperty("currentMasterVersion")) - object.currentMasterVersion = message.currentMasterVersion; - if (message.currentNodeVersion != null && message.hasOwnProperty("currentNodeVersion")) - object.currentNodeVersion = message.currentNodeVersion; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = message.createTime; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1beta1.Cluster.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Cluster.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.nodeIpv4CidrSize != null && message.hasOwnProperty("nodeIpv4CidrSize")) - object.nodeIpv4CidrSize = message.nodeIpv4CidrSize; - if (message.servicesIpv4Cidr != null && message.hasOwnProperty("servicesIpv4Cidr")) - object.servicesIpv4Cidr = message.servicesIpv4Cidr; - if (message.instanceGroupUrls && message.instanceGroupUrls.length) { - object.instanceGroupUrls = []; - for (var j = 0; j < message.instanceGroupUrls.length; ++j) - object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; - } - if (message.currentNodeCount != null && message.hasOwnProperty("currentNodeCount")) - object.currentNodeCount = message.currentNodeCount; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = message.expireTime; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.enableTpu != null && message.hasOwnProperty("enableTpu")) - object.enableTpu = message.enableTpu; - if (message.tpuIpv4CidrBlock != null && message.hasOwnProperty("tpuIpv4CidrBlock")) - object.tpuIpv4CidrBlock = message.tpuIpv4CidrBlock; - if (message.conditions && message.conditions.length) { - object.conditions = []; - for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.conditions[j], options); - } - if (message.master != null && message.hasOwnProperty("master")) - object.master = $root.google.container.v1beta1.Master.toObject(message.master, options); - if (message.autopilot != null && message.hasOwnProperty("autopilot")) - object.autopilot = $root.google.container.v1beta1.Autopilot.toObject(message.autopilot, options); - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.nodePoolDefaults != null && message.hasOwnProperty("nodePoolDefaults")) { - object.nodePoolDefaults = $root.google.container.v1beta1.NodePoolDefaults.toObject(message.nodePoolDefaults, options); - if (options.oneofs) - object._nodePoolDefaults = "nodePoolDefaults"; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1beta1.LoggingConfig.toObject(message.loggingConfig, options); - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) - object.monitoringConfig = $root.google.container.v1beta1.MonitoringConfig.toObject(message.monitoringConfig, options); - if (message.nodePoolAutoConfig != null && message.hasOwnProperty("nodePoolAutoConfig")) - object.nodePoolAutoConfig = $root.google.container.v1beta1.NodePoolAutoConfig.toObject(message.nodePoolAutoConfig, options); - if (message.protectConfig != null && message.hasOwnProperty("protectConfig")) { - object.protectConfig = $root.google.container.v1beta1.ProtectConfig.toObject(message.protectConfig, options); - if (options.oneofs) - object._protectConfig = "protectConfig"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.fleet != null && message.hasOwnProperty("fleet")) - object.fleet = $root.google.container.v1beta1.Fleet.toObject(message.fleet, options); - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) - object.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); - if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) - object.securityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); - if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) - object.enterpriseConfig = $root.google.container.v1beta1.EnterpriseConfig.toObject(message.enterpriseConfig, options); - if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) - object.secretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.toObject(message.secretManagerConfig, options); - if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) - object.compliancePostureConfig = $root.google.container.v1beta1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - object.satisfiesPzs = message.satisfiesPzs; - if (options.oneofs) - object._satisfiesPzs = "satisfiesPzs"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - object.satisfiesPzi = message.satisfiesPzi; - if (options.oneofs) - object._satisfiesPzi = "satisfiesPzi"; - } - return object; - }; - - /** - * Converts this Cluster to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Cluster - * @instance - * @returns {Object.} JSON object - */ - Cluster.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Cluster - * @function getTypeUrl - * @memberof google.container.v1beta1.Cluster - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Cluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Cluster"; - }; - - /** - * Status enum. - * @name google.container.v1beta1.Cluster.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_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 - */ - Cluster.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_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 Cluster; - })(); - - v1beta1.CompliancePostureConfig = (function() { - - /** - * Properties of a CompliancePostureConfig. - * @memberof google.container.v1beta1 - * @interface ICompliancePostureConfig - * @property {google.container.v1beta1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode - * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards - */ - - /** - * Constructs a new CompliancePostureConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a CompliancePostureConfig. - * @implements ICompliancePostureConfig - * @constructor - * @param {google.container.v1beta1.ICompliancePostureConfig=} [properties] Properties to set - */ - function CompliancePostureConfig(properties) { - this.complianceStandards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompliancePostureConfig mode. - * @member {google.container.v1beta1.CompliancePostureConfig.Mode|null|undefined} mode - * @memberof google.container.v1beta1.CompliancePostureConfig - * @instance - */ - CompliancePostureConfig.prototype.mode = null; - - /** - * CompliancePostureConfig complianceStandards. - * @member {Array.} complianceStandards - * @memberof google.container.v1beta1.CompliancePostureConfig - * @instance - */ - CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CompliancePostureConfig _mode. - * @member {"mode"|undefined} _mode - * @memberof google.container.v1beta1.CompliancePostureConfig - * @instance - */ - Object.defineProperty(CompliancePostureConfig.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CompliancePostureConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {google.container.v1beta1.ICompliancePostureConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig instance - */ - CompliancePostureConfig.create = function create(properties) { - return new CompliancePostureConfig(properties); - }; - - /** - * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {google.container.v1beta1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompliancePostureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.complianceStandards != null && message.complianceStandards.length) - for (var i = 0; i < message.complianceStandards.length; ++i) - $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {google.container.v1beta1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompliancePostureConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompliancePostureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - if (!(message.complianceStandards && message.complianceStandards.length)) - message.complianceStandards = []; - message.complianceStandards.push($root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompliancePostureConfig message. - * @function verify - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompliancePostureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { - if (!Array.isArray(message.complianceStandards)) - return "complianceStandards: array expected"; - for (var i = 0; i < message.complianceStandards.length; ++i) { - var error = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); - if (error) - return "complianceStandards." + error; - } - } - return null; - }; - - /** - * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CompliancePostureConfig} CompliancePostureConfig - */ - CompliancePostureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CompliancePostureConfig) - return object; - var message = new $root.google.container.v1beta1.CompliancePostureConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DISABLED": - case 1: - message.mode = 1; - break; - case "ENABLED": - case 2: - message.mode = 2; - break; - } - if (object.complianceStandards) { - if (!Array.isArray(object.complianceStandards)) - throw TypeError(".google.container.v1beta1.CompliancePostureConfig.complianceStandards: array expected"); - message.complianceStandards = []; - for (var i = 0; i < object.complianceStandards.length; ++i) { - if (typeof object.complianceStandards[i] !== "object") - throw TypeError(".google.container.v1beta1.CompliancePostureConfig.complianceStandards: object expected"); - message.complianceStandards[i] = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {google.container.v1beta1.CompliancePostureConfig} message CompliancePostureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompliancePostureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.complianceStandards = []; - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.container.v1beta1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.CompliancePostureConfig.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.complianceStandards && message.complianceStandards.length) { - object.complianceStandards = []; - for (var j = 0; j < message.complianceStandards.length; ++j) - object.complianceStandards[j] = $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); - } - return object; - }; - - /** - * Converts this CompliancePostureConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CompliancePostureConfig - * @instance - * @returns {Object.} JSON object - */ - CompliancePostureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompliancePostureConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.CompliancePostureConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CompliancePostureConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1beta1.CompliancePostureConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} ENABLED=2 ENABLED value - */ - CompliancePostureConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "ENABLED"] = 2; - return values; - })(); - - CompliancePostureConfig.ComplianceStandard = (function() { - - /** - * Properties of a ComplianceStandard. - * @memberof google.container.v1beta1.CompliancePostureConfig - * @interface IComplianceStandard - * @property {string|null} [standard] ComplianceStandard standard - */ - - /** - * Constructs a new ComplianceStandard. - * @memberof google.container.v1beta1.CompliancePostureConfig - * @classdesc Represents a ComplianceStandard. - * @implements IComplianceStandard - * @constructor - * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set - */ - function ComplianceStandard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComplianceStandard standard. - * @member {string|null|undefined} standard - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @instance - */ - ComplianceStandard.prototype.standard = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComplianceStandard _standard. - * @member {"standard"|undefined} _standard - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @instance - */ - Object.defineProperty(ComplianceStandard.prototype, "_standard", { - get: $util.oneOfGetter($oneOfFields = ["standard"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComplianceStandard instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set - * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance - */ - ComplianceStandard.create = function create(properties) { - return new ComplianceStandard(properties); - }; - - /** - * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComplianceStandard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); - return writer; - }; - - /** - * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1beta1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1beta1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComplianceStandard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.standard = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComplianceStandard message. - * @function verify - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComplianceStandard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.standard != null && message.hasOwnProperty("standard")) { - properties._standard = 1; - if (!$util.isString(message.standard)) - return "standard: string expected"; - } - return null; - }; - - /** - * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard - */ - ComplianceStandard.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard) - return object; - var message = new $root.google.container.v1beta1.CompliancePostureConfig.ComplianceStandard(); - if (object.standard != null) - message.standard = String(object.standard); - return message; - }; - - /** - * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {google.container.v1beta1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComplianceStandard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.standard != null && message.hasOwnProperty("standard")) { - object.standard = message.standard; - if (options.oneofs) - object._standard = "standard"; - } - return object; - }; - - /** - * Converts this ComplianceStandard to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @instance - * @returns {Object.} JSON object - */ - ComplianceStandard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComplianceStandard - * @function getTypeUrl - * @memberof google.container.v1beta1.CompliancePostureConfig.ComplianceStandard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CompliancePostureConfig.ComplianceStandard"; - }; - - return ComplianceStandard; - })(); - - return CompliancePostureConfig; - })(); - - v1beta1.K8sBetaAPIConfig = (function() { - - /** - * Properties of a K8sBetaAPIConfig. - * @memberof google.container.v1beta1 - * @interface IK8sBetaAPIConfig - * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis - */ - - /** - * Constructs a new K8sBetaAPIConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a K8sBetaAPIConfig. - * @implements IK8sBetaAPIConfig - * @constructor - * @param {google.container.v1beta1.IK8sBetaAPIConfig=} [properties] Properties to set - */ - function K8sBetaAPIConfig(properties) { - this.enabledApis = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * K8sBetaAPIConfig enabledApis. - * @member {Array.} enabledApis - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @instance - */ - K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; - - /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {google.container.v1beta1.IK8sBetaAPIConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig instance - */ - K8sBetaAPIConfig.create = function create(properties) { - return new K8sBetaAPIConfig(properties); - }; - - /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {google.container.v1beta1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - K8sBetaAPIConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabledApis != null && message.enabledApis.length) - for (var i = 0; i < message.enabledApis.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); - return writer; - }; - - /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.K8sBetaAPIConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {google.container.v1beta1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - K8sBetaAPIConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.K8sBetaAPIConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.enabledApis && message.enabledApis.length)) - message.enabledApis = []; - message.enabledApis.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a K8sBetaAPIConfig message. - * @function verify - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - K8sBetaAPIConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { - if (!Array.isArray(message.enabledApis)) - return "enabledApis: array expected"; - for (var i = 0; i < message.enabledApis.length; ++i) - if (!$util.isString(message.enabledApis[i])) - return "enabledApis: string[] expected"; - } - return null; - }; - - /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.K8sBetaAPIConfig} K8sBetaAPIConfig - */ - K8sBetaAPIConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.K8sBetaAPIConfig) - return object; - var message = new $root.google.container.v1beta1.K8sBetaAPIConfig(); - if (object.enabledApis) { - if (!Array.isArray(object.enabledApis)) - throw TypeError(".google.container.v1beta1.K8sBetaAPIConfig.enabledApis: array expected"); - message.enabledApis = []; - for (var i = 0; i < object.enabledApis.length; ++i) - message.enabledApis[i] = String(object.enabledApis[i]); - } - return message; - }; - - /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {google.container.v1beta1.K8sBetaAPIConfig} message K8sBetaAPIConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - K8sBetaAPIConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.enabledApis = []; - if (message.enabledApis && message.enabledApis.length) { - object.enabledApis = []; - for (var j = 0; j < message.enabledApis.length; ++j) - object.enabledApis[j] = message.enabledApis[j]; - } - return object; - }; - - /** - * Converts this K8sBetaAPIConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @instance - * @returns {Object.} JSON object - */ - K8sBetaAPIConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for K8sBetaAPIConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.K8sBetaAPIConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.K8sBetaAPIConfig"; - }; - - return K8sBetaAPIConfig; - })(); - - v1beta1.WorkloadConfig = (function() { - - /** - * Properties of a WorkloadConfig. - * @memberof google.container.v1beta1 - * @interface IWorkloadConfig - * @property {google.container.v1beta1.WorkloadConfig.Mode|null} [auditMode] WorkloadConfig auditMode - */ - - /** - * Constructs a new WorkloadConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadConfig. - * @implements IWorkloadConfig - * @constructor - * @param {google.container.v1beta1.IWorkloadConfig=} [properties] Properties to set - */ - function WorkloadConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadConfig auditMode. - * @member {google.container.v1beta1.WorkloadConfig.Mode|null|undefined} auditMode - * @memberof google.container.v1beta1.WorkloadConfig - * @instance - */ - WorkloadConfig.prototype.auditMode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * WorkloadConfig _auditMode. - * @member {"auditMode"|undefined} _auditMode - * @memberof google.container.v1beta1.WorkloadConfig - * @instance - */ - Object.defineProperty(WorkloadConfig.prototype, "_auditMode", { - get: $util.oneOfGetter($oneOfFields = ["auditMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WorkloadConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {google.container.v1beta1.IWorkloadConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig instance - */ - WorkloadConfig.create = function create(properties) { - return new WorkloadConfig(properties); - }; - - /** - * Encodes the specified WorkloadConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {google.container.v1beta1.IWorkloadConfig} message WorkloadConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.auditMode != null && Object.hasOwnProperty.call(message, "auditMode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.auditMode); - return writer; - }; - - /** - * Encodes the specified WorkloadConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {google.container.v1beta1.IWorkloadConfig} message WorkloadConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.auditMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadConfig message. - * @function verify - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.auditMode != null && message.hasOwnProperty("auditMode")) { - properties._auditMode = 1; - switch (message.auditMode) { - default: - return "auditMode: enum value expected"; - case 0: - case 1: - case 4: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a WorkloadConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadConfig} WorkloadConfig - */ - WorkloadConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadConfig) - return object; - var message = new $root.google.container.v1beta1.WorkloadConfig(); - switch (object.auditMode) { - default: - if (typeof object.auditMode === "number") { - message.auditMode = object.auditMode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.auditMode = 0; - break; - case "DISABLED": - case 1: - message.auditMode = 1; - break; - case "BASIC": - case 4: - message.auditMode = 4; - break; - case "BASELINE": - case 2: - message.auditMode = 2; - break; - case "RESTRICTED": - case 3: - message.auditMode = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a WorkloadConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {google.container.v1beta1.WorkloadConfig} message WorkloadConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.auditMode != null && message.hasOwnProperty("auditMode")) { - object.auditMode = options.enums === String ? $root.google.container.v1beta1.WorkloadConfig.Mode[message.auditMode] === undefined ? message.auditMode : $root.google.container.v1beta1.WorkloadConfig.Mode[message.auditMode] : message.auditMode; - if (options.oneofs) - object._auditMode = "auditMode"; - } - return object; - }; - - /** - * Converts this WorkloadConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1beta1.WorkloadConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} BASIC=4 BASIC value - * @property {number} BASELINE=2 BASELINE value - * @property {number} RESTRICTED=3 RESTRICTED value - */ - WorkloadConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[4] = "BASIC"] = 4; - values[valuesById[2] = "BASELINE"] = 2; - values[valuesById[3] = "RESTRICTED"] = 3; - return values; - })(); - - return WorkloadConfig; - })(); - - v1beta1.ProtectConfig = (function() { - - /** - * Properties of a ProtectConfig. - * @memberof google.container.v1beta1 - * @interface IProtectConfig - * @property {google.container.v1beta1.IWorkloadConfig|null} [workloadConfig] ProtectConfig workloadConfig - * @property {google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null} [workloadVulnerabilityMode] ProtectConfig workloadVulnerabilityMode - */ - - /** - * Constructs a new ProtectConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ProtectConfig. - * @implements IProtectConfig - * @constructor - * @param {google.container.v1beta1.IProtectConfig=} [properties] Properties to set - */ - function ProtectConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProtectConfig workloadConfig. - * @member {google.container.v1beta1.IWorkloadConfig|null|undefined} workloadConfig - * @memberof google.container.v1beta1.ProtectConfig - * @instance - */ - ProtectConfig.prototype.workloadConfig = null; - - /** - * ProtectConfig workloadVulnerabilityMode. - * @member {google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode|null|undefined} workloadVulnerabilityMode - * @memberof google.container.v1beta1.ProtectConfig - * @instance - */ - ProtectConfig.prototype.workloadVulnerabilityMode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ProtectConfig _workloadConfig. - * @member {"workloadConfig"|undefined} _workloadConfig - * @memberof google.container.v1beta1.ProtectConfig - * @instance - */ - Object.defineProperty(ProtectConfig.prototype, "_workloadConfig", { - get: $util.oneOfGetter($oneOfFields = ["workloadConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ProtectConfig _workloadVulnerabilityMode. - * @member {"workloadVulnerabilityMode"|undefined} _workloadVulnerabilityMode - * @memberof google.container.v1beta1.ProtectConfig - * @instance - */ - Object.defineProperty(ProtectConfig.prototype, "_workloadVulnerabilityMode", { - get: $util.oneOfGetter($oneOfFields = ["workloadVulnerabilityMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ProtectConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {google.container.v1beta1.IProtectConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig instance - */ - ProtectConfig.create = function create(properties) { - return new ProtectConfig(properties); - }; - - /** - * Encodes the specified ProtectConfig message. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {google.container.v1beta1.IProtectConfig} message ProtectConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtectConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workloadConfig != null && Object.hasOwnProperty.call(message, "workloadConfig")) - $root.google.container.v1beta1.WorkloadConfig.encode(message.workloadConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.workloadVulnerabilityMode != null && Object.hasOwnProperty.call(message, "workloadVulnerabilityMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.workloadVulnerabilityMode); - return writer; - }; - - /** - * Encodes the specified ProtectConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ProtectConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {google.container.v1beta1.IProtectConfig} message ProtectConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtectConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProtectConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtectConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ProtectConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.workloadVulnerabilityMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProtectConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtectConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProtectConfig message. - * @function verify - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProtectConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.workloadConfig != null && message.hasOwnProperty("workloadConfig")) { - properties._workloadConfig = 1; - { - var error = $root.google.container.v1beta1.WorkloadConfig.verify(message.workloadConfig); - if (error) - return "workloadConfig." + error; - } - } - if (message.workloadVulnerabilityMode != null && message.hasOwnProperty("workloadVulnerabilityMode")) { - properties._workloadVulnerabilityMode = 1; - switch (message.workloadVulnerabilityMode) { - default: - return "workloadVulnerabilityMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a ProtectConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ProtectConfig} ProtectConfig - */ - ProtectConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ProtectConfig) - return object; - var message = new $root.google.container.v1beta1.ProtectConfig(); - if (object.workloadConfig != null) { - if (typeof object.workloadConfig !== "object") - throw TypeError(".google.container.v1beta1.ProtectConfig.workloadConfig: object expected"); - message.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.fromObject(object.workloadConfig); - } - switch (object.workloadVulnerabilityMode) { - default: - if (typeof object.workloadVulnerabilityMode === "number") { - message.workloadVulnerabilityMode = object.workloadVulnerabilityMode; - break; - } - break; - case "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED": - case 0: - message.workloadVulnerabilityMode = 0; - break; - case "DISABLED": - case 1: - message.workloadVulnerabilityMode = 1; - break; - case "BASIC": - case 2: - message.workloadVulnerabilityMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ProtectConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {google.container.v1beta1.ProtectConfig} message ProtectConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProtectConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.workloadConfig != null && message.hasOwnProperty("workloadConfig")) { - object.workloadConfig = $root.google.container.v1beta1.WorkloadConfig.toObject(message.workloadConfig, options); - if (options.oneofs) - object._workloadConfig = "workloadConfig"; - } - if (message.workloadVulnerabilityMode != null && message.hasOwnProperty("workloadVulnerabilityMode")) { - object.workloadVulnerabilityMode = options.enums === String ? $root.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode[message.workloadVulnerabilityMode] === undefined ? message.workloadVulnerabilityMode : $root.google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode[message.workloadVulnerabilityMode] : message.workloadVulnerabilityMode; - if (options.oneofs) - object._workloadVulnerabilityMode = "workloadVulnerabilityMode"; - } - return object; - }; - - /** - * Converts this ProtectConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ProtectConfig - * @instance - * @returns {Object.} JSON object - */ - ProtectConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProtectConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ProtectConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProtectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ProtectConfig"; - }; - - /** - * WorkloadVulnerabilityMode enum. - * @name google.container.v1beta1.ProtectConfig.WorkloadVulnerabilityMode - * @enum {number} - * @property {number} WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED=0 WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} BASIC=2 BASIC value - */ - ProtectConfig.WorkloadVulnerabilityMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "BASIC"] = 2; - return values; - })(); - - return ProtectConfig; - })(); - - v1beta1.SecurityPostureConfig = (function() { - - /** - * Properties of a SecurityPostureConfig. - * @memberof google.container.v1beta1 - * @interface ISecurityPostureConfig - * @property {google.container.v1beta1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode - * @property {google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode - */ - - /** - * Constructs a new SecurityPostureConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a SecurityPostureConfig. - * @implements ISecurityPostureConfig - * @constructor - * @param {google.container.v1beta1.ISecurityPostureConfig=} [properties] Properties to set - */ - function SecurityPostureConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityPostureConfig mode. - * @member {google.container.v1beta1.SecurityPostureConfig.Mode|null|undefined} mode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @instance - */ - SecurityPostureConfig.prototype.mode = null; - - /** - * SecurityPostureConfig vulnerabilityMode. - * @member {google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @instance - */ - SecurityPostureConfig.prototype.vulnerabilityMode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SecurityPostureConfig _mode. - * @member {"mode"|undefined} _mode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @instance - */ - Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SecurityPostureConfig _vulnerabilityMode. - * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @instance - */ - Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { - get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SecurityPostureConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {google.container.v1beta1.ISecurityPostureConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig instance - */ - SecurityPostureConfig.create = function create(properties) { - return new SecurityPostureConfig(properties); - }; - - /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {google.container.v1beta1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPostureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); - return writer; - }; - - /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityPostureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {google.container.v1beta1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPostureConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecurityPostureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - message.vulnerabilityMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityPostureConfig message. - * @function verify - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityPostureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - properties._vulnerabilityMode = 1; - switch (message.vulnerabilityMode) { - default: - return "vulnerabilityMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SecurityPostureConfig} SecurityPostureConfig - */ - SecurityPostureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SecurityPostureConfig) - return object; - var message = new $root.google.container.v1beta1.SecurityPostureConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DISABLED": - case 1: - message.mode = 1; - break; - case "BASIC": - case 2: - message.mode = 2; - break; - case "ENTERPRISE": - case 3: - message.mode = 3; - break; - } - switch (object.vulnerabilityMode) { - default: - if (typeof object.vulnerabilityMode === "number") { - message.vulnerabilityMode = object.vulnerabilityMode; - break; - } - break; - case "VULNERABILITY_MODE_UNSPECIFIED": - case 0: - message.vulnerabilityMode = 0; - break; - case "VULNERABILITY_DISABLED": - case 1: - message.vulnerabilityMode = 1; - break; - case "VULNERABILITY_BASIC": - case 2: - message.vulnerabilityMode = 2; - break; - case "VULNERABILITY_ENTERPRISE": - case 3: - message.vulnerabilityMode = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {google.container.v1beta1.SecurityPostureConfig} message SecurityPostureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityPostureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.container.v1beta1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.SecurityPostureConfig.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - object.vulnerabilityMode = options.enums === String ? $root.google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; - if (options.oneofs) - object._vulnerabilityMode = "vulnerabilityMode"; - } - return object; - }; - - /** - * Converts this SecurityPostureConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SecurityPostureConfig - * @instance - * @returns {Object.} JSON object - */ - SecurityPostureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityPostureConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.SecurityPostureConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SecurityPostureConfig"; - }; - - /** - * Mode enum. - * @name google.container.v1beta1.SecurityPostureConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} BASIC=2 BASIC value - * @property {number} ENTERPRISE=3 ENTERPRISE value - */ - SecurityPostureConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "BASIC"] = 2; - values[valuesById[3] = "ENTERPRISE"] = 3; - return values; - })(); - - /** - * VulnerabilityMode enum. - * @name google.container.v1beta1.SecurityPostureConfig.VulnerabilityMode - * @enum {number} - * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value - * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value - * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value - * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value - */ - SecurityPostureConfig.VulnerabilityMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; - values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; - values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; - return values; - })(); - - return SecurityPostureConfig; - })(); - - v1beta1.NodePoolDefaults = (function() { - - /** - * Properties of a NodePoolDefaults. - * @memberof google.container.v1beta1 - * @interface INodePoolDefaults - * @property {google.container.v1beta1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults - */ - - /** - * Constructs a new NodePoolDefaults. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodePoolDefaults. - * @implements INodePoolDefaults - * @constructor - * @param {google.container.v1beta1.INodePoolDefaults=} [properties] Properties to set - */ - function NodePoolDefaults(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolDefaults nodeConfigDefaults. - * @member {google.container.v1beta1.INodeConfigDefaults|null|undefined} nodeConfigDefaults - * @memberof google.container.v1beta1.NodePoolDefaults - * @instance - */ - NodePoolDefaults.prototype.nodeConfigDefaults = null; - - /** - * Creates a new NodePoolDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {google.container.v1beta1.INodePoolDefaults=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults instance - */ - NodePoolDefaults.create = function create(properties) { - return new NodePoolDefaults(properties); - }; - - /** - * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {google.container.v1beta1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) - $root.google.container.v1beta1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {google.container.v1beta1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolDefaults message. - * @function verify - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { - var error = $root.google.container.v1beta1.NodeConfigDefaults.verify(message.nodeConfigDefaults); - if (error) - return "nodeConfigDefaults." + error; - } - return null; - }; - - /** - * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePoolDefaults} NodePoolDefaults - */ - NodePoolDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePoolDefaults) - return object; - var message = new $root.google.container.v1beta1.NodePoolDefaults(); - if (object.nodeConfigDefaults != null) { - if (typeof object.nodeConfigDefaults !== "object") - throw TypeError(".google.container.v1beta1.NodePoolDefaults.nodeConfigDefaults: object expected"); - message.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {google.container.v1beta1.NodePoolDefaults} message NodePoolDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.nodeConfigDefaults = null; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) - object.nodeConfigDefaults = $root.google.container.v1beta1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); - return object; - }; - - /** - * Converts this NodePoolDefaults to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePoolDefaults - * @instance - * @returns {Object.} JSON object - */ - NodePoolDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolDefaults - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePoolDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePoolDefaults"; - }; - - return NodePoolDefaults; - })(); - - v1beta1.NodeConfigDefaults = (function() { - - /** - * Properties of a NodeConfigDefaults. - * @memberof google.container.v1beta1 - * @interface INodeConfigDefaults - * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig - * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig - * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig - * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [hostMaintenancePolicy] NodeConfigDefaults hostMaintenancePolicy - * @property {google.container.v1beta1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig - */ - - /** - * Constructs a new NodeConfigDefaults. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeConfigDefaults. - * @implements INodeConfigDefaults - * @constructor - * @param {google.container.v1beta1.INodeConfigDefaults=} [properties] Properties to set - */ - function NodeConfigDefaults(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfigDefaults gcfsConfig. - * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.gcfsConfig = null; - - /** - * NodeConfigDefaults loggingConfig. - * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.loggingConfig = null; - - /** - * NodeConfigDefaults containerdConfig. - * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.containerdConfig = null; - - /** - * NodeConfigDefaults hostMaintenancePolicy. - * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} hostMaintenancePolicy - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.hostMaintenancePolicy = null; - - /** - * NodeConfigDefaults nodeKubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} nodeKubeletConfig - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - */ - NodeConfigDefaults.prototype.nodeKubeletConfig = null; - - /** - * Creates a new NodeConfigDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {google.container.v1beta1.INodeConfigDefaults=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults instance - */ - NodeConfigDefaults.create = function create(properties) { - return new NodeConfigDefaults(properties); - }; - - /** - * Encodes the specified NodeConfigDefaults message. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {google.container.v1beta1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfigDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.hostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "hostMaintenancePolicy")) - $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.hostMaintenancePolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeConfigDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeConfigDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {google.container.v1beta1.INodeConfigDefaults} message NodeConfigDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfigDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfigDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeConfigDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 6: { - message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfigDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfigDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfigDefaults message. - * @function verify - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfigDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) { - var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.hostMaintenancePolicy); - if (error) - return "hostMaintenancePolicy." + error; - } - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.nodeKubeletConfig); - if (error) - return "nodeKubeletConfig." + error; - } - return null; - }; - - /** - * Creates a NodeConfigDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeConfigDefaults} NodeConfigDefaults - */ - NodeConfigDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeConfigDefaults) - return object; - var message = new $root.google.container.v1beta1.NodeConfigDefaults(); - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfigDefaults.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfigDefaults.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfigDefaults.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.hostMaintenancePolicy != null) { - if (typeof object.hostMaintenancePolicy !== "object") - throw TypeError(".google.container.v1beta1.NodeConfigDefaults.hostMaintenancePolicy: object expected"); - message.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.hostMaintenancePolicy); - } - if (object.nodeKubeletConfig != null) { - if (typeof object.nodeKubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.NodeConfigDefaults.nodeKubeletConfig: object expected"); - message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodeConfigDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {google.container.v1beta1.NodeConfigDefaults} message NodeConfigDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfigDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcfsConfig = null; - object.loggingConfig = null; - object.containerdConfig = null; - object.hostMaintenancePolicy = null; - object.nodeKubeletConfig = null; - } - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.hostMaintenancePolicy != null && message.hasOwnProperty("hostMaintenancePolicy")) - object.hostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.hostMaintenancePolicy, options); - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) - object.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); - return object; - }; - - /** - * Converts this NodeConfigDefaults to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeConfigDefaults - * @instance - * @returns {Object.} JSON object - */ - NodeConfigDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfigDefaults - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeConfigDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfigDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeConfigDefaults"; - }; - - return NodeConfigDefaults; - })(); - - v1beta1.NodePoolAutoConfig = (function() { - - /** - * Properties of a NodePoolAutoConfig. - * @memberof google.container.v1beta1 - * @interface INodePoolAutoConfig - * @property {google.container.v1beta1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags - * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags - * @property {google.container.v1beta1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig - */ - - /** - * Constructs a new NodePoolAutoConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodePoolAutoConfig. - * @implements INodePoolAutoConfig - * @constructor - * @param {google.container.v1beta1.INodePoolAutoConfig=} [properties] Properties to set - */ - function NodePoolAutoConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolAutoConfig networkTags. - * @member {google.container.v1beta1.INetworkTags|null|undefined} networkTags - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.networkTags = null; - - /** - * NodePoolAutoConfig resourceManagerTags. - * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.resourceManagerTags = null; - - /** - * NodePoolAutoConfig nodeKubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} nodeKubeletConfig - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @instance - */ - NodePoolAutoConfig.prototype.nodeKubeletConfig = null; - - /** - * Creates a new NodePoolAutoConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {google.container.v1beta1.INodePoolAutoConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig instance - */ - NodePoolAutoConfig.create = function create(properties) { - return new NodePoolAutoConfig(properties); - }; - - /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {google.container.v1beta1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) - $root.google.container.v1beta1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {google.container.v1beta1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolAutoConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.networkTags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 2: { - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolAutoConfig message. - * @function verify - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolAutoConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - var error = $root.google.container.v1beta1.NetworkTags.verify(message.networkTags); - if (error) - return "networkTags." + error; - } - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.nodeKubeletConfig); - if (error) - return "nodeKubeletConfig." + error; - } - return null; - }; - - /** - * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePoolAutoConfig} NodePoolAutoConfig - */ - NodePoolAutoConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePoolAutoConfig) - return object; - var message = new $root.google.container.v1beta1.NodePoolAutoConfig(); - if (object.networkTags != null) { - if (typeof object.networkTags !== "object") - throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.networkTags: object expected"); - message.networkTags = $root.google.container.v1beta1.NetworkTags.fromObject(object.networkTags); - } - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.nodeKubeletConfig != null) { - if (typeof object.nodeKubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); - message.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {google.container.v1beta1.NodePoolAutoConfig} message NodePoolAutoConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolAutoConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.networkTags = null; - object.resourceManagerTags = null; - object.nodeKubeletConfig = null; - } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) - object.networkTags = $root.google.container.v1beta1.NetworkTags.toObject(message.networkTags, options); - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) - object.nodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); - return object; - }; - - /** - * Converts this NodePoolAutoConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @instance - * @returns {Object.} JSON object - */ - NodePoolAutoConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolAutoConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePoolAutoConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePoolAutoConfig"; - }; - - return NodePoolAutoConfig; - })(); - - v1beta1.ClusterUpdate = (function() { - - /** - * Properties of a ClusterUpdate. - * @memberof google.container.v1beta1 - * @interface IClusterUpdate - * @property {string|null} [desiredNodeVersion] ClusterUpdate desiredNodeVersion - * @property {string|null} [desiredMonitoringService] ClusterUpdate desiredMonitoringService - * @property {google.container.v1beta1.IAddonsConfig|null} [desiredAddonsConfig] ClusterUpdate desiredAddonsConfig - * @property {string|null} [desiredNodePoolId] ClusterUpdate desiredNodePoolId - * @property {string|null} [desiredImageType] ClusterUpdate desiredImageType - * @property {google.container.v1beta1.INodePoolAutoscaling|null} [desiredNodePoolAutoscaling] ClusterUpdate desiredNodePoolAutoscaling - * @property {Array.|null} [desiredLocations] ClusterUpdate desiredLocations - * @property {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null} [desiredMasterAuthorizedNetworksConfig] ClusterUpdate desiredMasterAuthorizedNetworksConfig - * @property {google.container.v1beta1.IPodSecurityPolicyConfig|null} [desiredPodSecurityPolicyConfig] ClusterUpdate desiredPodSecurityPolicyConfig - * @property {google.container.v1beta1.IClusterAutoscaling|null} [desiredClusterAutoscaling] ClusterUpdate desiredClusterAutoscaling - * @property {google.container.v1beta1.IBinaryAuthorization|null} [desiredBinaryAuthorization] ClusterUpdate desiredBinaryAuthorization - * @property {string|null} [desiredLoggingService] ClusterUpdate desiredLoggingService - * @property {google.container.v1beta1.IResourceUsageExportConfig|null} [desiredResourceUsageExportConfig] ClusterUpdate desiredResourceUsageExportConfig - * @property {google.container.v1beta1.IVerticalPodAutoscaling|null} [desiredVerticalPodAutoscaling] ClusterUpdate desiredVerticalPodAutoscaling - * @property {google.container.v1beta1.IPrivateClusterConfig|null} [desiredPrivateClusterConfig] ClusterUpdate desiredPrivateClusterConfig - * @property {google.container.v1beta1.IIntraNodeVisibilityConfig|null} [desiredIntraNodeVisibilityConfig] ClusterUpdate desiredIntraNodeVisibilityConfig - * @property {google.container.v1beta1.IDefaultSnatStatus|null} [desiredDefaultSnatStatus] ClusterUpdate desiredDefaultSnatStatus - * @property {google.container.v1beta1.IClusterTelemetry|null} [desiredClusterTelemetry] ClusterUpdate desiredClusterTelemetry - * @property {google.container.v1beta1.IReleaseChannel|null} [desiredReleaseChannel] ClusterUpdate desiredReleaseChannel - * @property {google.container.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] ClusterUpdate privateClusterConfig - * @property {google.container.v1beta1.ITpuConfig|null} [desiredTpuConfig] ClusterUpdate desiredTpuConfig - * @property {google.container.v1beta1.IILBSubsettingConfig|null} [desiredL4ilbSubsettingConfig] ClusterUpdate desiredL4ilbSubsettingConfig - * @property {google.container.v1beta1.DatapathProvider|null} [desiredDatapathProvider] ClusterUpdate desiredDatapathProvider - * @property {google.container.v1beta1.PrivateIPv6GoogleAccess|null} [desiredPrivateIpv6GoogleAccess] ClusterUpdate desiredPrivateIpv6GoogleAccess - * @property {google.container.v1beta1.INotificationConfig|null} [desiredNotificationConfig] ClusterUpdate desiredNotificationConfig - * @property {string|null} [desiredMasterVersion] ClusterUpdate desiredMasterVersion - * @property {google.container.v1beta1.IGcfsConfig|null} [desiredGcfsConfig] ClusterUpdate desiredGcfsConfig - * @property {google.container.v1beta1.IDatabaseEncryption|null} [desiredDatabaseEncryption] ClusterUpdate desiredDatabaseEncryption - * @property {google.container.v1beta1.IWorkloadIdentityConfig|null} [desiredWorkloadIdentityConfig] ClusterUpdate desiredWorkloadIdentityConfig - * @property {google.container.v1beta1.IWorkloadCertificates|null} [desiredWorkloadCertificates] ClusterUpdate desiredWorkloadCertificates - * @property {google.container.v1beta1.IMeshCertificates|null} [desiredMeshCertificates] ClusterUpdate desiredMeshCertificates - * @property {google.container.v1beta1.IWorkloadALTSConfig|null} [desiredWorkloadAltsConfig] ClusterUpdate desiredWorkloadAltsConfig - * @property {google.container.v1beta1.IShieldedNodes|null} [desiredShieldedNodes] ClusterUpdate desiredShieldedNodes - * @property {google.container.v1beta1.ICostManagementConfig|null} [desiredCostManagementConfig] ClusterUpdate desiredCostManagementConfig - * @property {google.container.v1beta1.IMaster|null} [desiredMaster] ClusterUpdate desiredMaster - * @property {google.container.v1beta1.IDNSConfig|null} [desiredDnsConfig] ClusterUpdate desiredDnsConfig - * @property {google.container.v1beta1.IServiceExternalIPsConfig|null} [desiredServiceExternalIpsConfig] ClusterUpdate desiredServiceExternalIpsConfig - * @property {google.container.v1beta1.IAuthenticatorGroupsConfig|null} [desiredAuthenticatorGroupsConfig] ClusterUpdate desiredAuthenticatorGroupsConfig - * @property {google.container.v1beta1.ILoggingConfig|null} [desiredLoggingConfig] ClusterUpdate desiredLoggingConfig - * @property {google.container.v1beta1.IMonitoringConfig|null} [desiredMonitoringConfig] ClusterUpdate desiredMonitoringConfig - * @property {google.container.v1beta1.IIdentityServiceConfig|null} [desiredIdentityServiceConfig] ClusterUpdate desiredIdentityServiceConfig - * @property {boolean|null} [desiredEnablePrivateEndpoint] ClusterUpdate desiredEnablePrivateEndpoint - * @property {google.container.v1beta1.INetworkTags|null} [desiredNodePoolAutoConfigNetworkTags] ClusterUpdate desiredNodePoolAutoConfigNetworkTags - * @property {google.container.v1beta1.IProtectConfig|null} [desiredProtectConfig] ClusterUpdate desiredProtectConfig - * @property {google.container.v1beta1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig - * @property {string|null} [etag] ClusterUpdate etag - * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig - * @property {google.container.v1beta1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet - * @property {google.container.v1beta1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType - * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig - * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig - * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] ClusterUpdate enableK8sBetaApis - * @property {google.container.v1beta1.ISecurityPostureConfig|null} [desiredSecurityPostureConfig] ClusterUpdate desiredSecurityPostureConfig - * @property {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [desiredNetworkPerformanceConfig] ClusterUpdate desiredNetworkPerformanceConfig - * @property {boolean|null} [desiredEnableFqdnNetworkPolicy] ClusterUpdate desiredEnableFqdnNetworkPolicy - * @property {google.container.v1beta1.IWorkloadPolicyConfig|null} [desiredAutopilotWorkloadPolicyConfig] ClusterUpdate desiredAutopilotWorkloadPolicyConfig - * @property {google.container.v1beta1.IK8sBetaAPIConfig|null} [desiredK8sBetaApis] ClusterUpdate desiredK8sBetaApis - * @property {google.container.v1beta1.IHostMaintenancePolicy|null} [desiredHostMaintenancePolicy] ClusterUpdate desiredHostMaintenancePolicy - * @property {google.container.v1beta1.IContainerdConfig|null} [desiredContainerdConfig] ClusterUpdate desiredContainerdConfig - * @property {boolean|null} [desiredEnableMultiNetworking] ClusterUpdate desiredEnableMultiNetworking - * @property {google.container.v1beta1.IResourceManagerTags|null} [desiredNodePoolAutoConfigResourceManagerTags] ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags - * @property {google.container.v1beta1.InTransitEncryptionConfig|null} [desiredInTransitEncryptionConfig] ClusterUpdate desiredInTransitEncryptionConfig - * @property {boolean|null} [desiredEnableCiliumClusterwideNetworkPolicy] ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy - * @property {google.container.v1beta1.ISecretManagerConfig|null} [desiredSecretManagerConfig] ClusterUpdate desiredSecretManagerConfig - * @property {google.container.v1beta1.INodeKubeletConfig|null} [desiredNodeKubeletConfig] ClusterUpdate desiredNodeKubeletConfig - * @property {google.container.v1beta1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig - */ - - /** - * Constructs a new ClusterUpdate. - * @memberof google.container.v1beta1 - * @classdesc Represents a ClusterUpdate. - * @implements IClusterUpdate - * @constructor - * @param {google.container.v1beta1.IClusterUpdate=} [properties] Properties to set - */ - function ClusterUpdate(properties) { - this.desiredLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterUpdate desiredNodeVersion. - * @member {string} desiredNodeVersion - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodeVersion = ""; - - /** - * ClusterUpdate desiredMonitoringService. - * @member {string} desiredMonitoringService - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMonitoringService = ""; - - /** - * ClusterUpdate desiredAddonsConfig. - * @member {google.container.v1beta1.IAddonsConfig|null|undefined} desiredAddonsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAddonsConfig = null; - - /** - * ClusterUpdate desiredNodePoolId. - * @member {string} desiredNodePoolId - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolId = ""; - - /** - * ClusterUpdate desiredImageType. - * @member {string} desiredImageType - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredImageType = ""; - - /** - * ClusterUpdate desiredNodePoolAutoscaling. - * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} desiredNodePoolAutoscaling - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoscaling = null; - - /** - * ClusterUpdate desiredLocations. - * @member {Array.} desiredLocations - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLocations = $util.emptyArray; - - /** - * ClusterUpdate desiredMasterAuthorizedNetworksConfig. - * @member {google.container.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} desiredMasterAuthorizedNetworksConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMasterAuthorizedNetworksConfig = null; - - /** - * ClusterUpdate desiredPodSecurityPolicyConfig. - * @member {google.container.v1beta1.IPodSecurityPolicyConfig|null|undefined} desiredPodSecurityPolicyConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredPodSecurityPolicyConfig = null; - - /** - * ClusterUpdate desiredClusterAutoscaling. - * @member {google.container.v1beta1.IClusterAutoscaling|null|undefined} desiredClusterAutoscaling - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredClusterAutoscaling = null; - - /** - * ClusterUpdate desiredBinaryAuthorization. - * @member {google.container.v1beta1.IBinaryAuthorization|null|undefined} desiredBinaryAuthorization - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredBinaryAuthorization = null; - - /** - * ClusterUpdate desiredLoggingService. - * @member {string} desiredLoggingService - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLoggingService = ""; - - /** - * ClusterUpdate desiredResourceUsageExportConfig. - * @member {google.container.v1beta1.IResourceUsageExportConfig|null|undefined} desiredResourceUsageExportConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredResourceUsageExportConfig = null; - - /** - * ClusterUpdate desiredVerticalPodAutoscaling. - * @member {google.container.v1beta1.IVerticalPodAutoscaling|null|undefined} desiredVerticalPodAutoscaling - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredVerticalPodAutoscaling = null; - - /** - * ClusterUpdate desiredPrivateClusterConfig. - * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} desiredPrivateClusterConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredPrivateClusterConfig = null; - - /** - * ClusterUpdate desiredIntraNodeVisibilityConfig. - * @member {google.container.v1beta1.IIntraNodeVisibilityConfig|null|undefined} desiredIntraNodeVisibilityConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredIntraNodeVisibilityConfig = null; - - /** - * ClusterUpdate desiredDefaultSnatStatus. - * @member {google.container.v1beta1.IDefaultSnatStatus|null|undefined} desiredDefaultSnatStatus - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDefaultSnatStatus = null; - - /** - * ClusterUpdate desiredClusterTelemetry. - * @member {google.container.v1beta1.IClusterTelemetry|null|undefined} desiredClusterTelemetry - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredClusterTelemetry = null; - - /** - * ClusterUpdate desiredReleaseChannel. - * @member {google.container.v1beta1.IReleaseChannel|null|undefined} desiredReleaseChannel - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredReleaseChannel = null; - - /** - * ClusterUpdate privateClusterConfig. - * @member {google.container.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.privateClusterConfig = null; - - /** - * ClusterUpdate desiredTpuConfig. - * @member {google.container.v1beta1.ITpuConfig|null|undefined} desiredTpuConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredTpuConfig = null; - - /** - * ClusterUpdate desiredL4ilbSubsettingConfig. - * @member {google.container.v1beta1.IILBSubsettingConfig|null|undefined} desiredL4ilbSubsettingConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredL4ilbSubsettingConfig = null; - - /** - * ClusterUpdate desiredDatapathProvider. - * @member {google.container.v1beta1.DatapathProvider} desiredDatapathProvider - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDatapathProvider = 0; - - /** - * ClusterUpdate desiredPrivateIpv6GoogleAccess. - * @member {google.container.v1beta1.PrivateIPv6GoogleAccess} desiredPrivateIpv6GoogleAccess - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredPrivateIpv6GoogleAccess = 0; - - /** - * ClusterUpdate desiredNotificationConfig. - * @member {google.container.v1beta1.INotificationConfig|null|undefined} desiredNotificationConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNotificationConfig = null; - - /** - * ClusterUpdate desiredMasterVersion. - * @member {string} desiredMasterVersion - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMasterVersion = ""; - - /** - * ClusterUpdate desiredGcfsConfig. - * @member {google.container.v1beta1.IGcfsConfig|null|undefined} desiredGcfsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredGcfsConfig = null; - - /** - * ClusterUpdate desiredDatabaseEncryption. - * @member {google.container.v1beta1.IDatabaseEncryption|null|undefined} desiredDatabaseEncryption - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDatabaseEncryption = null; - - /** - * ClusterUpdate desiredWorkloadIdentityConfig. - * @member {google.container.v1beta1.IWorkloadIdentityConfig|null|undefined} desiredWorkloadIdentityConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredWorkloadIdentityConfig = null; - - /** - * ClusterUpdate desiredWorkloadCertificates. - * @member {google.container.v1beta1.IWorkloadCertificates|null|undefined} desiredWorkloadCertificates - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredWorkloadCertificates = null; - - /** - * ClusterUpdate desiredMeshCertificates. - * @member {google.container.v1beta1.IMeshCertificates|null|undefined} desiredMeshCertificates - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMeshCertificates = null; - - /** - * ClusterUpdate desiredWorkloadAltsConfig. - * @member {google.container.v1beta1.IWorkloadALTSConfig|null|undefined} desiredWorkloadAltsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredWorkloadAltsConfig = null; - - /** - * ClusterUpdate desiredShieldedNodes. - * @member {google.container.v1beta1.IShieldedNodes|null|undefined} desiredShieldedNodes - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredShieldedNodes = null; - - /** - * ClusterUpdate desiredCostManagementConfig. - * @member {google.container.v1beta1.ICostManagementConfig|null|undefined} desiredCostManagementConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredCostManagementConfig = null; - - /** - * ClusterUpdate desiredMaster. - * @member {google.container.v1beta1.IMaster|null|undefined} desiredMaster - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMaster = null; - - /** - * ClusterUpdate desiredDnsConfig. - * @member {google.container.v1beta1.IDNSConfig|null|undefined} desiredDnsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredDnsConfig = null; - - /** - * ClusterUpdate desiredServiceExternalIpsConfig. - * @member {google.container.v1beta1.IServiceExternalIPsConfig|null|undefined} desiredServiceExternalIpsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredServiceExternalIpsConfig = null; - - /** - * ClusterUpdate desiredAuthenticatorGroupsConfig. - * @member {google.container.v1beta1.IAuthenticatorGroupsConfig|null|undefined} desiredAuthenticatorGroupsConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAuthenticatorGroupsConfig = null; - - /** - * ClusterUpdate desiredLoggingConfig. - * @member {google.container.v1beta1.ILoggingConfig|null|undefined} desiredLoggingConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredLoggingConfig = null; - - /** - * ClusterUpdate desiredMonitoringConfig. - * @member {google.container.v1beta1.IMonitoringConfig|null|undefined} desiredMonitoringConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredMonitoringConfig = null; - - /** - * ClusterUpdate desiredIdentityServiceConfig. - * @member {google.container.v1beta1.IIdentityServiceConfig|null|undefined} desiredIdentityServiceConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredIdentityServiceConfig = null; - - /** - * ClusterUpdate desiredEnablePrivateEndpoint. - * @member {boolean|null|undefined} desiredEnablePrivateEndpoint - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnablePrivateEndpoint = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigNetworkTags. - * @member {google.container.v1beta1.INetworkTags|null|undefined} desiredNodePoolAutoConfigNetworkTags - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigNetworkTags = null; - - /** - * ClusterUpdate desiredProtectConfig. - * @member {google.container.v1beta1.IProtectConfig|null|undefined} desiredProtectConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredProtectConfig = null; - - /** - * ClusterUpdate desiredGatewayApiConfig. - * @member {google.container.v1beta1.IGatewayAPIConfig|null|undefined} desiredGatewayApiConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredGatewayApiConfig = null; - - /** - * ClusterUpdate etag. - * @member {string} etag - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.etag = ""; - - /** - * ClusterUpdate desiredNodePoolLoggingConfig. - * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} desiredNodePoolLoggingConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; - - /** - * ClusterUpdate desiredFleet. - * @member {google.container.v1beta1.IFleet|null|undefined} desiredFleet - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredFleet = null; - - /** - * ClusterUpdate desiredStackType. - * @member {google.container.v1beta1.StackType} desiredStackType - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredStackType = 0; - - /** - * ClusterUpdate additionalPodRangesConfig. - * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} additionalPodRangesConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.additionalPodRangesConfig = null; - - /** - * ClusterUpdate removedAdditionalPodRangesConfig. - * @member {google.container.v1beta1.IAdditionalPodRangesConfig|null|undefined} removedAdditionalPodRangesConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.removedAdditionalPodRangesConfig = null; - - /** - * ClusterUpdate enableK8sBetaApis. - * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.enableK8sBetaApis = null; - - /** - * ClusterUpdate desiredSecurityPostureConfig. - * @member {google.container.v1beta1.ISecurityPostureConfig|null|undefined} desiredSecurityPostureConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredSecurityPostureConfig = null; - - /** - * ClusterUpdate desiredNetworkPerformanceConfig. - * @member {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} desiredNetworkPerformanceConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNetworkPerformanceConfig = null; - - /** - * ClusterUpdate desiredEnableFqdnNetworkPolicy. - * @member {boolean|null|undefined} desiredEnableFqdnNetworkPolicy - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableFqdnNetworkPolicy = null; - - /** - * ClusterUpdate desiredAutopilotWorkloadPolicyConfig. - * @member {google.container.v1beta1.IWorkloadPolicyConfig|null|undefined} desiredAutopilotWorkloadPolicyConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredAutopilotWorkloadPolicyConfig = null; - - /** - * ClusterUpdate desiredK8sBetaApis. - * @member {google.container.v1beta1.IK8sBetaAPIConfig|null|undefined} desiredK8sBetaApis - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredK8sBetaApis = null; - - /** - * ClusterUpdate desiredHostMaintenancePolicy. - * @member {google.container.v1beta1.IHostMaintenancePolicy|null|undefined} desiredHostMaintenancePolicy - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredHostMaintenancePolicy = null; - - /** - * ClusterUpdate desiredContainerdConfig. - * @member {google.container.v1beta1.IContainerdConfig|null|undefined} desiredContainerdConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredContainerdConfig = null; - - /** - * ClusterUpdate desiredEnableMultiNetworking. - * @member {boolean|null|undefined} desiredEnableMultiNetworking - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableMultiNetworking = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags. - * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} desiredNodePoolAutoConfigResourceManagerTags - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigResourceManagerTags = null; - - /** - * ClusterUpdate desiredInTransitEncryptionConfig. - * @member {google.container.v1beta1.InTransitEncryptionConfig|null|undefined} desiredInTransitEncryptionConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredInTransitEncryptionConfig = null; - - /** - * ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. - * @member {boolean|null|undefined} desiredEnableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredEnableCiliumClusterwideNetworkPolicy = null; - - /** - * ClusterUpdate desiredSecretManagerConfig. - * @member {google.container.v1beta1.ISecretManagerConfig|null|undefined} desiredSecretManagerConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredSecretManagerConfig = null; - - /** - * ClusterUpdate desiredNodeKubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} desiredNodeKubeletConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodeKubeletConfig = null; - - /** - * ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} desiredNodePoolAutoConfigKubeletConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - ClusterUpdate.prototype.desiredNodePoolAutoConfigKubeletConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ClusterUpdate _desiredEnablePrivateEndpoint. - * @member {"desiredEnablePrivateEndpoint"|undefined} _desiredEnablePrivateEndpoint - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnablePrivateEndpoint", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnablePrivateEndpoint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredProtectConfig. - * @member {"desiredProtectConfig"|undefined} _desiredProtectConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredProtectConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredProtectConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableFqdnNetworkPolicy. - * @member {"desiredEnableFqdnNetworkPolicy"|undefined} _desiredEnableFqdnNetworkPolicy - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableFqdnNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableFqdnNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableMultiNetworking. - * @member {"desiredEnableMultiNetworking"|undefined} _desiredEnableMultiNetworking - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableMultiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableMultiNetworking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredInTransitEncryptionConfig. - * @member {"desiredInTransitEncryptionConfig"|undefined} _desiredInTransitEncryptionConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredInTransitEncryptionConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredInTransitEncryptionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. - * @member {"desiredEnableCiliumClusterwideNetworkPolicy"|undefined} _desiredEnableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredEnableCiliumClusterwideNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["desiredEnableCiliumClusterwideNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ClusterUpdate _desiredSecretManagerConfig. - * @member {"desiredSecretManagerConfig"|undefined} _desiredSecretManagerConfig - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - */ - Object.defineProperty(ClusterUpdate.prototype, "_desiredSecretManagerConfig", { - get: $util.oneOfGetter($oneOfFields = ["desiredSecretManagerConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ClusterUpdate instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {google.container.v1beta1.IClusterUpdate=} [properties] Properties to set - * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate instance - */ - ClusterUpdate.create = function create(properties) { - return new ClusterUpdate(properties); - }; - - /** - * Encodes the specified ClusterUpdate message. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {google.container.v1beta1.IClusterUpdate} message ClusterUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterUpdate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.desiredNodeVersion != null && Object.hasOwnProperty.call(message, "desiredNodeVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.desiredNodeVersion); - if (message.desiredMonitoringService != null && Object.hasOwnProperty.call(message, "desiredMonitoringService")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.desiredMonitoringService); - if (message.desiredAddonsConfig != null && Object.hasOwnProperty.call(message, "desiredAddonsConfig")) - $root.google.container.v1beta1.AddonsConfig.encode(message.desiredAddonsConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.desiredNodePoolId != null && Object.hasOwnProperty.call(message, "desiredNodePoolId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.desiredNodePoolId); - if (message.desiredImageType != null && Object.hasOwnProperty.call(message, "desiredImageType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.desiredImageType); - if (message.desiredNodePoolAutoscaling != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoscaling")) - $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.desiredNodePoolAutoscaling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.desiredLocations != null && message.desiredLocations.length) - for (var i = 0; i < message.desiredLocations.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.desiredLocations[i]); - if (message.desiredMasterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "desiredMasterAuthorizedNetworksConfig")) - $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.encode(message.desiredMasterAuthorizedNetworksConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.desiredPodSecurityPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredPodSecurityPolicyConfig")) - $root.google.container.v1beta1.PodSecurityPolicyConfig.encode(message.desiredPodSecurityPolicyConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.desiredClusterAutoscaling != null && Object.hasOwnProperty.call(message, "desiredClusterAutoscaling")) - $root.google.container.v1beta1.ClusterAutoscaling.encode(message.desiredClusterAutoscaling, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.desiredBinaryAuthorization != null && Object.hasOwnProperty.call(message, "desiredBinaryAuthorization")) - $root.google.container.v1beta1.BinaryAuthorization.encode(message.desiredBinaryAuthorization, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.desiredLoggingService != null && Object.hasOwnProperty.call(message, "desiredLoggingService")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.desiredLoggingService); - if (message.desiredResourceUsageExportConfig != null && Object.hasOwnProperty.call(message, "desiredResourceUsageExportConfig")) - $root.google.container.v1beta1.ResourceUsageExportConfig.encode(message.desiredResourceUsageExportConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.desiredVerticalPodAutoscaling != null && Object.hasOwnProperty.call(message, "desiredVerticalPodAutoscaling")) - $root.google.container.v1beta1.VerticalPodAutoscaling.encode(message.desiredVerticalPodAutoscaling, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.desiredPrivateClusterConfig != null && Object.hasOwnProperty.call(message, "desiredPrivateClusterConfig")) - $root.google.container.v1beta1.PrivateClusterConfig.encode(message.desiredPrivateClusterConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.desiredIntraNodeVisibilityConfig != null && Object.hasOwnProperty.call(message, "desiredIntraNodeVisibilityConfig")) - $root.google.container.v1beta1.IntraNodeVisibilityConfig.encode(message.desiredIntraNodeVisibilityConfig, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.desiredDefaultSnatStatus != null && Object.hasOwnProperty.call(message, "desiredDefaultSnatStatus")) - $root.google.container.v1beta1.DefaultSnatStatus.encode(message.desiredDefaultSnatStatus, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.desiredClusterTelemetry != null && Object.hasOwnProperty.call(message, "desiredClusterTelemetry")) - $root.google.container.v1beta1.ClusterTelemetry.encode(message.desiredClusterTelemetry, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.desiredReleaseChannel != null && Object.hasOwnProperty.call(message, "desiredReleaseChannel")) - $root.google.container.v1beta1.ReleaseChannel.encode(message.desiredReleaseChannel, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) - $root.google.container.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.desiredTpuConfig != null && Object.hasOwnProperty.call(message, "desiredTpuConfig")) - $root.google.container.v1beta1.TpuConfig.encode(message.desiredTpuConfig, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.desiredL4ilbSubsettingConfig != null && Object.hasOwnProperty.call(message, "desiredL4ilbSubsettingConfig")) - $root.google.container.v1beta1.ILBSubsettingConfig.encode(message.desiredL4ilbSubsettingConfig, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.desiredDatabaseEncryption != null && Object.hasOwnProperty.call(message, "desiredDatabaseEncryption")) - $root.google.container.v1beta1.DatabaseEncryption.encode(message.desiredDatabaseEncryption, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.desiredWorkloadIdentityConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadIdentityConfig")) - $root.google.container.v1beta1.WorkloadIdentityConfig.encode(message.desiredWorkloadIdentityConfig, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.desiredShieldedNodes != null && Object.hasOwnProperty.call(message, "desiredShieldedNodes")) - $root.google.container.v1beta1.ShieldedNodes.encode(message.desiredShieldedNodes, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.desiredCostManagementConfig != null && Object.hasOwnProperty.call(message, "desiredCostManagementConfig")) - $root.google.container.v1beta1.CostManagementConfig.encode(message.desiredCostManagementConfig, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.desiredDatapathProvider != null && Object.hasOwnProperty.call(message, "desiredDatapathProvider")) - writer.uint32(/* id 50, wireType 0 =*/400).int32(message.desiredDatapathProvider); - if (message.desiredPrivateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "desiredPrivateIpv6GoogleAccess")) - writer.uint32(/* id 51, wireType 0 =*/408).int32(message.desiredPrivateIpv6GoogleAccess); - if (message.desiredMaster != null && Object.hasOwnProperty.call(message, "desiredMaster")) - $root.google.container.v1beta1.Master.encode(message.desiredMaster, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.desiredDnsConfig != null && Object.hasOwnProperty.call(message, "desiredDnsConfig")) - $root.google.container.v1beta1.DNSConfig.encode(message.desiredDnsConfig, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.desiredNotificationConfig != null && Object.hasOwnProperty.call(message, "desiredNotificationConfig")) - $root.google.container.v1beta1.NotificationConfig.encode(message.desiredNotificationConfig, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); - if (message.desiredServiceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "desiredServiceExternalIpsConfig")) - $root.google.container.v1beta1.ServiceExternalIPsConfig.encode(message.desiredServiceExternalIpsConfig, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); - if (message.desiredWorkloadCertificates != null && Object.hasOwnProperty.call(message, "desiredWorkloadCertificates")) - $root.google.container.v1beta1.WorkloadCertificates.encode(message.desiredWorkloadCertificates, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim(); - if (message.desiredWorkloadAltsConfig != null && Object.hasOwnProperty.call(message, "desiredWorkloadAltsConfig")) - $root.google.container.v1beta1.WorkloadALTSConfig.encode(message.desiredWorkloadAltsConfig, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); - if (message.desiredAuthenticatorGroupsConfig != null && Object.hasOwnProperty.call(message, "desiredAuthenticatorGroupsConfig")) - $root.google.container.v1beta1.AuthenticatorGroupsConfig.encode(message.desiredAuthenticatorGroupsConfig, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); - if (message.desiredLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredLoggingConfig")) - $root.google.container.v1beta1.LoggingConfig.encode(message.desiredLoggingConfig, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); - if (message.desiredMonitoringConfig != null && Object.hasOwnProperty.call(message, "desiredMonitoringConfig")) - $root.google.container.v1beta1.MonitoringConfig.encode(message.desiredMonitoringConfig, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); - if (message.desiredIdentityServiceConfig != null && Object.hasOwnProperty.call(message, "desiredIdentityServiceConfig")) - $root.google.container.v1beta1.IdentityServiceConfig.encode(message.desiredIdentityServiceConfig, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim(); - if (message.desiredMeshCertificates != null && Object.hasOwnProperty.call(message, "desiredMeshCertificates")) - $root.google.container.v1beta1.MeshCertificates.encode(message.desiredMeshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.desiredEnablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "desiredEnablePrivateEndpoint")) - writer.uint32(/* id 71, wireType 0 =*/568).bool(message.desiredEnablePrivateEndpoint); - if (message.desiredMasterVersion != null && Object.hasOwnProperty.call(message, "desiredMasterVersion")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.desiredMasterVersion); - if (message.desiredGcfsConfig != null && Object.hasOwnProperty.call(message, "desiredGcfsConfig")) - $root.google.container.v1beta1.GcfsConfig.encode(message.desiredGcfsConfig, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.desiredNodePoolAutoConfigNetworkTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigNetworkTags")) - $root.google.container.v1beta1.NetworkTags.encode(message.desiredNodePoolAutoConfigNetworkTags, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); - if (message.desiredProtectConfig != null && Object.hasOwnProperty.call(message, "desiredProtectConfig")) - $root.google.container.v1beta1.ProtectConfig.encode(message.desiredProtectConfig, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); - if (message.desiredGatewayApiConfig != null && Object.hasOwnProperty.call(message, "desiredGatewayApiConfig")) - $root.google.container.v1beta1.GatewayAPIConfig.encode(message.desiredGatewayApiConfig, writer.uint32(/* id 114, wireType 2 =*/914).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); - if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) - $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); - if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) - $root.google.container.v1beta1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); - if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) - writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); - if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) - $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); - if (message.removedAdditionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "removedAdditionalPodRangesConfig")) - $root.google.container.v1beta1.AdditionalPodRangesConfig.encode(message.removedAdditionalPodRangesConfig, writer.uint32(/* id 121, wireType 2 =*/970).fork()).ldelim(); - if (message.enableK8sBetaApis != null && Object.hasOwnProperty.call(message, "enableK8sBetaApis")) - $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 122, wireType 2 =*/978).fork()).ldelim(); - if (message.desiredSecurityPostureConfig != null && Object.hasOwnProperty.call(message, "desiredSecurityPostureConfig")) - $root.google.container.v1beta1.SecurityPostureConfig.encode(message.desiredSecurityPostureConfig, writer.uint32(/* id 124, wireType 2 =*/994).fork()).ldelim(); - if (message.desiredNetworkPerformanceConfig != null && Object.hasOwnProperty.call(message, "desiredNetworkPerformanceConfig")) - $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.desiredNetworkPerformanceConfig, writer.uint32(/* id 125, wireType 2 =*/1002).fork()).ldelim(); - if (message.desiredEnableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableFqdnNetworkPolicy")) - writer.uint32(/* id 126, wireType 0 =*/1008).bool(message.desiredEnableFqdnNetworkPolicy); - if (message.desiredAutopilotWorkloadPolicyConfig != null && Object.hasOwnProperty.call(message, "desiredAutopilotWorkloadPolicyConfig")) - $root.google.container.v1beta1.WorkloadPolicyConfig.encode(message.desiredAutopilotWorkloadPolicyConfig, writer.uint32(/* id 128, wireType 2 =*/1026).fork()).ldelim(); - if (message.desiredK8sBetaApis != null && Object.hasOwnProperty.call(message, "desiredK8sBetaApis")) - $root.google.container.v1beta1.K8sBetaAPIConfig.encode(message.desiredK8sBetaApis, writer.uint32(/* id 131, wireType 2 =*/1050).fork()).ldelim(); - if (message.desiredHostMaintenancePolicy != null && Object.hasOwnProperty.call(message, "desiredHostMaintenancePolicy")) - $root.google.container.v1beta1.HostMaintenancePolicy.encode(message.desiredHostMaintenancePolicy, writer.uint32(/* id 132, wireType 2 =*/1058).fork()).ldelim(); - if (message.desiredContainerdConfig != null && Object.hasOwnProperty.call(message, "desiredContainerdConfig")) - $root.google.container.v1beta1.ContainerdConfig.encode(message.desiredContainerdConfig, writer.uint32(/* id 134, wireType 2 =*/1074).fork()).ldelim(); - if (message.desiredEnableMultiNetworking != null && Object.hasOwnProperty.call(message, "desiredEnableMultiNetworking")) - writer.uint32(/* id 135, wireType 0 =*/1080).bool(message.desiredEnableMultiNetworking); - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigResourceManagerTags")) - $root.google.container.v1beta1.ResourceManagerTags.encode(message.desiredNodePoolAutoConfigResourceManagerTags, writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); - if (message.desiredInTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "desiredInTransitEncryptionConfig")) - writer.uint32(/* id 137, wireType 0 =*/1096).int32(message.desiredInTransitEncryptionConfig); - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableCiliumClusterwideNetworkPolicy")) - writer.uint32(/* id 138, wireType 0 =*/1104).bool(message.desiredEnableCiliumClusterwideNetworkPolicy); - if (message.desiredSecretManagerConfig != null && Object.hasOwnProperty.call(message, "desiredSecretManagerConfig")) - $root.google.container.v1beta1.SecretManagerConfig.encode(message.desiredSecretManagerConfig, writer.uint32(/* id 139, wireType 2 =*/1114).fork()).ldelim(); - if (message.desiredNodeKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodeKubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.desiredNodeKubeletConfig, writer.uint32(/* id 141, wireType 2 =*/1130).fork()).ldelim(); - if (message.desiredNodePoolAutoConfigKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigKubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.desiredNodePoolAutoConfigKubeletConfig, writer.uint32(/* id 142, wireType 2 =*/1138).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClusterUpdate message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterUpdate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {google.container.v1beta1.IClusterUpdate} message ClusterUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterUpdate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterUpdate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.desiredNodeVersion = reader.string(); - break; - } - case 5: { - message.desiredMonitoringService = reader.string(); - break; - } - case 6: { - message.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.desiredNodePoolId = reader.string(); - break; - } - case 8: { - message.desiredImageType = reader.string(); - break; - } - case 9: { - message.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.desiredLocations && message.desiredLocations.length)) - message.desiredLocations = []; - message.desiredLocations.push(reader.string()); - break; - } - case 12: { - message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - message.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.decode(reader, reader.uint32()); - break; - } - case 16: { - message.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.decode(reader, reader.uint32()); - break; - } - case 19: { - message.desiredLoggingService = reader.string(); - break; - } - case 21: { - message.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.decode(reader, reader.uint32()); - break; - } - case 25: { - message.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 26: { - message.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.decode(reader, reader.uint32()); - break; - } - case 28: { - message.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.decode(reader, reader.uint32()); - break; - } - case 30: { - message.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.decode(reader, reader.uint32()); - break; - } - case 31: { - message.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 37: { - message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 38: { - message.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.decode(reader, reader.uint32()); - break; - } - case 39: { - message.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.decode(reader, reader.uint32()); - break; - } - case 50: { - message.desiredDatapathProvider = reader.int32(); - break; - } - case 51: { - message.desiredPrivateIpv6GoogleAccess = reader.int32(); - break; - } - case 55: { - message.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.desiredMasterVersion = reader.string(); - break; - } - case 109: { - message.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 46: { - message.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 47: { - message.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.decode(reader, reader.uint32()); - break; - } - case 61: { - message.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.decode(reader, reader.uint32()); - break; - } - case 67: { - message.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.decode(reader, reader.uint32()); - break; - } - case 62: { - message.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.decode(reader, reader.uint32()); - break; - } - case 48: { - message.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.decode(reader, reader.uint32()); - break; - } - case 49: { - message.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.decode(reader, reader.uint32()); - break; - } - case 52: { - message.desiredMaster = $root.google.container.v1beta1.Master.decode(reader, reader.uint32()); - break; - } - case 53: { - message.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.decode(reader, reader.uint32()); - break; - } - case 60: { - message.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); - break; - } - case 63: { - message.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.decode(reader, reader.uint32()); - break; - } - case 64: { - message.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.decode(reader, reader.uint32()); - break; - } - case 65: { - message.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.decode(reader, reader.uint32()); - break; - } - case 66: { - message.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.decode(reader, reader.uint32()); - break; - } - case 71: { - message.desiredEnablePrivateEndpoint = reader.bool(); - break; - } - case 110: { - message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 112: { - message.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.decode(reader, reader.uint32()); - break; - } - case 114: { - message.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.decode(reader, reader.uint32()); - break; - } - case 115: { - message.etag = reader.string(); - break; - } - case 116: { - message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 117: { - message.desiredFleet = $root.google.container.v1beta1.Fleet.decode(reader, reader.uint32()); - break; - } - case 119: { - message.desiredStackType = reader.int32(); - break; - } - case 120: { - message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 121: { - message.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.decode(reader, reader.uint32()); - break; - } - case 122: { - message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 124: { - message.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.decode(reader, reader.uint32()); - break; - } - case 125: { - message.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 126: { - message.desiredEnableFqdnNetworkPolicy = reader.bool(); - break; - } - case 128: { - message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 131: { - message.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.decode(reader, reader.uint32()); - break; - } - case 132: { - message.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 134: { - message.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 135: { - message.desiredEnableMultiNetworking = reader.bool(); - break; - } - case 136: { - message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 137: { - message.desiredInTransitEncryptionConfig = reader.int32(); - break; - } - case 138: { - message.desiredEnableCiliumClusterwideNetworkPolicy = reader.bool(); - break; - } - case 139: { - message.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.decode(reader, reader.uint32()); - break; - } - case 141: { - message.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 142: { - message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterUpdate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterUpdate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterUpdate message. - * @function verify - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterUpdate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) - if (!$util.isString(message.desiredNodeVersion)) - return "desiredNodeVersion: string expected"; - if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) - if (!$util.isString(message.desiredMonitoringService)) - return "desiredMonitoringService: string expected"; - if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) { - var error = $root.google.container.v1beta1.AddonsConfig.verify(message.desiredAddonsConfig); - if (error) - return "desiredAddonsConfig." + error; - } - if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) - if (!$util.isString(message.desiredNodePoolId)) - return "desiredNodePoolId: string expected"; - if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) - if (!$util.isString(message.desiredImageType)) - return "desiredImageType: string expected"; - if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) { - var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.desiredNodePoolAutoscaling); - if (error) - return "desiredNodePoolAutoscaling." + error; - } - if (message.desiredLocations != null && message.hasOwnProperty("desiredLocations")) { - if (!Array.isArray(message.desiredLocations)) - return "desiredLocations: array expected"; - for (var i = 0; i < message.desiredLocations.length; ++i) - if (!$util.isString(message.desiredLocations[i])) - return "desiredLocations: string[] expected"; - } - if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) { - var error = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.verify(message.desiredMasterAuthorizedNetworksConfig); - if (error) - return "desiredMasterAuthorizedNetworksConfig." + error; - } - if (message.desiredPodSecurityPolicyConfig != null && message.hasOwnProperty("desiredPodSecurityPolicyConfig")) { - var error = $root.google.container.v1beta1.PodSecurityPolicyConfig.verify(message.desiredPodSecurityPolicyConfig); - if (error) - return "desiredPodSecurityPolicyConfig." + error; - } - if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) { - var error = $root.google.container.v1beta1.ClusterAutoscaling.verify(message.desiredClusterAutoscaling); - if (error) - return "desiredClusterAutoscaling." + error; - } - if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) { - var error = $root.google.container.v1beta1.BinaryAuthorization.verify(message.desiredBinaryAuthorization); - if (error) - return "desiredBinaryAuthorization." + error; - } - if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) - if (!$util.isString(message.desiredLoggingService)) - return "desiredLoggingService: string expected"; - if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) { - var error = $root.google.container.v1beta1.ResourceUsageExportConfig.verify(message.desiredResourceUsageExportConfig); - if (error) - return "desiredResourceUsageExportConfig." + error; - } - if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) { - var error = $root.google.container.v1beta1.VerticalPodAutoscaling.verify(message.desiredVerticalPodAutoscaling); - if (error) - return "desiredVerticalPodAutoscaling." + error; - } - if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) { - var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.desiredPrivateClusterConfig); - if (error) - return "desiredPrivateClusterConfig." + error; - } - if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) { - var error = $root.google.container.v1beta1.IntraNodeVisibilityConfig.verify(message.desiredIntraNodeVisibilityConfig); - if (error) - return "desiredIntraNodeVisibilityConfig." + error; - } - if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) { - var error = $root.google.container.v1beta1.DefaultSnatStatus.verify(message.desiredDefaultSnatStatus); - if (error) - return "desiredDefaultSnatStatus." + error; - } - if (message.desiredClusterTelemetry != null && message.hasOwnProperty("desiredClusterTelemetry")) { - var error = $root.google.container.v1beta1.ClusterTelemetry.verify(message.desiredClusterTelemetry); - if (error) - return "desiredClusterTelemetry." + error; - } - if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) { - var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.desiredReleaseChannel); - if (error) - return "desiredReleaseChannel." + error; - } - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { - var error = $root.google.container.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); - if (error) - return "privateClusterConfig." + error; - } - if (message.desiredTpuConfig != null && message.hasOwnProperty("desiredTpuConfig")) { - var error = $root.google.container.v1beta1.TpuConfig.verify(message.desiredTpuConfig); - if (error) - return "desiredTpuConfig." + error; - } - if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) { - var error = $root.google.container.v1beta1.ILBSubsettingConfig.verify(message.desiredL4ilbSubsettingConfig); - if (error) - return "desiredL4ilbSubsettingConfig." + error; - } - if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) - switch (message.desiredDatapathProvider) { - default: - return "desiredDatapathProvider: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) - switch (message.desiredPrivateIpv6GoogleAccess) { - default: - return "desiredPrivateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) { - var error = $root.google.container.v1beta1.NotificationConfig.verify(message.desiredNotificationConfig); - if (error) - return "desiredNotificationConfig." + error; - } - if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) - if (!$util.isString(message.desiredMasterVersion)) - return "desiredMasterVersion: string expected"; - if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) { - var error = $root.google.container.v1beta1.GcfsConfig.verify(message.desiredGcfsConfig); - if (error) - return "desiredGcfsConfig." + error; - } - if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) { - var error = $root.google.container.v1beta1.DatabaseEncryption.verify(message.desiredDatabaseEncryption); - if (error) - return "desiredDatabaseEncryption." + error; - } - if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) { - var error = $root.google.container.v1beta1.WorkloadIdentityConfig.verify(message.desiredWorkloadIdentityConfig); - if (error) - return "desiredWorkloadIdentityConfig." + error; - } - if (message.desiredWorkloadCertificates != null && message.hasOwnProperty("desiredWorkloadCertificates")) { - var error = $root.google.container.v1beta1.WorkloadCertificates.verify(message.desiredWorkloadCertificates); - if (error) - return "desiredWorkloadCertificates." + error; - } - if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) { - var error = $root.google.container.v1beta1.MeshCertificates.verify(message.desiredMeshCertificates); - if (error) - return "desiredMeshCertificates." + error; - } - if (message.desiredWorkloadAltsConfig != null && message.hasOwnProperty("desiredWorkloadAltsConfig")) { - var error = $root.google.container.v1beta1.WorkloadALTSConfig.verify(message.desiredWorkloadAltsConfig); - if (error) - return "desiredWorkloadAltsConfig." + error; - } - if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) { - var error = $root.google.container.v1beta1.ShieldedNodes.verify(message.desiredShieldedNodes); - if (error) - return "desiredShieldedNodes." + error; - } - if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) { - var error = $root.google.container.v1beta1.CostManagementConfig.verify(message.desiredCostManagementConfig); - if (error) - return "desiredCostManagementConfig." + error; - } - if (message.desiredMaster != null && message.hasOwnProperty("desiredMaster")) { - var error = $root.google.container.v1beta1.Master.verify(message.desiredMaster); - if (error) - return "desiredMaster." + error; - } - if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) { - var error = $root.google.container.v1beta1.DNSConfig.verify(message.desiredDnsConfig); - if (error) - return "desiredDnsConfig." + error; - } - if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) { - var error = $root.google.container.v1beta1.ServiceExternalIPsConfig.verify(message.desiredServiceExternalIpsConfig); - if (error) - return "desiredServiceExternalIpsConfig." + error; - } - if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) { - var error = $root.google.container.v1beta1.AuthenticatorGroupsConfig.verify(message.desiredAuthenticatorGroupsConfig); - if (error) - return "desiredAuthenticatorGroupsConfig." + error; - } - if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) { - var error = $root.google.container.v1beta1.LoggingConfig.verify(message.desiredLoggingConfig); - if (error) - return "desiredLoggingConfig." + error; - } - if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) { - var error = $root.google.container.v1beta1.MonitoringConfig.verify(message.desiredMonitoringConfig); - if (error) - return "desiredMonitoringConfig." + error; - } - if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) { - var error = $root.google.container.v1beta1.IdentityServiceConfig.verify(message.desiredIdentityServiceConfig); - if (error) - return "desiredIdentityServiceConfig." + error; - } - if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { - properties._desiredEnablePrivateEndpoint = 1; - if (typeof message.desiredEnablePrivateEndpoint !== "boolean") - return "desiredEnablePrivateEndpoint: boolean expected"; - } - if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) { - var error = $root.google.container.v1beta1.NetworkTags.verify(message.desiredNodePoolAutoConfigNetworkTags); - if (error) - return "desiredNodePoolAutoConfigNetworkTags." + error; - } - if (message.desiredProtectConfig != null && message.hasOwnProperty("desiredProtectConfig")) { - properties._desiredProtectConfig = 1; - { - var error = $root.google.container.v1beta1.ProtectConfig.verify(message.desiredProtectConfig); - if (error) - return "desiredProtectConfig." + error; - } - } - if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) { - var error = $root.google.container.v1beta1.GatewayAPIConfig.verify(message.desiredGatewayApiConfig); - if (error) - return "desiredGatewayApiConfig." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) { - var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.desiredNodePoolLoggingConfig); - if (error) - return "desiredNodePoolLoggingConfig." + error; - } - if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { - var error = $root.google.container.v1beta1.Fleet.verify(message.desiredFleet); - if (error) - return "desiredFleet." + error; - } - if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) - switch (message.desiredStackType) { - default: - return "desiredStackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) { - var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.additionalPodRangesConfig); - if (error) - return "additionalPodRangesConfig." + error; - } - if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) { - var error = $root.google.container.v1beta1.AdditionalPodRangesConfig.verify(message.removedAdditionalPodRangesConfig); - if (error) - return "removedAdditionalPodRangesConfig." + error; - } - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { - var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); - if (error) - return "enableK8sBetaApis." + error; - } - if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) { - var error = $root.google.container.v1beta1.SecurityPostureConfig.verify(message.desiredSecurityPostureConfig); - if (error) - return "desiredSecurityPostureConfig." + error; - } - if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) { - var error = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.desiredNetworkPerformanceConfig); - if (error) - return "desiredNetworkPerformanceConfig." + error; - } - if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { - properties._desiredEnableFqdnNetworkPolicy = 1; - if (typeof message.desiredEnableFqdnNetworkPolicy !== "boolean") - return "desiredEnableFqdnNetworkPolicy: boolean expected"; - } - if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) { - var error = $root.google.container.v1beta1.WorkloadPolicyConfig.verify(message.desiredAutopilotWorkloadPolicyConfig); - if (error) - return "desiredAutopilotWorkloadPolicyConfig." + error; - } - if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) { - var error = $root.google.container.v1beta1.K8sBetaAPIConfig.verify(message.desiredK8sBetaApis); - if (error) - return "desiredK8sBetaApis." + error; - } - if (message.desiredHostMaintenancePolicy != null && message.hasOwnProperty("desiredHostMaintenancePolicy")) { - var error = $root.google.container.v1beta1.HostMaintenancePolicy.verify(message.desiredHostMaintenancePolicy); - if (error) - return "desiredHostMaintenancePolicy." + error; - } - if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) { - var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.desiredContainerdConfig); - if (error) - return "desiredContainerdConfig." + error; - } - if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { - properties._desiredEnableMultiNetworking = 1; - if (typeof message.desiredEnableMultiNetworking !== "boolean") - return "desiredEnableMultiNetworking: boolean expected"; - } - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) { - var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.desiredNodePoolAutoConfigResourceManagerTags); - if (error) - return "desiredNodePoolAutoConfigResourceManagerTags." + error; - } - if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { - properties._desiredInTransitEncryptionConfig = 1; - switch (message.desiredInTransitEncryptionConfig) { - default: - return "desiredInTransitEncryptionConfig: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { - properties._desiredEnableCiliumClusterwideNetworkPolicy = 1; - if (typeof message.desiredEnableCiliumClusterwideNetworkPolicy !== "boolean") - return "desiredEnableCiliumClusterwideNetworkPolicy: boolean expected"; - } - if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { - properties._desiredSecretManagerConfig = 1; - { - var error = $root.google.container.v1beta1.SecretManagerConfig.verify(message.desiredSecretManagerConfig); - if (error) - return "desiredSecretManagerConfig." + error; - } - } - if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.desiredNodeKubeletConfig); - if (error) - return "desiredNodeKubeletConfig." + error; - } - if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.desiredNodePoolAutoConfigKubeletConfig); - if (error) - return "desiredNodePoolAutoConfigKubeletConfig." + error; - } - return null; - }; - - /** - * Creates a ClusterUpdate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ClusterUpdate} ClusterUpdate - */ - ClusterUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ClusterUpdate) - return object; - var message = new $root.google.container.v1beta1.ClusterUpdate(); - if (object.desiredNodeVersion != null) - message.desiredNodeVersion = String(object.desiredNodeVersion); - if (object.desiredMonitoringService != null) - message.desiredMonitoringService = String(object.desiredMonitoringService); - if (object.desiredAddonsConfig != null) { - if (typeof object.desiredAddonsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAddonsConfig: object expected"); - message.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.desiredAddonsConfig); - } - if (object.desiredNodePoolId != null) - message.desiredNodePoolId = String(object.desiredNodePoolId); - if (object.desiredImageType != null) - message.desiredImageType = String(object.desiredImageType); - if (object.desiredNodePoolAutoscaling != null) { - if (typeof object.desiredNodePoolAutoscaling !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoscaling: object expected"); - message.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.desiredNodePoolAutoscaling); - } - if (object.desiredLocations) { - if (!Array.isArray(object.desiredLocations)) - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredLocations: array expected"); - message.desiredLocations = []; - for (var i = 0; i < object.desiredLocations.length; ++i) - message.desiredLocations[i] = String(object.desiredLocations[i]); - } - if (object.desiredMasterAuthorizedNetworksConfig != null) { - if (typeof object.desiredMasterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMasterAuthorizedNetworksConfig: object expected"); - message.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.desiredMasterAuthorizedNetworksConfig); - } - if (object.desiredPodSecurityPolicyConfig != null) { - if (typeof object.desiredPodSecurityPolicyConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredPodSecurityPolicyConfig: object expected"); - message.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.fromObject(object.desiredPodSecurityPolicyConfig); - } - if (object.desiredClusterAutoscaling != null) { - if (typeof object.desiredClusterAutoscaling !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredClusterAutoscaling: object expected"); - message.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.fromObject(object.desiredClusterAutoscaling); - } - if (object.desiredBinaryAuthorization != null) { - if (typeof object.desiredBinaryAuthorization !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredBinaryAuthorization: object expected"); - message.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.fromObject(object.desiredBinaryAuthorization); - } - if (object.desiredLoggingService != null) - message.desiredLoggingService = String(object.desiredLoggingService); - if (object.desiredResourceUsageExportConfig != null) { - if (typeof object.desiredResourceUsageExportConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredResourceUsageExportConfig: object expected"); - message.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.fromObject(object.desiredResourceUsageExportConfig); - } - if (object.desiredVerticalPodAutoscaling != null) { - if (typeof object.desiredVerticalPodAutoscaling !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredVerticalPodAutoscaling: object expected"); - message.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.fromObject(object.desiredVerticalPodAutoscaling); - } - if (object.desiredPrivateClusterConfig != null) { - if (typeof object.desiredPrivateClusterConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredPrivateClusterConfig: object expected"); - message.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.desiredPrivateClusterConfig); - } - if (object.desiredIntraNodeVisibilityConfig != null) { - if (typeof object.desiredIntraNodeVisibilityConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredIntraNodeVisibilityConfig: object expected"); - message.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.fromObject(object.desiredIntraNodeVisibilityConfig); - } - if (object.desiredDefaultSnatStatus != null) { - if (typeof object.desiredDefaultSnatStatus !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDefaultSnatStatus: object expected"); - message.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.fromObject(object.desiredDefaultSnatStatus); - } - if (object.desiredClusterTelemetry != null) { - if (typeof object.desiredClusterTelemetry !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredClusterTelemetry: object expected"); - message.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.fromObject(object.desiredClusterTelemetry); - } - if (object.desiredReleaseChannel != null) { - if (typeof object.desiredReleaseChannel !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredReleaseChannel: object expected"); - message.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.desiredReleaseChannel); - } - if (object.privateClusterConfig != null) { - if (typeof object.privateClusterConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.privateClusterConfig: object expected"); - message.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); - } - if (object.desiredTpuConfig != null) { - if (typeof object.desiredTpuConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredTpuConfig: object expected"); - message.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.fromObject(object.desiredTpuConfig); - } - if (object.desiredL4ilbSubsettingConfig != null) { - if (typeof object.desiredL4ilbSubsettingConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredL4ilbSubsettingConfig: object expected"); - message.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.fromObject(object.desiredL4ilbSubsettingConfig); - } - switch (object.desiredDatapathProvider) { - default: - if (typeof object.desiredDatapathProvider === "number") { - message.desiredDatapathProvider = object.desiredDatapathProvider; - break; - } - break; - case "DATAPATH_PROVIDER_UNSPECIFIED": - case 0: - message.desiredDatapathProvider = 0; - break; - case "LEGACY_DATAPATH": - case 1: - message.desiredDatapathProvider = 1; - break; - case "ADVANCED_DATAPATH": - case 2: - message.desiredDatapathProvider = 2; - break; - } - switch (object.desiredPrivateIpv6GoogleAccess) { - default: - if (typeof object.desiredPrivateIpv6GoogleAccess === "number") { - message.desiredPrivateIpv6GoogleAccess = object.desiredPrivateIpv6GoogleAccess; - break; - } - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.desiredPrivateIpv6GoogleAccess = 0; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": - case 1: - message.desiredPrivateIpv6GoogleAccess = 1; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": - case 2: - message.desiredPrivateIpv6GoogleAccess = 2; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": - case 3: - message.desiredPrivateIpv6GoogleAccess = 3; - break; - } - if (object.desiredNotificationConfig != null) { - if (typeof object.desiredNotificationConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNotificationConfig: object expected"); - message.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.fromObject(object.desiredNotificationConfig); - } - if (object.desiredMasterVersion != null) - message.desiredMasterVersion = String(object.desiredMasterVersion); - if (object.desiredGcfsConfig != null) { - if (typeof object.desiredGcfsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredGcfsConfig: object expected"); - message.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.desiredGcfsConfig); - } - if (object.desiredDatabaseEncryption != null) { - if (typeof object.desiredDatabaseEncryption !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDatabaseEncryption: object expected"); - message.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.fromObject(object.desiredDatabaseEncryption); - } - if (object.desiredWorkloadIdentityConfig != null) { - if (typeof object.desiredWorkloadIdentityConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadIdentityConfig: object expected"); - message.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.fromObject(object.desiredWorkloadIdentityConfig); - } - if (object.desiredWorkloadCertificates != null) { - if (typeof object.desiredWorkloadCertificates !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadCertificates: object expected"); - message.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.fromObject(object.desiredWorkloadCertificates); - } - if (object.desiredMeshCertificates != null) { - if (typeof object.desiredMeshCertificates !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMeshCertificates: object expected"); - message.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.fromObject(object.desiredMeshCertificates); - } - if (object.desiredWorkloadAltsConfig != null) { - if (typeof object.desiredWorkloadAltsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredWorkloadAltsConfig: object expected"); - message.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.fromObject(object.desiredWorkloadAltsConfig); - } - if (object.desiredShieldedNodes != null) { - if (typeof object.desiredShieldedNodes !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredShieldedNodes: object expected"); - message.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.fromObject(object.desiredShieldedNodes); - } - if (object.desiredCostManagementConfig != null) { - if (typeof object.desiredCostManagementConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredCostManagementConfig: object expected"); - message.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.fromObject(object.desiredCostManagementConfig); - } - if (object.desiredMaster != null) { - if (typeof object.desiredMaster !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMaster: object expected"); - message.desiredMaster = $root.google.container.v1beta1.Master.fromObject(object.desiredMaster); - } - if (object.desiredDnsConfig != null) { - if (typeof object.desiredDnsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredDnsConfig: object expected"); - message.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.fromObject(object.desiredDnsConfig); - } - if (object.desiredServiceExternalIpsConfig != null) { - if (typeof object.desiredServiceExternalIpsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredServiceExternalIpsConfig: object expected"); - message.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.fromObject(object.desiredServiceExternalIpsConfig); - } - if (object.desiredAuthenticatorGroupsConfig != null) { - if (typeof object.desiredAuthenticatorGroupsConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAuthenticatorGroupsConfig: object expected"); - message.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.fromObject(object.desiredAuthenticatorGroupsConfig); - } - if (object.desiredLoggingConfig != null) { - if (typeof object.desiredLoggingConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredLoggingConfig: object expected"); - message.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.fromObject(object.desiredLoggingConfig); - } - if (object.desiredMonitoringConfig != null) { - if (typeof object.desiredMonitoringConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredMonitoringConfig: object expected"); - message.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.fromObject(object.desiredMonitoringConfig); - } - if (object.desiredIdentityServiceConfig != null) { - if (typeof object.desiredIdentityServiceConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredIdentityServiceConfig: object expected"); - message.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.fromObject(object.desiredIdentityServiceConfig); - } - if (object.desiredEnablePrivateEndpoint != null) - message.desiredEnablePrivateEndpoint = Boolean(object.desiredEnablePrivateEndpoint); - if (object.desiredNodePoolAutoConfigNetworkTags != null) { - if (typeof object.desiredNodePoolAutoConfigNetworkTags !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigNetworkTags: object expected"); - message.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.fromObject(object.desiredNodePoolAutoConfigNetworkTags); - } - if (object.desiredProtectConfig != null) { - if (typeof object.desiredProtectConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredProtectConfig: object expected"); - message.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.fromObject(object.desiredProtectConfig); - } - if (object.desiredGatewayApiConfig != null) { - if (typeof object.desiredGatewayApiConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredGatewayApiConfig: object expected"); - message.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.fromObject(object.desiredGatewayApiConfig); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.desiredNodePoolLoggingConfig != null) { - if (typeof object.desiredNodePoolLoggingConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); - message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); - } - if (object.desiredFleet != null) { - if (typeof object.desiredFleet !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredFleet: object expected"); - message.desiredFleet = $root.google.container.v1beta1.Fleet.fromObject(object.desiredFleet); - } - switch (object.desiredStackType) { - default: - if (typeof object.desiredStackType === "number") { - message.desiredStackType = object.desiredStackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.desiredStackType = 0; - break; - case "IPV4": - case 1: - message.desiredStackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.desiredStackType = 2; - break; - } - if (object.additionalPodRangesConfig != null) { - if (typeof object.additionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.additionalPodRangesConfig: object expected"); - message.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.additionalPodRangesConfig); - } - if (object.removedAdditionalPodRangesConfig != null) { - if (typeof object.removedAdditionalPodRangesConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.removedAdditionalPodRangesConfig: object expected"); - message.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.fromObject(object.removedAdditionalPodRangesConfig); - } - if (object.enableK8sBetaApis != null) { - if (typeof object.enableK8sBetaApis !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.enableK8sBetaApis: object expected"); - message.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.enableK8sBetaApis); - } - if (object.desiredSecurityPostureConfig != null) { - if (typeof object.desiredSecurityPostureConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredSecurityPostureConfig: object expected"); - message.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.fromObject(object.desiredSecurityPostureConfig); - } - if (object.desiredNetworkPerformanceConfig != null) { - if (typeof object.desiredNetworkPerformanceConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNetworkPerformanceConfig: object expected"); - message.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.desiredNetworkPerformanceConfig); - } - if (object.desiredEnableFqdnNetworkPolicy != null) - message.desiredEnableFqdnNetworkPolicy = Boolean(object.desiredEnableFqdnNetworkPolicy); - if (object.desiredAutopilotWorkloadPolicyConfig != null) { - if (typeof object.desiredAutopilotWorkloadPolicyConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredAutopilotWorkloadPolicyConfig: object expected"); - message.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.fromObject(object.desiredAutopilotWorkloadPolicyConfig); - } - if (object.desiredK8sBetaApis != null) { - if (typeof object.desiredK8sBetaApis !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredK8sBetaApis: object expected"); - message.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.fromObject(object.desiredK8sBetaApis); - } - if (object.desiredHostMaintenancePolicy != null) { - if (typeof object.desiredHostMaintenancePolicy !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredHostMaintenancePolicy: object expected"); - message.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.fromObject(object.desiredHostMaintenancePolicy); - } - if (object.desiredContainerdConfig != null) { - if (typeof object.desiredContainerdConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredContainerdConfig: object expected"); - message.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.desiredContainerdConfig); - } - if (object.desiredEnableMultiNetworking != null) - message.desiredEnableMultiNetworking = Boolean(object.desiredEnableMultiNetworking); - if (object.desiredNodePoolAutoConfigResourceManagerTags != null) { - if (typeof object.desiredNodePoolAutoConfigResourceManagerTags !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigResourceManagerTags: object expected"); - message.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.desiredNodePoolAutoConfigResourceManagerTags); - } - switch (object.desiredInTransitEncryptionConfig) { - default: - if (typeof object.desiredInTransitEncryptionConfig === "number") { - message.desiredInTransitEncryptionConfig = object.desiredInTransitEncryptionConfig; - break; - } - break; - case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": - case 0: - message.desiredInTransitEncryptionConfig = 0; - break; - case "IN_TRANSIT_ENCRYPTION_DISABLED": - case 1: - message.desiredInTransitEncryptionConfig = 1; - break; - case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": - case 2: - message.desiredInTransitEncryptionConfig = 2; - break; - } - if (object.desiredEnableCiliumClusterwideNetworkPolicy != null) - message.desiredEnableCiliumClusterwideNetworkPolicy = Boolean(object.desiredEnableCiliumClusterwideNetworkPolicy); - if (object.desiredSecretManagerConfig != null) { - if (typeof object.desiredSecretManagerConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredSecretManagerConfig: object expected"); - message.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.fromObject(object.desiredSecretManagerConfig); - } - if (object.desiredNodeKubeletConfig != null) { - if (typeof object.desiredNodeKubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodeKubeletConfig: object expected"); - message.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.desiredNodeKubeletConfig); - } - if (object.desiredNodePoolAutoConfigKubeletConfig != null) { - if (typeof object.desiredNodePoolAutoConfigKubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolAutoConfigKubeletConfig: object expected"); - message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.desiredNodePoolAutoConfigKubeletConfig); - } - return message; - }; - - /** - * Creates a plain object from a ClusterUpdate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {google.container.v1beta1.ClusterUpdate} message ClusterUpdate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterUpdate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.desiredLocations = []; - if (options.defaults) { - object.desiredNodeVersion = ""; - object.desiredMonitoringService = ""; - object.desiredAddonsConfig = null; - object.desiredNodePoolId = ""; - object.desiredImageType = ""; - object.desiredNodePoolAutoscaling = null; - object.desiredMasterAuthorizedNetworksConfig = null; - object.desiredPodSecurityPolicyConfig = null; - object.desiredClusterAutoscaling = null; - object.desiredBinaryAuthorization = null; - object.desiredLoggingService = ""; - object.desiredResourceUsageExportConfig = null; - object.desiredVerticalPodAutoscaling = null; - object.desiredPrivateClusterConfig = null; - object.desiredIntraNodeVisibilityConfig = null; - object.desiredDefaultSnatStatus = null; - object.desiredClusterTelemetry = null; - object.desiredReleaseChannel = null; - object.privateClusterConfig = null; - object.desiredTpuConfig = null; - object.desiredL4ilbSubsettingConfig = null; - object.desiredDatabaseEncryption = null; - object.desiredWorkloadIdentityConfig = null; - object.desiredShieldedNodes = null; - object.desiredCostManagementConfig = null; - object.desiredDatapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; - object.desiredPrivateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; - object.desiredMaster = null; - object.desiredDnsConfig = null; - object.desiredNotificationConfig = null; - object.desiredServiceExternalIpsConfig = null; - object.desiredWorkloadCertificates = null; - object.desiredWorkloadAltsConfig = null; - object.desiredAuthenticatorGroupsConfig = null; - object.desiredLoggingConfig = null; - object.desiredMonitoringConfig = null; - object.desiredIdentityServiceConfig = null; - object.desiredMeshCertificates = null; - object.desiredMasterVersion = ""; - object.desiredGcfsConfig = null; - object.desiredNodePoolAutoConfigNetworkTags = null; - object.desiredGatewayApiConfig = null; - object.etag = ""; - object.desiredNodePoolLoggingConfig = null; - object.desiredFleet = null; - object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; - object.additionalPodRangesConfig = null; - object.removedAdditionalPodRangesConfig = null; - object.enableK8sBetaApis = null; - object.desiredSecurityPostureConfig = null; - object.desiredNetworkPerformanceConfig = null; - object.desiredAutopilotWorkloadPolicyConfig = null; - object.desiredK8sBetaApis = null; - object.desiredHostMaintenancePolicy = null; - object.desiredContainerdConfig = null; - object.desiredNodePoolAutoConfigResourceManagerTags = null; - object.desiredNodeKubeletConfig = null; - object.desiredNodePoolAutoConfigKubeletConfig = null; - } - if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) - object.desiredNodeVersion = message.desiredNodeVersion; - if (message.desiredMonitoringService != null && message.hasOwnProperty("desiredMonitoringService")) - object.desiredMonitoringService = message.desiredMonitoringService; - if (message.desiredAddonsConfig != null && message.hasOwnProperty("desiredAddonsConfig")) - object.desiredAddonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.desiredAddonsConfig, options); - if (message.desiredNodePoolId != null && message.hasOwnProperty("desiredNodePoolId")) - object.desiredNodePoolId = message.desiredNodePoolId; - if (message.desiredImageType != null && message.hasOwnProperty("desiredImageType")) - object.desiredImageType = message.desiredImageType; - if (message.desiredNodePoolAutoscaling != null && message.hasOwnProperty("desiredNodePoolAutoscaling")) - object.desiredNodePoolAutoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.desiredNodePoolAutoscaling, options); - if (message.desiredLocations && message.desiredLocations.length) { - object.desiredLocations = []; - for (var j = 0; j < message.desiredLocations.length; ++j) - object.desiredLocations[j] = message.desiredLocations[j]; - } - if (message.desiredMasterAuthorizedNetworksConfig != null && message.hasOwnProperty("desiredMasterAuthorizedNetworksConfig")) - object.desiredMasterAuthorizedNetworksConfig = $root.google.container.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.desiredMasterAuthorizedNetworksConfig, options); - if (message.desiredPodSecurityPolicyConfig != null && message.hasOwnProperty("desiredPodSecurityPolicyConfig")) - object.desiredPodSecurityPolicyConfig = $root.google.container.v1beta1.PodSecurityPolicyConfig.toObject(message.desiredPodSecurityPolicyConfig, options); - if (message.desiredClusterAutoscaling != null && message.hasOwnProperty("desiredClusterAutoscaling")) - object.desiredClusterAutoscaling = $root.google.container.v1beta1.ClusterAutoscaling.toObject(message.desiredClusterAutoscaling, options); - if (message.desiredBinaryAuthorization != null && message.hasOwnProperty("desiredBinaryAuthorization")) - object.desiredBinaryAuthorization = $root.google.container.v1beta1.BinaryAuthorization.toObject(message.desiredBinaryAuthorization, options); - if (message.desiredLoggingService != null && message.hasOwnProperty("desiredLoggingService")) - object.desiredLoggingService = message.desiredLoggingService; - if (message.desiredResourceUsageExportConfig != null && message.hasOwnProperty("desiredResourceUsageExportConfig")) - object.desiredResourceUsageExportConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.toObject(message.desiredResourceUsageExportConfig, options); - if (message.desiredVerticalPodAutoscaling != null && message.hasOwnProperty("desiredVerticalPodAutoscaling")) - object.desiredVerticalPodAutoscaling = $root.google.container.v1beta1.VerticalPodAutoscaling.toObject(message.desiredVerticalPodAutoscaling, options); - if (message.desiredPrivateClusterConfig != null && message.hasOwnProperty("desiredPrivateClusterConfig")) - object.desiredPrivateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.desiredPrivateClusterConfig, options); - if (message.desiredIntraNodeVisibilityConfig != null && message.hasOwnProperty("desiredIntraNodeVisibilityConfig")) - object.desiredIntraNodeVisibilityConfig = $root.google.container.v1beta1.IntraNodeVisibilityConfig.toObject(message.desiredIntraNodeVisibilityConfig, options); - if (message.desiredDefaultSnatStatus != null && message.hasOwnProperty("desiredDefaultSnatStatus")) - object.desiredDefaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.toObject(message.desiredDefaultSnatStatus, options); - if (message.desiredClusterTelemetry != null && message.hasOwnProperty("desiredClusterTelemetry")) - object.desiredClusterTelemetry = $root.google.container.v1beta1.ClusterTelemetry.toObject(message.desiredClusterTelemetry, options); - if (message.desiredReleaseChannel != null && message.hasOwnProperty("desiredReleaseChannel")) - object.desiredReleaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.desiredReleaseChannel, options); - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) - object.privateClusterConfig = $root.google.container.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); - if (message.desiredTpuConfig != null && message.hasOwnProperty("desiredTpuConfig")) - object.desiredTpuConfig = $root.google.container.v1beta1.TpuConfig.toObject(message.desiredTpuConfig, options); - if (message.desiredL4ilbSubsettingConfig != null && message.hasOwnProperty("desiredL4ilbSubsettingConfig")) - object.desiredL4ilbSubsettingConfig = $root.google.container.v1beta1.ILBSubsettingConfig.toObject(message.desiredL4ilbSubsettingConfig, options); - if (message.desiredDatabaseEncryption != null && message.hasOwnProperty("desiredDatabaseEncryption")) - object.desiredDatabaseEncryption = $root.google.container.v1beta1.DatabaseEncryption.toObject(message.desiredDatabaseEncryption, options); - if (message.desiredWorkloadIdentityConfig != null && message.hasOwnProperty("desiredWorkloadIdentityConfig")) - object.desiredWorkloadIdentityConfig = $root.google.container.v1beta1.WorkloadIdentityConfig.toObject(message.desiredWorkloadIdentityConfig, options); - if (message.desiredShieldedNodes != null && message.hasOwnProperty("desiredShieldedNodes")) - object.desiredShieldedNodes = $root.google.container.v1beta1.ShieldedNodes.toObject(message.desiredShieldedNodes, options); - if (message.desiredCostManagementConfig != null && message.hasOwnProperty("desiredCostManagementConfig")) - object.desiredCostManagementConfig = $root.google.container.v1beta1.CostManagementConfig.toObject(message.desiredCostManagementConfig, options); - if (message.desiredDatapathProvider != null && message.hasOwnProperty("desiredDatapathProvider")) - object.desiredDatapathProvider = options.enums === String ? $root.google.container.v1beta1.DatapathProvider[message.desiredDatapathProvider] === undefined ? message.desiredDatapathProvider : $root.google.container.v1beta1.DatapathProvider[message.desiredDatapathProvider] : message.desiredDatapathProvider; - if (message.desiredPrivateIpv6GoogleAccess != null && message.hasOwnProperty("desiredPrivateIpv6GoogleAccess")) - object.desiredPrivateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] === undefined ? message.desiredPrivateIpv6GoogleAccess : $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.desiredPrivateIpv6GoogleAccess] : message.desiredPrivateIpv6GoogleAccess; - if (message.desiredMaster != null && message.hasOwnProperty("desiredMaster")) - object.desiredMaster = $root.google.container.v1beta1.Master.toObject(message.desiredMaster, options); - if (message.desiredDnsConfig != null && message.hasOwnProperty("desiredDnsConfig")) - object.desiredDnsConfig = $root.google.container.v1beta1.DNSConfig.toObject(message.desiredDnsConfig, options); - if (message.desiredNotificationConfig != null && message.hasOwnProperty("desiredNotificationConfig")) - object.desiredNotificationConfig = $root.google.container.v1beta1.NotificationConfig.toObject(message.desiredNotificationConfig, options); - if (message.desiredServiceExternalIpsConfig != null && message.hasOwnProperty("desiredServiceExternalIpsConfig")) - object.desiredServiceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.toObject(message.desiredServiceExternalIpsConfig, options); - if (message.desiredWorkloadCertificates != null && message.hasOwnProperty("desiredWorkloadCertificates")) - object.desiredWorkloadCertificates = $root.google.container.v1beta1.WorkloadCertificates.toObject(message.desiredWorkloadCertificates, options); - if (message.desiredWorkloadAltsConfig != null && message.hasOwnProperty("desiredWorkloadAltsConfig")) - object.desiredWorkloadAltsConfig = $root.google.container.v1beta1.WorkloadALTSConfig.toObject(message.desiredWorkloadAltsConfig, options); - if (message.desiredAuthenticatorGroupsConfig != null && message.hasOwnProperty("desiredAuthenticatorGroupsConfig")) - object.desiredAuthenticatorGroupsConfig = $root.google.container.v1beta1.AuthenticatorGroupsConfig.toObject(message.desiredAuthenticatorGroupsConfig, options); - if (message.desiredLoggingConfig != null && message.hasOwnProperty("desiredLoggingConfig")) - object.desiredLoggingConfig = $root.google.container.v1beta1.LoggingConfig.toObject(message.desiredLoggingConfig, options); - if (message.desiredMonitoringConfig != null && message.hasOwnProperty("desiredMonitoringConfig")) - object.desiredMonitoringConfig = $root.google.container.v1beta1.MonitoringConfig.toObject(message.desiredMonitoringConfig, options); - if (message.desiredIdentityServiceConfig != null && message.hasOwnProperty("desiredIdentityServiceConfig")) - object.desiredIdentityServiceConfig = $root.google.container.v1beta1.IdentityServiceConfig.toObject(message.desiredIdentityServiceConfig, options); - if (message.desiredMeshCertificates != null && message.hasOwnProperty("desiredMeshCertificates")) - object.desiredMeshCertificates = $root.google.container.v1beta1.MeshCertificates.toObject(message.desiredMeshCertificates, options); - if (message.desiredEnablePrivateEndpoint != null && message.hasOwnProperty("desiredEnablePrivateEndpoint")) { - object.desiredEnablePrivateEndpoint = message.desiredEnablePrivateEndpoint; - if (options.oneofs) - object._desiredEnablePrivateEndpoint = "desiredEnablePrivateEndpoint"; - } - if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) - object.desiredMasterVersion = message.desiredMasterVersion; - if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) - object.desiredGcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.desiredGcfsConfig, options); - if (message.desiredNodePoolAutoConfigNetworkTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigNetworkTags")) - object.desiredNodePoolAutoConfigNetworkTags = $root.google.container.v1beta1.NetworkTags.toObject(message.desiredNodePoolAutoConfigNetworkTags, options); - if (message.desiredProtectConfig != null && message.hasOwnProperty("desiredProtectConfig")) { - object.desiredProtectConfig = $root.google.container.v1beta1.ProtectConfig.toObject(message.desiredProtectConfig, options); - if (options.oneofs) - object._desiredProtectConfig = "desiredProtectConfig"; - } - if (message.desiredGatewayApiConfig != null && message.hasOwnProperty("desiredGatewayApiConfig")) - object.desiredGatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.toObject(message.desiredGatewayApiConfig, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) - object.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); - if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) - object.desiredFleet = $root.google.container.v1beta1.Fleet.toObject(message.desiredFleet, options); - if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) - object.desiredStackType = options.enums === String ? $root.google.container.v1beta1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1beta1.StackType[message.desiredStackType] : message.desiredStackType; - if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) - object.additionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); - if (message.removedAdditionalPodRangesConfig != null && message.hasOwnProperty("removedAdditionalPodRangesConfig")) - object.removedAdditionalPodRangesConfig = $root.google.container.v1beta1.AdditionalPodRangesConfig.toObject(message.removedAdditionalPodRangesConfig, options); - if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) - object.enableK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); - if (message.desiredSecurityPostureConfig != null && message.hasOwnProperty("desiredSecurityPostureConfig")) - object.desiredSecurityPostureConfig = $root.google.container.v1beta1.SecurityPostureConfig.toObject(message.desiredSecurityPostureConfig, options); - if (message.desiredNetworkPerformanceConfig != null && message.hasOwnProperty("desiredNetworkPerformanceConfig")) - object.desiredNetworkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.desiredNetworkPerformanceConfig, options); - if (message.desiredEnableFqdnNetworkPolicy != null && message.hasOwnProperty("desiredEnableFqdnNetworkPolicy")) { - object.desiredEnableFqdnNetworkPolicy = message.desiredEnableFqdnNetworkPolicy; - if (options.oneofs) - object._desiredEnableFqdnNetworkPolicy = "desiredEnableFqdnNetworkPolicy"; - } - if (message.desiredAutopilotWorkloadPolicyConfig != null && message.hasOwnProperty("desiredAutopilotWorkloadPolicyConfig")) - object.desiredAutopilotWorkloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.toObject(message.desiredAutopilotWorkloadPolicyConfig, options); - if (message.desiredK8sBetaApis != null && message.hasOwnProperty("desiredK8sBetaApis")) - object.desiredK8sBetaApis = $root.google.container.v1beta1.K8sBetaAPIConfig.toObject(message.desiredK8sBetaApis, options); - if (message.desiredHostMaintenancePolicy != null && message.hasOwnProperty("desiredHostMaintenancePolicy")) - object.desiredHostMaintenancePolicy = $root.google.container.v1beta1.HostMaintenancePolicy.toObject(message.desiredHostMaintenancePolicy, options); - if (message.desiredContainerdConfig != null && message.hasOwnProperty("desiredContainerdConfig")) - object.desiredContainerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.desiredContainerdConfig, options); - if (message.desiredEnableMultiNetworking != null && message.hasOwnProperty("desiredEnableMultiNetworking")) { - object.desiredEnableMultiNetworking = message.desiredEnableMultiNetworking; - if (options.oneofs) - object._desiredEnableMultiNetworking = "desiredEnableMultiNetworking"; - } - if (message.desiredNodePoolAutoConfigResourceManagerTags != null && message.hasOwnProperty("desiredNodePoolAutoConfigResourceManagerTags")) - object.desiredNodePoolAutoConfigResourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.desiredNodePoolAutoConfigResourceManagerTags, options); - if (message.desiredInTransitEncryptionConfig != null && message.hasOwnProperty("desiredInTransitEncryptionConfig")) { - object.desiredInTransitEncryptionConfig = options.enums === String ? $root.google.container.v1beta1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] === undefined ? message.desiredInTransitEncryptionConfig : $root.google.container.v1beta1.InTransitEncryptionConfig[message.desiredInTransitEncryptionConfig] : message.desiredInTransitEncryptionConfig; - if (options.oneofs) - object._desiredInTransitEncryptionConfig = "desiredInTransitEncryptionConfig"; - } - if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("desiredEnableCiliumClusterwideNetworkPolicy")) { - object.desiredEnableCiliumClusterwideNetworkPolicy = message.desiredEnableCiliumClusterwideNetworkPolicy; - if (options.oneofs) - object._desiredEnableCiliumClusterwideNetworkPolicy = "desiredEnableCiliumClusterwideNetworkPolicy"; - } - if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { - object.desiredSecretManagerConfig = $root.google.container.v1beta1.SecretManagerConfig.toObject(message.desiredSecretManagerConfig, options); - if (options.oneofs) - object._desiredSecretManagerConfig = "desiredSecretManagerConfig"; - } - if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) - object.desiredNodeKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.desiredNodeKubeletConfig, options); - if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) - object.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.desiredNodePoolAutoConfigKubeletConfig, options); - return object; - }; - - /** - * Converts this ClusterUpdate to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ClusterUpdate - * @instance - * @returns {Object.} JSON object - */ - ClusterUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterUpdate - * @function getTypeUrl - * @memberof google.container.v1beta1.ClusterUpdate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ClusterUpdate"; - }; - - return ClusterUpdate; - })(); - - v1beta1.AdditionalPodRangesConfig = (function() { - - /** - * Properties of an AdditionalPodRangesConfig. - * @memberof google.container.v1beta1 - * @interface IAdditionalPodRangesConfig - * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames - * @property {Array.|null} [podRangeInfo] AdditionalPodRangesConfig podRangeInfo - */ - - /** - * Constructs a new AdditionalPodRangesConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AdditionalPodRangesConfig. - * @implements IAdditionalPodRangesConfig - * @constructor - * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set - */ - function AdditionalPodRangesConfig(properties) { - this.podRangeNames = []; - this.podRangeInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdditionalPodRangesConfig podRangeNames. - * @member {Array.} podRangeNames - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @instance - */ - AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; - - /** - * AdditionalPodRangesConfig podRangeInfo. - * @member {Array.} podRangeInfo - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @instance - */ - AdditionalPodRangesConfig.prototype.podRangeInfo = $util.emptyArray; - - /** - * Creates a new AdditionalPodRangesConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig instance - */ - AdditionalPodRangesConfig.create = function create(properties) { - return new AdditionalPodRangesConfig(properties); - }; - - /** - * Encodes the specified AdditionalPodRangesConfig message. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodRangesConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.podRangeNames != null && message.podRangeNames.length) - for (var i = 0; i < message.podRangeNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); - if (message.podRangeInfo != null && message.podRangeInfo.length) - for (var i = 0; i < message.podRangeInfo.length; ++i) - $root.google.container.v1beta1.RangeInfo.encode(message.podRangeInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AdditionalPodRangesConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdditionalPodRangesConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1beta1.IAdditionalPodRangesConfig} message AdditionalPodRangesConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdditionalPodRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodRangesConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.podRangeNames && message.podRangeNames.length)) - message.podRangeNames = []; - message.podRangeNames.push(reader.string()); - break; - } - case 2: { - if (!(message.podRangeInfo && message.podRangeInfo.length)) - message.podRangeInfo = []; - message.podRangeInfo.push($root.google.container.v1beta1.RangeInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdditionalPodRangesConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdditionalPodRangesConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdditionalPodRangesConfig message. - * @function verify - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdditionalPodRangesConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { - if (!Array.isArray(message.podRangeNames)) - return "podRangeNames: array expected"; - for (var i = 0; i < message.podRangeNames.length; ++i) - if (!$util.isString(message.podRangeNames[i])) - return "podRangeNames: string[] expected"; - } - if (message.podRangeInfo != null && message.hasOwnProperty("podRangeInfo")) { - if (!Array.isArray(message.podRangeInfo)) - return "podRangeInfo: array expected"; - for (var i = 0; i < message.podRangeInfo.length; ++i) { - var error = $root.google.container.v1beta1.RangeInfo.verify(message.podRangeInfo[i]); - if (error) - return "podRangeInfo." + error; - } - } - return null; - }; - - /** - * Creates an AdditionalPodRangesConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AdditionalPodRangesConfig} AdditionalPodRangesConfig - */ - AdditionalPodRangesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AdditionalPodRangesConfig) - return object; - var message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); - if (object.podRangeNames) { - if (!Array.isArray(object.podRangeNames)) - throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeNames: array expected"); - message.podRangeNames = []; - for (var i = 0; i < object.podRangeNames.length; ++i) - message.podRangeNames[i] = String(object.podRangeNames[i]); - } - if (object.podRangeInfo) { - if (!Array.isArray(object.podRangeInfo)) - throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeInfo: array expected"); - message.podRangeInfo = []; - for (var i = 0; i < object.podRangeInfo.length; ++i) { - if (typeof object.podRangeInfo[i] !== "object") - throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeInfo: object expected"); - message.podRangeInfo[i] = $root.google.container.v1beta1.RangeInfo.fromObject(object.podRangeInfo[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AdditionalPodRangesConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {google.container.v1beta1.AdditionalPodRangesConfig} message AdditionalPodRangesConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdditionalPodRangesConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.podRangeNames = []; - object.podRangeInfo = []; - } - if (message.podRangeNames && message.podRangeNames.length) { - object.podRangeNames = []; - for (var j = 0; j < message.podRangeNames.length; ++j) - object.podRangeNames[j] = message.podRangeNames[j]; - } - if (message.podRangeInfo && message.podRangeInfo.length) { - object.podRangeInfo = []; - for (var j = 0; j < message.podRangeInfo.length; ++j) - object.podRangeInfo[j] = $root.google.container.v1beta1.RangeInfo.toObject(message.podRangeInfo[j], options); - } - return object; - }; - - /** - * Converts this AdditionalPodRangesConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @instance - * @returns {Object.} JSON object - */ - AdditionalPodRangesConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdditionalPodRangesConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AdditionalPodRangesConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdditionalPodRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AdditionalPodRangesConfig"; - }; - - return AdditionalPodRangesConfig; - })(); - - v1beta1.RangeInfo = (function() { - - /** - * Properties of a RangeInfo. - * @memberof google.container.v1beta1 - * @interface IRangeInfo - * @property {string|null} [rangeName] RangeInfo rangeName - * @property {number|null} [utilization] RangeInfo utilization - */ - - /** - * Constructs a new RangeInfo. - * @memberof google.container.v1beta1 - * @classdesc Represents a RangeInfo. - * @implements IRangeInfo - * @constructor - * @param {google.container.v1beta1.IRangeInfo=} [properties] Properties to set - */ - function RangeInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RangeInfo rangeName. - * @member {string} rangeName - * @memberof google.container.v1beta1.RangeInfo - * @instance - */ - RangeInfo.prototype.rangeName = ""; - - /** - * RangeInfo utilization. - * @member {number} utilization - * @memberof google.container.v1beta1.RangeInfo - * @instance - */ - RangeInfo.prototype.utilization = 0; - - /** - * Creates a new RangeInfo instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {google.container.v1beta1.IRangeInfo=} [properties] Properties to set - * @returns {google.container.v1beta1.RangeInfo} RangeInfo instance - */ - RangeInfo.create = function create(properties) { - return new RangeInfo(properties); - }; - - /** - * Encodes the specified RangeInfo message. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {google.container.v1beta1.IRangeInfo} message RangeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); - if (message.utilization != null && Object.hasOwnProperty.call(message, "utilization")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.utilization); - return writer; - }; - - /** - * Encodes the specified RangeInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.RangeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {google.container.v1beta1.IRangeInfo} message RangeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RangeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RangeInfo} RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RangeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rangeName = reader.string(); - break; - } - case 2: { - message.utilization = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RangeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RangeInfo} RangeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RangeInfo message. - * @function verify - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RangeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - if (!$util.isString(message.rangeName)) - return "rangeName: string expected"; - if (message.utilization != null && message.hasOwnProperty("utilization")) - if (typeof message.utilization !== "number") - return "utilization: number expected"; - return null; - }; - - /** - * Creates a RangeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RangeInfo} RangeInfo - */ - RangeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RangeInfo) - return object; - var message = new $root.google.container.v1beta1.RangeInfo(); - if (object.rangeName != null) - message.rangeName = String(object.rangeName); - if (object.utilization != null) - message.utilization = Number(object.utilization); - return message; - }; - - /** - * Creates a plain object from a RangeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {google.container.v1beta1.RangeInfo} message RangeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RangeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rangeName = ""; - object.utilization = 0; - } - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - object.rangeName = message.rangeName; - if (message.utilization != null && message.hasOwnProperty("utilization")) - object.utilization = options.json && !isFinite(message.utilization) ? String(message.utilization) : message.utilization; - return object; - }; - - /** - * Converts this RangeInfo to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RangeInfo - * @instance - * @returns {Object.} JSON object - */ - RangeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RangeInfo - * @function getTypeUrl - * @memberof google.container.v1beta1.RangeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RangeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RangeInfo"; - }; - - return RangeInfo; - })(); - - v1beta1.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.container.v1beta1 - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {string|null} [zone] Operation zone - * @property {google.container.v1beta1.Operation.Type|null} [operationType] Operation operationType - * @property {google.container.v1beta1.Operation.Status|null} [status] Operation status - * @property {string|null} [detail] Operation detail - * @property {string|null} [statusMessage] Operation statusMessage - * @property {string|null} [selfLink] Operation selfLink - * @property {string|null} [targetLink] Operation targetLink - * @property {string|null} [location] Operation location - * @property {string|null} [startTime] Operation startTime - * @property {string|null} [endTime] Operation endTime - * @property {google.container.v1beta1.IOperationProgress|null} [progress] Operation progress - * @property {Array.|null} [clusterConditions] Operation clusterConditions - * @property {Array.|null} [nodepoolConditions] Operation nodepoolConditions - * @property {google.rpc.IStatus|null} [error] Operation error - */ - - /** - * Constructs a new Operation. - * @memberof google.container.v1beta1 - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.container.v1beta1.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - this.clusterConditions = []; - this.nodepoolConditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation zone. - * @member {string} zone - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.zone = ""; - - /** - * Operation operationType. - * @member {google.container.v1beta1.Operation.Type} operationType - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.operationType = 0; - - /** - * Operation status. - * @member {google.container.v1beta1.Operation.Status} status - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.status = 0; - - /** - * Operation detail. - * @member {string} detail - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.detail = ""; - - /** - * Operation statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.statusMessage = ""; - - /** - * Operation selfLink. - * @member {string} selfLink - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.selfLink = ""; - - /** - * Operation targetLink. - * @member {string} targetLink - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.targetLink = ""; - - /** - * Operation location. - * @member {string} location - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.location = ""; - - /** - * Operation startTime. - * @member {string} startTime - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.startTime = ""; - - /** - * Operation endTime. - * @member {string} endTime - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.endTime = ""; - - /** - * Operation progress. - * @member {google.container.v1beta1.IOperationProgress|null|undefined} progress - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.progress = null; - - /** - * Operation clusterConditions. - * @member {Array.} clusterConditions - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.clusterConditions = $util.emptyArray; - - /** - * Operation nodepoolConditions. - * @member {Array.} nodepoolConditions - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.nodepoolConditions = $util.emptyArray; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.container.v1beta1.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Operation - * @static - * @param {google.container.v1beta1.IOperation=} [properties] Properties to set - * @returns {google.container.v1beta1.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Operation - * @static - * @param {google.container.v1beta1.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operationType); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.selfLink); - if (message.targetLink != null && Object.hasOwnProperty.call(message, "targetLink")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetLink); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.detail); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.location); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.startTime); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.endTime); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.container.v1beta1.OperationProgress.encode(message.progress, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.clusterConditions != null && message.clusterConditions.length) - for (var i = 0; i < message.clusterConditions.length; ++i) - $root.google.container.v1beta1.StatusCondition.encode(message.clusterConditions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.nodepoolConditions != null && message.nodepoolConditions.length) - for (var i = 0; i < message.nodepoolConditions.length; ++i) - $root.google.container.v1beta1.StatusCondition.encode(message.nodepoolConditions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.container.v1beta1.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Operation - * @static - * @param {google.container.v1beta1.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationType = reader.int32(); - break; - } - case 4: { - message.status = reader.int32(); - break; - } - case 8: { - message.detail = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.selfLink = reader.string(); - break; - } - case 7: { - message.targetLink = reader.string(); - break; - } - case 9: { - message.location = reader.string(); - break; - } - case 10: { - message.startTime = reader.string(); - break; - } - case 11: { - message.endTime = reader.string(); - break; - } - case 12: { - message.progress = $root.google.container.v1beta1.OperationProgress.decode(reader, reader.uint32()); - break; - } - case 13: { - if (!(message.clusterConditions && message.clusterConditions.length)) - message.clusterConditions = []; - message.clusterConditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 14: { - if (!(message.nodepoolConditions && message.nodepoolConditions.length)) - message.nodepoolConditions = []; - message.nodepoolConditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 15: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.container.v1beta1.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) - switch (message.operationType) { - default: - return "operationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 18: - case 19: - break; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.targetLink != null && message.hasOwnProperty("targetLink")) - if (!$util.isString(message.targetLink)) - return "targetLink: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isString(message.startTime)) - return "startTime: string expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) - if (!$util.isString(message.endTime)) - return "endTime: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.container.v1beta1.OperationProgress.verify(message.progress); - if (error) - return "progress." + error; - } - if (message.clusterConditions != null && message.hasOwnProperty("clusterConditions")) { - if (!Array.isArray(message.clusterConditions)) - return "clusterConditions: array expected"; - for (var i = 0; i < message.clusterConditions.length; ++i) { - var error = $root.google.container.v1beta1.StatusCondition.verify(message.clusterConditions[i]); - if (error) - return "clusterConditions." + error; - } - } - if (message.nodepoolConditions != null && message.hasOwnProperty("nodepoolConditions")) { - if (!Array.isArray(message.nodepoolConditions)) - return "nodepoolConditions: array expected"; - for (var i = 0; i < message.nodepoolConditions.length; ++i) { - var error = $root.google.container.v1beta1.StatusCondition.verify(message.nodepoolConditions[i]); - if (error) - return "nodepoolConditions." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Operation) - return object; - var message = new $root.google.container.v1beta1.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.zone != null) - message.zone = String(object.zone); - switch (object.operationType) { - default: - if (typeof object.operationType === "number") { - message.operationType = object.operationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.operationType = 0; - break; - case "CREATE_CLUSTER": - case 1: - message.operationType = 1; - break; - case "DELETE_CLUSTER": - case 2: - message.operationType = 2; - break; - case "UPGRADE_MASTER": - case 3: - message.operationType = 3; - break; - case "UPGRADE_NODES": - case 4: - message.operationType = 4; - break; - case "REPAIR_CLUSTER": - case 5: - message.operationType = 5; - break; - case "UPDATE_CLUSTER": - case 6: - message.operationType = 6; - break; - case "CREATE_NODE_POOL": - case 7: - message.operationType = 7; - break; - case "DELETE_NODE_POOL": - case 8: - message.operationType = 8; - break; - case "SET_NODE_POOL_MANAGEMENT": - case 9: - message.operationType = 9; - break; - case "AUTO_REPAIR_NODES": - case 10: - message.operationType = 10; - break; - case "AUTO_UPGRADE_NODES": - case 11: - message.operationType = 11; - break; - case "SET_LABELS": - case 12: - message.operationType = 12; - break; - case "SET_MASTER_AUTH": - case 13: - message.operationType = 13; - break; - case "SET_NODE_POOL_SIZE": - case 14: - message.operationType = 14; - break; - case "SET_NETWORK_POLICY": - case 15: - message.operationType = 15; - break; - case "SET_MAINTENANCE_POLICY": - case 16: - message.operationType = 16; - break; - case "RESIZE_CLUSTER": - case 18: - message.operationType = 18; - break; - case "FLEET_FEATURE_UPGRADE": - case 19: - message.operationType = 19; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "DONE": - case 3: - message.status = 3; - break; - case "ABORTING": - case 4: - message.status = 4; - break; - } - if (object.detail != null) - message.detail = String(object.detail); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.targetLink != null) - message.targetLink = String(object.targetLink); - if (object.location != null) - message.location = String(object.location); - if (object.startTime != null) - message.startTime = String(object.startTime); - if (object.endTime != null) - message.endTime = String(object.endTime); - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.container.v1beta1.Operation.progress: object expected"); - message.progress = $root.google.container.v1beta1.OperationProgress.fromObject(object.progress); - } - if (object.clusterConditions) { - if (!Array.isArray(object.clusterConditions)) - throw TypeError(".google.container.v1beta1.Operation.clusterConditions: array expected"); - message.clusterConditions = []; - for (var i = 0; i < object.clusterConditions.length; ++i) { - if (typeof object.clusterConditions[i] !== "object") - throw TypeError(".google.container.v1beta1.Operation.clusterConditions: object expected"); - message.clusterConditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.clusterConditions[i]); - } - } - if (object.nodepoolConditions) { - if (!Array.isArray(object.nodepoolConditions)) - throw TypeError(".google.container.v1beta1.Operation.nodepoolConditions: array expected"); - message.nodepoolConditions = []; - for (var i = 0; i < object.nodepoolConditions.length; ++i) { - if (typeof object.nodepoolConditions[i] !== "object") - throw TypeError(".google.container.v1beta1.Operation.nodepoolConditions: object expected"); - message.nodepoolConditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.nodepoolConditions[i]); - } - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.container.v1beta1.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Operation - * @static - * @param {google.container.v1beta1.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clusterConditions = []; - object.nodepoolConditions = []; - } - if (options.defaults) { - object.name = ""; - object.zone = ""; - object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.selfLink = ""; - object.targetLink = ""; - object.detail = ""; - object.location = ""; - object.startTime = ""; - object.endTime = ""; - object.progress = null; - object.error = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.container.v1beta1.Operation.Type[message.operationType] === undefined ? message.operationType : $root.google.container.v1beta1.Operation.Type[message.operationType] : message.operationType; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1beta1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Operation.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.targetLink != null && message.hasOwnProperty("targetLink")) - object.targetLink = message.targetLink; - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = message.endTime; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.container.v1beta1.OperationProgress.toObject(message.progress, options); - if (message.clusterConditions && message.clusterConditions.length) { - object.clusterConditions = []; - for (var j = 0; j < message.clusterConditions.length; ++j) - object.clusterConditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.clusterConditions[j], options); - } - if (message.nodepoolConditions && message.nodepoolConditions.length) { - object.nodepoolConditions = []; - for (var j = 0; j < message.nodepoolConditions.length; ++j) - object.nodepoolConditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.nodepoolConditions[j], options); - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.container.v1beta1.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Operation"; - }; - - /** - * Status enum. - * @name google.container.v1beta1.Operation.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} DONE=3 DONE value - * @property {number} ABORTING=4 ABORTING value - */ - Operation.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "DONE"] = 3; - values[valuesById[4] = "ABORTING"] = 4; - return values; - })(); - - /** - * Type enum. - * @name google.container.v1beta1.Operation.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CREATE_CLUSTER=1 CREATE_CLUSTER value - * @property {number} DELETE_CLUSTER=2 DELETE_CLUSTER value - * @property {number} UPGRADE_MASTER=3 UPGRADE_MASTER value - * @property {number} UPGRADE_NODES=4 UPGRADE_NODES value - * @property {number} REPAIR_CLUSTER=5 REPAIR_CLUSTER value - * @property {number} UPDATE_CLUSTER=6 UPDATE_CLUSTER value - * @property {number} CREATE_NODE_POOL=7 CREATE_NODE_POOL value - * @property {number} DELETE_NODE_POOL=8 DELETE_NODE_POOL value - * @property {number} SET_NODE_POOL_MANAGEMENT=9 SET_NODE_POOL_MANAGEMENT value - * @property {number} AUTO_REPAIR_NODES=10 AUTO_REPAIR_NODES value - * @property {number} AUTO_UPGRADE_NODES=11 AUTO_UPGRADE_NODES value - * @property {number} SET_LABELS=12 SET_LABELS value - * @property {number} SET_MASTER_AUTH=13 SET_MASTER_AUTH value - * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value - * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value - * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value - * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value - * @property {number} FLEET_FEATURE_UPGRADE=19 FLEET_FEATURE_UPGRADE value - */ - Operation.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE_CLUSTER"] = 1; - values[valuesById[2] = "DELETE_CLUSTER"] = 2; - values[valuesById[3] = "UPGRADE_MASTER"] = 3; - values[valuesById[4] = "UPGRADE_NODES"] = 4; - values[valuesById[5] = "REPAIR_CLUSTER"] = 5; - values[valuesById[6] = "UPDATE_CLUSTER"] = 6; - values[valuesById[7] = "CREATE_NODE_POOL"] = 7; - values[valuesById[8] = "DELETE_NODE_POOL"] = 8; - values[valuesById[9] = "SET_NODE_POOL_MANAGEMENT"] = 9; - values[valuesById[10] = "AUTO_REPAIR_NODES"] = 10; - values[valuesById[11] = "AUTO_UPGRADE_NODES"] = 11; - values[valuesById[12] = "SET_LABELS"] = 12; - values[valuesById[13] = "SET_MASTER_AUTH"] = 13; - values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; - values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; - values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; - values[valuesById[18] = "RESIZE_CLUSTER"] = 18; - values[valuesById[19] = "FLEET_FEATURE_UPGRADE"] = 19; - return values; - })(); - - return Operation; - })(); - - v1beta1.OperationProgress = (function() { - - /** - * Properties of an OperationProgress. - * @memberof google.container.v1beta1 - * @interface IOperationProgress - * @property {string|null} [name] OperationProgress name - * @property {google.container.v1beta1.Operation.Status|null} [status] OperationProgress status - * @property {Array.|null} [metrics] OperationProgress metrics - * @property {Array.|null} [stages] OperationProgress stages - */ - - /** - * Constructs a new OperationProgress. - * @memberof google.container.v1beta1 - * @classdesc Represents an OperationProgress. - * @implements IOperationProgress - * @constructor - * @param {google.container.v1beta1.IOperationProgress=} [properties] Properties to set - */ - function OperationProgress(properties) { - this.metrics = []; - this.stages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationProgress name. - * @member {string} name - * @memberof google.container.v1beta1.OperationProgress - * @instance - */ - OperationProgress.prototype.name = ""; - - /** - * OperationProgress status. - * @member {google.container.v1beta1.Operation.Status} status - * @memberof google.container.v1beta1.OperationProgress - * @instance - */ - OperationProgress.prototype.status = 0; - - /** - * OperationProgress metrics. - * @member {Array.} metrics - * @memberof google.container.v1beta1.OperationProgress - * @instance - */ - OperationProgress.prototype.metrics = $util.emptyArray; - - /** - * OperationProgress stages. - * @member {Array.} stages - * @memberof google.container.v1beta1.OperationProgress - * @instance - */ - OperationProgress.prototype.stages = $util.emptyArray; - - /** - * Creates a new OperationProgress instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {google.container.v1beta1.IOperationProgress=} [properties] Properties to set - * @returns {google.container.v1beta1.OperationProgress} OperationProgress instance - */ - OperationProgress.create = function create(properties) { - return new OperationProgress(properties); - }; - - /** - * Encodes the specified OperationProgress message. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {google.container.v1beta1.IOperationProgress} message OperationProgress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationProgress.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.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.container.v1beta1.OperationProgress.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.stages != null && message.stages.length) - for (var i = 0; i < message.stages.length; ++i) - $root.google.container.v1beta1.OperationProgress.encode(message.stages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationProgress message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {google.container.v1beta1.IOperationProgress} message OperationProgress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationProgress message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.OperationProgress} OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationProgress.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.OperationProgress(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.status = reader.int32(); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.container.v1beta1.OperationProgress.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.stages && message.stages.length)) - message.stages = []; - message.stages.push($root.google.container.v1beta1.OperationProgress.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationProgress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.OperationProgress} OperationProgress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationProgress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationProgress message. - * @function verify - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationProgress.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.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - 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) { - var error = $root.google.container.v1beta1.OperationProgress.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.stages != null && message.hasOwnProperty("stages")) { - if (!Array.isArray(message.stages)) - return "stages: array expected"; - for (var i = 0; i < message.stages.length; ++i) { - var error = $root.google.container.v1beta1.OperationProgress.verify(message.stages[i]); - if (error) - return "stages." + error; - } - } - return null; - }; - - /** - * Creates an OperationProgress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.OperationProgress} OperationProgress - */ - OperationProgress.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.OperationProgress) - return object; - var message = new $root.google.container.v1beta1.OperationProgress(); - if (object.name != null) - message.name = String(object.name); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PENDING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "DONE": - case 3: - message.status = 3; - break; - case "ABORTING": - case 4: - message.status = 4; - break; - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.container.v1beta1.OperationProgress.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.container.v1beta1.OperationProgress.metrics: object expected"); - message.metrics[i] = $root.google.container.v1beta1.OperationProgress.Metric.fromObject(object.metrics[i]); - } - } - if (object.stages) { - if (!Array.isArray(object.stages)) - throw TypeError(".google.container.v1beta1.OperationProgress.stages: array expected"); - message.stages = []; - for (var i = 0; i < object.stages.length; ++i) { - if (typeof object.stages[i] !== "object") - throw TypeError(".google.container.v1beta1.OperationProgress.stages: object expected"); - message.stages[i] = $root.google.container.v1beta1.OperationProgress.fromObject(object.stages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OperationProgress message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {google.container.v1beta1.OperationProgress} message OperationProgress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationProgress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metrics = []; - object.stages = []; - } - if (options.defaults) { - object.name = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1beta1.Operation.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.Operation.Status[message.status] : message.status; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.container.v1beta1.OperationProgress.Metric.toObject(message.metrics[j], options); - } - if (message.stages && message.stages.length) { - object.stages = []; - for (var j = 0; j < message.stages.length; ++j) - object.stages[j] = $root.google.container.v1beta1.OperationProgress.toObject(message.stages[j], options); - } - return object; - }; - - /** - * Converts this OperationProgress to JSON. - * @function toJSON - * @memberof google.container.v1beta1.OperationProgress - * @instance - * @returns {Object.} JSON object - */ - OperationProgress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationProgress - * @function getTypeUrl - * @memberof google.container.v1beta1.OperationProgress - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationProgress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.OperationProgress"; - }; - - OperationProgress.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.container.v1beta1.OperationProgress - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {number|Long|null} [intValue] Metric intValue - * @property {number|null} [doubleValue] Metric doubleValue - * @property {string|null} [stringValue] Metric stringValue - */ - - /** - * Constructs a new Metric. - * @memberof google.container.v1beta1.OperationProgress - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.container.v1beta1.OperationProgress.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric name. - * @member {string} name - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - */ - Metric.prototype.name = ""; - - /** - * Metric intValue. - * @member {number|Long|null|undefined} intValue - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - */ - Metric.prototype.intValue = null; - - /** - * Metric doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - */ - Metric.prototype.doubleValue = null; - - /** - * Metric stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - */ - Metric.prototype.stringValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Metric value. - * @member {"intValue"|"doubleValue"|"stringValue"|undefined} value - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - */ - Object.defineProperty(Metric.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {google.container.v1beta1.OperationProgress.IMetric=} [properties] Properties to set - * @returns {google.container.v1beta1.OperationProgress.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {google.container.v1beta1.OperationProgress.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.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.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.intValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.container.v1beta1.OperationProgress.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {google.container.v1beta1.OperationProgress.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.OperationProgress.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.OperationProgress.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.intValue = reader.int64(); - break; - } - case 3: { - message.doubleValue = reader.double(); - break; - } - case 4: { - message.stringValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.OperationProgress.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.OperationProgress.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.OperationProgress.Metric) - return object; - var message = new $root.google.container.v1beta1.OperationProgress.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {google.container.v1beta1.OperationProgress.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.container.v1beta1.OperationProgress.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.container.v1beta1.OperationProgress.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.OperationProgress.Metric"; - }; - - return Metric; - })(); - - return OperationProgress; - })(); - - v1beta1.CreateClusterRequest = (function() { - - /** - * Properties of a CreateClusterRequest. - * @memberof google.container.v1beta1 - * @interface ICreateClusterRequest - * @property {string|null} [projectId] CreateClusterRequest projectId - * @property {string|null} [zone] CreateClusterRequest zone - * @property {google.container.v1beta1.ICluster|null} [cluster] CreateClusterRequest cluster - * @property {string|null} [parent] CreateClusterRequest parent - */ - - /** - * Constructs a new CreateClusterRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CreateClusterRequest. - * @implements ICreateClusterRequest - * @constructor - * @param {google.container.v1beta1.ICreateClusterRequest=} [properties] Properties to set - */ - function CreateClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.projectId = ""; - - /** - * CreateClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.zone = ""; - - /** - * CreateClusterRequest cluster. - * @member {google.container.v1beta1.ICluster|null|undefined} cluster - * @memberof google.container.v1beta1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.cluster = null; - - /** - * CreateClusterRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.CreateClusterRequest - * @instance - */ - CreateClusterRequest.prototype.parent = ""; - - /** - * Creates a new CreateClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {google.container.v1beta1.ICreateClusterRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest instance - */ - CreateClusterRequest.create = function create(properties) { - return new CreateClusterRequest(properties); - }; - - /** - * Encodes the specified CreateClusterRequest message. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {google.container.v1beta1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - $root.google.container.v1beta1.Cluster.encode(message.cluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - return writer; - }; - - /** - * Encodes the specified CreateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {google.container.v1beta1.ICreateClusterRequest} message CreateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CreateClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.cluster = $root.google.container.v1beta1.Cluster.decode(reader, reader.uint32()); - break; - } - case 5: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateClusterRequest message. - * @function verify - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) { - var error = $root.google.container.v1beta1.Cluster.verify(message.cluster); - if (error) - return "cluster." + error; - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a CreateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CreateClusterRequest} CreateClusterRequest - */ - CreateClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CreateClusterRequest) - return object; - var message = new $root.google.container.v1beta1.CreateClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.cluster != null) { - if (typeof object.cluster !== "object") - throw TypeError(".google.container.v1beta1.CreateClusterRequest.cluster: object expected"); - message.cluster = $root.google.container.v1beta1.Cluster.fromObject(object.cluster); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a CreateClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {google.container.v1beta1.CreateClusterRequest} message CreateClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.cluster = null; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = $root.google.container.v1beta1.Cluster.toObject(message.cluster, options); - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this CreateClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CreateClusterRequest - * @instance - * @returns {Object.} JSON object - */ - CreateClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateClusterRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CreateClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CreateClusterRequest"; - }; - - return CreateClusterRequest; - })(); - - v1beta1.GetClusterRequest = (function() { - - /** - * Properties of a GetClusterRequest. - * @memberof google.container.v1beta1 - * @interface IGetClusterRequest - * @property {string|null} [projectId] GetClusterRequest projectId - * @property {string|null} [zone] GetClusterRequest zone - * @property {string|null} [clusterId] GetClusterRequest clusterId - * @property {string|null} [name] GetClusterRequest name - */ - - /** - * Constructs a new GetClusterRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetClusterRequest. - * @implements IGetClusterRequest - * @constructor - * @param {google.container.v1beta1.IGetClusterRequest=} [properties] Properties to set - */ - function GetClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.projectId = ""; - - /** - * GetClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.zone = ""; - - /** - * GetClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.clusterId = ""; - - /** - * GetClusterRequest name. - * @member {string} name - * @memberof google.container.v1beta1.GetClusterRequest - * @instance - */ - GetClusterRequest.prototype.name = ""; - - /** - * Creates a new GetClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {google.container.v1beta1.IGetClusterRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest instance - */ - GetClusterRequest.create = function create(properties) { - return new GetClusterRequest(properties); - }; - - /** - * Encodes the specified GetClusterRequest message. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {google.container.v1beta1.IGetClusterRequest} message GetClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {google.container.v1beta1.IGetClusterRequest} message GetClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetClusterRequest message. - * @function verify - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetClusterRequest} GetClusterRequest - */ - GetClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetClusterRequest) - return object; - var message = new $root.google.container.v1beta1.GetClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {google.container.v1beta1.GetClusterRequest} message GetClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetClusterRequest - * @instance - * @returns {Object.} JSON object - */ - GetClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetClusterRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetClusterRequest"; - }; - - return GetClusterRequest; - })(); - - v1beta1.UpdateClusterRequest = (function() { - - /** - * Properties of an UpdateClusterRequest. - * @memberof google.container.v1beta1 - * @interface IUpdateClusterRequest - * @property {string|null} [projectId] UpdateClusterRequest projectId - * @property {string|null} [zone] UpdateClusterRequest zone - * @property {string|null} [clusterId] UpdateClusterRequest clusterId - * @property {google.container.v1beta1.IClusterUpdate|null} [update] UpdateClusterRequest update - * @property {string|null} [name] UpdateClusterRequest name - */ - - /** - * Constructs a new UpdateClusterRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents an UpdateClusterRequest. - * @implements IUpdateClusterRequest - * @constructor - * @param {google.container.v1beta1.IUpdateClusterRequest=} [properties] Properties to set - */ - function UpdateClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.projectId = ""; - - /** - * UpdateClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.zone = ""; - - /** - * UpdateClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.clusterId = ""; - - /** - * UpdateClusterRequest update. - * @member {google.container.v1beta1.IClusterUpdate|null|undefined} update - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.update = null; - - /** - * UpdateClusterRequest name. - * @member {string} name - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - */ - UpdateClusterRequest.prototype.name = ""; - - /** - * Creates a new UpdateClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {google.container.v1beta1.IUpdateClusterRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest instance - */ - UpdateClusterRequest.create = function create(properties) { - return new UpdateClusterRequest(properties); - }; - - /** - * Encodes the specified UpdateClusterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {google.container.v1beta1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.container.v1beta1.ClusterUpdate.encode(message.update, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified UpdateClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {google.container.v1beta1.IUpdateClusterRequest} message UpdateClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.update = $root.google.container.v1beta1.ClusterUpdate.decode(reader, reader.uint32()); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateClusterRequest message. - * @function verify - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.update != null && message.hasOwnProperty("update")) { - var error = $root.google.container.v1beta1.ClusterUpdate.verify(message.update); - if (error) - return "update." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an UpdateClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UpdateClusterRequest} UpdateClusterRequest - */ - UpdateClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UpdateClusterRequest) - return object; - var message = new $root.google.container.v1beta1.UpdateClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.container.v1beta1.UpdateClusterRequest.update: object expected"); - message.update = $root.google.container.v1beta1.ClusterUpdate.fromObject(object.update); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an UpdateClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {google.container.v1beta1.UpdateClusterRequest} message UpdateClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.update = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.update != null && message.hasOwnProperty("update")) - object.update = $root.google.container.v1beta1.ClusterUpdate.toObject(message.update, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this UpdateClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UpdateClusterRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateClusterRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.UpdateClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UpdateClusterRequest"; - }; - - return UpdateClusterRequest; - })(); - - v1beta1.UpdateNodePoolRequest = (function() { - - /** - * Properties of an UpdateNodePoolRequest. - * @memberof google.container.v1beta1 - * @interface IUpdateNodePoolRequest - * @property {string|null} [projectId] UpdateNodePoolRequest projectId - * @property {string|null} [zone] UpdateNodePoolRequest zone - * @property {string|null} [clusterId] UpdateNodePoolRequest clusterId - * @property {string|null} [nodePoolId] UpdateNodePoolRequest nodePoolId - * @property {string|null} [nodeVersion] UpdateNodePoolRequest nodeVersion - * @property {string|null} [imageType] UpdateNodePoolRequest imageType - * @property {Array.|null} [locations] UpdateNodePoolRequest locations - * @property {google.container.v1beta1.IWorkloadMetadataConfig|null} [workloadMetadataConfig] UpdateNodePoolRequest workloadMetadataConfig - * @property {string|null} [name] UpdateNodePoolRequest name - * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] UpdateNodePoolRequest upgradeSettings - * @property {google.container.v1beta1.INetworkTags|null} [tags] UpdateNodePoolRequest tags - * @property {google.container.v1beta1.INodeTaints|null} [taints] UpdateNodePoolRequest taints - * @property {google.container.v1beta1.INodeLabels|null} [labels] UpdateNodePoolRequest labels - * @property {google.container.v1beta1.ILinuxNodeConfig|null} [linuxNodeConfig] UpdateNodePoolRequest linuxNodeConfig - * @property {google.container.v1beta1.INodeKubeletConfig|null} [kubeletConfig] UpdateNodePoolRequest kubeletConfig - * @property {google.container.v1beta1.INodeNetworkConfig|null} [nodeNetworkConfig] UpdateNodePoolRequest nodeNetworkConfig - * @property {google.container.v1beta1.IGcfsConfig|null} [gcfsConfig] UpdateNodePoolRequest gcfsConfig - * @property {google.container.v1beta1.IConfidentialNodes|null} [confidentialNodes] UpdateNodePoolRequest confidentialNodes - * @property {google.container.v1beta1.IVirtualNIC|null} [gvnic] UpdateNodePoolRequest gvnic - * @property {string|null} [etag] UpdateNodePoolRequest etag - * @property {google.container.v1beta1.IFastSocket|null} [fastSocket] UpdateNodePoolRequest fastSocket - * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [loggingConfig] UpdateNodePoolRequest loggingConfig - * @property {google.container.v1beta1.IResourceLabels|null} [resourceLabels] UpdateNodePoolRequest resourceLabels - * @property {google.container.v1beta1.IWindowsNodeConfig|null} [windowsNodeConfig] UpdateNodePoolRequest windowsNodeConfig - * @property {Array.|null} [accelerators] UpdateNodePoolRequest accelerators - * @property {string|null} [machineType] UpdateNodePoolRequest machineType - * @property {string|null} [diskType] UpdateNodePoolRequest diskType - * @property {number|Long|null} [diskSizeGb] UpdateNodePoolRequest diskSizeGb - * @property {google.container.v1beta1.IResourceManagerTags|null} [resourceManagerTags] UpdateNodePoolRequest resourceManagerTags - * @property {google.container.v1beta1.IContainerdConfig|null} [containerdConfig] UpdateNodePoolRequest containerdConfig - * @property {google.container.v1beta1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] UpdateNodePoolRequest queuedProvisioning - */ - - /** - * Constructs a new UpdateNodePoolRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents an UpdateNodePoolRequest. - * @implements IUpdateNodePoolRequest - * @constructor - * @param {google.container.v1beta1.IUpdateNodePoolRequest=} [properties] Properties to set - */ - function UpdateNodePoolRequest(properties) { - this.locations = []; - this.accelerators = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.projectId = ""; - - /** - * UpdateNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.zone = ""; - - /** - * UpdateNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.clusterId = ""; - - /** - * UpdateNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodePoolId = ""; - - /** - * UpdateNodePoolRequest nodeVersion. - * @member {string} nodeVersion - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodeVersion = ""; - - /** - * UpdateNodePoolRequest imageType. - * @member {string} imageType - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.imageType = ""; - - /** - * UpdateNodePoolRequest locations. - * @member {Array.} locations - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.locations = $util.emptyArray; - - /** - * UpdateNodePoolRequest workloadMetadataConfig. - * @member {google.container.v1beta1.IWorkloadMetadataConfig|null|undefined} workloadMetadataConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.workloadMetadataConfig = null; - - /** - * UpdateNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.name = ""; - - /** - * UpdateNodePoolRequest upgradeSettings. - * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.upgradeSettings = null; - - /** - * UpdateNodePoolRequest tags. - * @member {google.container.v1beta1.INetworkTags|null|undefined} tags - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.tags = null; - - /** - * UpdateNodePoolRequest taints. - * @member {google.container.v1beta1.INodeTaints|null|undefined} taints - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.taints = null; - - /** - * UpdateNodePoolRequest labels. - * @member {google.container.v1beta1.INodeLabels|null|undefined} labels - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.labels = null; - - /** - * UpdateNodePoolRequest linuxNodeConfig. - * @member {google.container.v1beta1.ILinuxNodeConfig|null|undefined} linuxNodeConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.linuxNodeConfig = null; - - /** - * UpdateNodePoolRequest kubeletConfig. - * @member {google.container.v1beta1.INodeKubeletConfig|null|undefined} kubeletConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.kubeletConfig = null; - - /** - * UpdateNodePoolRequest nodeNetworkConfig. - * @member {google.container.v1beta1.INodeNetworkConfig|null|undefined} nodeNetworkConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.nodeNetworkConfig = null; - - /** - * UpdateNodePoolRequest gcfsConfig. - * @member {google.container.v1beta1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.gcfsConfig = null; - - /** - * UpdateNodePoolRequest confidentialNodes. - * @member {google.container.v1beta1.IConfidentialNodes|null|undefined} confidentialNodes - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.confidentialNodes = null; - - /** - * UpdateNodePoolRequest gvnic. - * @member {google.container.v1beta1.IVirtualNIC|null|undefined} gvnic - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.gvnic = null; - - /** - * UpdateNodePoolRequest etag. - * @member {string} etag - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.etag = ""; - - /** - * UpdateNodePoolRequest fastSocket. - * @member {google.container.v1beta1.IFastSocket|null|undefined} fastSocket - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.fastSocket = null; - - /** - * UpdateNodePoolRequest loggingConfig. - * @member {google.container.v1beta1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.loggingConfig = null; - - /** - * UpdateNodePoolRequest resourceLabels. - * @member {google.container.v1beta1.IResourceLabels|null|undefined} resourceLabels - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.resourceLabels = null; - - /** - * UpdateNodePoolRequest windowsNodeConfig. - * @member {google.container.v1beta1.IWindowsNodeConfig|null|undefined} windowsNodeConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.windowsNodeConfig = null; - - /** - * UpdateNodePoolRequest accelerators. - * @member {Array.} accelerators - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.accelerators = $util.emptyArray; - - /** - * UpdateNodePoolRequest machineType. - * @member {string} machineType - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.machineType = ""; - - /** - * UpdateNodePoolRequest diskType. - * @member {string} diskType - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.diskType = ""; - - /** - * UpdateNodePoolRequest diskSizeGb. - * @member {number|Long} diskSizeGb - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UpdateNodePoolRequest resourceManagerTags. - * @member {google.container.v1beta1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.resourceManagerTags = null; - - /** - * UpdateNodePoolRequest containerdConfig. - * @member {google.container.v1beta1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.containerdConfig = null; - - /** - * UpdateNodePoolRequest queuedProvisioning. - * @member {google.container.v1beta1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - */ - UpdateNodePoolRequest.prototype.queuedProvisioning = null; - - /** - * Creates a new UpdateNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {google.container.v1beta1.IUpdateNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest instance - */ - UpdateNodePoolRequest.create = function create(properties) { - return new UpdateNodePoolRequest(properties); - }; - - /** - * Encodes the specified UpdateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {google.container.v1beta1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.nodeVersion != null && Object.hasOwnProperty.call(message, "nodeVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.nodeVersion); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.imageType); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.name); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.workloadMetadataConfig != null && Object.hasOwnProperty.call(message, "workloadMetadataConfig")) - $root.google.container.v1beta1.WorkloadMetadataConfig.encode(message.workloadMetadataConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.container.v1beta1.NetworkTags.encode(message.tags, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.taints != null && Object.hasOwnProperty.call(message, "taints")) - $root.google.container.v1beta1.NodeTaints.encode(message.taints, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - $root.google.container.v1beta1.NodeLabels.encode(message.labels, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) - $root.google.container.v1beta1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.kubeletConfig != null && Object.hasOwnProperty.call(message, "kubeletConfig")) - $root.google.container.v1beta1.NodeKubeletConfig.encode(message.kubeletConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.nodeNetworkConfig != null && Object.hasOwnProperty.call(message, "nodeNetworkConfig")) - $root.google.container.v1beta1.NodeNetworkConfig.encode(message.nodeNetworkConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcfsConfig != null && Object.hasOwnProperty.call(message, "gcfsConfig")) - $root.google.container.v1beta1.GcfsConfig.encode(message.gcfsConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.confidentialNodes != null && Object.hasOwnProperty.call(message, "confidentialNodes")) - $root.google.container.v1beta1.ConfidentialNodes.encode(message.confidentialNodes, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.gvnic != null && Object.hasOwnProperty.call(message, "gvnic")) - $root.google.container.v1beta1.VirtualNIC.encode(message.gvnic, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.etag); - if (message.fastSocket != null && Object.hasOwnProperty.call(message, "fastSocket")) - $root.google.container.v1beta1.FastSocket.encode(message.fastSocket, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - $root.google.container.v1beta1.ResourceLabels.encode(message.resourceLabels, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.windowsNodeConfig != null && Object.hasOwnProperty.call(message, "windowsNodeConfig")) - $root.google.container.v1beta1.WindowsNodeConfig.encode(message.windowsNodeConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.accelerators != null && message.accelerators.length) - for (var i = 0; i < message.accelerators.length; ++i) - $root.google.container.v1beta1.AcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.machineType); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.diskType); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 38, wireType 0 =*/304).int64(message.diskSizeGb); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1beta1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.containerdConfig != null && Object.hasOwnProperty.call(message, "containerdConfig")) - $root.google.container.v1beta1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) - $root.google.container.v1beta1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {google.container.v1beta1.IUpdateNodePoolRequest} message UpdateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.nodeVersion = reader.string(); - break; - } - case 6: { - message.imageType = reader.string(); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.name = reader.string(); - break; - } - case 15: { - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 16: { - message.tags = $root.google.container.v1beta1.NetworkTags.decode(reader, reader.uint32()); - break; - } - case 17: { - message.taints = $root.google.container.v1beta1.NodeTaints.decode(reader, reader.uint32()); - break; - } - case 18: { - message.labels = $root.google.container.v1beta1.NodeLabels.decode(reader, reader.uint32()); - break; - } - case 19: { - message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.decode(reader, reader.uint32()); - break; - } - case 20: { - message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.decode(reader, reader.uint32()); - break; - } - case 21: { - message.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.decode(reader, reader.uint32()); - break; - } - case 22: { - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.decode(reader, reader.uint32()); - break; - } - case 23: { - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.decode(reader, reader.uint32()); - break; - } - case 29: { - message.gvnic = $root.google.container.v1beta1.VirtualNIC.decode(reader, reader.uint32()); - break; - } - case 30: { - message.etag = reader.string(); - break; - } - case 31: { - message.fastSocket = $root.google.container.v1beta1.FastSocket.decode(reader, reader.uint32()); - break; - } - case 32: { - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); - break; - } - case 33: { - message.resourceLabels = $root.google.container.v1beta1.ResourceLabels.decode(reader, reader.uint32()); - break; - } - case 34: { - message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.decode(reader, reader.uint32()); - break; - } - case 35: { - if (!(message.accelerators && message.accelerators.length)) - message.accelerators = []; - message.accelerators.push($root.google.container.v1beta1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 36: { - message.machineType = reader.string(); - break; - } - case 37: { - message.diskType = reader.string(); - break; - } - case 38: { - message.diskSizeGb = reader.int64(); - break; - } - case 39: { - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 40: { - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.decode(reader, reader.uint32()); - break; - } - case 42: { - message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateNodePoolRequest message. - * @function verify - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) - if (!$util.isString(message.nodeVersion)) - return "nodeVersion: string expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) { - var error = $root.google.container.v1beta1.WorkloadMetadataConfig.verify(message.workloadMetadataConfig); - if (error) - return "workloadMetadataConfig." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - var error = $root.google.container.v1beta1.NetworkTags.verify(message.tags); - if (error) - return "tags." + error; - } - if (message.taints != null && message.hasOwnProperty("taints")) { - var error = $root.google.container.v1beta1.NodeTaints.verify(message.taints); - if (error) - return "taints." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - var error = $root.google.container.v1beta1.NodeLabels.verify(message.labels); - if (error) - return "labels." + error; - } - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { - var error = $root.google.container.v1beta1.LinuxNodeConfig.verify(message.linuxNodeConfig); - if (error) - return "linuxNodeConfig." + error; - } - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) { - var error = $root.google.container.v1beta1.NodeKubeletConfig.verify(message.kubeletConfig); - if (error) - return "kubeletConfig." + error; - } - if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) { - var error = $root.google.container.v1beta1.NodeNetworkConfig.verify(message.nodeNetworkConfig); - if (error) - return "nodeNetworkConfig." + error; - } - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) { - var error = $root.google.container.v1beta1.GcfsConfig.verify(message.gcfsConfig); - if (error) - return "gcfsConfig." + error; - } - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) { - var error = $root.google.container.v1beta1.ConfidentialNodes.verify(message.confidentialNodes); - if (error) - return "confidentialNodes." + error; - } - if (message.gvnic != null && message.hasOwnProperty("gvnic")) { - var error = $root.google.container.v1beta1.VirtualNIC.verify(message.gvnic); - if (error) - return "gvnic." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) { - var error = $root.google.container.v1beta1.FastSocket.verify(message.fastSocket); - if (error) - return "fastSocket." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.container.v1beta1.NodePoolLoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - var error = $root.google.container.v1beta1.ResourceLabels.verify(message.resourceLabels); - if (error) - return "resourceLabels." + error; - } - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) { - var error = $root.google.container.v1beta1.WindowsNodeConfig.verify(message.windowsNodeConfig); - if (error) - return "windowsNodeConfig." + error; - } - if (message.accelerators != null && message.hasOwnProperty("accelerators")) { - if (!Array.isArray(message.accelerators)) - return "accelerators: array expected"; - for (var i = 0; i < message.accelerators.length; ++i) { - var error = $root.google.container.v1beta1.AcceleratorConfig.verify(message.accelerators[i]); - if (error) - return "accelerators." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1beta1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; - } - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) { - var error = $root.google.container.v1beta1.ContainerdConfig.verify(message.containerdConfig); - if (error) - return "containerdConfig." + error; - } - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { - var error = $root.google.container.v1beta1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); - if (error) - return "queuedProvisioning." + error; - } - return null; - }; - - /** - * Creates an UpdateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UpdateNodePoolRequest} UpdateNodePoolRequest - */ - UpdateNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UpdateNodePoolRequest) - return object; - var message = new $root.google.container.v1beta1.UpdateNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.nodeVersion != null) - message.nodeVersion = String(object.nodeVersion); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.workloadMetadataConfig != null) { - if (typeof object.workloadMetadataConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.workloadMetadataConfig: object expected"); - message.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.fromObject(object.workloadMetadataConfig); - } - if (object.name != null) - message.name = String(object.name); - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.tags: object expected"); - message.tags = $root.google.container.v1beta1.NetworkTags.fromObject(object.tags); - } - if (object.taints != null) { - if (typeof object.taints !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.taints: object expected"); - message.taints = $root.google.container.v1beta1.NodeTaints.fromObject(object.taints); - } - if (object.labels != null) { - if (typeof object.labels !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.labels: object expected"); - message.labels = $root.google.container.v1beta1.NodeLabels.fromObject(object.labels); - } - if (object.linuxNodeConfig != null) { - if (typeof object.linuxNodeConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.linuxNodeConfig: object expected"); - message.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); - } - if (object.kubeletConfig != null) { - if (typeof object.kubeletConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.kubeletConfig: object expected"); - message.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.fromObject(object.kubeletConfig); - } - if (object.nodeNetworkConfig != null) { - if (typeof object.nodeNetworkConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.nodeNetworkConfig: object expected"); - message.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.fromObject(object.nodeNetworkConfig); - } - if (object.gcfsConfig != null) { - if (typeof object.gcfsConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.gcfsConfig: object expected"); - message.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.fromObject(object.gcfsConfig); - } - if (object.confidentialNodes != null) { - if (typeof object.confidentialNodes !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.confidentialNodes: object expected"); - message.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.fromObject(object.confidentialNodes); - } - if (object.gvnic != null) { - if (typeof object.gvnic !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.gvnic: object expected"); - message.gvnic = $root.google.container.v1beta1.VirtualNIC.fromObject(object.gvnic); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.fastSocket != null) { - if (typeof object.fastSocket !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.fastSocket: object expected"); - message.fastSocket = $root.google.container.v1beta1.FastSocket.fromObject(object.fastSocket); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.loggingConfig: object expected"); - message.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.loggingConfig); - } - if (object.resourceLabels != null) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.resourceLabels: object expected"); - message.resourceLabels = $root.google.container.v1beta1.ResourceLabels.fromObject(object.resourceLabels); - } - if (object.windowsNodeConfig != null) { - if (typeof object.windowsNodeConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.windowsNodeConfig: object expected"); - message.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.fromObject(object.windowsNodeConfig); - } - if (object.accelerators) { - if (!Array.isArray(object.accelerators)) - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.accelerators: array expected"); - message.accelerators = []; - for (var i = 0; i < object.accelerators.length; ++i) { - if (typeof object.accelerators[i] !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.accelerators: object expected"); - message.accelerators[i] = $root.google.container.v1beta1.AcceleratorConfig.fromObject(object.accelerators[i]); - } - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.fromObject(object.resourceManagerTags); - } - if (object.containerdConfig != null) { - if (typeof object.containerdConfig !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.containerdConfig: object expected"); - message.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.fromObject(object.containerdConfig); - } - if (object.queuedProvisioning != null) { - if (typeof object.queuedProvisioning !== "object") - throw TypeError(".google.container.v1beta1.UpdateNodePoolRequest.queuedProvisioning: object expected"); - message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); - } - return message; - }; - - /** - * Creates a plain object from an UpdateNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {google.container.v1beta1.UpdateNodePoolRequest} message UpdateNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.locations = []; - object.accelerators = []; - } - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.nodeVersion = ""; - object.imageType = ""; - object.name = ""; - object.workloadMetadataConfig = null; - object.upgradeSettings = null; - object.tags = null; - object.taints = null; - object.labels = null; - object.linuxNodeConfig = null; - object.kubeletConfig = null; - object.nodeNetworkConfig = null; - object.gcfsConfig = null; - object.confidentialNodes = null; - object.gvnic = null; - object.etag = ""; - object.fastSocket = null; - object.loggingConfig = null; - object.resourceLabels = null; - object.windowsNodeConfig = null; - object.machineType = ""; - object.diskType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.diskSizeGb = options.longs === String ? "0" : 0; - object.resourceManagerTags = null; - object.containerdConfig = null; - object.queuedProvisioning = null; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.nodeVersion != null && message.hasOwnProperty("nodeVersion")) - object.nodeVersion = message.nodeVersion; - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.workloadMetadataConfig != null && message.hasOwnProperty("workloadMetadataConfig")) - object.workloadMetadataConfig = $root.google.container.v1beta1.WorkloadMetadataConfig.toObject(message.workloadMetadataConfig, options); - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.tags != null && message.hasOwnProperty("tags")) - object.tags = $root.google.container.v1beta1.NetworkTags.toObject(message.tags, options); - if (message.taints != null && message.hasOwnProperty("taints")) - object.taints = $root.google.container.v1beta1.NodeTaints.toObject(message.taints, options); - if (message.labels != null && message.hasOwnProperty("labels")) - object.labels = $root.google.container.v1beta1.NodeLabels.toObject(message.labels, options); - if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) - object.linuxNodeConfig = $root.google.container.v1beta1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); - if (message.kubeletConfig != null && message.hasOwnProperty("kubeletConfig")) - object.kubeletConfig = $root.google.container.v1beta1.NodeKubeletConfig.toObject(message.kubeletConfig, options); - if (message.nodeNetworkConfig != null && message.hasOwnProperty("nodeNetworkConfig")) - object.nodeNetworkConfig = $root.google.container.v1beta1.NodeNetworkConfig.toObject(message.nodeNetworkConfig, options); - if (message.gcfsConfig != null && message.hasOwnProperty("gcfsConfig")) - object.gcfsConfig = $root.google.container.v1beta1.GcfsConfig.toObject(message.gcfsConfig, options); - if (message.confidentialNodes != null && message.hasOwnProperty("confidentialNodes")) - object.confidentialNodes = $root.google.container.v1beta1.ConfidentialNodes.toObject(message.confidentialNodes, options); - if (message.gvnic != null && message.hasOwnProperty("gvnic")) - object.gvnic = $root.google.container.v1beta1.VirtualNIC.toObject(message.gvnic, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.fastSocket != null && message.hasOwnProperty("fastSocket")) - object.fastSocket = $root.google.container.v1beta1.FastSocket.toObject(message.fastSocket, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.loggingConfig, options); - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) - object.resourceLabels = $root.google.container.v1beta1.ResourceLabels.toObject(message.resourceLabels, options); - if (message.windowsNodeConfig != null && message.hasOwnProperty("windowsNodeConfig")) - object.windowsNodeConfig = $root.google.container.v1beta1.WindowsNodeConfig.toObject(message.windowsNodeConfig, options); - if (message.accelerators && message.accelerators.length) { - object.accelerators = []; - for (var j = 0; j < message.accelerators.length; ++j) - object.accelerators[j] = $root.google.container.v1beta1.AcceleratorConfig.toObject(message.accelerators[j], options); - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1beta1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.containerdConfig != null && message.hasOwnProperty("containerdConfig")) - object.containerdConfig = $root.google.container.v1beta1.ContainerdConfig.toObject(message.containerdConfig, options); - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) - object.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); - return object; - }; - - /** - * Converts this UpdateNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.UpdateNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UpdateNodePoolRequest"; - }; - - return UpdateNodePoolRequest; - })(); - - v1beta1.SetNodePoolAutoscalingRequest = (function() { - - /** - * Properties of a SetNodePoolAutoscalingRequest. - * @memberof google.container.v1beta1 - * @interface ISetNodePoolAutoscalingRequest - * @property {string|null} [projectId] SetNodePoolAutoscalingRequest projectId - * @property {string|null} [zone] SetNodePoolAutoscalingRequest zone - * @property {string|null} [clusterId] SetNodePoolAutoscalingRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolAutoscalingRequest nodePoolId - * @property {google.container.v1beta1.INodePoolAutoscaling|null} [autoscaling] SetNodePoolAutoscalingRequest autoscaling - * @property {string|null} [name] SetNodePoolAutoscalingRequest name - */ - - /** - * Constructs a new SetNodePoolAutoscalingRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetNodePoolAutoscalingRequest. - * @implements ISetNodePoolAutoscalingRequest - * @constructor - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set - */ - function SetNodePoolAutoscalingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolAutoscalingRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.projectId = ""; - - /** - * SetNodePoolAutoscalingRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.zone = ""; - - /** - * SetNodePoolAutoscalingRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.clusterId = ""; - - /** - * SetNodePoolAutoscalingRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolAutoscalingRequest autoscaling. - * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.autoscaling = null; - - /** - * SetNodePoolAutoscalingRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - */ - SetNodePoolAutoscalingRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolAutoscalingRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest instance - */ - SetNodePoolAutoscalingRequest.create = function create(properties) { - return new SetNodePoolAutoscalingRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolAutoscalingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolAutoscalingRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolAutoscalingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolAutoscalingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolAutoscalingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolAutoscalingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolAutoscalingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolAutoscalingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolAutoscalingRequest message. - * @function verify - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolAutoscalingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolAutoscalingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetNodePoolAutoscalingRequest} SetNodePoolAutoscalingRequest - */ - SetNodePoolAutoscalingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetNodePoolAutoscalingRequest) - return object; - var message = new $root.google.container.v1beta1.SetNodePoolAutoscalingRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1beta1.SetNodePoolAutoscalingRequest.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.autoscaling); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolAutoscalingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {google.container.v1beta1.SetNodePoolAutoscalingRequest} message SetNodePoolAutoscalingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolAutoscalingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.autoscaling = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolAutoscalingRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolAutoscalingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolAutoscalingRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetNodePoolAutoscalingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolAutoscalingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolAutoscalingRequest"; - }; - - return SetNodePoolAutoscalingRequest; - })(); - - v1beta1.SetLoggingServiceRequest = (function() { - - /** - * Properties of a SetLoggingServiceRequest. - * @memberof google.container.v1beta1 - * @interface ISetLoggingServiceRequest - * @property {string|null} [projectId] SetLoggingServiceRequest projectId - * @property {string|null} [zone] SetLoggingServiceRequest zone - * @property {string|null} [clusterId] SetLoggingServiceRequest clusterId - * @property {string|null} [loggingService] SetLoggingServiceRequest loggingService - * @property {string|null} [name] SetLoggingServiceRequest name - */ - - /** - * Constructs a new SetLoggingServiceRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetLoggingServiceRequest. - * @implements ISetLoggingServiceRequest - * @constructor - * @param {google.container.v1beta1.ISetLoggingServiceRequest=} [properties] Properties to set - */ - function SetLoggingServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLoggingServiceRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.projectId = ""; - - /** - * SetLoggingServiceRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.zone = ""; - - /** - * SetLoggingServiceRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.clusterId = ""; - - /** - * SetLoggingServiceRequest loggingService. - * @member {string} loggingService - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.loggingService = ""; - - /** - * SetLoggingServiceRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - */ - SetLoggingServiceRequest.prototype.name = ""; - - /** - * Creates a new SetLoggingServiceRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {google.container.v1beta1.ISetLoggingServiceRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest instance - */ - SetLoggingServiceRequest.create = function create(properties) { - return new SetLoggingServiceRequest(properties); - }; - - /** - * Encodes the specified SetLoggingServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {google.container.v1beta1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLoggingServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.loggingService != null && Object.hasOwnProperty.call(message, "loggingService")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.loggingService); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLoggingServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLoggingServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {google.container.v1beta1.ISetLoggingServiceRequest} message SetLoggingServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLoggingServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLoggingServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLoggingServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.loggingService = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLoggingServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLoggingServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLoggingServiceRequest message. - * @function verify - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLoggingServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - if (!$util.isString(message.loggingService)) - return "loggingService: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLoggingServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetLoggingServiceRequest} SetLoggingServiceRequest - */ - SetLoggingServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetLoggingServiceRequest) - return object; - var message = new $root.google.container.v1beta1.SetLoggingServiceRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.loggingService != null) - message.loggingService = String(object.loggingService); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLoggingServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {google.container.v1beta1.SetLoggingServiceRequest} message SetLoggingServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLoggingServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.loggingService = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.loggingService != null && message.hasOwnProperty("loggingService")) - object.loggingService = message.loggingService; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLoggingServiceRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @instance - * @returns {Object.} JSON object - */ - SetLoggingServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLoggingServiceRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetLoggingServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLoggingServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetLoggingServiceRequest"; - }; - - return SetLoggingServiceRequest; - })(); - - v1beta1.SetMonitoringServiceRequest = (function() { - - /** - * Properties of a SetMonitoringServiceRequest. - * @memberof google.container.v1beta1 - * @interface ISetMonitoringServiceRequest - * @property {string|null} [projectId] SetMonitoringServiceRequest projectId - * @property {string|null} [zone] SetMonitoringServiceRequest zone - * @property {string|null} [clusterId] SetMonitoringServiceRequest clusterId - * @property {string|null} [monitoringService] SetMonitoringServiceRequest monitoringService - * @property {string|null} [name] SetMonitoringServiceRequest name - */ - - /** - * Constructs a new SetMonitoringServiceRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetMonitoringServiceRequest. - * @implements ISetMonitoringServiceRequest - * @constructor - * @param {google.container.v1beta1.ISetMonitoringServiceRequest=} [properties] Properties to set - */ - function SetMonitoringServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMonitoringServiceRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.projectId = ""; - - /** - * SetMonitoringServiceRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.zone = ""; - - /** - * SetMonitoringServiceRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.clusterId = ""; - - /** - * SetMonitoringServiceRequest monitoringService. - * @member {string} monitoringService - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.monitoringService = ""; - - /** - * SetMonitoringServiceRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - */ - SetMonitoringServiceRequest.prototype.name = ""; - - /** - * Creates a new SetMonitoringServiceRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1beta1.ISetMonitoringServiceRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest instance - */ - SetMonitoringServiceRequest.create = function create(properties) { - return new SetMonitoringServiceRequest(properties); - }; - - /** - * Encodes the specified SetMonitoringServiceRequest message. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1beta1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMonitoringServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.monitoringService != null && Object.hasOwnProperty.call(message, "monitoringService")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.monitoringService); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMonitoringServiceRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMonitoringServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1beta1.ISetMonitoringServiceRequest} message SetMonitoringServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMonitoringServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMonitoringServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMonitoringServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.monitoringService = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMonitoringServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMonitoringServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMonitoringServiceRequest message. - * @function verify - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMonitoringServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - if (!$util.isString(message.monitoringService)) - return "monitoringService: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMonitoringServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetMonitoringServiceRequest} SetMonitoringServiceRequest - */ - SetMonitoringServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetMonitoringServiceRequest) - return object; - var message = new $root.google.container.v1beta1.SetMonitoringServiceRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.monitoringService != null) - message.monitoringService = String(object.monitoringService); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMonitoringServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {google.container.v1beta1.SetMonitoringServiceRequest} message SetMonitoringServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMonitoringServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.monitoringService = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.monitoringService != null && message.hasOwnProperty("monitoringService")) - object.monitoringService = message.monitoringService; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMonitoringServiceRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @instance - * @returns {Object.} JSON object - */ - SetMonitoringServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMonitoringServiceRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetMonitoringServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMonitoringServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetMonitoringServiceRequest"; - }; - - return SetMonitoringServiceRequest; - })(); - - v1beta1.SetAddonsConfigRequest = (function() { - - /** - * Properties of a SetAddonsConfigRequest. - * @memberof google.container.v1beta1 - * @interface ISetAddonsConfigRequest - * @property {string|null} [projectId] SetAddonsConfigRequest projectId - * @property {string|null} [zone] SetAddonsConfigRequest zone - * @property {string|null} [clusterId] SetAddonsConfigRequest clusterId - * @property {google.container.v1beta1.IAddonsConfig|null} [addonsConfig] SetAddonsConfigRequest addonsConfig - * @property {string|null} [name] SetAddonsConfigRequest name - */ - - /** - * Constructs a new SetAddonsConfigRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetAddonsConfigRequest. - * @implements ISetAddonsConfigRequest - * @constructor - * @param {google.container.v1beta1.ISetAddonsConfigRequest=} [properties] Properties to set - */ - function SetAddonsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetAddonsConfigRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.projectId = ""; - - /** - * SetAddonsConfigRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.zone = ""; - - /** - * SetAddonsConfigRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.clusterId = ""; - - /** - * SetAddonsConfigRequest addonsConfig. - * @member {google.container.v1beta1.IAddonsConfig|null|undefined} addonsConfig - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.addonsConfig = null; - - /** - * SetAddonsConfigRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - */ - SetAddonsConfigRequest.prototype.name = ""; - - /** - * Creates a new SetAddonsConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {google.container.v1beta1.ISetAddonsConfigRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest instance - */ - SetAddonsConfigRequest.create = function create(properties) { - return new SetAddonsConfigRequest(properties); - }; - - /** - * Encodes the specified SetAddonsConfigRequest message. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {google.container.v1beta1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetAddonsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.addonsConfig != null && Object.hasOwnProperty.call(message, "addonsConfig")) - $root.google.container.v1beta1.AddonsConfig.encode(message.addonsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetAddonsConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetAddonsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {google.container.v1beta1.ISetAddonsConfigRequest} message SetAddonsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetAddonsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetAddonsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetAddonsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetAddonsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetAddonsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetAddonsConfigRequest message. - * @function verify - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetAddonsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) { - var error = $root.google.container.v1beta1.AddonsConfig.verify(message.addonsConfig); - if (error) - return "addonsConfig." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetAddonsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetAddonsConfigRequest} SetAddonsConfigRequest - */ - SetAddonsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetAddonsConfigRequest) - return object; - var message = new $root.google.container.v1beta1.SetAddonsConfigRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.addonsConfig != null) { - if (typeof object.addonsConfig !== "object") - throw TypeError(".google.container.v1beta1.SetAddonsConfigRequest.addonsConfig: object expected"); - message.addonsConfig = $root.google.container.v1beta1.AddonsConfig.fromObject(object.addonsConfig); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetAddonsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {google.container.v1beta1.SetAddonsConfigRequest} message SetAddonsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetAddonsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.addonsConfig = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.addonsConfig != null && message.hasOwnProperty("addonsConfig")) - object.addonsConfig = $root.google.container.v1beta1.AddonsConfig.toObject(message.addonsConfig, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetAddonsConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - SetAddonsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetAddonsConfigRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetAddonsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetAddonsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetAddonsConfigRequest"; - }; - - return SetAddonsConfigRequest; - })(); - - v1beta1.SetLocationsRequest = (function() { - - /** - * Properties of a SetLocationsRequest. - * @memberof google.container.v1beta1 - * @interface ISetLocationsRequest - * @property {string|null} [projectId] SetLocationsRequest projectId - * @property {string|null} [zone] SetLocationsRequest zone - * @property {string|null} [clusterId] SetLocationsRequest clusterId - * @property {Array.|null} [locations] SetLocationsRequest locations - * @property {string|null} [name] SetLocationsRequest name - */ - - /** - * Constructs a new SetLocationsRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetLocationsRequest. - * @implements ISetLocationsRequest - * @constructor - * @param {google.container.v1beta1.ISetLocationsRequest=} [properties] Properties to set - */ - function SetLocationsRequest(properties) { - this.locations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLocationsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.projectId = ""; - - /** - * SetLocationsRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.zone = ""; - - /** - * SetLocationsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.clusterId = ""; - - /** - * SetLocationsRequest locations. - * @member {Array.} locations - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.locations = $util.emptyArray; - - /** - * SetLocationsRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - */ - SetLocationsRequest.prototype.name = ""; - - /** - * Creates a new SetLocationsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {google.container.v1beta1.ISetLocationsRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest instance - */ - SetLocationsRequest.create = function create(properties) { - return new SetLocationsRequest(properties); - }; - - /** - * Encodes the specified SetLocationsRequest message. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {google.container.v1beta1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLocationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locations[i]); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLocationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {google.container.v1beta1.ISetLocationsRequest} message SetLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLocationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLocationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLocationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLocationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLocationsRequest message. - * @function verify - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLocationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetLocationsRequest} SetLocationsRequest - */ - SetLocationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetLocationsRequest) - return object; - var message = new $root.google.container.v1beta1.SetLocationsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1beta1.SetLocationsRequest.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLocationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {google.container.v1beta1.SetLocationsRequest} message SetLocationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLocationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.locations = []; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLocationsRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetLocationsRequest - * @instance - * @returns {Object.} JSON object - */ - SetLocationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLocationsRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetLocationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetLocationsRequest"; - }; - - return SetLocationsRequest; - })(); - - v1beta1.UpdateMasterRequest = (function() { - - /** - * Properties of an UpdateMasterRequest. - * @memberof google.container.v1beta1 - * @interface IUpdateMasterRequest - * @property {string|null} [projectId] UpdateMasterRequest projectId - * @property {string|null} [zone] UpdateMasterRequest zone - * @property {string|null} [clusterId] UpdateMasterRequest clusterId - * @property {string|null} [masterVersion] UpdateMasterRequest masterVersion - * @property {string|null} [name] UpdateMasterRequest name - */ - - /** - * Constructs a new UpdateMasterRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents an UpdateMasterRequest. - * @implements IUpdateMasterRequest - * @constructor - * @param {google.container.v1beta1.IUpdateMasterRequest=} [properties] Properties to set - */ - function UpdateMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateMasterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.projectId = ""; - - /** - * UpdateMasterRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.zone = ""; - - /** - * UpdateMasterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.clusterId = ""; - - /** - * UpdateMasterRequest masterVersion. - * @member {string} masterVersion - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.masterVersion = ""; - - /** - * UpdateMasterRequest name. - * @member {string} name - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - */ - UpdateMasterRequest.prototype.name = ""; - - /** - * Creates a new UpdateMasterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {google.container.v1beta1.IUpdateMasterRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest instance - */ - UpdateMasterRequest.create = function create(properties) { - return new UpdateMasterRequest(properties); - }; - - /** - * Encodes the specified UpdateMasterRequest message. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {google.container.v1beta1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.masterVersion != null && Object.hasOwnProperty.call(message, "masterVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterVersion); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified UpdateMasterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.UpdateMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {google.container.v1beta1.IUpdateMasterRequest} message UpdateMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpdateMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.masterVersion = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateMasterRequest message. - * @function verify - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) - if (!$util.isString(message.masterVersion)) - return "masterVersion: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an UpdateMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UpdateMasterRequest} UpdateMasterRequest - */ - UpdateMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UpdateMasterRequest) - return object; - var message = new $root.google.container.v1beta1.UpdateMasterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.masterVersion != null) - message.masterVersion = String(object.masterVersion); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an UpdateMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {google.container.v1beta1.UpdateMasterRequest} message UpdateMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateMasterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.masterVersion = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.masterVersion != null && message.hasOwnProperty("masterVersion")) - object.masterVersion = message.masterVersion; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this UpdateMasterRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UpdateMasterRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateMasterRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.UpdateMasterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateMasterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UpdateMasterRequest"; - }; - - return UpdateMasterRequest; - })(); - - v1beta1.SetMasterAuthRequest = (function() { - - /** - * Properties of a SetMasterAuthRequest. - * @memberof google.container.v1beta1 - * @interface ISetMasterAuthRequest - * @property {string|null} [projectId] SetMasterAuthRequest projectId - * @property {string|null} [zone] SetMasterAuthRequest zone - * @property {string|null} [clusterId] SetMasterAuthRequest clusterId - * @property {google.container.v1beta1.SetMasterAuthRequest.Action|null} [action] SetMasterAuthRequest action - * @property {google.container.v1beta1.IMasterAuth|null} [update] SetMasterAuthRequest update - * @property {string|null} [name] SetMasterAuthRequest name - */ - - /** - * Constructs a new SetMasterAuthRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetMasterAuthRequest. - * @implements ISetMasterAuthRequest - * @constructor - * @param {google.container.v1beta1.ISetMasterAuthRequest=} [properties] Properties to set - */ - function SetMasterAuthRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMasterAuthRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.projectId = ""; - - /** - * SetMasterAuthRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.zone = ""; - - /** - * SetMasterAuthRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.clusterId = ""; - - /** - * SetMasterAuthRequest action. - * @member {google.container.v1beta1.SetMasterAuthRequest.Action} action - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.action = 0; - - /** - * SetMasterAuthRequest update. - * @member {google.container.v1beta1.IMasterAuth|null|undefined} update - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.update = null; - - /** - * SetMasterAuthRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - */ - SetMasterAuthRequest.prototype.name = ""; - - /** - * Creates a new SetMasterAuthRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {google.container.v1beta1.ISetMasterAuthRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest instance - */ - SetMasterAuthRequest.create = function create(properties) { - return new SetMasterAuthRequest(properties); - }; - - /** - * Encodes the specified SetMasterAuthRequest message. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {google.container.v1beta1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterAuthRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); - if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.container.v1beta1.MasterAuth.encode(message.update, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMasterAuthRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMasterAuthRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {google.container.v1beta1.ISetMasterAuthRequest} message SetMasterAuthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterAuthRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterAuthRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMasterAuthRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.action = reader.int32(); - break; - } - case 5: { - message.update = $root.google.container.v1beta1.MasterAuth.decode(reader, reader.uint32()); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMasterAuthRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterAuthRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMasterAuthRequest message. - * @function verify - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMasterAuthRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.update != null && message.hasOwnProperty("update")) { - var error = $root.google.container.v1beta1.MasterAuth.verify(message.update); - if (error) - return "update." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMasterAuthRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetMasterAuthRequest} SetMasterAuthRequest - */ - SetMasterAuthRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetMasterAuthRequest) - return object; - var message = new $root.google.container.v1beta1.SetMasterAuthRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "UNKNOWN": - case 0: - message.action = 0; - break; - case "SET_PASSWORD": - case 1: - message.action = 1; - break; - case "GENERATE_PASSWORD": - case 2: - message.action = 2; - break; - case "SET_USERNAME": - case 3: - message.action = 3; - break; - } - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.container.v1beta1.SetMasterAuthRequest.update: object expected"); - message.update = $root.google.container.v1beta1.MasterAuth.fromObject(object.update); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMasterAuthRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {google.container.v1beta1.SetMasterAuthRequest} message SetMasterAuthRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMasterAuthRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.action = options.enums === String ? "UNKNOWN" : 0; - object.update = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.container.v1beta1.SetMasterAuthRequest.Action[message.action] === undefined ? message.action : $root.google.container.v1beta1.SetMasterAuthRequest.Action[message.action] : message.action; - if (message.update != null && message.hasOwnProperty("update")) - object.update = $root.google.container.v1beta1.MasterAuth.toObject(message.update, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMasterAuthRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @instance - * @returns {Object.} JSON object - */ - SetMasterAuthRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMasterAuthRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetMasterAuthRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMasterAuthRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetMasterAuthRequest"; - }; - - /** - * Action enum. - * @name google.container.v1beta1.SetMasterAuthRequest.Action - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} SET_PASSWORD=1 SET_PASSWORD value - * @property {number} GENERATE_PASSWORD=2 GENERATE_PASSWORD value - * @property {number} SET_USERNAME=3 SET_USERNAME value - */ - SetMasterAuthRequest.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "SET_PASSWORD"] = 1; - values[valuesById[2] = "GENERATE_PASSWORD"] = 2; - values[valuesById[3] = "SET_USERNAME"] = 3; - return values; - })(); - - return SetMasterAuthRequest; - })(); - - v1beta1.DeleteClusterRequest = (function() { - - /** - * Properties of a DeleteClusterRequest. - * @memberof google.container.v1beta1 - * @interface IDeleteClusterRequest - * @property {string|null} [projectId] DeleteClusterRequest projectId - * @property {string|null} [zone] DeleteClusterRequest zone - * @property {string|null} [clusterId] DeleteClusterRequest clusterId - * @property {string|null} [name] DeleteClusterRequest name - */ - - /** - * Constructs a new DeleteClusterRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a DeleteClusterRequest. - * @implements IDeleteClusterRequest - * @constructor - * @param {google.container.v1beta1.IDeleteClusterRequest=} [properties] Properties to set - */ - function DeleteClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteClusterRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.projectId = ""; - - /** - * DeleteClusterRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.zone = ""; - - /** - * DeleteClusterRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.clusterId = ""; - - /** - * DeleteClusterRequest name. - * @member {string} name - * @memberof google.container.v1beta1.DeleteClusterRequest - * @instance - */ - DeleteClusterRequest.prototype.name = ""; - - /** - * Creates a new DeleteClusterRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {google.container.v1beta1.IDeleteClusterRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest instance - */ - DeleteClusterRequest.create = function create(properties) { - return new DeleteClusterRequest(properties); - }; - - /** - * Encodes the specified DeleteClusterRequest message. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {google.container.v1beta1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteClusterRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {google.container.v1beta1.IDeleteClusterRequest} message DeleteClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DeleteClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteClusterRequest message. - * @function verify - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DeleteClusterRequest} DeleteClusterRequest - */ - DeleteClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DeleteClusterRequest) - return object; - var message = new $root.google.container.v1beta1.DeleteClusterRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {google.container.v1beta1.DeleteClusterRequest} message DeleteClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteClusterRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DeleteClusterRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteClusterRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.DeleteClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DeleteClusterRequest"; - }; - - return DeleteClusterRequest; - })(); - - v1beta1.ListClustersRequest = (function() { - - /** - * Properties of a ListClustersRequest. - * @memberof google.container.v1beta1 - * @interface IListClustersRequest - * @property {string|null} [projectId] ListClustersRequest projectId - * @property {string|null} [zone] ListClustersRequest zone - * @property {string|null} [parent] ListClustersRequest parent - */ - - /** - * Constructs a new ListClustersRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListClustersRequest. - * @implements IListClustersRequest - * @constructor - * @param {google.container.v1beta1.IListClustersRequest=} [properties] Properties to set - */ - function ListClustersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListClustersRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.projectId = ""; - - /** - * ListClustersRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.zone = ""; - - /** - * ListClustersRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.ListClustersRequest - * @instance - */ - ListClustersRequest.prototype.parent = ""; - - /** - * Creates a new ListClustersRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {google.container.v1beta1.IListClustersRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest instance - */ - ListClustersRequest.create = function create(properties) { - return new ListClustersRequest(properties); - }; - - /** - * Encodes the specified ListClustersRequest message. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {google.container.v1beta1.IListClustersRequest} message ListClustersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListClustersRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {google.container.v1beta1.IListClustersRequest} message ListClustersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListClustersRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListClustersRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListClustersRequest message. - * @function verify - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListClustersRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListClustersRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListClustersRequest} ListClustersRequest - */ - ListClustersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListClustersRequest) - return object; - var message = new $root.google.container.v1beta1.ListClustersRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListClustersRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {google.container.v1beta1.ListClustersRequest} message ListClustersRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListClustersRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListClustersRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListClustersRequest - * @instance - * @returns {Object.} JSON object - */ - ListClustersRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListClustersRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.ListClustersRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListClustersRequest"; - }; - - return ListClustersRequest; - })(); - - v1beta1.ListClustersResponse = (function() { - - /** - * Properties of a ListClustersResponse. - * @memberof google.container.v1beta1 - * @interface IListClustersResponse - * @property {Array.|null} [clusters] ListClustersResponse clusters - * @property {Array.|null} [missingZones] ListClustersResponse missingZones - */ - - /** - * Constructs a new ListClustersResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListClustersResponse. - * @implements IListClustersResponse - * @constructor - * @param {google.container.v1beta1.IListClustersResponse=} [properties] Properties to set - */ - function ListClustersResponse(properties) { - this.clusters = []; - this.missingZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListClustersResponse clusters. - * @member {Array.} clusters - * @memberof google.container.v1beta1.ListClustersResponse - * @instance - */ - ListClustersResponse.prototype.clusters = $util.emptyArray; - - /** - * ListClustersResponse missingZones. - * @member {Array.} missingZones - * @memberof google.container.v1beta1.ListClustersResponse - * @instance - */ - ListClustersResponse.prototype.missingZones = $util.emptyArray; - - /** - * Creates a new ListClustersResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {google.container.v1beta1.IListClustersResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse instance - */ - ListClustersResponse.create = function create(properties) { - return new ListClustersResponse(properties); - }; - - /** - * Encodes the specified ListClustersResponse message. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {google.container.v1beta1.IListClustersResponse} message ListClustersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusters != null && message.clusters.length) - for (var i = 0; i < message.clusters.length; ++i) - $root.google.container.v1beta1.Cluster.encode(message.clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.missingZones != null && message.missingZones.length) - for (var i = 0; i < message.missingZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); - return writer; - }; - - /** - * Encodes the specified ListClustersResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListClustersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {google.container.v1beta1.IListClustersResponse} message ListClustersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListClustersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.clusters && message.clusters.length)) - message.clusters = []; - message.clusters.push($root.google.container.v1beta1.Cluster.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.missingZones && message.missingZones.length)) - message.missingZones = []; - message.missingZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListClustersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListClustersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListClustersResponse message. - * @function verify - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListClustersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusters != null && message.hasOwnProperty("clusters")) { - if (!Array.isArray(message.clusters)) - return "clusters: array expected"; - for (var i = 0; i < message.clusters.length; ++i) { - var error = $root.google.container.v1beta1.Cluster.verify(message.clusters[i]); - if (error) - return "clusters." + error; - } - } - if (message.missingZones != null && message.hasOwnProperty("missingZones")) { - if (!Array.isArray(message.missingZones)) - return "missingZones: array expected"; - for (var i = 0; i < message.missingZones.length; ++i) - if (!$util.isString(message.missingZones[i])) - return "missingZones: string[] expected"; - } - return null; - }; - - /** - * Creates a ListClustersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListClustersResponse} ListClustersResponse - */ - ListClustersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListClustersResponse) - return object; - var message = new $root.google.container.v1beta1.ListClustersResponse(); - if (object.clusters) { - if (!Array.isArray(object.clusters)) - throw TypeError(".google.container.v1beta1.ListClustersResponse.clusters: array expected"); - message.clusters = []; - for (var i = 0; i < object.clusters.length; ++i) { - if (typeof object.clusters[i] !== "object") - throw TypeError(".google.container.v1beta1.ListClustersResponse.clusters: object expected"); - message.clusters[i] = $root.google.container.v1beta1.Cluster.fromObject(object.clusters[i]); - } - } - if (object.missingZones) { - if (!Array.isArray(object.missingZones)) - throw TypeError(".google.container.v1beta1.ListClustersResponse.missingZones: array expected"); - message.missingZones = []; - for (var i = 0; i < object.missingZones.length; ++i) - message.missingZones[i] = String(object.missingZones[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListClustersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {google.container.v1beta1.ListClustersResponse} message ListClustersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListClustersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clusters = []; - object.missingZones = []; - } - if (message.clusters && message.clusters.length) { - object.clusters = []; - for (var j = 0; j < message.clusters.length; ++j) - object.clusters[j] = $root.google.container.v1beta1.Cluster.toObject(message.clusters[j], options); - } - if (message.missingZones && message.missingZones.length) { - object.missingZones = []; - for (var j = 0; j < message.missingZones.length; ++j) - object.missingZones[j] = message.missingZones[j]; - } - return object; - }; - - /** - * Converts this ListClustersResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListClustersResponse - * @instance - * @returns {Object.} JSON object - */ - ListClustersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListClustersResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.ListClustersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListClustersResponse"; - }; - - return ListClustersResponse; - })(); - - v1beta1.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.container.v1beta1 - * @interface IGetOperationRequest - * @property {string|null} [projectId] GetOperationRequest projectId - * @property {string|null} [zone] GetOperationRequest zone - * @property {string|null} [operationId] GetOperationRequest operationId - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.container.v1beta1.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.projectId = ""; - - /** - * GetOperationRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.zone = ""; - - /** - * GetOperationRequest operationId. - * @member {string} operationId - * @memberof google.container.v1beta1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.operationId = ""; - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.container.v1beta1.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {google.container.v1beta1.IGetOperationRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {google.container.v1beta1.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {google.container.v1beta1.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationId = reader.string(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationId != null && message.hasOwnProperty("operationId")) - if (!$util.isString(message.operationId)) - return "operationId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetOperationRequest) - return object; - var message = new $root.google.container.v1beta1.GetOperationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.operationId != null) - message.operationId = String(object.operationId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {google.container.v1beta1.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.operationId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationId != null && message.hasOwnProperty("operationId")) - object.operationId = message.operationId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - v1beta1.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.container.v1beta1 - * @interface IListOperationsRequest - * @property {string|null} [projectId] ListOperationsRequest projectId - * @property {string|null} [zone] ListOperationsRequest zone - * @property {string|null} [parent] ListOperationsRequest parent - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.container.v1beta1.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.projectId = ""; - - /** - * ListOperationsRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.zone = ""; - - /** - * ListOperationsRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.parent = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {google.container.v1beta1.IListOperationsRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {google.container.v1beta1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {google.container.v1beta1.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListOperationsRequest) - return object; - var message = new $root.google.container.v1beta1.ListOperationsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {google.container.v1beta1.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - v1beta1.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.container.v1beta1 - * @interface ICancelOperationRequest - * @property {string|null} [projectId] CancelOperationRequest projectId - * @property {string|null} [zone] CancelOperationRequest zone - * @property {string|null} [operationId] CancelOperationRequest operationId - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.container.v1beta1.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.projectId = ""; - - /** - * CancelOperationRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.zone = ""; - - /** - * CancelOperationRequest operationId. - * @member {string} operationId - * @memberof google.container.v1beta1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.operationId = ""; - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.container.v1beta1.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {google.container.v1beta1.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {google.container.v1beta1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {google.container.v1beta1.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.operationId = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.operationId != null && message.hasOwnProperty("operationId")) - if (!$util.isString(message.operationId)) - return "operationId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CancelOperationRequest) - return object; - var message = new $root.google.container.v1beta1.CancelOperationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.operationId != null) - message.operationId = String(object.operationId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {google.container.v1beta1.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.operationId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.operationId != null && message.hasOwnProperty("operationId")) - object.operationId = message.operationId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - v1beta1.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.container.v1beta1 - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {Array.|null} [missingZones] ListOperationsResponse missingZones - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.container.v1beta1.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - this.missingZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.container.v1beta1.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse missingZones. - * @member {Array.} missingZones - * @memberof google.container.v1beta1.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.missingZones = $util.emptyArray; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {google.container.v1beta1.IListOperationsResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {google.container.v1beta1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.container.v1beta1.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.missingZones != null && message.missingZones.length) - for (var i = 0; i < message.missingZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingZones[i]); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {google.container.v1beta1.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.container.v1beta1.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.missingZones && message.missingZones.length)) - message.missingZones = []; - message.missingZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.container.v1beta1.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.missingZones != null && message.hasOwnProperty("missingZones")) { - if (!Array.isArray(message.missingZones)) - return "missingZones: array expected"; - for (var i = 0; i < message.missingZones.length; ++i) - if (!$util.isString(message.missingZones[i])) - return "missingZones: string[] expected"; - } - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListOperationsResponse) - return object; - var message = new $root.google.container.v1beta1.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.container.v1beta1.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.container.v1beta1.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.container.v1beta1.Operation.fromObject(object.operations[i]); - } - } - if (object.missingZones) { - if (!Array.isArray(object.missingZones)) - throw TypeError(".google.container.v1beta1.ListOperationsResponse.missingZones: array expected"); - message.missingZones = []; - for (var i = 0; i < object.missingZones.length; ++i) - message.missingZones[i] = String(object.missingZones[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {google.container.v1beta1.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.operations = []; - object.missingZones = []; - } - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.container.v1beta1.Operation.toObject(message.operations[j], options); - } - if (message.missingZones && message.missingZones.length) { - object.missingZones = []; - for (var j = 0; j < message.missingZones.length; ++j) - object.missingZones[j] = message.missingZones[j]; - } - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - v1beta1.GetServerConfigRequest = (function() { - - /** - * Properties of a GetServerConfigRequest. - * @memberof google.container.v1beta1 - * @interface IGetServerConfigRequest - * @property {string|null} [projectId] GetServerConfigRequest projectId - * @property {string|null} [zone] GetServerConfigRequest zone - * @property {string|null} [name] GetServerConfigRequest name - */ - - /** - * Constructs a new GetServerConfigRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetServerConfigRequest. - * @implements IGetServerConfigRequest - * @constructor - * @param {google.container.v1beta1.IGetServerConfigRequest=} [properties] Properties to set - */ - function GetServerConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetServerConfigRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.projectId = ""; - - /** - * GetServerConfigRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.zone = ""; - - /** - * GetServerConfigRequest name. - * @member {string} name - * @memberof google.container.v1beta1.GetServerConfigRequest - * @instance - */ - GetServerConfigRequest.prototype.name = ""; - - /** - * Creates a new GetServerConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {google.container.v1beta1.IGetServerConfigRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest instance - */ - GetServerConfigRequest.create = function create(properties) { - return new GetServerConfigRequest(properties); - }; - - /** - * Encodes the specified GetServerConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {google.container.v1beta1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServerConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetServerConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetServerConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {google.container.v1beta1.IGetServerConfigRequest} message GetServerConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServerConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetServerConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetServerConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetServerConfigRequest message. - * @function verify - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetServerConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetServerConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetServerConfigRequest} GetServerConfigRequest - */ - GetServerConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetServerConfigRequest) - return object; - var message = new $root.google.container.v1beta1.GetServerConfigRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetServerConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {google.container.v1beta1.GetServerConfigRequest} message GetServerConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetServerConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetServerConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetServerConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetServerConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetServerConfigRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetServerConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetServerConfigRequest"; - }; - - return GetServerConfigRequest; - })(); - - v1beta1.ServerConfig = (function() { - - /** - * Properties of a ServerConfig. - * @memberof google.container.v1beta1 - * @interface IServerConfig - * @property {string|null} [defaultClusterVersion] ServerConfig defaultClusterVersion - * @property {Array.|null} [validNodeVersions] ServerConfig validNodeVersions - * @property {string|null} [defaultImageType] ServerConfig defaultImageType - * @property {Array.|null} [validImageTypes] ServerConfig validImageTypes - * @property {Array.|null} [validMasterVersions] ServerConfig validMasterVersions - * @property {Array.|null} [channels] ServerConfig channels - * @property {Object.|null} [windowsVersionMaps] ServerConfig windowsVersionMaps - */ - - /** - * Constructs a new ServerConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ServerConfig. - * @implements IServerConfig - * @constructor - * @param {google.container.v1beta1.IServerConfig=} [properties] Properties to set - */ - function ServerConfig(properties) { - this.validNodeVersions = []; - this.validImageTypes = []; - this.validMasterVersions = []; - this.channels = []; - this.windowsVersionMaps = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerConfig defaultClusterVersion. - * @member {string} defaultClusterVersion - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.defaultClusterVersion = ""; - - /** - * ServerConfig validNodeVersions. - * @member {Array.} validNodeVersions - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.validNodeVersions = $util.emptyArray; - - /** - * ServerConfig defaultImageType. - * @member {string} defaultImageType - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.defaultImageType = ""; - - /** - * ServerConfig validImageTypes. - * @member {Array.} validImageTypes - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.validImageTypes = $util.emptyArray; - - /** - * ServerConfig validMasterVersions. - * @member {Array.} validMasterVersions - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.validMasterVersions = $util.emptyArray; - - /** - * ServerConfig channels. - * @member {Array.} channels - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.channels = $util.emptyArray; - - /** - * ServerConfig windowsVersionMaps. - * @member {Object.} windowsVersionMaps - * @memberof google.container.v1beta1.ServerConfig - * @instance - */ - ServerConfig.prototype.windowsVersionMaps = $util.emptyObject; - - /** - * Creates a new ServerConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {google.container.v1beta1.IServerConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ServerConfig} ServerConfig instance - */ - ServerConfig.create = function create(properties) { - return new ServerConfig(properties); - }; - - /** - * Encodes the specified ServerConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {google.container.v1beta1.IServerConfig} message ServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaultClusterVersion != null && Object.hasOwnProperty.call(message, "defaultClusterVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultClusterVersion); - if (message.validNodeVersions != null && message.validNodeVersions.length) - for (var i = 0; i < message.validNodeVersions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.validNodeVersions[i]); - if (message.defaultImageType != null && Object.hasOwnProperty.call(message, "defaultImageType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultImageType); - if (message.validImageTypes != null && message.validImageTypes.length) - for (var i = 0; i < message.validImageTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.validImageTypes[i]); - if (message.validMasterVersions != null && message.validMasterVersions.length) - for (var i = 0; i < message.validMasterVersions.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.validMasterVersions[i]); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.encode(message.channels[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.windowsVersionMaps != null && Object.hasOwnProperty.call(message, "windowsVersionMaps")) - for (var keys = Object.keys(message.windowsVersionMaps), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.container.v1beta1.WindowsVersions.encode(message.windowsVersionMaps[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ServerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {google.container.v1beta1.IServerConfig} message ServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ServerConfig} ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.defaultClusterVersion = reader.string(); - break; - } - case 3: { - if (!(message.validNodeVersions && message.validNodeVersions.length)) - message.validNodeVersions = []; - message.validNodeVersions.push(reader.string()); - break; - } - case 4: { - message.defaultImageType = reader.string(); - break; - } - case 5: { - if (!(message.validImageTypes && message.validImageTypes.length)) - message.validImageTypes = []; - message.validImageTypes.push(reader.string()); - break; - } - case 6: { - if (!(message.validMasterVersions && message.validMasterVersions.length)) - message.validMasterVersions = []; - message.validMasterVersions.push(reader.string()); - break; - } - case 9: { - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.decode(reader, reader.uint32())); - break; - } - case 10: { - if (message.windowsVersionMaps === $util.emptyObject) - message.windowsVersionMaps = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.container.v1beta1.WindowsVersions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.windowsVersionMaps[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ServerConfig} ServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerConfig message. - * @function verify - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) - if (!$util.isString(message.defaultClusterVersion)) - return "defaultClusterVersion: string expected"; - if (message.validNodeVersions != null && message.hasOwnProperty("validNodeVersions")) { - if (!Array.isArray(message.validNodeVersions)) - return "validNodeVersions: array expected"; - for (var i = 0; i < message.validNodeVersions.length; ++i) - if (!$util.isString(message.validNodeVersions[i])) - return "validNodeVersions: string[] expected"; - } - if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) - if (!$util.isString(message.defaultImageType)) - return "defaultImageType: string expected"; - if (message.validImageTypes != null && message.hasOwnProperty("validImageTypes")) { - if (!Array.isArray(message.validImageTypes)) - return "validImageTypes: array expected"; - for (var i = 0; i < message.validImageTypes.length; ++i) - if (!$util.isString(message.validImageTypes[i])) - return "validImageTypes: string[] expected"; - } - if (message.validMasterVersions != null && message.hasOwnProperty("validMasterVersions")) { - if (!Array.isArray(message.validMasterVersions)) - return "validMasterVersions: array expected"; - for (var i = 0; i < message.validMasterVersions.length; ++i) - if (!$util.isString(message.validMasterVersions[i])) - return "validMasterVersions: string[] expected"; - } - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.windowsVersionMaps != null && message.hasOwnProperty("windowsVersionMaps")) { - if (!$util.isObject(message.windowsVersionMaps)) - return "windowsVersionMaps: object expected"; - var key = Object.keys(message.windowsVersionMaps); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.container.v1beta1.WindowsVersions.verify(message.windowsVersionMaps[key[i]]); - if (error) - return "windowsVersionMaps." + error; - } - } - return null; - }; - - /** - * Creates a ServerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ServerConfig} ServerConfig - */ - ServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ServerConfig) - return object; - var message = new $root.google.container.v1beta1.ServerConfig(); - if (object.defaultClusterVersion != null) - message.defaultClusterVersion = String(object.defaultClusterVersion); - if (object.validNodeVersions) { - if (!Array.isArray(object.validNodeVersions)) - throw TypeError(".google.container.v1beta1.ServerConfig.validNodeVersions: array expected"); - message.validNodeVersions = []; - for (var i = 0; i < object.validNodeVersions.length; ++i) - message.validNodeVersions[i] = String(object.validNodeVersions[i]); - } - if (object.defaultImageType != null) - message.defaultImageType = String(object.defaultImageType); - if (object.validImageTypes) { - if (!Array.isArray(object.validImageTypes)) - throw TypeError(".google.container.v1beta1.ServerConfig.validImageTypes: array expected"); - message.validImageTypes = []; - for (var i = 0; i < object.validImageTypes.length; ++i) - message.validImageTypes[i] = String(object.validImageTypes[i]); - } - if (object.validMasterVersions) { - if (!Array.isArray(object.validMasterVersions)) - throw TypeError(".google.container.v1beta1.ServerConfig.validMasterVersions: array expected"); - message.validMasterVersions = []; - for (var i = 0; i < object.validMasterVersions.length; ++i) - message.validMasterVersions[i] = String(object.validMasterVersions[i]); - } - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".google.container.v1beta1.ServerConfig.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".google.container.v1beta1.ServerConfig.channels: object expected"); - message.channels[i] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.fromObject(object.channels[i]); - } - } - if (object.windowsVersionMaps) { - if (typeof object.windowsVersionMaps !== "object") - throw TypeError(".google.container.v1beta1.ServerConfig.windowsVersionMaps: object expected"); - message.windowsVersionMaps = {}; - for (var keys = Object.keys(object.windowsVersionMaps), i = 0; i < keys.length; ++i) { - if (typeof object.windowsVersionMaps[keys[i]] !== "object") - throw TypeError(".google.container.v1beta1.ServerConfig.windowsVersionMaps: object expected"); - message.windowsVersionMaps[keys[i]] = $root.google.container.v1beta1.WindowsVersions.fromObject(object.windowsVersionMaps[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a ServerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {google.container.v1beta1.ServerConfig} message ServerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.validNodeVersions = []; - object.validImageTypes = []; - object.validMasterVersions = []; - object.channels = []; - } - if (options.objects || options.defaults) - object.windowsVersionMaps = {}; - if (options.defaults) { - object.defaultClusterVersion = ""; - object.defaultImageType = ""; - } - if (message.defaultClusterVersion != null && message.hasOwnProperty("defaultClusterVersion")) - object.defaultClusterVersion = message.defaultClusterVersion; - if (message.validNodeVersions && message.validNodeVersions.length) { - object.validNodeVersions = []; - for (var j = 0; j < message.validNodeVersions.length; ++j) - object.validNodeVersions[j] = message.validNodeVersions[j]; - } - if (message.defaultImageType != null && message.hasOwnProperty("defaultImageType")) - object.defaultImageType = message.defaultImageType; - if (message.validImageTypes && message.validImageTypes.length) { - object.validImageTypes = []; - for (var j = 0; j < message.validImageTypes.length; ++j) - object.validImageTypes[j] = message.validImageTypes[j]; - } - if (message.validMasterVersions && message.validMasterVersions.length) { - object.validMasterVersions = []; - for (var j = 0; j < message.validMasterVersions.length; ++j) - object.validMasterVersions[j] = message.validMasterVersions[j]; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.toObject(message.channels[j], options); - } - var keys2; - if (message.windowsVersionMaps && (keys2 = Object.keys(message.windowsVersionMaps)).length) { - object.windowsVersionMaps = {}; - for (var j = 0; j < keys2.length; ++j) - object.windowsVersionMaps[keys2[j]] = $root.google.container.v1beta1.WindowsVersions.toObject(message.windowsVersionMaps[keys2[j]], options); - } - return object; - }; - - /** - * Converts this ServerConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ServerConfig - * @instance - * @returns {Object.} JSON object - */ - ServerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ServerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ServerConfig"; - }; - - ServerConfig.ReleaseChannelConfig = (function() { - - /** - * Properties of a ReleaseChannelConfig. - * @memberof google.container.v1beta1.ServerConfig - * @interface IReleaseChannelConfig - * @property {google.container.v1beta1.ReleaseChannel.Channel|null} [channel] ReleaseChannelConfig channel - * @property {string|null} [defaultVersion] ReleaseChannelConfig defaultVersion - * @property {Array.|null} [availableVersions] ReleaseChannelConfig availableVersions - * @property {Array.|null} [validVersions] ReleaseChannelConfig validVersions - */ - - /** - * Constructs a new ReleaseChannelConfig. - * @memberof google.container.v1beta1.ServerConfig - * @classdesc Represents a ReleaseChannelConfig. - * @implements IReleaseChannelConfig - * @constructor - * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set - */ - function ReleaseChannelConfig(properties) { - this.availableVersions = []; - this.validVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReleaseChannelConfig channel. - * @member {google.container.v1beta1.ReleaseChannel.Channel} channel - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.channel = 0; - - /** - * ReleaseChannelConfig defaultVersion. - * @member {string} defaultVersion - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.defaultVersion = ""; - - /** - * ReleaseChannelConfig availableVersions. - * @member {Array.} availableVersions - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.availableVersions = $util.emptyArray; - - /** - * ReleaseChannelConfig validVersions. - * @member {Array.} validVersions - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @instance - */ - ReleaseChannelConfig.prototype.validVersions = $util.emptyArray; - - /** - * Creates a new ReleaseChannelConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig instance - */ - ReleaseChannelConfig.create = function create(properties) { - return new ReleaseChannelConfig(properties); - }; - - /** - * Encodes the specified ReleaseChannelConfig message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannelConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - if (message.defaultVersion != null && Object.hasOwnProperty.call(message, "defaultVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultVersion); - if (message.availableVersions != null && message.availableVersions.length) - for (var i = 0; i < message.availableVersions.length; ++i) - $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.encode(message.availableVersions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validVersions != null && message.validVersions.length) - for (var i = 0; i < message.validVersions.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.validVersions[i]); - return writer; - }; - - /** - * Encodes the specified ReleaseChannelConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1beta1.ServerConfig.IReleaseChannelConfig} message ReleaseChannelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannelConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - case 2: { - message.defaultVersion = reader.string(); - break; - } - case 3: { - if (!(message.availableVersions && message.availableVersions.length)) - message.availableVersions = []; - message.availableVersions.push($root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.validVersions && message.validVersions.length)) - message.validVersions = []; - message.validVersions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseChannelConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannelConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseChannelConfig message. - * @function verify - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseChannelConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) - if (!$util.isString(message.defaultVersion)) - return "defaultVersion: string expected"; - if (message.availableVersions != null && message.hasOwnProperty("availableVersions")) { - if (!Array.isArray(message.availableVersions)) - return "availableVersions: array expected"; - for (var i = 0; i < message.availableVersions.length; ++i) { - var error = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify(message.availableVersions[i]); - if (error) - return "availableVersions." + error; - } - } - 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) - if (!$util.isString(message.validVersions[i])) - return "validVersions: string[] expected"; - } - return null; - }; - - /** - * Creates a ReleaseChannelConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} ReleaseChannelConfig - */ - ReleaseChannelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig) - return object; - var message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "RAPID": - case 1: - message.channel = 1; - break; - case "REGULAR": - case 2: - message.channel = 2; - break; - case "STABLE": - case 3: - message.channel = 3; - break; - case "EXTENDED": - case 4: - message.channel = 4; - break; - } - if (object.defaultVersion != null) - message.defaultVersion = String(object.defaultVersion); - if (object.availableVersions) { - if (!Array.isArray(object.availableVersions)) - throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.availableVersions: array expected"); - message.availableVersions = []; - for (var i = 0; i < object.availableVersions.length; ++i) { - if (typeof object.availableVersions[i] !== "object") - throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.availableVersions: object expected"); - message.availableVersions[i] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.fromObject(object.availableVersions[i]); - } - } - if (object.validVersions) { - if (!Array.isArray(object.validVersions)) - throw TypeError(".google.container.v1beta1.ServerConfig.ReleaseChannelConfig.validVersions: array expected"); - message.validVersions = []; - for (var i = 0; i < object.validVersions.length; ++i) - message.validVersions[i] = String(object.validVersions[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReleaseChannelConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig} message ReleaseChannelConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseChannelConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.availableVersions = []; - object.validVersions = []; - } - if (options.defaults) { - object.channel = options.enums === String ? "UNSPECIFIED" : 0; - object.defaultVersion = ""; - } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] : message.channel; - if (message.defaultVersion != null && message.hasOwnProperty("defaultVersion")) - object.defaultVersion = message.defaultVersion; - if (message.availableVersions && message.availableVersions.length) { - object.availableVersions = []; - for (var j = 0; j < message.availableVersions.length; ++j) - object.availableVersions[j] = $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.toObject(message.availableVersions[j], options); - } - if (message.validVersions && message.validVersions.length) { - object.validVersions = []; - for (var j = 0; j < message.validVersions.length; ++j) - object.validVersions[j] = message.validVersions[j]; - } - return object; - }; - - /** - * Converts this ReleaseChannelConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @instance - * @returns {Object.} JSON object - */ - ReleaseChannelConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReleaseChannelConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ServerConfig.ReleaseChannelConfig"; - }; - - ReleaseChannelConfig.AvailableVersion = (function() { - - /** - * Properties of an AvailableVersion. - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @interface IAvailableVersion - * @property {string|null} [version] AvailableVersion version - * @property {string|null} [reason] AvailableVersion reason - */ - - /** - * Constructs a new AvailableVersion. - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig - * @classdesc Represents an AvailableVersion. - * @implements IAvailableVersion - * @constructor - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion=} [properties] Properties to set - */ - function AvailableVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AvailableVersion version. - * @member {string} version - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @instance - */ - AvailableVersion.prototype.version = ""; - - /** - * AvailableVersion reason. - * @member {string} reason - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @instance - */ - AvailableVersion.prototype.reason = ""; - - /** - * Creates a new AvailableVersion instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion=} [properties] Properties to set - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion instance - */ - AvailableVersion.create = function create(properties) { - return new AvailableVersion(properties); - }; - - /** - * Encodes the specified AvailableVersion message. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion} message AvailableVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvailableVersion.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.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); - return writer; - }; - - /** - * Encodes the specified AvailableVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.IAvailableVersion} message AvailableVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvailableVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AvailableVersion message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvailableVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.reason = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AvailableVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvailableVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvailableVersion message. - * @function verify - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvailableVersion.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.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - return null; - }; - - /** - * Creates an AvailableVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} AvailableVersion - */ - AvailableVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion) - return object; - var message = new $root.google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion(); - if (object.version != null) - message.version = String(object.version); - if (object.reason != null) - message.reason = String(object.reason); - return message; - }; - - /** - * Creates a plain object from an AvailableVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion} message AvailableVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvailableVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.reason = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - return object; - }; - - /** - * Converts this AvailableVersion to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @instance - * @returns {Object.} JSON object - */ - AvailableVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvailableVersion - * @function getTypeUrl - * @memberof google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvailableVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ServerConfig.ReleaseChannelConfig.AvailableVersion"; - }; - - return AvailableVersion; - })(); - - return ReleaseChannelConfig; - })(); - - return ServerConfig; - })(); - - v1beta1.BestEffortProvisioning = (function() { - - /** - * Properties of a BestEffortProvisioning. - * @memberof google.container.v1beta1 - * @interface IBestEffortProvisioning - * @property {boolean|null} [enabled] BestEffortProvisioning enabled - * @property {number|null} [minProvisionNodes] BestEffortProvisioning minProvisionNodes - */ - - /** - * Constructs a new BestEffortProvisioning. - * @memberof google.container.v1beta1 - * @classdesc Represents a BestEffortProvisioning. - * @implements IBestEffortProvisioning - * @constructor - * @param {google.container.v1beta1.IBestEffortProvisioning=} [properties] Properties to set - */ - function BestEffortProvisioning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BestEffortProvisioning enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.BestEffortProvisioning - * @instance - */ - BestEffortProvisioning.prototype.enabled = false; - - /** - * BestEffortProvisioning minProvisionNodes. - * @member {number} minProvisionNodes - * @memberof google.container.v1beta1.BestEffortProvisioning - * @instance - */ - BestEffortProvisioning.prototype.minProvisionNodes = 0; - - /** - * Creates a new BestEffortProvisioning instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {google.container.v1beta1.IBestEffortProvisioning=} [properties] Properties to set - * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning instance - */ - BestEffortProvisioning.create = function create(properties) { - return new BestEffortProvisioning(properties); - }; - - /** - * Encodes the specified BestEffortProvisioning message. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {google.container.v1beta1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BestEffortProvisioning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.minProvisionNodes != null && Object.hasOwnProperty.call(message, "minProvisionNodes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minProvisionNodes); - return writer; - }; - - /** - * Encodes the specified BestEffortProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.BestEffortProvisioning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {google.container.v1beta1.IBestEffortProvisioning} message BestEffortProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BestEffortProvisioning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BestEffortProvisioning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BestEffortProvisioning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.minProvisionNodes = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BestEffortProvisioning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BestEffortProvisioning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BestEffortProvisioning message. - * @function verify - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BestEffortProvisioning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) - if (!$util.isInteger(message.minProvisionNodes)) - return "minProvisionNodes: integer expected"; - return null; - }; - - /** - * Creates a BestEffortProvisioning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BestEffortProvisioning} BestEffortProvisioning - */ - BestEffortProvisioning.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BestEffortProvisioning) - return object; - var message = new $root.google.container.v1beta1.BestEffortProvisioning(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.minProvisionNodes != null) - message.minProvisionNodes = object.minProvisionNodes | 0; - return message; - }; - - /** - * Creates a plain object from a BestEffortProvisioning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {google.container.v1beta1.BestEffortProvisioning} message BestEffortProvisioning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BestEffortProvisioning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.minProvisionNodes = 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.minProvisionNodes != null && message.hasOwnProperty("minProvisionNodes")) - object.minProvisionNodes = message.minProvisionNodes; - return object; - }; - - /** - * Converts this BestEffortProvisioning to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BestEffortProvisioning - * @instance - * @returns {Object.} JSON object - */ - BestEffortProvisioning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BestEffortProvisioning - * @function getTypeUrl - * @memberof google.container.v1beta1.BestEffortProvisioning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BestEffortProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BestEffortProvisioning"; - }; - - return BestEffortProvisioning; - })(); - - v1beta1.WindowsVersions = (function() { - - /** - * Properties of a WindowsVersions. - * @memberof google.container.v1beta1 - * @interface IWindowsVersions - * @property {Array.|null} [windowsVersions] WindowsVersions windowsVersions - */ - - /** - * Constructs a new WindowsVersions. - * @memberof google.container.v1beta1 - * @classdesc Represents a WindowsVersions. - * @implements IWindowsVersions - * @constructor - * @param {google.container.v1beta1.IWindowsVersions=} [properties] Properties to set - */ - function WindowsVersions(properties) { - this.windowsVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsVersions windowsVersions. - * @member {Array.} windowsVersions - * @memberof google.container.v1beta1.WindowsVersions - * @instance - */ - WindowsVersions.prototype.windowsVersions = $util.emptyArray; - - /** - * Creates a new WindowsVersions instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {google.container.v1beta1.IWindowsVersions=} [properties] Properties to set - * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions instance - */ - WindowsVersions.create = function create(properties) { - return new WindowsVersions(properties); - }; - - /** - * Encodes the specified WindowsVersions message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {google.container.v1beta1.IWindowsVersions} message WindowsVersions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsVersions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.windowsVersions != null && message.windowsVersions.length) - for (var i = 0; i < message.windowsVersions.length; ++i) - $root.google.container.v1beta1.WindowsVersions.WindowsVersion.encode(message.windowsVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WindowsVersions message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {google.container.v1beta1.IWindowsVersions} message WindowsVersions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsVersions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsVersions message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsVersions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsVersions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.windowsVersions && message.windowsVersions.length)) - message.windowsVersions = []; - message.windowsVersions.push($root.google.container.v1beta1.WindowsVersions.WindowsVersion.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsVersions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsVersions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsVersions message. - * @function verify - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsVersions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) { - if (!Array.isArray(message.windowsVersions)) - return "windowsVersions: array expected"; - for (var i = 0; i < message.windowsVersions.length; ++i) { - var error = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.verify(message.windowsVersions[i]); - if (error) - return "windowsVersions." + error; - } - } - return null; - }; - - /** - * Creates a WindowsVersions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WindowsVersions} WindowsVersions - */ - WindowsVersions.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WindowsVersions) - return object; - var message = new $root.google.container.v1beta1.WindowsVersions(); - if (object.windowsVersions) { - if (!Array.isArray(object.windowsVersions)) - throw TypeError(".google.container.v1beta1.WindowsVersions.windowsVersions: array expected"); - message.windowsVersions = []; - for (var i = 0; i < object.windowsVersions.length; ++i) { - if (typeof object.windowsVersions[i] !== "object") - throw TypeError(".google.container.v1beta1.WindowsVersions.windowsVersions: object expected"); - message.windowsVersions[i] = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.fromObject(object.windowsVersions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a WindowsVersions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {google.container.v1beta1.WindowsVersions} message WindowsVersions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsVersions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.windowsVersions = []; - if (message.windowsVersions && message.windowsVersions.length) { - object.windowsVersions = []; - for (var j = 0; j < message.windowsVersions.length; ++j) - object.windowsVersions[j] = $root.google.container.v1beta1.WindowsVersions.WindowsVersion.toObject(message.windowsVersions[j], options); - } - return object; - }; - - /** - * Converts this WindowsVersions to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WindowsVersions - * @instance - * @returns {Object.} JSON object - */ - WindowsVersions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WindowsVersions - * @function getTypeUrl - * @memberof google.container.v1beta1.WindowsVersions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WindowsVersions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WindowsVersions"; - }; - - WindowsVersions.WindowsVersion = (function() { - - /** - * Properties of a WindowsVersion. - * @memberof google.container.v1beta1.WindowsVersions - * @interface IWindowsVersion - * @property {string|null} [imageType] WindowsVersion imageType - * @property {string|null} [osVersion] WindowsVersion osVersion - * @property {google.type.IDate|null} [supportEndDate] WindowsVersion supportEndDate - */ - - /** - * Constructs a new WindowsVersion. - * @memberof google.container.v1beta1.WindowsVersions - * @classdesc Represents a WindowsVersion. - * @implements IWindowsVersion - * @constructor - * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion=} [properties] Properties to set - */ - function WindowsVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsVersion imageType. - * @member {string} imageType - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @instance - */ - WindowsVersion.prototype.imageType = ""; - - /** - * WindowsVersion osVersion. - * @member {string} osVersion - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @instance - */ - WindowsVersion.prototype.osVersion = ""; - - /** - * WindowsVersion supportEndDate. - * @member {google.type.IDate|null|undefined} supportEndDate - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @instance - */ - WindowsVersion.prototype.supportEndDate = null; - - /** - * Creates a new WindowsVersion instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion=} [properties] Properties to set - * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion instance - */ - WindowsVersion.create = function create(properties) { - return new WindowsVersion(properties); - }; - - /** - * Encodes the specified WindowsVersion message. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion} message WindowsVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageType); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); - if (message.supportEndDate != null && Object.hasOwnProperty.call(message, "supportEndDate")) - $root.google.type.Date.encode(message.supportEndDate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WindowsVersion message, length delimited. Does not implicitly {@link google.container.v1beta1.WindowsVersions.WindowsVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {google.container.v1beta1.WindowsVersions.IWindowsVersion} message WindowsVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsVersion message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WindowsVersions.WindowsVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageType = reader.string(); - break; - } - case 2: { - message.osVersion = reader.string(); - break; - } - case 3: { - message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsVersion message. - * @function verify - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - if (!$util.isString(message.osVersion)) - return "osVersion: string expected"; - if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) { - var error = $root.google.type.Date.verify(message.supportEndDate); - if (error) - return "supportEndDate." + error; - } - return null; - }; - - /** - * Creates a WindowsVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WindowsVersions.WindowsVersion} WindowsVersion - */ - WindowsVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WindowsVersions.WindowsVersion) - return object; - var message = new $root.google.container.v1beta1.WindowsVersions.WindowsVersion(); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.osVersion != null) - message.osVersion = String(object.osVersion); - if (object.supportEndDate != null) { - if (typeof object.supportEndDate !== "object") - throw TypeError(".google.container.v1beta1.WindowsVersions.WindowsVersion.supportEndDate: object expected"); - message.supportEndDate = $root.google.type.Date.fromObject(object.supportEndDate); - } - return message; - }; - - /** - * Creates a plain object from a WindowsVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {google.container.v1beta1.WindowsVersions.WindowsVersion} message WindowsVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.imageType = ""; - object.osVersion = ""; - object.supportEndDate = null; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = message.osVersion; - if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) - object.supportEndDate = $root.google.type.Date.toObject(message.supportEndDate, options); - return object; - }; - - /** - * Converts this WindowsVersion to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @instance - * @returns {Object.} JSON object - */ - WindowsVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WindowsVersion - * @function getTypeUrl - * @memberof google.container.v1beta1.WindowsVersions.WindowsVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WindowsVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WindowsVersions.WindowsVersion"; - }; - - return WindowsVersion; - })(); - - return WindowsVersions; - })(); - - v1beta1.CreateNodePoolRequest = (function() { - - /** - * Properties of a CreateNodePoolRequest. - * @memberof google.container.v1beta1 - * @interface ICreateNodePoolRequest - * @property {string|null} [projectId] CreateNodePoolRequest projectId - * @property {string|null} [zone] CreateNodePoolRequest zone - * @property {string|null} [clusterId] CreateNodePoolRequest clusterId - * @property {google.container.v1beta1.INodePool|null} [nodePool] CreateNodePoolRequest nodePool - * @property {string|null} [parent] CreateNodePoolRequest parent - */ - - /** - * Constructs a new CreateNodePoolRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CreateNodePoolRequest. - * @implements ICreateNodePoolRequest - * @constructor - * @param {google.container.v1beta1.ICreateNodePoolRequest=} [properties] Properties to set - */ - function CreateNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.projectId = ""; - - /** - * CreateNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.zone = ""; - - /** - * CreateNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.clusterId = ""; - - /** - * CreateNodePoolRequest nodePool. - * @member {google.container.v1beta1.INodePool|null|undefined} nodePool - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.nodePool = null; - - /** - * CreateNodePoolRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - */ - CreateNodePoolRequest.prototype.parent = ""; - - /** - * Creates a new CreateNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {google.container.v1beta1.ICreateNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest instance - */ - CreateNodePoolRequest.create = function create(properties) { - return new CreateNodePoolRequest(properties); - }; - - /** - * Encodes the specified CreateNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {google.container.v1beta1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePool != null && Object.hasOwnProperty.call(message, "nodePool")) - $root.google.container.v1beta1.NodePool.encode(message.nodePool, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.parent); - return writer; - }; - - /** - * Encodes the specified CreateNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CreateNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {google.container.v1beta1.ICreateNodePoolRequest} message CreateNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CreateNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePool = $root.google.container.v1beta1.NodePool.decode(reader, reader.uint32()); - break; - } - case 6: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateNodePoolRequest message. - * @function verify - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePool != null && message.hasOwnProperty("nodePool")) { - var error = $root.google.container.v1beta1.NodePool.verify(message.nodePool); - if (error) - return "nodePool." + error; - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a CreateNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CreateNodePoolRequest} CreateNodePoolRequest - */ - CreateNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CreateNodePoolRequest) - return object; - var message = new $root.google.container.v1beta1.CreateNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePool != null) { - if (typeof object.nodePool !== "object") - throw TypeError(".google.container.v1beta1.CreateNodePoolRequest.nodePool: object expected"); - message.nodePool = $root.google.container.v1beta1.NodePool.fromObject(object.nodePool); - } - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a CreateNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {google.container.v1beta1.CreateNodePoolRequest} message CreateNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePool = null; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePool != null && message.hasOwnProperty("nodePool")) - object.nodePool = $root.google.container.v1beta1.NodePool.toObject(message.nodePool, options); - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this CreateNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - CreateNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CreateNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CreateNodePoolRequest"; - }; - - return CreateNodePoolRequest; - })(); - - v1beta1.DeleteNodePoolRequest = (function() { - - /** - * Properties of a DeleteNodePoolRequest. - * @memberof google.container.v1beta1 - * @interface IDeleteNodePoolRequest - * @property {string|null} [projectId] DeleteNodePoolRequest projectId - * @property {string|null} [zone] DeleteNodePoolRequest zone - * @property {string|null} [clusterId] DeleteNodePoolRequest clusterId - * @property {string|null} [nodePoolId] DeleteNodePoolRequest nodePoolId - * @property {string|null} [name] DeleteNodePoolRequest name - */ - - /** - * Constructs a new DeleteNodePoolRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a DeleteNodePoolRequest. - * @implements IDeleteNodePoolRequest - * @constructor - * @param {google.container.v1beta1.IDeleteNodePoolRequest=} [properties] Properties to set - */ - function DeleteNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.projectId = ""; - - /** - * DeleteNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.zone = ""; - - /** - * DeleteNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.clusterId = ""; - - /** - * DeleteNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.nodePoolId = ""; - - /** - * DeleteNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - */ - DeleteNodePoolRequest.prototype.name = ""; - - /** - * Creates a new DeleteNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {google.container.v1beta1.IDeleteNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest instance - */ - DeleteNodePoolRequest.create = function create(properties) { - return new DeleteNodePoolRequest(properties); - }; - - /** - * Encodes the specified DeleteNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {google.container.v1beta1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.DeleteNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {google.container.v1beta1.IDeleteNodePoolRequest} message DeleteNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DeleteNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteNodePoolRequest message. - * @function verify - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DeleteNodePoolRequest} DeleteNodePoolRequest - */ - DeleteNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DeleteNodePoolRequest) - return object; - var message = new $root.google.container.v1beta1.DeleteNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {google.container.v1beta1.DeleteNodePoolRequest} message DeleteNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.DeleteNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DeleteNodePoolRequest"; - }; - - return DeleteNodePoolRequest; - })(); - - v1beta1.ListNodePoolsRequest = (function() { - - /** - * Properties of a ListNodePoolsRequest. - * @memberof google.container.v1beta1 - * @interface IListNodePoolsRequest - * @property {string|null} [projectId] ListNodePoolsRequest projectId - * @property {string|null} [zone] ListNodePoolsRequest zone - * @property {string|null} [clusterId] ListNodePoolsRequest clusterId - * @property {string|null} [parent] ListNodePoolsRequest parent - */ - - /** - * Constructs a new ListNodePoolsRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListNodePoolsRequest. - * @implements IListNodePoolsRequest - * @constructor - * @param {google.container.v1beta1.IListNodePoolsRequest=} [properties] Properties to set - */ - function ListNodePoolsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListNodePoolsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.projectId = ""; - - /** - * ListNodePoolsRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.zone = ""; - - /** - * ListNodePoolsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.clusterId = ""; - - /** - * ListNodePoolsRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @instance - */ - ListNodePoolsRequest.prototype.parent = ""; - - /** - * Creates a new ListNodePoolsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {google.container.v1beta1.IListNodePoolsRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest instance - */ - ListNodePoolsRequest.create = function create(properties) { - return new ListNodePoolsRequest(properties); - }; - - /** - * Encodes the specified ListNodePoolsRequest message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {google.container.v1beta1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - return writer; - }; - - /** - * Encodes the specified ListNodePoolsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {google.container.v1beta1.IListNodePoolsRequest} message ListNodePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListNodePoolsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 5: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNodePoolsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNodePoolsRequest message. - * @function verify - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNodePoolsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListNodePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListNodePoolsRequest} ListNodePoolsRequest - */ - ListNodePoolsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListNodePoolsRequest) - return object; - var message = new $root.google.container.v1beta1.ListNodePoolsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListNodePoolsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {google.container.v1beta1.ListNodePoolsRequest} message ListNodePoolsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNodePoolsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.parent = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListNodePoolsRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @instance - * @returns {Object.} JSON object - */ - ListNodePoolsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNodePoolsRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.ListNodePoolsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListNodePoolsRequest"; - }; - - return ListNodePoolsRequest; - })(); - - v1beta1.GetNodePoolRequest = (function() { - - /** - * Properties of a GetNodePoolRequest. - * @memberof google.container.v1beta1 - * @interface IGetNodePoolRequest - * @property {string|null} [projectId] GetNodePoolRequest projectId - * @property {string|null} [zone] GetNodePoolRequest zone - * @property {string|null} [clusterId] GetNodePoolRequest clusterId - * @property {string|null} [nodePoolId] GetNodePoolRequest nodePoolId - * @property {string|null} [name] GetNodePoolRequest name - */ - - /** - * Constructs a new GetNodePoolRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetNodePoolRequest. - * @implements IGetNodePoolRequest - * @constructor - * @param {google.container.v1beta1.IGetNodePoolRequest=} [properties] Properties to set - */ - function GetNodePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetNodePoolRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.projectId = ""; - - /** - * GetNodePoolRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.zone = ""; - - /** - * GetNodePoolRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.clusterId = ""; - - /** - * GetNodePoolRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.nodePoolId = ""; - - /** - * GetNodePoolRequest name. - * @member {string} name - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - */ - GetNodePoolRequest.prototype.name = ""; - - /** - * Creates a new GetNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {google.container.v1beta1.IGetNodePoolRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest instance - */ - GetNodePoolRequest.create = function create(properties) { - return new GetNodePoolRequest(properties); - }; - - /** - * Encodes the specified GetNodePoolRequest message. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {google.container.v1beta1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNodePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetNodePoolRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetNodePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {google.container.v1beta1.IGetNodePoolRequest} message GetNodePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNodePoolRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetNodePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetNodePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetNodePoolRequest message. - * @function verify - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetNodePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetNodePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetNodePoolRequest} GetNodePoolRequest - */ - GetNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetNodePoolRequest) - return object; - var message = new $root.google.container.v1beta1.GetNodePoolRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {google.container.v1beta1.GetNodePoolRequest} message GetNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetNodePoolRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - GetNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetNodePoolRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetNodePoolRequest"; - }; - - return GetNodePoolRequest; - })(); - - v1beta1.BlueGreenSettings = (function() { - - /** - * Properties of a BlueGreenSettings. - * @memberof google.container.v1beta1 - * @interface IBlueGreenSettings - * @property {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null} [standardRolloutPolicy] BlueGreenSettings standardRolloutPolicy - * @property {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null} [autoscaledRolloutPolicy] BlueGreenSettings autoscaledRolloutPolicy - * @property {google.protobuf.IDuration|null} [nodePoolSoakDuration] BlueGreenSettings nodePoolSoakDuration - */ - - /** - * Constructs a new BlueGreenSettings. - * @memberof google.container.v1beta1 - * @classdesc Represents a BlueGreenSettings. - * @implements IBlueGreenSettings - * @constructor - * @param {google.container.v1beta1.IBlueGreenSettings=} [properties] Properties to set - */ - function BlueGreenSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlueGreenSettings standardRolloutPolicy. - * @member {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy|null|undefined} standardRolloutPolicy - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - */ - BlueGreenSettings.prototype.standardRolloutPolicy = null; - - /** - * BlueGreenSettings autoscaledRolloutPolicy. - * @member {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy|null|undefined} autoscaledRolloutPolicy - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - */ - BlueGreenSettings.prototype.autoscaledRolloutPolicy = null; - - /** - * BlueGreenSettings nodePoolSoakDuration. - * @member {google.protobuf.IDuration|null|undefined} nodePoolSoakDuration - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - */ - BlueGreenSettings.prototype.nodePoolSoakDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BlueGreenSettings rolloutPolicy. - * @member {"standardRolloutPolicy"|"autoscaledRolloutPolicy"|undefined} rolloutPolicy - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - */ - Object.defineProperty(BlueGreenSettings.prototype, "rolloutPolicy", { - get: $util.oneOfGetter($oneOfFields = ["standardRolloutPolicy", "autoscaledRolloutPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BlueGreenSettings _nodePoolSoakDuration. - * @member {"nodePoolSoakDuration"|undefined} _nodePoolSoakDuration - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - */ - Object.defineProperty(BlueGreenSettings.prototype, "_nodePoolSoakDuration", { - get: $util.oneOfGetter($oneOfFields = ["nodePoolSoakDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BlueGreenSettings instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {google.container.v1beta1.IBlueGreenSettings=} [properties] Properties to set - * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings instance - */ - BlueGreenSettings.create = function create(properties) { - return new BlueGreenSettings(properties); - }; - - /** - * Encodes the specified BlueGreenSettings message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {google.container.v1beta1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.standardRolloutPolicy != null && Object.hasOwnProperty.call(message, "standardRolloutPolicy")) - $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.encode(message.standardRolloutPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nodePoolSoakDuration != null && Object.hasOwnProperty.call(message, "nodePoolSoakDuration")) - $root.google.protobuf.Duration.encode(message.nodePoolSoakDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoscaledRolloutPolicy != null && Object.hasOwnProperty.call(message, "autoscaledRolloutPolicy")) - $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.encode(message.autoscaledRolloutPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlueGreenSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {google.container.v1beta1.IBlueGreenSettings} message BlueGreenSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.nodePoolSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlueGreenSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlueGreenSettings message. - * @function verify - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlueGreenSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { - properties.rolloutPolicy = 1; - { - var error = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify(message.standardRolloutPolicy); - if (error) - return "standardRolloutPolicy." + error; - } - } - if (message.autoscaledRolloutPolicy != null && message.hasOwnProperty("autoscaledRolloutPolicy")) { - if (properties.rolloutPolicy === 1) - return "rolloutPolicy: multiple values"; - properties.rolloutPolicy = 1; - { - var error = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify(message.autoscaledRolloutPolicy); - if (error) - return "autoscaledRolloutPolicy." + error; - } - } - if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { - properties._nodePoolSoakDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.nodePoolSoakDuration); - if (error) - return "nodePoolSoakDuration." + error; - } - } - return null; - }; - - /** - * Creates a BlueGreenSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BlueGreenSettings} BlueGreenSettings - */ - BlueGreenSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BlueGreenSettings) - return object; - var message = new $root.google.container.v1beta1.BlueGreenSettings(); - if (object.standardRolloutPolicy != null) { - if (typeof object.standardRolloutPolicy !== "object") - throw TypeError(".google.container.v1beta1.BlueGreenSettings.standardRolloutPolicy: object expected"); - message.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.fromObject(object.standardRolloutPolicy); - } - if (object.autoscaledRolloutPolicy != null) { - if (typeof object.autoscaledRolloutPolicy !== "object") - throw TypeError(".google.container.v1beta1.BlueGreenSettings.autoscaledRolloutPolicy: object expected"); - message.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.fromObject(object.autoscaledRolloutPolicy); - } - if (object.nodePoolSoakDuration != null) { - if (typeof object.nodePoolSoakDuration !== "object") - throw TypeError(".google.container.v1beta1.BlueGreenSettings.nodePoolSoakDuration: object expected"); - message.nodePoolSoakDuration = $root.google.protobuf.Duration.fromObject(object.nodePoolSoakDuration); - } - return message; - }; - - /** - * Creates a plain object from a BlueGreenSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {google.container.v1beta1.BlueGreenSettings} message BlueGreenSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlueGreenSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.standardRolloutPolicy != null && message.hasOwnProperty("standardRolloutPolicy")) { - object.standardRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.toObject(message.standardRolloutPolicy, options); - if (options.oneofs) - object.rolloutPolicy = "standardRolloutPolicy"; - } - if (message.nodePoolSoakDuration != null && message.hasOwnProperty("nodePoolSoakDuration")) { - object.nodePoolSoakDuration = $root.google.protobuf.Duration.toObject(message.nodePoolSoakDuration, options); - if (options.oneofs) - object._nodePoolSoakDuration = "nodePoolSoakDuration"; - } - if (message.autoscaledRolloutPolicy != null && message.hasOwnProperty("autoscaledRolloutPolicy")) { - object.autoscaledRolloutPolicy = $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.toObject(message.autoscaledRolloutPolicy, options); - if (options.oneofs) - object.rolloutPolicy = "autoscaledRolloutPolicy"; - } - return object; - }; - - /** - * Converts this BlueGreenSettings to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BlueGreenSettings - * @instance - * @returns {Object.} JSON object - */ - BlueGreenSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BlueGreenSettings - * @function getTypeUrl - * @memberof google.container.v1beta1.BlueGreenSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BlueGreenSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings"; - }; - - BlueGreenSettings.StandardRolloutPolicy = (function() { - - /** - * Properties of a StandardRolloutPolicy. - * @memberof google.container.v1beta1.BlueGreenSettings - * @interface IStandardRolloutPolicy - * @property {number|null} [batchPercentage] StandardRolloutPolicy batchPercentage - * @property {number|null} [batchNodeCount] StandardRolloutPolicy batchNodeCount - * @property {google.protobuf.IDuration|null} [batchSoakDuration] StandardRolloutPolicy batchSoakDuration - */ - - /** - * Constructs a new StandardRolloutPolicy. - * @memberof google.container.v1beta1.BlueGreenSettings - * @classdesc Represents a StandardRolloutPolicy. - * @implements IStandardRolloutPolicy - * @constructor - * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set - */ - function StandardRolloutPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StandardRolloutPolicy batchPercentage. - * @member {number|null|undefined} batchPercentage - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchPercentage = null; - - /** - * StandardRolloutPolicy batchNodeCount. - * @member {number|null|undefined} batchNodeCount - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchNodeCount = null; - - /** - * StandardRolloutPolicy batchSoakDuration. - * @member {google.protobuf.IDuration|null|undefined} batchSoakDuration - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - StandardRolloutPolicy.prototype.batchSoakDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * StandardRolloutPolicy updateBatchSize. - * @member {"batchPercentage"|"batchNodeCount"|undefined} updateBatchSize - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - Object.defineProperty(StandardRolloutPolicy.prototype, "updateBatchSize", { - get: $util.oneOfGetter($oneOfFields = ["batchPercentage", "batchNodeCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * StandardRolloutPolicy _batchSoakDuration. - * @member {"batchSoakDuration"|undefined} _batchSoakDuration - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - */ - Object.defineProperty(StandardRolloutPolicy.prototype, "_batchSoakDuration", { - get: $util.oneOfGetter($oneOfFields = ["batchSoakDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new StandardRolloutPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy instance - */ - StandardRolloutPolicy.create = function create(properties) { - return new StandardRolloutPolicy(properties); - }; - - /** - * Encodes the specified StandardRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardRolloutPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.batchPercentage != null && Object.hasOwnProperty.call(message, "batchPercentage")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.batchPercentage); - if (message.batchNodeCount != null && Object.hasOwnProperty.call(message, "batchNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchNodeCount); - if (message.batchSoakDuration != null && Object.hasOwnProperty.call(message, "batchSoakDuration")) - $root.google.protobuf.Duration.encode(message.batchSoakDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StandardRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IStandardRolloutPolicy} message StandardRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardRolloutPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.batchPercentage = reader.float(); - break; - } - case 2: { - message.batchNodeCount = reader.int32(); - break; - } - case 3: { - message.batchSoakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StandardRolloutPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StandardRolloutPolicy message. - * @function verify - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StandardRolloutPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { - properties.updateBatchSize = 1; - if (typeof message.batchPercentage !== "number") - return "batchPercentage: number expected"; - } - if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { - if (properties.updateBatchSize === 1) - return "updateBatchSize: multiple values"; - properties.updateBatchSize = 1; - if (!$util.isInteger(message.batchNodeCount)) - return "batchNodeCount: integer expected"; - } - if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { - properties._batchSoakDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.batchSoakDuration); - if (error) - return "batchSoakDuration." + error; - } - } - return null; - }; - - /** - * Creates a StandardRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} StandardRolloutPolicy - */ - StandardRolloutPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy) - return object; - var message = new $root.google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy(); - if (object.batchPercentage != null) - message.batchPercentage = Number(object.batchPercentage); - if (object.batchNodeCount != null) - message.batchNodeCount = object.batchNodeCount | 0; - if (object.batchSoakDuration != null) { - if (typeof object.batchSoakDuration !== "object") - throw TypeError(".google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy.batchSoakDuration: object expected"); - message.batchSoakDuration = $root.google.protobuf.Duration.fromObject(object.batchSoakDuration); - } - return message; - }; - - /** - * Creates a plain object from a StandardRolloutPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy} message StandardRolloutPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StandardRolloutPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.batchPercentage != null && message.hasOwnProperty("batchPercentage")) { - object.batchPercentage = options.json && !isFinite(message.batchPercentage) ? String(message.batchPercentage) : message.batchPercentage; - if (options.oneofs) - object.updateBatchSize = "batchPercentage"; - } - if (message.batchNodeCount != null && message.hasOwnProperty("batchNodeCount")) { - object.batchNodeCount = message.batchNodeCount; - if (options.oneofs) - object.updateBatchSize = "batchNodeCount"; - } - if (message.batchSoakDuration != null && message.hasOwnProperty("batchSoakDuration")) { - object.batchSoakDuration = $root.google.protobuf.Duration.toObject(message.batchSoakDuration, options); - if (options.oneofs) - object._batchSoakDuration = "batchSoakDuration"; - } - return object; - }; - - /** - * Converts this StandardRolloutPolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @instance - * @returns {Object.} JSON object - */ - StandardRolloutPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StandardRolloutPolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StandardRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings.StandardRolloutPolicy"; - }; - - return StandardRolloutPolicy; - })(); - - BlueGreenSettings.AutoscaledRolloutPolicy = (function() { - - /** - * Properties of an AutoscaledRolloutPolicy. - * @memberof google.container.v1beta1.BlueGreenSettings - * @interface IAutoscaledRolloutPolicy - */ - - /** - * Constructs a new AutoscaledRolloutPolicy. - * @memberof google.container.v1beta1.BlueGreenSettings - * @classdesc Represents an AutoscaledRolloutPolicy. - * @implements IAutoscaledRolloutPolicy - * @constructor - * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy=} [properties] Properties to set - */ - function AutoscaledRolloutPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new AutoscaledRolloutPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy instance - */ - AutoscaledRolloutPolicy.create = function create(properties) { - return new AutoscaledRolloutPolicy(properties); - }; - - /** - * Encodes the specified AutoscaledRolloutPolicy message. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy} message AutoscaledRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoscaledRolloutPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AutoscaledRolloutPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.IAutoscaledRolloutPolicy} message AutoscaledRolloutPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoscaledRolloutPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoscaledRolloutPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoscaledRolloutPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoscaledRolloutPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoscaledRolloutPolicy message. - * @function verify - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoscaledRolloutPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AutoscaledRolloutPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} AutoscaledRolloutPolicy - */ - AutoscaledRolloutPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy) - return object; - return new $root.google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy(); - }; - - /** - * Creates a plain object from an AutoscaledRolloutPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy} message AutoscaledRolloutPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoscaledRolloutPolicy.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AutoscaledRolloutPolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @instance - * @returns {Object.} JSON object - */ - AutoscaledRolloutPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoscaledRolloutPolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoscaledRolloutPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.BlueGreenSettings.AutoscaledRolloutPolicy"; - }; - - return AutoscaledRolloutPolicy; - })(); - - return BlueGreenSettings; - })(); - - v1beta1.NodePool = (function() { - - /** - * Properties of a NodePool. - * @memberof google.container.v1beta1 - * @interface INodePool - * @property {string|null} [name] NodePool name - * @property {google.container.v1beta1.INodeConfig|null} [config] NodePool config - * @property {number|null} [initialNodeCount] NodePool initialNodeCount - * @property {Array.|null} [locations] NodePool locations - * @property {google.container.v1beta1.INodeNetworkConfig|null} [networkConfig] NodePool networkConfig - * @property {string|null} [selfLink] NodePool selfLink - * @property {string|null} [version] NodePool version - * @property {Array.|null} [instanceGroupUrls] NodePool instanceGroupUrls - * @property {google.container.v1beta1.NodePool.Status|null} [status] NodePool status - * @property {string|null} [statusMessage] NodePool statusMessage - * @property {google.container.v1beta1.INodePoolAutoscaling|null} [autoscaling] NodePool autoscaling - * @property {google.container.v1beta1.INodeManagement|null} [management] NodePool management - * @property {google.container.v1beta1.IMaxPodsConstraint|null} [maxPodsConstraint] NodePool maxPodsConstraint - * @property {Array.|null} [conditions] NodePool conditions - * @property {number|null} [podIpv4CidrSize] NodePool podIpv4CidrSize - * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] NodePool upgradeSettings - * @property {google.container.v1beta1.NodePool.IPlacementPolicy|null} [placementPolicy] NodePool placementPolicy - * @property {google.container.v1beta1.NodePool.IUpdateInfo|null} [updateInfo] NodePool updateInfo - * @property {string|null} [etag] NodePool etag - * @property {google.container.v1beta1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] NodePool queuedProvisioning - * @property {google.container.v1beta1.IBestEffortProvisioning|null} [bestEffortProvisioning] NodePool bestEffortProvisioning - */ - - /** - * Constructs a new NodePool. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodePool. - * @implements INodePool - * @constructor - * @param {google.container.v1beta1.INodePool=} [properties] Properties to set - */ - function NodePool(properties) { - this.locations = []; - this.instanceGroupUrls = []; - this.conditions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePool name. - * @member {string} name - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.name = ""; - - /** - * NodePool config. - * @member {google.container.v1beta1.INodeConfig|null|undefined} config - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.config = null; - - /** - * NodePool initialNodeCount. - * @member {number} initialNodeCount - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.initialNodeCount = 0; - - /** - * NodePool locations. - * @member {Array.} locations - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.locations = $util.emptyArray; - - /** - * NodePool networkConfig. - * @member {google.container.v1beta1.INodeNetworkConfig|null|undefined} networkConfig - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.networkConfig = null; - - /** - * NodePool selfLink. - * @member {string} selfLink - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.selfLink = ""; - - /** - * NodePool version. - * @member {string} version - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.version = ""; - - /** - * NodePool instanceGroupUrls. - * @member {Array.} instanceGroupUrls - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.instanceGroupUrls = $util.emptyArray; - - /** - * NodePool status. - * @member {google.container.v1beta1.NodePool.Status} status - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.status = 0; - - /** - * NodePool statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.statusMessage = ""; - - /** - * NodePool autoscaling. - * @member {google.container.v1beta1.INodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.autoscaling = null; - - /** - * NodePool management. - * @member {google.container.v1beta1.INodeManagement|null|undefined} management - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.management = null; - - /** - * NodePool maxPodsConstraint. - * @member {google.container.v1beta1.IMaxPodsConstraint|null|undefined} maxPodsConstraint - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.maxPodsConstraint = null; - - /** - * NodePool conditions. - * @member {Array.} conditions - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.conditions = $util.emptyArray; - - /** - * NodePool podIpv4CidrSize. - * @member {number} podIpv4CidrSize - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.podIpv4CidrSize = 0; - - /** - * NodePool upgradeSettings. - * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.upgradeSettings = null; - - /** - * NodePool placementPolicy. - * @member {google.container.v1beta1.NodePool.IPlacementPolicy|null|undefined} placementPolicy - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.placementPolicy = null; - - /** - * NodePool updateInfo. - * @member {google.container.v1beta1.NodePool.IUpdateInfo|null|undefined} updateInfo - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.updateInfo = null; - - /** - * NodePool etag. - * @member {string} etag - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.etag = ""; - - /** - * NodePool queuedProvisioning. - * @member {google.container.v1beta1.NodePool.IQueuedProvisioning|null|undefined} queuedProvisioning - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.queuedProvisioning = null; - - /** - * NodePool bestEffortProvisioning. - * @member {google.container.v1beta1.IBestEffortProvisioning|null|undefined} bestEffortProvisioning - * @memberof google.container.v1beta1.NodePool - * @instance - */ - NodePool.prototype.bestEffortProvisioning = null; - - /** - * Creates a new NodePool instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool - * @static - * @param {google.container.v1beta1.INodePool=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool} NodePool instance - */ - NodePool.create = function create(properties) { - return new NodePool(properties); - }; - - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool - * @static - * @param {google.container.v1beta1.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.container.v1beta1.NodeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.initialNodeCount != null && Object.hasOwnProperty.call(message, "initialNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.initialNodeCount); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.container.v1beta1.NodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) - $root.google.container.v1beta1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.podIpv4CidrSize != null && Object.hasOwnProperty.call(message, "podIpv4CidrSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.podIpv4CidrSize); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.locations[i]); - if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) - $root.google.container.v1beta1.NodeNetworkConfig.encode(message.networkConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.selfLink != null && Object.hasOwnProperty.call(message, "selfLink")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.selfLink); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.version); - if (message.instanceGroupUrls != null && message.instanceGroupUrls.length) - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.instanceGroupUrls[i]); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 103, wireType 0 =*/824).int32(message.status); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.statusMessage); - if (message.conditions != null && message.conditions.length) - for (var i = 0; i < message.conditions.length; ++i) - $root.google.container.v1beta1.StatusCondition.encode(message.conditions[i], writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); - if (message.placementPolicy != null && Object.hasOwnProperty.call(message, "placementPolicy")) - $root.google.container.v1beta1.NodePool.PlacementPolicy.encode(message.placementPolicy, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); - if (message.updateInfo != null && Object.hasOwnProperty.call(message, "updateInfo")) - $root.google.container.v1beta1.NodePool.UpdateInfo.encode(message.updateInfo, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.etag); - if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) - $root.google.container.v1beta1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 112, wireType 2 =*/898).fork()).ldelim(); - if (message.bestEffortProvisioning != null && Object.hasOwnProperty.call(message, "bestEffortProvisioning")) - $root.google.container.v1beta1.BestEffortProvisioning.encode(message.bestEffortProvisioning, writer.uint32(/* id 113, wireType 2 =*/906).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool - * @static - * @param {google.container.v1beta1.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePool message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.container.v1beta1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.initialNodeCount = reader.int32(); - break; - } - case 13: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push(reader.string()); - break; - } - case 14: { - message.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.selfLink = reader.string(); - break; - } - case 101: { - message.version = reader.string(); - break; - } - case 102: { - if (!(message.instanceGroupUrls && message.instanceGroupUrls.length)) - message.instanceGroupUrls = []; - message.instanceGroupUrls.push(reader.string()); - break; - } - case 103: { - message.status = reader.int32(); - break; - } - case 104: { - message.statusMessage = reader.string(); - break; - } - case 4: { - message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 5: { - message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 6: { - message.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.decode(reader, reader.uint32()); - break; - } - case 105: { - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.container.v1beta1.StatusCondition.decode(reader, reader.uint32())); - break; - } - case 7: { - message.podIpv4CidrSize = reader.int32(); - break; - } - case 107: { - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 108: { - message.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.decode(reader, reader.uint32()); - break; - } - case 109: { - message.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.decode(reader, reader.uint32()); - break; - } - case 110: { - message.etag = reader.string(); - break; - } - case 112: { - message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); - break; - } - case 113: { - message.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePool message. - * @function verify - * @memberof google.container.v1beta1.NodePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.container.v1beta1.NodeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - if (!$util.isInteger(message.initialNodeCount)) - return "initialNodeCount: integer expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) - if (!$util.isString(message.locations[i])) - return "locations: string[] expected"; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { - var error = $root.google.container.v1beta1.NodeNetworkConfig.verify(message.networkConfig); - if (error) - return "networkConfig." + error; - } - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - if (!$util.isString(message.selfLink)) - return "selfLink: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.instanceGroupUrls != null && message.hasOwnProperty("instanceGroupUrls")) { - if (!Array.isArray(message.instanceGroupUrls)) - return "instanceGroupUrls: array expected"; - for (var i = 0; i < message.instanceGroupUrls.length; ++i) - if (!$util.isString(message.instanceGroupUrls[i])) - return "instanceGroupUrls: string[] expected"; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.container.v1beta1.NodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { - var error = $root.google.container.v1beta1.MaxPodsConstraint.verify(message.maxPodsConstraint); - if (error) - return "maxPodsConstraint." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) - return "conditions: array expected"; - for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.google.container.v1beta1.StatusCondition.verify(message.conditions[i]); - if (error) - return "conditions." + error; - } - } - if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) - if (!$util.isInteger(message.podIpv4CidrSize)) - return "podIpv4CidrSize: integer expected"; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) { - var error = $root.google.container.v1beta1.NodePool.PlacementPolicy.verify(message.placementPolicy); - if (error) - return "placementPolicy." + error; - } - if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) { - var error = $root.google.container.v1beta1.NodePool.UpdateInfo.verify(message.updateInfo); - if (error) - return "updateInfo." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) { - var error = $root.google.container.v1beta1.NodePool.QueuedProvisioning.verify(message.queuedProvisioning); - if (error) - return "queuedProvisioning." + error; - } - if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) { - var error = $root.google.container.v1beta1.BestEffortProvisioning.verify(message.bestEffortProvisioning); - if (error) - return "bestEffortProvisioning." + error; - } - return null; - }; - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool} NodePool - */ - NodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool) - return object; - var message = new $root.google.container.v1beta1.NodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.container.v1beta1.NodePool.config: object expected"); - message.config = $root.google.container.v1beta1.NodeConfig.fromObject(object.config); - } - if (object.initialNodeCount != null) - message.initialNodeCount = object.initialNodeCount | 0; - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1beta1.NodePool.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) - message.locations[i] = String(object.locations[i]); - } - if (object.networkConfig != null) { - if (typeof object.networkConfig !== "object") - throw TypeError(".google.container.v1beta1.NodePool.networkConfig: object expected"); - message.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.fromObject(object.networkConfig); - } - if (object.selfLink != null) - message.selfLink = String(object.selfLink); - if (object.version != null) - message.version = String(object.version); - if (object.instanceGroupUrls) { - if (!Array.isArray(object.instanceGroupUrls)) - throw TypeError(".google.container.v1beta1.NodePool.instanceGroupUrls: array expected"); - message.instanceGroupUrls = []; - for (var i = 0; i < object.instanceGroupUrls.length; ++i) - message.instanceGroupUrls[i] = String(object.instanceGroupUrls[i]); - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PROVISIONING": - case 1: - message.status = 1; - break; - case "RUNNING": - case 2: - message.status = 2; - break; - case "RUNNING_WITH_ERROR": - case 3: - message.status = 3; - break; - case "RECONCILING": - case 4: - message.status = 4; - break; - case "STOPPING": - case 5: - message.status = 5; - break; - case "ERROR": - case 6: - message.status = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.container.v1beta1.NodePool.autoscaling: object expected"); - message.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.fromObject(object.autoscaling); - } - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1beta1.NodePool.management: object expected"); - message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); - } - if (object.maxPodsConstraint != null) { - if (typeof object.maxPodsConstraint !== "object") - throw TypeError(".google.container.v1beta1.NodePool.maxPodsConstraint: object expected"); - message.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); - } - if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".google.container.v1beta1.NodePool.conditions: array expected"); - message.conditions = []; - for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".google.container.v1beta1.NodePool.conditions: object expected"); - message.conditions[i] = $root.google.container.v1beta1.StatusCondition.fromObject(object.conditions[i]); - } - } - if (object.podIpv4CidrSize != null) - message.podIpv4CidrSize = object.podIpv4CidrSize | 0; - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1beta1.NodePool.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.placementPolicy != null) { - if (typeof object.placementPolicy !== "object") - throw TypeError(".google.container.v1beta1.NodePool.placementPolicy: object expected"); - message.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.fromObject(object.placementPolicy); - } - if (object.updateInfo != null) { - if (typeof object.updateInfo !== "object") - throw TypeError(".google.container.v1beta1.NodePool.updateInfo: object expected"); - message.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.fromObject(object.updateInfo); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.queuedProvisioning != null) { - if (typeof object.queuedProvisioning !== "object") - throw TypeError(".google.container.v1beta1.NodePool.queuedProvisioning: object expected"); - message.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); - } - if (object.bestEffortProvisioning != null) { - if (typeof object.bestEffortProvisioning !== "object") - throw TypeError(".google.container.v1beta1.NodePool.bestEffortProvisioning: object expected"); - message.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.fromObject(object.bestEffortProvisioning); - } - return message; - }; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool - * @static - * @param {google.container.v1beta1.NodePool} message NodePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.locations = []; - object.instanceGroupUrls = []; - object.conditions = []; - } - if (options.defaults) { - object.name = ""; - object.config = null; - object.initialNodeCount = 0; - object.autoscaling = null; - object.management = null; - object.maxPodsConstraint = null; - object.podIpv4CidrSize = 0; - object.networkConfig = null; - object.selfLink = ""; - object.version = ""; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.upgradeSettings = null; - object.placementPolicy = null; - object.updateInfo = null; - object.etag = ""; - object.queuedProvisioning = null; - object.bestEffortProvisioning = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.container.v1beta1.NodeConfig.toObject(message.config, options); - if (message.initialNodeCount != null && message.hasOwnProperty("initialNodeCount")) - object.initialNodeCount = message.initialNodeCount; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.container.v1beta1.NodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) - object.maxPodsConstraint = $root.google.container.v1beta1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); - if (message.podIpv4CidrSize != null && message.hasOwnProperty("podIpv4CidrSize")) - object.podIpv4CidrSize = message.podIpv4CidrSize; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = message.locations[j]; - } - if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) - object.networkConfig = $root.google.container.v1beta1.NodeNetworkConfig.toObject(message.networkConfig, options); - if (message.selfLink != null && message.hasOwnProperty("selfLink")) - object.selfLink = message.selfLink; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.instanceGroupUrls && message.instanceGroupUrls.length) { - object.instanceGroupUrls = []; - for (var j = 0; j < message.instanceGroupUrls.length; ++j) - object.instanceGroupUrls[j] = message.instanceGroupUrls[j]; - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1beta1.NodePool.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.NodePool.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.conditions && message.conditions.length) { - object.conditions = []; - for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.google.container.v1beta1.StatusCondition.toObject(message.conditions[j], options); - } - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.placementPolicy != null && message.hasOwnProperty("placementPolicy")) - object.placementPolicy = $root.google.container.v1beta1.NodePool.PlacementPolicy.toObject(message.placementPolicy, options); - if (message.updateInfo != null && message.hasOwnProperty("updateInfo")) - object.updateInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.toObject(message.updateInfo, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) - object.queuedProvisioning = $root.google.container.v1beta1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); - if (message.bestEffortProvisioning != null && message.hasOwnProperty("bestEffortProvisioning")) - object.bestEffortProvisioning = $root.google.container.v1beta1.BestEffortProvisioning.toObject(message.bestEffortProvisioning, options); - return object; - }; - - /** - * Converts this NodePool to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool - * @instance - * @returns {Object.} JSON object - */ - NodePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePool - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool"; - }; - - NodePool.UpgradeSettings = (function() { - - /** - * Properties of an UpgradeSettings. - * @memberof google.container.v1beta1.NodePool - * @interface IUpgradeSettings - * @property {number|null} [maxSurge] UpgradeSettings maxSurge - * @property {number|null} [maxUnavailable] UpgradeSettings maxUnavailable - * @property {google.container.v1beta1.NodePoolUpdateStrategy|null} [strategy] UpgradeSettings strategy - * @property {google.container.v1beta1.IBlueGreenSettings|null} [blueGreenSettings] UpgradeSettings blueGreenSettings - */ - - /** - * Constructs a new UpgradeSettings. - * @memberof google.container.v1beta1.NodePool - * @classdesc Represents an UpgradeSettings. - * @implements IUpgradeSettings - * @constructor - * @param {google.container.v1beta1.NodePool.IUpgradeSettings=} [properties] Properties to set - */ - function UpgradeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeSettings maxSurge. - * @member {number} maxSurge - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.maxSurge = 0; - - /** - * UpgradeSettings maxUnavailable. - * @member {number} maxUnavailable - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.maxUnavailable = 0; - - /** - * UpgradeSettings strategy. - * @member {google.container.v1beta1.NodePoolUpdateStrategy|null|undefined} strategy - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.strategy = null; - - /** - * UpgradeSettings blueGreenSettings. - * @member {google.container.v1beta1.IBlueGreenSettings|null|undefined} blueGreenSettings - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - UpgradeSettings.prototype.blueGreenSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpgradeSettings _strategy. - * @member {"strategy"|undefined} _strategy - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - Object.defineProperty(UpgradeSettings.prototype, "_strategy", { - get: $util.oneOfGetter($oneOfFields = ["strategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpgradeSettings _blueGreenSettings. - * @member {"blueGreenSettings"|undefined} _blueGreenSettings - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - */ - Object.defineProperty(UpgradeSettings.prototype, "_blueGreenSettings", { - get: $util.oneOfGetter($oneOfFields = ["blueGreenSettings"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpgradeSettings instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1beta1.NodePool.IUpgradeSettings=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings instance - */ - UpgradeSettings.create = function create(properties) { - return new UpgradeSettings(properties); - }; - - /** - * Encodes the specified UpgradeSettings message. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1beta1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxSurge != null && Object.hasOwnProperty.call(message, "maxSurge")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxSurge); - if (message.maxUnavailable != null && Object.hasOwnProperty.call(message, "maxUnavailable")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxUnavailable); - if (message.strategy != null && Object.hasOwnProperty.call(message, "strategy")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.strategy); - if (message.blueGreenSettings != null && Object.hasOwnProperty.call(message, "blueGreenSettings")) - $root.google.container.v1beta1.BlueGreenSettings.encode(message.blueGreenSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeSettings message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpgradeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1beta1.NodePool.IUpgradeSettings} message UpgradeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpgradeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxSurge = reader.int32(); - break; - } - case 2: { - message.maxUnavailable = reader.int32(); - break; - } - case 3: { - message.strategy = reader.int32(); - break; - } - case 4: { - message.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeSettings message. - * @function verify - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) - if (!$util.isInteger(message.maxSurge)) - return "maxSurge: integer expected"; - if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) - if (!$util.isInteger(message.maxUnavailable)) - return "maxUnavailable: integer expected"; - if (message.strategy != null && message.hasOwnProperty("strategy")) { - properties._strategy = 1; - switch (message.strategy) { - default: - return "strategy: enum value expected"; - case 0: - case 2: - case 3: - break; - } - } - if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { - properties._blueGreenSettings = 1; - { - var error = $root.google.container.v1beta1.BlueGreenSettings.verify(message.blueGreenSettings); - if (error) - return "blueGreenSettings." + error; - } - } - return null; - }; - - /** - * Creates an UpgradeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool.UpgradeSettings} UpgradeSettings - */ - UpgradeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool.UpgradeSettings) - return object; - var message = new $root.google.container.v1beta1.NodePool.UpgradeSettings(); - if (object.maxSurge != null) - message.maxSurge = object.maxSurge | 0; - if (object.maxUnavailable != null) - message.maxUnavailable = object.maxUnavailable | 0; - switch (object.strategy) { - default: - if (typeof object.strategy === "number") { - message.strategy = object.strategy; - break; - } - break; - case "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": - case 0: - message.strategy = 0; - break; - case "BLUE_GREEN": - case 2: - message.strategy = 2; - break; - case "SURGE": - case 3: - message.strategy = 3; - break; - } - if (object.blueGreenSettings != null) { - if (typeof object.blueGreenSettings !== "object") - throw TypeError(".google.container.v1beta1.NodePool.UpgradeSettings.blueGreenSettings: object expected"); - message.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.fromObject(object.blueGreenSettings); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {google.container.v1beta1.NodePool.UpgradeSettings} message UpgradeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.maxSurge = 0; - object.maxUnavailable = 0; - } - if (message.maxSurge != null && message.hasOwnProperty("maxSurge")) - object.maxSurge = message.maxSurge; - if (message.maxUnavailable != null && message.hasOwnProperty("maxUnavailable")) - object.maxUnavailable = message.maxUnavailable; - if (message.strategy != null && message.hasOwnProperty("strategy")) { - object.strategy = options.enums === String ? $root.google.container.v1beta1.NodePoolUpdateStrategy[message.strategy] === undefined ? message.strategy : $root.google.container.v1beta1.NodePoolUpdateStrategy[message.strategy] : message.strategy; - if (options.oneofs) - object._strategy = "strategy"; - } - if (message.blueGreenSettings != null && message.hasOwnProperty("blueGreenSettings")) { - object.blueGreenSettings = $root.google.container.v1beta1.BlueGreenSettings.toObject(message.blueGreenSettings, options); - if (options.oneofs) - object._blueGreenSettings = "blueGreenSettings"; - } - return object; - }; - - /** - * Converts this UpgradeSettings to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @instance - * @returns {Object.} JSON object - */ - UpgradeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeSettings - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool.UpgradeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpgradeSettings"; - }; - - return UpgradeSettings; - })(); - - NodePool.UpdateInfo = (function() { - - /** - * Properties of an UpdateInfo. - * @memberof google.container.v1beta1.NodePool - * @interface IUpdateInfo - * @property {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null} [blueGreenInfo] UpdateInfo blueGreenInfo - */ - - /** - * Constructs a new UpdateInfo. - * @memberof google.container.v1beta1.NodePool - * @classdesc Represents an UpdateInfo. - * @implements IUpdateInfo - * @constructor - * @param {google.container.v1beta1.NodePool.IUpdateInfo=} [properties] Properties to set - */ - function UpdateInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateInfo blueGreenInfo. - * @member {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo|null|undefined} blueGreenInfo - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @instance - */ - UpdateInfo.prototype.blueGreenInfo = null; - - /** - * Creates a new UpdateInfo instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {google.container.v1beta1.NodePool.IUpdateInfo=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo instance - */ - UpdateInfo.create = function create(properties) { - return new UpdateInfo(properties); - }; - - /** - * Encodes the specified UpdateInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {google.container.v1beta1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.blueGreenInfo != null && Object.hasOwnProperty.call(message, "blueGreenInfo")) - $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.encode(message.blueGreenInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {google.container.v1beta1.NodePool.IUpdateInfo} message UpdateInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpdateInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateInfo message. - * @function verify - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) { - var error = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify(message.blueGreenInfo); - if (error) - return "blueGreenInfo." + error; - } - return null; - }; - - /** - * Creates an UpdateInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool.UpdateInfo} UpdateInfo - */ - UpdateInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool.UpdateInfo) - return object; - var message = new $root.google.container.v1beta1.NodePool.UpdateInfo(); - if (object.blueGreenInfo != null) { - if (typeof object.blueGreenInfo !== "object") - throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.blueGreenInfo: object expected"); - message.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.fromObject(object.blueGreenInfo); - } - return message; - }; - - /** - * Creates a plain object from an UpdateInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {google.container.v1beta1.NodePool.UpdateInfo} message UpdateInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.blueGreenInfo = null; - if (message.blueGreenInfo != null && message.hasOwnProperty("blueGreenInfo")) - object.blueGreenInfo = $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.toObject(message.blueGreenInfo, options); - return object; - }; - - /** - * Converts this UpdateInfo to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @instance - * @returns {Object.} JSON object - */ - UpdateInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateInfo - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpdateInfo"; - }; - - UpdateInfo.BlueGreenInfo = (function() { - - /** - * Properties of a BlueGreenInfo. - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @interface IBlueGreenInfo - * @property {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase|null} [phase] BlueGreenInfo phase - * @property {Array.|null} [blueInstanceGroupUrls] BlueGreenInfo blueInstanceGroupUrls - * @property {Array.|null} [greenInstanceGroupUrls] BlueGreenInfo greenInstanceGroupUrls - * @property {string|null} [bluePoolDeletionStartTime] BlueGreenInfo bluePoolDeletionStartTime - * @property {string|null} [greenPoolVersion] BlueGreenInfo greenPoolVersion - */ - - /** - * Constructs a new BlueGreenInfo. - * @memberof google.container.v1beta1.NodePool.UpdateInfo - * @classdesc Represents a BlueGreenInfo. - * @implements IBlueGreenInfo - * @constructor - * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set - */ - function BlueGreenInfo(properties) { - this.blueInstanceGroupUrls = []; - this.greenInstanceGroupUrls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlueGreenInfo phase. - * @member {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase} phase - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.phase = 0; - - /** - * BlueGreenInfo blueInstanceGroupUrls. - * @member {Array.} blueInstanceGroupUrls - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.blueInstanceGroupUrls = $util.emptyArray; - - /** - * BlueGreenInfo greenInstanceGroupUrls. - * @member {Array.} greenInstanceGroupUrls - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.greenInstanceGroupUrls = $util.emptyArray; - - /** - * BlueGreenInfo bluePoolDeletionStartTime. - * @member {string} bluePoolDeletionStartTime - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.bluePoolDeletionStartTime = ""; - - /** - * BlueGreenInfo greenPoolVersion. - * @member {string} greenPoolVersion - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - */ - BlueGreenInfo.prototype.greenPoolVersion = ""; - - /** - * Creates a new BlueGreenInfo instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo instance - */ - BlueGreenInfo.create = function create(properties) { - return new BlueGreenInfo(properties); - }; - - /** - * Encodes the specified BlueGreenInfo message. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.phase); - if (message.blueInstanceGroupUrls != null && message.blueInstanceGroupUrls.length) - for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.blueInstanceGroupUrls[i]); - if (message.greenInstanceGroupUrls != null && message.greenInstanceGroupUrls.length) - for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.greenInstanceGroupUrls[i]); - if (message.bluePoolDeletionStartTime != null && Object.hasOwnProperty.call(message, "bluePoolDeletionStartTime")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.bluePoolDeletionStartTime); - if (message.greenPoolVersion != null && Object.hasOwnProperty.call(message, "greenPoolVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.greenPoolVersion); - return writer; - }; - - /** - * Encodes the specified BlueGreenInfo message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1beta1.NodePool.UpdateInfo.IBlueGreenInfo} message BlueGreenInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlueGreenInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phase = reader.int32(); - break; - } - case 2: { - if (!(message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length)) - message.blueInstanceGroupUrls = []; - message.blueInstanceGroupUrls.push(reader.string()); - break; - } - case 3: { - if (!(message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length)) - message.greenInstanceGroupUrls = []; - message.greenInstanceGroupUrls.push(reader.string()); - break; - } - case 4: { - message.bluePoolDeletionStartTime = reader.string(); - break; - } - case 5: { - message.greenPoolVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlueGreenInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlueGreenInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlueGreenInfo message. - * @function verify - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlueGreenInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phase != null && message.hasOwnProperty("phase")) - switch (message.phase) { - default: - return "phase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 8: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.blueInstanceGroupUrls != null && message.hasOwnProperty("blueInstanceGroupUrls")) { - if (!Array.isArray(message.blueInstanceGroupUrls)) - return "blueInstanceGroupUrls: array expected"; - for (var i = 0; i < message.blueInstanceGroupUrls.length; ++i) - if (!$util.isString(message.blueInstanceGroupUrls[i])) - return "blueInstanceGroupUrls: string[] expected"; - } - if (message.greenInstanceGroupUrls != null && message.hasOwnProperty("greenInstanceGroupUrls")) { - if (!Array.isArray(message.greenInstanceGroupUrls)) - return "greenInstanceGroupUrls: array expected"; - for (var i = 0; i < message.greenInstanceGroupUrls.length; ++i) - if (!$util.isString(message.greenInstanceGroupUrls[i])) - return "greenInstanceGroupUrls: string[] expected"; - } - if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) - if (!$util.isString(message.bluePoolDeletionStartTime)) - return "bluePoolDeletionStartTime: string expected"; - if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) - if (!$util.isString(message.greenPoolVersion)) - return "greenPoolVersion: string expected"; - return null; - }; - - /** - * Creates a BlueGreenInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} BlueGreenInfo - */ - BlueGreenInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo) - return object; - var message = new $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo(); - switch (object.phase) { - default: - if (typeof object.phase === "number") { - message.phase = object.phase; - break; - } - break; - case "PHASE_UNSPECIFIED": - case 0: - message.phase = 0; - break; - case "UPDATE_STARTED": - case 1: - message.phase = 1; - break; - case "CREATING_GREEN_POOL": - case 2: - message.phase = 2; - break; - case "CORDONING_BLUE_POOL": - case 3: - message.phase = 3; - break; - case "WAITING_TO_DRAIN_BLUE_POOL": - case 8: - message.phase = 8; - break; - case "DRAINING_BLUE_POOL": - case 4: - message.phase = 4; - break; - case "NODE_POOL_SOAKING": - case 5: - message.phase = 5; - break; - case "DELETING_BLUE_POOL": - case 6: - message.phase = 6; - break; - case "ROLLBACK_STARTED": - case 7: - message.phase = 7; - break; - } - if (object.blueInstanceGroupUrls) { - if (!Array.isArray(object.blueInstanceGroupUrls)) - throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.blueInstanceGroupUrls: array expected"); - message.blueInstanceGroupUrls = []; - for (var i = 0; i < object.blueInstanceGroupUrls.length; ++i) - message.blueInstanceGroupUrls[i] = String(object.blueInstanceGroupUrls[i]); - } - if (object.greenInstanceGroupUrls) { - if (!Array.isArray(object.greenInstanceGroupUrls)) - throw TypeError(".google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.greenInstanceGroupUrls: array expected"); - message.greenInstanceGroupUrls = []; - for (var i = 0; i < object.greenInstanceGroupUrls.length; ++i) - message.greenInstanceGroupUrls[i] = String(object.greenInstanceGroupUrls[i]); - } - if (object.bluePoolDeletionStartTime != null) - message.bluePoolDeletionStartTime = String(object.bluePoolDeletionStartTime); - if (object.greenPoolVersion != null) - message.greenPoolVersion = String(object.greenPoolVersion); - return message; - }; - - /** - * Creates a plain object from a BlueGreenInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo} message BlueGreenInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlueGreenInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.blueInstanceGroupUrls = []; - object.greenInstanceGroupUrls = []; - } - if (options.defaults) { - object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; - object.bluePoolDeletionStartTime = ""; - object.greenPoolVersion = ""; - } - if (message.phase != null && message.hasOwnProperty("phase")) - object.phase = options.enums === String ? $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] === undefined ? message.phase : $root.google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase[message.phase] : message.phase; - if (message.blueInstanceGroupUrls && message.blueInstanceGroupUrls.length) { - object.blueInstanceGroupUrls = []; - for (var j = 0; j < message.blueInstanceGroupUrls.length; ++j) - object.blueInstanceGroupUrls[j] = message.blueInstanceGroupUrls[j]; - } - if (message.greenInstanceGroupUrls && message.greenInstanceGroupUrls.length) { - object.greenInstanceGroupUrls = []; - for (var j = 0; j < message.greenInstanceGroupUrls.length; ++j) - object.greenInstanceGroupUrls[j] = message.greenInstanceGroupUrls[j]; - } - if (message.bluePoolDeletionStartTime != null && message.hasOwnProperty("bluePoolDeletionStartTime")) - object.bluePoolDeletionStartTime = message.bluePoolDeletionStartTime; - if (message.greenPoolVersion != null && message.hasOwnProperty("greenPoolVersion")) - object.greenPoolVersion = message.greenPoolVersion; - return object; - }; - - /** - * Converts this BlueGreenInfo to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @instance - * @returns {Object.} JSON object - */ - BlueGreenInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BlueGreenInfo - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BlueGreenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo"; - }; - - /** - * Phase enum. - * @name google.container.v1beta1.NodePool.UpdateInfo.BlueGreenInfo.Phase - * @enum {number} - * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value - * @property {number} UPDATE_STARTED=1 UPDATE_STARTED value - * @property {number} CREATING_GREEN_POOL=2 CREATING_GREEN_POOL value - * @property {number} CORDONING_BLUE_POOL=3 CORDONING_BLUE_POOL value - * @property {number} WAITING_TO_DRAIN_BLUE_POOL=8 WAITING_TO_DRAIN_BLUE_POOL value - * @property {number} DRAINING_BLUE_POOL=4 DRAINING_BLUE_POOL value - * @property {number} NODE_POOL_SOAKING=5 NODE_POOL_SOAKING value - * @property {number} DELETING_BLUE_POOL=6 DELETING_BLUE_POOL value - * @property {number} ROLLBACK_STARTED=7 ROLLBACK_STARTED value - */ - BlueGreenInfo.Phase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UPDATE_STARTED"] = 1; - values[valuesById[2] = "CREATING_GREEN_POOL"] = 2; - values[valuesById[3] = "CORDONING_BLUE_POOL"] = 3; - values[valuesById[8] = "WAITING_TO_DRAIN_BLUE_POOL"] = 8; - values[valuesById[4] = "DRAINING_BLUE_POOL"] = 4; - values[valuesById[5] = "NODE_POOL_SOAKING"] = 5; - values[valuesById[6] = "DELETING_BLUE_POOL"] = 6; - values[valuesById[7] = "ROLLBACK_STARTED"] = 7; - return values; - })(); - - return BlueGreenInfo; - })(); - - return UpdateInfo; - })(); - - /** - * Status enum. - * @name google.container.v1beta1.NodePool.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} PROVISIONING=1 PROVISIONING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} RUNNING_WITH_ERROR=3 RUNNING_WITH_ERROR value - * @property {number} RECONCILING=4 RECONCILING value - * @property {number} STOPPING=5 STOPPING value - * @property {number} ERROR=6 ERROR value - */ - NodePool.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROVISIONING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "RUNNING_WITH_ERROR"] = 3; - values[valuesById[4] = "RECONCILING"] = 4; - values[valuesById[5] = "STOPPING"] = 5; - values[valuesById[6] = "ERROR"] = 6; - return values; - })(); - - NodePool.PlacementPolicy = (function() { - - /** - * Properties of a PlacementPolicy. - * @memberof google.container.v1beta1.NodePool - * @interface IPlacementPolicy - * @property {google.container.v1beta1.NodePool.PlacementPolicy.Type|null} [type] PlacementPolicy type - * @property {string|null} [tpuTopology] PlacementPolicy tpuTopology - * @property {string|null} [policyName] PlacementPolicy policyName - */ - - /** - * Constructs a new PlacementPolicy. - * @memberof google.container.v1beta1.NodePool - * @classdesc Represents a PlacementPolicy. - * @implements IPlacementPolicy - * @constructor - * @param {google.container.v1beta1.NodePool.IPlacementPolicy=} [properties] Properties to set - */ - function PlacementPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlacementPolicy type. - * @member {google.container.v1beta1.NodePool.PlacementPolicy.Type} type - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.type = 0; - - /** - * PlacementPolicy tpuTopology. - * @member {string} tpuTopology - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.tpuTopology = ""; - - /** - * PlacementPolicy policyName. - * @member {string} policyName - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @instance - */ - PlacementPolicy.prototype.policyName = ""; - - /** - * Creates a new PlacementPolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1beta1.NodePool.IPlacementPolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy instance - */ - PlacementPolicy.create = function create(properties) { - return new PlacementPolicy(properties); - }; - - /** - * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1beta1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.tpuTopology != null && Object.hasOwnProperty.call(message, "tpuTopology")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tpuTopology); - if (message.policyName != null && Object.hasOwnProperty.call(message, "policyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.policyName); - return writer; - }; - - /** - * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.PlacementPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1beta1.NodePool.IPlacementPolicy} message PlacementPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.PlacementPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.tpuTopology = reader.string(); - break; - } - case 3: { - message.policyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlacementPolicy message. - * @function verify - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlacementPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) - if (!$util.isString(message.tpuTopology)) - return "tpuTopology: string expected"; - if (message.policyName != null && message.hasOwnProperty("policyName")) - if (!$util.isString(message.policyName)) - return "policyName: string expected"; - return null; - }; - - /** - * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool.PlacementPolicy} PlacementPolicy - */ - PlacementPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool.PlacementPolicy) - return object; - var message = new $root.google.container.v1beta1.NodePool.PlacementPolicy(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "COMPACT": - case 1: - message.type = 1; - break; - } - if (object.tpuTopology != null) - message.tpuTopology = String(object.tpuTopology); - if (object.policyName != null) - message.policyName = String(object.policyName); - return message; - }; - - /** - * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {google.container.v1beta1.NodePool.PlacementPolicy} message PlacementPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlacementPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.tpuTopology = ""; - object.policyName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1beta1.NodePool.PlacementPolicy.Type[message.type] === undefined ? message.type : $root.google.container.v1beta1.NodePool.PlacementPolicy.Type[message.type] : message.type; - if (message.tpuTopology != null && message.hasOwnProperty("tpuTopology")) - object.tpuTopology = message.tpuTopology; - if (message.policyName != null && message.hasOwnProperty("policyName")) - object.policyName = message.policyName; - return object; - }; - - /** - * Converts this PlacementPolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @instance - * @returns {Object.} JSON object - */ - PlacementPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlacementPolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool.PlacementPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool.PlacementPolicy"; - }; - - /** - * Type enum. - * @name google.container.v1beta1.NodePool.PlacementPolicy.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} COMPACT=1 COMPACT value - */ - PlacementPolicy.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPACT"] = 1; - return values; - })(); - - return PlacementPolicy; - })(); - - NodePool.QueuedProvisioning = (function() { - - /** - * Properties of a QueuedProvisioning. - * @memberof google.container.v1beta1.NodePool - * @interface IQueuedProvisioning - * @property {boolean|null} [enabled] QueuedProvisioning enabled - */ - - /** - * Constructs a new QueuedProvisioning. - * @memberof google.container.v1beta1.NodePool - * @classdesc Represents a QueuedProvisioning. - * @implements IQueuedProvisioning - * @constructor - * @param {google.container.v1beta1.NodePool.IQueuedProvisioning=} [properties] Properties to set - */ - function QueuedProvisioning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueuedProvisioning enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @instance - */ - QueuedProvisioning.prototype.enabled = false; - - /** - * Creates a new QueuedProvisioning instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1beta1.NodePool.IQueuedProvisioning=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning instance - */ - QueuedProvisioning.create = function create(properties) { - return new QueuedProvisioning(properties); - }; - - /** - * Encodes the specified QueuedProvisioning message. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1beta1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueuedProvisioning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified QueuedProvisioning message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePool.QueuedProvisioning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1beta1.NodePool.IQueuedProvisioning} message QueuedProvisioning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueuedProvisioning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueuedProvisioning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePool.QueuedProvisioning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueuedProvisioning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueuedProvisioning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueuedProvisioning message. - * @function verify - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueuedProvisioning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a QueuedProvisioning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePool.QueuedProvisioning} QueuedProvisioning - */ - QueuedProvisioning.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePool.QueuedProvisioning) - return object; - var message = new $root.google.container.v1beta1.NodePool.QueuedProvisioning(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a QueuedProvisioning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {google.container.v1beta1.NodePool.QueuedProvisioning} message QueuedProvisioning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueuedProvisioning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this QueuedProvisioning to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @instance - * @returns {Object.} JSON object - */ - QueuedProvisioning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueuedProvisioning - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePool.QueuedProvisioning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueuedProvisioning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePool.QueuedProvisioning"; - }; - - return QueuedProvisioning; - })(); - - return NodePool; - })(); - - v1beta1.NodeManagement = (function() { - - /** - * Properties of a NodeManagement. - * @memberof google.container.v1beta1 - * @interface INodeManagement - * @property {boolean|null} [autoUpgrade] NodeManagement autoUpgrade - * @property {boolean|null} [autoRepair] NodeManagement autoRepair - * @property {google.container.v1beta1.IAutoUpgradeOptions|null} [upgradeOptions] NodeManagement upgradeOptions - */ - - /** - * Constructs a new NodeManagement. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodeManagement. - * @implements INodeManagement - * @constructor - * @param {google.container.v1beta1.INodeManagement=} [properties] Properties to set - */ - function NodeManagement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeManagement autoUpgrade. - * @member {boolean} autoUpgrade - * @memberof google.container.v1beta1.NodeManagement - * @instance - */ - NodeManagement.prototype.autoUpgrade = false; - - /** - * NodeManagement autoRepair. - * @member {boolean} autoRepair - * @memberof google.container.v1beta1.NodeManagement - * @instance - */ - NodeManagement.prototype.autoRepair = false; - - /** - * NodeManagement upgradeOptions. - * @member {google.container.v1beta1.IAutoUpgradeOptions|null|undefined} upgradeOptions - * @memberof google.container.v1beta1.NodeManagement - * @instance - */ - NodeManagement.prototype.upgradeOptions = null; - - /** - * Creates a new NodeManagement instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {google.container.v1beta1.INodeManagement=} [properties] Properties to set - * @returns {google.container.v1beta1.NodeManagement} NodeManagement instance - */ - NodeManagement.create = function create(properties) { - return new NodeManagement(properties); - }; - - /** - * Encodes the specified NodeManagement message. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {google.container.v1beta1.INodeManagement} message NodeManagement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeManagement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.autoUpgrade != null && Object.hasOwnProperty.call(message, "autoUpgrade")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.autoUpgrade); - if (message.autoRepair != null && Object.hasOwnProperty.call(message, "autoRepair")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRepair); - if (message.upgradeOptions != null && Object.hasOwnProperty.call(message, "upgradeOptions")) - $root.google.container.v1beta1.AutoUpgradeOptions.encode(message.upgradeOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeManagement message, length delimited. Does not implicitly {@link google.container.v1beta1.NodeManagement.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {google.container.v1beta1.INodeManagement} message NodeManagement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeManagement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeManagement message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodeManagement} NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeManagement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodeManagement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.autoUpgrade = reader.bool(); - break; - } - case 2: { - message.autoRepair = reader.bool(); - break; - } - case 10: { - message.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeManagement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodeManagement} NodeManagement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeManagement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeManagement message. - * @function verify - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeManagement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) - if (typeof message.autoUpgrade !== "boolean") - return "autoUpgrade: boolean expected"; - if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) - if (typeof message.autoRepair !== "boolean") - return "autoRepair: boolean expected"; - if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) { - var error = $root.google.container.v1beta1.AutoUpgradeOptions.verify(message.upgradeOptions); - if (error) - return "upgradeOptions." + error; - } - return null; - }; - - /** - * Creates a NodeManagement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodeManagement} NodeManagement - */ - NodeManagement.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodeManagement) - return object; - var message = new $root.google.container.v1beta1.NodeManagement(); - if (object.autoUpgrade != null) - message.autoUpgrade = Boolean(object.autoUpgrade); - if (object.autoRepair != null) - message.autoRepair = Boolean(object.autoRepair); - if (object.upgradeOptions != null) { - if (typeof object.upgradeOptions !== "object") - throw TypeError(".google.container.v1beta1.NodeManagement.upgradeOptions: object expected"); - message.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.fromObject(object.upgradeOptions); - } - return message; - }; - - /** - * Creates a plain object from a NodeManagement message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {google.container.v1beta1.NodeManagement} message NodeManagement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeManagement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.autoUpgrade = false; - object.autoRepair = false; - object.upgradeOptions = null; - } - if (message.autoUpgrade != null && message.hasOwnProperty("autoUpgrade")) - object.autoUpgrade = message.autoUpgrade; - if (message.autoRepair != null && message.hasOwnProperty("autoRepair")) - object.autoRepair = message.autoRepair; - if (message.upgradeOptions != null && message.hasOwnProperty("upgradeOptions")) - object.upgradeOptions = $root.google.container.v1beta1.AutoUpgradeOptions.toObject(message.upgradeOptions, options); - return object; - }; - - /** - * Converts this NodeManagement to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodeManagement - * @instance - * @returns {Object.} JSON object - */ - NodeManagement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeManagement - * @function getTypeUrl - * @memberof google.container.v1beta1.NodeManagement - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeManagement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodeManagement"; - }; - - return NodeManagement; - })(); - - v1beta1.AutoUpgradeOptions = (function() { - - /** - * Properties of an AutoUpgradeOptions. - * @memberof google.container.v1beta1 - * @interface IAutoUpgradeOptions - * @property {string|null} [autoUpgradeStartTime] AutoUpgradeOptions autoUpgradeStartTime - * @property {string|null} [description] AutoUpgradeOptions description - */ - - /** - * Constructs a new AutoUpgradeOptions. - * @memberof google.container.v1beta1 - * @classdesc Represents an AutoUpgradeOptions. - * @implements IAutoUpgradeOptions - * @constructor - * @param {google.container.v1beta1.IAutoUpgradeOptions=} [properties] Properties to set - */ - function AutoUpgradeOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoUpgradeOptions autoUpgradeStartTime. - * @member {string} autoUpgradeStartTime - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @instance - */ - AutoUpgradeOptions.prototype.autoUpgradeStartTime = ""; - - /** - * AutoUpgradeOptions description. - * @member {string} description - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @instance - */ - AutoUpgradeOptions.prototype.description = ""; - - /** - * Creates a new AutoUpgradeOptions instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {google.container.v1beta1.IAutoUpgradeOptions=} [properties] Properties to set - * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions instance - */ - AutoUpgradeOptions.create = function create(properties) { - return new AutoUpgradeOptions(properties); - }; - - /** - * Encodes the specified AutoUpgradeOptions message. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {google.container.v1beta1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoUpgradeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.autoUpgradeStartTime != null && Object.hasOwnProperty.call(message, "autoUpgradeStartTime")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.autoUpgradeStartTime); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified AutoUpgradeOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoUpgradeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {google.container.v1beta1.IAutoUpgradeOptions} message AutoUpgradeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoUpgradeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoUpgradeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutoUpgradeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.autoUpgradeStartTime = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoUpgradeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoUpgradeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoUpgradeOptions message. - * @function verify - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoUpgradeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) - if (!$util.isString(message.autoUpgradeStartTime)) - return "autoUpgradeStartTime: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AutoUpgradeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AutoUpgradeOptions} AutoUpgradeOptions - */ - AutoUpgradeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AutoUpgradeOptions) - return object; - var message = new $root.google.container.v1beta1.AutoUpgradeOptions(); - if (object.autoUpgradeStartTime != null) - message.autoUpgradeStartTime = String(object.autoUpgradeStartTime); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AutoUpgradeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {google.container.v1beta1.AutoUpgradeOptions} message AutoUpgradeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoUpgradeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.autoUpgradeStartTime = ""; - object.description = ""; - } - if (message.autoUpgradeStartTime != null && message.hasOwnProperty("autoUpgradeStartTime")) - object.autoUpgradeStartTime = message.autoUpgradeStartTime; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AutoUpgradeOptions to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @instance - * @returns {Object.} JSON object - */ - AutoUpgradeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoUpgradeOptions - * @function getTypeUrl - * @memberof google.container.v1beta1.AutoUpgradeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoUpgradeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AutoUpgradeOptions"; - }; - - return AutoUpgradeOptions; - })(); - - v1beta1.MaintenancePolicy = (function() { - - /** - * Properties of a MaintenancePolicy. - * @memberof google.container.v1beta1 - * @interface IMaintenancePolicy - * @property {google.container.v1beta1.IMaintenanceWindow|null} [window] MaintenancePolicy window - * @property {string|null} [resourceVersion] MaintenancePolicy resourceVersion - */ - - /** - * Constructs a new MaintenancePolicy. - * @memberof google.container.v1beta1 - * @classdesc Represents a MaintenancePolicy. - * @implements IMaintenancePolicy - * @constructor - * @param {google.container.v1beta1.IMaintenancePolicy=} [properties] Properties to set - */ - function MaintenancePolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenancePolicy window. - * @member {google.container.v1beta1.IMaintenanceWindow|null|undefined} window - * @memberof google.container.v1beta1.MaintenancePolicy - * @instance - */ - MaintenancePolicy.prototype.window = null; - - /** - * MaintenancePolicy resourceVersion. - * @member {string} resourceVersion - * @memberof google.container.v1beta1.MaintenancePolicy - * @instance - */ - MaintenancePolicy.prototype.resourceVersion = ""; - - /** - * Creates a new MaintenancePolicy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {google.container.v1beta1.IMaintenancePolicy=} [properties] Properties to set - * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy instance - */ - MaintenancePolicy.create = function create(properties) { - return new MaintenancePolicy(properties); - }; - - /** - * Encodes the specified MaintenancePolicy message. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {google.container.v1beta1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenancePolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && Object.hasOwnProperty.call(message, "window")) - $root.google.container.v1beta1.MaintenanceWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resourceVersion != null && Object.hasOwnProperty.call(message, "resourceVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceVersion); - return writer; - }; - - /** - * Encodes the specified MaintenancePolicy message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenancePolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {google.container.v1beta1.IMaintenancePolicy} message MaintenancePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenancePolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenancePolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenancePolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.window = $root.google.container.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resourceVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenancePolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenancePolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenancePolicy message. - * @function verify - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenancePolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.container.v1beta1.MaintenanceWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) - if (!$util.isString(message.resourceVersion)) - return "resourceVersion: string expected"; - return null; - }; - - /** - * Creates a MaintenancePolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MaintenancePolicy} MaintenancePolicy - */ - MaintenancePolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MaintenancePolicy) - return object; - var message = new $root.google.container.v1beta1.MaintenancePolicy(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.container.v1beta1.MaintenancePolicy.window: object expected"); - message.window = $root.google.container.v1beta1.MaintenanceWindow.fromObject(object.window); - } - if (object.resourceVersion != null) - message.resourceVersion = String(object.resourceVersion); - return message; - }; - - /** - * Creates a plain object from a MaintenancePolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {google.container.v1beta1.MaintenancePolicy} message MaintenancePolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenancePolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.resourceVersion = ""; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.container.v1beta1.MaintenanceWindow.toObject(message.window, options); - if (message.resourceVersion != null && message.hasOwnProperty("resourceVersion")) - object.resourceVersion = message.resourceVersion; - return object; - }; - - /** - * Converts this MaintenancePolicy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MaintenancePolicy - * @instance - * @returns {Object.} JSON object - */ - MaintenancePolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenancePolicy - * @function getTypeUrl - * @memberof google.container.v1beta1.MaintenancePolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MaintenancePolicy"; - }; - - return MaintenancePolicy; - })(); - - v1beta1.MaintenanceWindow = (function() { - - /** - * Properties of a MaintenanceWindow. - * @memberof google.container.v1beta1 - * @interface IMaintenanceWindow - * @property {google.container.v1beta1.IDailyMaintenanceWindow|null} [dailyMaintenanceWindow] MaintenanceWindow dailyMaintenanceWindow - * @property {google.container.v1beta1.IRecurringTimeWindow|null} [recurringWindow] MaintenanceWindow recurringWindow - * @property {Object.|null} [maintenanceExclusions] MaintenanceWindow maintenanceExclusions - */ - - /** - * Constructs a new MaintenanceWindow. - * @memberof google.container.v1beta1 - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow - * @constructor - * @param {google.container.v1beta1.IMaintenanceWindow=} [properties] Properties to set - */ - function MaintenanceWindow(properties) { - this.maintenanceExclusions = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceWindow dailyMaintenanceWindow. - * @member {google.container.v1beta1.IDailyMaintenanceWindow|null|undefined} dailyMaintenanceWindow - * @memberof google.container.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.dailyMaintenanceWindow = null; - - /** - * MaintenanceWindow recurringWindow. - * @member {google.container.v1beta1.IRecurringTimeWindow|null|undefined} recurringWindow - * @memberof google.container.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.recurringWindow = null; - - /** - * MaintenanceWindow maintenanceExclusions. - * @member {Object.} maintenanceExclusions - * @memberof google.container.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.maintenanceExclusions = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MaintenanceWindow policy. - * @member {"dailyMaintenanceWindow"|"recurringWindow"|undefined} policy - * @memberof google.container.v1beta1.MaintenanceWindow - * @instance - */ - Object.defineProperty(MaintenanceWindow.prototype, "policy", { - get: $util.oneOfGetter($oneOfFields = ["dailyMaintenanceWindow", "recurringWindow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {google.container.v1beta1.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow instance - */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); - }; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {google.container.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dailyMaintenanceWindow != null && Object.hasOwnProperty.call(message, "dailyMaintenanceWindow")) - $root.google.container.v1beta1.DailyMaintenanceWindow.encode(message.dailyMaintenanceWindow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recurringWindow != null && Object.hasOwnProperty.call(message, "recurringWindow")) - $root.google.container.v1beta1.RecurringTimeWindow.encode(message.recurringWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maintenanceExclusions != null && Object.hasOwnProperty.call(message, "maintenanceExclusions")) - for (var keys = Object.keys(message.maintenanceExclusions), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.container.v1beta1.TimeWindow.encode(message.maintenanceExclusions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {google.container.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenanceWindow(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.maintenanceExclusions === $util.emptyObject) - message.maintenanceExclusions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.container.v1beta1.TimeWindow.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.maintenanceExclusions[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceWindow message. - * @function verify - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { - properties.policy = 1; - { - var error = $root.google.container.v1beta1.DailyMaintenanceWindow.verify(message.dailyMaintenanceWindow); - if (error) - return "dailyMaintenanceWindow." + error; - } - } - if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { - if (properties.policy === 1) - return "policy: multiple values"; - properties.policy = 1; - { - var error = $root.google.container.v1beta1.RecurringTimeWindow.verify(message.recurringWindow); - if (error) - return "recurringWindow." + error; - } - } - if (message.maintenanceExclusions != null && message.hasOwnProperty("maintenanceExclusions")) { - if (!$util.isObject(message.maintenanceExclusions)) - return "maintenanceExclusions: object expected"; - var key = Object.keys(message.maintenanceExclusions); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.container.v1beta1.TimeWindow.verify(message.maintenanceExclusions[key[i]]); - if (error) - return "maintenanceExclusions." + error; - } - } - return null; - }; - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MaintenanceWindow} MaintenanceWindow - */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MaintenanceWindow) - return object; - var message = new $root.google.container.v1beta1.MaintenanceWindow(); - if (object.dailyMaintenanceWindow != null) { - if (typeof object.dailyMaintenanceWindow !== "object") - throw TypeError(".google.container.v1beta1.MaintenanceWindow.dailyMaintenanceWindow: object expected"); - message.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.fromObject(object.dailyMaintenanceWindow); - } - if (object.recurringWindow != null) { - if (typeof object.recurringWindow !== "object") - throw TypeError(".google.container.v1beta1.MaintenanceWindow.recurringWindow: object expected"); - message.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.fromObject(object.recurringWindow); - } - if (object.maintenanceExclusions) { - if (typeof object.maintenanceExclusions !== "object") - throw TypeError(".google.container.v1beta1.MaintenanceWindow.maintenanceExclusions: object expected"); - message.maintenanceExclusions = {}; - for (var keys = Object.keys(object.maintenanceExclusions), i = 0; i < keys.length; ++i) { - if (typeof object.maintenanceExclusions[keys[i]] !== "object") - throw TypeError(".google.container.v1beta1.MaintenanceWindow.maintenanceExclusions: object expected"); - message.maintenanceExclusions[keys[i]] = $root.google.container.v1beta1.TimeWindow.fromObject(object.maintenanceExclusions[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {google.container.v1beta1.MaintenanceWindow} message MaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.maintenanceExclusions = {}; - if (message.dailyMaintenanceWindow != null && message.hasOwnProperty("dailyMaintenanceWindow")) { - object.dailyMaintenanceWindow = $root.google.container.v1beta1.DailyMaintenanceWindow.toObject(message.dailyMaintenanceWindow, options); - if (options.oneofs) - object.policy = "dailyMaintenanceWindow"; - } - if (message.recurringWindow != null && message.hasOwnProperty("recurringWindow")) { - object.recurringWindow = $root.google.container.v1beta1.RecurringTimeWindow.toObject(message.recurringWindow, options); - if (options.oneofs) - object.policy = "recurringWindow"; - } - var keys2; - if (message.maintenanceExclusions && (keys2 = Object.keys(message.maintenanceExclusions)).length) { - object.maintenanceExclusions = {}; - for (var j = 0; j < keys2.length; ++j) - object.maintenanceExclusions[keys2[j]] = $root.google.container.v1beta1.TimeWindow.toObject(message.maintenanceExclusions[keys2[j]], options); - } - return object; - }; - - /** - * Converts this MaintenanceWindow to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - MaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceWindow - * @function getTypeUrl - * @memberof google.container.v1beta1.MaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MaintenanceWindow"; - }; - - return MaintenanceWindow; - })(); - - v1beta1.TimeWindow = (function() { - - /** - * Properties of a TimeWindow. - * @memberof google.container.v1beta1 - * @interface ITimeWindow - * @property {google.container.v1beta1.IMaintenanceExclusionOptions|null} [maintenanceExclusionOptions] TimeWindow maintenanceExclusionOptions - * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime - */ - - /** - * Constructs a new TimeWindow. - * @memberof google.container.v1beta1 - * @classdesc Represents a TimeWindow. - * @implements ITimeWindow - * @constructor - * @param {google.container.v1beta1.ITimeWindow=} [properties] Properties to set - */ - function TimeWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimeWindow maintenanceExclusionOptions. - * @member {google.container.v1beta1.IMaintenanceExclusionOptions|null|undefined} maintenanceExclusionOptions - * @memberof google.container.v1beta1.TimeWindow - * @instance - */ - TimeWindow.prototype.maintenanceExclusionOptions = null; - - /** - * TimeWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.container.v1beta1.TimeWindow - * @instance - */ - TimeWindow.prototype.startTime = null; - - /** - * TimeWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.container.v1beta1.TimeWindow - * @instance - */ - TimeWindow.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TimeWindow options. - * @member {"maintenanceExclusionOptions"|undefined} options - * @memberof google.container.v1beta1.TimeWindow - * @instance - */ - Object.defineProperty(TimeWindow.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["maintenanceExclusionOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TimeWindow instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {google.container.v1beta1.ITimeWindow=} [properties] Properties to set - * @returns {google.container.v1beta1.TimeWindow} TimeWindow instance - */ - TimeWindow.create = function create(properties) { - return new TimeWindow(properties); - }; - - /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {google.container.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maintenanceExclusionOptions != null && Object.hasOwnProperty.call(message, "maintenanceExclusionOptions")) - $root.google.container.v1beta1.MaintenanceExclusionOptions.encode(message.maintenanceExclusionOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.TimeWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {google.container.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.TimeWindow} TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.TimeWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.decode(reader, reader.uint32()); - break; - } - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.TimeWindow} TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeWindow message. - * @function verify - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { - properties.options = 1; - { - var error = $root.google.container.v1beta1.MaintenanceExclusionOptions.verify(message.maintenanceExclusionOptions); - if (error) - return "maintenanceExclusionOptions." + error; - } - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.TimeWindow} TimeWindow - */ - TimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.TimeWindow) - return object; - var message = new $root.google.container.v1beta1.TimeWindow(); - if (object.maintenanceExclusionOptions != null) { - if (typeof object.maintenanceExclusionOptions !== "object") - throw TypeError(".google.container.v1beta1.TimeWindow.maintenanceExclusionOptions: object expected"); - message.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.fromObject(object.maintenanceExclusionOptions); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.container.v1beta1.TimeWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.container.v1beta1.TimeWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {google.container.v1beta1.TimeWindow} message TimeWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.maintenanceExclusionOptions != null && message.hasOwnProperty("maintenanceExclusionOptions")) { - object.maintenanceExclusionOptions = $root.google.container.v1beta1.MaintenanceExclusionOptions.toObject(message.maintenanceExclusionOptions, options); - if (options.oneofs) - object.options = "maintenanceExclusionOptions"; - } - return object; - }; - - /** - * Converts this TimeWindow to JSON. - * @function toJSON - * @memberof google.container.v1beta1.TimeWindow - * @instance - * @returns {Object.} JSON object - */ - TimeWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeWindow - * @function getTypeUrl - * @memberof google.container.v1beta1.TimeWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.TimeWindow"; - }; - - return TimeWindow; - })(); - - v1beta1.MaintenanceExclusionOptions = (function() { - - /** - * Properties of a MaintenanceExclusionOptions. - * @memberof google.container.v1beta1 - * @interface IMaintenanceExclusionOptions - * @property {google.container.v1beta1.MaintenanceExclusionOptions.Scope|null} [scope] MaintenanceExclusionOptions scope - */ - - /** - * Constructs a new MaintenanceExclusionOptions. - * @memberof google.container.v1beta1 - * @classdesc Represents a MaintenanceExclusionOptions. - * @implements IMaintenanceExclusionOptions - * @constructor - * @param {google.container.v1beta1.IMaintenanceExclusionOptions=} [properties] Properties to set - */ - function MaintenanceExclusionOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceExclusionOptions scope. - * @member {google.container.v1beta1.MaintenanceExclusionOptions.Scope} scope - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @instance - */ - MaintenanceExclusionOptions.prototype.scope = 0; - - /** - * Creates a new MaintenanceExclusionOptions instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1beta1.IMaintenanceExclusionOptions=} [properties] Properties to set - * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions instance - */ - MaintenanceExclusionOptions.create = function create(properties) { - return new MaintenanceExclusionOptions(properties); - }; - - /** - * Encodes the specified MaintenanceExclusionOptions message. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1beta1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceExclusionOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - return writer; - }; - - /** - * Encodes the specified MaintenanceExclusionOptions message, length delimited. Does not implicitly {@link google.container.v1beta1.MaintenanceExclusionOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1beta1.IMaintenanceExclusionOptions} message MaintenanceExclusionOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceExclusionOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceExclusionOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MaintenanceExclusionOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceExclusionOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceExclusionOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceExclusionOptions message. - * @function verify - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceExclusionOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MaintenanceExclusionOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MaintenanceExclusionOptions} MaintenanceExclusionOptions - */ - MaintenanceExclusionOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MaintenanceExclusionOptions) - return object; - var message = new $root.google.container.v1beta1.MaintenanceExclusionOptions(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "NO_UPGRADES": - case 0: - message.scope = 0; - break; - case "NO_MINOR_UPGRADES": - case 1: - message.scope = 1; - break; - case "NO_MINOR_OR_NODE_UPGRADES": - case 2: - message.scope = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MaintenanceExclusionOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {google.container.v1beta1.MaintenanceExclusionOptions} message MaintenanceExclusionOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceExclusionOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scope = options.enums === String ? "NO_UPGRADES" : 0; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.container.v1beta1.MaintenanceExclusionOptions.Scope[message.scope] === undefined ? message.scope : $root.google.container.v1beta1.MaintenanceExclusionOptions.Scope[message.scope] : message.scope; - return object; - }; - - /** - * Converts this MaintenanceExclusionOptions to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @instance - * @returns {Object.} JSON object - */ - MaintenanceExclusionOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceExclusionOptions - * @function getTypeUrl - * @memberof google.container.v1beta1.MaintenanceExclusionOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceExclusionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MaintenanceExclusionOptions"; - }; - - /** - * Scope enum. - * @name google.container.v1beta1.MaintenanceExclusionOptions.Scope - * @enum {number} - * @property {number} NO_UPGRADES=0 NO_UPGRADES value - * @property {number} NO_MINOR_UPGRADES=1 NO_MINOR_UPGRADES value - * @property {number} NO_MINOR_OR_NODE_UPGRADES=2 NO_MINOR_OR_NODE_UPGRADES value - */ - MaintenanceExclusionOptions.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_UPGRADES"] = 0; - values[valuesById[1] = "NO_MINOR_UPGRADES"] = 1; - values[valuesById[2] = "NO_MINOR_OR_NODE_UPGRADES"] = 2; - return values; - })(); - - return MaintenanceExclusionOptions; - })(); - - v1beta1.RecurringTimeWindow = (function() { - - /** - * Properties of a RecurringTimeWindow. - * @memberof google.container.v1beta1 - * @interface IRecurringTimeWindow - * @property {google.container.v1beta1.ITimeWindow|null} [window] RecurringTimeWindow window - * @property {string|null} [recurrence] RecurringTimeWindow recurrence - */ - - /** - * Constructs a new RecurringTimeWindow. - * @memberof google.container.v1beta1 - * @classdesc Represents a RecurringTimeWindow. - * @implements IRecurringTimeWindow - * @constructor - * @param {google.container.v1beta1.IRecurringTimeWindow=} [properties] Properties to set - */ - function RecurringTimeWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecurringTimeWindow window. - * @member {google.container.v1beta1.ITimeWindow|null|undefined} window - * @memberof google.container.v1beta1.RecurringTimeWindow - * @instance - */ - RecurringTimeWindow.prototype.window = null; - - /** - * RecurringTimeWindow recurrence. - * @member {string} recurrence - * @memberof google.container.v1beta1.RecurringTimeWindow - * @instance - */ - RecurringTimeWindow.prototype.recurrence = ""; - - /** - * Creates a new RecurringTimeWindow instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {google.container.v1beta1.IRecurringTimeWindow=} [properties] Properties to set - * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow instance - */ - RecurringTimeWindow.create = function create(properties) { - return new RecurringTimeWindow(properties); - }; - - /** - * Encodes the specified RecurringTimeWindow message. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {google.container.v1beta1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringTimeWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && Object.hasOwnProperty.call(message, "window")) - $root.google.container.v1beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.recurrence); - return writer; - }; - - /** - * Encodes the specified RecurringTimeWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.RecurringTimeWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {google.container.v1beta1.IRecurringTimeWindow} message RecurringTimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringTimeWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringTimeWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RecurringTimeWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.window = $root.google.container.v1beta1.TimeWindow.decode(reader, reader.uint32()); - break; - } - case 2: { - message.recurrence = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecurringTimeWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringTimeWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecurringTimeWindow message. - * @function verify - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecurringTimeWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.container.v1beta1.TimeWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - if (!$util.isString(message.recurrence)) - return "recurrence: string expected"; - return null; - }; - - /** - * Creates a RecurringTimeWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RecurringTimeWindow} RecurringTimeWindow - */ - RecurringTimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RecurringTimeWindow) - return object; - var message = new $root.google.container.v1beta1.RecurringTimeWindow(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.container.v1beta1.RecurringTimeWindow.window: object expected"); - message.window = $root.google.container.v1beta1.TimeWindow.fromObject(object.window); - } - if (object.recurrence != null) - message.recurrence = String(object.recurrence); - return message; - }; - - /** - * Creates a plain object from a RecurringTimeWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {google.container.v1beta1.RecurringTimeWindow} message RecurringTimeWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecurringTimeWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.recurrence = ""; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.container.v1beta1.TimeWindow.toObject(message.window, options); - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - object.recurrence = message.recurrence; - return object; - }; - - /** - * Converts this RecurringTimeWindow to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RecurringTimeWindow - * @instance - * @returns {Object.} JSON object - */ - RecurringTimeWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RecurringTimeWindow - * @function getTypeUrl - * @memberof google.container.v1beta1.RecurringTimeWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecurringTimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RecurringTimeWindow"; - }; - - return RecurringTimeWindow; - })(); - - v1beta1.DailyMaintenanceWindow = (function() { - - /** - * Properties of a DailyMaintenanceWindow. - * @memberof google.container.v1beta1 - * @interface IDailyMaintenanceWindow - * @property {string|null} [startTime] DailyMaintenanceWindow startTime - * @property {string|null} [duration] DailyMaintenanceWindow duration - */ - - /** - * Constructs a new DailyMaintenanceWindow. - * @memberof google.container.v1beta1 - * @classdesc Represents a DailyMaintenanceWindow. - * @implements IDailyMaintenanceWindow - * @constructor - * @param {google.container.v1beta1.IDailyMaintenanceWindow=} [properties] Properties to set - */ - function DailyMaintenanceWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DailyMaintenanceWindow startTime. - * @member {string} startTime - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @instance - */ - DailyMaintenanceWindow.prototype.startTime = ""; - - /** - * DailyMaintenanceWindow duration. - * @member {string} duration - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @instance - */ - DailyMaintenanceWindow.prototype.duration = ""; - - /** - * Creates a new DailyMaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {google.container.v1beta1.IDailyMaintenanceWindow=} [properties] Properties to set - * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow instance - */ - DailyMaintenanceWindow.create = function create(properties) { - return new DailyMaintenanceWindow(properties); - }; - - /** - * Encodes the specified DailyMaintenanceWindow message. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {google.container.v1beta1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailyMaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.startTime); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.duration); - return writer; - }; - - /** - * Encodes the specified DailyMaintenanceWindow message, length delimited. Does not implicitly {@link google.container.v1beta1.DailyMaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {google.container.v1beta1.IDailyMaintenanceWindow} message DailyMaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailyMaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailyMaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DailyMaintenanceWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.startTime = reader.string(); - break; - } - case 3: { - message.duration = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DailyMaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailyMaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DailyMaintenanceWindow message. - * @function verify - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DailyMaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isString(message.startTime)) - return "startTime: string expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isString(message.duration)) - return "duration: string expected"; - return null; - }; - - /** - * Creates a DailyMaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DailyMaintenanceWindow} DailyMaintenanceWindow - */ - DailyMaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DailyMaintenanceWindow) - return object; - var message = new $root.google.container.v1beta1.DailyMaintenanceWindow(); - if (object.startTime != null) - message.startTime = String(object.startTime); - if (object.duration != null) - message.duration = String(object.duration); - return message; - }; - - /** - * Creates a plain object from a DailyMaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {google.container.v1beta1.DailyMaintenanceWindow} message DailyMaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DailyMaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = ""; - object.duration = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = message.startTime; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - return object; - }; - - /** - * Converts this DailyMaintenanceWindow to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - DailyMaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DailyMaintenanceWindow - * @function getTypeUrl - * @memberof google.container.v1beta1.DailyMaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DailyMaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DailyMaintenanceWindow"; - }; - - return DailyMaintenanceWindow; - })(); - - v1beta1.SetNodePoolManagementRequest = (function() { - - /** - * Properties of a SetNodePoolManagementRequest. - * @memberof google.container.v1beta1 - * @interface ISetNodePoolManagementRequest - * @property {string|null} [projectId] SetNodePoolManagementRequest projectId - * @property {string|null} [zone] SetNodePoolManagementRequest zone - * @property {string|null} [clusterId] SetNodePoolManagementRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolManagementRequest nodePoolId - * @property {google.container.v1beta1.INodeManagement|null} [management] SetNodePoolManagementRequest management - * @property {string|null} [name] SetNodePoolManagementRequest name - */ - - /** - * Constructs a new SetNodePoolManagementRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetNodePoolManagementRequest. - * @implements ISetNodePoolManagementRequest - * @constructor - * @param {google.container.v1beta1.ISetNodePoolManagementRequest=} [properties] Properties to set - */ - function SetNodePoolManagementRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolManagementRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.projectId = ""; - - /** - * SetNodePoolManagementRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.zone = ""; - - /** - * SetNodePoolManagementRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.clusterId = ""; - - /** - * SetNodePoolManagementRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolManagementRequest management. - * @member {google.container.v1beta1.INodeManagement|null|undefined} management - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.management = null; - - /** - * SetNodePoolManagementRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - */ - SetNodePoolManagementRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolManagementRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolManagementRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest instance - */ - SetNodePoolManagementRequest.create = function create(properties) { - return new SetNodePoolManagementRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolManagementRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolManagementRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolManagementRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolManagementRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolManagementRequest} message SetNodePoolManagementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolManagementRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolManagementRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolManagementRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolManagementRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolManagementRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolManagementRequest message. - * @function verify - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolManagementRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolManagementRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetNodePoolManagementRequest} SetNodePoolManagementRequest - */ - SetNodePoolManagementRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetNodePoolManagementRequest) - return object; - var message = new $root.google.container.v1beta1.SetNodePoolManagementRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1beta1.SetNodePoolManagementRequest.management: object expected"); - message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolManagementRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {google.container.v1beta1.SetNodePoolManagementRequest} message SetNodePoolManagementRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolManagementRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.management = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolManagementRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolManagementRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolManagementRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetNodePoolManagementRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolManagementRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolManagementRequest"; - }; - - return SetNodePoolManagementRequest; - })(); - - v1beta1.SetNodePoolSizeRequest = (function() { - - /** - * Properties of a SetNodePoolSizeRequest. - * @memberof google.container.v1beta1 - * @interface ISetNodePoolSizeRequest - * @property {string|null} [projectId] SetNodePoolSizeRequest projectId - * @property {string|null} [zone] SetNodePoolSizeRequest zone - * @property {string|null} [clusterId] SetNodePoolSizeRequest clusterId - * @property {string|null} [nodePoolId] SetNodePoolSizeRequest nodePoolId - * @property {number|null} [nodeCount] SetNodePoolSizeRequest nodeCount - * @property {string|null} [name] SetNodePoolSizeRequest name - */ - - /** - * Constructs a new SetNodePoolSizeRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetNodePoolSizeRequest. - * @implements ISetNodePoolSizeRequest - * @constructor - * @param {google.container.v1beta1.ISetNodePoolSizeRequest=} [properties] Properties to set - */ - function SetNodePoolSizeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNodePoolSizeRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.projectId = ""; - - /** - * SetNodePoolSizeRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.zone = ""; - - /** - * SetNodePoolSizeRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.clusterId = ""; - - /** - * SetNodePoolSizeRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.nodePoolId = ""; - - /** - * SetNodePoolSizeRequest nodeCount. - * @member {number} nodeCount - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.nodeCount = 0; - - /** - * SetNodePoolSizeRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - */ - SetNodePoolSizeRequest.prototype.name = ""; - - /** - * Creates a new SetNodePoolSizeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolSizeRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest instance - */ - SetNodePoolSizeRequest.create = function create(properties) { - return new SetNodePoolSizeRequest(properties); - }; - - /** - * Encodes the specified SetNodePoolSizeRequest message. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolSizeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nodeCount); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNodePoolSizeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNodePoolSizeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1beta1.ISetNodePoolSizeRequest} message SetNodePoolSizeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNodePoolSizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolSizeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNodePoolSizeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 5: { - message.nodeCount = reader.int32(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNodePoolSizeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNodePoolSizeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNodePoolSizeRequest message. - * @function verify - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNodePoolSizeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNodePoolSizeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetNodePoolSizeRequest} SetNodePoolSizeRequest - */ - SetNodePoolSizeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetNodePoolSizeRequest) - return object; - var message = new $root.google.container.v1beta1.SetNodePoolSizeRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNodePoolSizeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {google.container.v1beta1.SetNodePoolSizeRequest} message SetNodePoolSizeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNodePoolSizeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.nodeCount = 0; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNodePoolSizeRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @instance - * @returns {Object.} JSON object - */ - SetNodePoolSizeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNodePoolSizeRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetNodePoolSizeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNodePoolSizeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetNodePoolSizeRequest"; - }; - - return SetNodePoolSizeRequest; - })(); - - v1beta1.CompleteNodePoolUpgradeRequest = (function() { - - /** - * Properties of a CompleteNodePoolUpgradeRequest. - * @memberof google.container.v1beta1 - * @interface ICompleteNodePoolUpgradeRequest - * @property {string|null} [name] CompleteNodePoolUpgradeRequest name - */ - - /** - * Constructs a new CompleteNodePoolUpgradeRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CompleteNodePoolUpgradeRequest. - * @implements ICompleteNodePoolUpgradeRequest - * @constructor - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set - */ - function CompleteNodePoolUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteNodePoolUpgradeRequest name. - * @member {string} name - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @instance - */ - CompleteNodePoolUpgradeRequest.prototype.name = ""; - - /** - * Creates a new CompleteNodePoolUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest instance - */ - CompleteNodePoolUpgradeRequest.create = function create(properties) { - return new CompleteNodePoolUpgradeRequest(properties); - }; - - /** - * Encodes the specified CompleteNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteNodePoolUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.ICompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteNodePoolUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteNodePoolUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest(); - 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 CompleteNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteNodePoolUpgradeRequest message. - * @function verify - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CompleteNodePoolUpgradeRequest} CompleteNodePoolUpgradeRequest - */ - CompleteNodePoolUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest) - return object; - var message = new $root.google.container.v1beta1.CompleteNodePoolUpgradeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CompleteNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.CompleteNodePoolUpgradeRequest} message CompleteNodePoolUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteNodePoolUpgradeRequest.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 CompleteNodePoolUpgradeRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - CompleteNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteNodePoolUpgradeRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CompleteNodePoolUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CompleteNodePoolUpgradeRequest"; - }; - - return CompleteNodePoolUpgradeRequest; - })(); - - v1beta1.RollbackNodePoolUpgradeRequest = (function() { - - /** - * Properties of a RollbackNodePoolUpgradeRequest. - * @memberof google.container.v1beta1 - * @interface IRollbackNodePoolUpgradeRequest - * @property {string|null} [projectId] RollbackNodePoolUpgradeRequest projectId - * @property {string|null} [zone] RollbackNodePoolUpgradeRequest zone - * @property {string|null} [clusterId] RollbackNodePoolUpgradeRequest clusterId - * @property {string|null} [nodePoolId] RollbackNodePoolUpgradeRequest nodePoolId - * @property {string|null} [name] RollbackNodePoolUpgradeRequest name - * @property {boolean|null} [respectPdb] RollbackNodePoolUpgradeRequest respectPdb - */ - - /** - * Constructs a new RollbackNodePoolUpgradeRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a RollbackNodePoolUpgradeRequest. - * @implements IRollbackNodePoolUpgradeRequest - * @constructor - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set - */ - function RollbackNodePoolUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackNodePoolUpgradeRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.projectId = ""; - - /** - * RollbackNodePoolUpgradeRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.zone = ""; - - /** - * RollbackNodePoolUpgradeRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.clusterId = ""; - - /** - * RollbackNodePoolUpgradeRequest nodePoolId. - * @member {string} nodePoolId - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.nodePoolId = ""; - - /** - * RollbackNodePoolUpgradeRequest name. - * @member {string} name - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.name = ""; - - /** - * RollbackNodePoolUpgradeRequest respectPdb. - * @member {boolean} respectPdb - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - */ - RollbackNodePoolUpgradeRequest.prototype.respectPdb = false; - - /** - * Creates a new RollbackNodePoolUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest instance - */ - RollbackNodePoolUpgradeRequest.create = function create(properties) { - return new RollbackNodePoolUpgradeRequest(properties); - }; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackNodePoolUpgradeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.nodePoolId != null && Object.hasOwnProperty.call(message, "nodePoolId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nodePoolId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.respectPdb != null && Object.hasOwnProperty.call(message, "respectPdb")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.respectPdb); - return writer; - }; - - /** - * Encodes the specified RollbackNodePoolUpgradeRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.RollbackNodePoolUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.IRollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackNodePoolUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackNodePoolUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.nodePoolId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - message.respectPdb = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackNodePoolUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackNodePoolUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackNodePoolUpgradeRequest message. - * @function verify - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackNodePoolUpgradeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - if (!$util.isString(message.nodePoolId)) - return "nodePoolId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) - if (typeof message.respectPdb !== "boolean") - return "respectPdb: boolean expected"; - return null; - }; - - /** - * Creates a RollbackNodePoolUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RollbackNodePoolUpgradeRequest} RollbackNodePoolUpgradeRequest - */ - RollbackNodePoolUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest) - return object; - var message = new $root.google.container.v1beta1.RollbackNodePoolUpgradeRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.nodePoolId != null) - message.nodePoolId = String(object.nodePoolId); - if (object.name != null) - message.name = String(object.name); - if (object.respectPdb != null) - message.respectPdb = Boolean(object.respectPdb); - return message; - }; - - /** - * Creates a plain object from a RollbackNodePoolUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {google.container.v1beta1.RollbackNodePoolUpgradeRequest} message RollbackNodePoolUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackNodePoolUpgradeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.nodePoolId = ""; - object.name = ""; - object.respectPdb = false; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.nodePoolId != null && message.hasOwnProperty("nodePoolId")) - object.nodePoolId = message.nodePoolId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.respectPdb != null && message.hasOwnProperty("respectPdb")) - object.respectPdb = message.respectPdb; - return object; - }; - - /** - * Converts this RollbackNodePoolUpgradeRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - RollbackNodePoolUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RollbackNodePoolUpgradeRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.RollbackNodePoolUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RollbackNodePoolUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RollbackNodePoolUpgradeRequest"; - }; - - return RollbackNodePoolUpgradeRequest; - })(); - - v1beta1.ListNodePoolsResponse = (function() { - - /** - * Properties of a ListNodePoolsResponse. - * @memberof google.container.v1beta1 - * @interface IListNodePoolsResponse - * @property {Array.|null} [nodePools] ListNodePoolsResponse nodePools - */ - - /** - * Constructs a new ListNodePoolsResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListNodePoolsResponse. - * @implements IListNodePoolsResponse - * @constructor - * @param {google.container.v1beta1.IListNodePoolsResponse=} [properties] Properties to set - */ - function ListNodePoolsResponse(properties) { - this.nodePools = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListNodePoolsResponse nodePools. - * @member {Array.} nodePools - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @instance - */ - ListNodePoolsResponse.prototype.nodePools = $util.emptyArray; - - /** - * Creates a new ListNodePoolsResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {google.container.v1beta1.IListNodePoolsResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse instance - */ - ListNodePoolsResponse.create = function create(properties) { - return new ListNodePoolsResponse(properties); - }; - - /** - * Encodes the specified ListNodePoolsResponse message. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {google.container.v1beta1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.container.v1beta1.NodePool.encode(message.nodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListNodePoolsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListNodePoolsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {google.container.v1beta1.IListNodePoolsResponse} message ListNodePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListNodePoolsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.container.v1beta1.NodePool.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNodePoolsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListNodePoolsResponse message. - * @function verify - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNodePoolsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.container.v1beta1.NodePool.verify(message.nodePools[i]); - if (error) - return "nodePools." + error; - } - } - return null; - }; - - /** - * Creates a ListNodePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListNodePoolsResponse} ListNodePoolsResponse - */ - ListNodePoolsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListNodePoolsResponse) - return object; - var message = new $root.google.container.v1beta1.ListNodePoolsResponse(); - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.container.v1beta1.ListNodePoolsResponse.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.container.v1beta1.ListNodePoolsResponse.nodePools: object expected"); - message.nodePools[i] = $root.google.container.v1beta1.NodePool.fromObject(object.nodePools[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListNodePoolsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {google.container.v1beta1.ListNodePoolsResponse} message ListNodePoolsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNodePoolsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodePools = []; - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.container.v1beta1.NodePool.toObject(message.nodePools[j], options); - } - return object; - }; - - /** - * Converts this ListNodePoolsResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @instance - * @returns {Object.} JSON object - */ - ListNodePoolsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListNodePoolsResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.ListNodePoolsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListNodePoolsResponse"; - }; - - return ListNodePoolsResponse; - })(); - - v1beta1.ClusterAutoscaling = (function() { - - /** - * Properties of a ClusterAutoscaling. - * @memberof google.container.v1beta1 - * @interface IClusterAutoscaling - * @property {boolean|null} [enableNodeAutoprovisioning] ClusterAutoscaling enableNodeAutoprovisioning - * @property {Array.|null} [resourceLimits] ClusterAutoscaling resourceLimits - * @property {google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile|null} [autoscalingProfile] ClusterAutoscaling autoscalingProfile - * @property {google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null} [autoprovisioningNodePoolDefaults] ClusterAutoscaling autoprovisioningNodePoolDefaults - * @property {Array.|null} [autoprovisioningLocations] ClusterAutoscaling autoprovisioningLocations - */ - - /** - * Constructs a new ClusterAutoscaling. - * @memberof google.container.v1beta1 - * @classdesc Represents a ClusterAutoscaling. - * @implements IClusterAutoscaling - * @constructor - * @param {google.container.v1beta1.IClusterAutoscaling=} [properties] Properties to set - */ - function ClusterAutoscaling(properties) { - this.resourceLimits = []; - this.autoprovisioningLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterAutoscaling enableNodeAutoprovisioning. - * @member {boolean} enableNodeAutoprovisioning - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.enableNodeAutoprovisioning = false; - - /** - * ClusterAutoscaling resourceLimits. - * @member {Array.} resourceLimits - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.resourceLimits = $util.emptyArray; - - /** - * ClusterAutoscaling autoscalingProfile. - * @member {google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile} autoscalingProfile - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoscalingProfile = 0; - - /** - * ClusterAutoscaling autoprovisioningNodePoolDefaults. - * @member {google.container.v1beta1.IAutoprovisioningNodePoolDefaults|null|undefined} autoprovisioningNodePoolDefaults - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoprovisioningNodePoolDefaults = null; - - /** - * ClusterAutoscaling autoprovisioningLocations. - * @member {Array.} autoprovisioningLocations - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - */ - ClusterAutoscaling.prototype.autoprovisioningLocations = $util.emptyArray; - - /** - * Creates a new ClusterAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {google.container.v1beta1.IClusterAutoscaling=} [properties] Properties to set - * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling instance - */ - ClusterAutoscaling.create = function create(properties) { - return new ClusterAutoscaling(properties); - }; - - /** - * Encodes the specified ClusterAutoscaling message. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {google.container.v1beta1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableNodeAutoprovisioning != null && Object.hasOwnProperty.call(message, "enableNodeAutoprovisioning")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNodeAutoprovisioning); - if (message.resourceLimits != null && message.resourceLimits.length) - for (var i = 0; i < message.resourceLimits.length; ++i) - $root.google.container.v1beta1.ResourceLimit.encode(message.resourceLimits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoscalingProfile != null && Object.hasOwnProperty.call(message, "autoscalingProfile")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.autoscalingProfile); - if (message.autoprovisioningNodePoolDefaults != null && Object.hasOwnProperty.call(message, "autoprovisioningNodePoolDefaults")) - $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.encode(message.autoprovisioningNodePoolDefaults, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.autoprovisioningLocations != null && message.autoprovisioningLocations.length) - for (var i = 0; i < message.autoprovisioningLocations.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.autoprovisioningLocations[i]); - return writer; - }; - - /** - * Encodes the specified ClusterAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.ClusterAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {google.container.v1beta1.IClusterAutoscaling} message ClusterAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ClusterAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableNodeAutoprovisioning = reader.bool(); - break; - } - case 2: { - if (!(message.resourceLimits && message.resourceLimits.length)) - message.resourceLimits = []; - message.resourceLimits.push($root.google.container.v1beta1.ResourceLimit.decode(reader, reader.uint32())); - break; - } - case 3: { - message.autoscalingProfile = reader.int32(); - break; - } - case 4: { - message.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.autoprovisioningLocations && message.autoprovisioningLocations.length)) - message.autoprovisioningLocations = []; - message.autoprovisioningLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterAutoscaling message. - * @function verify - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) - if (typeof message.enableNodeAutoprovisioning !== "boolean") - return "enableNodeAutoprovisioning: boolean expected"; - if (message.resourceLimits != null && message.hasOwnProperty("resourceLimits")) { - if (!Array.isArray(message.resourceLimits)) - return "resourceLimits: array expected"; - for (var i = 0; i < message.resourceLimits.length; ++i) { - var error = $root.google.container.v1beta1.ResourceLimit.verify(message.resourceLimits[i]); - if (error) - return "resourceLimits." + error; - } - } - if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) - switch (message.autoscalingProfile) { - default: - return "autoscalingProfile: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) { - var error = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify(message.autoprovisioningNodePoolDefaults); - if (error) - return "autoprovisioningNodePoolDefaults." + error; - } - if (message.autoprovisioningLocations != null && message.hasOwnProperty("autoprovisioningLocations")) { - if (!Array.isArray(message.autoprovisioningLocations)) - return "autoprovisioningLocations: array expected"; - for (var i = 0; i < message.autoprovisioningLocations.length; ++i) - if (!$util.isString(message.autoprovisioningLocations[i])) - return "autoprovisioningLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ClusterAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ClusterAutoscaling} ClusterAutoscaling - */ - ClusterAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ClusterAutoscaling) - return object; - var message = new $root.google.container.v1beta1.ClusterAutoscaling(); - if (object.enableNodeAutoprovisioning != null) - message.enableNodeAutoprovisioning = Boolean(object.enableNodeAutoprovisioning); - if (object.resourceLimits) { - if (!Array.isArray(object.resourceLimits)) - throw TypeError(".google.container.v1beta1.ClusterAutoscaling.resourceLimits: array expected"); - message.resourceLimits = []; - for (var i = 0; i < object.resourceLimits.length; ++i) { - if (typeof object.resourceLimits[i] !== "object") - throw TypeError(".google.container.v1beta1.ClusterAutoscaling.resourceLimits: object expected"); - message.resourceLimits[i] = $root.google.container.v1beta1.ResourceLimit.fromObject(object.resourceLimits[i]); - } - } - switch (object.autoscalingProfile) { - default: - if (typeof object.autoscalingProfile === "number") { - message.autoscalingProfile = object.autoscalingProfile; - break; - } - break; - case "PROFILE_UNSPECIFIED": - case 0: - message.autoscalingProfile = 0; - break; - case "OPTIMIZE_UTILIZATION": - case 1: - message.autoscalingProfile = 1; - break; - case "BALANCED": - case 2: - message.autoscalingProfile = 2; - break; - } - if (object.autoprovisioningNodePoolDefaults != null) { - if (typeof object.autoprovisioningNodePoolDefaults !== "object") - throw TypeError(".google.container.v1beta1.ClusterAutoscaling.autoprovisioningNodePoolDefaults: object expected"); - message.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.fromObject(object.autoprovisioningNodePoolDefaults); - } - if (object.autoprovisioningLocations) { - if (!Array.isArray(object.autoprovisioningLocations)) - throw TypeError(".google.container.v1beta1.ClusterAutoscaling.autoprovisioningLocations: array expected"); - message.autoprovisioningLocations = []; - for (var i = 0; i < object.autoprovisioningLocations.length; ++i) - message.autoprovisioningLocations[i] = String(object.autoprovisioningLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ClusterAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {google.container.v1beta1.ClusterAutoscaling} message ClusterAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resourceLimits = []; - object.autoprovisioningLocations = []; - } - if (options.defaults) { - object.enableNodeAutoprovisioning = false; - object.autoscalingProfile = options.enums === String ? "PROFILE_UNSPECIFIED" : 0; - object.autoprovisioningNodePoolDefaults = null; - } - if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) - object.enableNodeAutoprovisioning = message.enableNodeAutoprovisioning; - if (message.resourceLimits && message.resourceLimits.length) { - object.resourceLimits = []; - for (var j = 0; j < message.resourceLimits.length; ++j) - object.resourceLimits[j] = $root.google.container.v1beta1.ResourceLimit.toObject(message.resourceLimits[j], options); - } - if (message.autoscalingProfile != null && message.hasOwnProperty("autoscalingProfile")) - object.autoscalingProfile = options.enums === String ? $root.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] === undefined ? message.autoscalingProfile : $root.google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile[message.autoscalingProfile] : message.autoscalingProfile; - if (message.autoprovisioningNodePoolDefaults != null && message.hasOwnProperty("autoprovisioningNodePoolDefaults")) - object.autoprovisioningNodePoolDefaults = $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults.toObject(message.autoprovisioningNodePoolDefaults, options); - if (message.autoprovisioningLocations && message.autoprovisioningLocations.length) { - object.autoprovisioningLocations = []; - for (var j = 0; j < message.autoprovisioningLocations.length; ++j) - object.autoprovisioningLocations[j] = message.autoprovisioningLocations[j]; - } - return object; - }; - - /** - * Converts this ClusterAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ClusterAutoscaling - * @instance - * @returns {Object.} JSON object - */ - ClusterAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterAutoscaling - * @function getTypeUrl - * @memberof google.container.v1beta1.ClusterAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ClusterAutoscaling"; - }; - - /** - * AutoscalingProfile enum. - * @name google.container.v1beta1.ClusterAutoscaling.AutoscalingProfile - * @enum {number} - * @property {number} PROFILE_UNSPECIFIED=0 PROFILE_UNSPECIFIED value - * @property {number} OPTIMIZE_UTILIZATION=1 OPTIMIZE_UTILIZATION value - * @property {number} BALANCED=2 BALANCED value - */ - ClusterAutoscaling.AutoscalingProfile = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROFILE_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIMIZE_UTILIZATION"] = 1; - values[valuesById[2] = "BALANCED"] = 2; - return values; - })(); - - return ClusterAutoscaling; - })(); - - v1beta1.AutoprovisioningNodePoolDefaults = (function() { - - /** - * Properties of an AutoprovisioningNodePoolDefaults. - * @memberof google.container.v1beta1 - * @interface IAutoprovisioningNodePoolDefaults - * @property {Array.|null} [oauthScopes] AutoprovisioningNodePoolDefaults oauthScopes - * @property {string|null} [serviceAccount] AutoprovisioningNodePoolDefaults serviceAccount - * @property {google.container.v1beta1.NodePool.IUpgradeSettings|null} [upgradeSettings] AutoprovisioningNodePoolDefaults upgradeSettings - * @property {google.container.v1beta1.INodeManagement|null} [management] AutoprovisioningNodePoolDefaults management - * @property {string|null} [minCpuPlatform] AutoprovisioningNodePoolDefaults minCpuPlatform - * @property {number|null} [diskSizeGb] AutoprovisioningNodePoolDefaults diskSizeGb - * @property {string|null} [diskType] AutoprovisioningNodePoolDefaults diskType - * @property {google.container.v1beta1.IShieldedInstanceConfig|null} [shieldedInstanceConfig] AutoprovisioningNodePoolDefaults shieldedInstanceConfig - * @property {string|null} [bootDiskKmsKey] AutoprovisioningNodePoolDefaults bootDiskKmsKey - * @property {string|null} [imageType] AutoprovisioningNodePoolDefaults imageType - * @property {boolean|null} [insecureKubeletReadonlyPortEnabled] AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled - */ - - /** - * Constructs a new AutoprovisioningNodePoolDefaults. - * @memberof google.container.v1beta1 - * @classdesc Represents an AutoprovisioningNodePoolDefaults. - * @implements IAutoprovisioningNodePoolDefaults - * @constructor - * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set - */ - function AutoprovisioningNodePoolDefaults(properties) { - this.oauthScopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoprovisioningNodePoolDefaults oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.oauthScopes = $util.emptyArray; - - /** - * AutoprovisioningNodePoolDefaults serviceAccount. - * @member {string} serviceAccount - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.serviceAccount = ""; - - /** - * AutoprovisioningNodePoolDefaults upgradeSettings. - * @member {google.container.v1beta1.NodePool.IUpgradeSettings|null|undefined} upgradeSettings - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.upgradeSettings = null; - - /** - * AutoprovisioningNodePoolDefaults management. - * @member {google.container.v1beta1.INodeManagement|null|undefined} management - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.management = null; - - /** - * AutoprovisioningNodePoolDefaults minCpuPlatform. - * @member {string} minCpuPlatform - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.minCpuPlatform = ""; - - /** - * AutoprovisioningNodePoolDefaults diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.diskSizeGb = 0; - - /** - * AutoprovisioningNodePoolDefaults diskType. - * @member {string} diskType - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.diskType = ""; - - /** - * AutoprovisioningNodePoolDefaults shieldedInstanceConfig. - * @member {google.container.v1beta1.IShieldedInstanceConfig|null|undefined} shieldedInstanceConfig - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.shieldedInstanceConfig = null; - - /** - * AutoprovisioningNodePoolDefaults bootDiskKmsKey. - * @member {string} bootDiskKmsKey - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.bootDiskKmsKey = ""; - - /** - * AutoprovisioningNodePoolDefaults imageType. - * @member {string} imageType - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.imageType = ""; - - /** - * AutoprovisioningNodePoolDefaults insecureKubeletReadonlyPortEnabled. - * @member {boolean|null|undefined} insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - AutoprovisioningNodePoolDefaults.prototype.insecureKubeletReadonlyPortEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AutoprovisioningNodePoolDefaults _insecureKubeletReadonlyPortEnabled. - * @member {"insecureKubeletReadonlyPortEnabled"|undefined} _insecureKubeletReadonlyPortEnabled - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - */ - Object.defineProperty(AutoprovisioningNodePoolDefaults.prototype, "_insecureKubeletReadonlyPortEnabled", { - get: $util.oneOfGetter($oneOfFields = ["insecureKubeletReadonlyPortEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AutoprovisioningNodePoolDefaults instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults=} [properties] Properties to set - * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults instance - */ - AutoprovisioningNodePoolDefaults.create = function create(properties) { - return new AutoprovisioningNodePoolDefaults(properties); - }; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoprovisioningNodePoolDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.oauthScopes[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); - if (message.upgradeSettings != null && Object.hasOwnProperty.call(message, "upgradeSettings")) - $root.google.container.v1beta1.NodePool.UpgradeSettings.encode(message.upgradeSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.management != null && Object.hasOwnProperty.call(message, "management")) - $root.google.container.v1beta1.NodeManagement.encode(message.management, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.minCpuPlatform); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskSizeGb); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.diskType); - if (message.shieldedInstanceConfig != null && Object.hasOwnProperty.call(message, "shieldedInstanceConfig")) - $root.google.container.v1beta1.ShieldedInstanceConfig.encode(message.shieldedInstanceConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.bootDiskKmsKey); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.imageType); - if (message.insecureKubeletReadonlyPortEnabled != null && Object.hasOwnProperty.call(message, "insecureKubeletReadonlyPortEnabled")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.insecureKubeletReadonlyPortEnabled); - return writer; - }; - - /** - * Encodes the specified AutoprovisioningNodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1beta1.AutoprovisioningNodePoolDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1beta1.IAutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoprovisioningNodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoprovisioningNodePoolDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 2: { - message.serviceAccount = reader.string(); - break; - } - case 3: { - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.decode(reader, reader.uint32()); - break; - } - case 4: { - message.management = $root.google.container.v1beta1.NodeManagement.decode(reader, reader.uint32()); - break; - } - case 5: { - message.minCpuPlatform = reader.string(); - break; - } - case 6: { - message.diskSizeGb = reader.int32(); - break; - } - case 7: { - message.diskType = reader.string(); - break; - } - case 8: { - message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.bootDiskKmsKey = reader.string(); - break; - } - case 10: { - message.imageType = reader.string(); - break; - } - case 13: { - message.insecureKubeletReadonlyPortEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoprovisioningNodePoolDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoprovisioningNodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoprovisioningNodePoolDefaults message. - * @function verify - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoprovisioningNodePoolDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) { - var error = $root.google.container.v1beta1.NodePool.UpgradeSettings.verify(message.upgradeSettings); - if (error) - return "upgradeSettings." + error; - } - if (message.management != null && message.hasOwnProperty("management")) { - var error = $root.google.container.v1beta1.NodeManagement.verify(message.management); - if (error) - return "management." + error; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.diskType != null && message.hasOwnProperty("diskType")) - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) { - var error = $root.google.container.v1beta1.ShieldedInstanceConfig.verify(message.shieldedInstanceConfig); - if (error) - return "shieldedInstanceConfig." + error; - } - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - if (!$util.isString(message.bootDiskKmsKey)) - return "bootDiskKmsKey: string expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - properties._insecureKubeletReadonlyPortEnabled = 1; - if (typeof message.insecureKubeletReadonlyPortEnabled !== "boolean") - return "insecureKubeletReadonlyPortEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates an AutoprovisioningNodePoolDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AutoprovisioningNodePoolDefaults} AutoprovisioningNodePoolDefaults - */ - AutoprovisioningNodePoolDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults) - return object; - var message = new $root.google.container.v1beta1.AutoprovisioningNodePoolDefaults(); - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.upgradeSettings != null) { - if (typeof object.upgradeSettings !== "object") - throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.upgradeSettings: object expected"); - message.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.fromObject(object.upgradeSettings); - } - if (object.management != null) { - if (typeof object.management !== "object") - throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.management: object expected"); - message.management = $root.google.container.v1beta1.NodeManagement.fromObject(object.management); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.diskType != null) - message.diskType = String(object.diskType); - if (object.shieldedInstanceConfig != null) { - if (typeof object.shieldedInstanceConfig !== "object") - throw TypeError(".google.container.v1beta1.AutoprovisioningNodePoolDefaults.shieldedInstanceConfig: object expected"); - message.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.fromObject(object.shieldedInstanceConfig); - } - if (object.bootDiskKmsKey != null) - message.bootDiskKmsKey = String(object.bootDiskKmsKey); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.insecureKubeletReadonlyPortEnabled != null) - message.insecureKubeletReadonlyPortEnabled = Boolean(object.insecureKubeletReadonlyPortEnabled); - return message; - }; - - /** - * Creates a plain object from an AutoprovisioningNodePoolDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {google.container.v1beta1.AutoprovisioningNodePoolDefaults} message AutoprovisioningNodePoolDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoprovisioningNodePoolDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.oauthScopes = []; - if (options.defaults) { - object.serviceAccount = ""; - object.upgradeSettings = null; - object.management = null; - object.minCpuPlatform = ""; - object.diskSizeGb = 0; - object.diskType = ""; - object.shieldedInstanceConfig = null; - object.bootDiskKmsKey = ""; - object.imageType = ""; - } - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.upgradeSettings != null && message.hasOwnProperty("upgradeSettings")) - object.upgradeSettings = $root.google.container.v1beta1.NodePool.UpgradeSettings.toObject(message.upgradeSettings, options); - if (message.management != null && message.hasOwnProperty("management")) - object.management = $root.google.container.v1beta1.NodeManagement.toObject(message.management, options); - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) - object.minCpuPlatform = message.minCpuPlatform; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.diskType != null && message.hasOwnProperty("diskType")) - object.diskType = message.diskType; - if (message.shieldedInstanceConfig != null && message.hasOwnProperty("shieldedInstanceConfig")) - object.shieldedInstanceConfig = $root.google.container.v1beta1.ShieldedInstanceConfig.toObject(message.shieldedInstanceConfig, options); - if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) - object.bootDiskKmsKey = message.bootDiskKmsKey; - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.insecureKubeletReadonlyPortEnabled != null && message.hasOwnProperty("insecureKubeletReadonlyPortEnabled")) { - object.insecureKubeletReadonlyPortEnabled = message.insecureKubeletReadonlyPortEnabled; - if (options.oneofs) - object._insecureKubeletReadonlyPortEnabled = "insecureKubeletReadonlyPortEnabled"; - } - return object; - }; - - /** - * Converts this AutoprovisioningNodePoolDefaults to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @instance - * @returns {Object.} JSON object - */ - AutoprovisioningNodePoolDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoprovisioningNodePoolDefaults - * @function getTypeUrl - * @memberof google.container.v1beta1.AutoprovisioningNodePoolDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoprovisioningNodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AutoprovisioningNodePoolDefaults"; - }; - - return AutoprovisioningNodePoolDefaults; - })(); - - v1beta1.ResourceLimit = (function() { - - /** - * Properties of a ResourceLimit. - * @memberof google.container.v1beta1 - * @interface IResourceLimit - * @property {string|null} [resourceType] ResourceLimit resourceType - * @property {number|Long|null} [minimum] ResourceLimit minimum - * @property {number|Long|null} [maximum] ResourceLimit maximum - */ - - /** - * Constructs a new ResourceLimit. - * @memberof google.container.v1beta1 - * @classdesc Represents a ResourceLimit. - * @implements IResourceLimit - * @constructor - * @param {google.container.v1beta1.IResourceLimit=} [properties] Properties to set - */ - function ResourceLimit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceLimit resourceType. - * @member {string} resourceType - * @memberof google.container.v1beta1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.resourceType = ""; - - /** - * ResourceLimit minimum. - * @member {number|Long} minimum - * @memberof google.container.v1beta1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.minimum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResourceLimit maximum. - * @member {number|Long} maximum - * @memberof google.container.v1beta1.ResourceLimit - * @instance - */ - ResourceLimit.prototype.maximum = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ResourceLimit instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {google.container.v1beta1.IResourceLimit=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit instance - */ - ResourceLimit.create = function create(properties) { - return new ResourceLimit(properties); - }; - - /** - * Encodes the specified ResourceLimit message. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {google.container.v1beta1.IResourceLimit} message ResourceLimit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLimit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); - if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.minimum); - if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maximum); - return writer; - }; - - /** - * Encodes the specified ResourceLimit message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceLimit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {google.container.v1beta1.IResourceLimit} message ResourceLimit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLimit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLimit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceLimit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.string(); - break; - } - case 2: { - message.minimum = reader.int64(); - break; - } - case 3: { - message.maximum = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceLimit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLimit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceLimit message. - * @function verify - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceLimit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.minimum != null && message.hasOwnProperty("minimum")) - if (!$util.isInteger(message.minimum) && !(message.minimum && $util.isInteger(message.minimum.low) && $util.isInteger(message.minimum.high))) - return "minimum: integer|Long expected"; - if (message.maximum != null && message.hasOwnProperty("maximum")) - if (!$util.isInteger(message.maximum) && !(message.maximum && $util.isInteger(message.maximum.low) && $util.isInteger(message.maximum.high))) - return "maximum: integer|Long expected"; - return null; - }; - - /** - * Creates a ResourceLimit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceLimit} ResourceLimit - */ - ResourceLimit.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceLimit) - return object; - var message = new $root.google.container.v1beta1.ResourceLimit(); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.minimum != null) - if ($util.Long) - (message.minimum = $util.Long.fromValue(object.minimum)).unsigned = false; - else if (typeof object.minimum === "string") - message.minimum = parseInt(object.minimum, 10); - else if (typeof object.minimum === "number") - message.minimum = object.minimum; - else if (typeof object.minimum === "object") - message.minimum = new $util.LongBits(object.minimum.low >>> 0, object.minimum.high >>> 0).toNumber(); - if (object.maximum != null) - if ($util.Long) - (message.maximum = $util.Long.fromValue(object.maximum)).unsigned = false; - else if (typeof object.maximum === "string") - message.maximum = parseInt(object.maximum, 10); - else if (typeof object.maximum === "number") - message.maximum = object.maximum; - else if (typeof object.maximum === "object") - message.maximum = new $util.LongBits(object.maximum.low >>> 0, object.maximum.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ResourceLimit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {google.container.v1beta1.ResourceLimit} message ResourceLimit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceLimit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minimum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minimum = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maximum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maximum = options.longs === String ? "0" : 0; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.minimum != null && message.hasOwnProperty("minimum")) - if (typeof message.minimum === "number") - object.minimum = options.longs === String ? String(message.minimum) : message.minimum; - else - object.minimum = options.longs === String ? $util.Long.prototype.toString.call(message.minimum) : options.longs === Number ? new $util.LongBits(message.minimum.low >>> 0, message.minimum.high >>> 0).toNumber() : message.minimum; - if (message.maximum != null && message.hasOwnProperty("maximum")) - if (typeof message.maximum === "number") - object.maximum = options.longs === String ? String(message.maximum) : message.maximum; - else - object.maximum = options.longs === String ? $util.Long.prototype.toString.call(message.maximum) : options.longs === Number ? new $util.LongBits(message.maximum.low >>> 0, message.maximum.high >>> 0).toNumber() : message.maximum; - return object; - }; - - /** - * Converts this ResourceLimit to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceLimit - * @instance - * @returns {Object.} JSON object - */ - ResourceLimit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceLimit - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceLimit - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceLimit"; - }; - - return ResourceLimit; - })(); - - v1beta1.NodePoolAutoscaling = (function() { - - /** - * Properties of a NodePoolAutoscaling. - * @memberof google.container.v1beta1 - * @interface INodePoolAutoscaling - * @property {boolean|null} [enabled] NodePoolAutoscaling enabled - * @property {number|null} [minNodeCount] NodePoolAutoscaling minNodeCount - * @property {number|null} [maxNodeCount] NodePoolAutoscaling maxNodeCount - * @property {boolean|null} [autoprovisioned] NodePoolAutoscaling autoprovisioned - * @property {google.container.v1beta1.NodePoolAutoscaling.LocationPolicy|null} [locationPolicy] NodePoolAutoscaling locationPolicy - * @property {number|null} [totalMinNodeCount] NodePoolAutoscaling totalMinNodeCount - * @property {number|null} [totalMaxNodeCount] NodePoolAutoscaling totalMaxNodeCount - */ - - /** - * Constructs a new NodePoolAutoscaling. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodePoolAutoscaling. - * @implements INodePoolAutoscaling - * @constructor - * @param {google.container.v1beta1.INodePoolAutoscaling=} [properties] Properties to set - */ - function NodePoolAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolAutoscaling enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.enabled = false; - - /** - * NodePoolAutoscaling minNodeCount. - * @member {number} minNodeCount - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.minNodeCount = 0; - - /** - * NodePoolAutoscaling maxNodeCount. - * @member {number} maxNodeCount - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.maxNodeCount = 0; - - /** - * NodePoolAutoscaling autoprovisioned. - * @member {boolean} autoprovisioned - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.autoprovisioned = false; - - /** - * NodePoolAutoscaling locationPolicy. - * @member {google.container.v1beta1.NodePoolAutoscaling.LocationPolicy} locationPolicy - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.locationPolicy = 0; - - /** - * NodePoolAutoscaling totalMinNodeCount. - * @member {number} totalMinNodeCount - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.totalMinNodeCount = 0; - - /** - * NodePoolAutoscaling totalMaxNodeCount. - * @member {number} totalMaxNodeCount - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - */ - NodePoolAutoscaling.prototype.totalMaxNodeCount = 0; - - /** - * Creates a new NodePoolAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {google.container.v1beta1.INodePoolAutoscaling=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling instance - */ - NodePoolAutoscaling.create = function create(properties) { - return new NodePoolAutoscaling(properties); - }; - - /** - * Encodes the specified NodePoolAutoscaling message. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {google.container.v1beta1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minNodeCount); - if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); - if (message.autoprovisioned != null && Object.hasOwnProperty.call(message, "autoprovisioned")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autoprovisioned); - if (message.locationPolicy != null && Object.hasOwnProperty.call(message, "locationPolicy")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.locationPolicy); - if (message.totalMinNodeCount != null && Object.hasOwnProperty.call(message, "totalMinNodeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalMinNodeCount); - if (message.totalMaxNodeCount != null && Object.hasOwnProperty.call(message, "totalMaxNodeCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.totalMaxNodeCount); - return writer; - }; - - /** - * Encodes the specified NodePoolAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {google.container.v1beta1.INodePoolAutoscaling} message NodePoolAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.minNodeCount = reader.int32(); - break; - } - case 3: { - message.maxNodeCount = reader.int32(); - break; - } - case 4: { - message.autoprovisioned = reader.bool(); - break; - } - case 5: { - message.locationPolicy = reader.int32(); - break; - } - case 6: { - message.totalMinNodeCount = reader.int32(); - break; - } - case 7: { - message.totalMaxNodeCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolAutoscaling message. - * @function verify - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean 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.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) - if (typeof message.autoprovisioned !== "boolean") - return "autoprovisioned: boolean expected"; - if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) - switch (message.locationPolicy) { - default: - return "locationPolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) - if (!$util.isInteger(message.totalMinNodeCount)) - return "totalMinNodeCount: integer expected"; - if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) - if (!$util.isInteger(message.totalMaxNodeCount)) - return "totalMaxNodeCount: integer expected"; - return null; - }; - - /** - * Creates a NodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePoolAutoscaling} NodePoolAutoscaling - */ - NodePoolAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePoolAutoscaling) - return object; - var message = new $root.google.container.v1beta1.NodePoolAutoscaling(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.minNodeCount != null) - message.minNodeCount = object.minNodeCount | 0; - if (object.maxNodeCount != null) - message.maxNodeCount = object.maxNodeCount | 0; - if (object.autoprovisioned != null) - message.autoprovisioned = Boolean(object.autoprovisioned); - switch (object.locationPolicy) { - default: - if (typeof object.locationPolicy === "number") { - message.locationPolicy = object.locationPolicy; - break; - } - break; - case "LOCATION_POLICY_UNSPECIFIED": - case 0: - message.locationPolicy = 0; - break; - case "BALANCED": - case 1: - message.locationPolicy = 1; - break; - case "ANY": - case 2: - message.locationPolicy = 2; - break; - } - if (object.totalMinNodeCount != null) - message.totalMinNodeCount = object.totalMinNodeCount | 0; - if (object.totalMaxNodeCount != null) - message.totalMaxNodeCount = object.totalMaxNodeCount | 0; - return message; - }; - - /** - * Creates a plain object from a NodePoolAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {google.container.v1beta1.NodePoolAutoscaling} message NodePoolAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.minNodeCount = 0; - object.maxNodeCount = 0; - object.autoprovisioned = false; - object.locationPolicy = options.enums === String ? "LOCATION_POLICY_UNSPECIFIED" : 0; - object.totalMinNodeCount = 0; - object.totalMaxNodeCount = 0; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - object.minNodeCount = message.minNodeCount; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - object.maxNodeCount = message.maxNodeCount; - if (message.autoprovisioned != null && message.hasOwnProperty("autoprovisioned")) - object.autoprovisioned = message.autoprovisioned; - if (message.locationPolicy != null && message.hasOwnProperty("locationPolicy")) - object.locationPolicy = options.enums === String ? $root.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] === undefined ? message.locationPolicy : $root.google.container.v1beta1.NodePoolAutoscaling.LocationPolicy[message.locationPolicy] : message.locationPolicy; - if (message.totalMinNodeCount != null && message.hasOwnProperty("totalMinNodeCount")) - object.totalMinNodeCount = message.totalMinNodeCount; - if (message.totalMaxNodeCount != null && message.hasOwnProperty("totalMaxNodeCount")) - object.totalMaxNodeCount = message.totalMaxNodeCount; - return object; - }; - - /** - * Converts this NodePoolAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @instance - * @returns {Object.} JSON object - */ - NodePoolAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolAutoscaling - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePoolAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePoolAutoscaling"; - }; - - /** - * LocationPolicy enum. - * @name google.container.v1beta1.NodePoolAutoscaling.LocationPolicy - * @enum {number} - * @property {number} LOCATION_POLICY_UNSPECIFIED=0 LOCATION_POLICY_UNSPECIFIED value - * @property {number} BALANCED=1 BALANCED value - * @property {number} ANY=2 ANY value - */ - NodePoolAutoscaling.LocationPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCATION_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "BALANCED"] = 1; - values[valuesById[2] = "ANY"] = 2; - return values; - })(); - - return NodePoolAutoscaling; - })(); - - v1beta1.SetLabelsRequest = (function() { - - /** - * Properties of a SetLabelsRequest. - * @memberof google.container.v1beta1 - * @interface ISetLabelsRequest - * @property {string|null} [projectId] SetLabelsRequest projectId - * @property {string|null} [zone] SetLabelsRequest zone - * @property {string|null} [clusterId] SetLabelsRequest clusterId - * @property {Object.|null} [resourceLabels] SetLabelsRequest resourceLabels - * @property {string|null} [labelFingerprint] SetLabelsRequest labelFingerprint - * @property {string|null} [name] SetLabelsRequest name - */ - - /** - * Constructs a new SetLabelsRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetLabelsRequest. - * @implements ISetLabelsRequest - * @constructor - * @param {google.container.v1beta1.ISetLabelsRequest=} [properties] Properties to set - */ - function SetLabelsRequest(properties) { - this.resourceLabels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLabelsRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.projectId = ""; - - /** - * SetLabelsRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.zone = ""; - - /** - * SetLabelsRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.clusterId = ""; - - /** - * SetLabelsRequest resourceLabels. - * @member {Object.} resourceLabels - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.resourceLabels = $util.emptyObject; - - /** - * SetLabelsRequest labelFingerprint. - * @member {string} labelFingerprint - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.labelFingerprint = ""; - - /** - * SetLabelsRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - */ - SetLabelsRequest.prototype.name = ""; - - /** - * Creates a new SetLabelsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {google.container.v1beta1.ISetLabelsRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest instance - */ - SetLabelsRequest.create = function create(properties) { - return new SetLabelsRequest(properties); - }; - - /** - * Encodes the specified SetLabelsRequest message. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {google.container.v1beta1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLabelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) - for (var keys = Object.keys(message.resourceLabels), 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.resourceLabels[keys[i]]).ldelim(); - if (message.labelFingerprint != null && Object.hasOwnProperty.call(message, "labelFingerprint")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.labelFingerprint); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLabelsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLabelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {google.container.v1beta1.ISetLabelsRequest} message SetLabelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLabelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLabelsRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - if (message.resourceLabels === $util.emptyObject) - message.resourceLabels = {}; - 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.resourceLabels[key] = value; - break; - } - case 5: { - message.labelFingerprint = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLabelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLabelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLabelsRequest message. - * @function verify - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLabelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { - if (!$util.isObject(message.resourceLabels)) - return "resourceLabels: object expected"; - var key = Object.keys(message.resourceLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceLabels[key[i]])) - return "resourceLabels: string{k:string} expected"; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - if (!$util.isString(message.labelFingerprint)) - return "labelFingerprint: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLabelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetLabelsRequest} SetLabelsRequest - */ - SetLabelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetLabelsRequest) - return object; - var message = new $root.google.container.v1beta1.SetLabelsRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.resourceLabels) { - if (typeof object.resourceLabels !== "object") - throw TypeError(".google.container.v1beta1.SetLabelsRequest.resourceLabels: object expected"); - message.resourceLabels = {}; - for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) - message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); - } - if (object.labelFingerprint != null) - message.labelFingerprint = String(object.labelFingerprint); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLabelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {google.container.v1beta1.SetLabelsRequest} message SetLabelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLabelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceLabels = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.labelFingerprint = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - var keys2; - if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { - object.resourceLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; - } - if (message.labelFingerprint != null && message.hasOwnProperty("labelFingerprint")) - object.labelFingerprint = message.labelFingerprint; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLabelsRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetLabelsRequest - * @instance - * @returns {Object.} JSON object - */ - SetLabelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLabelsRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetLabelsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetLabelsRequest"; - }; - - return SetLabelsRequest; - })(); - - v1beta1.SetLegacyAbacRequest = (function() { - - /** - * Properties of a SetLegacyAbacRequest. - * @memberof google.container.v1beta1 - * @interface ISetLegacyAbacRequest - * @property {string|null} [projectId] SetLegacyAbacRequest projectId - * @property {string|null} [zone] SetLegacyAbacRequest zone - * @property {string|null} [clusterId] SetLegacyAbacRequest clusterId - * @property {boolean|null} [enabled] SetLegacyAbacRequest enabled - * @property {string|null} [name] SetLegacyAbacRequest name - */ - - /** - * Constructs a new SetLegacyAbacRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetLegacyAbacRequest. - * @implements ISetLegacyAbacRequest - * @constructor - * @param {google.container.v1beta1.ISetLegacyAbacRequest=} [properties] Properties to set - */ - function SetLegacyAbacRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetLegacyAbacRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.projectId = ""; - - /** - * SetLegacyAbacRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.zone = ""; - - /** - * SetLegacyAbacRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.clusterId = ""; - - /** - * SetLegacyAbacRequest enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.enabled = false; - - /** - * SetLegacyAbacRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - */ - SetLegacyAbacRequest.prototype.name = ""; - - /** - * Creates a new SetLegacyAbacRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {google.container.v1beta1.ISetLegacyAbacRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest instance - */ - SetLegacyAbacRequest.create = function create(properties) { - return new SetLegacyAbacRequest(properties); - }; - - /** - * Encodes the specified SetLegacyAbacRequest message. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {google.container.v1beta1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLegacyAbacRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetLegacyAbacRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetLegacyAbacRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {google.container.v1beta1.ISetLegacyAbacRequest} message SetLegacyAbacRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetLegacyAbacRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLegacyAbacRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetLegacyAbacRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.enabled = reader.bool(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetLegacyAbacRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetLegacyAbacRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetLegacyAbacRequest message. - * @function verify - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetLegacyAbacRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetLegacyAbacRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetLegacyAbacRequest} SetLegacyAbacRequest - */ - SetLegacyAbacRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetLegacyAbacRequest) - return object; - var message = new $root.google.container.v1beta1.SetLegacyAbacRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetLegacyAbacRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {google.container.v1beta1.SetLegacyAbacRequest} message SetLegacyAbacRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetLegacyAbacRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.enabled = false; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetLegacyAbacRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @instance - * @returns {Object.} JSON object - */ - SetLegacyAbacRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetLegacyAbacRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetLegacyAbacRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetLegacyAbacRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetLegacyAbacRequest"; - }; - - return SetLegacyAbacRequest; - })(); - - v1beta1.StartIPRotationRequest = (function() { - - /** - * Properties of a StartIPRotationRequest. - * @memberof google.container.v1beta1 - * @interface IStartIPRotationRequest - * @property {string|null} [projectId] StartIPRotationRequest projectId - * @property {string|null} [zone] StartIPRotationRequest zone - * @property {string|null} [clusterId] StartIPRotationRequest clusterId - * @property {string|null} [name] StartIPRotationRequest name - * @property {boolean|null} [rotateCredentials] StartIPRotationRequest rotateCredentials - */ - - /** - * Constructs a new StartIPRotationRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a StartIPRotationRequest. - * @implements IStartIPRotationRequest - * @constructor - * @param {google.container.v1beta1.IStartIPRotationRequest=} [properties] Properties to set - */ - function StartIPRotationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StartIPRotationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.projectId = ""; - - /** - * StartIPRotationRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.zone = ""; - - /** - * StartIPRotationRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.clusterId = ""; - - /** - * StartIPRotationRequest name. - * @member {string} name - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.name = ""; - - /** - * StartIPRotationRequest rotateCredentials. - * @member {boolean} rotateCredentials - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - */ - StartIPRotationRequest.prototype.rotateCredentials = false; - - /** - * Creates a new StartIPRotationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {google.container.v1beta1.IStartIPRotationRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest instance - */ - StartIPRotationRequest.create = function create(properties) { - return new StartIPRotationRequest(properties); - }; - - /** - * Encodes the specified StartIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {google.container.v1beta1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartIPRotationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.rotateCredentials != null && Object.hasOwnProperty.call(message, "rotateCredentials")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.rotateCredentials); - return writer; - }; - - /** - * Encodes the specified StartIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.StartIPRotationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {google.container.v1beta1.IStartIPRotationRequest} message StartIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartIPRotationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StartIPRotationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - message.rotateCredentials = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartIPRotationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartIPRotationRequest message. - * @function verify - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartIPRotationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) - if (typeof message.rotateCredentials !== "boolean") - return "rotateCredentials: boolean expected"; - return null; - }; - - /** - * Creates a StartIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.StartIPRotationRequest} StartIPRotationRequest - */ - StartIPRotationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.StartIPRotationRequest) - return object; - var message = new $root.google.container.v1beta1.StartIPRotationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - if (object.rotateCredentials != null) - message.rotateCredentials = Boolean(object.rotateCredentials); - return message; - }; - - /** - * Creates a plain object from a StartIPRotationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {google.container.v1beta1.StartIPRotationRequest} message StartIPRotationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartIPRotationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - object.rotateCredentials = false; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.rotateCredentials != null && message.hasOwnProperty("rotateCredentials")) - object.rotateCredentials = message.rotateCredentials; - return object; - }; - - /** - * Converts this StartIPRotationRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.StartIPRotationRequest - * @instance - * @returns {Object.} JSON object - */ - StartIPRotationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartIPRotationRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.StartIPRotationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.StartIPRotationRequest"; - }; - - return StartIPRotationRequest; - })(); - - v1beta1.CompleteIPRotationRequest = (function() { - - /** - * Properties of a CompleteIPRotationRequest. - * @memberof google.container.v1beta1 - * @interface ICompleteIPRotationRequest - * @property {string|null} [projectId] CompleteIPRotationRequest projectId - * @property {string|null} [zone] CompleteIPRotationRequest zone - * @property {string|null} [clusterId] CompleteIPRotationRequest clusterId - * @property {string|null} [name] CompleteIPRotationRequest name - */ - - /** - * Constructs a new CompleteIPRotationRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CompleteIPRotationRequest. - * @implements ICompleteIPRotationRequest - * @constructor - * @param {google.container.v1beta1.ICompleteIPRotationRequest=} [properties] Properties to set - */ - function CompleteIPRotationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompleteIPRotationRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.projectId = ""; - - /** - * CompleteIPRotationRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.zone = ""; - - /** - * CompleteIPRotationRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.clusterId = ""; - - /** - * CompleteIPRotationRequest name. - * @member {string} name - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @instance - */ - CompleteIPRotationRequest.prototype.name = ""; - - /** - * Creates a new CompleteIPRotationRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {google.container.v1beta1.ICompleteIPRotationRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest instance - */ - CompleteIPRotationRequest.create = function create(properties) { - return new CompleteIPRotationRequest(properties); - }; - - /** - * Encodes the specified CompleteIPRotationRequest message. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {google.container.v1beta1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteIPRotationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified CompleteIPRotationRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CompleteIPRotationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {google.container.v1beta1.ICompleteIPRotationRequest} message CompleteIPRotationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteIPRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteIPRotationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CompleteIPRotationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompleteIPRotationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteIPRotationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteIPRotationRequest message. - * @function verify - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteIPRotationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CompleteIPRotationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CompleteIPRotationRequest} CompleteIPRotationRequest - */ - CompleteIPRotationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CompleteIPRotationRequest) - return object; - var message = new $root.google.container.v1beta1.CompleteIPRotationRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CompleteIPRotationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {google.container.v1beta1.CompleteIPRotationRequest} message CompleteIPRotationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteIPRotationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CompleteIPRotationRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @instance - * @returns {Object.} JSON object - */ - CompleteIPRotationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompleteIPRotationRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CompleteIPRotationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteIPRotationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CompleteIPRotationRequest"; - }; - - return CompleteIPRotationRequest; - })(); - - v1beta1.AcceleratorConfig = (function() { - - /** - * Properties of an AcceleratorConfig. - * @memberof google.container.v1beta1 - * @interface IAcceleratorConfig - * @property {number|Long|null} [acceleratorCount] AcceleratorConfig acceleratorCount - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {string|null} [gpuPartitionSize] AcceleratorConfig gpuPartitionSize - * @property {number|Long|null} [maxTimeSharedClientsPerGpu] AcceleratorConfig maxTimeSharedClientsPerGpu - * @property {google.container.v1beta1.IGPUSharingConfig|null} [gpuSharingConfig] AcceleratorConfig gpuSharingConfig - * @property {google.container.v1beta1.IGPUDriverInstallationConfig|null} [gpuDriverInstallationConfig] AcceleratorConfig gpuDriverInstallationConfig - */ - - /** - * Constructs a new AcceleratorConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig - * @constructor - * @param {google.container.v1beta1.IAcceleratorConfig=} [properties] Properties to set - */ - function AcceleratorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcceleratorConfig acceleratorCount. - * @member {number|Long} acceleratorCount - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AcceleratorConfig acceleratorType. - * @member {string} acceleratorType - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorType = ""; - - /** - * AcceleratorConfig gpuPartitionSize. - * @member {string} gpuPartitionSize - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuPartitionSize = ""; - - /** - * AcceleratorConfig maxTimeSharedClientsPerGpu. - * @member {number|Long} maxTimeSharedClientsPerGpu - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.maxTimeSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AcceleratorConfig gpuSharingConfig. - * @member {google.container.v1beta1.IGPUSharingConfig|null|undefined} gpuSharingConfig - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuSharingConfig = null; - - /** - * AcceleratorConfig gpuDriverInstallationConfig. - * @member {google.container.v1beta1.IGPUDriverInstallationConfig|null|undefined} gpuDriverInstallationConfig - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.gpuDriverInstallationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AcceleratorConfig _gpuSharingConfig. - * @member {"gpuSharingConfig"|undefined} _gpuSharingConfig - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_gpuSharingConfig", { - get: $util.oneOfGetter($oneOfFields = ["gpuSharingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _gpuDriverInstallationConfig. - * @member {"gpuDriverInstallationConfig"|undefined} _gpuDriverInstallationConfig - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_gpuDriverInstallationConfig", { - get: $util.oneOfGetter($oneOfFields = ["gpuDriverInstallationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {google.container.v1beta1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {google.container.v1beta1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.acceleratorCount); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.acceleratorType); - if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gpuPartitionSize); - if (message.maxTimeSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxTimeSharedClientsPerGpu")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxTimeSharedClientsPerGpu); - if (message.gpuSharingConfig != null && Object.hasOwnProperty.call(message, "gpuSharingConfig")) - $root.google.container.v1beta1.GPUSharingConfig.encode(message.gpuSharingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.gpuDriverInstallationConfig != null && Object.hasOwnProperty.call(message, "gpuDriverInstallationConfig")) - $root.google.container.v1beta1.GPUDriverInstallationConfig.encode(message.gpuDriverInstallationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AcceleratorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {google.container.v1beta1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AcceleratorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceleratorCount = reader.int64(); - break; - } - case 2: { - message.acceleratorType = reader.string(); - break; - } - case 3: { - message.gpuPartitionSize = reader.string(); - break; - } - case 4: { - message.maxTimeSharedClientsPerGpu = reader.int64(); - break; - } - case 5: { - message.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcceleratorConfig message. - * @function verify - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcceleratorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) - if (!$util.isInteger(message.acceleratorCount) && !(message.acceleratorCount && $util.isInteger(message.acceleratorCount.low) && $util.isInteger(message.acceleratorCount.high))) - return "acceleratorCount: integer|Long expected"; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) - if (!$util.isString(message.gpuPartitionSize)) - return "gpuPartitionSize: string expected"; - if (message.maxTimeSharedClientsPerGpu != null && message.hasOwnProperty("maxTimeSharedClientsPerGpu")) - if (!$util.isInteger(message.maxTimeSharedClientsPerGpu) && !(message.maxTimeSharedClientsPerGpu && $util.isInteger(message.maxTimeSharedClientsPerGpu.low) && $util.isInteger(message.maxTimeSharedClientsPerGpu.high))) - return "maxTimeSharedClientsPerGpu: integer|Long expected"; - if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { - properties._gpuSharingConfig = 1; - { - var error = $root.google.container.v1beta1.GPUSharingConfig.verify(message.gpuSharingConfig); - if (error) - return "gpuSharingConfig." + error; - } - } - if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { - properties._gpuDriverInstallationConfig = 1; - { - var error = $root.google.container.v1beta1.GPUDriverInstallationConfig.verify(message.gpuDriverInstallationConfig); - if (error) - return "gpuDriverInstallationConfig." + error; - } - } - return null; - }; - - /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AcceleratorConfig} AcceleratorConfig - */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AcceleratorConfig) - return object; - var message = new $root.google.container.v1beta1.AcceleratorConfig(); - if (object.acceleratorCount != null) - if ($util.Long) - (message.acceleratorCount = $util.Long.fromValue(object.acceleratorCount)).unsigned = false; - else if (typeof object.acceleratorCount === "string") - message.acceleratorCount = parseInt(object.acceleratorCount, 10); - else if (typeof object.acceleratorCount === "number") - message.acceleratorCount = object.acceleratorCount; - else if (typeof object.acceleratorCount === "object") - message.acceleratorCount = new $util.LongBits(object.acceleratorCount.low >>> 0, object.acceleratorCount.high >>> 0).toNumber(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.gpuPartitionSize != null) - message.gpuPartitionSize = String(object.gpuPartitionSize); - if (object.maxTimeSharedClientsPerGpu != null) - if ($util.Long) - (message.maxTimeSharedClientsPerGpu = $util.Long.fromValue(object.maxTimeSharedClientsPerGpu)).unsigned = false; - else if (typeof object.maxTimeSharedClientsPerGpu === "string") - message.maxTimeSharedClientsPerGpu = parseInt(object.maxTimeSharedClientsPerGpu, 10); - else if (typeof object.maxTimeSharedClientsPerGpu === "number") - message.maxTimeSharedClientsPerGpu = object.maxTimeSharedClientsPerGpu; - else if (typeof object.maxTimeSharedClientsPerGpu === "object") - message.maxTimeSharedClientsPerGpu = new $util.LongBits(object.maxTimeSharedClientsPerGpu.low >>> 0, object.maxTimeSharedClientsPerGpu.high >>> 0).toNumber(); - if (object.gpuSharingConfig != null) { - if (typeof object.gpuSharingConfig !== "object") - throw TypeError(".google.container.v1beta1.AcceleratorConfig.gpuSharingConfig: object expected"); - message.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.fromObject(object.gpuSharingConfig); - } - if (object.gpuDriverInstallationConfig != null) { - if (typeof object.gpuDriverInstallationConfig !== "object") - throw TypeError(".google.container.v1beta1.AcceleratorConfig.gpuDriverInstallationConfig: object expected"); - message.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.fromObject(object.gpuDriverInstallationConfig); - } - return message; - }; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {google.container.v1beta1.AcceleratorConfig} message AcceleratorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcceleratorConfig.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.acceleratorCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.acceleratorCount = options.longs === String ? "0" : 0; - object.acceleratorType = ""; - object.gpuPartitionSize = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxTimeSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxTimeSharedClientsPerGpu = options.longs === String ? "0" : 0; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) - if (typeof message.acceleratorCount === "number") - object.acceleratorCount = options.longs === String ? String(message.acceleratorCount) : message.acceleratorCount; - else - object.acceleratorCount = options.longs === String ? $util.Long.prototype.toString.call(message.acceleratorCount) : options.longs === Number ? new $util.LongBits(message.acceleratorCount.low >>> 0, message.acceleratorCount.high >>> 0).toNumber() : message.acceleratorCount; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) - object.acceleratorType = message.acceleratorType; - if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) - object.gpuPartitionSize = message.gpuPartitionSize; - if (message.maxTimeSharedClientsPerGpu != null && message.hasOwnProperty("maxTimeSharedClientsPerGpu")) - if (typeof message.maxTimeSharedClientsPerGpu === "number") - object.maxTimeSharedClientsPerGpu = options.longs === String ? String(message.maxTimeSharedClientsPerGpu) : message.maxTimeSharedClientsPerGpu; - else - object.maxTimeSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxTimeSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxTimeSharedClientsPerGpu.low >>> 0, message.maxTimeSharedClientsPerGpu.high >>> 0).toNumber() : message.maxTimeSharedClientsPerGpu; - if (message.gpuSharingConfig != null && message.hasOwnProperty("gpuSharingConfig")) { - object.gpuSharingConfig = $root.google.container.v1beta1.GPUSharingConfig.toObject(message.gpuSharingConfig, options); - if (options.oneofs) - object._gpuSharingConfig = "gpuSharingConfig"; - } - if (message.gpuDriverInstallationConfig != null && message.hasOwnProperty("gpuDriverInstallationConfig")) { - object.gpuDriverInstallationConfig = $root.google.container.v1beta1.GPUDriverInstallationConfig.toObject(message.gpuDriverInstallationConfig, options); - if (options.oneofs) - object._gpuDriverInstallationConfig = "gpuDriverInstallationConfig"; - } - return object; - }; - - /** - * Converts this AcceleratorConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AcceleratorConfig - * @instance - * @returns {Object.} JSON object - */ - AcceleratorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcceleratorConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AcceleratorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AcceleratorConfig"; - }; - - return AcceleratorConfig; - })(); - - v1beta1.GPUSharingConfig = (function() { - - /** - * Properties of a GPUSharingConfig. - * @memberof google.container.v1beta1 - * @interface IGPUSharingConfig - * @property {number|Long|null} [maxSharedClientsPerGpu] GPUSharingConfig maxSharedClientsPerGpu - * @property {google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null} [gpuSharingStrategy] GPUSharingConfig gpuSharingStrategy - */ - - /** - * Constructs a new GPUSharingConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GPUSharingConfig. - * @implements IGPUSharingConfig - * @constructor - * @param {google.container.v1beta1.IGPUSharingConfig=} [properties] Properties to set - */ - function GPUSharingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GPUSharingConfig maxSharedClientsPerGpu. - * @member {number|Long} maxSharedClientsPerGpu - * @memberof google.container.v1beta1.GPUSharingConfig - * @instance - */ - GPUSharingConfig.prototype.maxSharedClientsPerGpu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * GPUSharingConfig gpuSharingStrategy. - * @member {google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy|null|undefined} gpuSharingStrategy - * @memberof google.container.v1beta1.GPUSharingConfig - * @instance - */ - GPUSharingConfig.prototype.gpuSharingStrategy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GPUSharingConfig _gpuSharingStrategy. - * @member {"gpuSharingStrategy"|undefined} _gpuSharingStrategy - * @memberof google.container.v1beta1.GPUSharingConfig - * @instance - */ - Object.defineProperty(GPUSharingConfig.prototype, "_gpuSharingStrategy", { - get: $util.oneOfGetter($oneOfFields = ["gpuSharingStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GPUSharingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {google.container.v1beta1.IGPUSharingConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig instance - */ - GPUSharingConfig.create = function create(properties) { - return new GPUSharingConfig(properties); - }; - - /** - * Encodes the specified GPUSharingConfig message. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {google.container.v1beta1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUSharingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxSharedClientsPerGpu != null && Object.hasOwnProperty.call(message, "maxSharedClientsPerGpu")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxSharedClientsPerGpu); - if (message.gpuSharingStrategy != null && Object.hasOwnProperty.call(message, "gpuSharingStrategy")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gpuSharingStrategy); - return writer; - }; - - /** - * Encodes the specified GPUSharingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUSharingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {google.container.v1beta1.IGPUSharingConfig} message GPUSharingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUSharingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUSharingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GPUSharingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxSharedClientsPerGpu = reader.int64(); - break; - } - case 2: { - message.gpuSharingStrategy = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GPUSharingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUSharingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GPUSharingConfig message. - * @function verify - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GPUSharingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) - if (!$util.isInteger(message.maxSharedClientsPerGpu) && !(message.maxSharedClientsPerGpu && $util.isInteger(message.maxSharedClientsPerGpu.low) && $util.isInteger(message.maxSharedClientsPerGpu.high))) - return "maxSharedClientsPerGpu: integer|Long expected"; - if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { - properties._gpuSharingStrategy = 1; - switch (message.gpuSharingStrategy) { - default: - return "gpuSharingStrategy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a GPUSharingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GPUSharingConfig} GPUSharingConfig - */ - GPUSharingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GPUSharingConfig) - return object; - var message = new $root.google.container.v1beta1.GPUSharingConfig(); - if (object.maxSharedClientsPerGpu != null) - if ($util.Long) - (message.maxSharedClientsPerGpu = $util.Long.fromValue(object.maxSharedClientsPerGpu)).unsigned = false; - else if (typeof object.maxSharedClientsPerGpu === "string") - message.maxSharedClientsPerGpu = parseInt(object.maxSharedClientsPerGpu, 10); - else if (typeof object.maxSharedClientsPerGpu === "number") - message.maxSharedClientsPerGpu = object.maxSharedClientsPerGpu; - else if (typeof object.maxSharedClientsPerGpu === "object") - message.maxSharedClientsPerGpu = new $util.LongBits(object.maxSharedClientsPerGpu.low >>> 0, object.maxSharedClientsPerGpu.high >>> 0).toNumber(); - switch (object.gpuSharingStrategy) { - default: - if (typeof object.gpuSharingStrategy === "number") { - message.gpuSharingStrategy = object.gpuSharingStrategy; - break; - } - break; - case "GPU_SHARING_STRATEGY_UNSPECIFIED": - case 0: - message.gpuSharingStrategy = 0; - break; - case "TIME_SHARING": - case 1: - message.gpuSharingStrategy = 1; - break; - case "MPS": - case 2: - message.gpuSharingStrategy = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GPUSharingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {google.container.v1beta1.GPUSharingConfig} message GPUSharingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GPUSharingConfig.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.maxSharedClientsPerGpu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxSharedClientsPerGpu = options.longs === String ? "0" : 0; - if (message.maxSharedClientsPerGpu != null && message.hasOwnProperty("maxSharedClientsPerGpu")) - if (typeof message.maxSharedClientsPerGpu === "number") - object.maxSharedClientsPerGpu = options.longs === String ? String(message.maxSharedClientsPerGpu) : message.maxSharedClientsPerGpu; - else - object.maxSharedClientsPerGpu = options.longs === String ? $util.Long.prototype.toString.call(message.maxSharedClientsPerGpu) : options.longs === Number ? new $util.LongBits(message.maxSharedClientsPerGpu.low >>> 0, message.maxSharedClientsPerGpu.high >>> 0).toNumber() : message.maxSharedClientsPerGpu; - if (message.gpuSharingStrategy != null && message.hasOwnProperty("gpuSharingStrategy")) { - object.gpuSharingStrategy = options.enums === String ? $root.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] === undefined ? message.gpuSharingStrategy : $root.google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy[message.gpuSharingStrategy] : message.gpuSharingStrategy; - if (options.oneofs) - object._gpuSharingStrategy = "gpuSharingStrategy"; - } - return object; - }; - - /** - * Converts this GPUSharingConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GPUSharingConfig - * @instance - * @returns {Object.} JSON object - */ - GPUSharingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GPUSharingConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GPUSharingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GPUSharingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GPUSharingConfig"; - }; - - /** - * GPUSharingStrategy enum. - * @name google.container.v1beta1.GPUSharingConfig.GPUSharingStrategy - * @enum {number} - * @property {number} GPU_SHARING_STRATEGY_UNSPECIFIED=0 GPU_SHARING_STRATEGY_UNSPECIFIED value - * @property {number} TIME_SHARING=1 TIME_SHARING value - * @property {number} MPS=2 MPS value - */ - GPUSharingConfig.GPUSharingStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GPU_SHARING_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIME_SHARING"] = 1; - values[valuesById[2] = "MPS"] = 2; - return values; - })(); - - return GPUSharingConfig; - })(); - - v1beta1.GPUDriverInstallationConfig = (function() { - - /** - * Properties of a GPUDriverInstallationConfig. - * @memberof google.container.v1beta1 - * @interface IGPUDriverInstallationConfig - * @property {google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null} [gpuDriverVersion] GPUDriverInstallationConfig gpuDriverVersion - */ - - /** - * Constructs a new GPUDriverInstallationConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GPUDriverInstallationConfig. - * @implements IGPUDriverInstallationConfig - * @constructor - * @param {google.container.v1beta1.IGPUDriverInstallationConfig=} [properties] Properties to set - */ - function GPUDriverInstallationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GPUDriverInstallationConfig gpuDriverVersion. - * @member {google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion|null|undefined} gpuDriverVersion - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @instance - */ - GPUDriverInstallationConfig.prototype.gpuDriverVersion = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GPUDriverInstallationConfig _gpuDriverVersion. - * @member {"gpuDriverVersion"|undefined} _gpuDriverVersion - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @instance - */ - Object.defineProperty(GPUDriverInstallationConfig.prototype, "_gpuDriverVersion", { - get: $util.oneOfGetter($oneOfFields = ["gpuDriverVersion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GPUDriverInstallationConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1beta1.IGPUDriverInstallationConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig instance - */ - GPUDriverInstallationConfig.create = function create(properties) { - return new GPUDriverInstallationConfig(properties); - }; - - /** - * Encodes the specified GPUDriverInstallationConfig message. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1beta1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUDriverInstallationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gpuDriverVersion != null && Object.hasOwnProperty.call(message, "gpuDriverVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.gpuDriverVersion); - return writer; - }; - - /** - * Encodes the specified GPUDriverInstallationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GPUDriverInstallationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1beta1.IGPUDriverInstallationConfig} message GPUDriverInstallationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GPUDriverInstallationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUDriverInstallationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GPUDriverInstallationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gpuDriverVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GPUDriverInstallationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GPUDriverInstallationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GPUDriverInstallationConfig message. - * @function verify - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GPUDriverInstallationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { - properties._gpuDriverVersion = 1; - switch (message.gpuDriverVersion) { - default: - return "gpuDriverVersion: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a GPUDriverInstallationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GPUDriverInstallationConfig} GPUDriverInstallationConfig - */ - GPUDriverInstallationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GPUDriverInstallationConfig) - return object; - var message = new $root.google.container.v1beta1.GPUDriverInstallationConfig(); - switch (object.gpuDriverVersion) { - default: - if (typeof object.gpuDriverVersion === "number") { - message.gpuDriverVersion = object.gpuDriverVersion; - break; - } - break; - case "GPU_DRIVER_VERSION_UNSPECIFIED": - case 0: - message.gpuDriverVersion = 0; - break; - case "INSTALLATION_DISABLED": - case 1: - message.gpuDriverVersion = 1; - break; - case "DEFAULT": - case 2: - message.gpuDriverVersion = 2; - break; - case "LATEST": - case 3: - message.gpuDriverVersion = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a GPUDriverInstallationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {google.container.v1beta1.GPUDriverInstallationConfig} message GPUDriverInstallationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GPUDriverInstallationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gpuDriverVersion != null && message.hasOwnProperty("gpuDriverVersion")) { - object.gpuDriverVersion = options.enums === String ? $root.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] === undefined ? message.gpuDriverVersion : $root.google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion[message.gpuDriverVersion] : message.gpuDriverVersion; - if (options.oneofs) - object._gpuDriverVersion = "gpuDriverVersion"; - } - return object; - }; - - /** - * Converts this GPUDriverInstallationConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @instance - * @returns {Object.} JSON object - */ - GPUDriverInstallationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GPUDriverInstallationConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GPUDriverInstallationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GPUDriverInstallationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GPUDriverInstallationConfig"; - }; - - /** - * GPUDriverVersion enum. - * @name google.container.v1beta1.GPUDriverInstallationConfig.GPUDriverVersion - * @enum {number} - * @property {number} GPU_DRIVER_VERSION_UNSPECIFIED=0 GPU_DRIVER_VERSION_UNSPECIFIED value - * @property {number} INSTALLATION_DISABLED=1 INSTALLATION_DISABLED value - * @property {number} DEFAULT=2 DEFAULT value - * @property {number} LATEST=3 LATEST value - */ - GPUDriverInstallationConfig.GPUDriverVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GPU_DRIVER_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLATION_DISABLED"] = 1; - values[valuesById[2] = "DEFAULT"] = 2; - values[valuesById[3] = "LATEST"] = 3; - return values; - })(); - - return GPUDriverInstallationConfig; - })(); - - v1beta1.ManagedPrometheusConfig = (function() { - - /** - * Properties of a ManagedPrometheusConfig. - * @memberof google.container.v1beta1 - * @interface IManagedPrometheusConfig - * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled - */ - - /** - * Constructs a new ManagedPrometheusConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ManagedPrometheusConfig. - * @implements IManagedPrometheusConfig - * @constructor - * @param {google.container.v1beta1.IManagedPrometheusConfig=} [properties] Properties to set - */ - function ManagedPrometheusConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagedPrometheusConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @instance - */ - ManagedPrometheusConfig.prototype.enabled = false; - - /** - * Creates a new ManagedPrometheusConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {google.container.v1beta1.IManagedPrometheusConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig instance - */ - ManagedPrometheusConfig.create = function create(properties) { - return new ManagedPrometheusConfig(properties); - }; - - /** - * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1beta1.ManagedPrometheusConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {google.container.v1beta1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagedPrometheusConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ManagedPrometheusConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {google.container.v1beta1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.container.v1beta1.ManagedPrometheusConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagedPrometheusConfig message. - * @function verify - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagedPrometheusConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ManagedPrometheusConfig} ManagedPrometheusConfig - */ - ManagedPrometheusConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ManagedPrometheusConfig) - return object; - var message = new $root.google.container.v1beta1.ManagedPrometheusConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {google.container.v1beta1.ManagedPrometheusConfig} message ManagedPrometheusConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagedPrometheusConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ManagedPrometheusConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @instance - * @returns {Object.} JSON object - */ - ManagedPrometheusConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagedPrometheusConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ManagedPrometheusConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ManagedPrometheusConfig"; - }; - - return ManagedPrometheusConfig; - })(); - - v1beta1.WorkloadMetadataConfig = (function() { - - /** - * Properties of a WorkloadMetadataConfig. - * @memberof google.container.v1beta1 - * @interface IWorkloadMetadataConfig - * @property {google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata|null} [nodeMetadata] WorkloadMetadataConfig nodeMetadata - * @property {google.container.v1beta1.WorkloadMetadataConfig.Mode|null} [mode] WorkloadMetadataConfig mode - */ - - /** - * Constructs a new WorkloadMetadataConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadMetadataConfig. - * @implements IWorkloadMetadataConfig - * @constructor - * @param {google.container.v1beta1.IWorkloadMetadataConfig=} [properties] Properties to set - */ - function WorkloadMetadataConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadMetadataConfig nodeMetadata. - * @member {google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata} nodeMetadata - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @instance - */ - WorkloadMetadataConfig.prototype.nodeMetadata = 0; - - /** - * WorkloadMetadataConfig mode. - * @member {google.container.v1beta1.WorkloadMetadataConfig.Mode} mode - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @instance - */ - WorkloadMetadataConfig.prototype.mode = 0; - - /** - * Creates a new WorkloadMetadataConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {google.container.v1beta1.IWorkloadMetadataConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig instance - */ - WorkloadMetadataConfig.create = function create(properties) { - return new WorkloadMetadataConfig(properties); - }; - - /** - * Encodes the specified WorkloadMetadataConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {google.container.v1beta1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadMetadataConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodeMetadata != null && Object.hasOwnProperty.call(message, "nodeMetadata")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nodeMetadata); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); - return writer; - }; - - /** - * Encodes the specified WorkloadMetadataConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadMetadataConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {google.container.v1beta1.IWorkloadMetadataConfig} message WorkloadMetadataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadMetadataConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadMetadataConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadMetadataConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nodeMetadata = reader.int32(); - break; - } - case 2: { - message.mode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadMetadataConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadMetadataConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadMetadataConfig message. - * @function verify - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadMetadataConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodeMetadata != null && message.hasOwnProperty("nodeMetadata")) - switch (message.nodeMetadata) { - default: - return "nodeMetadata: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a WorkloadMetadataConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadMetadataConfig} WorkloadMetadataConfig - */ - WorkloadMetadataConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadMetadataConfig) - return object; - var message = new $root.google.container.v1beta1.WorkloadMetadataConfig(); - switch (object.nodeMetadata) { - default: - if (typeof object.nodeMetadata === "number") { - message.nodeMetadata = object.nodeMetadata; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.nodeMetadata = 0; - break; - case "SECURE": - case 1: - message.nodeMetadata = 1; - break; - case "EXPOSE": - case 2: - message.nodeMetadata = 2; - break; - case "GKE_METADATA_SERVER": - case 3: - message.nodeMetadata = 3; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "GCE_METADATA": - case 1: - message.mode = 1; - break; - case "GKE_METADATA": - case 2: - message.mode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a WorkloadMetadataConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {google.container.v1beta1.WorkloadMetadataConfig} message WorkloadMetadataConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadMetadataConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.nodeMetadata = options.enums === String ? "UNSPECIFIED" : 0; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - } - if (message.nodeMetadata != null && message.hasOwnProperty("nodeMetadata")) - object.nodeMetadata = options.enums === String ? $root.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata[message.nodeMetadata] === undefined ? message.nodeMetadata : $root.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata[message.nodeMetadata] : message.nodeMetadata; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.container.v1beta1.WorkloadMetadataConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.WorkloadMetadataConfig.Mode[message.mode] : message.mode; - return object; - }; - - /** - * Converts this WorkloadMetadataConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadMetadataConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadMetadataConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadMetadataConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadMetadataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadMetadataConfig"; - }; - - /** - * NodeMetadata enum. - * @name google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} SECURE=1 SECURE value - * @property {number} EXPOSE=2 EXPOSE value - * @property {number} GKE_METADATA_SERVER=3 GKE_METADATA_SERVER value - */ - WorkloadMetadataConfig.NodeMetadata = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "SECURE"] = 1; - values[valuesById[2] = "EXPOSE"] = 2; - values[valuesById[3] = "GKE_METADATA_SERVER"] = 3; - return values; - })(); - - /** - * Mode enum. - * @name google.container.v1beta1.WorkloadMetadataConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} GCE_METADATA=1 GCE_METADATA value - * @property {number} GKE_METADATA=2 GKE_METADATA value - */ - WorkloadMetadataConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCE_METADATA"] = 1; - values[valuesById[2] = "GKE_METADATA"] = 2; - return values; - })(); - - return WorkloadMetadataConfig; - })(); - - v1beta1.SetNetworkPolicyRequest = (function() { - - /** - * Properties of a SetNetworkPolicyRequest. - * @memberof google.container.v1beta1 - * @interface ISetNetworkPolicyRequest - * @property {string|null} [projectId] SetNetworkPolicyRequest projectId - * @property {string|null} [zone] SetNetworkPolicyRequest zone - * @property {string|null} [clusterId] SetNetworkPolicyRequest clusterId - * @property {google.container.v1beta1.INetworkPolicy|null} [networkPolicy] SetNetworkPolicyRequest networkPolicy - * @property {string|null} [name] SetNetworkPolicyRequest name - */ - - /** - * Constructs a new SetNetworkPolicyRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetNetworkPolicyRequest. - * @implements ISetNetworkPolicyRequest - * @constructor - * @param {google.container.v1beta1.ISetNetworkPolicyRequest=} [properties] Properties to set - */ - function SetNetworkPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetNetworkPolicyRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.projectId = ""; - - /** - * SetNetworkPolicyRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.zone = ""; - - /** - * SetNetworkPolicyRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.clusterId = ""; - - /** - * SetNetworkPolicyRequest networkPolicy. - * @member {google.container.v1beta1.INetworkPolicy|null|undefined} networkPolicy - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.networkPolicy = null; - - /** - * SetNetworkPolicyRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - */ - SetNetworkPolicyRequest.prototype.name = ""; - - /** - * Creates a new SetNetworkPolicyRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1beta1.ISetNetworkPolicyRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest instance - */ - SetNetworkPolicyRequest.create = function create(properties) { - return new SetNetworkPolicyRequest(properties); - }; - - /** - * Encodes the specified SetNetworkPolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1beta1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNetworkPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.networkPolicy != null && Object.hasOwnProperty.call(message, "networkPolicy")) - $root.google.container.v1beta1.NetworkPolicy.encode(message.networkPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetNetworkPolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetNetworkPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1beta1.ISetNetworkPolicyRequest} message SetNetworkPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetNetworkPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNetworkPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetNetworkPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.decode(reader, reader.uint32()); - break; - } - case 6: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetNetworkPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetNetworkPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetNetworkPolicyRequest message. - * @function verify - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetNetworkPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) { - var error = $root.google.container.v1beta1.NetworkPolicy.verify(message.networkPolicy); - if (error) - return "networkPolicy." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetNetworkPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetNetworkPolicyRequest} SetNetworkPolicyRequest - */ - SetNetworkPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetNetworkPolicyRequest) - return object; - var message = new $root.google.container.v1beta1.SetNetworkPolicyRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.networkPolicy != null) { - if (typeof object.networkPolicy !== "object") - throw TypeError(".google.container.v1beta1.SetNetworkPolicyRequest.networkPolicy: object expected"); - message.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.fromObject(object.networkPolicy); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetNetworkPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {google.container.v1beta1.SetNetworkPolicyRequest} message SetNetworkPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetNetworkPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.networkPolicy = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.networkPolicy != null && message.hasOwnProperty("networkPolicy")) - object.networkPolicy = $root.google.container.v1beta1.NetworkPolicy.toObject(message.networkPolicy, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetNetworkPolicyRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetNetworkPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetNetworkPolicyRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetNetworkPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetNetworkPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetNetworkPolicyRequest"; - }; - - return SetNetworkPolicyRequest; - })(); - - v1beta1.SetMaintenancePolicyRequest = (function() { - - /** - * Properties of a SetMaintenancePolicyRequest. - * @memberof google.container.v1beta1 - * @interface ISetMaintenancePolicyRequest - * @property {string|null} [projectId] SetMaintenancePolicyRequest projectId - * @property {string|null} [zone] SetMaintenancePolicyRequest zone - * @property {string|null} [clusterId] SetMaintenancePolicyRequest clusterId - * @property {google.container.v1beta1.IMaintenancePolicy|null} [maintenancePolicy] SetMaintenancePolicyRequest maintenancePolicy - * @property {string|null} [name] SetMaintenancePolicyRequest name - */ - - /** - * Constructs a new SetMaintenancePolicyRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a SetMaintenancePolicyRequest. - * @implements ISetMaintenancePolicyRequest - * @constructor - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest=} [properties] Properties to set - */ - function SetMaintenancePolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMaintenancePolicyRequest projectId. - * @member {string} projectId - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.projectId = ""; - - /** - * SetMaintenancePolicyRequest zone. - * @member {string} zone - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.zone = ""; - - /** - * SetMaintenancePolicyRequest clusterId. - * @member {string} clusterId - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.clusterId = ""; - - /** - * SetMaintenancePolicyRequest maintenancePolicy. - * @member {google.container.v1beta1.IMaintenancePolicy|null|undefined} maintenancePolicy - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.maintenancePolicy = null; - - /** - * SetMaintenancePolicyRequest name. - * @member {string} name - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - */ - SetMaintenancePolicyRequest.prototype.name = ""; - - /** - * Creates a new SetMaintenancePolicyRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest instance - */ - SetMaintenancePolicyRequest.create = function create(properties) { - return new SetMaintenancePolicyRequest(properties); - }; - - /** - * Encodes the specified SetMaintenancePolicyRequest message. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMaintenancePolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.maintenancePolicy != null && Object.hasOwnProperty.call(message, "maintenancePolicy")) - $root.google.container.v1beta1.MaintenancePolicy.encode(message.maintenancePolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - return writer; - }; - - /** - * Encodes the specified SetMaintenancePolicyRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.SetMaintenancePolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1beta1.ISetMaintenancePolicyRequest} message SetMaintenancePolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMaintenancePolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMaintenancePolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SetMaintenancePolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.decode(reader, reader.uint32()); - break; - } - case 5: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMaintenancePolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMaintenancePolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMaintenancePolicyRequest message. - * @function verify - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMaintenancePolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) { - var error = $root.google.container.v1beta1.MaintenancePolicy.verify(message.maintenancePolicy); - if (error) - return "maintenancePolicy." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SetMaintenancePolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SetMaintenancePolicyRequest} SetMaintenancePolicyRequest - */ - SetMaintenancePolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SetMaintenancePolicyRequest) - return object; - var message = new $root.google.container.v1beta1.SetMaintenancePolicyRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.zone != null) - message.zone = String(object.zone); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.maintenancePolicy != null) { - if (typeof object.maintenancePolicy !== "object") - throw TypeError(".google.container.v1beta1.SetMaintenancePolicyRequest.maintenancePolicy: object expected"); - message.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.fromObject(object.maintenancePolicy); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetMaintenancePolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {google.container.v1beta1.SetMaintenancePolicyRequest} message SetMaintenancePolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMaintenancePolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.projectId = ""; - object.zone = ""; - object.clusterId = ""; - object.maintenancePolicy = null; - object.name = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.maintenancePolicy != null && message.hasOwnProperty("maintenancePolicy")) - object.maintenancePolicy = $root.google.container.v1beta1.MaintenancePolicy.toObject(message.maintenancePolicy, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SetMaintenancePolicyRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetMaintenancePolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetMaintenancePolicyRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.SetMaintenancePolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetMaintenancePolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SetMaintenancePolicyRequest"; - }; - - return SetMaintenancePolicyRequest; - })(); - - v1beta1.ListLocationsRequest = (function() { - - /** - * Properties of a ListLocationsRequest. - * @memberof google.container.v1beta1 - * @interface IListLocationsRequest - * @property {string|null} [parent] ListLocationsRequest parent - */ - - /** - * Constructs a new ListLocationsRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListLocationsRequest. - * @implements IListLocationsRequest - * @constructor - * @param {google.container.v1beta1.IListLocationsRequest=} [properties] Properties to set - */ - function ListLocationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLocationsRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.ListLocationsRequest - * @instance - */ - ListLocationsRequest.prototype.parent = ""; - - /** - * Creates a new ListLocationsRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {google.container.v1beta1.IListLocationsRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest instance - */ - ListLocationsRequest.create = function create(properties) { - return new ListLocationsRequest(properties); - }; - - /** - * Encodes the specified ListLocationsRequest message. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {google.container.v1beta1.IListLocationsRequest} message ListLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLocationsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListLocationsRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {google.container.v1beta1.IListLocationsRequest} message ListLocationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLocationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLocationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListLocationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLocationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLocationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLocationsRequest message. - * @function verify - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLocationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a ListLocationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListLocationsRequest} ListLocationsRequest - */ - ListLocationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListLocationsRequest) - return object; - var message = new $root.google.container.v1beta1.ListLocationsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a ListLocationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {google.container.v1beta1.ListLocationsRequest} message ListLocationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLocationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ListLocationsRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListLocationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListLocationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListLocationsRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.ListLocationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListLocationsRequest"; - }; - - return ListLocationsRequest; - })(); - - v1beta1.ListLocationsResponse = (function() { - - /** - * Properties of a ListLocationsResponse. - * @memberof google.container.v1beta1 - * @interface IListLocationsResponse - * @property {Array.|null} [locations] ListLocationsResponse locations - * @property {string|null} [nextPageToken] ListLocationsResponse nextPageToken - */ - - /** - * Constructs a new ListLocationsResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListLocationsResponse. - * @implements IListLocationsResponse - * @constructor - * @param {google.container.v1beta1.IListLocationsResponse=} [properties] Properties to set - */ - function ListLocationsResponse(properties) { - this.locations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLocationsResponse locations. - * @member {Array.} locations - * @memberof google.container.v1beta1.ListLocationsResponse - * @instance - */ - ListLocationsResponse.prototype.locations = $util.emptyArray; - - /** - * ListLocationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.container.v1beta1.ListLocationsResponse - * @instance - */ - ListLocationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListLocationsResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {google.container.v1beta1.IListLocationsResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse instance - */ - ListLocationsResponse.create = function create(properties) { - return new ListLocationsResponse(properties); - }; - - /** - * Encodes the specified ListLocationsResponse message. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {google.container.v1beta1.IListLocationsResponse} message ListLocationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLocationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.locations != null && message.locations.length) - for (var i = 0; i < message.locations.length; ++i) - $root.google.container.v1beta1.Location.encode(message.locations[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 ListLocationsResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListLocationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {google.container.v1beta1.IListLocationsResponse} message ListLocationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLocationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLocationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListLocationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.locations && message.locations.length)) - message.locations = []; - message.locations.push($root.google.container.v1beta1.Location.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLocationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLocationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLocationsResponse message. - * @function verify - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLocationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { - if (!Array.isArray(message.locations)) - return "locations: array expected"; - for (var i = 0; i < message.locations.length; ++i) { - var error = $root.google.container.v1beta1.Location.verify(message.locations[i]); - if (error) - return "locations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListLocationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListLocationsResponse} ListLocationsResponse - */ - ListLocationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListLocationsResponse) - return object; - var message = new $root.google.container.v1beta1.ListLocationsResponse(); - if (object.locations) { - if (!Array.isArray(object.locations)) - throw TypeError(".google.container.v1beta1.ListLocationsResponse.locations: array expected"); - message.locations = []; - for (var i = 0; i < object.locations.length; ++i) { - if (typeof object.locations[i] !== "object") - throw TypeError(".google.container.v1beta1.ListLocationsResponse.locations: object expected"); - message.locations[i] = $root.google.container.v1beta1.Location.fromObject(object.locations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListLocationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {google.container.v1beta1.ListLocationsResponse} message ListLocationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLocationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.locations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.locations && message.locations.length) { - object.locations = []; - for (var j = 0; j < message.locations.length; ++j) - object.locations[j] = $root.google.container.v1beta1.Location.toObject(message.locations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListLocationsResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListLocationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListLocationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListLocationsResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.ListLocationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListLocationsResponse"; - }; - - return ListLocationsResponse; - })(); - - v1beta1.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.container.v1beta1 - * @interface ILocation - * @property {google.container.v1beta1.Location.LocationType|null} [type] Location type - * @property {string|null} [name] Location name - * @property {boolean|null} [recommended] Location recommended - */ - - /** - * Constructs a new Location. - * @memberof google.container.v1beta1 - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.container.v1beta1.ILocation=} [properties] Properties to set - */ - function Location(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location type. - * @member {google.container.v1beta1.Location.LocationType} type - * @memberof google.container.v1beta1.Location - * @instance - */ - Location.prototype.type = 0; - - /** - * Location name. - * @member {string} name - * @memberof google.container.v1beta1.Location - * @instance - */ - Location.prototype.name = ""; - - /** - * Location recommended. - * @member {boolean} recommended - * @memberof google.container.v1beta1.Location - * @instance - */ - Location.prototype.recommended = false; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Location - * @static - * @param {google.container.v1beta1.ILocation=} [properties] Properties to set - * @returns {google.container.v1beta1.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Location - * @static - * @param {google.container.v1beta1.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.recommended != null && Object.hasOwnProperty.call(message, "recommended")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recommended); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.container.v1beta1.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Location - * @static - * @param {google.container.v1beta1.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.recommended = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.container.v1beta1.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.recommended != null && message.hasOwnProperty("recommended")) - if (typeof message.recommended !== "boolean") - return "recommended: boolean expected"; - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Location - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Location) - return object; - var message = new $root.google.container.v1beta1.Location(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "LOCATION_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ZONE": - case 1: - message.type = 1; - break; - case "REGION": - case 2: - message.type = 2; - break; - } - if (object.name != null) - message.name = String(object.name); - if (object.recommended != null) - message.recommended = Boolean(object.recommended); - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Location - * @static - * @param {google.container.v1beta1.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; - object.name = ""; - object.recommended = false; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.container.v1beta1.Location.LocationType[message.type] === undefined ? message.type : $root.google.container.v1beta1.Location.LocationType[message.type] : message.type; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.recommended != null && message.hasOwnProperty("recommended")) - object.recommended = message.recommended; - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.container.v1beta1.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Location"; - }; - - /** - * LocationType enum. - * @name google.container.v1beta1.Location.LocationType - * @enum {number} - * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value - * @property {number} ZONE=1 ZONE value - * @property {number} REGION=2 REGION value - */ - Location.LocationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ZONE"] = 1; - values[valuesById[2] = "REGION"] = 2; - return values; - })(); - - return Location; - })(); - - v1beta1.StatusCondition = (function() { - - /** - * Properties of a StatusCondition. - * @memberof google.container.v1beta1 - * @interface IStatusCondition - * @property {google.container.v1beta1.StatusCondition.Code|null} [code] StatusCondition code - * @property {string|null} [message] StatusCondition message - * @property {google.rpc.Code|null} [canonicalCode] StatusCondition canonicalCode - */ - - /** - * Constructs a new StatusCondition. - * @memberof google.container.v1beta1 - * @classdesc Represents a StatusCondition. - * @implements IStatusCondition - * @constructor - * @param {google.container.v1beta1.IStatusCondition=} [properties] Properties to set - */ - function StatusCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatusCondition code. - * @member {google.container.v1beta1.StatusCondition.Code} code - * @memberof google.container.v1beta1.StatusCondition - * @instance - */ - StatusCondition.prototype.code = 0; - - /** - * StatusCondition message. - * @member {string} message - * @memberof google.container.v1beta1.StatusCondition - * @instance - */ - StatusCondition.prototype.message = ""; - - /** - * StatusCondition canonicalCode. - * @member {google.rpc.Code} canonicalCode - * @memberof google.container.v1beta1.StatusCondition - * @instance - */ - StatusCondition.prototype.canonicalCode = 0; - - /** - * Creates a new StatusCondition instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {google.container.v1beta1.IStatusCondition=} [properties] Properties to set - * @returns {google.container.v1beta1.StatusCondition} StatusCondition instance - */ - StatusCondition.create = function create(properties) { - return new StatusCondition(properties); - }; - - /** - * Encodes the specified StatusCondition message. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {google.container.v1beta1.IStatusCondition} message StatusCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.canonicalCode != null && Object.hasOwnProperty.call(message, "canonicalCode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.canonicalCode); - return writer; - }; - - /** - * Encodes the specified StatusCondition message, length delimited. Does not implicitly {@link google.container.v1beta1.StatusCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {google.container.v1beta1.IStatusCondition} message StatusCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatusCondition message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.StatusCondition} StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.StatusCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.canonicalCode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StatusCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.StatusCondition} StatusCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatusCondition message. - * @function verify - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatusCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 7: - case 9: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) - switch (message.canonicalCode) { - default: - return "canonicalCode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 16: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - return null; - }; - - /** - * Creates a StatusCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.StatusCondition} StatusCondition - */ - StatusCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.StatusCondition) - return object; - var message = new $root.google.container.v1beta1.StatusCondition(); - switch (object.code) { - default: - if (typeof object.code === "number") { - message.code = object.code; - break; - } - break; - case "UNKNOWN": - case 0: - message.code = 0; - break; - case "GCE_STOCKOUT": - case 1: - message.code = 1; - break; - case "GKE_SERVICE_ACCOUNT_DELETED": - case 2: - message.code = 2; - break; - case "GCE_QUOTA_EXCEEDED": - case 3: - message.code = 3; - break; - case "SET_BY_OPERATOR": - case 4: - message.code = 4; - break; - case "CLOUD_KMS_KEY_ERROR": - case 7: - message.code = 7; - break; - case "CA_EXPIRING": - case 9: - message.code = 9; - break; - } - if (object.message != null) - message.message = String(object.message); - switch (object.canonicalCode) { - default: - if (typeof object.canonicalCode === "number") { - message.canonicalCode = object.canonicalCode; - break; - } - break; - case "OK": - case 0: - message.canonicalCode = 0; - break; - case "CANCELLED": - case 1: - message.canonicalCode = 1; - break; - case "UNKNOWN": - case 2: - message.canonicalCode = 2; - break; - case "INVALID_ARGUMENT": - case 3: - message.canonicalCode = 3; - break; - case "DEADLINE_EXCEEDED": - case 4: - message.canonicalCode = 4; - break; - case "NOT_FOUND": - case 5: - message.canonicalCode = 5; - break; - case "ALREADY_EXISTS": - case 6: - message.canonicalCode = 6; - break; - case "PERMISSION_DENIED": - case 7: - message.canonicalCode = 7; - break; - case "UNAUTHENTICATED": - case 16: - message.canonicalCode = 16; - break; - case "RESOURCE_EXHAUSTED": - case 8: - message.canonicalCode = 8; - break; - case "FAILED_PRECONDITION": - case 9: - message.canonicalCode = 9; - break; - case "ABORTED": - case 10: - message.canonicalCode = 10; - break; - case "OUT_OF_RANGE": - case 11: - message.canonicalCode = 11; - break; - case "UNIMPLEMENTED": - case 12: - message.canonicalCode = 12; - break; - case "INTERNAL": - case 13: - message.canonicalCode = 13; - break; - case "UNAVAILABLE": - case 14: - message.canonicalCode = 14; - break; - case "DATA_LOSS": - case 15: - message.canonicalCode = 15; - break; - } - return message; - }; - - /** - * Creates a plain object from a StatusCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {google.container.v1beta1.StatusCondition} message StatusCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatusCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = options.enums === String ? "UNKNOWN" : 0; - object.message = ""; - object.canonicalCode = options.enums === String ? "OK" : 0; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.google.container.v1beta1.StatusCondition.Code[message.code] === undefined ? message.code : $root.google.container.v1beta1.StatusCondition.Code[message.code] : message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.canonicalCode != null && message.hasOwnProperty("canonicalCode")) - object.canonicalCode = options.enums === String ? $root.google.rpc.Code[message.canonicalCode] === undefined ? message.canonicalCode : $root.google.rpc.Code[message.canonicalCode] : message.canonicalCode; - return object; - }; - - /** - * Converts this StatusCondition to JSON. - * @function toJSON - * @memberof google.container.v1beta1.StatusCondition - * @instance - * @returns {Object.} JSON object - */ - StatusCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StatusCondition - * @function getTypeUrl - * @memberof google.container.v1beta1.StatusCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StatusCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.StatusCondition"; - }; - - /** - * Code enum. - * @name google.container.v1beta1.StatusCondition.Code - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} GCE_STOCKOUT=1 GCE_STOCKOUT value - * @property {number} GKE_SERVICE_ACCOUNT_DELETED=2 GKE_SERVICE_ACCOUNT_DELETED value - * @property {number} GCE_QUOTA_EXCEEDED=3 GCE_QUOTA_EXCEEDED value - * @property {number} SET_BY_OPERATOR=4 SET_BY_OPERATOR value - * @property {number} CLOUD_KMS_KEY_ERROR=7 CLOUD_KMS_KEY_ERROR value - * @property {number} CA_EXPIRING=9 CA_EXPIRING value - */ - StatusCondition.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "GCE_STOCKOUT"] = 1; - values[valuesById[2] = "GKE_SERVICE_ACCOUNT_DELETED"] = 2; - values[valuesById[3] = "GCE_QUOTA_EXCEEDED"] = 3; - values[valuesById[4] = "SET_BY_OPERATOR"] = 4; - values[valuesById[7] = "CLOUD_KMS_KEY_ERROR"] = 7; - values[valuesById[9] = "CA_EXPIRING"] = 9; - return values; - })(); - - return StatusCondition; - })(); - - v1beta1.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof google.container.v1beta1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {string|null} [subnetwork] NetworkConfig subnetwork - * @property {boolean|null} [enableIntraNodeVisibility] NetworkConfig enableIntraNodeVisibility - * @property {google.container.v1beta1.IDefaultSnatStatus|null} [defaultSnatStatus] NetworkConfig defaultSnatStatus - * @property {boolean|null} [enableL4ilbSubsetting] NetworkConfig enableL4ilbSubsetting - * @property {google.container.v1beta1.DatapathProvider|null} [datapathProvider] NetworkConfig datapathProvider - * @property {google.container.v1beta1.PrivateIPv6GoogleAccess|null} [privateIpv6GoogleAccess] NetworkConfig privateIpv6GoogleAccess - * @property {google.container.v1beta1.IDNSConfig|null} [dnsConfig] NetworkConfig dnsConfig - * @property {google.container.v1beta1.IServiceExternalIPsConfig|null} [serviceExternalIpsConfig] NetworkConfig serviceExternalIpsConfig - * @property {google.container.v1beta1.IGatewayAPIConfig|null} [gatewayApiConfig] NetworkConfig gatewayApiConfig - * @property {boolean|null} [enableMultiNetworking] NetworkConfig enableMultiNetworking - * @property {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null} [networkPerformanceConfig] NetworkConfig networkPerformanceConfig - * @property {boolean|null} [enableFqdnNetworkPolicy] NetworkConfig enableFqdnNetworkPolicy - * @property {google.container.v1beta1.InTransitEncryptionConfig|null} [inTransitEncryptionConfig] NetworkConfig inTransitEncryptionConfig - * @property {boolean|null} [enableCiliumClusterwideNetworkPolicy] NetworkConfig enableCiliumClusterwideNetworkPolicy - */ - - /** - * Constructs a new NetworkConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.container.v1beta1.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig network. - * @member {string} network - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.network = ""; - - /** - * NetworkConfig subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.subnetwork = ""; - - /** - * NetworkConfig enableIntraNodeVisibility. - * @member {boolean} enableIntraNodeVisibility - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableIntraNodeVisibility = false; - - /** - * NetworkConfig defaultSnatStatus. - * @member {google.container.v1beta1.IDefaultSnatStatus|null|undefined} defaultSnatStatus - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.defaultSnatStatus = null; - - /** - * NetworkConfig enableL4ilbSubsetting. - * @member {boolean} enableL4ilbSubsetting - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableL4ilbSubsetting = false; - - /** - * NetworkConfig datapathProvider. - * @member {google.container.v1beta1.DatapathProvider} datapathProvider - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.datapathProvider = 0; - - /** - * NetworkConfig privateIpv6GoogleAccess. - * @member {google.container.v1beta1.PrivateIPv6GoogleAccess} privateIpv6GoogleAccess - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.privateIpv6GoogleAccess = 0; - - /** - * NetworkConfig dnsConfig. - * @member {google.container.v1beta1.IDNSConfig|null|undefined} dnsConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.dnsConfig = null; - - /** - * NetworkConfig serviceExternalIpsConfig. - * @member {google.container.v1beta1.IServiceExternalIPsConfig|null|undefined} serviceExternalIpsConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.serviceExternalIpsConfig = null; - - /** - * NetworkConfig gatewayApiConfig. - * @member {google.container.v1beta1.IGatewayAPIConfig|null|undefined} gatewayApiConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.gatewayApiConfig = null; - - /** - * NetworkConfig enableMultiNetworking. - * @member {boolean} enableMultiNetworking - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableMultiNetworking = false; - - /** - * NetworkConfig networkPerformanceConfig. - * @member {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.networkPerformanceConfig = null; - - /** - * NetworkConfig enableFqdnNetworkPolicy. - * @member {boolean|null|undefined} enableFqdnNetworkPolicy - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableFqdnNetworkPolicy = null; - - /** - * NetworkConfig inTransitEncryptionConfig. - * @member {google.container.v1beta1.InTransitEncryptionConfig|null|undefined} inTransitEncryptionConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.inTransitEncryptionConfig = null; - - /** - * NetworkConfig enableCiliumClusterwideNetworkPolicy. - * @member {boolean|null|undefined} enableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.enableCiliumClusterwideNetworkPolicy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkConfig _enableFqdnNetworkPolicy. - * @member {"enableFqdnNetworkPolicy"|undefined} _enableFqdnNetworkPolicy - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_enableFqdnNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["enableFqdnNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfig _inTransitEncryptionConfig. - * @member {"inTransitEncryptionConfig"|undefined} _inTransitEncryptionConfig - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_inTransitEncryptionConfig", { - get: $util.oneOfGetter($oneOfFields = ["inTransitEncryptionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfig _enableCiliumClusterwideNetworkPolicy. - * @member {"enableCiliumClusterwideNetworkPolicy"|undefined} _enableCiliumClusterwideNetworkPolicy - * @memberof google.container.v1beta1.NetworkConfig - * @instance - */ - Object.defineProperty(NetworkConfig.prototype, "_enableCiliumClusterwideNetworkPolicy", { - get: $util.oneOfGetter($oneOfFields = ["enableCiliumClusterwideNetworkPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {google.container.v1beta1.INetworkConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {google.container.v1beta1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.enableIntraNodeVisibility != null && Object.hasOwnProperty.call(message, "enableIntraNodeVisibility")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableIntraNodeVisibility); - if (message.defaultSnatStatus != null && Object.hasOwnProperty.call(message, "defaultSnatStatus")) - $root.google.container.v1beta1.DefaultSnatStatus.encode(message.defaultSnatStatus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.enableL4ilbSubsetting != null && Object.hasOwnProperty.call(message, "enableL4ilbSubsetting")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableL4ilbSubsetting); - if (message.datapathProvider != null && Object.hasOwnProperty.call(message, "datapathProvider")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.datapathProvider); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.privateIpv6GoogleAccess); - if (message.dnsConfig != null && Object.hasOwnProperty.call(message, "dnsConfig")) - $root.google.container.v1beta1.DNSConfig.encode(message.dnsConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.serviceExternalIpsConfig != null && Object.hasOwnProperty.call(message, "serviceExternalIpsConfig")) - $root.google.container.v1beta1.ServiceExternalIPsConfig.encode(message.serviceExternalIpsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.gatewayApiConfig != null && Object.hasOwnProperty.call(message, "gatewayApiConfig")) - $root.google.container.v1beta1.GatewayAPIConfig.encode(message.gatewayApiConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.enableMultiNetworking != null && Object.hasOwnProperty.call(message, "enableMultiNetworking")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableMultiNetworking); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.enableFqdnNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableFqdnNetworkPolicy")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableFqdnNetworkPolicy); - if (message.inTransitEncryptionConfig != null && Object.hasOwnProperty.call(message, "inTransitEncryptionConfig")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.inTransitEncryptionConfig); - if (message.enableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableCiliumClusterwideNetworkPolicy")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.enableCiliumClusterwideNetworkPolicy); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {google.container.v1beta1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - case 5: { - message.enableIntraNodeVisibility = reader.bool(); - break; - } - case 7: { - message.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.decode(reader, reader.uint32()); - break; - } - case 10: { - message.enableL4ilbSubsetting = reader.bool(); - break; - } - case 11: { - message.datapathProvider = reader.int32(); - break; - } - case 12: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 13: { - message.dnsConfig = $root.google.container.v1beta1.DNSConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.enableMultiNetworking = reader.bool(); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.enableFqdnNetworkPolicy = reader.bool(); - break; - } - case 20: { - message.inTransitEncryptionConfig = reader.int32(); - break; - } - case 21: { - message.enableCiliumClusterwideNetworkPolicy = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) - if (typeof message.enableIntraNodeVisibility !== "boolean") - return "enableIntraNodeVisibility: boolean expected"; - if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) { - var error = $root.google.container.v1beta1.DefaultSnatStatus.verify(message.defaultSnatStatus); - if (error) - return "defaultSnatStatus." + error; - } - if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) - if (typeof message.enableL4ilbSubsetting !== "boolean") - return "enableL4ilbSubsetting: boolean expected"; - if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) - switch (message.datapathProvider) { - default: - return "datapathProvider: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) { - var error = $root.google.container.v1beta1.DNSConfig.verify(message.dnsConfig); - if (error) - return "dnsConfig." + error; - } - if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) { - var error = $root.google.container.v1beta1.ServiceExternalIPsConfig.verify(message.serviceExternalIpsConfig); - if (error) - return "serviceExternalIpsConfig." + error; - } - if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) { - var error = $root.google.container.v1beta1.GatewayAPIConfig.verify(message.gatewayApiConfig); - if (error) - return "gatewayApiConfig." + error; - } - if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) - if (typeof message.enableMultiNetworking !== "boolean") - return "enableMultiNetworking: boolean expected"; - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - var error = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { - properties._enableFqdnNetworkPolicy = 1; - if (typeof message.enableFqdnNetworkPolicy !== "boolean") - return "enableFqdnNetworkPolicy: boolean expected"; - } - if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { - properties._inTransitEncryptionConfig = 1; - switch (message.inTransitEncryptionConfig) { - default: - return "inTransitEncryptionConfig: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { - properties._enableCiliumClusterwideNetworkPolicy = 1; - if (typeof message.enableCiliumClusterwideNetworkPolicy !== "boolean") - return "enableCiliumClusterwideNetworkPolicy: boolean expected"; - } - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NetworkConfig) - return object; - var message = new $root.google.container.v1beta1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.enableIntraNodeVisibility != null) - message.enableIntraNodeVisibility = Boolean(object.enableIntraNodeVisibility); - if (object.defaultSnatStatus != null) { - if (typeof object.defaultSnatStatus !== "object") - throw TypeError(".google.container.v1beta1.NetworkConfig.defaultSnatStatus: object expected"); - message.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.fromObject(object.defaultSnatStatus); - } - if (object.enableL4ilbSubsetting != null) - message.enableL4ilbSubsetting = Boolean(object.enableL4ilbSubsetting); - switch (object.datapathProvider) { - default: - if (typeof object.datapathProvider === "number") { - message.datapathProvider = object.datapathProvider; - break; - } - break; - case "DATAPATH_PROVIDER_UNSPECIFIED": - case 0: - message.datapathProvider = 0; - break; - case "LEGACY_DATAPATH": - case 1: - message.datapathProvider = 1; - break; - case "ADVANCED_DATAPATH": - case 2: - message.datapathProvider = 2; - break; - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.dnsConfig != null) { - if (typeof object.dnsConfig !== "object") - throw TypeError(".google.container.v1beta1.NetworkConfig.dnsConfig: object expected"); - message.dnsConfig = $root.google.container.v1beta1.DNSConfig.fromObject(object.dnsConfig); - } - if (object.serviceExternalIpsConfig != null) { - if (typeof object.serviceExternalIpsConfig !== "object") - throw TypeError(".google.container.v1beta1.NetworkConfig.serviceExternalIpsConfig: object expected"); - message.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.fromObject(object.serviceExternalIpsConfig); - } - if (object.gatewayApiConfig != null) { - if (typeof object.gatewayApiConfig !== "object") - throw TypeError(".google.container.v1beta1.NetworkConfig.gatewayApiConfig: object expected"); - message.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.fromObject(object.gatewayApiConfig); - } - if (object.enableMultiNetworking != null) - message.enableMultiNetworking = Boolean(object.enableMultiNetworking); - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.container.v1beta1.NetworkConfig.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.enableFqdnNetworkPolicy != null) - message.enableFqdnNetworkPolicy = Boolean(object.enableFqdnNetworkPolicy); - switch (object.inTransitEncryptionConfig) { - default: - if (typeof object.inTransitEncryptionConfig === "number") { - message.inTransitEncryptionConfig = object.inTransitEncryptionConfig; - break; - } - break; - case "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": - case 0: - message.inTransitEncryptionConfig = 0; - break; - case "IN_TRANSIT_ENCRYPTION_DISABLED": - case 1: - message.inTransitEncryptionConfig = 1; - break; - case "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": - case 2: - message.inTransitEncryptionConfig = 2; - break; - } - if (object.enableCiliumClusterwideNetworkPolicy != null) - message.enableCiliumClusterwideNetworkPolicy = Boolean(object.enableCiliumClusterwideNetworkPolicy); - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {google.container.v1beta1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.subnetwork = ""; - object.enableIntraNodeVisibility = false; - object.defaultSnatStatus = null; - object.enableL4ilbSubsetting = false; - object.datapathProvider = options.enums === String ? "DATAPATH_PROVIDER_UNSPECIFIED" : 0; - object.privateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; - object.dnsConfig = null; - object.serviceExternalIpsConfig = null; - object.gatewayApiConfig = null; - object.enableMultiNetworking = false; - object.networkPerformanceConfig = null; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.enableIntraNodeVisibility != null && message.hasOwnProperty("enableIntraNodeVisibility")) - object.enableIntraNodeVisibility = message.enableIntraNodeVisibility; - if (message.defaultSnatStatus != null && message.hasOwnProperty("defaultSnatStatus")) - object.defaultSnatStatus = $root.google.container.v1beta1.DefaultSnatStatus.toObject(message.defaultSnatStatus, options); - if (message.enableL4ilbSubsetting != null && message.hasOwnProperty("enableL4ilbSubsetting")) - object.enableL4ilbSubsetting = message.enableL4ilbSubsetting; - if (message.datapathProvider != null && message.hasOwnProperty("datapathProvider")) - object.datapathProvider = options.enums === String ? $root.google.container.v1beta1.DatapathProvider[message.datapathProvider] === undefined ? message.datapathProvider : $root.google.container.v1beta1.DatapathProvider[message.datapathProvider] : message.datapathProvider; - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.container.v1beta1.PrivateIPv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (message.dnsConfig != null && message.hasOwnProperty("dnsConfig")) - object.dnsConfig = $root.google.container.v1beta1.DNSConfig.toObject(message.dnsConfig, options); - if (message.serviceExternalIpsConfig != null && message.hasOwnProperty("serviceExternalIpsConfig")) - object.serviceExternalIpsConfig = $root.google.container.v1beta1.ServiceExternalIPsConfig.toObject(message.serviceExternalIpsConfig, options); - if (message.gatewayApiConfig != null && message.hasOwnProperty("gatewayApiConfig")) - object.gatewayApiConfig = $root.google.container.v1beta1.GatewayAPIConfig.toObject(message.gatewayApiConfig, options); - if (message.enableMultiNetworking != null && message.hasOwnProperty("enableMultiNetworking")) - object.enableMultiNetworking = message.enableMultiNetworking; - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) - object.networkPerformanceConfig = $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (message.enableFqdnNetworkPolicy != null && message.hasOwnProperty("enableFqdnNetworkPolicy")) { - object.enableFqdnNetworkPolicy = message.enableFqdnNetworkPolicy; - if (options.oneofs) - object._enableFqdnNetworkPolicy = "enableFqdnNetworkPolicy"; - } - if (message.inTransitEncryptionConfig != null && message.hasOwnProperty("inTransitEncryptionConfig")) { - object.inTransitEncryptionConfig = options.enums === String ? $root.google.container.v1beta1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] === undefined ? message.inTransitEncryptionConfig : $root.google.container.v1beta1.InTransitEncryptionConfig[message.inTransitEncryptionConfig] : message.inTransitEncryptionConfig; - if (options.oneofs) - object._inTransitEncryptionConfig = "inTransitEncryptionConfig"; - } - if (message.enableCiliumClusterwideNetworkPolicy != null && message.hasOwnProperty("enableCiliumClusterwideNetworkPolicy")) { - object.enableCiliumClusterwideNetworkPolicy = message.enableCiliumClusterwideNetworkPolicy; - if (options.oneofs) - object._enableCiliumClusterwideNetworkPolicy = "enableCiliumClusterwideNetworkPolicy"; - } - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NetworkConfig"; - }; - - NetworkConfig.ClusterNetworkPerformanceConfig = (function() { - - /** - * Properties of a ClusterNetworkPerformanceConfig. - * @memberof google.container.v1beta1.NetworkConfig - * @interface IClusterNetworkPerformanceConfig - * @property {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] ClusterNetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new ClusterNetworkPerformanceConfig. - * @memberof google.container.v1beta1.NetworkConfig - * @classdesc Represents a ClusterNetworkPerformanceConfig. - * @implements IClusterNetworkPerformanceConfig - * @constructor - * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set - */ - function ClusterNetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterNetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - */ - ClusterNetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ClusterNetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - */ - Object.defineProperty(ClusterNetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ClusterNetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig instance - */ - ClusterNetworkPerformanceConfig.create = function create(properties) { - return new ClusterNetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterNetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified ClusterNetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NetworkConfig.IClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterNetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterNetworkPerformanceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterNetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterNetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterNetworkPerformanceConfig message. - * @function verify - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterNetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ClusterNetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} ClusterNetworkPerformanceConfig - */ - ClusterNetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig) - return object; - var message = new $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "TIER_1": - case 1: - message.totalEgressBandwidthTier = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a ClusterNetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig} message ClusterNetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterNetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this ClusterNetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - ClusterNetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterNetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterNetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.container.v1beta1.NetworkConfig.ClusterNetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} TIER_1=1 TIER_1 value - */ - ClusterNetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TIER_1"] = 1; - return values; - })(); - - return ClusterNetworkPerformanceConfig; - })(); - - return NetworkConfig; - })(); - - v1beta1.GatewayAPIConfig = (function() { - - /** - * Properties of a GatewayAPIConfig. - * @memberof google.container.v1beta1 - * @interface IGatewayAPIConfig - * @property {google.container.v1beta1.GatewayAPIConfig.Channel|null} [channel] GatewayAPIConfig channel - */ - - /** - * Constructs a new GatewayAPIConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a GatewayAPIConfig. - * @implements IGatewayAPIConfig - * @constructor - * @param {google.container.v1beta1.IGatewayAPIConfig=} [properties] Properties to set - */ - function GatewayAPIConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GatewayAPIConfig channel. - * @member {google.container.v1beta1.GatewayAPIConfig.Channel} channel - * @memberof google.container.v1beta1.GatewayAPIConfig - * @instance - */ - GatewayAPIConfig.prototype.channel = 0; - - /** - * Creates a new GatewayAPIConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {google.container.v1beta1.IGatewayAPIConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig instance - */ - GatewayAPIConfig.create = function create(properties) { - return new GatewayAPIConfig(properties); - }; - - /** - * Encodes the specified GatewayAPIConfig message. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {google.container.v1beta1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatewayAPIConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - return writer; - }; - - /** - * Encodes the specified GatewayAPIConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GatewayAPIConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {google.container.v1beta1.IGatewayAPIConfig} message GatewayAPIConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatewayAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatewayAPIConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GatewayAPIConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GatewayAPIConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatewayAPIConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GatewayAPIConfig message. - * @function verify - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GatewayAPIConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a GatewayAPIConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GatewayAPIConfig} GatewayAPIConfig - */ - GatewayAPIConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GatewayAPIConfig) - return object; - var message = new $root.google.container.v1beta1.GatewayAPIConfig(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "CHANNEL_UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "CHANNEL_DISABLED": - case 1: - message.channel = 1; - break; - case "CHANNEL_EXPERIMENTAL": - case 3: - message.channel = 3; - break; - case "CHANNEL_STANDARD": - case 4: - message.channel = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a GatewayAPIConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {google.container.v1beta1.GatewayAPIConfig} message GatewayAPIConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GatewayAPIConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.channel = options.enums === String ? "CHANNEL_UNSPECIFIED" : 0; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1beta1.GatewayAPIConfig.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.GatewayAPIConfig.Channel[message.channel] : message.channel; - return object; - }; - - /** - * Converts this GatewayAPIConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GatewayAPIConfig - * @instance - * @returns {Object.} JSON object - */ - GatewayAPIConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GatewayAPIConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.GatewayAPIConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GatewayAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GatewayAPIConfig"; - }; - - /** - * Channel enum. - * @name google.container.v1beta1.GatewayAPIConfig.Channel - * @enum {number} - * @property {number} CHANNEL_UNSPECIFIED=0 CHANNEL_UNSPECIFIED value - * @property {number} CHANNEL_DISABLED=1 CHANNEL_DISABLED value - * @property {number} CHANNEL_EXPERIMENTAL=3 CHANNEL_EXPERIMENTAL value - * @property {number} CHANNEL_STANDARD=4 CHANNEL_STANDARD value - */ - GatewayAPIConfig.Channel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANNEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "CHANNEL_DISABLED"] = 1; - values[valuesById[3] = "CHANNEL_EXPERIMENTAL"] = 3; - values[valuesById[4] = "CHANNEL_STANDARD"] = 4; - return values; - })(); - - return GatewayAPIConfig; - })(); - - v1beta1.ServiceExternalIPsConfig = (function() { - - /** - * Properties of a ServiceExternalIPsConfig. - * @memberof google.container.v1beta1 - * @interface IServiceExternalIPsConfig - * @property {boolean|null} [enabled] ServiceExternalIPsConfig enabled - */ - - /** - * Constructs a new ServiceExternalIPsConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ServiceExternalIPsConfig. - * @implements IServiceExternalIPsConfig - * @constructor - * @param {google.container.v1beta1.IServiceExternalIPsConfig=} [properties] Properties to set - */ - function ServiceExternalIPsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceExternalIPsConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @instance - */ - ServiceExternalIPsConfig.prototype.enabled = false; - - /** - * Creates a new ServiceExternalIPsConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1beta1.IServiceExternalIPsConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig instance - */ - ServiceExternalIPsConfig.create = function create(properties) { - return new ServiceExternalIPsConfig(properties); - }; - - /** - * Encodes the specified ServiceExternalIPsConfig message. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1beta1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceExternalIPsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ServiceExternalIPsConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ServiceExternalIPsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1beta1.IServiceExternalIPsConfig} message ServiceExternalIPsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceExternalIPsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceExternalIPsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ServiceExternalIPsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceExternalIPsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceExternalIPsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceExternalIPsConfig message. - * @function verify - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceExternalIPsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ServiceExternalIPsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ServiceExternalIPsConfig} ServiceExternalIPsConfig - */ - ServiceExternalIPsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ServiceExternalIPsConfig) - return object; - var message = new $root.google.container.v1beta1.ServiceExternalIPsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ServiceExternalIPsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {google.container.v1beta1.ServiceExternalIPsConfig} message ServiceExternalIPsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceExternalIPsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ServiceExternalIPsConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @instance - * @returns {Object.} JSON object - */ - ServiceExternalIPsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceExternalIPsConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ServiceExternalIPsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceExternalIPsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ServiceExternalIPsConfig"; - }; - - return ServiceExternalIPsConfig; - })(); - - v1beta1.ListUsableSubnetworksRequest = (function() { - - /** - * Properties of a ListUsableSubnetworksRequest. - * @memberof google.container.v1beta1 - * @interface IListUsableSubnetworksRequest - * @property {string|null} [parent] ListUsableSubnetworksRequest parent - * @property {string|null} [filter] ListUsableSubnetworksRequest filter - * @property {number|null} [pageSize] ListUsableSubnetworksRequest pageSize - * @property {string|null} [pageToken] ListUsableSubnetworksRequest pageToken - */ - - /** - * Constructs a new ListUsableSubnetworksRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListUsableSubnetworksRequest. - * @implements IListUsableSubnetworksRequest - * @constructor - * @param {google.container.v1beta1.IListUsableSubnetworksRequest=} [properties] Properties to set - */ - function ListUsableSubnetworksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUsableSubnetworksRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.parent = ""; - - /** - * ListUsableSubnetworksRequest filter. - * @member {string} filter - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.filter = ""; - - /** - * ListUsableSubnetworksRequest pageSize. - * @member {number} pageSize - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.pageSize = 0; - - /** - * ListUsableSubnetworksRequest pageToken. - * @member {string} pageToken - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @instance - */ - ListUsableSubnetworksRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUsableSubnetworksRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest instance - */ - ListUsableSubnetworksRequest.create = function create(properties) { - return new ListUsableSubnetworksRequest(properties); - }; - - /** - * Encodes the specified ListUsableSubnetworksRequest message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListUsableSubnetworksRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksRequest} message ListUsableSubnetworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListUsableSubnetworksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUsableSubnetworksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUsableSubnetworksRequest message. - * @function verify - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUsableSubnetworksRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListUsableSubnetworksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListUsableSubnetworksRequest} ListUsableSubnetworksRequest - */ - ListUsableSubnetworksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListUsableSubnetworksRequest) - return object; - var message = new $root.google.container.v1beta1.ListUsableSubnetworksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUsableSubnetworksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {google.container.v1beta1.ListUsableSubnetworksRequest} message ListUsableSubnetworksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUsableSubnetworksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUsableSubnetworksRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @instance - * @returns {Object.} JSON object - */ - ListUsableSubnetworksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUsableSubnetworksRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.ListUsableSubnetworksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUsableSubnetworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListUsableSubnetworksRequest"; - }; - - return ListUsableSubnetworksRequest; - })(); - - v1beta1.ListUsableSubnetworksResponse = (function() { - - /** - * Properties of a ListUsableSubnetworksResponse. - * @memberof google.container.v1beta1 - * @interface IListUsableSubnetworksResponse - * @property {Array.|null} [subnetworks] ListUsableSubnetworksResponse subnetworks - * @property {string|null} [nextPageToken] ListUsableSubnetworksResponse nextPageToken - */ - - /** - * Constructs a new ListUsableSubnetworksResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a ListUsableSubnetworksResponse. - * @implements IListUsableSubnetworksResponse - * @constructor - * @param {google.container.v1beta1.IListUsableSubnetworksResponse=} [properties] Properties to set - */ - function ListUsableSubnetworksResponse(properties) { - this.subnetworks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUsableSubnetworksResponse subnetworks. - * @member {Array.} subnetworks - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @instance - */ - ListUsableSubnetworksResponse.prototype.subnetworks = $util.emptyArray; - - /** - * ListUsableSubnetworksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @instance - */ - ListUsableSubnetworksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUsableSubnetworksResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse instance - */ - ListUsableSubnetworksResponse.create = function create(properties) { - return new ListUsableSubnetworksResponse(properties); - }; - - /** - * Encodes the specified ListUsableSubnetworksResponse message. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetworks != null && message.subnetworks.length) - for (var i = 0; i < message.subnetworks.length; ++i) - $root.google.container.v1beta1.UsableSubnetwork.encode(message.subnetworks[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 ListUsableSubnetworksResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.ListUsableSubnetworksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1beta1.IListUsableSubnetworksResponse} message ListUsableSubnetworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUsableSubnetworksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ListUsableSubnetworksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.subnetworks && message.subnetworks.length)) - message.subnetworks = []; - message.subnetworks.push($root.google.container.v1beta1.UsableSubnetwork.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUsableSubnetworksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUsableSubnetworksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUsableSubnetworksResponse message. - * @function verify - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUsableSubnetworksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subnetworks != null && message.hasOwnProperty("subnetworks")) { - if (!Array.isArray(message.subnetworks)) - return "subnetworks: array expected"; - for (var i = 0; i < message.subnetworks.length; ++i) { - var error = $root.google.container.v1beta1.UsableSubnetwork.verify(message.subnetworks[i]); - if (error) - return "subnetworks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUsableSubnetworksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ListUsableSubnetworksResponse} ListUsableSubnetworksResponse - */ - ListUsableSubnetworksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ListUsableSubnetworksResponse) - return object; - var message = new $root.google.container.v1beta1.ListUsableSubnetworksResponse(); - if (object.subnetworks) { - if (!Array.isArray(object.subnetworks)) - throw TypeError(".google.container.v1beta1.ListUsableSubnetworksResponse.subnetworks: array expected"); - message.subnetworks = []; - for (var i = 0; i < object.subnetworks.length; ++i) { - if (typeof object.subnetworks[i] !== "object") - throw TypeError(".google.container.v1beta1.ListUsableSubnetworksResponse.subnetworks: object expected"); - message.subnetworks[i] = $root.google.container.v1beta1.UsableSubnetwork.fromObject(object.subnetworks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUsableSubnetworksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {google.container.v1beta1.ListUsableSubnetworksResponse} message ListUsableSubnetworksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUsableSubnetworksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subnetworks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.subnetworks && message.subnetworks.length) { - object.subnetworks = []; - for (var j = 0; j < message.subnetworks.length; ++j) - object.subnetworks[j] = $root.google.container.v1beta1.UsableSubnetwork.toObject(message.subnetworks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUsableSubnetworksResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @instance - * @returns {Object.} JSON object - */ - ListUsableSubnetworksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUsableSubnetworksResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.ListUsableSubnetworksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUsableSubnetworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ListUsableSubnetworksResponse"; - }; - - return ListUsableSubnetworksResponse; - })(); - - v1beta1.UsableSubnetworkSecondaryRange = (function() { - - /** - * Properties of a UsableSubnetworkSecondaryRange. - * @memberof google.container.v1beta1 - * @interface IUsableSubnetworkSecondaryRange - * @property {string|null} [rangeName] UsableSubnetworkSecondaryRange rangeName - * @property {string|null} [ipCidrRange] UsableSubnetworkSecondaryRange ipCidrRange - * @property {google.container.v1beta1.UsableSubnetworkSecondaryRange.Status|null} [status] UsableSubnetworkSecondaryRange status - */ - - /** - * Constructs a new UsableSubnetworkSecondaryRange. - * @memberof google.container.v1beta1 - * @classdesc Represents a UsableSubnetworkSecondaryRange. - * @implements IUsableSubnetworkSecondaryRange - * @constructor - * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set - */ - function UsableSubnetworkSecondaryRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsableSubnetworkSecondaryRange rangeName. - * @member {string} rangeName - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.rangeName = ""; - - /** - * UsableSubnetworkSecondaryRange ipCidrRange. - * @member {string} ipCidrRange - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.ipCidrRange = ""; - - /** - * UsableSubnetworkSecondaryRange status. - * @member {google.container.v1beta1.UsableSubnetworkSecondaryRange.Status} status - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @instance - */ - UsableSubnetworkSecondaryRange.prototype.status = 0; - - /** - * Creates a new UsableSubnetworkSecondaryRange instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange=} [properties] Properties to set - * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange instance - */ - UsableSubnetworkSecondaryRange.create = function create(properties) { - return new UsableSubnetworkSecondaryRange(properties); - }; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetworkSecondaryRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rangeName != null && Object.hasOwnProperty.call(message, "rangeName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rangeName); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipCidrRange); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); - return writer; - }; - - /** - * Encodes the specified UsableSubnetworkSecondaryRange message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetworkSecondaryRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1beta1.IUsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetworkSecondaryRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetworkSecondaryRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UsableSubnetworkSecondaryRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rangeName = reader.string(); - break; - } - case 2: { - message.ipCidrRange = reader.string(); - break; - } - case 3: { - message.status = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsableSubnetworkSecondaryRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetworkSecondaryRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsableSubnetworkSecondaryRange message. - * @function verify - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsableSubnetworkSecondaryRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - if (!$util.isString(message.rangeName)) - return "rangeName: string expected"; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a UsableSubnetworkSecondaryRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UsableSubnetworkSecondaryRange} UsableSubnetworkSecondaryRange - */ - UsableSubnetworkSecondaryRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UsableSubnetworkSecondaryRange) - return object; - var message = new $root.google.container.v1beta1.UsableSubnetworkSecondaryRange(); - if (object.rangeName != null) - message.rangeName = String(object.rangeName); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "UNKNOWN": - case 0: - message.status = 0; - break; - case "UNUSED": - case 1: - message.status = 1; - break; - case "IN_USE_SERVICE": - case 2: - message.status = 2; - break; - case "IN_USE_SHAREABLE_POD": - case 3: - message.status = 3; - break; - case "IN_USE_MANAGED_POD": - case 4: - message.status = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a UsableSubnetworkSecondaryRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {google.container.v1beta1.UsableSubnetworkSecondaryRange} message UsableSubnetworkSecondaryRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsableSubnetworkSecondaryRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rangeName = ""; - object.ipCidrRange = ""; - object.status = options.enums === String ? "UNKNOWN" : 0; - } - if (message.rangeName != null && message.hasOwnProperty("rangeName")) - object.rangeName = message.rangeName; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - object.ipCidrRange = message.ipCidrRange; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status[message.status] === undefined ? message.status : $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.Status[message.status] : message.status; - return object; - }; - - /** - * Converts this UsableSubnetworkSecondaryRange to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @instance - * @returns {Object.} JSON object - */ - UsableSubnetworkSecondaryRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsableSubnetworkSecondaryRange - * @function getTypeUrl - * @memberof google.container.v1beta1.UsableSubnetworkSecondaryRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsableSubnetworkSecondaryRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UsableSubnetworkSecondaryRange"; - }; - - /** - * Status enum. - * @name google.container.v1beta1.UsableSubnetworkSecondaryRange.Status - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} UNUSED=1 UNUSED value - * @property {number} IN_USE_SERVICE=2 IN_USE_SERVICE value - * @property {number} IN_USE_SHAREABLE_POD=3 IN_USE_SHAREABLE_POD value - * @property {number} IN_USE_MANAGED_POD=4 IN_USE_MANAGED_POD value - */ - UsableSubnetworkSecondaryRange.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "UNUSED"] = 1; - values[valuesById[2] = "IN_USE_SERVICE"] = 2; - values[valuesById[3] = "IN_USE_SHAREABLE_POD"] = 3; - values[valuesById[4] = "IN_USE_MANAGED_POD"] = 4; - return values; - })(); - - return UsableSubnetworkSecondaryRange; - })(); - - v1beta1.UsableSubnetwork = (function() { - - /** - * Properties of a UsableSubnetwork. - * @memberof google.container.v1beta1 - * @interface IUsableSubnetwork - * @property {string|null} [subnetwork] UsableSubnetwork subnetwork - * @property {string|null} [network] UsableSubnetwork network - * @property {string|null} [ipCidrRange] UsableSubnetwork ipCidrRange - * @property {Array.|null} [secondaryIpRanges] UsableSubnetwork secondaryIpRanges - * @property {string|null} [statusMessage] UsableSubnetwork statusMessage - */ - - /** - * Constructs a new UsableSubnetwork. - * @memberof google.container.v1beta1 - * @classdesc Represents a UsableSubnetwork. - * @implements IUsableSubnetwork - * @constructor - * @param {google.container.v1beta1.IUsableSubnetwork=} [properties] Properties to set - */ - function UsableSubnetwork(properties) { - this.secondaryIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsableSubnetwork subnetwork. - * @member {string} subnetwork - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.subnetwork = ""; - - /** - * UsableSubnetwork network. - * @member {string} network - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.network = ""; - - /** - * UsableSubnetwork ipCidrRange. - * @member {string} ipCidrRange - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.ipCidrRange = ""; - - /** - * UsableSubnetwork secondaryIpRanges. - * @member {Array.} secondaryIpRanges - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.secondaryIpRanges = $util.emptyArray; - - /** - * UsableSubnetwork statusMessage. - * @member {string} statusMessage - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - */ - UsableSubnetwork.prototype.statusMessage = ""; - - /** - * Creates a new UsableSubnetwork instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {google.container.v1beta1.IUsableSubnetwork=} [properties] Properties to set - * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork instance - */ - UsableSubnetwork.create = function create(properties) { - return new UsableSubnetwork(properties); - }; - - /** - * Encodes the specified UsableSubnetwork message. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {google.container.v1beta1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetwork.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipCidrRange); - if (message.secondaryIpRanges != null && message.secondaryIpRanges.length) - for (var i = 0; i < message.secondaryIpRanges.length; ++i) - $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.encode(message.secondaryIpRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - return writer; - }; - - /** - * Encodes the specified UsableSubnetwork message, length delimited. Does not implicitly {@link google.container.v1beta1.UsableSubnetwork.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {google.container.v1beta1.IUsableSubnetwork} message UsableSubnetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsableSubnetwork.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetwork.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UsableSubnetwork(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.subnetwork = reader.string(); - break; - } - case 2: { - message.network = reader.string(); - break; - } - case 3: { - message.ipCidrRange = reader.string(); - break; - } - case 4: { - if (!(message.secondaryIpRanges && message.secondaryIpRanges.length)) - message.secondaryIpRanges = []; - message.secondaryIpRanges.push($root.google.container.v1beta1.UsableSubnetworkSecondaryRange.decode(reader, reader.uint32())); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsableSubnetwork message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsableSubnetwork.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsableSubnetwork message. - * @function verify - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsableSubnetwork.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - if (message.secondaryIpRanges != null && message.hasOwnProperty("secondaryIpRanges")) { - if (!Array.isArray(message.secondaryIpRanges)) - return "secondaryIpRanges: array expected"; - for (var i = 0; i < message.secondaryIpRanges.length; ++i) { - var error = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.verify(message.secondaryIpRanges[i]); - if (error) - return "secondaryIpRanges." + error; - } - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - return null; - }; - - /** - * Creates a UsableSubnetwork message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UsableSubnetwork} UsableSubnetwork - */ - UsableSubnetwork.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UsableSubnetwork) - return object; - var message = new $root.google.container.v1beta1.UsableSubnetwork(); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.network != null) - message.network = String(object.network); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.secondaryIpRanges) { - if (!Array.isArray(object.secondaryIpRanges)) - throw TypeError(".google.container.v1beta1.UsableSubnetwork.secondaryIpRanges: array expected"); - message.secondaryIpRanges = []; - for (var i = 0; i < object.secondaryIpRanges.length; ++i) { - if (typeof object.secondaryIpRanges[i] !== "object") - throw TypeError(".google.container.v1beta1.UsableSubnetwork.secondaryIpRanges: object expected"); - message.secondaryIpRanges[i] = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.fromObject(object.secondaryIpRanges[i]); - } - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - return message; - }; - - /** - * Creates a plain object from a UsableSubnetwork message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {google.container.v1beta1.UsableSubnetwork} message UsableSubnetwork - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsableSubnetwork.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.secondaryIpRanges = []; - if (options.defaults) { - object.subnetwork = ""; - object.network = ""; - object.ipCidrRange = ""; - object.statusMessage = ""; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) - object.ipCidrRange = message.ipCidrRange; - if (message.secondaryIpRanges && message.secondaryIpRanges.length) { - object.secondaryIpRanges = []; - for (var j = 0; j < message.secondaryIpRanges.length; ++j) - object.secondaryIpRanges[j] = $root.google.container.v1beta1.UsableSubnetworkSecondaryRange.toObject(message.secondaryIpRanges[j], options); - } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - return object; - }; - - /** - * Converts this UsableSubnetwork to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UsableSubnetwork - * @instance - * @returns {Object.} JSON object - */ - UsableSubnetwork.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsableSubnetwork - * @function getTypeUrl - * @memberof google.container.v1beta1.UsableSubnetwork - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsableSubnetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UsableSubnetwork"; - }; - - return UsableSubnetwork; - })(); - - v1beta1.VerticalPodAutoscaling = (function() { - - /** - * Properties of a VerticalPodAutoscaling. - * @memberof google.container.v1beta1 - * @interface IVerticalPodAutoscaling - * @property {boolean|null} [enabled] VerticalPodAutoscaling enabled - */ - - /** - * Constructs a new VerticalPodAutoscaling. - * @memberof google.container.v1beta1 - * @classdesc Represents a VerticalPodAutoscaling. - * @implements IVerticalPodAutoscaling - * @constructor - * @param {google.container.v1beta1.IVerticalPodAutoscaling=} [properties] Properties to set - */ - function VerticalPodAutoscaling(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerticalPodAutoscaling enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @instance - */ - VerticalPodAutoscaling.prototype.enabled = false; - - /** - * Creates a new VerticalPodAutoscaling instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {google.container.v1beta1.IVerticalPodAutoscaling=} [properties] Properties to set - * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling instance - */ - VerticalPodAutoscaling.create = function create(properties) { - return new VerticalPodAutoscaling(properties); - }; - - /** - * Encodes the specified VerticalPodAutoscaling message. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {google.container.v1beta1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerticalPodAutoscaling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified VerticalPodAutoscaling message, length delimited. Does not implicitly {@link google.container.v1beta1.VerticalPodAutoscaling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {google.container.v1beta1.IVerticalPodAutoscaling} message VerticalPodAutoscaling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerticalPodAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerticalPodAutoscaling.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.VerticalPodAutoscaling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerticalPodAutoscaling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerticalPodAutoscaling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerticalPodAutoscaling message. - * @function verify - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerticalPodAutoscaling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a VerticalPodAutoscaling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.VerticalPodAutoscaling} VerticalPodAutoscaling - */ - VerticalPodAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.VerticalPodAutoscaling) - return object; - var message = new $root.google.container.v1beta1.VerticalPodAutoscaling(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a VerticalPodAutoscaling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {google.container.v1beta1.VerticalPodAutoscaling} message VerticalPodAutoscaling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerticalPodAutoscaling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this VerticalPodAutoscaling to JSON. - * @function toJSON - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @instance - * @returns {Object.} JSON object - */ - VerticalPodAutoscaling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VerticalPodAutoscaling - * @function getTypeUrl - * @memberof google.container.v1beta1.VerticalPodAutoscaling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VerticalPodAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.VerticalPodAutoscaling"; - }; - - return VerticalPodAutoscaling; - })(); - - v1beta1.DefaultSnatStatus = (function() { - - /** - * Properties of a DefaultSnatStatus. - * @memberof google.container.v1beta1 - * @interface IDefaultSnatStatus - * @property {boolean|null} [disabled] DefaultSnatStatus disabled - */ - - /** - * Constructs a new DefaultSnatStatus. - * @memberof google.container.v1beta1 - * @classdesc Represents a DefaultSnatStatus. - * @implements IDefaultSnatStatus - * @constructor - * @param {google.container.v1beta1.IDefaultSnatStatus=} [properties] Properties to set - */ - function DefaultSnatStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DefaultSnatStatus disabled. - * @member {boolean} disabled - * @memberof google.container.v1beta1.DefaultSnatStatus - * @instance - */ - DefaultSnatStatus.prototype.disabled = false; - - /** - * Creates a new DefaultSnatStatus instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {google.container.v1beta1.IDefaultSnatStatus=} [properties] Properties to set - * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus instance - */ - DefaultSnatStatus.create = function create(properties) { - return new DefaultSnatStatus(properties); - }; - - /** - * Encodes the specified DefaultSnatStatus message. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {google.container.v1beta1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DefaultSnatStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disabled); - return writer; - }; - - /** - * Encodes the specified DefaultSnatStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.DefaultSnatStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {google.container.v1beta1.IDefaultSnatStatus} message DefaultSnatStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DefaultSnatStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DefaultSnatStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DefaultSnatStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DefaultSnatStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DefaultSnatStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DefaultSnatStatus message. - * @function verify - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DefaultSnatStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a DefaultSnatStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DefaultSnatStatus} DefaultSnatStatus - */ - DefaultSnatStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DefaultSnatStatus) - return object; - var message = new $root.google.container.v1beta1.DefaultSnatStatus(); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a DefaultSnatStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {google.container.v1beta1.DefaultSnatStatus} message DefaultSnatStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DefaultSnatStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.disabled = false; - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - return object; - }; - - /** - * Converts this DefaultSnatStatus to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DefaultSnatStatus - * @instance - * @returns {Object.} JSON object - */ - DefaultSnatStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DefaultSnatStatus - * @function getTypeUrl - * @memberof google.container.v1beta1.DefaultSnatStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DefaultSnatStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DefaultSnatStatus"; - }; - - return DefaultSnatStatus; - })(); - - v1beta1.IntraNodeVisibilityConfig = (function() { - - /** - * Properties of an IntraNodeVisibilityConfig. - * @memberof google.container.v1beta1 - * @interface IIntraNodeVisibilityConfig - * @property {boolean|null} [enabled] IntraNodeVisibilityConfig enabled - */ - - /** - * Constructs a new IntraNodeVisibilityConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an IntraNodeVisibilityConfig. - * @implements IIntraNodeVisibilityConfig - * @constructor - * @param {google.container.v1beta1.IIntraNodeVisibilityConfig=} [properties] Properties to set - */ - function IntraNodeVisibilityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntraNodeVisibilityConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @instance - */ - IntraNodeVisibilityConfig.prototype.enabled = false; - - /** - * Creates a new IntraNodeVisibilityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1beta1.IIntraNodeVisibilityConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig instance - */ - IntraNodeVisibilityConfig.create = function create(properties) { - return new IntraNodeVisibilityConfig(properties); - }; - - /** - * Encodes the specified IntraNodeVisibilityConfig message. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1beta1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntraNodeVisibilityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified IntraNodeVisibilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IntraNodeVisibilityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1beta1.IIntraNodeVisibilityConfig} message IntraNodeVisibilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntraNodeVisibilityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntraNodeVisibilityConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IntraNodeVisibilityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IntraNodeVisibilityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntraNodeVisibilityConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntraNodeVisibilityConfig message. - * @function verify - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntraNodeVisibilityConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates an IntraNodeVisibilityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.IntraNodeVisibilityConfig} IntraNodeVisibilityConfig - */ - IntraNodeVisibilityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.IntraNodeVisibilityConfig) - return object; - var message = new $root.google.container.v1beta1.IntraNodeVisibilityConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from an IntraNodeVisibilityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {google.container.v1beta1.IntraNodeVisibilityConfig} message IntraNodeVisibilityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntraNodeVisibilityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this IntraNodeVisibilityConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @instance - * @returns {Object.} JSON object - */ - IntraNodeVisibilityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntraNodeVisibilityConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.IntraNodeVisibilityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntraNodeVisibilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.IntraNodeVisibilityConfig"; - }; - - return IntraNodeVisibilityConfig; - })(); - - v1beta1.ILBSubsettingConfig = (function() { - - /** - * Properties of a ILBSubsettingConfig. - * @memberof google.container.v1beta1 - * @interface IILBSubsettingConfig - * @property {boolean|null} [enabled] ILBSubsettingConfig enabled - */ - - /** - * Constructs a new ILBSubsettingConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ILBSubsettingConfig. - * @implements IILBSubsettingConfig - * @constructor - * @param {google.container.v1beta1.IILBSubsettingConfig=} [properties] Properties to set - */ - function ILBSubsettingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ILBSubsettingConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @instance - */ - ILBSubsettingConfig.prototype.enabled = false; - - /** - * Creates a new ILBSubsettingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {google.container.v1beta1.IILBSubsettingConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig instance - */ - ILBSubsettingConfig.create = function create(properties) { - return new ILBSubsettingConfig(properties); - }; - - /** - * Encodes the specified ILBSubsettingConfig message. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {google.container.v1beta1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ILBSubsettingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ILBSubsettingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ILBSubsettingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {google.container.v1beta1.IILBSubsettingConfig} message ILBSubsettingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ILBSubsettingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ILBSubsettingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ILBSubsettingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ILBSubsettingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ILBSubsettingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ILBSubsettingConfig message. - * @function verify - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ILBSubsettingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ILBSubsettingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ILBSubsettingConfig} ILBSubsettingConfig - */ - ILBSubsettingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ILBSubsettingConfig) - return object; - var message = new $root.google.container.v1beta1.ILBSubsettingConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ILBSubsettingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {google.container.v1beta1.ILBSubsettingConfig} message ILBSubsettingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ILBSubsettingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ILBSubsettingConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @instance - * @returns {Object.} JSON object - */ - ILBSubsettingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ILBSubsettingConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ILBSubsettingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ILBSubsettingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ILBSubsettingConfig"; - }; - - return ILBSubsettingConfig; - })(); - - v1beta1.DNSConfig = (function() { - - /** - * Properties of a DNSConfig. - * @memberof google.container.v1beta1 - * @interface IDNSConfig - * @property {google.container.v1beta1.DNSConfig.Provider|null} [clusterDns] DNSConfig clusterDns - * @property {google.container.v1beta1.DNSConfig.DNSScope|null} [clusterDnsScope] DNSConfig clusterDnsScope - * @property {string|null} [clusterDnsDomain] DNSConfig clusterDnsDomain - * @property {string|null} [additiveVpcScopeDnsDomain] DNSConfig additiveVpcScopeDnsDomain - */ - - /** - * Constructs a new DNSConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a DNSConfig. - * @implements IDNSConfig - * @constructor - * @param {google.container.v1beta1.IDNSConfig=} [properties] Properties to set - */ - function DNSConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DNSConfig clusterDns. - * @member {google.container.v1beta1.DNSConfig.Provider} clusterDns - * @memberof google.container.v1beta1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDns = 0; - - /** - * DNSConfig clusterDnsScope. - * @member {google.container.v1beta1.DNSConfig.DNSScope} clusterDnsScope - * @memberof google.container.v1beta1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDnsScope = 0; - - /** - * DNSConfig clusterDnsDomain. - * @member {string} clusterDnsDomain - * @memberof google.container.v1beta1.DNSConfig - * @instance - */ - DNSConfig.prototype.clusterDnsDomain = ""; - - /** - * DNSConfig additiveVpcScopeDnsDomain. - * @member {string} additiveVpcScopeDnsDomain - * @memberof google.container.v1beta1.DNSConfig - * @instance - */ - DNSConfig.prototype.additiveVpcScopeDnsDomain = ""; - - /** - * Creates a new DNSConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {google.container.v1beta1.IDNSConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.DNSConfig} DNSConfig instance - */ - DNSConfig.create = function create(properties) { - return new DNSConfig(properties); - }; - - /** - * Encodes the specified DNSConfig message. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {google.container.v1beta1.IDNSConfig} message DNSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterDns != null && Object.hasOwnProperty.call(message, "clusterDns")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterDns); - if (message.clusterDnsScope != null && Object.hasOwnProperty.call(message, "clusterDnsScope")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.clusterDnsScope); - if (message.clusterDnsDomain != null && Object.hasOwnProperty.call(message, "clusterDnsDomain")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterDnsDomain); - if (message.additiveVpcScopeDnsDomain != null && Object.hasOwnProperty.call(message, "additiveVpcScopeDnsDomain")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.additiveVpcScopeDnsDomain); - return writer; - }; - - /** - * Encodes the specified DNSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.DNSConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {google.container.v1beta1.IDNSConfig} message DNSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DNSConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DNSConfig} DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DNSConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clusterDns = reader.int32(); - break; - } - case 2: { - message.clusterDnsScope = reader.int32(); - break; - } - case 3: { - message.clusterDnsDomain = reader.string(); - break; - } - case 5: { - message.additiveVpcScopeDnsDomain = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DNSConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DNSConfig} DNSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DNSConfig message. - * @function verify - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DNSConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) - switch (message.clusterDns) { - default: - return "clusterDns: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) - switch (message.clusterDnsScope) { - default: - return "clusterDnsScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) - if (!$util.isString(message.clusterDnsDomain)) - return "clusterDnsDomain: string expected"; - if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) - if (!$util.isString(message.additiveVpcScopeDnsDomain)) - return "additiveVpcScopeDnsDomain: string expected"; - return null; - }; - - /** - * Creates a DNSConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DNSConfig} DNSConfig - */ - DNSConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DNSConfig) - return object; - var message = new $root.google.container.v1beta1.DNSConfig(); - switch (object.clusterDns) { - default: - if (typeof object.clusterDns === "number") { - message.clusterDns = object.clusterDns; - break; - } - break; - case "PROVIDER_UNSPECIFIED": - case 0: - message.clusterDns = 0; - break; - case "PLATFORM_DEFAULT": - case 1: - message.clusterDns = 1; - break; - case "CLOUD_DNS": - case 2: - message.clusterDns = 2; - break; - case "KUBE_DNS": - case 3: - message.clusterDns = 3; - break; - } - switch (object.clusterDnsScope) { - default: - if (typeof object.clusterDnsScope === "number") { - message.clusterDnsScope = object.clusterDnsScope; - break; - } - break; - case "DNS_SCOPE_UNSPECIFIED": - case 0: - message.clusterDnsScope = 0; - break; - case "CLUSTER_SCOPE": - case 1: - message.clusterDnsScope = 1; - break; - case "VPC_SCOPE": - case 2: - message.clusterDnsScope = 2; - break; - } - if (object.clusterDnsDomain != null) - message.clusterDnsDomain = String(object.clusterDnsDomain); - if (object.additiveVpcScopeDnsDomain != null) - message.additiveVpcScopeDnsDomain = String(object.additiveVpcScopeDnsDomain); - return message; - }; - - /** - * Creates a plain object from a DNSConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {google.container.v1beta1.DNSConfig} message DNSConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DNSConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterDns = options.enums === String ? "PROVIDER_UNSPECIFIED" : 0; - object.clusterDnsScope = options.enums === String ? "DNS_SCOPE_UNSPECIFIED" : 0; - object.clusterDnsDomain = ""; - object.additiveVpcScopeDnsDomain = ""; - } - if (message.clusterDns != null && message.hasOwnProperty("clusterDns")) - object.clusterDns = options.enums === String ? $root.google.container.v1beta1.DNSConfig.Provider[message.clusterDns] === undefined ? message.clusterDns : $root.google.container.v1beta1.DNSConfig.Provider[message.clusterDns] : message.clusterDns; - if (message.clusterDnsScope != null && message.hasOwnProperty("clusterDnsScope")) - object.clusterDnsScope = options.enums === String ? $root.google.container.v1beta1.DNSConfig.DNSScope[message.clusterDnsScope] === undefined ? message.clusterDnsScope : $root.google.container.v1beta1.DNSConfig.DNSScope[message.clusterDnsScope] : message.clusterDnsScope; - if (message.clusterDnsDomain != null && message.hasOwnProperty("clusterDnsDomain")) - object.clusterDnsDomain = message.clusterDnsDomain; - if (message.additiveVpcScopeDnsDomain != null && message.hasOwnProperty("additiveVpcScopeDnsDomain")) - object.additiveVpcScopeDnsDomain = message.additiveVpcScopeDnsDomain; - return object; - }; - - /** - * Converts this DNSConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DNSConfig - * @instance - * @returns {Object.} JSON object - */ - DNSConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DNSConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.DNSConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DNSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DNSConfig"; - }; - - /** - * Provider enum. - * @name google.container.v1beta1.DNSConfig.Provider - * @enum {number} - * @property {number} PROVIDER_UNSPECIFIED=0 PROVIDER_UNSPECIFIED value - * @property {number} PLATFORM_DEFAULT=1 PLATFORM_DEFAULT value - * @property {number} CLOUD_DNS=2 CLOUD_DNS value - * @property {number} KUBE_DNS=3 KUBE_DNS value - */ - DNSConfig.Provider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLATFORM_DEFAULT"] = 1; - values[valuesById[2] = "CLOUD_DNS"] = 2; - values[valuesById[3] = "KUBE_DNS"] = 3; - return values; - })(); - - /** - * DNSScope enum. - * @name google.container.v1beta1.DNSConfig.DNSScope - * @enum {number} - * @property {number} DNS_SCOPE_UNSPECIFIED=0 DNS_SCOPE_UNSPECIFIED value - * @property {number} CLUSTER_SCOPE=1 CLUSTER_SCOPE value - * @property {number} VPC_SCOPE=2 VPC_SCOPE value - */ - DNSConfig.DNSScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DNS_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLUSTER_SCOPE"] = 1; - values[valuesById[2] = "VPC_SCOPE"] = 2; - return values; - })(); - - return DNSConfig; - })(); - - v1beta1.MaxPodsConstraint = (function() { - - /** - * Properties of a MaxPodsConstraint. - * @memberof google.container.v1beta1 - * @interface IMaxPodsConstraint - * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode - */ - - /** - * Constructs a new MaxPodsConstraint. - * @memberof google.container.v1beta1 - * @classdesc Represents a MaxPodsConstraint. - * @implements IMaxPodsConstraint - * @constructor - * @param {google.container.v1beta1.IMaxPodsConstraint=} [properties] Properties to set - */ - function MaxPodsConstraint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaxPodsConstraint maxPodsPerNode. - * @member {number|Long} maxPodsPerNode - * @memberof google.container.v1beta1.MaxPodsConstraint - * @instance - */ - MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new MaxPodsConstraint instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {google.container.v1beta1.IMaxPodsConstraint=} [properties] Properties to set - * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint instance - */ - MaxPodsConstraint.create = function create(properties) { - return new MaxPodsConstraint(properties); - }; - - /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.container.v1beta1.MaxPodsConstraint.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {google.container.v1beta1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.container.v1beta1.MaxPodsConstraint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {google.container.v1beta1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.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; - }; - - /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaxPodsConstraint message. - * @function verify - * @memberof google.container.v1beta1.MaxPodsConstraint - * @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) { - 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; - }; - - /** - * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MaxPodsConstraint - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MaxPodsConstraint} MaxPodsConstraint - */ - MaxPodsConstraint.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MaxPodsConstraint) - return object; - var message = new $root.google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint - * @static - * @param {google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint - * @instance - * @returns {Object.} JSON object - */ - MaxPodsConstraint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaxPodsConstraint - * @function getTypeUrl - * @memberof google.container.v1beta1.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.container.v1beta1.MaxPodsConstraint"; - }; - - return MaxPodsConstraint; - })(); - - v1beta1.WorkloadIdentityConfig = (function() { - - /** - * Properties of a WorkloadIdentityConfig. - * @memberof google.container.v1beta1 - * @interface IWorkloadIdentityConfig - * @property {string|null} [identityNamespace] WorkloadIdentityConfig identityNamespace - * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool - * @property {string|null} [identityProvider] WorkloadIdentityConfig identityProvider - */ - - /** - * Constructs a new WorkloadIdentityConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadIdentityConfig. - * @implements IWorkloadIdentityConfig - * @constructor - * @param {google.container.v1beta1.IWorkloadIdentityConfig=} [properties] Properties to set - */ - function WorkloadIdentityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadIdentityConfig identityNamespace. - * @member {string} identityNamespace - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.identityNamespace = ""; - - /** - * WorkloadIdentityConfig workloadPool. - * @member {string} workloadPool - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.workloadPool = ""; - - /** - * WorkloadIdentityConfig identityProvider. - * @member {string} identityProvider - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.identityProvider = ""; - - /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {google.container.v1beta1.IWorkloadIdentityConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig instance - */ - WorkloadIdentityConfig.create = function create(properties) { - return new WorkloadIdentityConfig(properties); - }; - - /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadIdentityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {google.container.v1beta1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadIdentityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identityNamespace != null && Object.hasOwnProperty.call(message, "identityNamespace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.identityNamespace); - 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 WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadIdentityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {google.container.v1beta1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadIdentityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.identityNamespace = reader.string(); - break; - } - case 2: { - message.workloadPool = reader.string(); - break; - } - case 3: { - message.identityProvider = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadIdentityConfig message. - * @function verify - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identityNamespace != null && message.hasOwnProperty("identityNamespace")) - if (!$util.isString(message.identityNamespace)) - return "identityNamespace: 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 a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadIdentityConfig} WorkloadIdentityConfig - */ - WorkloadIdentityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadIdentityConfig) - return object; - var message = new $root.google.container.v1beta1.WorkloadIdentityConfig(); - if (object.identityNamespace != null) - message.identityNamespace = String(object.identityNamespace); - 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 a WorkloadIdentityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {google.container.v1beta1.WorkloadIdentityConfig} message WorkloadIdentityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadIdentityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.identityNamespace = ""; - object.workloadPool = ""; - object.identityProvider = ""; - } - if (message.identityNamespace != null && message.hasOwnProperty("identityNamespace")) - object.identityNamespace = message.identityNamespace; - 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 WorkloadIdentityConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadIdentityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadIdentityConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadIdentityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadIdentityConfig"; - }; - - return WorkloadIdentityConfig; - })(); - - v1beta1.WorkloadALTSConfig = (function() { - - /** - * Properties of a WorkloadALTSConfig. - * @memberof google.container.v1beta1 - * @interface IWorkloadALTSConfig - * @property {google.protobuf.IBoolValue|null} [enableAlts] WorkloadALTSConfig enableAlts - */ - - /** - * Constructs a new WorkloadALTSConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadALTSConfig. - * @implements IWorkloadALTSConfig - * @constructor - * @param {google.container.v1beta1.IWorkloadALTSConfig=} [properties] Properties to set - */ - function WorkloadALTSConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadALTSConfig enableAlts. - * @member {google.protobuf.IBoolValue|null|undefined} enableAlts - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @instance - */ - WorkloadALTSConfig.prototype.enableAlts = null; - - /** - * Creates a new WorkloadALTSConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {google.container.v1beta1.IWorkloadALTSConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig instance - */ - WorkloadALTSConfig.create = function create(properties) { - return new WorkloadALTSConfig(properties); - }; - - /** - * Encodes the specified WorkloadALTSConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {google.container.v1beta1.IWorkloadALTSConfig} message WorkloadALTSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadALTSConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableAlts != null && Object.hasOwnProperty.call(message, "enableAlts")) - $root.google.protobuf.BoolValue.encode(message.enableAlts, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WorkloadALTSConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadALTSConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {google.container.v1beta1.IWorkloadALTSConfig} message WorkloadALTSConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadALTSConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadALTSConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadALTSConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadALTSConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableAlts = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadALTSConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadALTSConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadALTSConfig message. - * @function verify - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadALTSConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableAlts != null && message.hasOwnProperty("enableAlts")) { - var error = $root.google.protobuf.BoolValue.verify(message.enableAlts); - if (error) - return "enableAlts." + error; - } - return null; - }; - - /** - * Creates a WorkloadALTSConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadALTSConfig} WorkloadALTSConfig - */ - WorkloadALTSConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadALTSConfig) - return object; - var message = new $root.google.container.v1beta1.WorkloadALTSConfig(); - if (object.enableAlts != null) { - if (typeof object.enableAlts !== "object") - throw TypeError(".google.container.v1beta1.WorkloadALTSConfig.enableAlts: object expected"); - message.enableAlts = $root.google.protobuf.BoolValue.fromObject(object.enableAlts); - } - return message; - }; - - /** - * Creates a plain object from a WorkloadALTSConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {google.container.v1beta1.WorkloadALTSConfig} message WorkloadALTSConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadALTSConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enableAlts = null; - if (message.enableAlts != null && message.hasOwnProperty("enableAlts")) - object.enableAlts = $root.google.protobuf.BoolValue.toObject(message.enableAlts, options); - return object; - }; - - /** - * Converts this WorkloadALTSConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadALTSConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadALTSConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadALTSConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadALTSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadALTSConfig"; - }; - - return WorkloadALTSConfig; - })(); - - v1beta1.WorkloadCertificates = (function() { - - /** - * Properties of a WorkloadCertificates. - * @memberof google.container.v1beta1 - * @interface IWorkloadCertificates - * @property {google.protobuf.IBoolValue|null} [enableCertificates] WorkloadCertificates enableCertificates - */ - - /** - * Constructs a new WorkloadCertificates. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadCertificates. - * @implements IWorkloadCertificates - * @constructor - * @param {google.container.v1beta1.IWorkloadCertificates=} [properties] Properties to set - */ - function WorkloadCertificates(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadCertificates enableCertificates. - * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates - * @memberof google.container.v1beta1.WorkloadCertificates - * @instance - */ - WorkloadCertificates.prototype.enableCertificates = null; - - /** - * Creates a new WorkloadCertificates instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {google.container.v1beta1.IWorkloadCertificates=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates instance - */ - WorkloadCertificates.create = function create(properties) { - return new WorkloadCertificates(properties); - }; - - /** - * Encodes the specified WorkloadCertificates message. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {google.container.v1beta1.IWorkloadCertificates} message WorkloadCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadCertificates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) - $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WorkloadCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadCertificates.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {google.container.v1beta1.IWorkloadCertificates} message WorkloadCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadCertificates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadCertificates message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadCertificates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadCertificates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadCertificates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadCertificates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadCertificates message. - * @function verify - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadCertificates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { - var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); - if (error) - return "enableCertificates." + error; - } - return null; - }; - - /** - * Creates a WorkloadCertificates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadCertificates} WorkloadCertificates - */ - WorkloadCertificates.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadCertificates) - return object; - var message = new $root.google.container.v1beta1.WorkloadCertificates(); - if (object.enableCertificates != null) { - if (typeof object.enableCertificates !== "object") - throw TypeError(".google.container.v1beta1.WorkloadCertificates.enableCertificates: object expected"); - message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); - } - return message; - }; - - /** - * Creates a plain object from a WorkloadCertificates message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {google.container.v1beta1.WorkloadCertificates} message WorkloadCertificates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadCertificates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enableCertificates = null; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) - object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); - return object; - }; - - /** - * Converts this WorkloadCertificates to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadCertificates - * @instance - * @returns {Object.} JSON object - */ - WorkloadCertificates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadCertificates - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadCertificates - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadCertificates"; - }; - - return WorkloadCertificates; - })(); - - v1beta1.MeshCertificates = (function() { - - /** - * Properties of a MeshCertificates. - * @memberof google.container.v1beta1 - * @interface IMeshCertificates - * @property {google.protobuf.IBoolValue|null} [enableCertificates] MeshCertificates enableCertificates - */ - - /** - * Constructs a new MeshCertificates. - * @memberof google.container.v1beta1 - * @classdesc Represents a MeshCertificates. - * @implements IMeshCertificates - * @constructor - * @param {google.container.v1beta1.IMeshCertificates=} [properties] Properties to set - */ - function MeshCertificates(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MeshCertificates enableCertificates. - * @member {google.protobuf.IBoolValue|null|undefined} enableCertificates - * @memberof google.container.v1beta1.MeshCertificates - * @instance - */ - MeshCertificates.prototype.enableCertificates = null; - - /** - * Creates a new MeshCertificates instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {google.container.v1beta1.IMeshCertificates=} [properties] Properties to set - * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates instance - */ - MeshCertificates.create = function create(properties) { - return new MeshCertificates(properties); - }; - - /** - * Encodes the specified MeshCertificates message. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {google.container.v1beta1.IMeshCertificates} message MeshCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MeshCertificates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableCertificates != null && Object.hasOwnProperty.call(message, "enableCertificates")) - $root.google.protobuf.BoolValue.encode(message.enableCertificates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MeshCertificates message, length delimited. Does not implicitly {@link google.container.v1beta1.MeshCertificates.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {google.container.v1beta1.IMeshCertificates} message MeshCertificates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MeshCertificates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MeshCertificates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MeshCertificates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableCertificates = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MeshCertificates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MeshCertificates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MeshCertificates message. - * @function verify - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MeshCertificates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) { - var error = $root.google.protobuf.BoolValue.verify(message.enableCertificates); - if (error) - return "enableCertificates." + error; - } - return null; - }; - - /** - * Creates a MeshCertificates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MeshCertificates} MeshCertificates - */ - MeshCertificates.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MeshCertificates) - return object; - var message = new $root.google.container.v1beta1.MeshCertificates(); - if (object.enableCertificates != null) { - if (typeof object.enableCertificates !== "object") - throw TypeError(".google.container.v1beta1.MeshCertificates.enableCertificates: object expected"); - message.enableCertificates = $root.google.protobuf.BoolValue.fromObject(object.enableCertificates); - } - return message; - }; - - /** - * Creates a plain object from a MeshCertificates message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {google.container.v1beta1.MeshCertificates} message MeshCertificates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MeshCertificates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enableCertificates = null; - if (message.enableCertificates != null && message.hasOwnProperty("enableCertificates")) - object.enableCertificates = $root.google.protobuf.BoolValue.toObject(message.enableCertificates, options); - return object; - }; - - /** - * Converts this MeshCertificates to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MeshCertificates - * @instance - * @returns {Object.} JSON object - */ - MeshCertificates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MeshCertificates - * @function getTypeUrl - * @memberof google.container.v1beta1.MeshCertificates - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MeshCertificates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MeshCertificates"; - }; - - return MeshCertificates; - })(); - - v1beta1.DatabaseEncryption = (function() { - - /** - * Properties of a DatabaseEncryption. - * @memberof google.container.v1beta1 - * @interface IDatabaseEncryption - * @property {string|null} [keyName] DatabaseEncryption keyName - * @property {google.container.v1beta1.DatabaseEncryption.State|null} [state] DatabaseEncryption state - * @property {google.container.v1beta1.DatabaseEncryption.CurrentState|null} [currentState] DatabaseEncryption currentState - * @property {Array.|null} [decryptionKeys] DatabaseEncryption decryptionKeys - * @property {Array.|null} [lastOperationErrors] DatabaseEncryption lastOperationErrors - */ - - /** - * Constructs a new DatabaseEncryption. - * @memberof google.container.v1beta1 - * @classdesc Represents a DatabaseEncryption. - * @implements IDatabaseEncryption - * @constructor - * @param {google.container.v1beta1.IDatabaseEncryption=} [properties] Properties to set - */ - function DatabaseEncryption(properties) { - this.decryptionKeys = []; - this.lastOperationErrors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseEncryption keyName. - * @member {string} keyName - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.keyName = ""; - - /** - * DatabaseEncryption state. - * @member {google.container.v1beta1.DatabaseEncryption.State} state - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.state = 0; - - /** - * DatabaseEncryption currentState. - * @member {google.container.v1beta1.DatabaseEncryption.CurrentState|null|undefined} currentState - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.currentState = null; - - /** - * DatabaseEncryption decryptionKeys. - * @member {Array.} decryptionKeys - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.decryptionKeys = $util.emptyArray; - - /** - * DatabaseEncryption lastOperationErrors. - * @member {Array.} lastOperationErrors - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - DatabaseEncryption.prototype.lastOperationErrors = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DatabaseEncryption _currentState. - * @member {"currentState"|undefined} _currentState - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - */ - Object.defineProperty(DatabaseEncryption.prototype, "_currentState", { - get: $util.oneOfGetter($oneOfFields = ["currentState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DatabaseEncryption instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {google.container.v1beta1.IDatabaseEncryption=} [properties] Properties to set - * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption instance - */ - DatabaseEncryption.create = function create(properties) { - return new DatabaseEncryption(properties); - }; - - /** - * Encodes the specified DatabaseEncryption message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {google.container.v1beta1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.currentState != null && Object.hasOwnProperty.call(message, "currentState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currentState); - if (message.decryptionKeys != null && message.decryptionKeys.length) - for (var i = 0; i < message.decryptionKeys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.decryptionKeys[i]); - if (message.lastOperationErrors != null && message.lastOperationErrors.length) - for (var i = 0; i < message.lastOperationErrors.length; ++i) - $root.google.container.v1beta1.DatabaseEncryption.OperationError.encode(message.lastOperationErrors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DatabaseEncryption message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {google.container.v1beta1.IDatabaseEncryption} message DatabaseEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseEncryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DatabaseEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyName = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.currentState = reader.int32(); - break; - } - case 4: { - if (!(message.decryptionKeys && message.decryptionKeys.length)) - message.decryptionKeys = []; - message.decryptionKeys.push(reader.string()); - break; - } - case 5: { - if (!(message.lastOperationErrors && message.lastOperationErrors.length)) - message.lastOperationErrors = []; - message.lastOperationErrors.push($root.google.container.v1beta1.DatabaseEncryption.OperationError.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseEncryption message. - * @function verify - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.currentState != null && message.hasOwnProperty("currentState")) { - properties._currentState = 1; - switch (message.currentState) { - default: - return "currentState: enum value expected"; - case 0: - case 7: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - } - if (message.decryptionKeys != null && message.hasOwnProperty("decryptionKeys")) { - if (!Array.isArray(message.decryptionKeys)) - return "decryptionKeys: array expected"; - for (var i = 0; i < message.decryptionKeys.length; ++i) - if (!$util.isString(message.decryptionKeys[i])) - return "decryptionKeys: string[] expected"; - } - if (message.lastOperationErrors != null && message.hasOwnProperty("lastOperationErrors")) { - if (!Array.isArray(message.lastOperationErrors)) - return "lastOperationErrors: array expected"; - for (var i = 0; i < message.lastOperationErrors.length; ++i) { - var error = $root.google.container.v1beta1.DatabaseEncryption.OperationError.verify(message.lastOperationErrors[i]); - if (error) - return "lastOperationErrors." + error; - } - } - return null; - }; - - /** - * Creates a DatabaseEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DatabaseEncryption} DatabaseEncryption - */ - DatabaseEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DatabaseEncryption) - return object; - var message = new $root.google.container.v1beta1.DatabaseEncryption(); - if (object.keyName != null) - message.keyName = String(object.keyName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "UNKNOWN": - case 0: - message.state = 0; - break; - case "ENCRYPTED": - case 1: - message.state = 1; - break; - case "DECRYPTED": - case 2: - message.state = 2; - break; - } - switch (object.currentState) { - default: - if (typeof object.currentState === "number") { - message.currentState = object.currentState; - break; - } - break; - case "CURRENT_STATE_UNSPECIFIED": - case 0: - message.currentState = 0; - break; - case "CURRENT_STATE_ENCRYPTED": - case 7: - message.currentState = 7; - break; - case "CURRENT_STATE_DECRYPTED": - case 2: - message.currentState = 2; - break; - case "CURRENT_STATE_ENCRYPTION_PENDING": - case 3: - message.currentState = 3; - break; - case "CURRENT_STATE_ENCRYPTION_ERROR": - case 4: - message.currentState = 4; - break; - case "CURRENT_STATE_DECRYPTION_PENDING": - case 5: - message.currentState = 5; - break; - case "CURRENT_STATE_DECRYPTION_ERROR": - case 6: - message.currentState = 6; - break; - } - if (object.decryptionKeys) { - if (!Array.isArray(object.decryptionKeys)) - throw TypeError(".google.container.v1beta1.DatabaseEncryption.decryptionKeys: array expected"); - message.decryptionKeys = []; - for (var i = 0; i < object.decryptionKeys.length; ++i) - message.decryptionKeys[i] = String(object.decryptionKeys[i]); - } - if (object.lastOperationErrors) { - if (!Array.isArray(object.lastOperationErrors)) - throw TypeError(".google.container.v1beta1.DatabaseEncryption.lastOperationErrors: array expected"); - message.lastOperationErrors = []; - for (var i = 0; i < object.lastOperationErrors.length; ++i) { - if (typeof object.lastOperationErrors[i] !== "object") - throw TypeError(".google.container.v1beta1.DatabaseEncryption.lastOperationErrors: object expected"); - message.lastOperationErrors[i] = $root.google.container.v1beta1.DatabaseEncryption.OperationError.fromObject(object.lastOperationErrors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DatabaseEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {google.container.v1beta1.DatabaseEncryption} message DatabaseEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.decryptionKeys = []; - object.lastOperationErrors = []; - } - if (options.defaults) { - object.keyName = ""; - object.state = options.enums === String ? "UNKNOWN" : 0; - } - if (message.keyName != null && message.hasOwnProperty("keyName")) - object.keyName = message.keyName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.container.v1beta1.DatabaseEncryption.State[message.state] === undefined ? message.state : $root.google.container.v1beta1.DatabaseEncryption.State[message.state] : message.state; - if (message.currentState != null && message.hasOwnProperty("currentState")) { - object.currentState = options.enums === String ? $root.google.container.v1beta1.DatabaseEncryption.CurrentState[message.currentState] === undefined ? message.currentState : $root.google.container.v1beta1.DatabaseEncryption.CurrentState[message.currentState] : message.currentState; - if (options.oneofs) - object._currentState = "currentState"; - } - if (message.decryptionKeys && message.decryptionKeys.length) { - object.decryptionKeys = []; - for (var j = 0; j < message.decryptionKeys.length; ++j) - object.decryptionKeys[j] = message.decryptionKeys[j]; - } - if (message.lastOperationErrors && message.lastOperationErrors.length) { - object.lastOperationErrors = []; - for (var j = 0; j < message.lastOperationErrors.length; ++j) - object.lastOperationErrors[j] = $root.google.container.v1beta1.DatabaseEncryption.OperationError.toObject(message.lastOperationErrors[j], options); - } - return object; - }; - - /** - * Converts this DatabaseEncryption to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DatabaseEncryption - * @instance - * @returns {Object.} JSON object - */ - DatabaseEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseEncryption - * @function getTypeUrl - * @memberof google.container.v1beta1.DatabaseEncryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DatabaseEncryption"; - }; - - /** - * State enum. - * @name google.container.v1beta1.DatabaseEncryption.State - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ENCRYPTED=1 ENCRYPTED value - * @property {number} DECRYPTED=2 DECRYPTED value - */ - DatabaseEncryption.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ENCRYPTED"] = 1; - values[valuesById[2] = "DECRYPTED"] = 2; - return values; - })(); - - /** - * CurrentState enum. - * @name google.container.v1beta1.DatabaseEncryption.CurrentState - * @enum {number} - * @property {number} CURRENT_STATE_UNSPECIFIED=0 CURRENT_STATE_UNSPECIFIED value - * @property {number} CURRENT_STATE_ENCRYPTED=7 CURRENT_STATE_ENCRYPTED value - * @property {number} CURRENT_STATE_DECRYPTED=2 CURRENT_STATE_DECRYPTED value - * @property {number} CURRENT_STATE_ENCRYPTION_PENDING=3 CURRENT_STATE_ENCRYPTION_PENDING value - * @property {number} CURRENT_STATE_ENCRYPTION_ERROR=4 CURRENT_STATE_ENCRYPTION_ERROR value - * @property {number} CURRENT_STATE_DECRYPTION_PENDING=5 CURRENT_STATE_DECRYPTION_PENDING value - * @property {number} CURRENT_STATE_DECRYPTION_ERROR=6 CURRENT_STATE_DECRYPTION_ERROR value - */ - DatabaseEncryption.CurrentState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CURRENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[7] = "CURRENT_STATE_ENCRYPTED"] = 7; - values[valuesById[2] = "CURRENT_STATE_DECRYPTED"] = 2; - values[valuesById[3] = "CURRENT_STATE_ENCRYPTION_PENDING"] = 3; - values[valuesById[4] = "CURRENT_STATE_ENCRYPTION_ERROR"] = 4; - values[valuesById[5] = "CURRENT_STATE_DECRYPTION_PENDING"] = 5; - values[valuesById[6] = "CURRENT_STATE_DECRYPTION_ERROR"] = 6; - return values; - })(); - - DatabaseEncryption.OperationError = (function() { - - /** - * Properties of an OperationError. - * @memberof google.container.v1beta1.DatabaseEncryption - * @interface IOperationError - * @property {string|null} [keyName] OperationError keyName - * @property {string|null} [errorMessage] OperationError errorMessage - * @property {google.protobuf.ITimestamp|null} [timestamp] OperationError timestamp - */ - - /** - * Constructs a new OperationError. - * @memberof google.container.v1beta1.DatabaseEncryption - * @classdesc Represents an OperationError. - * @implements IOperationError - * @constructor - * @param {google.container.v1beta1.DatabaseEncryption.IOperationError=} [properties] Properties to set - */ - function OperationError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationError keyName. - * @member {string} keyName - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.keyName = ""; - - /** - * OperationError errorMessage. - * @member {string} errorMessage - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.errorMessage = ""; - - /** - * OperationError timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @instance - */ - OperationError.prototype.timestamp = null; - - /** - * Creates a new OperationError instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1beta1.DatabaseEncryption.IOperationError=} [properties] Properties to set - * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError instance - */ - OperationError.create = function create(properties) { - return new OperationError(properties); - }; - - /** - * Encodes the specified OperationError message. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1beta1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationError message, length delimited. Does not implicitly {@link google.container.v1beta1.DatabaseEncryption.OperationError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1beta1.DatabaseEncryption.IOperationError} message OperationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationError message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.DatabaseEncryption.OperationError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.keyName = reader.string(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - case 3: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationError message. - * @function verify - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - return null; - }; - - /** - * Creates an OperationError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.DatabaseEncryption.OperationError} OperationError - */ - OperationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.DatabaseEncryption.OperationError) - return object; - var message = new $root.google.container.v1beta1.DatabaseEncryption.OperationError(); - if (object.keyName != null) - message.keyName = String(object.keyName); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.container.v1beta1.DatabaseEncryption.OperationError.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - return message; - }; - - /** - * Creates a plain object from an OperationError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {google.container.v1beta1.DatabaseEncryption.OperationError} message OperationError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyName = ""; - object.errorMessage = ""; - object.timestamp = null; - } - if (message.keyName != null && message.hasOwnProperty("keyName")) - object.keyName = message.keyName; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - return object; - }; - - /** - * Converts this OperationError to JSON. - * @function toJSON - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @instance - * @returns {Object.} JSON object - */ - OperationError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationError - * @function getTypeUrl - * @memberof google.container.v1beta1.DatabaseEncryption.OperationError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.DatabaseEncryption.OperationError"; - }; - - return OperationError; - })(); - - return DatabaseEncryption; - })(); - - v1beta1.ResourceUsageExportConfig = (function() { - - /** - * Properties of a ResourceUsageExportConfig. - * @memberof google.container.v1beta1 - * @interface IResourceUsageExportConfig - * @property {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null} [bigqueryDestination] ResourceUsageExportConfig bigqueryDestination - * @property {boolean|null} [enableNetworkEgressMetering] ResourceUsageExportConfig enableNetworkEgressMetering - * @property {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null} [consumptionMeteringConfig] ResourceUsageExportConfig consumptionMeteringConfig - */ - - /** - * Constructs a new ResourceUsageExportConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a ResourceUsageExportConfig. - * @implements IResourceUsageExportConfig - * @constructor - * @param {google.container.v1beta1.IResourceUsageExportConfig=} [properties] Properties to set - */ - function ResourceUsageExportConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceUsageExportConfig bigqueryDestination. - * @member {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.bigqueryDestination = null; - - /** - * ResourceUsageExportConfig enableNetworkEgressMetering. - * @member {boolean} enableNetworkEgressMetering - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.enableNetworkEgressMetering = false; - - /** - * ResourceUsageExportConfig consumptionMeteringConfig. - * @member {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig|null|undefined} consumptionMeteringConfig - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @instance - */ - ResourceUsageExportConfig.prototype.consumptionMeteringConfig = null; - - /** - * Creates a new ResourceUsageExportConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {google.container.v1beta1.IResourceUsageExportConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig instance - */ - ResourceUsageExportConfig.create = function create(properties) { - return new ResourceUsageExportConfig(properties); - }; - - /** - * Encodes the specified ResourceUsageExportConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {google.container.v1beta1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceUsageExportConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryDestination != null && Object.hasOwnProperty.call(message, "bigqueryDestination")) - $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.enableNetworkEgressMetering != null && Object.hasOwnProperty.call(message, "enableNetworkEgressMetering")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableNetworkEgressMetering); - if (message.consumptionMeteringConfig != null && Object.hasOwnProperty.call(message, "consumptionMeteringConfig")) - $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.encode(message.consumptionMeteringConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceUsageExportConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {google.container.v1beta1.IResourceUsageExportConfig} message ResourceUsageExportConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceUsageExportConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceUsageExportConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.decode(reader, reader.uint32()); - break; - } - case 2: { - message.enableNetworkEgressMetering = reader.bool(); - break; - } - case 3: { - message.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceUsageExportConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceUsageExportConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceUsageExportConfig message. - * @function verify - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceUsageExportConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - var error = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify(message.bigqueryDestination); - if (error) - return "bigqueryDestination." + error; - } - if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) - if (typeof message.enableNetworkEgressMetering !== "boolean") - return "enableNetworkEgressMetering: boolean expected"; - if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) { - var error = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify(message.consumptionMeteringConfig); - if (error) - return "consumptionMeteringConfig." + error; - } - return null; - }; - - /** - * Creates a ResourceUsageExportConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceUsageExportConfig} ResourceUsageExportConfig - */ - ResourceUsageExportConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig) - return object; - var message = new $root.google.container.v1beta1.ResourceUsageExportConfig(); - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.container.v1beta1.ResourceUsageExportConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.fromObject(object.bigqueryDestination); - } - if (object.enableNetworkEgressMetering != null) - message.enableNetworkEgressMetering = Boolean(object.enableNetworkEgressMetering); - if (object.consumptionMeteringConfig != null) { - if (typeof object.consumptionMeteringConfig !== "object") - throw TypeError(".google.container.v1beta1.ResourceUsageExportConfig.consumptionMeteringConfig: object expected"); - message.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.fromObject(object.consumptionMeteringConfig); - } - return message; - }; - - /** - * Creates a plain object from a ResourceUsageExportConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig} message ResourceUsageExportConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceUsageExportConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bigqueryDestination = null; - object.enableNetworkEgressMetering = false; - object.consumptionMeteringConfig = null; - } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - object.bigqueryDestination = $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.toObject(message.bigqueryDestination, options); - if (message.enableNetworkEgressMetering != null && message.hasOwnProperty("enableNetworkEgressMetering")) - object.enableNetworkEgressMetering = message.enableNetworkEgressMetering; - if (message.consumptionMeteringConfig != null && message.hasOwnProperty("consumptionMeteringConfig")) - object.consumptionMeteringConfig = $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.toObject(message.consumptionMeteringConfig, options); - return object; - }; - - /** - * Converts this ResourceUsageExportConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @instance - * @returns {Object.} JSON object - */ - ResourceUsageExportConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceUsageExportConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceUsageExportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig"; - }; - - ResourceUsageExportConfig.BigQueryDestination = (function() { - - /** - * Properties of a BigQueryDestination. - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @interface IBigQueryDestination - * @property {string|null} [datasetId] BigQueryDestination datasetId - */ - - /** - * Constructs a new BigQueryDestination. - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @classdesc Represents a BigQueryDestination. - * @implements IBigQueryDestination - * @constructor - * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set - */ - function BigQueryDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryDestination datasetId. - * @member {string} datasetId - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @instance - */ - BigQueryDestination.prototype.datasetId = ""; - - /** - * Creates a new BigQueryDestination instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination instance - */ - BigQueryDestination.create = function create(properties) { - return new BigQueryDestination(properties); - }; - - /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); - return writer; - }; - - /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IBigQueryDestination} message BigQueryDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.datasetId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDestination message. - * @function verify - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; - return null; - }; - - /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} BigQueryDestination - */ - BigQueryDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination) - return object; - var message = new $root.google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination(); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - return message; - }; - - /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination} message BigQueryDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetId = ""; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - return object; - }; - - /** - * Converts this BigQueryDestination to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @instance - * @returns {Object.} JSON object - */ - BigQueryDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDestination - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig.BigQueryDestination"; - }; - - return BigQueryDestination; - })(); - - ResourceUsageExportConfig.ConsumptionMeteringConfig = (function() { - - /** - * Properties of a ConsumptionMeteringConfig. - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @interface IConsumptionMeteringConfig - * @property {boolean|null} [enabled] ConsumptionMeteringConfig enabled - */ - - /** - * Constructs a new ConsumptionMeteringConfig. - * @memberof google.container.v1beta1.ResourceUsageExportConfig - * @classdesc Represents a ConsumptionMeteringConfig. - * @implements IConsumptionMeteringConfig - * @constructor - * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set - */ - function ConsumptionMeteringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsumptionMeteringConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @instance - */ - ConsumptionMeteringConfig.prototype.enabled = false; - - /** - * Creates a new ConsumptionMeteringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig instance - */ - ConsumptionMeteringConfig.create = function create(properties) { - return new ConsumptionMeteringConfig(properties); - }; - - /** - * Encodes the specified ConsumptionMeteringConfig message. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsumptionMeteringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConsumptionMeteringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.IConsumptionMeteringConfig} message ConsumptionMeteringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsumptionMeteringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsumptionMeteringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsumptionMeteringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsumptionMeteringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsumptionMeteringConfig message. - * @function verify - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsumptionMeteringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConsumptionMeteringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} ConsumptionMeteringConfig - */ - ConsumptionMeteringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig) - return object; - var message = new $root.google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConsumptionMeteringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig} message ConsumptionMeteringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsumptionMeteringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConsumptionMeteringConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @instance - * @returns {Object.} JSON object - */ - ConsumptionMeteringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConsumptionMeteringConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConsumptionMeteringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceUsageExportConfig.ConsumptionMeteringConfig"; - }; - - return ConsumptionMeteringConfig; - })(); - - return ResourceUsageExportConfig; - })(); - - v1beta1.ShieldedNodes = (function() { - - /** - * Properties of a ShieldedNodes. - * @memberof google.container.v1beta1 - * @interface IShieldedNodes - * @property {boolean|null} [enabled] ShieldedNodes enabled - */ - - /** - * Constructs a new ShieldedNodes. - * @memberof google.container.v1beta1 - * @classdesc Represents a ShieldedNodes. - * @implements IShieldedNodes - * @constructor - * @param {google.container.v1beta1.IShieldedNodes=} [properties] Properties to set - */ - function ShieldedNodes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShieldedNodes enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ShieldedNodes - * @instance - */ - ShieldedNodes.prototype.enabled = false; - - /** - * Creates a new ShieldedNodes instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {google.container.v1beta1.IShieldedNodes=} [properties] Properties to set - * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes instance - */ - ShieldedNodes.create = function create(properties) { - return new ShieldedNodes(properties); - }; - - /** - * Encodes the specified ShieldedNodes message. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {google.container.v1beta1.IShieldedNodes} message ShieldedNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedNodes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ShieldedNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ShieldedNodes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {google.container.v1beta1.IShieldedNodes} message ShieldedNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShieldedNodes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedNodes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ShieldedNodes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShieldedNodes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShieldedNodes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShieldedNodes message. - * @function verify - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShieldedNodes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ShieldedNodes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ShieldedNodes} ShieldedNodes - */ - ShieldedNodes.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ShieldedNodes) - return object; - var message = new $root.google.container.v1beta1.ShieldedNodes(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ShieldedNodes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {google.container.v1beta1.ShieldedNodes} message ShieldedNodes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShieldedNodes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ShieldedNodes to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ShieldedNodes - * @instance - * @returns {Object.} JSON object - */ - ShieldedNodes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShieldedNodes - * @function getTypeUrl - * @memberof google.container.v1beta1.ShieldedNodes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShieldedNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ShieldedNodes"; - }; - - return ShieldedNodes; - })(); - - v1beta1.VirtualNIC = (function() { - - /** - * Properties of a VirtualNIC. - * @memberof google.container.v1beta1 - * @interface IVirtualNIC - * @property {boolean|null} [enabled] VirtualNIC enabled - */ - - /** - * Constructs a new VirtualNIC. - * @memberof google.container.v1beta1 - * @classdesc Represents a VirtualNIC. - * @implements IVirtualNIC - * @constructor - * @param {google.container.v1beta1.IVirtualNIC=} [properties] Properties to set - */ - function VirtualNIC(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VirtualNIC enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.VirtualNIC - * @instance - */ - VirtualNIC.prototype.enabled = false; - - /** - * Creates a new VirtualNIC instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {google.container.v1beta1.IVirtualNIC=} [properties] Properties to set - * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC instance - */ - VirtualNIC.create = function create(properties) { - return new VirtualNIC(properties); - }; - - /** - * Encodes the specified VirtualNIC message. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {google.container.v1beta1.IVirtualNIC} message VirtualNIC message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualNIC.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified VirtualNIC message, length delimited. Does not implicitly {@link google.container.v1beta1.VirtualNIC.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {google.container.v1beta1.IVirtualNIC} message VirtualNIC message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualNIC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualNIC.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.VirtualNIC(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VirtualNIC message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualNIC.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VirtualNIC message. - * @function verify - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VirtualNIC.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a VirtualNIC message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.VirtualNIC} VirtualNIC - */ - VirtualNIC.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.VirtualNIC) - return object; - var message = new $root.google.container.v1beta1.VirtualNIC(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a VirtualNIC message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {google.container.v1beta1.VirtualNIC} message VirtualNIC - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VirtualNIC.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this VirtualNIC to JSON. - * @function toJSON - * @memberof google.container.v1beta1.VirtualNIC - * @instance - * @returns {Object.} JSON object - */ - VirtualNIC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VirtualNIC - * @function getTypeUrl - * @memberof google.container.v1beta1.VirtualNIC - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VirtualNIC.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.VirtualNIC"; - }; - - return VirtualNIC; - })(); - - v1beta1.FastSocket = (function() { - - /** - * Properties of a FastSocket. - * @memberof google.container.v1beta1 - * @interface IFastSocket - * @property {boolean|null} [enabled] FastSocket enabled - */ - - /** - * Constructs a new FastSocket. - * @memberof google.container.v1beta1 - * @classdesc Represents a FastSocket. - * @implements IFastSocket - * @constructor - * @param {google.container.v1beta1.IFastSocket=} [properties] Properties to set - */ - function FastSocket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FastSocket enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.FastSocket - * @instance - */ - FastSocket.prototype.enabled = false; - - /** - * Creates a new FastSocket instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {google.container.v1beta1.IFastSocket=} [properties] Properties to set - * @returns {google.container.v1beta1.FastSocket} FastSocket instance - */ - FastSocket.create = function create(properties) { - return new FastSocket(properties); - }; - - /** - * Encodes the specified FastSocket message. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {google.container.v1beta1.IFastSocket} message FastSocket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FastSocket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified FastSocket message, length delimited. Does not implicitly {@link google.container.v1beta1.FastSocket.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {google.container.v1beta1.IFastSocket} message FastSocket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FastSocket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FastSocket message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.FastSocket} FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FastSocket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.FastSocket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FastSocket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.FastSocket} FastSocket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FastSocket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FastSocket message. - * @function verify - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FastSocket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a FastSocket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.FastSocket} FastSocket - */ - FastSocket.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.FastSocket) - return object; - var message = new $root.google.container.v1beta1.FastSocket(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a FastSocket message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {google.container.v1beta1.FastSocket} message FastSocket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FastSocket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this FastSocket to JSON. - * @function toJSON - * @memberof google.container.v1beta1.FastSocket - * @instance - * @returns {Object.} JSON object - */ - FastSocket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FastSocket - * @function getTypeUrl - * @memberof google.container.v1beta1.FastSocket - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FastSocket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.FastSocket"; - }; - - return FastSocket; - })(); - - v1beta1.GetOpenIDConfigRequest = (function() { - - /** - * Properties of a GetOpenIDConfigRequest. - * @memberof google.container.v1beta1 - * @interface IGetOpenIDConfigRequest - * @property {string|null} [parent] GetOpenIDConfigRequest parent - */ - - /** - * Constructs a new GetOpenIDConfigRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetOpenIDConfigRequest. - * @implements IGetOpenIDConfigRequest - * @constructor - * @param {google.container.v1beta1.IGetOpenIDConfigRequest=} [properties] Properties to set - */ - function GetOpenIDConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOpenIDConfigRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @instance - */ - GetOpenIDConfigRequest.prototype.parent = ""; - - /** - * Creates a new GetOpenIDConfigRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest instance - */ - GetOpenIDConfigRequest.create = function create(properties) { - return new GetOpenIDConfigRequest(properties); - }; - - /** - * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigRequest.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); - return writer; - }; - - /** - * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOpenIDConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOpenIDConfigRequest message. - * @function verify - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOpenIDConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetOpenIDConfigRequest} GetOpenIDConfigRequest - */ - GetOpenIDConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetOpenIDConfigRequest) - return object; - var message = new $root.google.container.v1beta1.GetOpenIDConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {google.container.v1beta1.GetOpenIDConfigRequest} message GetOpenIDConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOpenIDConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this GetOpenIDConfigRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetOpenIDConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOpenIDConfigRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetOpenIDConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOpenIDConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetOpenIDConfigRequest"; - }; - - return GetOpenIDConfigRequest; - })(); - - v1beta1.GetOpenIDConfigResponse = (function() { - - /** - * Properties of a GetOpenIDConfigResponse. - * @memberof google.container.v1beta1 - * @interface IGetOpenIDConfigResponse - * @property {string|null} [issuer] GetOpenIDConfigResponse issuer - * @property {string|null} [jwksUri] GetOpenIDConfigResponse jwksUri - * @property {Array.|null} [responseTypesSupported] GetOpenIDConfigResponse responseTypesSupported - * @property {Array.|null} [subjectTypesSupported] GetOpenIDConfigResponse subjectTypesSupported - * @property {Array.|null} [idTokenSigningAlgValuesSupported] GetOpenIDConfigResponse idTokenSigningAlgValuesSupported - * @property {Array.|null} [claimsSupported] GetOpenIDConfigResponse claimsSupported - * @property {Array.|null} [grantTypes] GetOpenIDConfigResponse grantTypes - */ - - /** - * Constructs a new GetOpenIDConfigResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetOpenIDConfigResponse. - * @implements IGetOpenIDConfigResponse - * @constructor - * @param {google.container.v1beta1.IGetOpenIDConfigResponse=} [properties] Properties to set - */ - function GetOpenIDConfigResponse(properties) { - this.responseTypesSupported = []; - this.subjectTypesSupported = []; - this.idTokenSigningAlgValuesSupported = []; - this.claimsSupported = []; - this.grantTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOpenIDConfigResponse issuer. - * @member {string} issuer - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.issuer = ""; - - /** - * GetOpenIDConfigResponse jwksUri. - * @member {string} jwksUri - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.jwksUri = ""; - - /** - * GetOpenIDConfigResponse responseTypesSupported. - * @member {Array.} responseTypesSupported - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.responseTypesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse subjectTypesSupported. - * @member {Array.} subjectTypesSupported - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.subjectTypesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. - * @member {Array.} idTokenSigningAlgValuesSupported - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.idTokenSigningAlgValuesSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse claimsSupported. - * @member {Array.} claimsSupported - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.claimsSupported = $util.emptyArray; - - /** - * GetOpenIDConfigResponse grantTypes. - * @member {Array.} grantTypes - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - */ - GetOpenIDConfigResponse.prototype.grantTypes = $util.emptyArray; - - /** - * Creates a new GetOpenIDConfigResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse instance - */ - GetOpenIDConfigResponse.create = function create(properties) { - return new GetOpenIDConfigResponse(properties); - }; - - /** - * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jwksUri); - if (message.responseTypesSupported != null && message.responseTypesSupported.length) - for (var i = 0; i < message.responseTypesSupported.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.responseTypesSupported[i]); - if (message.subjectTypesSupported != null && message.subjectTypesSupported.length) - for (var i = 0; i < message.subjectTypesSupported.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjectTypesSupported[i]); - if (message.idTokenSigningAlgValuesSupported != null && message.idTokenSigningAlgValuesSupported.length) - for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.idTokenSigningAlgValuesSupported[i]); - if (message.claimsSupported != null && message.claimsSupported.length) - for (var i = 0; i < message.claimsSupported.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.claimsSupported[i]); - if (message.grantTypes != null && message.grantTypes.length) - for (var i = 0; i < message.grantTypes.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.grantTypes[i]); - return writer; - }; - - /** - * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetOpenIDConfigResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1beta1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOpenIDConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetOpenIDConfigResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issuer = reader.string(); - break; - } - case 2: { - message.jwksUri = reader.string(); - break; - } - case 3: { - if (!(message.responseTypesSupported && message.responseTypesSupported.length)) - message.responseTypesSupported = []; - message.responseTypesSupported.push(reader.string()); - break; - } - case 4: { - if (!(message.subjectTypesSupported && message.subjectTypesSupported.length)) - message.subjectTypesSupported = []; - message.subjectTypesSupported.push(reader.string()); - break; - } - case 5: { - if (!(message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length)) - message.idTokenSigningAlgValuesSupported = []; - message.idTokenSigningAlgValuesSupported.push(reader.string()); - break; - } - case 6: { - if (!(message.claimsSupported && message.claimsSupported.length)) - message.claimsSupported = []; - message.claimsSupported.push(reader.string()); - break; - } - case 7: { - if (!(message.grantTypes && message.grantTypes.length)) - message.grantTypes = []; - message.grantTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOpenIDConfigResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOpenIDConfigResponse message. - * @function verify - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOpenIDConfigResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - if (!$util.isString(message.jwksUri)) - return "jwksUri: string expected"; - if (message.responseTypesSupported != null && message.hasOwnProperty("responseTypesSupported")) { - if (!Array.isArray(message.responseTypesSupported)) - return "responseTypesSupported: array expected"; - for (var i = 0; i < message.responseTypesSupported.length; ++i) - if (!$util.isString(message.responseTypesSupported[i])) - return "responseTypesSupported: string[] expected"; - } - if (message.subjectTypesSupported != null && message.hasOwnProperty("subjectTypesSupported")) { - if (!Array.isArray(message.subjectTypesSupported)) - return "subjectTypesSupported: array expected"; - for (var i = 0; i < message.subjectTypesSupported.length; ++i) - if (!$util.isString(message.subjectTypesSupported[i])) - return "subjectTypesSupported: string[] expected"; - } - if (message.idTokenSigningAlgValuesSupported != null && message.hasOwnProperty("idTokenSigningAlgValuesSupported")) { - if (!Array.isArray(message.idTokenSigningAlgValuesSupported)) - return "idTokenSigningAlgValuesSupported: array expected"; - for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) - if (!$util.isString(message.idTokenSigningAlgValuesSupported[i])) - return "idTokenSigningAlgValuesSupported: string[] expected"; - } - if (message.claimsSupported != null && message.hasOwnProperty("claimsSupported")) { - if (!Array.isArray(message.claimsSupported)) - return "claimsSupported: array expected"; - for (var i = 0; i < message.claimsSupported.length; ++i) - if (!$util.isString(message.claimsSupported[i])) - return "claimsSupported: string[] expected"; - } - if (message.grantTypes != null && message.hasOwnProperty("grantTypes")) { - if (!Array.isArray(message.grantTypes)) - return "grantTypes: array expected"; - for (var i = 0; i < message.grantTypes.length; ++i) - if (!$util.isString(message.grantTypes[i])) - return "grantTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetOpenIDConfigResponse} GetOpenIDConfigResponse - */ - GetOpenIDConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetOpenIDConfigResponse) - return object; - var message = new $root.google.container.v1beta1.GetOpenIDConfigResponse(); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.jwksUri != null) - message.jwksUri = String(object.jwksUri); - if (object.responseTypesSupported) { - if (!Array.isArray(object.responseTypesSupported)) - throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.responseTypesSupported: array expected"); - message.responseTypesSupported = []; - for (var i = 0; i < object.responseTypesSupported.length; ++i) - message.responseTypesSupported[i] = String(object.responseTypesSupported[i]); - } - if (object.subjectTypesSupported) { - if (!Array.isArray(object.subjectTypesSupported)) - throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.subjectTypesSupported: array expected"); - message.subjectTypesSupported = []; - for (var i = 0; i < object.subjectTypesSupported.length; ++i) - message.subjectTypesSupported[i] = String(object.subjectTypesSupported[i]); - } - if (object.idTokenSigningAlgValuesSupported) { - if (!Array.isArray(object.idTokenSigningAlgValuesSupported)) - throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.idTokenSigningAlgValuesSupported: array expected"); - message.idTokenSigningAlgValuesSupported = []; - for (var i = 0; i < object.idTokenSigningAlgValuesSupported.length; ++i) - message.idTokenSigningAlgValuesSupported[i] = String(object.idTokenSigningAlgValuesSupported[i]); - } - if (object.claimsSupported) { - if (!Array.isArray(object.claimsSupported)) - throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.claimsSupported: array expected"); - message.claimsSupported = []; - for (var i = 0; i < object.claimsSupported.length; ++i) - message.claimsSupported[i] = String(object.claimsSupported[i]); - } - if (object.grantTypes) { - if (!Array.isArray(object.grantTypes)) - throw TypeError(".google.container.v1beta1.GetOpenIDConfigResponse.grantTypes: array expected"); - message.grantTypes = []; - for (var i = 0; i < object.grantTypes.length; ++i) - message.grantTypes[i] = String(object.grantTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {google.container.v1beta1.GetOpenIDConfigResponse} message GetOpenIDConfigResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOpenIDConfigResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.responseTypesSupported = []; - object.subjectTypesSupported = []; - object.idTokenSigningAlgValuesSupported = []; - object.claimsSupported = []; - object.grantTypes = []; - } - if (options.defaults) { - object.issuer = ""; - object.jwksUri = ""; - } - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - object.jwksUri = message.jwksUri; - if (message.responseTypesSupported && message.responseTypesSupported.length) { - object.responseTypesSupported = []; - for (var j = 0; j < message.responseTypesSupported.length; ++j) - object.responseTypesSupported[j] = message.responseTypesSupported[j]; - } - if (message.subjectTypesSupported && message.subjectTypesSupported.length) { - object.subjectTypesSupported = []; - for (var j = 0; j < message.subjectTypesSupported.length; ++j) - object.subjectTypesSupported[j] = message.subjectTypesSupported[j]; - } - if (message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length) { - object.idTokenSigningAlgValuesSupported = []; - for (var j = 0; j < message.idTokenSigningAlgValuesSupported.length; ++j) - object.idTokenSigningAlgValuesSupported[j] = message.idTokenSigningAlgValuesSupported[j]; - } - if (message.claimsSupported && message.claimsSupported.length) { - object.claimsSupported = []; - for (var j = 0; j < message.claimsSupported.length; ++j) - object.claimsSupported[j] = message.claimsSupported[j]; - } - if (message.grantTypes && message.grantTypes.length) { - object.grantTypes = []; - for (var j = 0; j < message.grantTypes.length; ++j) - object.grantTypes[j] = message.grantTypes[j]; - } - return object; - }; - - /** - * Converts this GetOpenIDConfigResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @instance - * @returns {Object.} JSON object - */ - GetOpenIDConfigResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOpenIDConfigResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.GetOpenIDConfigResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOpenIDConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetOpenIDConfigResponse"; - }; - - return GetOpenIDConfigResponse; - })(); - - v1beta1.GetJSONWebKeysRequest = (function() { - - /** - * Properties of a GetJSONWebKeysRequest. - * @memberof google.container.v1beta1 - * @interface IGetJSONWebKeysRequest - * @property {string|null} [parent] GetJSONWebKeysRequest parent - */ - - /** - * Constructs a new GetJSONWebKeysRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetJSONWebKeysRequest. - * @implements IGetJSONWebKeysRequest - * @constructor - * @param {google.container.v1beta1.IGetJSONWebKeysRequest=} [properties] Properties to set - */ - function GetJSONWebKeysRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJSONWebKeysRequest parent. - * @member {string} parent - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @instance - */ - GetJSONWebKeysRequest.prototype.parent = ""; - - /** - * Creates a new GetJSONWebKeysRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest instance - */ - GetJSONWebKeysRequest.create = function create(properties) { - return new GetJSONWebKeysRequest(properties); - }; - - /** - * Encodes the specified GetJSONWebKeysRequest message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysRequest.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); - return writer; - }; - - /** - * Encodes the specified GetJSONWebKeysRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} message GetJSONWebKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetJSONWebKeysRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetJSONWebKeysRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJSONWebKeysRequest message. - * @function verify - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJSONWebKeysRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - return null; - }; - - /** - * Creates a GetJSONWebKeysRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetJSONWebKeysRequest} GetJSONWebKeysRequest - */ - GetJSONWebKeysRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetJSONWebKeysRequest) - return object; - var message = new $root.google.container.v1beta1.GetJSONWebKeysRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from a GetJSONWebKeysRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {google.container.v1beta1.GetJSONWebKeysRequest} message GetJSONWebKeysRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJSONWebKeysRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this GetJSONWebKeysRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @instance - * @returns {Object.} JSON object - */ - GetJSONWebKeysRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetJSONWebKeysRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.GetJSONWebKeysRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetJSONWebKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetJSONWebKeysRequest"; - }; - - return GetJSONWebKeysRequest; - })(); - - v1beta1.Jwk = (function() { - - /** - * Properties of a Jwk. - * @memberof google.container.v1beta1 - * @interface IJwk - * @property {string|null} [kty] Jwk kty - * @property {string|null} [alg] Jwk alg - * @property {string|null} [use] Jwk use - * @property {string|null} [kid] Jwk kid - * @property {string|null} [n] Jwk n - * @property {string|null} [e] Jwk e - * @property {string|null} [x] Jwk x - * @property {string|null} [y] Jwk y - * @property {string|null} [crv] Jwk crv - */ - - /** - * Constructs a new Jwk. - * @memberof google.container.v1beta1 - * @classdesc Represents a Jwk. - * @implements IJwk - * @constructor - * @param {google.container.v1beta1.IJwk=} [properties] Properties to set - */ - function Jwk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Jwk kty. - * @member {string} kty - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.kty = ""; - - /** - * Jwk alg. - * @member {string} alg - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.alg = ""; - - /** - * Jwk use. - * @member {string} use - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.use = ""; - - /** - * Jwk kid. - * @member {string} kid - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.kid = ""; - - /** - * Jwk n. - * @member {string} n - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.n = ""; - - /** - * Jwk e. - * @member {string} e - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.e = ""; - - /** - * Jwk x. - * @member {string} x - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.x = ""; - - /** - * Jwk y. - * @member {string} y - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.y = ""; - - /** - * Jwk crv. - * @member {string} crv - * @memberof google.container.v1beta1.Jwk - * @instance - */ - Jwk.prototype.crv = ""; - - /** - * Creates a new Jwk instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Jwk - * @static - * @param {google.container.v1beta1.IJwk=} [properties] Properties to set - * @returns {google.container.v1beta1.Jwk} Jwk instance - */ - Jwk.create = function create(properties) { - return new Jwk(properties); - }; - - /** - * Encodes the specified Jwk message. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Jwk - * @static - * @param {google.container.v1beta1.IJwk} message Jwk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Jwk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kty != null && Object.hasOwnProperty.call(message, "kty")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kty); - if (message.alg != null && Object.hasOwnProperty.call(message, "alg")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.alg); - if (message.use != null && Object.hasOwnProperty.call(message, "use")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.use); - if (message.kid != null && Object.hasOwnProperty.call(message, "kid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kid); - if (message.n != null && Object.hasOwnProperty.call(message, "n")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.n); - if (message.e != null && Object.hasOwnProperty.call(message, "e")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.e); - if (message.x != null && Object.hasOwnProperty.call(message, "x")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.x); - if (message.y != null && Object.hasOwnProperty.call(message, "y")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.y); - if (message.crv != null && Object.hasOwnProperty.call(message, "crv")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.crv); - return writer; - }; - - /** - * Encodes the specified Jwk message, length delimited. Does not implicitly {@link google.container.v1beta1.Jwk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Jwk - * @static - * @param {google.container.v1beta1.IJwk} message Jwk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Jwk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Jwk message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Jwk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Jwk} Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Jwk.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Jwk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kty = reader.string(); - break; - } - case 2: { - message.alg = reader.string(); - break; - } - case 3: { - message.use = reader.string(); - break; - } - case 4: { - message.kid = reader.string(); - break; - } - case 5: { - message.n = reader.string(); - break; - } - case 6: { - message.e = reader.string(); - break; - } - case 7: { - message.x = reader.string(); - break; - } - case 8: { - message.y = reader.string(); - break; - } - case 9: { - message.crv = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Jwk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Jwk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Jwk} Jwk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Jwk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Jwk message. - * @function verify - * @memberof google.container.v1beta1.Jwk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Jwk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kty != null && message.hasOwnProperty("kty")) - if (!$util.isString(message.kty)) - return "kty: string expected"; - if (message.alg != null && message.hasOwnProperty("alg")) - if (!$util.isString(message.alg)) - return "alg: string expected"; - if (message.use != null && message.hasOwnProperty("use")) - if (!$util.isString(message.use)) - return "use: string expected"; - if (message.kid != null && message.hasOwnProperty("kid")) - if (!$util.isString(message.kid)) - return "kid: string expected"; - if (message.n != null && message.hasOwnProperty("n")) - if (!$util.isString(message.n)) - return "n: string expected"; - if (message.e != null && message.hasOwnProperty("e")) - if (!$util.isString(message.e)) - return "e: string expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (!$util.isString(message.x)) - return "x: string expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (!$util.isString(message.y)) - return "y: string expected"; - if (message.crv != null && message.hasOwnProperty("crv")) - if (!$util.isString(message.crv)) - return "crv: string expected"; - return null; - }; - - /** - * Creates a Jwk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Jwk - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Jwk} Jwk - */ - Jwk.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Jwk) - return object; - var message = new $root.google.container.v1beta1.Jwk(); - if (object.kty != null) - message.kty = String(object.kty); - if (object.alg != null) - message.alg = String(object.alg); - if (object.use != null) - message.use = String(object.use); - if (object.kid != null) - message.kid = String(object.kid); - if (object.n != null) - message.n = String(object.n); - if (object.e != null) - message.e = String(object.e); - if (object.x != null) - message.x = String(object.x); - if (object.y != null) - message.y = String(object.y); - if (object.crv != null) - message.crv = String(object.crv); - return message; - }; - - /** - * Creates a plain object from a Jwk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Jwk - * @static - * @param {google.container.v1beta1.Jwk} message Jwk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Jwk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kty = ""; - object.alg = ""; - object.use = ""; - object.kid = ""; - object.n = ""; - object.e = ""; - object.x = ""; - object.y = ""; - object.crv = ""; - } - if (message.kty != null && message.hasOwnProperty("kty")) - object.kty = message.kty; - if (message.alg != null && message.hasOwnProperty("alg")) - object.alg = message.alg; - if (message.use != null && message.hasOwnProperty("use")) - object.use = message.use; - if (message.kid != null && message.hasOwnProperty("kid")) - object.kid = message.kid; - if (message.n != null && message.hasOwnProperty("n")) - object.n = message.n; - if (message.e != null && message.hasOwnProperty("e")) - object.e = message.e; - if (message.x != null && message.hasOwnProperty("x")) - object.x = message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = message.y; - if (message.crv != null && message.hasOwnProperty("crv")) - object.crv = message.crv; - return object; - }; - - /** - * Converts this Jwk to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Jwk - * @instance - * @returns {Object.} JSON object - */ - Jwk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Jwk - * @function getTypeUrl - * @memberof google.container.v1beta1.Jwk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Jwk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Jwk"; - }; - - return Jwk; - })(); - - v1beta1.GetJSONWebKeysResponse = (function() { - - /** - * Properties of a GetJSONWebKeysResponse. - * @memberof google.container.v1beta1 - * @interface IGetJSONWebKeysResponse - * @property {Array.|null} [keys] GetJSONWebKeysResponse keys - */ - - /** - * Constructs a new GetJSONWebKeysResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a GetJSONWebKeysResponse. - * @implements IGetJSONWebKeysResponse - * @constructor - * @param {google.container.v1beta1.IGetJSONWebKeysResponse=} [properties] Properties to set - */ - function GetJSONWebKeysResponse(properties) { - this.keys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJSONWebKeysResponse keys. - * @member {Array.} keys - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @instance - */ - GetJSONWebKeysResponse.prototype.keys = $util.emptyArray; - - /** - * Creates a new GetJSONWebKeysResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse instance - */ - GetJSONWebKeysResponse.create = function create(properties) { - return new GetJSONWebKeysResponse(properties); - }; - - /** - * Encodes the specified GetJSONWebKeysResponse message. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.google.container.v1beta1.Jwk.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetJSONWebKeysResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.GetJSONWebKeysResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1beta1.IGetJSONWebKeysResponse} message GetJSONWebKeysResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJSONWebKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GetJSONWebKeysResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.google.container.v1beta1.Jwk.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetJSONWebKeysResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJSONWebKeysResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJSONWebKeysResponse message. - * @function verify - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJSONWebKeysResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.google.container.v1beta1.Jwk.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - return null; - }; - - /** - * Creates a GetJSONWebKeysResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.GetJSONWebKeysResponse} GetJSONWebKeysResponse - */ - GetJSONWebKeysResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.GetJSONWebKeysResponse) - return object; - var message = new $root.google.container.v1beta1.GetJSONWebKeysResponse(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".google.container.v1beta1.GetJSONWebKeysResponse.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".google.container.v1beta1.GetJSONWebKeysResponse.keys: object expected"); - message.keys[i] = $root.google.container.v1beta1.Jwk.fromObject(object.keys[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetJSONWebKeysResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {google.container.v1beta1.GetJSONWebKeysResponse} message GetJSONWebKeysResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJSONWebKeysResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.google.container.v1beta1.Jwk.toObject(message.keys[j], options); - } - return object; - }; - - /** - * Converts this GetJSONWebKeysResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @instance - * @returns {Object.} JSON object - */ - GetJSONWebKeysResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetJSONWebKeysResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.GetJSONWebKeysResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetJSONWebKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.GetJSONWebKeysResponse"; - }; - - return GetJSONWebKeysResponse; - })(); - - v1beta1.CheckAutopilotCompatibilityRequest = (function() { - - /** - * Properties of a CheckAutopilotCompatibilityRequest. - * @memberof google.container.v1beta1 - * @interface ICheckAutopilotCompatibilityRequest - * @property {string|null} [name] CheckAutopilotCompatibilityRequest name - */ - - /** - * Constructs a new CheckAutopilotCompatibilityRequest. - * @memberof google.container.v1beta1 - * @classdesc Represents a CheckAutopilotCompatibilityRequest. - * @implements ICheckAutopilotCompatibilityRequest - * @constructor - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set - */ - function CheckAutopilotCompatibilityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckAutopilotCompatibilityRequest name. - * @member {string} name - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @instance - */ - CheckAutopilotCompatibilityRequest.prototype.name = ""; - - /** - * Creates a new CheckAutopilotCompatibilityRequest instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest=} [properties] Properties to set - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest instance - */ - CheckAutopilotCompatibilityRequest.create = function create(properties) { - return new CheckAutopilotCompatibilityRequest(properties); - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityRequest message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckAutopilotCompatibilityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest(); - 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 CheckAutopilotCompatibilityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckAutopilotCompatibilityRequest message. - * @function verify - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityRequest} CheckAutopilotCompatibilityRequest - */ - CheckAutopilotCompatibilityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest) - return object; - var message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {google.container.v1beta1.CheckAutopilotCompatibilityRequest} message CheckAutopilotCompatibilityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckAutopilotCompatibilityRequest.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 CheckAutopilotCompatibilityRequest to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @instance - * @returns {Object.} JSON object - */ - CheckAutopilotCompatibilityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityRequest - * @function getTypeUrl - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckAutopilotCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CheckAutopilotCompatibilityRequest"; - }; - - return CheckAutopilotCompatibilityRequest; - })(); - - v1beta1.AutopilotCompatibilityIssue = (function() { - - /** - * Properties of an AutopilotCompatibilityIssue. - * @memberof google.container.v1beta1 - * @interface IAutopilotCompatibilityIssue - * @property {google.protobuf.ITimestamp|null} [lastObservation] AutopilotCompatibilityIssue lastObservation - * @property {string|null} [constraintType] AutopilotCompatibilityIssue constraintType - * @property {google.container.v1beta1.AutopilotCompatibilityIssue.IssueType|null} [incompatibilityType] AutopilotCompatibilityIssue incompatibilityType - * @property {Array.|null} [subjects] AutopilotCompatibilityIssue subjects - * @property {string|null} [documentationUrl] AutopilotCompatibilityIssue documentationUrl - * @property {string|null} [description] AutopilotCompatibilityIssue description - */ - - /** - * Constructs a new AutopilotCompatibilityIssue. - * @memberof google.container.v1beta1 - * @classdesc Represents an AutopilotCompatibilityIssue. - * @implements IAutopilotCompatibilityIssue - * @constructor - * @param {google.container.v1beta1.IAutopilotCompatibilityIssue=} [properties] Properties to set - */ - function AutopilotCompatibilityIssue(properties) { - this.subjects = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutopilotCompatibilityIssue lastObservation. - * @member {google.protobuf.ITimestamp|null|undefined} lastObservation - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.lastObservation = null; - - /** - * AutopilotCompatibilityIssue constraintType. - * @member {string} constraintType - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.constraintType = ""; - - /** - * AutopilotCompatibilityIssue incompatibilityType. - * @member {google.container.v1beta1.AutopilotCompatibilityIssue.IssueType} incompatibilityType - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.incompatibilityType = 0; - - /** - * AutopilotCompatibilityIssue subjects. - * @member {Array.} subjects - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.subjects = $util.emptyArray; - - /** - * AutopilotCompatibilityIssue documentationUrl. - * @member {string} documentationUrl - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.documentationUrl = ""; - - /** - * AutopilotCompatibilityIssue description. - * @member {string} description - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - */ - AutopilotCompatibilityIssue.prototype.description = ""; - - /** - * Creates a new AutopilotCompatibilityIssue instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1beta1.IAutopilotCompatibilityIssue=} [properties] Properties to set - * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue instance - */ - AutopilotCompatibilityIssue.create = function create(properties) { - return new AutopilotCompatibilityIssue(properties); - }; - - /** - * Encodes the specified AutopilotCompatibilityIssue message. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1beta1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotCompatibilityIssue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastObservation != null && Object.hasOwnProperty.call(message, "lastObservation")) - $root.google.protobuf.Timestamp.encode(message.lastObservation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.constraintType); - if (message.incompatibilityType != null && Object.hasOwnProperty.call(message, "incompatibilityType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.incompatibilityType); - if (message.subjects != null && message.subjects.length) - for (var i = 0; i < message.subjects.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjects[i]); - if (message.documentationUrl != null && Object.hasOwnProperty.call(message, "documentationUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.documentationUrl); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - return writer; - }; - - /** - * Encodes the specified AutopilotCompatibilityIssue message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotCompatibilityIssue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1beta1.IAutopilotCompatibilityIssue} message AutopilotCompatibilityIssue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotCompatibilityIssue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotCompatibilityIssue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutopilotCompatibilityIssue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastObservation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.constraintType = reader.string(); - break; - } - case 3: { - message.incompatibilityType = reader.int32(); - break; - } - case 4: { - if (!(message.subjects && message.subjects.length)) - message.subjects = []; - message.subjects.push(reader.string()); - break; - } - case 5: { - message.documentationUrl = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutopilotCompatibilityIssue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotCompatibilityIssue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutopilotCompatibilityIssue message. - * @function verify - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutopilotCompatibilityIssue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastObservation); - if (error) - return "lastObservation." + error; - } - if (message.constraintType != null && message.hasOwnProperty("constraintType")) - if (!$util.isString(message.constraintType)) - return "constraintType: string expected"; - if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) - switch (message.incompatibilityType) { - default: - return "incompatibilityType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.subjects != null && message.hasOwnProperty("subjects")) { - if (!Array.isArray(message.subjects)) - return "subjects: array expected"; - for (var i = 0; i < message.subjects.length; ++i) - if (!$util.isString(message.subjects[i])) - return "subjects: string[] expected"; - } - if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) - if (!$util.isString(message.documentationUrl)) - return "documentationUrl: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AutopilotCompatibilityIssue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AutopilotCompatibilityIssue} AutopilotCompatibilityIssue - */ - AutopilotCompatibilityIssue.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AutopilotCompatibilityIssue) - return object; - var message = new $root.google.container.v1beta1.AutopilotCompatibilityIssue(); - if (object.lastObservation != null) { - if (typeof object.lastObservation !== "object") - throw TypeError(".google.container.v1beta1.AutopilotCompatibilityIssue.lastObservation: object expected"); - message.lastObservation = $root.google.protobuf.Timestamp.fromObject(object.lastObservation); - } - if (object.constraintType != null) - message.constraintType = String(object.constraintType); - switch (object.incompatibilityType) { - default: - if (typeof object.incompatibilityType === "number") { - message.incompatibilityType = object.incompatibilityType; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.incompatibilityType = 0; - break; - case "INCOMPATIBILITY": - case 1: - message.incompatibilityType = 1; - break; - case "ADDITIONAL_CONFIG_REQUIRED": - case 2: - message.incompatibilityType = 2; - break; - case "PASSED_WITH_OPTIONAL_CONFIG": - case 3: - message.incompatibilityType = 3; - break; - } - if (object.subjects) { - if (!Array.isArray(object.subjects)) - throw TypeError(".google.container.v1beta1.AutopilotCompatibilityIssue.subjects: array expected"); - message.subjects = []; - for (var i = 0; i < object.subjects.length; ++i) - message.subjects[i] = String(object.subjects[i]); - } - if (object.documentationUrl != null) - message.documentationUrl = String(object.documentationUrl); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AutopilotCompatibilityIssue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {google.container.v1beta1.AutopilotCompatibilityIssue} message AutopilotCompatibilityIssue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutopilotCompatibilityIssue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subjects = []; - if (options.defaults) { - object.lastObservation = null; - object.constraintType = ""; - object.incompatibilityType = options.enums === String ? "UNSPECIFIED" : 0; - object.documentationUrl = ""; - object.description = ""; - } - if (message.lastObservation != null && message.hasOwnProperty("lastObservation")) - object.lastObservation = $root.google.protobuf.Timestamp.toObject(message.lastObservation, options); - if (message.constraintType != null && message.hasOwnProperty("constraintType")) - object.constraintType = message.constraintType; - if (message.incompatibilityType != null && message.hasOwnProperty("incompatibilityType")) - object.incompatibilityType = options.enums === String ? $root.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] === undefined ? message.incompatibilityType : $root.google.container.v1beta1.AutopilotCompatibilityIssue.IssueType[message.incompatibilityType] : message.incompatibilityType; - if (message.subjects && message.subjects.length) { - object.subjects = []; - for (var j = 0; j < message.subjects.length; ++j) - object.subjects[j] = message.subjects[j]; - } - if (message.documentationUrl != null && message.hasOwnProperty("documentationUrl")) - object.documentationUrl = message.documentationUrl; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AutopilotCompatibilityIssue to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @instance - * @returns {Object.} JSON object - */ - AutopilotCompatibilityIssue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutopilotCompatibilityIssue - * @function getTypeUrl - * @memberof google.container.v1beta1.AutopilotCompatibilityIssue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutopilotCompatibilityIssue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AutopilotCompatibilityIssue"; - }; - - /** - * IssueType enum. - * @name google.container.v1beta1.AutopilotCompatibilityIssue.IssueType - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} INCOMPATIBILITY=1 INCOMPATIBILITY value - * @property {number} ADDITIONAL_CONFIG_REQUIRED=2 ADDITIONAL_CONFIG_REQUIRED value - * @property {number} PASSED_WITH_OPTIONAL_CONFIG=3 PASSED_WITH_OPTIONAL_CONFIG value - */ - AutopilotCompatibilityIssue.IssueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "INCOMPATIBILITY"] = 1; - values[valuesById[2] = "ADDITIONAL_CONFIG_REQUIRED"] = 2; - values[valuesById[3] = "PASSED_WITH_OPTIONAL_CONFIG"] = 3; - return values; - })(); - - return AutopilotCompatibilityIssue; - })(); - - v1beta1.CheckAutopilotCompatibilityResponse = (function() { - - /** - * Properties of a CheckAutopilotCompatibilityResponse. - * @memberof google.container.v1beta1 - * @interface ICheckAutopilotCompatibilityResponse - * @property {Array.|null} [issues] CheckAutopilotCompatibilityResponse issues - * @property {string|null} [summary] CheckAutopilotCompatibilityResponse summary - */ - - /** - * Constructs a new CheckAutopilotCompatibilityResponse. - * @memberof google.container.v1beta1 - * @classdesc Represents a CheckAutopilotCompatibilityResponse. - * @implements ICheckAutopilotCompatibilityResponse - * @constructor - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set - */ - function CheckAutopilotCompatibilityResponse(properties) { - this.issues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckAutopilotCompatibilityResponse issues. - * @member {Array.} issues - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @instance - */ - CheckAutopilotCompatibilityResponse.prototype.issues = $util.emptyArray; - - /** - * CheckAutopilotCompatibilityResponse summary. - * @member {string} summary - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @instance - */ - CheckAutopilotCompatibilityResponse.prototype.summary = ""; - - /** - * Creates a new CheckAutopilotCompatibilityResponse instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse=} [properties] Properties to set - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse instance - */ - CheckAutopilotCompatibilityResponse.create = function create(properties) { - return new CheckAutopilotCompatibilityResponse(properties); - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issues != null && message.issues.length) - for (var i = 0; i < message.issues.length; ++i) - $root.google.container.v1beta1.AutopilotCompatibilityIssue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); - return writer; - }; - - /** - * Encodes the specified CheckAutopilotCompatibilityResponse message, length delimited. Does not implicitly {@link google.container.v1beta1.CheckAutopilotCompatibilityResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1beta1.ICheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckAutopilotCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.issues && message.issues.length)) - message.issues = []; - message.issues.push($root.google.container.v1beta1.AutopilotCompatibilityIssue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.summary = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckAutopilotCompatibilityResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckAutopilotCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckAutopilotCompatibilityResponse message. - * @function verify - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckAutopilotCompatibilityResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issues != null && message.hasOwnProperty("issues")) { - if (!Array.isArray(message.issues)) - return "issues: array expected"; - for (var i = 0; i < message.issues.length; ++i) { - var error = $root.google.container.v1beta1.AutopilotCompatibilityIssue.verify(message.issues[i]); - if (error) - return "issues." + error; - } - } - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - return null; - }; - - /** - * Creates a CheckAutopilotCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CheckAutopilotCompatibilityResponse} CheckAutopilotCompatibilityResponse - */ - CheckAutopilotCompatibilityResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse) - return object; - var message = new $root.google.container.v1beta1.CheckAutopilotCompatibilityResponse(); - if (object.issues) { - if (!Array.isArray(object.issues)) - throw TypeError(".google.container.v1beta1.CheckAutopilotCompatibilityResponse.issues: array expected"); - message.issues = []; - for (var i = 0; i < object.issues.length; ++i) { - if (typeof object.issues[i] !== "object") - throw TypeError(".google.container.v1beta1.CheckAutopilotCompatibilityResponse.issues: object expected"); - message.issues[i] = $root.google.container.v1beta1.AutopilotCompatibilityIssue.fromObject(object.issues[i]); - } - } - if (object.summary != null) - message.summary = String(object.summary); - return message; - }; - - /** - * Creates a plain object from a CheckAutopilotCompatibilityResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {google.container.v1beta1.CheckAutopilotCompatibilityResponse} message CheckAutopilotCompatibilityResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckAutopilotCompatibilityResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.issues = []; - if (options.defaults) - object.summary = ""; - if (message.issues && message.issues.length) { - object.issues = []; - for (var j = 0; j < message.issues.length; ++j) - object.issues[j] = $root.google.container.v1beta1.AutopilotCompatibilityIssue.toObject(message.issues[j], options); - } - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - return object; - }; - - /** - * Converts this CheckAutopilotCompatibilityResponse to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @instance - * @returns {Object.} JSON object - */ - CheckAutopilotCompatibilityResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckAutopilotCompatibilityResponse - * @function getTypeUrl - * @memberof google.container.v1beta1.CheckAutopilotCompatibilityResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckAutopilotCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CheckAutopilotCompatibilityResponse"; - }; - - return CheckAutopilotCompatibilityResponse; - })(); - - v1beta1.ReleaseChannel = (function() { - - /** - * Properties of a ReleaseChannel. - * @memberof google.container.v1beta1 - * @interface IReleaseChannel - * @property {google.container.v1beta1.ReleaseChannel.Channel|null} [channel] ReleaseChannel channel - */ - - /** - * Constructs a new ReleaseChannel. - * @memberof google.container.v1beta1 - * @classdesc Represents a ReleaseChannel. - * @implements IReleaseChannel - * @constructor - * @param {google.container.v1beta1.IReleaseChannel=} [properties] Properties to set - */ - function ReleaseChannel(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReleaseChannel channel. - * @member {google.container.v1beta1.ReleaseChannel.Channel} channel - * @memberof google.container.v1beta1.ReleaseChannel - * @instance - */ - ReleaseChannel.prototype.channel = 0; - - /** - * Creates a new ReleaseChannel instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {google.container.v1beta1.IReleaseChannel=} [properties] Properties to set - * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel instance - */ - ReleaseChannel.create = function create(properties) { - return new ReleaseChannel(properties); - }; - - /** - * Encodes the specified ReleaseChannel message. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {google.container.v1beta1.IReleaseChannel} message ReleaseChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channel); - return writer; - }; - - /** - * Encodes the specified ReleaseChannel message, length delimited. Does not implicitly {@link google.container.v1beta1.ReleaseChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {google.container.v1beta1.IReleaseChannel} message ReleaseChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ReleaseChannel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseChannel message. - * @function verify - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - switch (message.channel) { - default: - return "channel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a ReleaseChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ReleaseChannel} ReleaseChannel - */ - ReleaseChannel.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ReleaseChannel) - return object; - var message = new $root.google.container.v1beta1.ReleaseChannel(); - switch (object.channel) { - default: - if (typeof object.channel === "number") { - message.channel = object.channel; - break; - } - break; - case "UNSPECIFIED": - case 0: - message.channel = 0; - break; - case "RAPID": - case 1: - message.channel = 1; - break; - case "REGULAR": - case 2: - message.channel = 2; - break; - case "STABLE": - case 3: - message.channel = 3; - break; - case "EXTENDED": - case 4: - message.channel = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a ReleaseChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {google.container.v1beta1.ReleaseChannel} message ReleaseChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.channel = options.enums === String ? "UNSPECIFIED" : 0; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = options.enums === String ? $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1beta1.ReleaseChannel.Channel[message.channel] : message.channel; - return object; - }; - - /** - * Converts this ReleaseChannel to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ReleaseChannel - * @instance - * @returns {Object.} JSON object - */ - ReleaseChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReleaseChannel - * @function getTypeUrl - * @memberof google.container.v1beta1.ReleaseChannel - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseChannel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ReleaseChannel"; - }; - - /** - * Channel enum. - * @name google.container.v1beta1.ReleaseChannel.Channel - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} RAPID=1 RAPID value - * @property {number} REGULAR=2 REGULAR value - * @property {number} STABLE=3 STABLE value - * @property {number} EXTENDED=4 EXTENDED value - */ - ReleaseChannel.Channel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "RAPID"] = 1; - values[valuesById[2] = "REGULAR"] = 2; - values[valuesById[3] = "STABLE"] = 3; - values[valuesById[4] = "EXTENDED"] = 4; - return values; - })(); - - return ReleaseChannel; - })(); - - v1beta1.CostManagementConfig = (function() { - - /** - * Properties of a CostManagementConfig. - * @memberof google.container.v1beta1 - * @interface ICostManagementConfig - * @property {boolean|null} [enabled] CostManagementConfig enabled - */ - - /** - * Constructs a new CostManagementConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a CostManagementConfig. - * @implements ICostManagementConfig - * @constructor - * @param {google.container.v1beta1.ICostManagementConfig=} [properties] Properties to set - */ - function CostManagementConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CostManagementConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.CostManagementConfig - * @instance - */ - CostManagementConfig.prototype.enabled = false; - - /** - * Creates a new CostManagementConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {google.container.v1beta1.ICostManagementConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig instance - */ - CostManagementConfig.create = function create(properties) { - return new CostManagementConfig(properties); - }; - - /** - * Encodes the specified CostManagementConfig message. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {google.container.v1beta1.ICostManagementConfig} message CostManagementConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CostManagementConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified CostManagementConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.CostManagementConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {google.container.v1beta1.ICostManagementConfig} message CostManagementConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CostManagementConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CostManagementConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.CostManagementConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CostManagementConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CostManagementConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CostManagementConfig message. - * @function verify - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CostManagementConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a CostManagementConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.CostManagementConfig} CostManagementConfig - */ - CostManagementConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.CostManagementConfig) - return object; - var message = new $root.google.container.v1beta1.CostManagementConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a CostManagementConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {google.container.v1beta1.CostManagementConfig} message CostManagementConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CostManagementConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this CostManagementConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.CostManagementConfig - * @instance - * @returns {Object.} JSON object - */ - CostManagementConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CostManagementConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.CostManagementConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CostManagementConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.CostManagementConfig"; - }; - - return CostManagementConfig; - })(); - - v1beta1.TpuConfig = (function() { - - /** - * Properties of a TpuConfig. - * @memberof google.container.v1beta1 - * @interface ITpuConfig - * @property {boolean|null} [enabled] TpuConfig enabled - * @property {boolean|null} [useServiceNetworking] TpuConfig useServiceNetworking - * @property {string|null} [ipv4CidrBlock] TpuConfig ipv4CidrBlock - */ - - /** - * Constructs a new TpuConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a TpuConfig. - * @implements ITpuConfig - * @constructor - * @param {google.container.v1beta1.ITpuConfig=} [properties] Properties to set - */ - function TpuConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TpuConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.TpuConfig - * @instance - */ - TpuConfig.prototype.enabled = false; - - /** - * TpuConfig useServiceNetworking. - * @member {boolean} useServiceNetworking - * @memberof google.container.v1beta1.TpuConfig - * @instance - */ - TpuConfig.prototype.useServiceNetworking = false; - - /** - * TpuConfig ipv4CidrBlock. - * @member {string} ipv4CidrBlock - * @memberof google.container.v1beta1.TpuConfig - * @instance - */ - TpuConfig.prototype.ipv4CidrBlock = ""; - - /** - * Creates a new TpuConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {google.container.v1beta1.ITpuConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.TpuConfig} TpuConfig instance - */ - TpuConfig.create = function create(properties) { - return new TpuConfig(properties); - }; - - /** - * Encodes the specified TpuConfig message. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {google.container.v1beta1.ITpuConfig} message TpuConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TpuConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.useServiceNetworking != null && Object.hasOwnProperty.call(message, "useServiceNetworking")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useServiceNetworking); - if (message.ipv4CidrBlock != null && Object.hasOwnProperty.call(message, "ipv4CidrBlock")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipv4CidrBlock); - return writer; - }; - - /** - * Encodes the specified TpuConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.TpuConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {google.container.v1beta1.ITpuConfig} message TpuConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TpuConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TpuConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.TpuConfig} TpuConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TpuConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.TpuConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.useServiceNetworking = reader.bool(); - break; - } - case 3: { - message.ipv4CidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TpuConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.TpuConfig} TpuConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TpuConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TpuConfig message. - * @function verify - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TpuConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.useServiceNetworking != null && message.hasOwnProperty("useServiceNetworking")) - if (typeof message.useServiceNetworking !== "boolean") - return "useServiceNetworking: boolean expected"; - if (message.ipv4CidrBlock != null && message.hasOwnProperty("ipv4CidrBlock")) - if (!$util.isString(message.ipv4CidrBlock)) - return "ipv4CidrBlock: string expected"; - return null; - }; - - /** - * Creates a TpuConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.TpuConfig} TpuConfig - */ - TpuConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.TpuConfig) - return object; - var message = new $root.google.container.v1beta1.TpuConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.useServiceNetworking != null) - message.useServiceNetworking = Boolean(object.useServiceNetworking); - if (object.ipv4CidrBlock != null) - message.ipv4CidrBlock = String(object.ipv4CidrBlock); - return message; - }; - - /** - * Creates a plain object from a TpuConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {google.container.v1beta1.TpuConfig} message TpuConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TpuConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.useServiceNetworking = false; - object.ipv4CidrBlock = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.useServiceNetworking != null && message.hasOwnProperty("useServiceNetworking")) - object.useServiceNetworking = message.useServiceNetworking; - if (message.ipv4CidrBlock != null && message.hasOwnProperty("ipv4CidrBlock")) - object.ipv4CidrBlock = message.ipv4CidrBlock; - return object; - }; - - /** - * Converts this TpuConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.TpuConfig - * @instance - * @returns {Object.} JSON object - */ - TpuConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TpuConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.TpuConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TpuConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.TpuConfig"; - }; - - return TpuConfig; - })(); - - /** - * PrivateIPv6GoogleAccess enum. - * @name google.container.v1beta1.PrivateIPv6GoogleAccess - * @enum {number} - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED=1 PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE=2 PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE value - * @property {number} PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL=3 PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL value - */ - v1beta1.PrivateIPv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED"] = 1; - values[valuesById[2] = "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL"] = 3; - return values; - })(); - - v1beta1.Master = (function() { - - /** - * Properties of a Master. - * @memberof google.container.v1beta1 - * @interface IMaster - */ - - /** - * Constructs a new Master. - * @memberof google.container.v1beta1 - * @classdesc Represents a Master. - * @implements IMaster - * @constructor - * @param {google.container.v1beta1.IMaster=} [properties] Properties to set - */ - function Master(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Master instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Master - * @static - * @param {google.container.v1beta1.IMaster=} [properties] Properties to set - * @returns {google.container.v1beta1.Master} Master instance - */ - Master.create = function create(properties) { - return new Master(properties); - }; - - /** - * Encodes the specified Master message. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Master - * @static - * @param {google.container.v1beta1.IMaster} message Master message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Master.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Master message, length delimited. Does not implicitly {@link google.container.v1beta1.Master.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Master - * @static - * @param {google.container.v1beta1.IMaster} message Master message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Master.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Master message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Master - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Master} Master - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Master.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Master(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Master message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Master - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Master} Master - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Master.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Master message. - * @function verify - * @memberof google.container.v1beta1.Master - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Master.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a Master message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Master - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Master} Master - */ - Master.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Master) - return object; - return new $root.google.container.v1beta1.Master(); - }; - - /** - * Creates a plain object from a Master message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Master - * @static - * @param {google.container.v1beta1.Master} message Master - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Master.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Master to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Master - * @instance - * @returns {Object.} JSON object - */ - Master.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Master - * @function getTypeUrl - * @memberof google.container.v1beta1.Master - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Master.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Master"; - }; - - return Master; - })(); - - v1beta1.AutopilotConversionStatus = (function() { - - /** - * Properties of an AutopilotConversionStatus. - * @memberof google.container.v1beta1 - * @interface IAutopilotConversionStatus - * @property {google.container.v1beta1.AutopilotConversionStatus.State|null} [state] AutopilotConversionStatus state - */ - - /** - * Constructs a new AutopilotConversionStatus. - * @memberof google.container.v1beta1 - * @classdesc Represents an AutopilotConversionStatus. - * @implements IAutopilotConversionStatus - * @constructor - * @param {google.container.v1beta1.IAutopilotConversionStatus=} [properties] Properties to set - */ - function AutopilotConversionStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutopilotConversionStatus state. - * @member {google.container.v1beta1.AutopilotConversionStatus.State} state - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @instance - */ - AutopilotConversionStatus.prototype.state = 0; - - /** - * Creates a new AutopilotConversionStatus instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {google.container.v1beta1.IAutopilotConversionStatus=} [properties] Properties to set - * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus instance - */ - AutopilotConversionStatus.create = function create(properties) { - return new AutopilotConversionStatus(properties); - }; - - /** - * Encodes the specified AutopilotConversionStatus message. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {google.container.v1beta1.IAutopilotConversionStatus} message AutopilotConversionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotConversionStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - return writer; - }; - - /** - * Encodes the specified AutopilotConversionStatus message, length delimited. Does not implicitly {@link google.container.v1beta1.AutopilotConversionStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {google.container.v1beta1.IAutopilotConversionStatus} message AutopilotConversionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutopilotConversionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutopilotConversionStatus message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotConversionStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AutopilotConversionStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutopilotConversionStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutopilotConversionStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutopilotConversionStatus message. - * @function verify - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutopilotConversionStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 5: - break; - } - return null; - }; - - /** - * Creates an AutopilotConversionStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AutopilotConversionStatus} AutopilotConversionStatus - */ - AutopilotConversionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AutopilotConversionStatus) - return object; - var message = new $root.google.container.v1beta1.AutopilotConversionStatus(); - 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 "DONE": - case 5: - message.state = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from an AutopilotConversionStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {google.container.v1beta1.AutopilotConversionStatus} message AutopilotConversionStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutopilotConversionStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.container.v1beta1.AutopilotConversionStatus.State[message.state] === undefined ? message.state : $root.google.container.v1beta1.AutopilotConversionStatus.State[message.state] : message.state; - return object; - }; - - /** - * Converts this AutopilotConversionStatus to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @instance - * @returns {Object.} JSON object - */ - AutopilotConversionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutopilotConversionStatus - * @function getTypeUrl - * @memberof google.container.v1beta1.AutopilotConversionStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutopilotConversionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AutopilotConversionStatus"; - }; - - /** - * State enum. - * @name google.container.v1beta1.AutopilotConversionStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DONE=5 DONE value - */ - AutopilotConversionStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[5] = "DONE"] = 5; - return values; - })(); - - return AutopilotConversionStatus; - })(); - - v1beta1.Autopilot = (function() { - - /** - * Properties of an Autopilot. - * @memberof google.container.v1beta1 - * @interface IAutopilot - * @property {boolean|null} [enabled] Autopilot enabled - * @property {google.container.v1beta1.IWorkloadPolicyConfig|null} [workloadPolicyConfig] Autopilot workloadPolicyConfig - * @property {google.container.v1beta1.IAutopilotConversionStatus|null} [conversionStatus] Autopilot conversionStatus - */ - - /** - * Constructs a new Autopilot. - * @memberof google.container.v1beta1 - * @classdesc Represents an Autopilot. - * @implements IAutopilot - * @constructor - * @param {google.container.v1beta1.IAutopilot=} [properties] Properties to set - */ - function Autopilot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Autopilot enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.Autopilot - * @instance - */ - Autopilot.prototype.enabled = false; - - /** - * Autopilot workloadPolicyConfig. - * @member {google.container.v1beta1.IWorkloadPolicyConfig|null|undefined} workloadPolicyConfig - * @memberof google.container.v1beta1.Autopilot - * @instance - */ - Autopilot.prototype.workloadPolicyConfig = null; - - /** - * Autopilot conversionStatus. - * @member {google.container.v1beta1.IAutopilotConversionStatus|null|undefined} conversionStatus - * @memberof google.container.v1beta1.Autopilot - * @instance - */ - Autopilot.prototype.conversionStatus = null; - - /** - * Creates a new Autopilot instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {google.container.v1beta1.IAutopilot=} [properties] Properties to set - * @returns {google.container.v1beta1.Autopilot} Autopilot instance - */ - Autopilot.create = function create(properties) { - return new Autopilot(properties); - }; - - /** - * Encodes the specified Autopilot message. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {google.container.v1beta1.IAutopilot} message Autopilot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Autopilot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.workloadPolicyConfig != null && Object.hasOwnProperty.call(message, "workloadPolicyConfig")) - $root.google.container.v1beta1.WorkloadPolicyConfig.encode(message.workloadPolicyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.conversionStatus != null && Object.hasOwnProperty.call(message, "conversionStatus")) - $root.google.container.v1beta1.AutopilotConversionStatus.encode(message.conversionStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Autopilot message, length delimited. Does not implicitly {@link google.container.v1beta1.Autopilot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {google.container.v1beta1.IAutopilot} message Autopilot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Autopilot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Autopilot message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Autopilot} Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Autopilot.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Autopilot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Autopilot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Autopilot} Autopilot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Autopilot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Autopilot message. - * @function verify - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Autopilot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) { - var error = $root.google.container.v1beta1.WorkloadPolicyConfig.verify(message.workloadPolicyConfig); - if (error) - return "workloadPolicyConfig." + error; - } - if (message.conversionStatus != null && message.hasOwnProperty("conversionStatus")) { - var error = $root.google.container.v1beta1.AutopilotConversionStatus.verify(message.conversionStatus); - if (error) - return "conversionStatus." + error; - } - return null; - }; - - /** - * Creates an Autopilot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Autopilot} Autopilot - */ - Autopilot.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Autopilot) - return object; - var message = new $root.google.container.v1beta1.Autopilot(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.workloadPolicyConfig != null) { - if (typeof object.workloadPolicyConfig !== "object") - throw TypeError(".google.container.v1beta1.Autopilot.workloadPolicyConfig: object expected"); - message.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.fromObject(object.workloadPolicyConfig); - } - if (object.conversionStatus != null) { - if (typeof object.conversionStatus !== "object") - throw TypeError(".google.container.v1beta1.Autopilot.conversionStatus: object expected"); - message.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.fromObject(object.conversionStatus); - } - return message; - }; - - /** - * Creates a plain object from an Autopilot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {google.container.v1beta1.Autopilot} message Autopilot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Autopilot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.workloadPolicyConfig = null; - object.conversionStatus = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.workloadPolicyConfig != null && message.hasOwnProperty("workloadPolicyConfig")) - object.workloadPolicyConfig = $root.google.container.v1beta1.WorkloadPolicyConfig.toObject(message.workloadPolicyConfig, options); - if (message.conversionStatus != null && message.hasOwnProperty("conversionStatus")) - object.conversionStatus = $root.google.container.v1beta1.AutopilotConversionStatus.toObject(message.conversionStatus, options); - return object; - }; - - /** - * Converts this Autopilot to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Autopilot - * @instance - * @returns {Object.} JSON object - */ - Autopilot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Autopilot - * @function getTypeUrl - * @memberof google.container.v1beta1.Autopilot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Autopilot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Autopilot"; - }; - - return Autopilot; - })(); - - v1beta1.WorkloadPolicyConfig = (function() { - - /** - * Properties of a WorkloadPolicyConfig. - * @memberof google.container.v1beta1 - * @interface IWorkloadPolicyConfig - * @property {boolean|null} [allowNetAdmin] WorkloadPolicyConfig allowNetAdmin - */ - - /** - * Constructs a new WorkloadPolicyConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a WorkloadPolicyConfig. - * @implements IWorkloadPolicyConfig - * @constructor - * @param {google.container.v1beta1.IWorkloadPolicyConfig=} [properties] Properties to set - */ - function WorkloadPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadPolicyConfig allowNetAdmin. - * @member {boolean|null|undefined} allowNetAdmin - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @instance - */ - WorkloadPolicyConfig.prototype.allowNetAdmin = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * WorkloadPolicyConfig _allowNetAdmin. - * @member {"allowNetAdmin"|undefined} _allowNetAdmin - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @instance - */ - Object.defineProperty(WorkloadPolicyConfig.prototype, "_allowNetAdmin", { - get: $util.oneOfGetter($oneOfFields = ["allowNetAdmin"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WorkloadPolicyConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {google.container.v1beta1.IWorkloadPolicyConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig instance - */ - WorkloadPolicyConfig.create = function create(properties) { - return new WorkloadPolicyConfig(properties); - }; - - /** - * Encodes the specified WorkloadPolicyConfig message. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {google.container.v1beta1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowNetAdmin != null && Object.hasOwnProperty.call(message, "allowNetAdmin")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowNetAdmin); - return writer; - }; - - /** - * Encodes the specified WorkloadPolicyConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.WorkloadPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {google.container.v1beta1.IWorkloadPolicyConfig} message WorkloadPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.WorkloadPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.allowNetAdmin = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadPolicyConfig message. - * @function verify - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { - properties._allowNetAdmin = 1; - if (typeof message.allowNetAdmin !== "boolean") - return "allowNetAdmin: boolean expected"; - } - return null; - }; - - /** - * Creates a WorkloadPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.WorkloadPolicyConfig} WorkloadPolicyConfig - */ - WorkloadPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.WorkloadPolicyConfig) - return object; - var message = new $root.google.container.v1beta1.WorkloadPolicyConfig(); - if (object.allowNetAdmin != null) - message.allowNetAdmin = Boolean(object.allowNetAdmin); - return message; - }; - - /** - * Creates a plain object from a WorkloadPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {google.container.v1beta1.WorkloadPolicyConfig} message WorkloadPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.allowNetAdmin != null && message.hasOwnProperty("allowNetAdmin")) { - object.allowNetAdmin = message.allowNetAdmin; - if (options.oneofs) - object._allowNetAdmin = "allowNetAdmin"; - } - return object; - }; - - /** - * Converts this WorkloadPolicyConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadPolicyConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.WorkloadPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.WorkloadPolicyConfig"; - }; - - return WorkloadPolicyConfig; - })(); - - v1beta1.NotificationConfig = (function() { - - /** - * Properties of a NotificationConfig. - * @memberof google.container.v1beta1 - * @interface INotificationConfig - * @property {google.container.v1beta1.NotificationConfig.IPubSub|null} [pubsub] NotificationConfig pubsub - */ - - /** - * Constructs a new NotificationConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig - * @constructor - * @param {google.container.v1beta1.INotificationConfig=} [properties] Properties to set - */ - function NotificationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NotificationConfig pubsub. - * @member {google.container.v1beta1.NotificationConfig.IPubSub|null|undefined} pubsub - * @memberof google.container.v1beta1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.pubsub = null; - - /** - * Creates a new NotificationConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {google.container.v1beta1.INotificationConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig instance - */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); - }; - - /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {google.container.v1beta1.INotificationConfig} message NotificationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) - $root.google.container.v1beta1.NotificationConfig.PubSub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {google.container.v1beta1.INotificationConfig} message NotificationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotificationConfig message. - * @function verify - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) { - var error = $root.google.container.v1beta1.NotificationConfig.PubSub.verify(message.pubsub); - if (error) - return "pubsub." + error; - } - return null; - }; - - /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NotificationConfig} NotificationConfig - */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NotificationConfig) - return object; - var message = new $root.google.container.v1beta1.NotificationConfig(); - if (object.pubsub != null) { - if (typeof object.pubsub !== "object") - throw TypeError(".google.container.v1beta1.NotificationConfig.pubsub: object expected"); - message.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.fromObject(object.pubsub); - } - return message; - }; - - /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {google.container.v1beta1.NotificationConfig} message NotificationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pubsub = null; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) - object.pubsub = $root.google.container.v1beta1.NotificationConfig.PubSub.toObject(message.pubsub, options); - return object; - }; - - /** - * Converts this NotificationConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NotificationConfig - * @instance - * @returns {Object.} JSON object - */ - NotificationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NotificationConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NotificationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig"; - }; - - /** - * EventType enum. - * @name google.container.v1beta1.NotificationConfig.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} UPGRADE_AVAILABLE_EVENT=1 UPGRADE_AVAILABLE_EVENT value - * @property {number} UPGRADE_EVENT=2 UPGRADE_EVENT value - * @property {number} SECURITY_BULLETIN_EVENT=3 SECURITY_BULLETIN_EVENT value - */ - NotificationConfig.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UPGRADE_AVAILABLE_EVENT"] = 1; - values[valuesById[2] = "UPGRADE_EVENT"] = 2; - values[valuesById[3] = "SECURITY_BULLETIN_EVENT"] = 3; - return values; - })(); - - NotificationConfig.PubSub = (function() { - - /** - * Properties of a PubSub. - * @memberof google.container.v1beta1.NotificationConfig - * @interface IPubSub - * @property {boolean|null} [enabled] PubSub enabled - * @property {string|null} [topic] PubSub topic - * @property {google.container.v1beta1.NotificationConfig.IFilter|null} [filter] PubSub filter - */ - - /** - * Constructs a new PubSub. - * @memberof google.container.v1beta1.NotificationConfig - * @classdesc Represents a PubSub. - * @implements IPubSub - * @constructor - * @param {google.container.v1beta1.NotificationConfig.IPubSub=} [properties] Properties to set - */ - function PubSub(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PubSub enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.enabled = false; - - /** - * PubSub topic. - * @member {string} topic - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.topic = ""; - - /** - * PubSub filter. - * @member {google.container.v1beta1.NotificationConfig.IFilter|null|undefined} filter - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @instance - */ - PubSub.prototype.filter = null; - - /** - * Creates a new PubSub instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {google.container.v1beta1.NotificationConfig.IPubSub=} [properties] Properties to set - * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub instance - */ - PubSub.create = function create(properties) { - return new PubSub(properties); - }; - - /** - * Encodes the specified PubSub message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {google.container.v1beta1.NotificationConfig.IPubSub} message PubSub message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSub.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.container.v1beta1.NotificationConfig.Filter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PubSub message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.PubSub.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {google.container.v1beta1.NotificationConfig.IPubSub} message PubSub message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSub.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PubSub message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSub.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig.PubSub(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.topic = reader.string(); - break; - } - case 3: { - message.filter = $root.google.container.v1beta1.NotificationConfig.Filter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PubSub message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSub.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubSub message. - * @function verify - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubSub.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.container.v1beta1.NotificationConfig.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - return null; - }; - - /** - * Creates a PubSub message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NotificationConfig.PubSub} PubSub - */ - PubSub.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NotificationConfig.PubSub) - return object; - var message = new $root.google.container.v1beta1.NotificationConfig.PubSub(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.topic != null) - message.topic = String(object.topic); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.container.v1beta1.NotificationConfig.PubSub.filter: object expected"); - message.filter = $root.google.container.v1beta1.NotificationConfig.Filter.fromObject(object.filter); - } - return message; - }; - - /** - * Creates a plain object from a PubSub message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {google.container.v1beta1.NotificationConfig.PubSub} message PubSub - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubSub.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.topic = ""; - object.filter = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.container.v1beta1.NotificationConfig.Filter.toObject(message.filter, options); - return object; - }; - - /** - * Converts this PubSub to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @instance - * @returns {Object.} JSON object - */ - PubSub.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PubSub - * @function getTypeUrl - * @memberof google.container.v1beta1.NotificationConfig.PubSub - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PubSub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig.PubSub"; - }; - - return PubSub; - })(); - - NotificationConfig.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof google.container.v1beta1.NotificationConfig - * @interface IFilter - * @property {Array.|null} [eventType] Filter eventType - */ - - /** - * Constructs a new Filter. - * @memberof google.container.v1beta1.NotificationConfig - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.container.v1beta1.NotificationConfig.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - this.eventType = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter eventType. - * @member {Array.} eventType - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @instance - */ - Filter.prototype.eventType = $util.emptyArray; - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {google.container.v1beta1.NotificationConfig.IFilter=} [properties] Properties to set - * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {google.container.v1beta1.NotificationConfig.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventType != null && message.eventType.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.eventType.length; ++i) - writer.int32(message.eventType[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.container.v1beta1.NotificationConfig.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {google.container.v1beta1.NotificationConfig.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NotificationConfig.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.eventType && message.eventType.length)) - message.eventType = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.eventType.push(reader.int32()); - } else - message.eventType.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) { - if (!Array.isArray(message.eventType)) - return "eventType: array expected"; - for (var i = 0; i < message.eventType.length; ++i) - switch (message.eventType[i]) { - default: - return "eventType: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NotificationConfig.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NotificationConfig.Filter) - return object; - var message = new $root.google.container.v1beta1.NotificationConfig.Filter(); - if (object.eventType) { - if (!Array.isArray(object.eventType)) - throw TypeError(".google.container.v1beta1.NotificationConfig.Filter.eventType: array expected"); - message.eventType = []; - for (var i = 0; i < object.eventType.length; ++i) - switch (object.eventType[i]) { - default: - if (typeof object.eventType[i] === "number") { - message.eventType[i] = object.eventType[i]; - break; - } - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.eventType[i] = 0; - break; - case "UPGRADE_AVAILABLE_EVENT": - case 1: - message.eventType[i] = 1; - break; - case "UPGRADE_EVENT": - case 2: - message.eventType[i] = 2; - break; - case "SECURITY_BULLETIN_EVENT": - case 3: - message.eventType[i] = 3; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {google.container.v1beta1.NotificationConfig.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.eventType = []; - if (message.eventType && message.eventType.length) { - object.eventType = []; - for (var j = 0; j < message.eventType.length; ++j) - object.eventType[j] = options.enums === String ? $root.google.container.v1beta1.NotificationConfig.EventType[message.eventType[j]] === undefined ? message.eventType[j] : $root.google.container.v1beta1.NotificationConfig.EventType[message.eventType[j]] : message.eventType[j]; - } - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.container.v1beta1.NotificationConfig.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NotificationConfig.Filter"; - }; - - return Filter; - })(); - - return NotificationConfig; - })(); - - v1beta1.ConfidentialNodes = (function() { - - /** - * Properties of a ConfidentialNodes. - * @memberof google.container.v1beta1 - * @interface IConfidentialNodes - * @property {boolean|null} [enabled] ConfidentialNodes enabled - */ - - /** - * Constructs a new ConfidentialNodes. - * @memberof google.container.v1beta1 - * @classdesc Represents a ConfidentialNodes. - * @implements IConfidentialNodes - * @constructor - * @param {google.container.v1beta1.IConfidentialNodes=} [properties] Properties to set - */ - function ConfidentialNodes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfidentialNodes enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.ConfidentialNodes - * @instance - */ - ConfidentialNodes.prototype.enabled = false; - - /** - * Creates a new ConfidentialNodes instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {google.container.v1beta1.IConfidentialNodes=} [properties] Properties to set - * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes instance - */ - ConfidentialNodes.create = function create(properties) { - return new ConfidentialNodes(properties); - }; - - /** - * Encodes the specified ConfidentialNodes message. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {google.container.v1beta1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialNodes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified ConfidentialNodes message, length delimited. Does not implicitly {@link google.container.v1beta1.ConfidentialNodes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {google.container.v1beta1.IConfidentialNodes} message ConfidentialNodes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialNodes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialNodes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ConfidentialNodes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidentialNodes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialNodes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidentialNodes message. - * @function verify - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidentialNodes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a ConfidentialNodes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ConfidentialNodes} ConfidentialNodes - */ - ConfidentialNodes.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ConfidentialNodes) - return object; - var message = new $root.google.container.v1beta1.ConfidentialNodes(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a ConfidentialNodes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {google.container.v1beta1.ConfidentialNodes} message ConfidentialNodes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidentialNodes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this ConfidentialNodes to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ConfidentialNodes - * @instance - * @returns {Object.} JSON object - */ - ConfidentialNodes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfidentialNodes - * @function getTypeUrl - * @memberof google.container.v1beta1.ConfidentialNodes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidentialNodes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ConfidentialNodes"; - }; - - return ConfidentialNodes; - })(); - - /** - * UpgradeResourceType enum. - * @name google.container.v1beta1.UpgradeResourceType - * @enum {number} - * @property {number} UPGRADE_RESOURCE_TYPE_UNSPECIFIED=0 UPGRADE_RESOURCE_TYPE_UNSPECIFIED value - * @property {number} MASTER=1 MASTER value - * @property {number} NODE_POOL=2 NODE_POOL value - */ - v1beta1.UpgradeResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPGRADE_RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MASTER"] = 1; - values[valuesById[2] = "NODE_POOL"] = 2; - return values; - })(); - - v1beta1.UpgradeEvent = (function() { - - /** - * Properties of an UpgradeEvent. - * @memberof google.container.v1beta1 - * @interface IUpgradeEvent - * @property {google.container.v1beta1.UpgradeResourceType|null} [resourceType] UpgradeEvent resourceType - * @property {string|null} [operation] UpgradeEvent operation - * @property {google.protobuf.ITimestamp|null} [operationStartTime] UpgradeEvent operationStartTime - * @property {string|null} [currentVersion] UpgradeEvent currentVersion - * @property {string|null} [targetVersion] UpgradeEvent targetVersion - * @property {string|null} [resource] UpgradeEvent resource - */ - - /** - * Constructs a new UpgradeEvent. - * @memberof google.container.v1beta1 - * @classdesc Represents an UpgradeEvent. - * @implements IUpgradeEvent - * @constructor - * @param {google.container.v1beta1.IUpgradeEvent=} [properties] Properties to set - */ - function UpgradeEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeEvent resourceType. - * @member {google.container.v1beta1.UpgradeResourceType} resourceType - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.resourceType = 0; - - /** - * UpgradeEvent operation. - * @member {string} operation - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.operation = ""; - - /** - * UpgradeEvent operationStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} operationStartTime - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.operationStartTime = null; - - /** - * UpgradeEvent currentVersion. - * @member {string} currentVersion - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.currentVersion = ""; - - /** - * UpgradeEvent targetVersion. - * @member {string} targetVersion - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.targetVersion = ""; - - /** - * UpgradeEvent resource. - * @member {string} resource - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - */ - UpgradeEvent.prototype.resource = ""; - - /** - * Creates a new UpgradeEvent instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {google.container.v1beta1.IUpgradeEvent=} [properties] Properties to set - * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent instance - */ - UpgradeEvent.create = function create(properties) { - return new UpgradeEvent(properties); - }; - - /** - * Encodes the specified UpgradeEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {google.container.v1beta1.IUpgradeEvent} message UpgradeEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); - if (message.operationStartTime != null && Object.hasOwnProperty.call(message, "operationStartTime")) - $root.google.protobuf.Timestamp.encode(message.operationStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.currentVersion); - if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetVersion); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.resource); - return writer; - }; - - /** - * Encodes the specified UpgradeEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {google.container.v1beta1.IUpgradeEvent} message UpgradeEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpgradeEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.int32(); - break; - } - case 2: { - message.operation = reader.string(); - break; - } - case 3: { - message.operationStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.currentVersion = reader.string(); - break; - } - case 5: { - message.targetVersion = reader.string(); - break; - } - case 6: { - message.resource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeEvent message. - * @function verify - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.operationStartTime); - if (error) - return "operationStartTime." + error; - } - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - if (!$util.isString(message.currentVersion)) - return "currentVersion: string expected"; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - if (!$util.isString(message.targetVersion)) - return "targetVersion: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - return null; - }; - - /** - * Creates an UpgradeEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UpgradeEvent} UpgradeEvent - */ - UpgradeEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UpgradeEvent) - return object; - var message = new $root.google.container.v1beta1.UpgradeEvent(); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "MASTER": - case 1: - message.resourceType = 1; - break; - case "NODE_POOL": - case 2: - message.resourceType = 2; - break; - } - if (object.operation != null) - message.operation = String(object.operation); - if (object.operationStartTime != null) { - if (typeof object.operationStartTime !== "object") - throw TypeError(".google.container.v1beta1.UpgradeEvent.operationStartTime: object expected"); - message.operationStartTime = $root.google.protobuf.Timestamp.fromObject(object.operationStartTime); - } - if (object.currentVersion != null) - message.currentVersion = String(object.currentVersion); - if (object.targetVersion != null) - message.targetVersion = String(object.targetVersion); - if (object.resource != null) - message.resource = String(object.resource); - return message; - }; - - /** - * Creates a plain object from an UpgradeEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {google.container.v1beta1.UpgradeEvent} message UpgradeEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; - object.operation = ""; - object.operationStartTime = null; - object.currentVersion = ""; - object.targetVersion = ""; - object.resource = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] : message.resourceType; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - if (message.operationStartTime != null && message.hasOwnProperty("operationStartTime")) - object.operationStartTime = $root.google.protobuf.Timestamp.toObject(message.operationStartTime, options); - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - object.currentVersion = message.currentVersion; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - object.targetVersion = message.targetVersion; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - return object; - }; - - /** - * Converts this UpgradeEvent to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UpgradeEvent - * @instance - * @returns {Object.} JSON object - */ - UpgradeEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeEvent - * @function getTypeUrl - * @memberof google.container.v1beta1.UpgradeEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UpgradeEvent"; - }; - - return UpgradeEvent; - })(); - - v1beta1.UpgradeAvailableEvent = (function() { - - /** - * Properties of an UpgradeAvailableEvent. - * @memberof google.container.v1beta1 - * @interface IUpgradeAvailableEvent - * @property {string|null} [version] UpgradeAvailableEvent version - * @property {google.container.v1beta1.UpgradeResourceType|null} [resourceType] UpgradeAvailableEvent resourceType - * @property {google.container.v1beta1.IReleaseChannel|null} [releaseChannel] UpgradeAvailableEvent releaseChannel - * @property {string|null} [resource] UpgradeAvailableEvent resource - * @property {google.container.v1beta1.IWindowsVersions|null} [windowsVersions] UpgradeAvailableEvent windowsVersions - */ - - /** - * Constructs a new UpgradeAvailableEvent. - * @memberof google.container.v1beta1 - * @classdesc Represents an UpgradeAvailableEvent. - * @implements IUpgradeAvailableEvent - * @constructor - * @param {google.container.v1beta1.IUpgradeAvailableEvent=} [properties] Properties to set - */ - function UpgradeAvailableEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeAvailableEvent version. - * @member {string} version - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.version = ""; - - /** - * UpgradeAvailableEvent resourceType. - * @member {google.container.v1beta1.UpgradeResourceType} resourceType - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.resourceType = 0; - - /** - * UpgradeAvailableEvent releaseChannel. - * @member {google.container.v1beta1.IReleaseChannel|null|undefined} releaseChannel - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.releaseChannel = null; - - /** - * UpgradeAvailableEvent resource. - * @member {string} resource - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.resource = ""; - - /** - * UpgradeAvailableEvent windowsVersions. - * @member {google.container.v1beta1.IWindowsVersions|null|undefined} windowsVersions - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - */ - UpgradeAvailableEvent.prototype.windowsVersions = null; - - /** - * Creates a new UpgradeAvailableEvent instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {google.container.v1beta1.IUpgradeAvailableEvent=} [properties] Properties to set - * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent instance - */ - UpgradeAvailableEvent.create = function create(properties) { - return new UpgradeAvailableEvent(properties); - }; - - /** - * Encodes the specified UpgradeAvailableEvent message. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {google.container.v1beta1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeAvailableEvent.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - $root.google.container.v1beta1.ReleaseChannel.encode(message.releaseChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); - if (message.windowsVersions != null && Object.hasOwnProperty.call(message, "windowsVersions")) - $root.google.container.v1beta1.WindowsVersions.encode(message.windowsVersions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeAvailableEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.UpgradeAvailableEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {google.container.v1beta1.IUpgradeAvailableEvent} message UpgradeAvailableEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeAvailableEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeAvailableEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.UpgradeAvailableEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.resourceType = reader.int32(); - break; - } - case 3: { - message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.decode(reader, reader.uint32()); - break; - } - case 4: { - message.resource = reader.string(); - break; - } - case 5: { - message.windowsVersions = $root.google.container.v1beta1.WindowsVersions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeAvailableEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeAvailableEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeAvailableEvent message. - * @function verify - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeAvailableEvent.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.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { - var error = $root.google.container.v1beta1.ReleaseChannel.verify(message.releaseChannel); - if (error) - return "releaseChannel." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) { - var error = $root.google.container.v1beta1.WindowsVersions.verify(message.windowsVersions); - if (error) - return "windowsVersions." + error; - } - return null; - }; - - /** - * Creates an UpgradeAvailableEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.UpgradeAvailableEvent} UpgradeAvailableEvent - */ - UpgradeAvailableEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.UpgradeAvailableEvent) - return object; - var message = new $root.google.container.v1beta1.UpgradeAvailableEvent(); - if (object.version != null) - message.version = String(object.version); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "MASTER": - case 1: - message.resourceType = 1; - break; - case "NODE_POOL": - case 2: - message.resourceType = 2; - break; - } - if (object.releaseChannel != null) { - if (typeof object.releaseChannel !== "object") - throw TypeError(".google.container.v1beta1.UpgradeAvailableEvent.releaseChannel: object expected"); - message.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.fromObject(object.releaseChannel); - } - if (object.resource != null) - message.resource = String(object.resource); - if (object.windowsVersions != null) { - if (typeof object.windowsVersions !== "object") - throw TypeError(".google.container.v1beta1.UpgradeAvailableEvent.windowsVersions: object expected"); - message.windowsVersions = $root.google.container.v1beta1.WindowsVersions.fromObject(object.windowsVersions); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeAvailableEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {google.container.v1beta1.UpgradeAvailableEvent} message UpgradeAvailableEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeAvailableEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; - object.releaseChannel = null; - object.resource = ""; - object.windowsVersions = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1beta1.UpgradeResourceType[message.resourceType] : message.resourceType; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = $root.google.container.v1beta1.ReleaseChannel.toObject(message.releaseChannel, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.windowsVersions != null && message.hasOwnProperty("windowsVersions")) - object.windowsVersions = $root.google.container.v1beta1.WindowsVersions.toObject(message.windowsVersions, options); - return object; - }; - - /** - * Converts this UpgradeAvailableEvent to JSON. - * @function toJSON - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @instance - * @returns {Object.} JSON object - */ - UpgradeAvailableEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpgradeAvailableEvent - * @function getTypeUrl - * @memberof google.container.v1beta1.UpgradeAvailableEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpgradeAvailableEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.UpgradeAvailableEvent"; - }; - - return UpgradeAvailableEvent; - })(); - - v1beta1.SecurityBulletinEvent = (function() { - - /** - * Properties of a SecurityBulletinEvent. - * @memberof google.container.v1beta1 - * @interface ISecurityBulletinEvent - * @property {string|null} [resourceTypeAffected] SecurityBulletinEvent resourceTypeAffected - * @property {string|null} [bulletinId] SecurityBulletinEvent bulletinId - * @property {Array.|null} [cveIds] SecurityBulletinEvent cveIds - * @property {string|null} [severity] SecurityBulletinEvent severity - * @property {string|null} [bulletinUri] SecurityBulletinEvent bulletinUri - * @property {string|null} [briefDescription] SecurityBulletinEvent briefDescription - * @property {Array.|null} [affectedSupportedMinors] SecurityBulletinEvent affectedSupportedMinors - * @property {Array.|null} [patchedVersions] SecurityBulletinEvent patchedVersions - * @property {string|null} [suggestedUpgradeTarget] SecurityBulletinEvent suggestedUpgradeTarget - * @property {boolean|null} [manualStepsRequired] SecurityBulletinEvent manualStepsRequired - */ - - /** - * Constructs a new SecurityBulletinEvent. - * @memberof google.container.v1beta1 - * @classdesc Represents a SecurityBulletinEvent. - * @implements ISecurityBulletinEvent - * @constructor - * @param {google.container.v1beta1.ISecurityBulletinEvent=} [properties] Properties to set - */ - function SecurityBulletinEvent(properties) { - this.cveIds = []; - this.affectedSupportedMinors = []; - this.patchedVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityBulletinEvent resourceTypeAffected. - * @member {string} resourceTypeAffected - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.resourceTypeAffected = ""; - - /** - * SecurityBulletinEvent bulletinId. - * @member {string} bulletinId - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.bulletinId = ""; - - /** - * SecurityBulletinEvent cveIds. - * @member {Array.} cveIds - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.cveIds = $util.emptyArray; - - /** - * SecurityBulletinEvent severity. - * @member {string} severity - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.severity = ""; - - /** - * SecurityBulletinEvent bulletinUri. - * @member {string} bulletinUri - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.bulletinUri = ""; - - /** - * SecurityBulletinEvent briefDescription. - * @member {string} briefDescription - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.briefDescription = ""; - - /** - * SecurityBulletinEvent affectedSupportedMinors. - * @member {Array.} affectedSupportedMinors - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.affectedSupportedMinors = $util.emptyArray; - - /** - * SecurityBulletinEvent patchedVersions. - * @member {Array.} patchedVersions - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.patchedVersions = $util.emptyArray; - - /** - * SecurityBulletinEvent suggestedUpgradeTarget. - * @member {string} suggestedUpgradeTarget - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.suggestedUpgradeTarget = ""; - - /** - * SecurityBulletinEvent manualStepsRequired. - * @member {boolean} manualStepsRequired - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - */ - SecurityBulletinEvent.prototype.manualStepsRequired = false; - - /** - * Creates a new SecurityBulletinEvent instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {google.container.v1beta1.ISecurityBulletinEvent=} [properties] Properties to set - * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent instance - */ - SecurityBulletinEvent.create = function create(properties) { - return new SecurityBulletinEvent(properties); - }; - - /** - * Encodes the specified SecurityBulletinEvent message. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {google.container.v1beta1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityBulletinEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceTypeAffected != null && Object.hasOwnProperty.call(message, "resourceTypeAffected")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypeAffected); - if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletinId); - if (message.cveIds != null && message.cveIds.length) - for (var i = 0; i < message.cveIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cveIds[i]); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); - if (message.bulletinUri != null && Object.hasOwnProperty.call(message, "bulletinUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.bulletinUri); - if (message.briefDescription != null && Object.hasOwnProperty.call(message, "briefDescription")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.briefDescription); - if (message.affectedSupportedMinors != null && message.affectedSupportedMinors.length) - for (var i = 0; i < message.affectedSupportedMinors.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.affectedSupportedMinors[i]); - if (message.patchedVersions != null && message.patchedVersions.length) - for (var i = 0; i < message.patchedVersions.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.patchedVersions[i]); - if (message.suggestedUpgradeTarget != null && Object.hasOwnProperty.call(message, "suggestedUpgradeTarget")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.suggestedUpgradeTarget); - if (message.manualStepsRequired != null && Object.hasOwnProperty.call(message, "manualStepsRequired")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.manualStepsRequired); - return writer; - }; - - /** - * Encodes the specified SecurityBulletinEvent message, length delimited. Does not implicitly {@link google.container.v1beta1.SecurityBulletinEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {google.container.v1beta1.ISecurityBulletinEvent} message SecurityBulletinEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityBulletinEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityBulletinEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecurityBulletinEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceTypeAffected = reader.string(); - break; - } - case 2: { - message.bulletinId = reader.string(); - break; - } - case 3: { - if (!(message.cveIds && message.cveIds.length)) - message.cveIds = []; - message.cveIds.push(reader.string()); - break; - } - case 4: { - message.severity = reader.string(); - break; - } - case 5: { - message.bulletinUri = reader.string(); - break; - } - case 6: { - message.briefDescription = reader.string(); - break; - } - case 7: { - if (!(message.affectedSupportedMinors && message.affectedSupportedMinors.length)) - message.affectedSupportedMinors = []; - message.affectedSupportedMinors.push(reader.string()); - break; - } - case 8: { - if (!(message.patchedVersions && message.patchedVersions.length)) - message.patchedVersions = []; - message.patchedVersions.push(reader.string()); - break; - } - case 9: { - message.suggestedUpgradeTarget = reader.string(); - break; - } - case 10: { - message.manualStepsRequired = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityBulletinEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityBulletinEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityBulletinEvent message. - * @function verify - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityBulletinEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) - if (!$util.isString(message.resourceTypeAffected)) - return "resourceTypeAffected: string expected"; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - if (!$util.isString(message.bulletinId)) - return "bulletinId: string expected"; - if (message.cveIds != null && message.hasOwnProperty("cveIds")) { - if (!Array.isArray(message.cveIds)) - return "cveIds: array expected"; - for (var i = 0; i < message.cveIds.length; ++i) - if (!$util.isString(message.cveIds[i])) - return "cveIds: string[] expected"; - } - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) - if (!$util.isString(message.bulletinUri)) - return "bulletinUri: string expected"; - if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) - if (!$util.isString(message.briefDescription)) - return "briefDescription: string expected"; - if (message.affectedSupportedMinors != null && message.hasOwnProperty("affectedSupportedMinors")) { - if (!Array.isArray(message.affectedSupportedMinors)) - return "affectedSupportedMinors: array expected"; - for (var i = 0; i < message.affectedSupportedMinors.length; ++i) - if (!$util.isString(message.affectedSupportedMinors[i])) - return "affectedSupportedMinors: string[] expected"; - } - if (message.patchedVersions != null && message.hasOwnProperty("patchedVersions")) { - if (!Array.isArray(message.patchedVersions)) - return "patchedVersions: array expected"; - for (var i = 0; i < message.patchedVersions.length; ++i) - if (!$util.isString(message.patchedVersions[i])) - return "patchedVersions: string[] expected"; - } - if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) - if (!$util.isString(message.suggestedUpgradeTarget)) - return "suggestedUpgradeTarget: string expected"; - if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) - if (typeof message.manualStepsRequired !== "boolean") - return "manualStepsRequired: boolean expected"; - return null; - }; - - /** - * Creates a SecurityBulletinEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SecurityBulletinEvent} SecurityBulletinEvent - */ - SecurityBulletinEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SecurityBulletinEvent) - return object; - var message = new $root.google.container.v1beta1.SecurityBulletinEvent(); - if (object.resourceTypeAffected != null) - message.resourceTypeAffected = String(object.resourceTypeAffected); - if (object.bulletinId != null) - message.bulletinId = String(object.bulletinId); - if (object.cveIds) { - if (!Array.isArray(object.cveIds)) - throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.cveIds: array expected"); - message.cveIds = []; - for (var i = 0; i < object.cveIds.length; ++i) - message.cveIds[i] = String(object.cveIds[i]); - } - if (object.severity != null) - message.severity = String(object.severity); - if (object.bulletinUri != null) - message.bulletinUri = String(object.bulletinUri); - if (object.briefDescription != null) - message.briefDescription = String(object.briefDescription); - if (object.affectedSupportedMinors) { - if (!Array.isArray(object.affectedSupportedMinors)) - throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.affectedSupportedMinors: array expected"); - message.affectedSupportedMinors = []; - for (var i = 0; i < object.affectedSupportedMinors.length; ++i) - message.affectedSupportedMinors[i] = String(object.affectedSupportedMinors[i]); - } - if (object.patchedVersions) { - if (!Array.isArray(object.patchedVersions)) - throw TypeError(".google.container.v1beta1.SecurityBulletinEvent.patchedVersions: array expected"); - message.patchedVersions = []; - for (var i = 0; i < object.patchedVersions.length; ++i) - message.patchedVersions[i] = String(object.patchedVersions[i]); - } - if (object.suggestedUpgradeTarget != null) - message.suggestedUpgradeTarget = String(object.suggestedUpgradeTarget); - if (object.manualStepsRequired != null) - message.manualStepsRequired = Boolean(object.manualStepsRequired); - return message; - }; - - /** - * Creates a plain object from a SecurityBulletinEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {google.container.v1beta1.SecurityBulletinEvent} message SecurityBulletinEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityBulletinEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cveIds = []; - object.affectedSupportedMinors = []; - object.patchedVersions = []; - } - if (options.defaults) { - object.resourceTypeAffected = ""; - object.bulletinId = ""; - object.severity = ""; - object.bulletinUri = ""; - object.briefDescription = ""; - object.suggestedUpgradeTarget = ""; - object.manualStepsRequired = false; - } - if (message.resourceTypeAffected != null && message.hasOwnProperty("resourceTypeAffected")) - object.resourceTypeAffected = message.resourceTypeAffected; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - object.bulletinId = message.bulletinId; - if (message.cveIds && message.cveIds.length) { - object.cveIds = []; - for (var j = 0; j < message.cveIds.length; ++j) - object.cveIds[j] = message.cveIds[j]; - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.bulletinUri != null && message.hasOwnProperty("bulletinUri")) - object.bulletinUri = message.bulletinUri; - if (message.briefDescription != null && message.hasOwnProperty("briefDescription")) - object.briefDescription = message.briefDescription; - if (message.affectedSupportedMinors && message.affectedSupportedMinors.length) { - object.affectedSupportedMinors = []; - for (var j = 0; j < message.affectedSupportedMinors.length; ++j) - object.affectedSupportedMinors[j] = message.affectedSupportedMinors[j]; - } - if (message.patchedVersions && message.patchedVersions.length) { - object.patchedVersions = []; - for (var j = 0; j < message.patchedVersions.length; ++j) - object.patchedVersions[j] = message.patchedVersions[j]; - } - if (message.suggestedUpgradeTarget != null && message.hasOwnProperty("suggestedUpgradeTarget")) - object.suggestedUpgradeTarget = message.suggestedUpgradeTarget; - if (message.manualStepsRequired != null && message.hasOwnProperty("manualStepsRequired")) - object.manualStepsRequired = message.manualStepsRequired; - return object; - }; - - /** - * Converts this SecurityBulletinEvent to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @instance - * @returns {Object.} JSON object - */ - SecurityBulletinEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityBulletinEvent - * @function getTypeUrl - * @memberof google.container.v1beta1.SecurityBulletinEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityBulletinEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SecurityBulletinEvent"; - }; - - return SecurityBulletinEvent; - })(); - - v1beta1.IdentityServiceConfig = (function() { - - /** - * Properties of an IdentityServiceConfig. - * @memberof google.container.v1beta1 - * @interface IIdentityServiceConfig - * @property {boolean|null} [enabled] IdentityServiceConfig enabled - */ - - /** - * Constructs a new IdentityServiceConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an IdentityServiceConfig. - * @implements IIdentityServiceConfig - * @constructor - * @param {google.container.v1beta1.IIdentityServiceConfig=} [properties] Properties to set - */ - function IdentityServiceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentityServiceConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.IdentityServiceConfig - * @instance - */ - IdentityServiceConfig.prototype.enabled = false; - - /** - * Creates a new IdentityServiceConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {google.container.v1beta1.IIdentityServiceConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig instance - */ - IdentityServiceConfig.create = function create(properties) { - return new IdentityServiceConfig(properties); - }; - - /** - * Encodes the specified IdentityServiceConfig message. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {google.container.v1beta1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentityServiceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified IdentityServiceConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.IdentityServiceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {google.container.v1beta1.IIdentityServiceConfig} message IdentityServiceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentityServiceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentityServiceConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.IdentityServiceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentityServiceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentityServiceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentityServiceConfig message. - * @function verify - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentityServiceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates an IdentityServiceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.IdentityServiceConfig} IdentityServiceConfig - */ - IdentityServiceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.IdentityServiceConfig) - return object; - var message = new $root.google.container.v1beta1.IdentityServiceConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from an IdentityServiceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {google.container.v1beta1.IdentityServiceConfig} message IdentityServiceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentityServiceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this IdentityServiceConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.IdentityServiceConfig - * @instance - * @returns {Object.} JSON object - */ - IdentityServiceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IdentityServiceConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.IdentityServiceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IdentityServiceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.IdentityServiceConfig"; - }; - - return IdentityServiceConfig; - })(); - - /** - * NodePoolUpdateStrategy enum. - * @name google.container.v1beta1.NodePoolUpdateStrategy - * @enum {number} - * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value - * @property {number} BLUE_GREEN=2 BLUE_GREEN value - * @property {number} SURGE=3 SURGE value - */ - v1beta1.NodePoolUpdateStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[2] = "BLUE_GREEN"] = 2; - values[valuesById[3] = "SURGE"] = 3; - return values; - })(); - - v1beta1.LoggingConfig = (function() { - - /** - * Properties of a LoggingConfig. - * @memberof google.container.v1beta1 - * @interface ILoggingConfig - * @property {google.container.v1beta1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig - */ - - /** - * Constructs a new LoggingConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a LoggingConfig. - * @implements ILoggingConfig - * @constructor - * @param {google.container.v1beta1.ILoggingConfig=} [properties] Properties to set - */ - function LoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingConfig componentConfig. - * @member {google.container.v1beta1.ILoggingComponentConfig|null|undefined} componentConfig - * @memberof google.container.v1beta1.LoggingConfig - * @instance - */ - LoggingConfig.prototype.componentConfig = null; - - /** - * Creates a new LoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {google.container.v1beta1.ILoggingConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig instance - */ - LoggingConfig.create = function create(properties) { - return new LoggingConfig(properties); - }; - - /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.container.v1beta1.LoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {google.container.v1beta1.ILoggingConfig} message LoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) - $root.google.container.v1beta1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {google.container.v1beta1.ILoggingConfig} message LoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.componentConfig = $root.google.container.v1beta1.LoggingComponentConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingConfig message. - * @function verify - * @memberof google.container.v1beta1.LoggingConfig - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { - var error = $root.google.container.v1beta1.LoggingComponentConfig.verify(message.componentConfig); - if (error) - return "componentConfig." + error; - } - return null; - }; - - /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LoggingConfig} LoggingConfig - */ - LoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LoggingConfig) - return object; - var message = new $root.google.container.v1beta1.LoggingConfig(); - if (object.componentConfig != null) { - if (typeof object.componentConfig !== "object") - throw TypeError(".google.container.v1beta1.LoggingConfig.componentConfig: object expected"); - message.componentConfig = $root.google.container.v1beta1.LoggingComponentConfig.fromObject(object.componentConfig); - } - return message; - }; - - /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {google.container.v1beta1.LoggingConfig} message LoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingConfig.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.container.v1beta1.LoggingComponentConfig.toObject(message.componentConfig, options); - return object; - }; - - /** - * Converts this LoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LoggingConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LoggingConfig"; - }; - - return LoggingConfig; - })(); - - v1beta1.LoggingComponentConfig = (function() { - - /** - * Properties of a LoggingComponentConfig. - * @memberof google.container.v1beta1 - * @interface ILoggingComponentConfig - * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents - */ - - /** - * Constructs a new LoggingComponentConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a LoggingComponentConfig. - * @implements ILoggingComponentConfig - * @constructor - * @param {google.container.v1beta1.ILoggingComponentConfig=} [properties] Properties to set - */ - function LoggingComponentConfig(properties) { - this.enableComponents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingComponentConfig enableComponents. - * @member {Array.} enableComponents - * @memberof google.container.v1beta1.LoggingComponentConfig - * @instance - */ - LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; - - /** - * Creates a new LoggingComponentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {google.container.v1beta1.ILoggingComponentConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig instance - */ - LoggingComponentConfig.create = function create(properties) { - return new LoggingComponentConfig(properties); - }; - - /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.container.v1beta1.LoggingComponentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {google.container.v1beta1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingComponentConfig.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(); - } - return writer; - }; - - /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingComponentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {google.container.v1beta1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingComponentConfig(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingComponentConfig message. - * @function verify - * @memberof google.container.v1beta1.LoggingComponentConfig - * @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) { - 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: - case 3: - case 4: - case 5: - break; - } - } - return null; - }; - - /** - * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LoggingComponentConfig} LoggingComponentConfig - */ - LoggingComponentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LoggingComponentConfig) - return object; - var message = new $root.google.container.v1beta1.LoggingComponentConfig(); - if (object.enableComponents) { - if (!Array.isArray(object.enableComponents)) - throw TypeError(".google.container.v1beta1.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; - case "APISERVER": - case 3: - message.enableComponents[i] = 3; - break; - case "SCHEDULER": - case 4: - message.enableComponents[i] = 4; - break; - case "CONTROLLER_MANAGER": - case 5: - message.enableComponents[i] = 5; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {google.container.v1beta1.LoggingComponentConfig} message LoggingComponentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingComponentConfig.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.container.v1beta1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1beta1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; - } - return object; - }; - - /** - * Converts this LoggingComponentConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LoggingComponentConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingComponentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingComponentConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LoggingComponentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LoggingComponentConfig"; - }; - - /** - * Component enum. - * @name google.container.v1beta1.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 - * @property {number} APISERVER=3 APISERVER value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER 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; - values[valuesById[3] = "APISERVER"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; - return values; - })(); - - return LoggingComponentConfig; - })(); - - v1beta1.RayClusterLoggingConfig = (function() { - - /** - * Properties of a RayClusterLoggingConfig. - * @memberof google.container.v1beta1 - * @interface IRayClusterLoggingConfig - * @property {boolean|null} [enabled] RayClusterLoggingConfig enabled - */ - - /** - * Constructs a new RayClusterLoggingConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a RayClusterLoggingConfig. - * @implements IRayClusterLoggingConfig - * @constructor - * @param {google.container.v1beta1.IRayClusterLoggingConfig=} [properties] Properties to set - */ - function RayClusterLoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayClusterLoggingConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @instance - */ - RayClusterLoggingConfig.prototype.enabled = false; - - /** - * Creates a new RayClusterLoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {google.container.v1beta1.IRayClusterLoggingConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig instance - */ - RayClusterLoggingConfig.create = function create(properties) { - return new RayClusterLoggingConfig(properties); - }; - - /** - * Encodes the specified RayClusterLoggingConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {google.container.v1beta1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterLoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified RayClusterLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterLoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {google.container.v1beta1.IRayClusterLoggingConfig} message RayClusterLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterLoggingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayClusterLoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayClusterLoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterLoggingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayClusterLoggingConfig message. - * @function verify - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayClusterLoggingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a RayClusterLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RayClusterLoggingConfig} RayClusterLoggingConfig - */ - RayClusterLoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RayClusterLoggingConfig) - return object; - var message = new $root.google.container.v1beta1.RayClusterLoggingConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a RayClusterLoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {google.container.v1beta1.RayClusterLoggingConfig} message RayClusterLoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayClusterLoggingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this RayClusterLoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @instance - * @returns {Object.} JSON object - */ - RayClusterLoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayClusterLoggingConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.RayClusterLoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayClusterLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RayClusterLoggingConfig"; - }; - - return RayClusterLoggingConfig; - })(); - - v1beta1.MonitoringConfig = (function() { - - /** - * Properties of a MonitoringConfig. - * @memberof google.container.v1beta1 - * @interface IMonitoringConfig - * @property {google.container.v1beta1.IMonitoringComponentConfig|null} [componentConfig] MonitoringConfig componentConfig - * @property {google.container.v1beta1.IManagedPrometheusConfig|null} [managedPrometheusConfig] MonitoringConfig managedPrometheusConfig - * @property {google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null} [advancedDatapathObservabilityConfig] MonitoringConfig advancedDatapathObservabilityConfig - */ - - /** - * Constructs a new MonitoringConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a MonitoringConfig. - * @implements IMonitoringConfig - * @constructor - * @param {google.container.v1beta1.IMonitoringConfig=} [properties] Properties to set - */ - function MonitoringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoringConfig componentConfig. - * @member {google.container.v1beta1.IMonitoringComponentConfig|null|undefined} componentConfig - * @memberof google.container.v1beta1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.componentConfig = null; - - /** - * MonitoringConfig managedPrometheusConfig. - * @member {google.container.v1beta1.IManagedPrometheusConfig|null|undefined} managedPrometheusConfig - * @memberof google.container.v1beta1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.managedPrometheusConfig = null; - - /** - * MonitoringConfig advancedDatapathObservabilityConfig. - * @member {google.container.v1beta1.IAdvancedDatapathObservabilityConfig|null|undefined} advancedDatapathObservabilityConfig - * @memberof google.container.v1beta1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.advancedDatapathObservabilityConfig = null; - - /** - * Creates a new MonitoringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {google.container.v1beta1.IMonitoringConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig instance - */ - MonitoringConfig.create = function create(properties) { - return new MonitoringConfig(properties); - }; - - /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {google.container.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) - $root.google.container.v1beta1.MonitoringComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.managedPrometheusConfig != null && Object.hasOwnProperty.call(message, "managedPrometheusConfig")) - $root.google.container.v1beta1.ManagedPrometheusConfig.encode(message.managedPrometheusConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.advancedDatapathObservabilityConfig != null && Object.hasOwnProperty.call(message, "advancedDatapathObservabilityConfig")) - $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.encode(message.advancedDatapathObservabilityConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {google.container.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.container.v1beta1.MonitoringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoringConfig message. - * @function verify - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { - var error = $root.google.container.v1beta1.MonitoringComponentConfig.verify(message.componentConfig); - if (error) - return "componentConfig." + error; - } - if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) { - var error = $root.google.container.v1beta1.ManagedPrometheusConfig.verify(message.managedPrometheusConfig); - if (error) - return "managedPrometheusConfig." + error; - } - if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) { - var error = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify(message.advancedDatapathObservabilityConfig); - if (error) - return "advancedDatapathObservabilityConfig." + error; - } - return null; - }; - - /** - * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MonitoringConfig} MonitoringConfig - */ - MonitoringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MonitoringConfig) - return object; - var message = new $root.google.container.v1beta1.MonitoringConfig(); - if (object.componentConfig != null) { - if (typeof object.componentConfig !== "object") - throw TypeError(".google.container.v1beta1.MonitoringConfig.componentConfig: object expected"); - message.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.fromObject(object.componentConfig); - } - if (object.managedPrometheusConfig != null) { - if (typeof object.managedPrometheusConfig !== "object") - throw TypeError(".google.container.v1beta1.MonitoringConfig.managedPrometheusConfig: object expected"); - message.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.fromObject(object.managedPrometheusConfig); - } - if (object.advancedDatapathObservabilityConfig != null) { - if (typeof object.advancedDatapathObservabilityConfig !== "object") - throw TypeError(".google.container.v1beta1.MonitoringConfig.advancedDatapathObservabilityConfig: object expected"); - message.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.fromObject(object.advancedDatapathObservabilityConfig); - } - return message; - }; - - /** - * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {google.container.v1beta1.MonitoringConfig} message MonitoringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.componentConfig = null; - object.managedPrometheusConfig = null; - object.advancedDatapathObservabilityConfig = null; - } - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) - object.componentConfig = $root.google.container.v1beta1.MonitoringComponentConfig.toObject(message.componentConfig, options); - if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) - object.managedPrometheusConfig = $root.google.container.v1beta1.ManagedPrometheusConfig.toObject(message.managedPrometheusConfig, options); - if (message.advancedDatapathObservabilityConfig != null && message.hasOwnProperty("advancedDatapathObservabilityConfig")) - object.advancedDatapathObservabilityConfig = $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.toObject(message.advancedDatapathObservabilityConfig, options); - return object; - }; - - /** - * Converts this MonitoringConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MonitoringConfig - * @instance - * @returns {Object.} JSON object - */ - MonitoringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonitoringConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.MonitoringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MonitoringConfig"; - }; - - return MonitoringConfig; - })(); - - v1beta1.AdvancedDatapathObservabilityConfig = (function() { - - /** - * Properties of an AdvancedDatapathObservabilityConfig. - * @memberof google.container.v1beta1 - * @interface IAdvancedDatapathObservabilityConfig - * @property {boolean|null} [enableMetrics] AdvancedDatapathObservabilityConfig enableMetrics - * @property {google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode|null} [relayMode] AdvancedDatapathObservabilityConfig relayMode - * @property {boolean|null} [enableRelay] AdvancedDatapathObservabilityConfig enableRelay - */ - - /** - * Constructs a new AdvancedDatapathObservabilityConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an AdvancedDatapathObservabilityConfig. - * @implements IAdvancedDatapathObservabilityConfig - * @constructor - * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set - */ - function AdvancedDatapathObservabilityConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedDatapathObservabilityConfig enableMetrics. - * @member {boolean} enableMetrics - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.enableMetrics = false; - - /** - * AdvancedDatapathObservabilityConfig relayMode. - * @member {google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode} relayMode - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.relayMode = 0; - - /** - * AdvancedDatapathObservabilityConfig enableRelay. - * @member {boolean|null|undefined} enableRelay - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @instance - */ - AdvancedDatapathObservabilityConfig.prototype.enableRelay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedDatapathObservabilityConfig _enableRelay. - * @member {"enableRelay"|undefined} _enableRelay - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @instance - */ - Object.defineProperty(AdvancedDatapathObservabilityConfig.prototype, "_enableRelay", { - get: $util.oneOfGetter($oneOfFields = ["enableRelay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedDatapathObservabilityConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig instance - */ - AdvancedDatapathObservabilityConfig.create = function create(properties) { - return new AdvancedDatapathObservabilityConfig(properties); - }; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedDatapathObservabilityConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableMetrics != null && Object.hasOwnProperty.call(message, "enableMetrics")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableMetrics); - if (message.relayMode != null && Object.hasOwnProperty.call(message, "relayMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relayMode); - if (message.enableRelay != null && Object.hasOwnProperty.call(message, "enableRelay")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableRelay); - return writer; - }; - - /** - * Encodes the specified AdvancedDatapathObservabilityConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.AdvancedDatapathObservabilityConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1beta1.IAdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedDatapathObservabilityConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedDatapathObservabilityConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableMetrics = reader.bool(); - break; - } - case 2: { - message.relayMode = reader.int32(); - break; - } - case 3: { - message.enableRelay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedDatapathObservabilityConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedDatapathObservabilityConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedDatapathObservabilityConfig message. - * @function verify - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedDatapathObservabilityConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) - if (typeof message.enableMetrics !== "boolean") - return "enableMetrics: boolean expected"; - if (message.relayMode != null && message.hasOwnProperty("relayMode")) - switch (message.relayMode) { - default: - return "relayMode: enum value expected"; - case 0: - case 1: - case 3: - case 4: - break; - } - if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { - properties._enableRelay = 1; - if (typeof message.enableRelay !== "boolean") - return "enableRelay: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedDatapathObservabilityConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.AdvancedDatapathObservabilityConfig} AdvancedDatapathObservabilityConfig - */ - AdvancedDatapathObservabilityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig) - return object; - var message = new $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig(); - if (object.enableMetrics != null) - message.enableMetrics = Boolean(object.enableMetrics); - switch (object.relayMode) { - default: - if (typeof object.relayMode === "number") { - message.relayMode = object.relayMode; - break; - } - break; - case "RELAY_MODE_UNSPECIFIED": - case 0: - message.relayMode = 0; - break; - case "DISABLED": - case 1: - message.relayMode = 1; - break; - case "INTERNAL_VPC_LB": - case 3: - message.relayMode = 3; - break; - case "EXTERNAL_LB": - case 4: - message.relayMode = 4; - break; - } - if (object.enableRelay != null) - message.enableRelay = Boolean(object.enableRelay); - return message; - }; - - /** - * Creates a plain object from an AdvancedDatapathObservabilityConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {google.container.v1beta1.AdvancedDatapathObservabilityConfig} message AdvancedDatapathObservabilityConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedDatapathObservabilityConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableMetrics = false; - object.relayMode = options.enums === String ? "RELAY_MODE_UNSPECIFIED" : 0; - } - if (message.enableMetrics != null && message.hasOwnProperty("enableMetrics")) - object.enableMetrics = message.enableMetrics; - if (message.relayMode != null && message.hasOwnProperty("relayMode")) - object.relayMode = options.enums === String ? $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] === undefined ? message.relayMode : $root.google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode[message.relayMode] : message.relayMode; - if (message.enableRelay != null && message.hasOwnProperty("enableRelay")) { - object.enableRelay = message.enableRelay; - if (options.oneofs) - object._enableRelay = "enableRelay"; - } - return object; - }; - - /** - * Converts this AdvancedDatapathObservabilityConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @instance - * @returns {Object.} JSON object - */ - AdvancedDatapathObservabilityConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedDatapathObservabilityConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.AdvancedDatapathObservabilityConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedDatapathObservabilityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.AdvancedDatapathObservabilityConfig"; - }; - - /** - * RelayMode enum. - * @name google.container.v1beta1.AdvancedDatapathObservabilityConfig.RelayMode - * @enum {number} - * @property {number} RELAY_MODE_UNSPECIFIED=0 RELAY_MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} INTERNAL_VPC_LB=3 INTERNAL_VPC_LB value - * @property {number} EXTERNAL_LB=4 EXTERNAL_LB value - */ - AdvancedDatapathObservabilityConfig.RelayMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELAY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[3] = "INTERNAL_VPC_LB"] = 3; - values[valuesById[4] = "EXTERNAL_LB"] = 4; - return values; - })(); - - return AdvancedDatapathObservabilityConfig; - })(); - - v1beta1.RayClusterMonitoringConfig = (function() { - - /** - * Properties of a RayClusterMonitoringConfig. - * @memberof google.container.v1beta1 - * @interface IRayClusterMonitoringConfig - * @property {boolean|null} [enabled] RayClusterMonitoringConfig enabled - */ - - /** - * Constructs a new RayClusterMonitoringConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a RayClusterMonitoringConfig. - * @implements IRayClusterMonitoringConfig - * @constructor - * @param {google.container.v1beta1.IRayClusterMonitoringConfig=} [properties] Properties to set - */ - function RayClusterMonitoringConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RayClusterMonitoringConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @instance - */ - RayClusterMonitoringConfig.prototype.enabled = false; - - /** - * Creates a new RayClusterMonitoringConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1beta1.IRayClusterMonitoringConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig instance - */ - RayClusterMonitoringConfig.create = function create(properties) { - return new RayClusterMonitoringConfig(properties); - }; - - /** - * Encodes the specified RayClusterMonitoringConfig message. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1beta1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterMonitoringConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified RayClusterMonitoringConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.RayClusterMonitoringConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1beta1.IRayClusterMonitoringConfig} message RayClusterMonitoringConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RayClusterMonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterMonitoringConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.RayClusterMonitoringConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RayClusterMonitoringConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RayClusterMonitoringConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RayClusterMonitoringConfig message. - * @function verify - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RayClusterMonitoringConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a RayClusterMonitoringConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.RayClusterMonitoringConfig} RayClusterMonitoringConfig - */ - RayClusterMonitoringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.RayClusterMonitoringConfig) - return object; - var message = new $root.google.container.v1beta1.RayClusterMonitoringConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a RayClusterMonitoringConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {google.container.v1beta1.RayClusterMonitoringConfig} message RayClusterMonitoringConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RayClusterMonitoringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this RayClusterMonitoringConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @instance - * @returns {Object.} JSON object - */ - RayClusterMonitoringConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RayClusterMonitoringConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.RayClusterMonitoringConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RayClusterMonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.RayClusterMonitoringConfig"; - }; - - return RayClusterMonitoringConfig; - })(); - - v1beta1.NodePoolLoggingConfig = (function() { - - /** - * Properties of a NodePoolLoggingConfig. - * @memberof google.container.v1beta1 - * @interface INodePoolLoggingConfig - * @property {google.container.v1beta1.ILoggingVariantConfig|null} [variantConfig] NodePoolLoggingConfig variantConfig - */ - - /** - * Constructs a new NodePoolLoggingConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a NodePoolLoggingConfig. - * @implements INodePoolLoggingConfig - * @constructor - * @param {google.container.v1beta1.INodePoolLoggingConfig=} [properties] Properties to set - */ - function NodePoolLoggingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodePoolLoggingConfig variantConfig. - * @member {google.container.v1beta1.ILoggingVariantConfig|null|undefined} variantConfig - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @instance - */ - NodePoolLoggingConfig.prototype.variantConfig = null; - - /** - * Creates a new NodePoolLoggingConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {google.container.v1beta1.INodePoolLoggingConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig instance - */ - NodePoolLoggingConfig.create = function create(properties) { - return new NodePoolLoggingConfig(properties); - }; - - /** - * Encodes the specified NodePoolLoggingConfig message. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {google.container.v1beta1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolLoggingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.variantConfig != null && Object.hasOwnProperty.call(message, "variantConfig")) - $root.google.container.v1beta1.LoggingVariantConfig.encode(message.variantConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodePoolLoggingConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.NodePoolLoggingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {google.container.v1beta1.INodePoolLoggingConfig} message NodePoolLoggingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePoolLoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolLoggingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.NodePoolLoggingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePoolLoggingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePoolLoggingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePoolLoggingConfig message. - * @function verify - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePoolLoggingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) { - var error = $root.google.container.v1beta1.LoggingVariantConfig.verify(message.variantConfig); - if (error) - return "variantConfig." + error; - } - return null; - }; - - /** - * Creates a NodePoolLoggingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.NodePoolLoggingConfig} NodePoolLoggingConfig - */ - NodePoolLoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.NodePoolLoggingConfig) - return object; - var message = new $root.google.container.v1beta1.NodePoolLoggingConfig(); - if (object.variantConfig != null) { - if (typeof object.variantConfig !== "object") - throw TypeError(".google.container.v1beta1.NodePoolLoggingConfig.variantConfig: object expected"); - message.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.fromObject(object.variantConfig); - } - return message; - }; - - /** - * Creates a plain object from a NodePoolLoggingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {google.container.v1beta1.NodePoolLoggingConfig} message NodePoolLoggingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePoolLoggingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.variantConfig = null; - if (message.variantConfig != null && message.hasOwnProperty("variantConfig")) - object.variantConfig = $root.google.container.v1beta1.LoggingVariantConfig.toObject(message.variantConfig, options); - return object; - }; - - /** - * Converts this NodePoolLoggingConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @instance - * @returns {Object.} JSON object - */ - NodePoolLoggingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePoolLoggingConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.NodePoolLoggingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePoolLoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.NodePoolLoggingConfig"; - }; - - return NodePoolLoggingConfig; - })(); - - v1beta1.LoggingVariantConfig = (function() { - - /** - * Properties of a LoggingVariantConfig. - * @memberof google.container.v1beta1 - * @interface ILoggingVariantConfig - * @property {google.container.v1beta1.LoggingVariantConfig.Variant|null} [variant] LoggingVariantConfig variant - */ - - /** - * Constructs a new LoggingVariantConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a LoggingVariantConfig. - * @implements ILoggingVariantConfig - * @constructor - * @param {google.container.v1beta1.ILoggingVariantConfig=} [properties] Properties to set - */ - function LoggingVariantConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoggingVariantConfig variant. - * @member {google.container.v1beta1.LoggingVariantConfig.Variant} variant - * @memberof google.container.v1beta1.LoggingVariantConfig - * @instance - */ - LoggingVariantConfig.prototype.variant = 0; - - /** - * Creates a new LoggingVariantConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {google.container.v1beta1.ILoggingVariantConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig instance - */ - LoggingVariantConfig.create = function create(properties) { - return new LoggingVariantConfig(properties); - }; - - /** - * Encodes the specified LoggingVariantConfig message. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {google.container.v1beta1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingVariantConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.variant != null && Object.hasOwnProperty.call(message, "variant")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.variant); - return writer; - }; - - /** - * Encodes the specified LoggingVariantConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.LoggingVariantConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {google.container.v1beta1.ILoggingVariantConfig} message LoggingVariantConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingVariantConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingVariantConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.LoggingVariantConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.variant = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingVariantConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingVariantConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingVariantConfig message. - * @function verify - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoggingVariantConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.variant != null && message.hasOwnProperty("variant")) - switch (message.variant) { - default: - return "variant: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a LoggingVariantConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.LoggingVariantConfig} LoggingVariantConfig - */ - LoggingVariantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.LoggingVariantConfig) - return object; - var message = new $root.google.container.v1beta1.LoggingVariantConfig(); - switch (object.variant) { - default: - if (typeof object.variant === "number") { - message.variant = object.variant; - break; - } - break; - case "VARIANT_UNSPECIFIED": - case 0: - message.variant = 0; - break; - case "DEFAULT": - case 1: - message.variant = 1; - break; - case "MAX_THROUGHPUT": - case 2: - message.variant = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoggingVariantConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {google.container.v1beta1.LoggingVariantConfig} message LoggingVariantConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingVariantConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.variant = options.enums === String ? "VARIANT_UNSPECIFIED" : 0; - if (message.variant != null && message.hasOwnProperty("variant")) - object.variant = options.enums === String ? $root.google.container.v1beta1.LoggingVariantConfig.Variant[message.variant] === undefined ? message.variant : $root.google.container.v1beta1.LoggingVariantConfig.Variant[message.variant] : message.variant; - return object; - }; - - /** - * Converts this LoggingVariantConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.LoggingVariantConfig - * @instance - * @returns {Object.} JSON object - */ - LoggingVariantConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoggingVariantConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.LoggingVariantConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingVariantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.LoggingVariantConfig"; - }; - - /** - * Variant enum. - * @name google.container.v1beta1.LoggingVariantConfig.Variant - * @enum {number} - * @property {number} VARIANT_UNSPECIFIED=0 VARIANT_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} MAX_THROUGHPUT=2 MAX_THROUGHPUT value - */ - LoggingVariantConfig.Variant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "MAX_THROUGHPUT"] = 2; - return values; - })(); - - return LoggingVariantConfig; - })(); - - v1beta1.MonitoringComponentConfig = (function() { - - /** - * Properties of a MonitoringComponentConfig. - * @memberof google.container.v1beta1 - * @interface IMonitoringComponentConfig - * @property {Array.|null} [enableComponents] MonitoringComponentConfig enableComponents - */ - - /** - * Constructs a new MonitoringComponentConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a MonitoringComponentConfig. - * @implements IMonitoringComponentConfig - * @constructor - * @param {google.container.v1beta1.IMonitoringComponentConfig=} [properties] Properties to set - */ - function MonitoringComponentConfig(properties) { - this.enableComponents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoringComponentConfig enableComponents. - * @member {Array.} enableComponents - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @instance - */ - MonitoringComponentConfig.prototype.enableComponents = $util.emptyArray; - - /** - * Creates a new MonitoringComponentConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {google.container.v1beta1.IMonitoringComponentConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig instance - */ - MonitoringComponentConfig.create = function create(properties) { - return new MonitoringComponentConfig(properties); - }; - - /** - * Encodes the specified MonitoringComponentConfig message. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {google.container.v1beta1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringComponentConfig.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(); - } - return writer; - }; - - /** - * Encodes the specified MonitoringComponentConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.MonitoringComponentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {google.container.v1beta1.IMonitoringComponentConfig} message MonitoringComponentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringComponentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.MonitoringComponentConfig(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonitoringComponentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringComponentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoringComponentConfig message. - * @function verify - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoringComponentConfig.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: - case 3: - case 4: - case 5: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - } - return null; - }; - - /** - * Creates a MonitoringComponentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.MonitoringComponentConfig} MonitoringComponentConfig - */ - MonitoringComponentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.MonitoringComponentConfig) - return object; - var message = new $root.google.container.v1beta1.MonitoringComponentConfig(); - if (object.enableComponents) { - if (!Array.isArray(object.enableComponents)) - throw TypeError(".google.container.v1beta1.MonitoringComponentConfig.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; - case "APISERVER": - case 3: - message.enableComponents[i] = 3; - break; - case "SCHEDULER": - case 4: - message.enableComponents[i] = 4; - break; - case "CONTROLLER_MANAGER": - case 5: - message.enableComponents[i] = 5; - break; - case "STORAGE": - case 7: - message.enableComponents[i] = 7; - break; - case "HPA": - case 8: - message.enableComponents[i] = 8; - break; - case "POD": - case 9: - message.enableComponents[i] = 9; - break; - case "DAEMONSET": - case 10: - message.enableComponents[i] = 10; - break; - case "DEPLOYMENT": - case 11: - message.enableComponents[i] = 11; - break; - case "STATEFULSET": - case 12: - message.enableComponents[i] = 12; - break; - case "CADVISOR": - case 13: - message.enableComponents[i] = 13; - break; - case "KUBELET": - case 14: - message.enableComponents[i] = 14; - break; - case "DCGM": - case 15: - message.enableComponents[i] = 15; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {google.container.v1beta1.MonitoringComponentConfig} message MonitoringComponentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoringComponentConfig.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.container.v1beta1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1beta1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; - } - return object; - }; - - /** - * Converts this MonitoringComponentConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @instance - * @returns {Object.} JSON object - */ - MonitoringComponentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonitoringComponentConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.MonitoringComponentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.MonitoringComponentConfig"; - }; - - /** - * Component enum. - * @name google.container.v1beta1.MonitoringComponentConfig.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 - * @property {number} APISERVER=3 APISERVER value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value - * @property {number} STORAGE=7 STORAGE value - * @property {number} HPA=8 HPA value - * @property {number} POD=9 POD value - * @property {number} DAEMONSET=10 DAEMONSET value - * @property {number} DEPLOYMENT=11 DEPLOYMENT value - * @property {number} STATEFULSET=12 STATEFULSET value - * @property {number} CADVISOR=13 CADVISOR value - * @property {number} KUBELET=14 KUBELET value - * @property {number} DCGM=15 DCGM value - */ - MonitoringComponentConfig.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; - values[valuesById[3] = "APISERVER"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; - values[valuesById[7] = "STORAGE"] = 7; - values[valuesById[8] = "HPA"] = 8; - values[valuesById[9] = "POD"] = 9; - values[valuesById[10] = "DAEMONSET"] = 10; - values[valuesById[11] = "DEPLOYMENT"] = 11; - values[valuesById[12] = "STATEFULSET"] = 12; - values[valuesById[13] = "CADVISOR"] = 13; - values[valuesById[14] = "KUBELET"] = 14; - values[valuesById[15] = "DCGM"] = 15; - return values; - })(); - - return MonitoringComponentConfig; - })(); - - /** - * DatapathProvider enum. - * @name google.container.v1beta1.DatapathProvider - * @enum {number} - * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value - * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value - * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value - */ - v1beta1.DatapathProvider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEGACY_DATAPATH"] = 1; - values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; - return values; - })(); - - v1beta1.Fleet = (function() { - - /** - * Properties of a Fleet. - * @memberof google.container.v1beta1 - * @interface IFleet - * @property {string|null} [project] Fleet project - * @property {string|null} [membership] Fleet membership - * @property {boolean|null} [preRegistered] Fleet preRegistered - */ - - /** - * Constructs a new Fleet. - * @memberof google.container.v1beta1 - * @classdesc Represents a Fleet. - * @implements IFleet - * @constructor - * @param {google.container.v1beta1.IFleet=} [properties] Properties to set - */ - function Fleet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Fleet project. - * @member {string} project - * @memberof google.container.v1beta1.Fleet - * @instance - */ - Fleet.prototype.project = ""; - - /** - * Fleet membership. - * @member {string} membership - * @memberof google.container.v1beta1.Fleet - * @instance - */ - Fleet.prototype.membership = ""; - - /** - * Fleet preRegistered. - * @member {boolean} preRegistered - * @memberof google.container.v1beta1.Fleet - * @instance - */ - Fleet.prototype.preRegistered = false; - - /** - * Creates a new Fleet instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.Fleet - * @static - * @param {google.container.v1beta1.IFleet=} [properties] Properties to set - * @returns {google.container.v1beta1.Fleet} Fleet instance - */ - Fleet.create = function create(properties) { - return new Fleet(properties); - }; - - /** - * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1beta1.Fleet.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.Fleet - * @static - * @param {google.container.v1beta1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.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.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); - return writer; - }; - - /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1beta1.Fleet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.Fleet - * @static - * @param {google.container.v1beta1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Fleet message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.Fleet} Fleet - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.Fleet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.membership = reader.string(); - break; - } - case 3: { - message.preRegistered = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.Fleet} Fleet - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Fleet message. - * @function verify - * @memberof google.container.v1beta1.Fleet - * @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) { - 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.preRegistered != null && message.hasOwnProperty("preRegistered")) - if (typeof message.preRegistered !== "boolean") - return "preRegistered: boolean expected"; - return null; - }; - - /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.Fleet - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.Fleet} Fleet - */ - Fleet.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.Fleet) - return object; - var message = new $root.google.container.v1beta1.Fleet(); - if (object.project != null) - message.project = String(object.project); - if (object.membership != null) - message.membership = String(object.membership); - if (object.preRegistered != null) - message.preRegistered = Boolean(object.preRegistered); - return message; - }; - - /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.Fleet - * @static - * @param {google.container.v1beta1.Fleet} message Fleet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fleet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.membership = ""; - object.preRegistered = false; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; - if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) - object.preRegistered = message.preRegistered; - return object; - }; - - /** - * Converts this Fleet to JSON. - * @function toJSON - * @memberof google.container.v1beta1.Fleet - * @instance - * @returns {Object.} JSON object - */ - Fleet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Fleet - * @function getTypeUrl - * @memberof google.container.v1beta1.Fleet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.Fleet"; - }; - - return Fleet; - })(); - - /** - * StackType enum. - * @name google.container.v1beta1.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4=1 IPV4 value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - v1beta1.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - v1beta1.ResourceManagerTags = (function() { - - /** - * Properties of a ResourceManagerTags. - * @memberof google.container.v1beta1 - * @interface IResourceManagerTags - * @property {Object.|null} [tags] ResourceManagerTags tags - */ - - /** - * Constructs a new ResourceManagerTags. - * @memberof google.container.v1beta1 - * @classdesc Represents a ResourceManagerTags. - * @implements IResourceManagerTags - * @constructor - * @param {google.container.v1beta1.IResourceManagerTags=} [properties] Properties to set - */ - function ResourceManagerTags(properties) { - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceManagerTags tags. - * @member {Object.} tags - * @memberof google.container.v1beta1.ResourceManagerTags - * @instance - */ - ResourceManagerTags.prototype.tags = $util.emptyObject; - - /** - * Creates a new ResourceManagerTags instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {google.container.v1beta1.IResourceManagerTags=} [properties] Properties to set - * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags instance - */ - ResourceManagerTags.create = function create(properties) { - return new ResourceManagerTags(properties); - }; - - /** - * Encodes the specified ResourceManagerTags message. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {google.container.v1beta1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceManagerTags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceManagerTags message, length delimited. Does not implicitly {@link google.container.v1beta1.ResourceManagerTags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {google.container.v1beta1.IResourceManagerTags} message ResourceManagerTags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceManagerTags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceManagerTags.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.ResourceManagerTags(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceManagerTags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceManagerTags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceManagerTags message. - * @function verify - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceManagerTags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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"; - } - return null; - }; - - /** - * Creates a ResourceManagerTags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.ResourceManagerTags} ResourceManagerTags - */ - ResourceManagerTags.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.ResourceManagerTags) - return object; - var message = new $root.google.container.v1beta1.ResourceManagerTags(); - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.container.v1beta1.ResourceManagerTags.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]]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceManagerTags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {google.container.v1beta1.ResourceManagerTags} message ResourceManagerTags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceManagerTags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.tags = {}; - 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]]; - } - return object; - }; - - /** - * Converts this ResourceManagerTags to JSON. - * @function toJSON - * @memberof google.container.v1beta1.ResourceManagerTags - * @instance - * @returns {Object.} JSON object - */ - ResourceManagerTags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceManagerTags - * @function getTypeUrl - * @memberof google.container.v1beta1.ResourceManagerTags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceManagerTags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.ResourceManagerTags"; - }; - - return ResourceManagerTags; - })(); - - v1beta1.EnterpriseConfig = (function() { - - /** - * Properties of an EnterpriseConfig. - * @memberof google.container.v1beta1 - * @interface IEnterpriseConfig - * @property {google.container.v1beta1.EnterpriseConfig.ClusterTier|null} [clusterTier] EnterpriseConfig clusterTier - */ - - /** - * Constructs a new EnterpriseConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents an EnterpriseConfig. - * @implements IEnterpriseConfig - * @constructor - * @param {google.container.v1beta1.IEnterpriseConfig=} [properties] Properties to set - */ - function EnterpriseConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnterpriseConfig clusterTier. - * @member {google.container.v1beta1.EnterpriseConfig.ClusterTier} clusterTier - * @memberof google.container.v1beta1.EnterpriseConfig - * @instance - */ - EnterpriseConfig.prototype.clusterTier = 0; - - /** - * Creates a new EnterpriseConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {google.container.v1beta1.IEnterpriseConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig instance - */ - EnterpriseConfig.create = function create(properties) { - return new EnterpriseConfig(properties); - }; - - /** - * Encodes the specified EnterpriseConfig message. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {google.container.v1beta1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnterpriseConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterTier); - return writer; - }; - - /** - * Encodes the specified EnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.EnterpriseConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {google.container.v1beta1.IEnterpriseConfig} message EnterpriseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnterpriseConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.EnterpriseConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.clusterTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnterpriseConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnterpriseConfig message. - * @function verify - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnterpriseConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) - switch (message.clusterTier) { - default: - return "clusterTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an EnterpriseConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.EnterpriseConfig} EnterpriseConfig - */ - EnterpriseConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.EnterpriseConfig) - return object; - var message = new $root.google.container.v1beta1.EnterpriseConfig(); - switch (object.clusterTier) { - default: - if (typeof object.clusterTier === "number") { - message.clusterTier = object.clusterTier; - break; - } - break; - case "CLUSTER_TIER_UNSPECIFIED": - case 0: - message.clusterTier = 0; - break; - case "STANDARD": - case 1: - message.clusterTier = 1; - break; - case "ENTERPRISE": - case 2: - message.clusterTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EnterpriseConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {google.container.v1beta1.EnterpriseConfig} message EnterpriseConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnterpriseConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; - if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) - object.clusterTier = options.enums === String ? $root.google.container.v1beta1.EnterpriseConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.container.v1beta1.EnterpriseConfig.ClusterTier[message.clusterTier] : message.clusterTier; - return object; - }; - - /** - * Converts this EnterpriseConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.EnterpriseConfig - * @instance - * @returns {Object.} JSON object - */ - EnterpriseConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnterpriseConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.EnterpriseConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.EnterpriseConfig"; - }; - - /** - * ClusterTier enum. - * @name google.container.v1beta1.EnterpriseConfig.ClusterTier - * @enum {number} - * @property {number} CLUSTER_TIER_UNSPECIFIED=0 CLUSTER_TIER_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} ENTERPRISE=2 ENTERPRISE value - */ - EnterpriseConfig.ClusterTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLUSTER_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "ENTERPRISE"] = 2; - return values; - })(); - - return EnterpriseConfig; - })(); - - v1beta1.SecretManagerConfig = (function() { - - /** - * Properties of a SecretManagerConfig. - * @memberof google.container.v1beta1 - * @interface ISecretManagerConfig - * @property {boolean|null} [enabled] SecretManagerConfig enabled - */ - - /** - * Constructs a new SecretManagerConfig. - * @memberof google.container.v1beta1 - * @classdesc Represents a SecretManagerConfig. - * @implements ISecretManagerConfig - * @constructor - * @param {google.container.v1beta1.ISecretManagerConfig=} [properties] Properties to set - */ - function SecretManagerConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecretManagerConfig enabled. - * @member {boolean|null|undefined} enabled - * @memberof google.container.v1beta1.SecretManagerConfig - * @instance - */ - SecretManagerConfig.prototype.enabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SecretManagerConfig _enabled. - * @member {"enabled"|undefined} _enabled - * @memberof google.container.v1beta1.SecretManagerConfig - * @instance - */ - Object.defineProperty(SecretManagerConfig.prototype, "_enabled", { - get: $util.oneOfGetter($oneOfFields = ["enabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SecretManagerConfig instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {google.container.v1beta1.ISecretManagerConfig=} [properties] Properties to set - * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig instance - */ - SecretManagerConfig.create = function create(properties) { - return new SecretManagerConfig(properties); - }; - - /** - * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {google.container.v1beta1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecretManagerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.SecretManagerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {google.container.v1beta1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecretManagerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecretManagerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecretManagerConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecretManagerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecretManagerConfig message. - * @function verify - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecretManagerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - properties._enabled = 1; - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - } - return null; - }; - - /** - * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SecretManagerConfig} SecretManagerConfig - */ - SecretManagerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SecretManagerConfig) - return object; - var message = new $root.google.container.v1beta1.SecretManagerConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {google.container.v1beta1.SecretManagerConfig} message SecretManagerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecretManagerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - object.enabled = message.enabled; - if (options.oneofs) - object._enabled = "enabled"; - } - return object; - }; - - /** - * Converts this SecretManagerConfig to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SecretManagerConfig - * @instance - * @returns {Object.} JSON object - */ - SecretManagerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecretManagerConfig - * @function getTypeUrl - * @memberof google.container.v1beta1.SecretManagerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecretManagerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SecretManagerConfig"; - }; - - return SecretManagerConfig; - })(); - - v1beta1.SecondaryBootDisk = (function() { - - /** - * Properties of a SecondaryBootDisk. - * @memberof google.container.v1beta1 - * @interface ISecondaryBootDisk - * @property {google.container.v1beta1.SecondaryBootDisk.Mode|null} [mode] SecondaryBootDisk mode - * @property {string|null} [diskImage] SecondaryBootDisk diskImage - */ - - /** - * Constructs a new SecondaryBootDisk. - * @memberof google.container.v1beta1 - * @classdesc Represents a SecondaryBootDisk. - * @implements ISecondaryBootDisk - * @constructor - * @param {google.container.v1beta1.ISecondaryBootDisk=} [properties] Properties to set - */ - function SecondaryBootDisk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecondaryBootDisk mode. - * @member {google.container.v1beta1.SecondaryBootDisk.Mode} mode - * @memberof google.container.v1beta1.SecondaryBootDisk - * @instance - */ - SecondaryBootDisk.prototype.mode = 0; - - /** - * SecondaryBootDisk diskImage. - * @member {string} diskImage - * @memberof google.container.v1beta1.SecondaryBootDisk - * @instance - */ - SecondaryBootDisk.prototype.diskImage = ""; - - /** - * Creates a new SecondaryBootDisk instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {google.container.v1beta1.ISecondaryBootDisk=} [properties] Properties to set - * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk instance - */ - SecondaryBootDisk.create = function create(properties) { - return new SecondaryBootDisk(properties); - }; - - /** - * Encodes the specified SecondaryBootDisk message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {google.container.v1beta1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.diskImage != null && Object.hasOwnProperty.call(message, "diskImage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diskImage); - return writer; - }; - - /** - * Encodes the specified SecondaryBootDisk message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {google.container.v1beta1.ISecondaryBootDisk} message SecondaryBootDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDisk.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecondaryBootDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - case 2: { - message.diskImage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecondaryBootDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecondaryBootDisk message. - * @function verify - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecondaryBootDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - break; - } - if (message.diskImage != null && message.hasOwnProperty("diskImage")) - if (!$util.isString(message.diskImage)) - return "diskImage: string expected"; - return null; - }; - - /** - * Creates a SecondaryBootDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SecondaryBootDisk} SecondaryBootDisk - */ - SecondaryBootDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SecondaryBootDisk) - return object; - var message = new $root.google.container.v1beta1.SecondaryBootDisk(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "CONTAINER_IMAGE_CACHE": - case 1: - message.mode = 1; - break; - } - if (object.diskImage != null) - message.diskImage = String(object.diskImage); - return message; - }; - - /** - * Creates a plain object from a SecondaryBootDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {google.container.v1beta1.SecondaryBootDisk} message SecondaryBootDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecondaryBootDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - object.diskImage = ""; - } - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.container.v1beta1.SecondaryBootDisk.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1beta1.SecondaryBootDisk.Mode[message.mode] : message.mode; - if (message.diskImage != null && message.hasOwnProperty("diskImage")) - object.diskImage = message.diskImage; - return object; - }; - - /** - * Converts this SecondaryBootDisk to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SecondaryBootDisk - * @instance - * @returns {Object.} JSON object - */ - SecondaryBootDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecondaryBootDisk - * @function getTypeUrl - * @memberof google.container.v1beta1.SecondaryBootDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecondaryBootDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SecondaryBootDisk"; - }; - - /** - * Mode enum. - * @name google.container.v1beta1.SecondaryBootDisk.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} CONTAINER_IMAGE_CACHE=1 CONTAINER_IMAGE_CACHE value - */ - SecondaryBootDisk.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONTAINER_IMAGE_CACHE"] = 1; - return values; - })(); - - return SecondaryBootDisk; - })(); - - /** - * InTransitEncryptionConfig enum. - * @name google.container.v1beta1.InTransitEncryptionConfig - * @enum {number} - * @property {number} IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED=0 IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED value - * @property {number} IN_TRANSIT_ENCRYPTION_DISABLED=1 IN_TRANSIT_ENCRYPTION_DISABLED value - * @property {number} IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT=2 IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT value - */ - v1beta1.InTransitEncryptionConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_TRANSIT_ENCRYPTION_DISABLED"] = 1; - values[valuesById[2] = "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT"] = 2; - return values; - })(); - - v1beta1.SecondaryBootDiskUpdateStrategy = (function() { - - /** - * Properties of a SecondaryBootDiskUpdateStrategy. - * @memberof google.container.v1beta1 - * @interface ISecondaryBootDiskUpdateStrategy - */ - - /** - * Constructs a new SecondaryBootDiskUpdateStrategy. - * @memberof google.container.v1beta1 - * @classdesc Represents a SecondaryBootDiskUpdateStrategy. - * @implements ISecondaryBootDiskUpdateStrategy - * @constructor - * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set - */ - function SecondaryBootDiskUpdateStrategy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SecondaryBootDiskUpdateStrategy instance using the specified properties. - * @function create - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy=} [properties] Properties to set - * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy instance - */ - SecondaryBootDiskUpdateStrategy.create = function create(properties) { - return new SecondaryBootDiskUpdateStrategy(properties); - }; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @function encode - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDiskUpdateStrategy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SecondaryBootDiskUpdateStrategy message, length delimited. Does not implicitly {@link google.container.v1beta1.SecondaryBootDiskUpdateStrategy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1beta1.ISecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecondaryBootDiskUpdateStrategy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDiskUpdateStrategy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecondaryBootDiskUpdateStrategy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecondaryBootDiskUpdateStrategy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecondaryBootDiskUpdateStrategy message. - * @function verify - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecondaryBootDiskUpdateStrategy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SecondaryBootDiskUpdateStrategy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} SecondaryBootDiskUpdateStrategy - */ - SecondaryBootDiskUpdateStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy) - return object; - return new $root.google.container.v1beta1.SecondaryBootDiskUpdateStrategy(); - }; - - /** - * Creates a plain object from a SecondaryBootDiskUpdateStrategy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {google.container.v1beta1.SecondaryBootDiskUpdateStrategy} message SecondaryBootDiskUpdateStrategy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecondaryBootDiskUpdateStrategy.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SecondaryBootDiskUpdateStrategy to JSON. - * @function toJSON - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @instance - * @returns {Object.} JSON object - */ - SecondaryBootDiskUpdateStrategy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecondaryBootDiskUpdateStrategy - * @function getTypeUrl - * @memberof google.container.v1beta1.SecondaryBootDiskUpdateStrategy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecondaryBootDiskUpdateStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1beta1.SecondaryBootDiskUpdateStrategy"; - }; - - return SecondaryBootDiskUpdateStrategy; - })(); - - return v1beta1; - })(); - - return container; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.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.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.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.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - 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.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), 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.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - 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.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - 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.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.DoubleValue = (function() { - - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ - - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; - - return DoubleValue; - })(); - - protobuf.FloatValue = (function() { - - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ - - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; - - /** - * Creates a new FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ - - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; - - return UInt32Value; - })(); - - protobuf.BoolValue = (function() { - - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ - - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; - - /** - * Creates a new BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { - - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ - - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; - - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; - - return BytesValue; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - return protobuf; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - /** - * Code enum. - * @name google.rpc.Code - * @enum {number} - * @property {number} OK=0 OK value - * @property {number} CANCELLED=1 CANCELLED value - * @property {number} UNKNOWN=2 UNKNOWN value - * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value - * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value - * @property {number} NOT_FOUND=5 NOT_FOUND value - * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value - * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value - * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value - * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value - * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value - * @property {number} ABORTED=10 ABORTED value - * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value - * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value - * @property {number} INTERNAL=13 INTERNAL value - * @property {number} UNAVAILABLE=14 UNAVAILABLE value - * @property {number} DATA_LOSS=15 DATA_LOSS value - */ - rpc.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OK"] = 0; - values[valuesById[1] = "CANCELLED"] = 1; - values[valuesById[2] = "UNKNOWN"] = 2; - values[valuesById[3] = "INVALID_ARGUMENT"] = 3; - values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; - values[valuesById[5] = "NOT_FOUND"] = 5; - values[valuesById[6] = "ALREADY_EXISTS"] = 6; - values[valuesById[7] = "PERMISSION_DENIED"] = 7; - values[valuesById[16] = "UNAUTHENTICATED"] = 16; - values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; - values[valuesById[9] = "FAILED_PRECONDITION"] = 9; - values[valuesById[10] = "ABORTED"] = 10; - values[valuesById[11] = "OUT_OF_RANGE"] = 11; - values[valuesById[12] = "UNIMPLEMENTED"] = 12; - values[valuesById[13] = "INTERNAL"] = 13; - values[valuesById[14] = "UNAVAILABLE"] = 14; - values[valuesById[15] = "DATA_LOSS"] = 15; - return values; - })(); - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Date = (function() { - - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ - - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; - - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; - - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-container/v1beta1/protos/protos.json b/owl-bot-staging/google-container/v1beta1/protos/protos.json deleted file mode 100644 index 9a8f8b114db..00000000000 --- a/owl-bot-staging/google-container/v1beta1/protos/protos.json +++ /dev/null @@ -1,9015 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "container": { - "nested": { - "v1beta1": { - "options": { - "csharp_namespace": "Google.Cloud.Container.V1Beta1", - "go_package": "cloud.google.com/go/container/apiv1beta1/containerpb;containerpb", - "java_multiple_files": true, - "java_outer_classname": "ClusterServiceProto", - "java_package": "com.google.container.v1beta1", - "php_namespace": "Google\\Cloud\\Container\\V1beta1", - "ruby_package": "Google::Cloud::Container::V1beta1", - "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", - "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" - }, - "nested": { - "ClusterManager": { - "options": { - "(google.api.default_host)": "container.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListClusters": { - "requestType": "ListClustersRequest", - "responseType": "ListClustersResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/clusters", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", - "(google.api.method_signature)": "project_id,zone" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/clusters", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - } - ] - }, - "GetCluster": { - "requestType": "GetClusterRequest", - "responseType": "Cluster", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - } - ] - }, - "CreateCluster": { - "requestType": "CreateClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/clusters", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/clusters", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster" - } - ] - }, - "UpdateCluster": { - "requestType": "UpdateClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).put": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.put": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,update" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "body": "*", - "additional_bindings": { - "put": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,update" - } - ] - }, - "UpdateNodePool": { - "requestType": "UpdateNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).put": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", - "body": "*" - } - } - } - ] - }, - "SetNodePoolAutoscaling": { - "requestType": "SetNodePoolAutoscalingRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", - "body": "*" - } - } - } - ] - }, - "SetLoggingService": { - "requestType": "SetLoggingServiceRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLogging", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,logging_service" - } - ] - }, - "SetMonitoringService": { - "requestType": "SetMonitoringServiceRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMonitoring", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,monitoring_service" - } - ] - }, - "SetAddonsConfig": { - "requestType": "SetAddonsConfigRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setAddons", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,addons_config" - } - ] - }, - "SetLocations": { - "requestType": "SetLocationsRequest", - "responseType": "Operation", - "options": { - "deprecated": true, - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,locations" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLocations", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,locations" - } - ] - }, - "UpdateMaster": { - "requestType": "UpdateMasterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:updateMaster", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,master_version" - } - ] - }, - "SetMasterAuth": { - "requestType": "SetMasterAuthRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMasterAuth", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", - "body": "*" - } - } - } - ] - }, - "DeleteCluster": { - "requestType": "DeleteClusterRequest", - "responseType": "Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "(google.api.http).additional_bindings.delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/clusters/*}", - "additional_bindings": { - "delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - } - ] - }, - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/operations", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/operations", - "(google.api.method_signature)": "project_id,zone" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/operations", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/operations" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/operations/*}", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}", - "(google.api.method_signature)": "project_id,zone,operation_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/operations/*}", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,operation_id" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,operation_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/operations/*}:cancel", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,operation_id" - } - ] - }, - "GetServerConfig": { - "requestType": "GetServerConfigRequest", - "responseType": "ServerConfig", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*}/serverConfig", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig", - "(google.api.method_signature)": "project_id,zone" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*}/serverConfig", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/serverconfig" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone" - } - ] - }, - "GetJSONWebKeys": { - "requestType": "GetJSONWebKeysRequest", - "responseType": "GetJSONWebKeysResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - } - } - ] - }, - "ListNodePools": { - "requestType": "ListNodePoolsRequest", - "responseType": "ListNodePoolsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - } - ] - }, - "GetNodePool": { - "requestType": "GetNodePoolRequest", - "responseType": "NodePool", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).additional_bindings.get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "additional_bindings": { - "get": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - } - ] - }, - "CreateNodePool": { - "requestType": "CreateNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/nodePools", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool" - } - ] - }, - "DeleteNodePool": { - "requestType": "DeleteNodePoolRequest", - "responseType": "Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "(google.api.http).additional_bindings.delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}", - "additional_bindings": { - "delete": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - } - ] - }, - "CompleteNodePoolUpgrade": { - "requestType": "CompleteNodePoolUpgradeRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade", - "body": "*" - } - } - ] - }, - "RollbackNodePoolUpgrade": { - "requestType": "RollbackNodePoolUpgradeRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id" - } - ] - }, - "SetNodePoolManagement": { - "requestType": "SetNodePoolManagementRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id,management" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,node_pool_id,management" - } - ] - }, - "SetLabels": { - "requestType": "SetLabelsRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,resource_labels,label_fingerprint" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setResourceLabels", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,resource_labels,label_fingerprint" - } - ] - }, - "SetLegacyAbac": { - "requestType": "SetLegacyAbacRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,enabled" - } - ] - }, - "StartIPRotation": { - "requestType": "StartIPRotationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:startIpRotation", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - } - ] - }, - "CompleteIPRotation": { - "requestType": "CompleteIPRotationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:completeIpRotation", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id" - } - ] - }, - "SetNodePoolSize": { - "requestType": "SetNodePoolSizeRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setSize", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", - "body": "*" - } - } - } - ] - }, - "SetNetworkPolicy": { - "requestType": "SetNetworkPolicyRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setNetworkPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,network_policy" - } - ] - }, - "SetMaintenancePolicy": { - "requestType": "SetMaintenancePolicyRequest", - "responseType": "Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/clusters/*}:setMaintenancePolicy", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "project_id,zone,cluster_id,maintenance_policy" - } - ] - }, - "ListUsableSubnetworks": { - "requestType": "ListUsableSubnetworksRequest", - "responseType": "ListUsableSubnetworksResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CheckAutopilotCompatibility": { - "requestType": "CheckAutopilotCompatibilityRequest", - "responseType": "CheckAutopilotCompatibilityResponse", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/clusters/*}:checkAutopilotCompatibility" - } - } - ] - }, - "ListLocations": { - "requestType": "ListLocationsRequest", - "responseType": "ListLocationsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*}/locations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*}/locations" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "LinuxNodeConfig": { - "oneofs": { - "_hugepages": { - "oneof": [ - "hugepages" - ] - } - }, - "fields": { - "sysctls": { - "keyType": "string", - "type": "string", - "id": 1 - }, - "cgroupMode": { - "type": "CgroupMode", - "id": 2 - }, - "hugepages": { - "type": "HugepagesConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "CgroupMode": { - "values": { - "CGROUP_MODE_UNSPECIFIED": 0, - "CGROUP_MODE_V1": 1, - "CGROUP_MODE_V2": 2 - } - }, - "HugepagesConfig": { - "oneofs": { - "_hugepageSize2m": { - "oneof": [ - "hugepageSize2m" - ] - }, - "_hugepageSize1g": { - "oneof": [ - "hugepageSize1g" - ] - } - }, - "fields": { - "hugepageSize2m": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "hugepageSize1g": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - } - } - }, - "WindowsNodeConfig": { - "fields": { - "osVersion": { - "type": "OSVersion", - "id": 1 - } - }, - "nested": { - "OSVersion": { - "values": { - "OS_VERSION_UNSPECIFIED": 0, - "OS_VERSION_LTSC2019": 1, - "OS_VERSION_LTSC2022": 2 - } - } - } - }, - "NodeKubeletConfig": { - "oneofs": { - "_insecureKubeletReadonlyPortEnabled": { - "oneof": [ - "insecureKubeletReadonlyPortEnabled" - ] - } - }, - "fields": { - "cpuManagerPolicy": { - "type": "string", - "id": 1 - }, - "cpuCfsQuota": { - "type": "google.protobuf.BoolValue", - "id": 2 - }, - "cpuCfsQuotaPeriod": { - "type": "string", - "id": 3 - }, - "podPidsLimit": { - "type": "int64", - "id": 4 - }, - "insecureKubeletReadonlyPortEnabled": { - "type": "bool", - "id": 7, - "options": { - "proto3_optional": true - } - } - } - }, - "NodeConfig": { - "oneofs": { - "_fastSocket": { - "oneof": [ - "fastSocket" - ] - }, - "_secondaryBootDiskUpdateStrategy": { - "oneof": [ - "secondaryBootDiskUpdateStrategy" - ] - } - }, - "fields": { - "machineType": { - "type": "string", - "id": 1 - }, - "diskSizeGb": { - "type": "int32", - "id": 2 - }, - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "serviceAccount": { - "type": "string", - "id": 9 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "imageType": { - "type": "string", - "id": 5 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6 - }, - "localSsdCount": { - "type": "int32", - "id": 7 - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "preemptible": { - "type": "bool", - "id": 10 - }, - "accelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 11 - }, - "sandboxConfig": { - "type": "SandboxConfig", - "id": 17 - }, - "nodeGroup": { - "type": "string", - "id": 18 - }, - "reservationAffinity": { - "type": "ReservationAffinity", - "id": 19 - }, - "diskType": { - "type": "string", - "id": 12 - }, - "minCpuPlatform": { - "type": "string", - "id": 13 - }, - "workloadMetadataConfig": { - "type": "WorkloadMetadataConfig", - "id": 14 - }, - "taints": { - "rule": "repeated", - "type": "NodeTaint", - "id": 15 - }, - "bootDiskKmsKey": { - "type": "string", - "id": 23 - }, - "shieldedInstanceConfig": { - "type": "ShieldedInstanceConfig", - "id": 20 - }, - "linuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 21 - }, - "kubeletConfig": { - "type": "NodeKubeletConfig", - "id": 22 - }, - "ephemeralStorageConfig": { - "type": "EphemeralStorageConfig", - "id": 24 - }, - "gcfsConfig": { - "type": "GcfsConfig", - "id": 25 - }, - "advancedMachineFeatures": { - "type": "AdvancedMachineFeatures", - "id": 26 - }, - "gvnic": { - "type": "VirtualNIC", - "id": 29 - }, - "spot": { - "type": "bool", - "id": 32 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 35 - }, - "fastSocket": { - "type": "FastSocket", - "id": 36, - "options": { - "proto3_optional": true - } - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 37 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 38 - }, - "windowsNodeConfig": { - "type": "WindowsNodeConfig", - "id": 39 - }, - "localNvmeSsdBlockConfig": { - "type": "LocalNvmeSsdBlockConfig", - "id": 40 - }, - "ephemeralStorageLocalSsdConfig": { - "type": "EphemeralStorageLocalSsdConfig", - "id": 41 - }, - "soleTenantConfig": { - "type": "SoleTenantConfig", - "id": 42 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 43 - }, - "hostMaintenancePolicy": { - "type": "HostMaintenancePolicy", - "id": 44 - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 45 - }, - "enableConfidentialStorage": { - "type": "bool", - "id": 46, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "secondaryBootDisks": { - "rule": "repeated", - "type": "SecondaryBootDisk", - "id": 48 - }, - "secondaryBootDiskUpdateStrategy": { - "type": "SecondaryBootDiskUpdateStrategy", - "id": 50, - "options": { - "proto3_optional": true - } - } - } - }, - "AdvancedMachineFeatures": { - "oneofs": { - "_threadsPerCore": { - "oneof": [ - "threadsPerCore" - ] - }, - "_enableNestedVirtualization": { - "oneof": [ - "enableNestedVirtualization" - ] - } - }, - "fields": { - "threadsPerCore": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "enableNestedVirtualization": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "NodeNetworkConfig": { - "oneofs": { - "_enablePrivateNodes": { - "oneof": [ - "enablePrivateNodes" - ] - }, - "_networkPerformanceConfig": { - "oneof": [ - "networkPerformanceConfig" - ] - } - }, - "fields": { - "createPodRange": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "podRange": { - "type": "string", - "id": 5 - }, - "podIpv4CidrBlock": { - "type": "string", - "id": 6 - }, - "enablePrivateNodes": { - "type": "bool", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "networkPerformanceConfig": { - "type": "NetworkPerformanceConfig", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "podCidrOverprovisionConfig": { - "type": "PodCIDROverprovisionConfig", - "id": 13 - }, - "additionalNodeNetworkConfigs": { - "rule": "repeated", - "type": "AdditionalNodeNetworkConfig", - "id": 14 - }, - "additionalPodNetworkConfigs": { - "rule": "repeated", - "type": "AdditionalPodNetworkConfig", - "id": 15 - }, - "podIpv4RangeUtilization": { - "type": "double", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "NetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - }, - "_externalIpEgressBandwidthTier": { - "oneof": [ - "externalIpEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "externalIpEgressBandwidthTier": { - "type": "Tier", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "TIER_1": 1 - } - } - } - } - } - }, - "AdditionalNodeNetworkConfig": { - "fields": { - "network": { - "type": "string", - "id": 1 - }, - "subnetwork": { - "type": "string", - "id": 2 - } - } - }, - "AdditionalPodNetworkConfig": { - "oneofs": { - "_maxPodsPerNode": { - "oneof": [ - "maxPodsPerNode" - ] - } - }, - "fields": { - "subnetwork": { - "type": "string", - "id": 1 - }, - "secondaryPodRange": { - "type": "string", - "id": 2 - }, - "maxPodsPerNode": { - "type": "MaxPodsConstraint", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "ShieldedInstanceConfig": { - "fields": { - "enableSecureBoot": { - "type": "bool", - "id": 1 - }, - "enableIntegrityMonitoring": { - "type": "bool", - "id": 2 - } - } - }, - "SandboxConfig": { - "fields": { - "sandboxType": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "type": { - "type": "Type", - "id": 2 - } - }, - "nested": { - "Type": { - "values": { - "UNSPECIFIED": 0, - "GVISOR": 1 - } - } - } - }, - "EphemeralStorageConfig": { - "fields": { - "localSsdCount": { - "type": "int32", - "id": 1 - } - } - }, - "LocalNvmeSsdBlockConfig": { - "fields": { - "localSsdCount": { - "type": "int32", - "id": 1 - } - } - }, - "EphemeralStorageLocalSsdConfig": { - "fields": { - "localSsdCount": { - "type": "int32", - "id": 1 - } - } - }, - "GcfsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ReservationAffinity": { - "fields": { - "consumeReservationType": { - "type": "Type", - "id": 1 - }, - "key": { - "type": "string", - "id": 2 - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Type": { - "values": { - "UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3 - } - } - } - }, - "SoleTenantConfig": { - "fields": { - "nodeAffinities": { - "rule": "repeated", - "type": "NodeAffinity", - "id": 1 - } - }, - "nested": { - "NodeAffinity": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "operator": { - "type": "Operator", - "id": 2 - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Operator": { - "values": { - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2 - } - } - } - } - } - }, - "ContainerdConfig": { - "fields": { - "privateRegistryAccessConfig": { - "type": "PrivateRegistryAccessConfig", - "id": 1 - } - }, - "nested": { - "PrivateRegistryAccessConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "certificateAuthorityDomainConfig": { - "rule": "repeated", - "type": "CertificateAuthorityDomainConfig", - "id": 2 - } - }, - "nested": { - "CertificateAuthorityDomainConfig": { - "oneofs": { - "certificateConfig": { - "oneof": [ - "gcpSecretManagerCertificateConfig" - ] - } - }, - "fields": { - "fqdns": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "gcpSecretManagerCertificateConfig": { - "type": "GCPSecretManagerCertificateConfig", - "id": 2 - } - }, - "nested": { - "GCPSecretManagerCertificateConfig": { - "fields": { - "secretUri": { - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } - }, - "HostMaintenancePolicy": { - "oneofs": { - "_maintenanceInterval": { - "oneof": [ - "maintenanceInterval" - ] - }, - "maintenanceStrategy": { - "oneof": [ - "opportunisticMaintenanceStrategy" - ] - } - }, - "fields": { - "maintenanceInterval": { - "type": "MaintenanceInterval", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "opportunisticMaintenanceStrategy": { - "type": "OpportunisticMaintenanceStrategy", - "id": 2 - } - }, - "nested": { - "MaintenanceInterval": { - "values": { - "MAINTENANCE_INTERVAL_UNSPECIFIED": 0, - "AS_NEEDED": 1, - "PERIODIC": 2 - } - }, - "OpportunisticMaintenanceStrategy": { - "oneofs": { - "_nodeIdleTimeWindow": { - "oneof": [ - "nodeIdleTimeWindow" - ] - }, - "_maintenanceAvailabilityWindow": { - "oneof": [ - "maintenanceAvailabilityWindow" - ] - }, - "_minNodesPerPool": { - "oneof": [ - "minNodesPerPool" - ] - } - }, - "fields": { - "nodeIdleTimeWindow": { - "type": "google.protobuf.Duration", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "maintenanceAvailabilityWindow": { - "type": "google.protobuf.Duration", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "minNodesPerPool": { - "type": "int64", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "NodeTaint": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "value": { - "type": "string", - "id": 2 - }, - "effect": { - "type": "Effect", - "id": 3 - } - }, - "nested": { - "Effect": { - "values": { - "EFFECT_UNSPECIFIED": 0, - "NO_SCHEDULE": 1, - "PREFER_NO_SCHEDULE": 2, - "NO_EXECUTE": 3 - } - } - } - }, - "NodeTaints": { - "fields": { - "taints": { - "rule": "repeated", - "type": "NodeTaint", - "id": 1 - } - } - }, - "NodeLabels": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "ResourceLabels": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "NetworkTags": { - "fields": { - "tags": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "MasterAuth": { - "fields": { - "username": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "password": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "clientCertificateConfig": { - "type": "ClientCertificateConfig", - "id": 3 - }, - "clusterCaCertificate": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientCertificate": { - "type": "string", - "id": 101, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientKey": { - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ClientCertificateConfig": { - "fields": { - "issueClientCertificate": { - "type": "bool", - "id": 1 - } - } - }, - "AddonsConfig": { - "fields": { - "httpLoadBalancing": { - "type": "HttpLoadBalancing", - "id": 1 - }, - "horizontalPodAutoscaling": { - "type": "HorizontalPodAutoscaling", - "id": 2 - }, - "kubernetesDashboard": { - "type": "KubernetesDashboard", - "id": 3, - "options": { - "deprecated": true - } - }, - "networkPolicyConfig": { - "type": "NetworkPolicyConfig", - "id": 4 - }, - "istioConfig": { - "type": "IstioConfig", - "id": 5, - "options": { - "deprecated": true - } - }, - "cloudRunConfig": { - "type": "CloudRunConfig", - "id": 7 - }, - "dnsCacheConfig": { - "type": "DnsCacheConfig", - "id": 8 - }, - "configConnectorConfig": { - "type": "ConfigConnectorConfig", - "id": 10 - }, - "gcePersistentDiskCsiDriverConfig": { - "type": "GcePersistentDiskCsiDriverConfig", - "id": 11 - }, - "kalmConfig": { - "type": "KalmConfig", - "id": 12, - "options": { - "deprecated": true - } - }, - "gcpFilestoreCsiDriverConfig": { - "type": "GcpFilestoreCsiDriverConfig", - "id": 14 - }, - "gkeBackupAgentConfig": { - "type": "GkeBackupAgentConfig", - "id": 16 - }, - "gcsFuseCsiDriverConfig": { - "type": "GcsFuseCsiDriverConfig", - "id": 17 - }, - "statefulHaConfig": { - "type": "StatefulHAConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rayOperatorConfig": { - "type": "RayOperatorConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "HttpLoadBalancing": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "HorizontalPodAutoscaling": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "KubernetesDashboard": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "NetworkPolicyConfig": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "DnsCacheConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "KalmConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "deprecated": true - } - } - } - }, - "GkeBackupAgentConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "StatefulHAConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ConfigConnectorConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcePersistentDiskCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcpFilestoreCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GcsFuseCsiDriverConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "RayOperatorConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "rayClusterLoggingConfig": { - "type": "RayClusterLoggingConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rayClusterMonitoringConfig": { - "type": "RayClusterMonitoringConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PrivateClusterMasterGlobalAccessConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "PrivateClusterConfig": { - "fields": { - "enablePrivateNodes": { - "type": "bool", - "id": 1 - }, - "enablePrivateEndpoint": { - "type": "bool", - "id": 2 - }, - "masterIpv4CidrBlock": { - "type": "string", - "id": 3 - }, - "privateEndpoint": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "publicEndpoint": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peeringName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "masterGlobalAccessConfig": { - "type": "PrivateClusterMasterGlobalAccessConfig", - "id": 8 - }, - "privateEndpointSubnetwork": { - "type": "string", - "id": 10 - } - } - }, - "IstioConfig": { - "fields": { - "disabled": { - "type": "bool", - "id": 1, - "options": { - "deprecated": true - } - }, - "auth": { - "type": "IstioAuthMode", - "id": 2, - "options": { - "deprecated": true - } - } - }, - "nested": { - "IstioAuthMode": { - "values": { - "AUTH_NONE": 0, - "AUTH_MUTUAL_TLS": 1 - } - } - } - }, - "CloudRunConfig": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 3 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "LOAD_BALANCER_TYPE_EXTERNAL": 1, - "LOAD_BALANCER_TYPE_INTERNAL": 2 - } - } - } - }, - "MasterAuthorizedNetworksConfig": { - "oneofs": { - "_gcpPublicCidrsAccessEnabled": { - "oneof": [ - "gcpPublicCidrsAccessEnabled" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "cidrBlocks": { - "rule": "repeated", - "type": "CidrBlock", - "id": 2 - }, - "gcpPublicCidrsAccessEnabled": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "CidrBlock": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "cidrBlock": { - "type": "string", - "id": 2 - } - } - } - } - }, - "LegacyAbac": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "NetworkPolicy": { - "fields": { - "provider": { - "type": "Provider", - "id": 1 - }, - "enabled": { - "type": "bool", - "id": 2 - } - }, - "nested": { - "Provider": { - "values": { - "PROVIDER_UNSPECIFIED": 0, - "CALICO": 1 - } - } - } - }, - "PodCIDROverprovisionConfig": { - "fields": { - "disable": { - "type": "bool", - "id": 1 - } - } - }, - "IPAllocationPolicy": { - "fields": { - "useIpAliases": { - "type": "bool", - "id": 1 - }, - "createSubnetwork": { - "type": "bool", - "id": 2 - }, - "subnetworkName": { - "type": "string", - "id": 3 - }, - "clusterIpv4Cidr": { - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "nodeIpv4Cidr": { - "type": "string", - "id": 5, - "options": { - "deprecated": true - } - }, - "servicesIpv4Cidr": { - "type": "string", - "id": 6, - "options": { - "deprecated": true - } - }, - "clusterSecondaryRangeName": { - "type": "string", - "id": 7 - }, - "servicesSecondaryRangeName": { - "type": "string", - "id": 8 - }, - "clusterIpv4CidrBlock": { - "type": "string", - "id": 9 - }, - "nodeIpv4CidrBlock": { - "type": "string", - "id": 10 - }, - "servicesIpv4CidrBlock": { - "type": "string", - "id": 11 - }, - "allowRouteOverlap": { - "type": "bool", - "id": 12 - }, - "tpuIpv4CidrBlock": { - "type": "string", - "id": 13 - }, - "useRoutes": { - "type": "bool", - "id": 15 - }, - "stackType": { - "type": "StackType", - "id": 16 - }, - "ipv6AccessType": { - "type": "IPv6AccessType", - "id": 17 - }, - "podCidrOverprovisionConfig": { - "type": "PodCIDROverprovisionConfig", - "id": 21 - }, - "subnetIpv6CidrBlock": { - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "servicesIpv6CidrBlock": { - "type": "string", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "additionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "defaultPodIpv4RangeUtilization": { - "type": "double", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4": 1, - "IPV4_IPV6": 2 - } - }, - "IPv6AccessType": { - "values": { - "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, - "INTERNAL": 1, - "EXTERNAL": 2 - } - } - } - }, - "BinaryAuthorization": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "deprecated": true - } - }, - "evaluationMode": { - "type": "EvaluationMode", - "id": 2 - }, - "policyBindings": { - "rule": "repeated", - "type": "PolicyBinding", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EvaluationMode": { - "values": { - "EVALUATION_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "PROJECT_SINGLETON_POLICY_ENFORCE": 2, - "POLICY_BINDINGS": 5, - "POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE": 6 - } - }, - "PolicyBinding": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "PodSecurityPolicyConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "AuthenticatorGroupsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "securityGroup": { - "type": "string", - "id": 2 - } - } - }, - "ClusterTelemetry": { - "fields": { - "type": { - "type": "Type", - "id": 1 - } - }, - "nested": { - "Type": { - "values": { - "UNSPECIFIED": 0, - "DISABLED": 1, - "ENABLED": 2, - "SYSTEM_ONLY": 3 - } - } - } - }, - "Cluster": { - "oneofs": { - "_nodePoolDefaults": { - "oneof": [ - "nodePoolDefaults" - ] - }, - "_protectConfig": { - "oneof": [ - "protectConfig" - ] - }, - "_satisfiesPzs": { - "oneof": [ - "satisfiesPzs" - ] - }, - "_satisfiesPzi": { - "oneof": [ - "satisfiesPzi" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "initialNodeCount": { - "type": "int32", - "id": 3, - "options": { - "deprecated": true - } - }, - "nodeConfig": { - "type": "NodeConfig", - "id": 4, - "options": { - "deprecated": true - } - }, - "masterAuth": { - "type": "MasterAuth", - "id": 5 - }, - "loggingService": { - "type": "string", - "id": 6 - }, - "monitoringService": { - "type": "string", - "id": 7 - }, - "network": { - "type": "string", - "id": 8 - }, - "clusterIpv4Cidr": { - "type": "string", - "id": 9 - }, - "addonsConfig": { - "type": "AddonsConfig", - "id": 10 - }, - "subnetwork": { - "type": "string", - "id": 11 - }, - "nodePools": { - "rule": "repeated", - "type": "NodePool", - "id": 12 - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "enableKubernetesAlpha": { - "type": "bool", - "id": 14 - }, - "enableK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 143 - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 15 - }, - "labelFingerprint": { - "type": "string", - "id": 16 - }, - "legacyAbac": { - "type": "LegacyAbac", - "id": 18 - }, - "networkPolicy": { - "type": "NetworkPolicy", - "id": 19 - }, - "ipAllocationPolicy": { - "type": "IPAllocationPolicy", - "id": 20 - }, - "masterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 22 - }, - "maintenancePolicy": { - "type": "MaintenancePolicy", - "id": 23 - }, - "binaryAuthorization": { - "type": "BinaryAuthorization", - "id": 24 - }, - "podSecurityPolicyConfig": { - "type": "PodSecurityPolicyConfig", - "id": 25 - }, - "autoscaling": { - "type": "ClusterAutoscaling", - "id": 26 - }, - "networkConfig": { - "type": "NetworkConfig", - "id": 27 - }, - "privateCluster": { - "type": "bool", - "id": 28, - "options": { - "deprecated": true - } - }, - "masterIpv4CidrBlock": { - "type": "string", - "id": 29, - "options": { - "deprecated": true - } - }, - "defaultMaxPodsConstraint": { - "type": "MaxPodsConstraint", - "id": 30 - }, - "resourceUsageExportConfig": { - "type": "ResourceUsageExportConfig", - "id": 33 - }, - "authenticatorGroupsConfig": { - "type": "AuthenticatorGroupsConfig", - "id": 34 - }, - "privateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 37 - }, - "verticalPodAutoscaling": { - "type": "VerticalPodAutoscaling", - "id": 39 - }, - "shieldedNodes": { - "type": "ShieldedNodes", - "id": 40 - }, - "releaseChannel": { - "type": "ReleaseChannel", - "id": 41 - }, - "workloadIdentityConfig": { - "type": "WorkloadIdentityConfig", - "id": 43 - }, - "workloadCertificates": { - "type": "WorkloadCertificates", - "id": 52 - }, - "meshCertificates": { - "type": "MeshCertificates", - "id": 67 - }, - "workloadAltsConfig": { - "type": "WorkloadALTSConfig", - "id": 53 - }, - "costManagementConfig": { - "type": "CostManagementConfig", - "id": 45 - }, - "clusterTelemetry": { - "type": "ClusterTelemetry", - "id": 46 - }, - "tpuConfig": { - "type": "TpuConfig", - "id": 47 - }, - "notificationConfig": { - "type": "NotificationConfig", - "id": 49 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 50 - }, - "identityServiceConfig": { - "type": "IdentityServiceConfig", - "id": 54 - }, - "selfLink": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "zone": { - "type": "string", - "id": 101, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endpoint": { - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "initialClusterVersion": { - "type": "string", - "id": 103 - }, - "currentMasterVersion": { - "type": "string", - "id": 104, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "currentNodeVersion": { - "type": "string", - "id": 105, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "string", - "id": 106, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 107, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 108, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nodeIpv4CidrSize": { - "type": "int32", - "id": 109, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "servicesIpv4Cidr": { - "type": "string", - "id": 110, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "instanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 111, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "currentNodeCount": { - "type": "int32", - "id": 112, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "expireTime": { - "type": "string", - "id": 113, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 114, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enableTpu": { - "type": "bool", - "id": 115 - }, - "tpuIpv4CidrBlock": { - "type": "string", - "id": 116, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "databaseEncryption": { - "type": "DatabaseEncryption", - "id": 38 - }, - "conditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 118 - }, - "master": { - "type": "Master", - "id": 124 - }, - "autopilot": { - "type": "Autopilot", - "id": 128 - }, - "id": { - "type": "string", - "id": 129, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nodePoolDefaults": { - "type": "NodePoolDefaults", - "id": 131, - "options": { - "proto3_optional": true - } - }, - "loggingConfig": { - "type": "LoggingConfig", - "id": 132 - }, - "monitoringConfig": { - "type": "MonitoringConfig", - "id": 133 - }, - "nodePoolAutoConfig": { - "type": "NodePoolAutoConfig", - "id": 136 - }, - "protectConfig": { - "type": "ProtectConfig", - "id": 137, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 139 - }, - "fleet": { - "type": "Fleet", - "id": 140 - }, - "securityPostureConfig": { - "type": "SecurityPostureConfig", - "id": 145 - }, - "enterpriseConfig": { - "type": "EnterpriseConfig", - "id": 149 - }, - "secretManagerConfig": { - "type": "SecretManagerConfig", - "id": 150 - }, - "compliancePostureConfig": { - "type": "CompliancePostureConfig", - "id": 151 - }, - "satisfiesPzs": { - "type": "bool", - "id": 152, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 153, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - }, - "nested": { - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RECONCILING": 3, - "STOPPING": 4, - "ERROR": 5, - "DEGRADED": 6 - } - } - } - }, - "CompliancePostureConfig": { - "oneofs": { - "_mode": { - "oneof": [ - "mode" - ] - } - }, - "fields": { - "mode": { - "type": "Mode", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "complianceStandards": { - "rule": "repeated", - "type": "ComplianceStandard", - "id": 2 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "ENABLED": 2 - } - }, - "ComplianceStandard": { - "oneofs": { - "_standard": { - "oneof": [ - "standard" - ] - } - }, - "fields": { - "standard": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "K8sBetaAPIConfig": { - "fields": { - "enabledApis": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "WorkloadConfig": { - "oneofs": { - "_auditMode": { - "oneof": [ - "auditMode" - ] - } - }, - "fields": { - "auditMode": { - "type": "Mode", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Mode": { - "valuesOptions": { - "BASELINE": { - "deprecated": true - }, - "RESTRICTED": { - "deprecated": true - } - }, - "values": { - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "BASIC": 4, - "BASELINE": 2, - "RESTRICTED": 3 - } - } - } - }, - "ProtectConfig": { - "oneofs": { - "_workloadConfig": { - "oneof": [ - "workloadConfig" - ] - }, - "_workloadVulnerabilityMode": { - "oneof": [ - "workloadVulnerabilityMode" - ] - } - }, - "fields": { - "workloadConfig": { - "type": "WorkloadConfig", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "workloadVulnerabilityMode": { - "type": "WorkloadVulnerabilityMode", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "WorkloadVulnerabilityMode": { - "values": { - "WORKLOAD_VULNERABILITY_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "BASIC": 2 - } - } - } - }, - "SecurityPostureConfig": { - "oneofs": { - "_mode": { - "oneof": [ - "mode" - ] - }, - "_vulnerabilityMode": { - "oneof": [ - "vulnerabilityMode" - ] - } - }, - "fields": { - "mode": { - "type": "Mode", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "vulnerabilityMode": { - "type": "VulnerabilityMode", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "BASIC": 2, - "ENTERPRISE": 3 - } - }, - "VulnerabilityMode": { - "values": { - "VULNERABILITY_MODE_UNSPECIFIED": 0, - "VULNERABILITY_DISABLED": 1, - "VULNERABILITY_BASIC": 2, - "VULNERABILITY_ENTERPRISE": 3 - } - } - } - }, - "NodePoolDefaults": { - "fields": { - "nodeConfigDefaults": { - "type": "NodeConfigDefaults", - "id": 1 - } - } - }, - "NodeConfigDefaults": { - "fields": { - "gcfsConfig": { - "type": "GcfsConfig", - "id": 1 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 3 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 4 - }, - "hostMaintenancePolicy": { - "type": "HostMaintenancePolicy", - "id": 5 - }, - "nodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 6 - } - } - }, - "NodePoolAutoConfig": { - "fields": { - "networkTags": { - "type": "NetworkTags", - "id": 1 - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 2 - }, - "nodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 3 - } - } - }, - "ClusterUpdate": { - "oneofs": { - "_desiredEnablePrivateEndpoint": { - "oneof": [ - "desiredEnablePrivateEndpoint" - ] - }, - "_desiredProtectConfig": { - "oneof": [ - "desiredProtectConfig" - ] - }, - "_desiredEnableFqdnNetworkPolicy": { - "oneof": [ - "desiredEnableFqdnNetworkPolicy" - ] - }, - "_desiredEnableMultiNetworking": { - "oneof": [ - "desiredEnableMultiNetworking" - ] - }, - "_desiredInTransitEncryptionConfig": { - "oneof": [ - "desiredInTransitEncryptionConfig" - ] - }, - "_desiredEnableCiliumClusterwideNetworkPolicy": { - "oneof": [ - "desiredEnableCiliumClusterwideNetworkPolicy" - ] - }, - "_desiredSecretManagerConfig": { - "oneof": [ - "desiredSecretManagerConfig" - ] - } - }, - "fields": { - "desiredNodeVersion": { - "type": "string", - "id": 4 - }, - "desiredMonitoringService": { - "type": "string", - "id": 5 - }, - "desiredAddonsConfig": { - "type": "AddonsConfig", - "id": 6 - }, - "desiredNodePoolId": { - "type": "string", - "id": 7 - }, - "desiredImageType": { - "type": "string", - "id": 8 - }, - "desiredNodePoolAutoscaling": { - "type": "NodePoolAutoscaling", - "id": 9 - }, - "desiredLocations": { - "rule": "repeated", - "type": "string", - "id": 10 - }, - "desiredMasterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 12 - }, - "desiredPodSecurityPolicyConfig": { - "type": "PodSecurityPolicyConfig", - "id": 14 - }, - "desiredClusterAutoscaling": { - "type": "ClusterAutoscaling", - "id": 15 - }, - "desiredBinaryAuthorization": { - "type": "BinaryAuthorization", - "id": 16 - }, - "desiredLoggingService": { - "type": "string", - "id": 19 - }, - "desiredResourceUsageExportConfig": { - "type": "ResourceUsageExportConfig", - "id": 21 - }, - "desiredVerticalPodAutoscaling": { - "type": "VerticalPodAutoscaling", - "id": 22 - }, - "desiredPrivateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 25 - }, - "desiredIntraNodeVisibilityConfig": { - "type": "IntraNodeVisibilityConfig", - "id": 26 - }, - "desiredDefaultSnatStatus": { - "type": "DefaultSnatStatus", - "id": 28 - }, - "desiredClusterTelemetry": { - "type": "ClusterTelemetry", - "id": 30 - }, - "desiredReleaseChannel": { - "type": "ReleaseChannel", - "id": 31 - }, - "privateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 37, - "options": { - "deprecated": true - } - }, - "desiredTpuConfig": { - "type": "TpuConfig", - "id": 38 - }, - "desiredL4ilbSubsettingConfig": { - "type": "ILBSubsettingConfig", - "id": 39 - }, - "desiredDatapathProvider": { - "type": "DatapathProvider", - "id": 50 - }, - "desiredPrivateIpv6GoogleAccess": { - "type": "PrivateIPv6GoogleAccess", - "id": 51 - }, - "desiredNotificationConfig": { - "type": "NotificationConfig", - "id": 55 - }, - "desiredMasterVersion": { - "type": "string", - "id": 100 - }, - "desiredGcfsConfig": { - "type": "GcfsConfig", - "id": 109 - }, - "desiredDatabaseEncryption": { - "type": "DatabaseEncryption", - "id": 46 - }, - "desiredWorkloadIdentityConfig": { - "type": "WorkloadIdentityConfig", - "id": 47 - }, - "desiredWorkloadCertificates": { - "type": "WorkloadCertificates", - "id": 61 - }, - "desiredMeshCertificates": { - "type": "MeshCertificates", - "id": 67 - }, - "desiredWorkloadAltsConfig": { - "type": "WorkloadALTSConfig", - "id": 62 - }, - "desiredShieldedNodes": { - "type": "ShieldedNodes", - "id": 48 - }, - "desiredCostManagementConfig": { - "type": "CostManagementConfig", - "id": 49 - }, - "desiredMaster": { - "type": "Master", - "id": 52 - }, - "desiredDnsConfig": { - "type": "DNSConfig", - "id": 53 - }, - "desiredServiceExternalIpsConfig": { - "type": "ServiceExternalIPsConfig", - "id": 60 - }, - "desiredAuthenticatorGroupsConfig": { - "type": "AuthenticatorGroupsConfig", - "id": 63 - }, - "desiredLoggingConfig": { - "type": "LoggingConfig", - "id": 64 - }, - "desiredMonitoringConfig": { - "type": "MonitoringConfig", - "id": 65 - }, - "desiredIdentityServiceConfig": { - "type": "IdentityServiceConfig", - "id": 66 - }, - "desiredEnablePrivateEndpoint": { - "type": "bool", - "id": 71, - "options": { - "proto3_optional": true - } - }, - "desiredNodePoolAutoConfigNetworkTags": { - "type": "NetworkTags", - "id": 110 - }, - "desiredProtectConfig": { - "type": "ProtectConfig", - "id": 112, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "desiredGatewayApiConfig": { - "type": "GatewayAPIConfig", - "id": 114 - }, - "etag": { - "type": "string", - "id": 115 - }, - "desiredNodePoolLoggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 116 - }, - "desiredFleet": { - "type": "Fleet", - "id": 117 - }, - "desiredStackType": { - "type": "StackType", - "id": 119 - }, - "additionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 120 - }, - "removedAdditionalPodRangesConfig": { - "type": "AdditionalPodRangesConfig", - "id": 121 - }, - "enableK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 122 - }, - "desiredSecurityPostureConfig": { - "type": "SecurityPostureConfig", - "id": 124 - }, - "desiredNetworkPerformanceConfig": { - "type": "NetworkConfig.ClusterNetworkPerformanceConfig", - "id": 125 - }, - "desiredEnableFqdnNetworkPolicy": { - "type": "bool", - "id": 126, - "options": { - "proto3_optional": true - } - }, - "desiredAutopilotWorkloadPolicyConfig": { - "type": "WorkloadPolicyConfig", - "id": 128 - }, - "desiredK8sBetaApis": { - "type": "K8sBetaAPIConfig", - "id": 131 - }, - "desiredHostMaintenancePolicy": { - "type": "HostMaintenancePolicy", - "id": 132 - }, - "desiredContainerdConfig": { - "type": "ContainerdConfig", - "id": 134 - }, - "desiredEnableMultiNetworking": { - "type": "bool", - "id": 135, - "options": { - "proto3_optional": true - } - }, - "desiredNodePoolAutoConfigResourceManagerTags": { - "type": "ResourceManagerTags", - "id": 136 - }, - "desiredInTransitEncryptionConfig": { - "type": "InTransitEncryptionConfig", - "id": 137, - "options": { - "proto3_optional": true - } - }, - "desiredEnableCiliumClusterwideNetworkPolicy": { - "type": "bool", - "id": 138, - "options": { - "proto3_optional": true - } - }, - "desiredSecretManagerConfig": { - "type": "SecretManagerConfig", - "id": 139, - "options": { - "proto3_optional": true - } - }, - "desiredNodeKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 141 - }, - "desiredNodePoolAutoConfigKubeletConfig": { - "type": "NodeKubeletConfig", - "id": 142 - } - } - }, - "AdditionalPodRangesConfig": { - "fields": { - "podRangeNames": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "podRangeInfo": { - "rule": "repeated", - "type": "RangeInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "RangeInfo": { - "fields": { - "rangeName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "utilization": { - "type": "double", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Operation": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "operationType": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "detail": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "selfLink": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "targetLink": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startTime": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "progress": { - "type": "OperationProgress", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clusterConditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 13, - "options": { - "deprecated": true - } - }, - "nodepoolConditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 14, - "options": { - "deprecated": true - } - }, - "error": { - "type": "google.rpc.Status", - "id": 15 - } - }, - "nested": { - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "DONE": 3, - "ABORTING": 4 - } - }, - "Type": { - "valuesOptions": { - "AUTO_UPGRADE_NODES": { - "deprecated": true - }, - "SET_LABELS": { - "deprecated": true - }, - "SET_MASTER_AUTH": { - "deprecated": true - }, - "SET_NETWORK_POLICY": { - "deprecated": true - }, - "SET_MAINTENANCE_POLICY": { - "deprecated": true - } - }, - "values": { - "TYPE_UNSPECIFIED": 0, - "CREATE_CLUSTER": 1, - "DELETE_CLUSTER": 2, - "UPGRADE_MASTER": 3, - "UPGRADE_NODES": 4, - "REPAIR_CLUSTER": 5, - "UPDATE_CLUSTER": 6, - "CREATE_NODE_POOL": 7, - "DELETE_NODE_POOL": 8, - "SET_NODE_POOL_MANAGEMENT": 9, - "AUTO_REPAIR_NODES": 10, - "AUTO_UPGRADE_NODES": 11, - "SET_LABELS": 12, - "SET_MASTER_AUTH": 13, - "SET_NODE_POOL_SIZE": 14, - "SET_NETWORK_POLICY": 15, - "SET_MAINTENANCE_POLICY": 16, - "RESIZE_CLUSTER": 18, - "FLEET_FEATURE_UPGRADE": 19 - } - } - } - }, - "OperationProgress": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "status": { - "type": "Operation.Status", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "stages": { - "rule": "repeated", - "type": "OperationProgress", - "id": 4 - } - }, - "nested": { - "Metric": { - "oneofs": { - "value": { - "oneof": [ - "intValue", - "doubleValue", - "stringValue" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "intValue": { - "type": "int64", - "id": 2 - }, - "doubleValue": { - "type": "double", - "id": 3 - }, - "stringValue": { - "type": "string", - "id": 4 - } - } - } - } - }, - "CreateClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "cluster": { - "type": "Cluster", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 5 - } - } - }, - "GetClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "UpdateClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "update": { - "type": "ClusterUpdate", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "UpdateNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodeVersion": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "imageType": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "workloadMetadataConfig": { - "type": "WorkloadMetadataConfig", - "id": 14 - }, - "name": { - "type": "string", - "id": 8 - }, - "upgradeSettings": { - "type": "NodePool.UpgradeSettings", - "id": 15 - }, - "tags": { - "type": "NetworkTags", - "id": 16 - }, - "taints": { - "type": "NodeTaints", - "id": 17 - }, - "labels": { - "type": "NodeLabels", - "id": 18 - }, - "linuxNodeConfig": { - "type": "LinuxNodeConfig", - "id": 19 - }, - "kubeletConfig": { - "type": "NodeKubeletConfig", - "id": 20 - }, - "nodeNetworkConfig": { - "type": "NodeNetworkConfig", - "id": 21 - }, - "gcfsConfig": { - "type": "GcfsConfig", - "id": 22 - }, - "confidentialNodes": { - "type": "ConfidentialNodes", - "id": 23 - }, - "gvnic": { - "type": "VirtualNIC", - "id": 29 - }, - "etag": { - "type": "string", - "id": 30 - }, - "fastSocket": { - "type": "FastSocket", - "id": 31 - }, - "loggingConfig": { - "type": "NodePoolLoggingConfig", - "id": 32 - }, - "resourceLabels": { - "type": "ResourceLabels", - "id": 33 - }, - "windowsNodeConfig": { - "type": "WindowsNodeConfig", - "id": 34 - }, - "accelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 35 - }, - "machineType": { - "type": "string", - "id": 36, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskType": { - "type": "string", - "id": 37, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskSizeGb": { - "type": "int64", - "id": 38, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceManagerTags": { - "type": "ResourceManagerTags", - "id": 39 - }, - "containerdConfig": { - "type": "ContainerdConfig", - "id": 40 - }, - "queuedProvisioning": { - "type": "NodePool.QueuedProvisioning", - "id": 42 - } - } - }, - "SetNodePoolAutoscalingRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "autoscaling": { - "type": "NodePoolAutoscaling", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetLoggingServiceRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "loggingService": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "SetMonitoringServiceRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "monitoringService": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetAddonsConfigRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "addonsConfig": { - "type": "AddonsConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetLocationsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "UpdateMasterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "masterVersion": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetMasterAuthRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "action": { - "type": "Action", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "update": { - "type": "MasterAuth", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - }, - "nested": { - "Action": { - "values": { - "UNKNOWN": 0, - "SET_PASSWORD": 1, - "GENERATE_PASSWORD": 2, - "SET_USERNAME": 3 - } - } - } - }, - "DeleteClusterRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ListClustersRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 4 - } - } - }, - "ListClustersResponse": { - "fields": { - "clusters": { - "rule": "repeated", - "type": "Cluster", - "id": 1 - }, - "missingZones": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "GetOperationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "operationId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "ListOperationsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 4 - } - } - }, - "CancelOperationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "operationId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "missingZones": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "GetServerConfigRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 4 - } - } - }, - "ServerConfig": { - "fields": { - "defaultClusterVersion": { - "type": "string", - "id": 1 - }, - "validNodeVersions": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "defaultImageType": { - "type": "string", - "id": 4 - }, - "validImageTypes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "validMasterVersions": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "channels": { - "rule": "repeated", - "type": "ReleaseChannelConfig", - "id": 9 - }, - "windowsVersionMaps": { - "keyType": "string", - "type": "WindowsVersions", - "id": 10 - } - }, - "nested": { - "ReleaseChannelConfig": { - "fields": { - "channel": { - "type": "ReleaseChannel.Channel", - "id": 1 - }, - "defaultVersion": { - "type": "string", - "id": 2 - }, - "availableVersions": { - "rule": "repeated", - "type": "AvailableVersion", - "id": 3, - "options": { - "deprecated": true - } - }, - "validVersions": { - "rule": "repeated", - "type": "string", - "id": 4 - } - }, - "nested": { - "AvailableVersion": { - "options": { - "deprecated": true - }, - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "reason": { - "type": "string", - "id": 2 - } - } - } - } - } - } - }, - "BestEffortProvisioning": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "minProvisionNodes": { - "type": "int32", - "id": 2 - } - } - }, - "WindowsVersions": { - "fields": { - "windowsVersions": { - "rule": "repeated", - "type": "WindowsVersion", - "id": 1 - } - }, - "nested": { - "WindowsVersion": { - "fields": { - "imageType": { - "type": "string", - "id": 1 - }, - "osVersion": { - "type": "string", - "id": 2 - }, - "supportEndDate": { - "type": "google.type.Date", - "id": 3 - } - } - } - } - }, - "CreateNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePool": { - "type": "NodePool", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 6 - } - } - }, - "DeleteNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "ListNodePoolsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parent": { - "type": "string", - "id": 5 - } - } - }, - "GetNodePoolRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "BlueGreenSettings": { - "oneofs": { - "rolloutPolicy": { - "oneof": [ - "standardRolloutPolicy", - "autoscaledRolloutPolicy" - ] - }, - "_nodePoolSoakDuration": { - "oneof": [ - "nodePoolSoakDuration" - ] - } - }, - "fields": { - "standardRolloutPolicy": { - "type": "StandardRolloutPolicy", - "id": 1 - }, - "autoscaledRolloutPolicy": { - "type": "AutoscaledRolloutPolicy", - "id": 3 - }, - "nodePoolSoakDuration": { - "type": "google.protobuf.Duration", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "StandardRolloutPolicy": { - "oneofs": { - "updateBatchSize": { - "oneof": [ - "batchPercentage", - "batchNodeCount" - ] - }, - "_batchSoakDuration": { - "oneof": [ - "batchSoakDuration" - ] - } - }, - "fields": { - "batchPercentage": { - "type": "float", - "id": 1 - }, - "batchNodeCount": { - "type": "int32", - "id": 2 - }, - "batchSoakDuration": { - "type": "google.protobuf.Duration", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "AutoscaledRolloutPolicy": { - "fields": {} - } - } - }, - "NodePool": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "NodeConfig", - "id": 2 - }, - "initialNodeCount": { - "type": "int32", - "id": 3 - }, - "locations": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "networkConfig": { - "type": "NodeNetworkConfig", - "id": 14 - }, - "selfLink": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "version": { - "type": "string", - "id": 101 - }, - "instanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 103, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 104, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "autoscaling": { - "type": "NodePoolAutoscaling", - "id": 4 - }, - "management": { - "type": "NodeManagement", - "id": 5 - }, - "maxPodsConstraint": { - "type": "MaxPodsConstraint", - "id": 6 - }, - "conditions": { - "rule": "repeated", - "type": "StatusCondition", - "id": 105 - }, - "podIpv4CidrSize": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "upgradeSettings": { - "type": "UpgradeSettings", - "id": 107 - }, - "placementPolicy": { - "type": "PlacementPolicy", - "id": 108 - }, - "updateInfo": { - "type": "UpdateInfo", - "id": 109, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "etag": { - "type": "string", - "id": 110 - }, - "queuedProvisioning": { - "type": "QueuedProvisioning", - "id": 112 - }, - "bestEffortProvisioning": { - "type": "BestEffortProvisioning", - "id": 113 - } - }, - "nested": { - "UpgradeSettings": { - "oneofs": { - "_strategy": { - "oneof": [ - "strategy" - ] - }, - "_blueGreenSettings": { - "oneof": [ - "blueGreenSettings" - ] - } - }, - "fields": { - "maxSurge": { - "type": "int32", - "id": 1 - }, - "maxUnavailable": { - "type": "int32", - "id": 2 - }, - "strategy": { - "type": "NodePoolUpdateStrategy", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "blueGreenSettings": { - "type": "BlueGreenSettings", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "UpdateInfo": { - "fields": { - "blueGreenInfo": { - "type": "BlueGreenInfo", - "id": 1 - } - }, - "nested": { - "BlueGreenInfo": { - "fields": { - "phase": { - "type": "Phase", - "id": 1 - }, - "blueInstanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "greenInstanceGroupUrls": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "bluePoolDeletionStartTime": { - "type": "string", - "id": 4 - }, - "greenPoolVersion": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Phase": { - "values": { - "PHASE_UNSPECIFIED": 0, - "UPDATE_STARTED": 1, - "CREATING_GREEN_POOL": 2, - "CORDONING_BLUE_POOL": 3, - "WAITING_TO_DRAIN_BLUE_POOL": 8, - "DRAINING_BLUE_POOL": 4, - "NODE_POOL_SOAKING": 5, - "DELETING_BLUE_POOL": 6, - "ROLLBACK_STARTED": 7 - } - } - } - } - } - }, - "Status": { - "values": { - "STATUS_UNSPECIFIED": 0, - "PROVISIONING": 1, - "RUNNING": 2, - "RUNNING_WITH_ERROR": 3, - "RECONCILING": 4, - "STOPPING": 5, - "ERROR": 6 - } - }, - "PlacementPolicy": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "tpuTopology": { - "type": "string", - "id": 2 - }, - "policyName": { - "type": "string", - "id": 3 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "COMPACT": 1 - } - } - } - }, - "QueuedProvisioning": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - } - } - }, - "NodeManagement": { - "fields": { - "autoUpgrade": { - "type": "bool", - "id": 1 - }, - "autoRepair": { - "type": "bool", - "id": 2 - }, - "upgradeOptions": { - "type": "AutoUpgradeOptions", - "id": 10 - } - } - }, - "AutoUpgradeOptions": { - "fields": { - "autoUpgradeStartTime": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "MaintenancePolicy": { - "fields": { - "window": { - "type": "MaintenanceWindow", - "id": 1 - }, - "resourceVersion": { - "type": "string", - "id": 3 - } - } - }, - "MaintenanceWindow": { - "oneofs": { - "policy": { - "oneof": [ - "dailyMaintenanceWindow", - "recurringWindow" - ] - } - }, - "fields": { - "dailyMaintenanceWindow": { - "type": "DailyMaintenanceWindow", - "id": 2 - }, - "recurringWindow": { - "type": "RecurringTimeWindow", - "id": 3 - }, - "maintenanceExclusions": { - "keyType": "string", - "type": "TimeWindow", - "id": 4 - } - } - }, - "TimeWindow": { - "oneofs": { - "options": { - "oneof": [ - "maintenanceExclusionOptions" - ] - } - }, - "fields": { - "maintenanceExclusionOptions": { - "type": "MaintenanceExclusionOptions", - "id": 3 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "MaintenanceExclusionOptions": { - "fields": { - "scope": { - "type": "Scope", - "id": 1 - } - }, - "nested": { - "Scope": { - "values": { - "NO_UPGRADES": 0, - "NO_MINOR_UPGRADES": 1, - "NO_MINOR_OR_NODE_UPGRADES": 2 - } - } - } - }, - "RecurringTimeWindow": { - "fields": { - "window": { - "type": "TimeWindow", - "id": 1 - }, - "recurrence": { - "type": "string", - "id": 2 - } - } - }, - "DailyMaintenanceWindow": { - "fields": { - "startTime": { - "type": "string", - "id": 2 - }, - "duration": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SetNodePoolManagementRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "management": { - "type": "NodeManagement", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetNodePoolSizeRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodeCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "CompleteNodePoolUpgradeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "RollbackNodePoolUpgradeRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "nodePoolId": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - }, - "respectPdb": { - "type": "bool", - "id": 7 - } - } - }, - "ListNodePoolsResponse": { - "fields": { - "nodePools": { - "rule": "repeated", - "type": "NodePool", - "id": 1 - } - } - }, - "ClusterAutoscaling": { - "fields": { - "enableNodeAutoprovisioning": { - "type": "bool", - "id": 1 - }, - "resourceLimits": { - "rule": "repeated", - "type": "ResourceLimit", - "id": 2 - }, - "autoscalingProfile": { - "type": "AutoscalingProfile", - "id": 3 - }, - "autoprovisioningNodePoolDefaults": { - "type": "AutoprovisioningNodePoolDefaults", - "id": 4 - }, - "autoprovisioningLocations": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "AutoscalingProfile": { - "values": { - "PROFILE_UNSPECIFIED": 0, - "OPTIMIZE_UTILIZATION": 1, - "BALANCED": 2 - } - } - } - }, - "AutoprovisioningNodePoolDefaults": { - "oneofs": { - "_insecureKubeletReadonlyPortEnabled": { - "oneof": [ - "insecureKubeletReadonlyPortEnabled" - ] - } - }, - "fields": { - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "serviceAccount": { - "type": "string", - "id": 2 - }, - "upgradeSettings": { - "type": "NodePool.UpgradeSettings", - "id": 3 - }, - "management": { - "type": "NodeManagement", - "id": 4 - }, - "minCpuPlatform": { - "type": "string", - "id": 5, - "options": { - "deprecated": true - } - }, - "diskSizeGb": { - "type": "int32", - "id": 6 - }, - "diskType": { - "type": "string", - "id": 7 - }, - "shieldedInstanceConfig": { - "type": "ShieldedInstanceConfig", - "id": 8 - }, - "bootDiskKmsKey": { - "type": "string", - "id": 9 - }, - "imageType": { - "type": "string", - "id": 10 - }, - "insecureKubeletReadonlyPortEnabled": { - "type": "bool", - "id": 13, - "options": { - "proto3_optional": true - } - } - } - }, - "ResourceLimit": { - "fields": { - "resourceType": { - "type": "string", - "id": 1 - }, - "minimum": { - "type": "int64", - "id": 2 - }, - "maximum": { - "type": "int64", - "id": 3 - } - } - }, - "NodePoolAutoscaling": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "minNodeCount": { - "type": "int32", - "id": 2 - }, - "maxNodeCount": { - "type": "int32", - "id": 3 - }, - "autoprovisioned": { - "type": "bool", - "id": 4 - }, - "locationPolicy": { - "type": "LocationPolicy", - "id": 5 - }, - "totalMinNodeCount": { - "type": "int32", - "id": 6 - }, - "totalMaxNodeCount": { - "type": "int32", - "id": 7 - } - }, - "nested": { - "LocationPolicy": { - "values": { - "LOCATION_POLICY_UNSPECIFIED": 0, - "BALANCED": 1, - "ANY": 2 - } - } - } - }, - "SetLabelsRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resourceLabels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "labelFingerprint": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "SetLegacyAbacRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "enabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "StartIPRotationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - }, - "rotateCredentials": { - "type": "bool", - "id": 7 - } - } - }, - "CompleteIPRotationRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 7 - } - } - }, - "AcceleratorConfig": { - "oneofs": { - "_gpuSharingConfig": { - "oneof": [ - "gpuSharingConfig" - ] - }, - "_gpuDriverInstallationConfig": { - "oneof": [ - "gpuDriverInstallationConfig" - ] - } - }, - "fields": { - "acceleratorCount": { - "type": "int64", - "id": 1 - }, - "acceleratorType": { - "type": "string", - "id": 2 - }, - "gpuPartitionSize": { - "type": "string", - "id": 3 - }, - "maxTimeSharedClientsPerGpu": { - "type": "int64", - "id": 4, - "options": { - "deprecated": true - } - }, - "gpuSharingConfig": { - "type": "GPUSharingConfig", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "gpuDriverInstallationConfig": { - "type": "GPUDriverInstallationConfig", - "id": 6, - "options": { - "proto3_optional": true - } - } - } - }, - "GPUSharingConfig": { - "oneofs": { - "_gpuSharingStrategy": { - "oneof": [ - "gpuSharingStrategy" - ] - } - }, - "fields": { - "maxSharedClientsPerGpu": { - "type": "int64", - "id": 1 - }, - "gpuSharingStrategy": { - "type": "GPUSharingStrategy", - "id": 2, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "GPUSharingStrategy": { - "values": { - "GPU_SHARING_STRATEGY_UNSPECIFIED": 0, - "TIME_SHARING": 1, - "MPS": 2 - } - } - } - }, - "GPUDriverInstallationConfig": { - "oneofs": { - "_gpuDriverVersion": { - "oneof": [ - "gpuDriverVersion" - ] - } - }, - "fields": { - "gpuDriverVersion": { - "type": "GPUDriverVersion", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "GPUDriverVersion": { - "values": { - "GPU_DRIVER_VERSION_UNSPECIFIED": 0, - "INSTALLATION_DISABLED": 1, - "DEFAULT": 2, - "LATEST": 3 - } - } - } - }, - "ManagedPrometheusConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "WorkloadMetadataConfig": { - "fields": { - "nodeMetadata": { - "type": "NodeMetadata", - "id": 1, - "options": { - "deprecated": true - } - }, - "mode": { - "type": "Mode", - "id": 2 - } - }, - "nested": { - "NodeMetadata": { - "values": { - "UNSPECIFIED": 0, - "SECURE": 1, - "EXPOSE": 2, - "GKE_METADATA_SERVER": 3 - } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "GCE_METADATA": 1, - "GKE_METADATA": 2 - } - } - } - }, - "SetNetworkPolicyRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "REQUIRED" - } - }, - "networkPolicy": { - "type": "NetworkPolicy", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 6 - } - } - }, - "SetMaintenancePolicyRequest": { - "fields": { - "projectId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "maintenancePolicy": { - "type": "MaintenancePolicy", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 5 - } - } - }, - "ListLocationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListLocationsResponse": { - "fields": { - "locations": { - "rule": "repeated", - "type": "Location", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "Location": { - "fields": { - "type": { - "type": "LocationType", - "id": 1 - }, - "name": { - "type": "string", - "id": 2 - }, - "recommended": { - "type": "bool", - "id": 3 - } - }, - "nested": { - "LocationType": { - "values": { - "LOCATION_TYPE_UNSPECIFIED": 0, - "ZONE": 1, - "REGION": 2 - } - } - } - }, - "StatusCondition": { - "fields": { - "code": { - "type": "Code", - "id": 1, - "options": { - "deprecated": true - } - }, - "message": { - "type": "string", - "id": 2 - }, - "canonicalCode": { - "type": "google.rpc.Code", - "id": 3 - } - }, - "nested": { - "Code": { - "options": { - "deprecated": true - }, - "values": { - "UNKNOWN": 0, - "GCE_STOCKOUT": 1, - "GKE_SERVICE_ACCOUNT_DELETED": 2, - "GCE_QUOTA_EXCEEDED": 3, - "SET_BY_OPERATOR": 4, - "CLOUD_KMS_KEY_ERROR": 7, - "CA_EXPIRING": 9 - } - } - } - }, - "NetworkConfig": { - "oneofs": { - "_enableFqdnNetworkPolicy": { - "oneof": [ - "enableFqdnNetworkPolicy" - ] - }, - "_inTransitEncryptionConfig": { - "oneof": [ - "inTransitEncryptionConfig" - ] - }, - "_enableCiliumClusterwideNetworkPolicy": { - "oneof": [ - "enableCiliumClusterwideNetworkPolicy" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "subnetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enableIntraNodeVisibility": { - "type": "bool", - "id": 5 - }, - "defaultSnatStatus": { - "type": "DefaultSnatStatus", - "id": 7 - }, - "enableL4ilbSubsetting": { - "type": "bool", - "id": 10 - }, - "datapathProvider": { - "type": "DatapathProvider", - "id": 11 - }, - "privateIpv6GoogleAccess": { - "type": "PrivateIPv6GoogleAccess", - "id": 12 - }, - "dnsConfig": { - "type": "DNSConfig", - "id": 13 - }, - "serviceExternalIpsConfig": { - "type": "ServiceExternalIPsConfig", - "id": 15 - }, - "gatewayApiConfig": { - "type": "GatewayAPIConfig", - "id": 16 - }, - "enableMultiNetworking": { - "type": "bool", - "id": 17 - }, - "networkPerformanceConfig": { - "type": "ClusterNetworkPerformanceConfig", - "id": 18 - }, - "enableFqdnNetworkPolicy": { - "type": "bool", - "id": 19, - "options": { - "proto3_optional": true - } - }, - "inTransitEncryptionConfig": { - "type": "InTransitEncryptionConfig", - "id": 20, - "options": { - "proto3_optional": true - } - }, - "enableCiliumClusterwideNetworkPolicy": { - "type": "bool", - "id": 21, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "ClusterNetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "TIER_1": 1 - } - } - } - } - } - }, - "GatewayAPIConfig": { - "fields": { - "channel": { - "type": "Channel", - "id": 1 - } - }, - "nested": { - "Channel": { - "valuesOptions": { - "CHANNEL_EXPERIMENTAL": { - "deprecated": true - } - }, - "values": { - "CHANNEL_UNSPECIFIED": 0, - "CHANNEL_DISABLED": 1, - "CHANNEL_EXPERIMENTAL": 3, - "CHANNEL_STANDARD": 4 - } - } - } - }, - "ServiceExternalIPsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ListUsableSubnetworksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "filter": { - "type": "string", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListUsableSubnetworksResponse": { - "fields": { - "subnetworks": { - "rule": "repeated", - "type": "UsableSubnetwork", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UsableSubnetworkSecondaryRange": { - "fields": { - "rangeName": { - "type": "string", - "id": 1 - }, - "ipCidrRange": { - "type": "string", - "id": 2 - }, - "status": { - "type": "Status", - "id": 3 - } - }, - "nested": { - "Status": { - "values": { - "UNKNOWN": 0, - "UNUSED": 1, - "IN_USE_SERVICE": 2, - "IN_USE_SHAREABLE_POD": 3, - "IN_USE_MANAGED_POD": 4 - } - } - } - }, - "UsableSubnetwork": { - "fields": { - "subnetwork": { - "type": "string", - "id": 1 - }, - "network": { - "type": "string", - "id": 2 - }, - "ipCidrRange": { - "type": "string", - "id": 3 - }, - "secondaryIpRanges": { - "rule": "repeated", - "type": "UsableSubnetworkSecondaryRange", - "id": 4 - }, - "statusMessage": { - "type": "string", - "id": 5 - } - } - }, - "VerticalPodAutoscaling": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "DefaultSnatStatus": { - "fields": { - "disabled": { - "type": "bool", - "id": 1 - } - } - }, - "IntraNodeVisibilityConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "ILBSubsettingConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "DNSConfig": { - "fields": { - "clusterDns": { - "type": "Provider", - "id": 1 - }, - "clusterDnsScope": { - "type": "DNSScope", - "id": 2 - }, - "clusterDnsDomain": { - "type": "string", - "id": 3 - }, - "additiveVpcScopeDnsDomain": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Provider": { - "values": { - "PROVIDER_UNSPECIFIED": 0, - "PLATFORM_DEFAULT": 1, - "CLOUD_DNS": 2, - "KUBE_DNS": 3 - } - }, - "DNSScope": { - "values": { - "DNS_SCOPE_UNSPECIFIED": 0, - "CLUSTER_SCOPE": 1, - "VPC_SCOPE": 2 - } - } - } - }, - "MaxPodsConstraint": { - "fields": { - "maxPodsPerNode": { - "type": "int64", - "id": 1 - } - } - }, - "WorkloadIdentityConfig": { - "fields": { - "identityNamespace": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "workloadPool": { - "type": "string", - "id": 2 - }, - "identityProvider": { - "type": "string", - "id": 3 - } - } - }, - "WorkloadALTSConfig": { - "fields": { - "enableAlts": { - "type": "google.protobuf.BoolValue", - "id": 1 - } - } - }, - "WorkloadCertificates": { - "fields": { - "enableCertificates": { - "type": "google.protobuf.BoolValue", - "id": 1 - } - } - }, - "MeshCertificates": { - "fields": { - "enableCertificates": { - "type": "google.protobuf.BoolValue", - "id": 1 - } - } - }, - "DatabaseEncryption": { - "oneofs": { - "_currentState": { - "oneof": [ - "currentState" - ] - } - }, - "fields": { - "keyName": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "currentState": { - "type": "CurrentState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "decryptionKeys": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastOperationErrors": { - "rule": "repeated", - "type": "OperationError", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "UNKNOWN": 0, - "ENCRYPTED": 1, - "DECRYPTED": 2 - } - }, - "CurrentState": { - "values": { - "CURRENT_STATE_UNSPECIFIED": 0, - "CURRENT_STATE_ENCRYPTED": 7, - "CURRENT_STATE_DECRYPTED": 2, - "CURRENT_STATE_ENCRYPTION_PENDING": 3, - "CURRENT_STATE_ENCRYPTION_ERROR": 4, - "CURRENT_STATE_DECRYPTION_PENDING": 5, - "CURRENT_STATE_DECRYPTION_ERROR": 6 - } - }, - "OperationError": { - "fields": { - "keyName": { - "type": "string", - "id": 1 - }, - "errorMessage": { - "type": "string", - "id": 2 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - } - } - }, - "ResourceUsageExportConfig": { - "fields": { - "bigqueryDestination": { - "type": "BigQueryDestination", - "id": 1 - }, - "enableNetworkEgressMetering": { - "type": "bool", - "id": 2 - }, - "consumptionMeteringConfig": { - "type": "ConsumptionMeteringConfig", - "id": 3 - } - }, - "nested": { - "BigQueryDestination": { - "fields": { - "datasetId": { - "type": "string", - "id": 1 - } - } - }, - "ConsumptionMeteringConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - } - } - }, - "ShieldedNodes": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "VirtualNIC": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "FastSocket": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "GetOpenIDConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - } - } - }, - "GetOpenIDConfigResponse": { - "fields": { - "issuer": { - "type": "string", - "id": 1 - }, - "jwksUri": { - "type": "string", - "id": 2 - }, - "responseTypesSupported": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "subjectTypesSupported": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "idTokenSigningAlgValuesSupported": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "claimsSupported": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "grantTypes": { - "rule": "repeated", - "type": "string", - "id": 7 - } - } - }, - "GetJSONWebKeysRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - } - } - }, - "Jwk": { - "fields": { - "kty": { - "type": "string", - "id": 1 - }, - "alg": { - "type": "string", - "id": 2 - }, - "use": { - "type": "string", - "id": 3 - }, - "kid": { - "type": "string", - "id": 4 - }, - "n": { - "type": "string", - "id": 5 - }, - "e": { - "type": "string", - "id": 6 - }, - "x": { - "type": "string", - "id": 7 - }, - "y": { - "type": "string", - "id": 8 - }, - "crv": { - "type": "string", - "id": 9 - } - } - }, - "GetJSONWebKeysResponse": { - "fields": { - "keys": { - "rule": "repeated", - "type": "Jwk", - "id": 1 - } - } - }, - "CheckAutopilotCompatibilityRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "AutopilotCompatibilityIssue": { - "fields": { - "lastObservation": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "constraintType": { - "type": "string", - "id": 2 - }, - "incompatibilityType": { - "type": "IssueType", - "id": 3 - }, - "subjects": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "documentationUrl": { - "type": "string", - "id": 5 - }, - "description": { - "type": "string", - "id": 6 - } - }, - "nested": { - "IssueType": { - "values": { - "UNSPECIFIED": 0, - "INCOMPATIBILITY": 1, - "ADDITIONAL_CONFIG_REQUIRED": 2, - "PASSED_WITH_OPTIONAL_CONFIG": 3 - } - } - } - }, - "CheckAutopilotCompatibilityResponse": { - "fields": { - "issues": { - "rule": "repeated", - "type": "AutopilotCompatibilityIssue", - "id": 1 - }, - "summary": { - "type": "string", - "id": 2 - } - } - }, - "ReleaseChannel": { - "fields": { - "channel": { - "type": "Channel", - "id": 1 - } - }, - "nested": { - "Channel": { - "values": { - "UNSPECIFIED": 0, - "RAPID": 1, - "REGULAR": 2, - "STABLE": 3, - "EXTENDED": 4 - } - } - } - }, - "CostManagementConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "TpuConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "useServiceNetworking": { - "type": "bool", - "id": 2 - }, - "ipv4CidrBlock": { - "type": "string", - "id": 3 - } - } - }, - "PrivateIPv6GoogleAccess": { - "values": { - "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED": 1, - "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE": 2, - "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL": 3 - } - }, - "Master": { - "fields": {} - }, - "AutopilotConversionStatus": { - "fields": { - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "DONE": 5 - } - } - } - }, - "Autopilot": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "workloadPolicyConfig": { - "type": "WorkloadPolicyConfig", - "id": 2 - }, - "conversionStatus": { - "type": "AutopilotConversionStatus", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkloadPolicyConfig": { - "oneofs": { - "_allowNetAdmin": { - "oneof": [ - "allowNetAdmin" - ] - } - }, - "fields": { - "allowNetAdmin": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "NotificationConfig": { - "fields": { - "pubsub": { - "type": "PubSub", - "id": 1 - } - }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "UPGRADE_AVAILABLE_EVENT": 1, - "UPGRADE_EVENT": 2, - "SECURITY_BULLETIN_EVENT": 3 - } - }, - "PubSub": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "topic": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" - } - }, - "filter": { - "type": "Filter", - "id": 3 - } - } - }, - "Filter": { - "fields": { - "eventType": { - "rule": "repeated", - "type": "EventType", - "id": 1 - } - } - } - } - }, - "ConfidentialNodes": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "UpgradeResourceType": { - "values": { - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": 0, - "MASTER": 1, - "NODE_POOL": 2 - } - }, - "UpgradeEvent": { - "fields": { - "resourceType": { - "type": "UpgradeResourceType", - "id": 1 - }, - "operation": { - "type": "string", - "id": 2 - }, - "operationStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "currentVersion": { - "type": "string", - "id": 4 - }, - "targetVersion": { - "type": "string", - "id": 5 - }, - "resource": { - "type": "string", - "id": 6 - } - } - }, - "UpgradeAvailableEvent": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "resourceType": { - "type": "UpgradeResourceType", - "id": 2 - }, - "releaseChannel": { - "type": "ReleaseChannel", - "id": 3 - }, - "resource": { - "type": "string", - "id": 4 - }, - "windowsVersions": { - "type": "WindowsVersions", - "id": 5 - } - } - }, - "SecurityBulletinEvent": { - "fields": { - "resourceTypeAffected": { - "type": "string", - "id": 1 - }, - "bulletinId": { - "type": "string", - "id": 2 - }, - "cveIds": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "severity": { - "type": "string", - "id": 4 - }, - "bulletinUri": { - "type": "string", - "id": 5 - }, - "briefDescription": { - "type": "string", - "id": 6 - }, - "affectedSupportedMinors": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "patchedVersions": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "suggestedUpgradeTarget": { - "type": "string", - "id": 9 - }, - "manualStepsRequired": { - "type": "bool", - "id": 10 - } - } - }, - "IdentityServiceConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "NodePoolUpdateStrategy": { - "values": { - "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED": 0, - "BLUE_GREEN": 2, - "SURGE": 3 - } - }, - "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, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5 - } - } - } - }, - "RayClusterLoggingConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "MonitoringConfig": { - "fields": { - "componentConfig": { - "type": "MonitoringComponentConfig", - "id": 1 - }, - "managedPrometheusConfig": { - "type": "ManagedPrometheusConfig", - "id": 2 - }, - "advancedDatapathObservabilityConfig": { - "type": "AdvancedDatapathObservabilityConfig", - "id": 3 - } - } - }, - "AdvancedDatapathObservabilityConfig": { - "oneofs": { - "_enableRelay": { - "oneof": [ - "enableRelay" - ] - } - }, - "fields": { - "enableMetrics": { - "type": "bool", - "id": 1 - }, - "relayMode": { - "type": "RelayMode", - "id": 2 - }, - "enableRelay": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RelayMode": { - "values": { - "RELAY_MODE_UNSPECIFIED": 0, - "DISABLED": 1, - "INTERNAL_VPC_LB": 3, - "EXTERNAL_LB": 4 - } - } - } - }, - "RayClusterMonitoringConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - } - } - }, - "NodePoolLoggingConfig": { - "fields": { - "variantConfig": { - "type": "LoggingVariantConfig", - "id": 1 - } - } - }, - "LoggingVariantConfig": { - "fields": { - "variant": { - "type": "Variant", - "id": 1 - } - }, - "nested": { - "Variant": { - "values": { - "VARIANT_UNSPECIFIED": 0, - "DEFAULT": 1, - "MAX_THROUGHPUT": 2 - } - } - } - }, - "MonitoringComponentConfig": { - "fields": { - "enableComponents": { - "rule": "repeated", - "type": "Component", - "id": 1 - } - }, - "nested": { - "Component": { - "valuesOptions": { - "WORKLOADS": { - "deprecated": true - } - }, - "values": { - "COMPONENT_UNSPECIFIED": 0, - "SYSTEM_COMPONENTS": 1, - "WORKLOADS": 2, - "APISERVER": 3, - "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5, - "STORAGE": 7, - "HPA": 8, - "POD": 9, - "DAEMONSET": 10, - "DEPLOYMENT": 11, - "STATEFULSET": 12, - "CADVISOR": 13, - "KUBELET": 14, - "DCGM": 15 - } - } - } - }, - "DatapathProvider": { - "values": { - "DATAPATH_PROVIDER_UNSPECIFIED": 0, - "LEGACY_DATAPATH": 1, - "ADVANCED_DATAPATH": 2 - } - }, - "Fleet": { - "fields": { - "project": { - "type": "string", - "id": 1 - }, - "membership": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "preRegistered": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4": 1, - "IPV4_IPV6": 2 - } - }, - "ResourceManagerTags": { - "fields": { - "tags": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "EnterpriseConfig": { - "fields": { - "clusterTier": { - "type": "ClusterTier", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "ClusterTier": { - "values": { - "CLUSTER_TIER_UNSPECIFIED": 0, - "STANDARD": 1, - "ENTERPRISE": 2 - } - } - } - }, - "SecretManagerConfig": { - "oneofs": { - "_enabled": { - "oneof": [ - "enabled" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "SecondaryBootDisk": { - "fields": { - "mode": { - "type": "Mode", - "id": 1 - }, - "diskImage": { - "type": "string", - "id": 2 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "CONTAINER_IMAGE_CACHE": 1 - } - } - } - }, - "InTransitEncryptionConfig": { - "values": { - "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED": 0, - "IN_TRANSIT_ENCRYPTION_DISABLED": 1, - "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT": 2 - } - }, - "SecondaryBootDiskUpdateStrategy": { - "fields": {} - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "DoubleValue": { - "fields": { - "value": { - "type": "double", - "id": 1 - } - } - }, - "FloatValue": { - "fields": { - "value": { - "type": "float", - "id": 1 - } - } - }, - "Int64Value": { - "fields": { - "value": { - "type": "int64", - "id": 1 - } - } - }, - "UInt64Value": { - "fields": { - "value": { - "type": "uint64", - "id": 1 - } - } - }, - "Int32Value": { - "fields": { - "value": { - "type": "int32", - "id": 1 - } - } - }, - "UInt32Value": { - "fields": { - "value": { - "type": "uint32", - "id": 1 - } - } - }, - "BoolValue": { - "fields": { - "value": { - "type": "bool", - "id": 1 - } - } - }, - "StringValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "BytesValue": { - "fields": { - "value": { - "type": "bytes", - "id": 1 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC", - "cc_enable_arenas": true - }, - "nested": { - "Code": { - "values": { - "OK": 0, - "CANCELLED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "UNAUTHENTICATED": 16, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15 - } - }, - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/date;date", - "java_multiple_files": true, - "java_outer_classname": "DateProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js deleted file mode 100644 index ff5878650df..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.cancel_operation.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, operationId) { - // [START container_v1beta1_generated_ClusterManager_CancelOperation_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. - */ - /** - * The name (project, location, operation id) of the operation to cancel. - * Specified in the format `projects/* /locations/* /operations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCancelOperation() { - // Construct request - const request = { - projectId, - zone, - operationId, - }; - - // Run request - const response = await containerClient.cancelOperation(request); - console.log(response); - } - - callCancelOperation(); - // [END container_v1beta1_generated_ClusterManager_CancelOperation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js deleted file mode 100644 index 59762987ecf..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_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. - */ - /** - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCheckAutopilotCompatibility() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.checkAutopilotCompatibility(request); - console.log(response); - } - - callCheckAutopilotCompatibility(); - // [END container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js deleted file mode 100644 index 4c1f6d71936..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId) { - // [START container_v1beta1_generated_ClusterManager_CompleteIPRotation_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. - */ - /** - * The name (project, location, cluster name) of the cluster to complete IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCompleteIPRotation() { - // Construct request - const request = { - projectId, - zone, - clusterId, - }; - - // Run request - const response = await containerClient.completeIPRotation(request); - console.log(response); - } - - callCompleteIPRotation(); - // [END container_v1beta1_generated_ClusterManager_CompleteIPRotation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js deleted file mode 100644 index 330bbd2ffc2..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * complete upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCompleteNodePoolUpgrade() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.completeNodePoolUpgrade(request); - console.log(response); - } - - callCompleteNodePoolUpgrade(); - // [END container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js deleted file mode 100644 index dda327ddae4..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_cluster.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, cluster) { - // [START container_v1beta1_generated_ClusterManager_CreateCluster_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. A cluster - * resource (https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) - */ - // const cluster = {} - /** - * The parent (project and location) where the cluster will be created. - * Specified in the format `projects/* /locations/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCreateCluster() { - // Construct request - const request = { - projectId, - zone, - cluster, - }; - - // Run request - const response = await containerClient.createCluster(request); - console.log(response); - } - - callCreateCluster(); - // [END container_v1beta1_generated_ClusterManager_CreateCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js deleted file mode 100644 index c12cfe58144..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.create_node_pool.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePool) { - // [START container_v1beta1_generated_ClusterManager_CreateNodePool_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 node pool to create. - */ - // const nodePool = {} - /** - * The parent (project, location, cluster name) where the node pool will be - * created. Specified in the format - * `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callCreateNodePool() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePool, - }; - - // Run request - const response = await containerClient.createNodePool(request); - console.log(response); - } - - callCreateNodePool(); - // [END container_v1beta1_generated_ClusterManager_CreateNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js deleted file mode 100644 index 2da98075c9f..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_cluster.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId) { - // [START container_v1beta1_generated_ClusterManager_DeleteCluster_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. - */ - /** - * The name (project, location, cluster) of the cluster to delete. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callDeleteCluster() { - // Construct request - const request = { - projectId, - zone, - clusterId, - }; - - // Run request - const response = await containerClient.deleteCluster(request); - console.log(response); - } - - callDeleteCluster(); - // [END container_v1beta1_generated_ClusterManager_DeleteCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js deleted file mode 100644 index a11d3dbd020..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.delete_node_pool.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId) { - // [START container_v1beta1_generated_ClusterManager_DeleteNodePool_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * delete. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callDeleteNodePool() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - }; - - // Run request - const response = await containerClient.deleteNodePool(request); - console.log(response); - } - - callDeleteNodePool(); - // [END container_v1beta1_generated_ClusterManager_DeleteNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js deleted file mode 100644 index 2c68f56dfdf..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_cluster.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId) { - // [START container_v1beta1_generated_ClusterManager_GetCluster_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. - */ - /** - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetCluster() { - // Construct request - const request = { - projectId, - zone, - clusterId, - }; - - // Run request - const response = await containerClient.getCluster(request); - console.log(response); - } - - callGetCluster(); - // [END container_v1beta1_generated_ClusterManager_GetCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js deleted file mode 100644 index 9b8720fed83..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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() { - // [START container_v1beta1_generated_ClusterManager_GetJSONWebKeys_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. - */ - /** - * The cluster (project, location, cluster name) to get keys for. Specified in - * the format `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetJSONWebKeys() { - // Construct request - const request = { - }; - - // Run request - const response = await containerClient.getJSONWebKeys(request); - console.log(response); - } - - callGetJSONWebKeys(); - // [END container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js deleted file mode 100644 index 4d05c713dd4..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_node_pool.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId) { - // [START container_v1beta1_generated_ClusterManager_GetNodePool_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node pool to - * get. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetNodePool() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - }; - - // Run request - const response = await containerClient.getNodePool(request); - console.log(response); - } - - callGetNodePool(); - // [END container_v1beta1_generated_ClusterManager_GetNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js deleted file mode 100644 index 82bd868b959..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_operation.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, operationId) { - // [START container_v1beta1_generated_ClusterManager_GetOperation_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. - */ - /** - * The name (project, location, operation id) of the operation to get. - * Specified in the format `projects/* /locations/* /operations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetOperation() { - // Construct request - const request = { - projectId, - zone, - operationId, - }; - - // Run request - const response = await containerClient.getOperation(request); - console.log(response); - } - - callGetOperation(); - // [END container_v1beta1_generated_ClusterManager_GetOperation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js deleted file mode 100644 index ffdaf1b8e4d..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.get_server_config.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone) { - // [START container_v1beta1_generated_ClusterManager_GetServerConfig_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. - */ - /** - * The name (project and location) of the server config to get, - * specified in the format `projects/* /locations/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callGetServerConfig() { - // Construct request - const request = { - projectId, - zone, - }; - - // Run request - const response = await containerClient.getServerConfig(request); - console.log(response); - } - - callGetServerConfig(); - // [END container_v1beta1_generated_ClusterManager_GetServerConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js deleted file mode 100644 index 3062b95c518..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_clusters.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone) { - // [START container_v1beta1_generated_ClusterManager_ListClusters_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. - */ - /** - * The parent (project and location) where the clusters will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListClusters() { - // Construct request - const request = { - projectId, - zone, - }; - - // Run request - const response = await containerClient.listClusters(request); - console.log(response); - } - - callListClusters(); - // [END container_v1beta1_generated_ClusterManager_ListClusters_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js deleted file mode 100644 index 12e0cf5c5d1..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_locations.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 container_v1beta1_generated_ClusterManager_ListLocations_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. Contains the name of the resource requested. - * Specified in the format `projects/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListLocations() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await containerClient.listLocations(request); - console.log(response); - } - - callListLocations(); - // [END container_v1beta1_generated_ClusterManager_ListLocations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js deleted file mode 100644 index cd741e4614c..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_node_pools.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId) { - // [START container_v1beta1_generated_ClusterManager_ListNodePools_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. - */ - /** - * The parent (project, location, cluster name) where the node pools will be - * listed. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListNodePools() { - // Construct request - const request = { - projectId, - zone, - clusterId, - }; - - // Run request - const response = await containerClient.listNodePools(request); - console.log(response); - } - - callListNodePools(); - // [END container_v1beta1_generated_ClusterManager_ListNodePools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js deleted file mode 100644 index a2b63247fe8..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_operations.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone) { - // [START container_v1beta1_generated_ClusterManager_ListOperations_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. - */ - /** - * The parent (project and location) where the operations will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - */ - // const parent = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListOperations() { - // Construct request - const request = { - projectId, - zone, - }; - - // Run request - const response = await containerClient.listOperations(request); - console.log(response); - } - - callListOperations(); - // [END container_v1beta1_generated_ClusterManager_ListOperations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js deleted file mode 100644 index 0b2b15f22d0..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_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 project where subnetworks are usable. - * Specified in the format `projects/*`. - */ - // const parent = 'abc123' - /** - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - */ - // const filter = 'abc123' - /** - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - */ - // const pageSize = 1234 - /** - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - */ - // const pageToken = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callListUsableSubnetworks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = containerClient.listUsableSubnetworksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUsableSubnetworks(); - // [END container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js deleted file mode 100644 index 812733d6941..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId) { - // [START container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_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. - */ - /** - * The name (project, location, cluster, node pool id) of the node poll to - * rollback upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - /** - * Option for rollback to ignore the PodDisruptionBudget. - * Default value is false. - */ - // const respectPdb = true - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callRollbackNodePoolUpgrade() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - }; - - // Run request - const response = await containerClient.rollbackNodePoolUpgrade(request); - console.log(response); - } - - callRollbackNodePoolUpgrade(); - // [END container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js deleted file mode 100644 index a2b7c973d73..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_addons_config.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, addonsConfig) { - // [START container_v1beta1_generated_ClusterManager_SetAddonsConfig_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 desired configurations for the various addons available to - * run in the cluster. - */ - // const addonsConfig = {} - /** - * The name (project, location, cluster) of the cluster to set addons. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetAddonsConfig() { - // Construct request - const request = { - projectId, - zone, - clusterId, - addonsConfig, - }; - - // Run request - const response = await containerClient.setAddonsConfig(request); - console.log(response); - } - - callSetAddonsConfig(); - // [END container_v1beta1_generated_ClusterManager_SetAddonsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js deleted file mode 100644 index bd9833ac87c..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_labels.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, resourceLabels, labelFingerprint) { - // [START container_v1beta1_generated_ClusterManager_SetLabels_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 labels to set for that cluster. - */ - // const resourceLabels = [1,2,3,4] - /** - * Required. The fingerprint of the previous set of labels for this resource, - * used to detect conflicts. The fingerprint is initially generated by - * Kubernetes Engine and changes after every request to modify or update - * labels. You must always provide an up-to-date fingerprint hash when - * updating or changing labels. Make a `get()` request to the - * resource to get the latest fingerprint. - */ - // const labelFingerprint = 'abc123' - /** - * The name (project, location, cluster name) of the cluster to set labels. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLabels() { - // Construct request - const request = { - projectId, - zone, - clusterId, - resourceLabels, - labelFingerprint, - }; - - // Run request - const response = await containerClient.setLabels(request); - console.log(response); - } - - callSetLabels(); - // [END container_v1beta1_generated_ClusterManager_SetLabels_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js deleted file mode 100644 index 347161f6357..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, enabled) { - // [START container_v1beta1_generated_ClusterManager_SetLegacyAbac_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. Whether ABAC authorization will be enabled in the cluster. - */ - // const enabled = true - /** - * The name (project, location, cluster name) of the cluster to set legacy - * abac. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLegacyAbac() { - // Construct request - const request = { - projectId, - zone, - clusterId, - enabled, - }; - - // Run request - const response = await containerClient.setLegacyAbac(request); - console.log(response); - } - - callSetLegacyAbac(); - // [END container_v1beta1_generated_ClusterManager_SetLegacyAbac_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js deleted file mode 100644 index 75565c475a6..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_locations.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, locations) { - // [START container_v1beta1_generated_ClusterManager_SetLocations_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 desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. - * This list must always include the cluster's primary zone. - */ - // const locations = ['abc','def'] - /** - * The name (project, location, cluster) of the cluster to set locations. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLocations() { - // Construct request - const request = { - projectId, - zone, - clusterId, - locations, - }; - - // Run request - const response = await containerClient.setLocations(request); - console.log(response); - } - - callSetLocations(); - // [END container_v1beta1_generated_ClusterManager_SetLocations_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js deleted file mode 100644 index 55a67ed9634..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_logging_service.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, loggingService) { - // [START container_v1beta1_generated_ClusterManager_SetLoggingService_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 logging service the cluster should use to write logs. - * Currently available options: - * * `logging.googleapis.com/kubernetes` - The Cloud Logging - * service with a Kubernetes-native resource model - * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - * available as of GKE 1.15). - * * `none` - no logs will be exported from the cluster. - * If left as an empty string,`logging.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - */ - // const loggingService = 'abc123' - /** - * The name (project, location, cluster) of the cluster to set logging. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetLoggingService() { - // Construct request - const request = { - projectId, - zone, - clusterId, - loggingService, - }; - - // Run request - const response = await containerClient.setLoggingService(request); - console.log(response); - } - - callSetLoggingService(); - // [END container_v1beta1_generated_ClusterManager_SetLoggingService_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js deleted file mode 100644 index 18ae4736ab7..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, maintenancePolicy) { - // [START container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_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 Google Developers Console project ID or project - * number (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - */ - // const projectId = 'abc123' - /** - * Required. The name of the Google Compute Engine - * zone (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. - */ - // const zone = 'abc123' - /** - * Required. The name of the cluster to update. - */ - // const clusterId = 'abc123' - /** - * Required. The maintenance policy to be set for the cluster. An empty field - * clears the existing maintenance policy. - */ - // const maintenancePolicy = {} - /** - * The name (project, location, cluster name) of the cluster to set - * maintenance policy. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMaintenancePolicy() { - // Construct request - const request = { - projectId, - zone, - clusterId, - maintenancePolicy, - }; - - // Run request - const response = await containerClient.setMaintenancePolicy(request); - console.log(response); - } - - callSetMaintenancePolicy(); - // [END container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js deleted file mode 100644 index ad3513790e4..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_master_auth.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, action, update) { - // [START container_v1beta1_generated_ClusterManager_SetMasterAuth_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 exact form of action to be taken on the master auth. - */ - // const action = {} - /** - * Required. A description of the update. - */ - // const update = {} - /** - * The name (project, location, cluster) of the cluster to set auth. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMasterAuth() { - // Construct request - const request = { - projectId, - zone, - clusterId, - action, - update, - }; - - // Run request - const response = await containerClient.setMasterAuth(request); - console.log(response); - } - - callSetMasterAuth(); - // [END container_v1beta1_generated_ClusterManager_SetMasterAuth_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js deleted file mode 100644 index caa715511dc..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, monitoringService) { - // [START container_v1beta1_generated_ClusterManager_SetMonitoringService_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 monitoring service the cluster should use to write metrics. - * Currently available options: - * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - * service with a Kubernetes-native resource model - * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - * longer available as of GKE 1.15). - * * `none` - No metrics will be exported from the cluster. - * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - */ - // const monitoringService = 'abc123' - /** - * The name (project, location, cluster) of the cluster to set monitoring. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetMonitoringService() { - // Construct request - const request = { - projectId, - zone, - clusterId, - monitoringService, - }; - - // Run request - const response = await containerClient.setMonitoringService(request); - console.log(response); - } - - callSetMonitoringService(); - // [END container_v1beta1_generated_ClusterManager_SetMonitoringService_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js deleted file mode 100644 index 1d596241a96..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_network_policy.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, networkPolicy) { - // [START container_v1beta1_generated_ClusterManager_SetNetworkPolicy_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. Configuration options for the NetworkPolicy feature. - */ - // const networkPolicy = {} - /** - * The name (project, location, cluster name) of the cluster to set networking - * policy. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNetworkPolicy() { - // Construct request - const request = { - projectId, - zone, - clusterId, - networkPolicy, - }; - - // Run request - const response = await containerClient.setNetworkPolicy(request); - console.log(response); - } - - callSetNetworkPolicy(); - // [END container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js deleted file mode 100644 index cf5b1664e49..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId, autoscaling) { - // [START container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_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. Autoscaling configuration for the node pool. - */ - // const autoscaling = {} - /** - * The name (project, location, cluster, node pool) of the node pool to set - * autoscaler settings. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolAutoscaling() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - autoscaling, - }; - - // Run request - const response = await containerClient.setNodePoolAutoscaling(request); - console.log(response); - } - - callSetNodePoolAutoscaling(); - // [END container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js deleted file mode 100644 index ee44e4267bb..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId, management) { - // [START container_v1beta1_generated_ClusterManager_SetNodePoolManagement_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. NodeManagement configuration for the node pool. - */ - // const management = {} - /** - * The name (project, location, cluster, node pool id) of the node pool to set - * management properties. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolManagement() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - management, - }; - - // Run request - const response = await containerClient.setNodePoolManagement(request); - console.log(response); - } - - callSetNodePoolManagement(); - // [END container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js deleted file mode 100644 index f35fcae02e7..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId, nodeCount) { - // [START container_v1beta1_generated_ClusterManager_SetNodePoolSize_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 desired node count for the pool. - */ - // const nodeCount = 1234 - /** - * The name (project, location, cluster, node pool id) of the node pool to set - * size. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callSetNodePoolSize() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - nodeCount, - }; - - // Run request - const response = await containerClient.setNodePoolSize(request); - console.log(response); - } - - callSetNodePoolSize(); - // [END container_v1beta1_generated_ClusterManager_SetNodePoolSize_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js deleted file mode 100644 index aa01319ae56..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId) { - // [START container_v1beta1_generated_ClusterManager_StartIPRotation_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. - */ - /** - * The name (project, location, cluster name) of the cluster to start IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - /** - * Whether to rotate credentials during IP rotation. - */ - // const rotateCredentials = true - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callStartIPRotation() { - // Construct request - const request = { - projectId, - zone, - clusterId, - }; - - // Run request - const response = await containerClient.startIPRotation(request); - console.log(response); - } - - callStartIPRotation(); - // [END container_v1beta1_generated_ClusterManager_StartIPRotation_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js deleted file mode 100644 index fc86ab3d9a9..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_cluster.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, update) { - // [START container_v1beta1_generated_ClusterManager_UpdateCluster_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. A description of the update. - */ - // const update = {} - /** - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateCluster() { - // Construct request - const request = { - projectId, - zone, - clusterId, - update, - }; - - // Run request - const response = await containerClient.updateCluster(request); - console.log(response); - } - - callUpdateCluster(); - // [END container_v1beta1_generated_ClusterManager_UpdateCluster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js deleted file mode 100644 index 91ea8344b8c..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_master.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, masterVersion) { - // [START container_v1beta1_generated_ClusterManager_UpdateMaster_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 Kubernetes version to change the master to. - * Users may specify either explicit versions offered by - * Kubernetes Engine or version aliases, which have the following behavior: - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the default Kubernetes version - */ - // const masterVersion = 'abc123' - /** - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - */ - // const name = 'abc123' - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateMaster() { - // Construct request - const request = { - projectId, - zone, - clusterId, - masterVersion, - }; - - // Run request - const response = await containerClient.updateMaster(request); - console.log(response); - } - - callUpdateMaster(); - // [END container_v1beta1_generated_ClusterManager_UpdateMaster_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js deleted file mode 100644 index af202e83760..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/cluster_manager.update_node_pool.js +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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(projectId, zone, clusterId, nodePoolId, nodeVersion, imageType) { - // [START container_v1beta1_generated_ClusterManager_UpdateNodePool_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 Kubernetes version to change the nodes to (typically an - * upgrade). - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the Kubernetes master version - */ - // const nodeVersion = 'abc123' - /** - * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. - */ - // const imageType = 'abc123' - /** - * The desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. - */ - // const locations = ['abc','def'] - /** - * The desired workload metadata config for the node pool. - */ - // const workloadMetadataConfig = {} - /** - * The name (project, location, cluster, node pool) of the node pool to - * update. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - */ - // const name = 'abc123' - /** - * Upgrade settings control disruption and speed of the upgrade. - */ - // const upgradeSettings = {} - /** - * The desired network tags to be applied to all nodes in the node pool. - * If this field is not present, the tags will not be changed. Otherwise, - * the existing network tags will be *replaced* with the provided tags. - */ - // const tags = {} - /** - * The desired node taints to be applied to all nodes in the node pool. - * If this field is not present, the taints will not be changed. Otherwise, - * the existing node taints will be *replaced* with the provided taints. - */ - // const taints = {} - /** - * The desired node labels to be applied to all nodes in the node pool. - * If this field is not present, the labels will not be changed. Otherwise, - * the existing node labels will be *replaced* with the provided labels. - */ - // const labels = {} - /** - * Parameters that can be configured on Linux nodes. - */ - // const linuxNodeConfig = {} - /** - * Node kubelet configs. - */ - // const kubeletConfig = {} - /** - * Node network config. - */ - // const nodeNetworkConfig = {} - /** - * GCFS config. - */ - // const gcfsConfig = {} - /** - * Confidential nodes config. - * All the nodes in the node pool will be Confidential VM once enabled. - */ - // const confidentialNodes = {} - /** - * Enable or disable gvnic on the node pool. - */ - // const gvnic = {} - /** - * The current etag of the node pool. - * If an etag is provided and does not match the current etag of the node - * pool, update will be blocked and an ABORTED error will be returned. - */ - // const etag = 'abc123' - /** - * Enable or disable NCCL fast socket for the node pool. - */ - // const fastSocket = {} - /** - * Logging configuration. - */ - // const loggingConfig = {} - /** - * The resource labels for the node pool to use to annotate any related - * Google Compute Engine resources. - */ - // const resourceLabels = {} - /** - * Parameters that can be configured on Windows nodes. - */ - // const windowsNodeConfig = {} - /** - * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. - */ - // const accelerators = [1,2,3,4] - /** - * Optional. The desired machine type for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. - */ - // const machineType = 'abc123' - /** - * Optional. The desired disk type for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk type. - */ - // const diskType = 'abc123' - /** - * Optional. The desired disk size for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk size. - */ - // const diskSizeGb = 1234 - /** - * Desired resource manager tag keys and values to be attached to the nodes - * for managing Compute Engine firewalls using Network Firewall Policies. - * Existing tags will be replaced with new values. - */ - // const resourceManagerTags = {} - /** - * The desired containerd config for nodes in the node pool. - * Initiates an upgrade operation that recreates the nodes with the new - * config. - */ - // const containerdConfig = {} - /** - * Specifies the configuration of queued provisioning. - */ - // const queuedProvisioning = {} - - // Imports the Container library - const {ClusterManagerClient} = require('@google-cloud/container').v1beta1; - - // Instantiates a client - const containerClient = new ClusterManagerClient(); - - async function callUpdateNodePool() { - // Construct request - const request = { - projectId, - zone, - clusterId, - nodePoolId, - nodeVersion, - imageType, - }; - - // Run request - const response = await containerClient.updateNodePool(request); - console.log(response); - } - - callUpdateNodePool(); - // [END container_v1beta1_generated_ClusterManager_UpdateNodePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json deleted file mode 100644 index b43486c8c1c..00000000000 --- a/owl-bot-staging/google-container/v1beta1/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json +++ /dev/null @@ -1,1983 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-container", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.container.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "container_v1beta1_generated_ClusterManager_ListClusters_async", - "title": "ClusterManager listClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists all clusters owned by a project in either the specified zone or all zones.", - "canonical": true, - "file": "cluster_manager.list_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListClusters", - "fullName": "google.container.v1beta1.ClusterManager.ListClusters", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ListClustersResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "ListClusters", - "fullName": "google.container.v1beta1.ClusterManager.ListClusters", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_GetCluster_async", - "title": "ClusterManager getCluster Sample", - "origin": "API_DEFINITION", - "description": " Gets the details for a specific cluster.", - "canonical": true, - "file": "cluster_manager.get_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCluster", - "fullName": "google.container.v1beta1.ClusterManager.GetCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Cluster", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "GetCluster", - "fullName": "google.container.v1beta1.ClusterManager.GetCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CreateCluster_async", - "title": "ClusterManager createCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", - "canonical": true, - "file": "cluster_manager.create_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCluster", - "fullName": "google.container.v1beta1.ClusterManager.CreateCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": ".google.container.v1beta1.Cluster" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CreateCluster", - "fullName": "google.container.v1beta1.ClusterManager.CreateCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_UpdateCluster_async", - "title": "ClusterManager updateCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings for a specific cluster.", - "canonical": true, - "file": "cluster_manager.update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCluster", - "fullName": "google.container.v1beta1.ClusterManager.UpdateCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "update", - "type": ".google.container.v1beta1.ClusterUpdate" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateCluster", - "fullName": "google.container.v1beta1.ClusterManager.UpdateCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_UpdateNodePool_async", - "title": "ClusterManager updateNodePool Sample", - "origin": "API_DEFINITION", - "description": " Updates the version and/or image type of a specific node pool.", - "canonical": true, - "file": "cluster_manager.update_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 200, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateNodePool", - "fullName": "google.container.v1beta1.ClusterManager.UpdateNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "node_version", - "type": "TYPE_STRING" - }, - { - "name": "image_type", - "type": "TYPE_STRING" - }, - { - "name": "locations", - "type": "TYPE_STRING[]" - }, - { - "name": "workload_metadata_config", - "type": ".google.container.v1beta1.WorkloadMetadataConfig" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "upgrade_settings", - "type": ".google.container.v1beta1.NodePool.UpgradeSettings" - }, - { - "name": "tags", - "type": ".google.container.v1beta1.NetworkTags" - }, - { - "name": "taints", - "type": ".google.container.v1beta1.NodeTaints" - }, - { - "name": "labels", - "type": ".google.container.v1beta1.NodeLabels" - }, - { - "name": "linux_node_config", - "type": ".google.container.v1beta1.LinuxNodeConfig" - }, - { - "name": "kubelet_config", - "type": ".google.container.v1beta1.NodeKubeletConfig" - }, - { - "name": "node_network_config", - "type": ".google.container.v1beta1.NodeNetworkConfig" - }, - { - "name": "gcfs_config", - "type": ".google.container.v1beta1.GcfsConfig" - }, - { - "name": "confidential_nodes", - "type": ".google.container.v1beta1.ConfidentialNodes" - }, - { - "name": "gvnic", - "type": ".google.container.v1beta1.VirtualNIC" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "fast_socket", - "type": ".google.container.v1beta1.FastSocket" - }, - { - "name": "logging_config", - "type": ".google.container.v1beta1.NodePoolLoggingConfig" - }, - { - "name": "resource_labels", - "type": ".google.container.v1beta1.ResourceLabels" - }, - { - "name": "windows_node_config", - "type": ".google.container.v1beta1.WindowsNodeConfig" - }, - { - "name": "accelerators", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "machine_type", - "type": "TYPE_STRING" - }, - { - "name": "disk_type", - "type": "TYPE_STRING" - }, - { - "name": "disk_size_gb", - "type": "TYPE_INT64" - }, - { - "name": "resource_manager_tags", - "type": ".google.container.v1beta1.ResourceManagerTags" - }, - { - "name": "containerd_config", - "type": ".google.container.v1beta1.ContainerdConfig" - }, - { - "name": "queued_provisioning", - "type": ".google.container.v1beta1.NodePool.QueuedProvisioning" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateNodePool", - "fullName": "google.container.v1beta1.ClusterManager.UpdateNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async", - "title": "ClusterManager setNodePoolAutoscaling Sample", - "origin": "API_DEFINITION", - "description": " Sets the autoscaling settings of a specific node pool.", - "canonical": true, - "file": "cluster_manager.set_node_pool_autoscaling.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolAutoscaling", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "autoscaling", - "type": ".google.container.v1beta1.NodePoolAutoscaling" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolAutoscaling", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolAutoscaling", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetLoggingService_async", - "title": "ClusterManager setLoggingService Sample", - "origin": "API_DEFINITION", - "description": " Sets the logging service for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_logging_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLoggingService", - "fullName": "google.container.v1beta1.ClusterManager.SetLoggingService", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "logging_service", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLoggingService", - "fullName": "google.container.v1beta1.ClusterManager.SetLoggingService", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetMonitoringService_async", - "title": "ClusterManager setMonitoringService Sample", - "origin": "API_DEFINITION", - "description": " Sets the monitoring service for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_monitoring_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMonitoringService", - "fullName": "google.container.v1beta1.ClusterManager.SetMonitoringService", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "monitoring_service", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMonitoringService", - "fullName": "google.container.v1beta1.ClusterManager.SetMonitoringService", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetAddonsConfig_async", - "title": "ClusterManager setAddonsConfig Sample", - "origin": "API_DEFINITION", - "description": " Sets the addons for a specific cluster.", - "canonical": true, - "file": "cluster_manager.set_addons_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetAddonsConfig", - "fullName": "google.container.v1beta1.ClusterManager.SetAddonsConfig", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "addons_config", - "type": ".google.container.v1beta1.AddonsConfig" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetAddonsConfig", - "fullName": "google.container.v1beta1.ClusterManager.SetAddonsConfig", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetLocations_async", - "title": "ClusterManager setLocations Sample", - "origin": "API_DEFINITION", - "description": " Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) instead.", - "canonical": true, - "file": "cluster_manager.set_locations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLocations", - "fullName": "google.container.v1beta1.ClusterManager.SetLocations", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "locations", - "type": "TYPE_STRING[]" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLocations", - "fullName": "google.container.v1beta1.ClusterManager.SetLocations", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_UpdateMaster_async", - "title": "ClusterManager updateMaster Sample", - "origin": "API_DEFINITION", - "description": " Updates the master for a specific cluster.", - "canonical": true, - "file": "cluster_manager.update_master.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateMaster", - "fullName": "google.container.v1beta1.ClusterManager.UpdateMaster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "master_version", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "UpdateMaster", - "fullName": "google.container.v1beta1.ClusterManager.UpdateMaster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetMasterAuth_async", - "title": "ClusterManager setMasterAuth Sample", - "origin": "API_DEFINITION", - "description": " Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", - "canonical": true, - "file": "cluster_manager.set_master_auth.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMasterAuth", - "fullName": "google.container.v1beta1.ClusterManager.SetMasterAuth", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "action", - "type": ".google.container.v1beta1.SetMasterAuthRequest.Action" - }, - { - "name": "update", - "type": ".google.container.v1beta1.MasterAuth" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMasterAuth", - "fullName": "google.container.v1beta1.ClusterManager.SetMasterAuth", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_DeleteCluster_async", - "title": "ClusterManager deleteCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", - "canonical": true, - "file": "cluster_manager.delete_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCluster", - "fullName": "google.container.v1beta1.ClusterManager.DeleteCluster", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "DeleteCluster", - "fullName": "google.container.v1beta1.ClusterManager.DeleteCluster", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_ListOperations_async", - "title": "ClusterManager listOperations Sample", - "origin": "API_DEFINITION", - "description": " Lists all operations in a project in the specified zone or all zones.", - "canonical": true, - "file": "cluster_manager.list_operations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOperations", - "fullName": "google.container.v1beta1.ClusterManager.ListOperations", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ListOperationsResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "ListOperations", - "fullName": "google.container.v1beta1.ClusterManager.ListOperations", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_GetOperation_async", - "title": "ClusterManager getOperation Sample", - "origin": "API_DEFINITION", - "description": " Gets the specified operation.", - "canonical": true, - "file": "cluster_manager.get_operation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOperation", - "fullName": "google.container.v1beta1.ClusterManager.GetOperation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "operation_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "GetOperation", - "fullName": "google.container.v1beta1.ClusterManager.GetOperation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CancelOperation_async", - "title": "ClusterManager cancelOperation Sample", - "origin": "API_DEFINITION", - "description": " Cancels the specified operation.", - "canonical": true, - "file": "cluster_manager.cancel_operation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelOperation", - "fullName": "google.container.v1beta1.ClusterManager.CancelOperation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "operation_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CancelOperation", - "fullName": "google.container.v1beta1.ClusterManager.CancelOperation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_GetServerConfig_async", - "title": "ClusterManager getServerConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns configuration info about the Google Kubernetes Engine service.", - "canonical": true, - "file": "cluster_manager.get_server_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetServerConfig", - "fullName": "google.container.v1beta1.ClusterManager.GetServerConfig", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ServerConfig", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "GetServerConfig", - "fullName": "google.container.v1beta1.ClusterManager.GetServerConfig", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async", - "title": "ClusterManager getJSONWebKeys Sample", - "origin": "API_DEFINITION", - "description": " Gets the public component of the cluster signing keys in JSON Web Key format.", - "canonical": true, - "file": "cluster_manager.get_j_s_o_n_web_keys.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.GetJSONWebKeysResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_ListNodePools_async", - "title": "ClusterManager listNodePools Sample", - "origin": "API_DEFINITION", - "description": " Lists the node pools for a cluster.", - "canonical": true, - "file": "cluster_manager.list_node_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListNodePools", - "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ListNodePoolsResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "ListNodePools", - "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_GetNodePool_async", - "title": "ClusterManager getNodePool Sample", - "origin": "API_DEFINITION", - "description": " Retrieves the requested node pool.", - "canonical": true, - "file": "cluster_manager.get_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetNodePool", - "fullName": "google.container.v1beta1.ClusterManager.GetNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.NodePool", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "GetNodePool", - "fullName": "google.container.v1beta1.ClusterManager.GetNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CreateNodePool_async", - "title": "ClusterManager createNodePool Sample", - "origin": "API_DEFINITION", - "description": " Creates a node pool for a cluster.", - "canonical": true, - "file": "cluster_manager.create_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateNodePool", - "fullName": "google.container.v1beta1.ClusterManager.CreateNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool", - "type": ".google.container.v1beta1.NodePool" - }, - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CreateNodePool", - "fullName": "google.container.v1beta1.ClusterManager.CreateNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_DeleteNodePool_async", - "title": "ClusterManager deleteNodePool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a node pool from a cluster.", - "canonical": true, - "file": "cluster_manager.delete_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteNodePool", - "fullName": "google.container.v1beta1.ClusterManager.DeleteNodePool", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "DeleteNodePool", - "fullName": "google.container.v1beta1.ClusterManager.DeleteNodePool", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async", - "title": "ClusterManager completeNodePoolUpgrade Sample", - "origin": "API_DEFINITION", - "description": " CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", - "canonical": true, - "file": "cluster_manager.complete_node_pool_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteNodePoolUpgrade", - "fullName": "google.container.v1beta1.ClusterManager.CompleteNodePoolUpgrade", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CompleteNodePoolUpgrade", - "fullName": "google.container.v1beta1.ClusterManager.CompleteNodePoolUpgrade", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async", - "title": "ClusterManager rollbackNodePoolUpgrade Sample", - "origin": "API_DEFINITION", - "description": " Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", - "canonical": true, - "file": "cluster_manager.rollback_node_pool_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RollbackNodePoolUpgrade", - "fullName": "google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "respect_pdb", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "RollbackNodePoolUpgrade", - "fullName": "google.container.v1beta1.ClusterManager.RollbackNodePoolUpgrade", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async", - "title": "ClusterManager setNodePoolManagement Sample", - "origin": "API_DEFINITION", - "description": " Sets the NodeManagement options for a node pool.", - "canonical": true, - "file": "cluster_manager.set_node_pool_management.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolManagement", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolManagement", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "management", - "type": ".google.container.v1beta1.NodeManagement" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolManagement", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolManagement", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetLabels_async", - "title": "ClusterManager setLabels Sample", - "origin": "API_DEFINITION", - "description": " Sets labels on a cluster.", - "canonical": true, - "file": "cluster_manager.set_labels.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLabels", - "fullName": "google.container.v1beta1.ClusterManager.SetLabels", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "resource_labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "label_fingerprint", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLabels", - "fullName": "google.container.v1beta1.ClusterManager.SetLabels", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetLegacyAbac_async", - "title": "ClusterManager setLegacyAbac Sample", - "origin": "API_DEFINITION", - "description": " Enables or disables the ABAC authorization mechanism on a cluster.", - "canonical": true, - "file": "cluster_manager.set_legacy_abac.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetLegacyAbac", - "fullName": "google.container.v1beta1.ClusterManager.SetLegacyAbac", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "enabled", - "type": "TYPE_BOOL" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetLegacyAbac", - "fullName": "google.container.v1beta1.ClusterManager.SetLegacyAbac", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_StartIPRotation_async", - "title": "ClusterManager startIPRotation Sample", - "origin": "API_DEFINITION", - "description": " Starts master IP rotation.", - "canonical": true, - "file": "cluster_manager.start_i_p_rotation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StartIPRotation", - "fullName": "google.container.v1beta1.ClusterManager.StartIPRotation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "rotate_credentials", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "StartIPRotation", - "fullName": "google.container.v1beta1.ClusterManager.StartIPRotation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CompleteIPRotation_async", - "title": "ClusterManager completeIPRotation Sample", - "origin": "API_DEFINITION", - "description": " Completes master IP rotation.", - "canonical": true, - "file": "cluster_manager.complete_i_p_rotation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CompleteIPRotation", - "fullName": "google.container.v1beta1.ClusterManager.CompleteIPRotation", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CompleteIPRotation", - "fullName": "google.container.v1beta1.ClusterManager.CompleteIPRotation", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetNodePoolSize_async", - "title": "ClusterManager setNodePoolSize Sample", - "origin": "API_DEFINITION", - "description": " SetNodePoolSizeRequest sets the size of a node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1beta1.NodePool.locations].", - "canonical": true, - "file": "cluster_manager.set_node_pool_size.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNodePoolSize", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolSize", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "node_count", - "type": "TYPE_INT32" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNodePoolSize", - "fullName": "google.container.v1beta1.ClusterManager.SetNodePoolSize", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async", - "title": "ClusterManager setNetworkPolicy Sample", - "origin": "API_DEFINITION", - "description": " Enables or disables Network Policy for a cluster.", - "canonical": true, - "file": "cluster_manager.set_network_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetNetworkPolicy", - "fullName": "google.container.v1beta1.ClusterManager.SetNetworkPolicy", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "network_policy", - "type": ".google.container.v1beta1.NetworkPolicy" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetNetworkPolicy", - "fullName": "google.container.v1beta1.ClusterManager.SetNetworkPolicy", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async", - "title": "ClusterManager setMaintenancePolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the maintenance policy for a cluster.", - "canonical": true, - "file": "cluster_manager.set_maintenance_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetMaintenancePolicy", - "fullName": "google.container.v1beta1.ClusterManager.SetMaintenancePolicy", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "maintenance_policy", - "type": ".google.container.v1beta1.MaintenancePolicy" - }, - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.Operation", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "SetMaintenancePolicy", - "fullName": "google.container.v1beta1.ClusterManager.SetMaintenancePolicy", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async", - "title": "ClusterManager listUsableSubnetworks Sample", - "origin": "API_DEFINITION", - "description": " Lists subnetworks that can be used for creating clusters in a project.", - "canonical": true, - "file": "cluster_manager.list_usable_subnetworks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUsableSubnetworks", - "fullName": "google.container.v1beta1.ClusterManager.ListUsableSubnetworks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ListUsableSubnetworksResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "ListUsableSubnetworks", - "fullName": "google.container.v1beta1.ClusterManager.ListUsableSubnetworks", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async", - "title": "ClusterManager checkAutopilotCompatibility Sample", - "origin": "API_DEFINITION", - "description": " Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.", - "canonical": true, - "file": "cluster_manager.check_autopilot_compatibility.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckAutopilotCompatibility", - "fullName": "google.container.v1beta1.ClusterManager.CheckAutopilotCompatibility", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.CheckAutopilotCompatibilityResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "CheckAutopilotCompatibility", - "fullName": "google.container.v1beta1.ClusterManager.CheckAutopilotCompatibility", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - }, - { - "regionTag": "container_v1beta1_generated_ClusterManager_ListLocations_async", - "title": "ClusterManager listLocations Sample", - "origin": "API_DEFINITION", - "description": " Fetches locations that offer Google Kubernetes Engine.", - "canonical": true, - "file": "cluster_manager.list_locations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLocations", - "fullName": "google.container.v1beta1.ClusterManager.ListLocations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.container.v1beta1.ListLocationsResponse", - "client": { - "shortName": "ClusterManagerClient", - "fullName": "google.container.v1beta1.ClusterManagerClient" - }, - "method": { - "shortName": "ListLocations", - "fullName": "google.container.v1beta1.ClusterManager.ListLocations", - "service": { - "shortName": "ClusterManager", - "fullName": "google.container.v1beta1.ClusterManager" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-container/v1beta1/src/index.ts b/owl-bot-staging/google-container/v1beta1/src/index.ts deleted file mode 100644 index bdbfbc9ddbb..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 v1beta1 from './v1beta1'; -const ClusterManagerClient = v1beta1.ClusterManagerClient; -type ClusterManagerClient = v1beta1.ClusterManagerClient; -export {v1beta1, ClusterManagerClient}; -export default {v1beta1, ClusterManagerClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts deleted file mode 100644 index 2544f20e8d8..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client.ts +++ /dev/null @@ -1,3637 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1beta1/cluster_manager_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './cluster_manager_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Google Kubernetes Engine Cluster Manager v1beta1 - * @class - * @memberof v1beta1 - */ -export class ClusterManagerClient { - 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}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - clusterManagerStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ClusterManagerClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new ClusterManagerClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ClusterManagerClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'container.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._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 = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // 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 = { - listUsableSubnetworks: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'subnetworks') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.container.v1beta1.ClusterManager', 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.clusterManagerStub) { - return this.clusterManagerStub; - } - - // Put together the "service stub" for - // google.container.v1beta1.ClusterManager. - this.clusterManagerStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.container.v1beta1.ClusterManager') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.container.v1beta1.ClusterManager, - 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 clusterManagerStubMethods = - ['listClusters', 'getCluster', 'createCluster', 'updateCluster', 'updateNodePool', 'setNodePoolAutoscaling', 'setLoggingService', 'setMonitoringService', 'setAddonsConfig', 'setLocations', 'updateMaster', 'setMasterAuth', 'deleteCluster', 'listOperations', 'getOperation', 'cancelOperation', 'getServerConfig', 'getJsonWebKeys', 'listNodePools', 'getNodePool', 'createNodePool', 'deleteNodePool', 'completeNodePoolUpgrade', 'rollbackNodePoolUpgrade', 'setNodePoolManagement', 'setLabels', 'setLegacyAbac', 'startIpRotation', 'completeIpRotation', 'setNodePoolSize', 'setNetworkPolicy', 'setMaintenancePolicy', 'listUsableSubnetworks', 'checkAutopilotCompatibility', 'listLocations']; - for (const methodName of clusterManagerStubMethods) { - const callPromise = this.clusterManagerStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.clusterManagerStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'container.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'container.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Lists all clusters owned by a project in either the specified zone or all - * zones. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides, or "-" for all zones. This field has been deprecated and - * replaced by the parent field. - * @param {string} request.parent - * The parent (project and location) where the clusters will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListClustersResponse|ListClustersResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_clusters.js - * region_tag:container_v1beta1_generated_ClusterManager_ListClusters_async - */ - listClusters( - request?: protos.google.container.v1beta1.IListClustersRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|undefined, {}|undefined - ]>; - listClusters( - request: protos.google.container.v1beta1.IListClustersRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|null|undefined, - {}|null|undefined>): void; - listClusters( - request: protos.google.container.v1beta1.IListClustersRequest, - callback: Callback< - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|null|undefined, - {}|null|undefined>): void; - listClusters( - request?: protos.google.container.v1beta1.IListClustersRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IListClustersResponse, - protos.google.container.v1beta1.IListClustersRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.listClusters(request, options, callback); - } -/** - * Gets the details for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to retrieve. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Cluster|Cluster}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_cluster.js - * region_tag:container_v1beta1_generated_ClusterManager_GetCluster_async - */ - getCluster( - request?: protos.google.container.v1beta1.IGetClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|undefined, {}|undefined - ]>; - getCluster( - request: protos.google.container.v1beta1.IGetClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|null|undefined, - {}|null|undefined>): void; - getCluster( - request: protos.google.container.v1beta1.IGetClusterRequest, - callback: Callback< - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|null|undefined, - {}|null|undefined>): void; - getCluster( - request?: protos.google.container.v1beta1.IGetClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.ICluster, - protos.google.container.v1beta1.IGetClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getCluster(request, options, callback); - } -/** - * Creates a cluster, consisting of the specified number and type of Google - * Compute Engine instances. - * - * By default, the cluster is created in the project's - * [default - * network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - * - * One firewall is added for the cluster. After cluster creation, - * the Kubelet creates routes for each node to allow the containers - * on that node to communicate with all other instances in the - * cluster. - * - * Finally, an entry is added to the project's global metadata indicating - * which CIDR range the cluster is using. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {google.container.v1beta1.Cluster} request.cluster - * Required. A [cluster - * resource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters) - * @param {string} request.parent - * The parent (project and location) where the cluster will be created. - * Specified in the format `projects/* /locations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.create_cluster.js - * region_tag:container_v1beta1_generated_ClusterManager_CreateCluster_async - */ - createCluster( - request?: protos.google.container.v1beta1.ICreateClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|undefined, {}|undefined - ]>; - createCluster( - request: protos.google.container.v1beta1.ICreateClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): void; - createCluster( - request: protos.google.container.v1beta1.ICreateClusterRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): void; - createCluster( - request?: protos.google.container.v1beta1.ICreateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.createCluster(request, options, callback); - } -/** - * Updates the settings for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.ClusterUpdate} request.update - * Required. A description of the update. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.update_cluster.js - * region_tag:container_v1beta1_generated_ClusterManager_UpdateCluster_async - */ - updateCluster( - request?: protos.google.container.v1beta1.IUpdateClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|undefined, {}|undefined - ]>; - updateCluster( - request: protos.google.container.v1beta1.IUpdateClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): void; - updateCluster( - request: protos.google.container.v1beta1.IUpdateClusterRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): void; - updateCluster( - request?: protos.google.container.v1beta1.IUpdateClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateCluster(request, options, callback); - } -/** - * Updates the version and/or image type of a specific node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodeVersion - * Required. The Kubernetes version to change the nodes to (typically an - * upgrade). - * - * Users may specify either explicit versions offered by Kubernetes Engine or - * version aliases, which have the following behavior: - * - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the Kubernetes master version - * @param {string} request.imageType - * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. - * @param {string[]} request.locations - * The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. - * @param {google.container.v1beta1.WorkloadMetadataConfig} request.workloadMetadataConfig - * The desired workload metadata config for the node pool. - * @param {string} request.name - * The name (project, location, cluster, node pool) of the node pool to - * update. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {google.container.v1beta1.NodePool.UpgradeSettings} request.upgradeSettings - * Upgrade settings control disruption and speed of the upgrade. - * @param {google.container.v1beta1.NetworkTags} request.tags - * The desired network tags to be applied to all nodes in the node pool. - * If this field is not present, the tags will not be changed. Otherwise, - * the existing network tags will be *replaced* with the provided tags. - * @param {google.container.v1beta1.NodeTaints} request.taints - * The desired node taints to be applied to all nodes in the node pool. - * If this field is not present, the taints will not be changed. Otherwise, - * the existing node taints will be *replaced* with the provided taints. - * @param {google.container.v1beta1.NodeLabels} request.labels - * The desired node labels to be applied to all nodes in the node pool. - * If this field is not present, the labels will not be changed. Otherwise, - * the existing node labels will be *replaced* with the provided labels. - * @param {google.container.v1beta1.LinuxNodeConfig} request.linuxNodeConfig - * Parameters that can be configured on Linux nodes. - * @param {google.container.v1beta1.NodeKubeletConfig} request.kubeletConfig - * Node kubelet configs. - * @param {google.container.v1beta1.NodeNetworkConfig} request.nodeNetworkConfig - * Node network config. - * @param {google.container.v1beta1.GcfsConfig} request.gcfsConfig - * GCFS config. - * @param {google.container.v1beta1.ConfidentialNodes} request.confidentialNodes - * Confidential nodes config. - * All the nodes in the node pool will be Confidential VM once enabled. - * @param {google.container.v1beta1.VirtualNIC} request.gvnic - * Enable or disable gvnic on the node pool. - * @param {string} request.etag - * The current etag of the node pool. - * If an etag is provided and does not match the current etag of the node - * pool, update will be blocked and an ABORTED error will be returned. - * @param {google.container.v1beta1.FastSocket} request.fastSocket - * Enable or disable NCCL fast socket for the node pool. - * @param {google.container.v1beta1.NodePoolLoggingConfig} request.loggingConfig - * Logging configuration. - * @param {google.container.v1beta1.ResourceLabels} request.resourceLabels - * The resource labels for the node pool to use to annotate any related - * Google Compute Engine resources. - * @param {google.container.v1beta1.WindowsNodeConfig} request.windowsNodeConfig - * Parameters that can be configured on Windows nodes. - * @param {number[]} request.accelerators - * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. - * @param {string} [request.machineType] - * Optional. The desired machine type for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. - * @param {string} [request.diskType] - * Optional. The desired disk type for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk type. - * @param {number} [request.diskSizeGb] - * Optional. The desired disk size for nodes in the node pool. - * Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified disk size. - * @param {google.container.v1beta1.ResourceManagerTags} request.resourceManagerTags - * Desired resource manager tag keys and values to be attached to the nodes - * for managing Compute Engine firewalls using Network Firewall Policies. - * Existing tags will be replaced with new values. - * @param {google.container.v1beta1.ContainerdConfig} request.containerdConfig - * The desired containerd config for nodes in the node pool. - * Initiates an upgrade operation that recreates the nodes with the new - * config. - * @param {google.container.v1beta1.NodePool.QueuedProvisioning} request.queuedProvisioning - * Specifies the configuration of queued provisioning. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.update_node_pool.js - * region_tag:container_v1beta1_generated_ClusterManager_UpdateNodePool_async - */ - updateNodePool( - request?: protos.google.container.v1beta1.IUpdateNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|undefined, {}|undefined - ]>; - updateNodePool( - request: protos.google.container.v1beta1.IUpdateNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - updateNodePool( - request: protos.google.container.v1beta1.IUpdateNodePoolRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - updateNodePool( - request?: protos.google.container.v1beta1.IUpdateNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateNodePool(request, options, callback); - } -/** - * Sets the autoscaling settings of a specific node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.NodePoolAutoscaling} request.autoscaling - * Required. Autoscaling configuration for the node pool. - * @param {string} request.name - * The name (project, location, cluster, node pool) of the node pool to set - * autoscaler settings. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js - * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolAutoscaling_async - */ - setNodePoolAutoscaling( - request?: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|undefined, {}|undefined - ]>; - setNodePoolAutoscaling( - request: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolAutoscaling( - request: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolAutoscaling( - request?: protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolAutoscalingRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolAutoscaling(request, options, callback); - } -/** - * Sets the logging service for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.loggingService - * Required. The logging service the cluster should use to write logs. - * Currently available options: - * - * * `logging.googleapis.com/kubernetes` - The Cloud Logging - * service with a Kubernetes-native resource model - * * `logging.googleapis.com` - The legacy Cloud Logging service (no longer - * available as of GKE 1.15). - * * `none` - no logs will be exported from the cluster. - * - * If left as an empty string,`logging.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set logging. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_logging_service.js - * region_tag:container_v1beta1_generated_ClusterManager_SetLoggingService_async - */ - setLoggingService( - request?: protos.google.container.v1beta1.ISetLoggingServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|undefined, {}|undefined - ]>; - setLoggingService( - request: protos.google.container.v1beta1.ISetLoggingServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): void; - setLoggingService( - request: protos.google.container.v1beta1.ISetLoggingServiceRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): void; - setLoggingService( - request?: protos.google.container.v1beta1.ISetLoggingServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLoggingServiceRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLoggingService(request, options, callback); - } -/** - * Sets the monitoring service for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.monitoringService - * Required. The monitoring service the cluster should use to write metrics. - * Currently available options: - * - * * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring - * service with a Kubernetes-native resource model - * * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no - * longer available as of GKE 1.15). - * * `none` - No metrics will be exported from the cluster. - * - * If left as an empty string,`monitoring.googleapis.com/kubernetes` will be - * used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set monitoring. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_monitoring_service.js - * region_tag:container_v1beta1_generated_ClusterManager_SetMonitoringService_async - */ - setMonitoringService( - request?: protos.google.container.v1beta1.ISetMonitoringServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|undefined, {}|undefined - ]>; - setMonitoringService( - request: protos.google.container.v1beta1.ISetMonitoringServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): void; - setMonitoringService( - request: protos.google.container.v1beta1.ISetMonitoringServiceRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): void; - setMonitoringService( - request?: protos.google.container.v1beta1.ISetMonitoringServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMonitoringServiceRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMonitoringService(request, options, callback); - } -/** - * Sets the addons for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.AddonsConfig} request.addonsConfig - * Required. The desired configurations for the various addons available to - * run in the cluster. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set addons. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_addons_config.js - * region_tag:container_v1beta1_generated_ClusterManager_SetAddonsConfig_async - */ - setAddonsConfig( - request?: protos.google.container.v1beta1.ISetAddonsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|undefined, {}|undefined - ]>; - setAddonsConfig( - request: protos.google.container.v1beta1.ISetAddonsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): void; - setAddonsConfig( - request: protos.google.container.v1beta1.ISetAddonsConfigRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): void; - setAddonsConfig( - request?: protos.google.container.v1beta1.ISetAddonsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetAddonsConfigRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setAddonsConfig(request, options, callback); - } -/** - * Sets the locations for a specific cluster. - * Deprecated. Use - * [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update) - * instead. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string[]} request.locations - * Required. The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. - * - * This list must always include the cluster's primary zone. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set locations. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_locations.js - * region_tag:container_v1beta1_generated_ClusterManager_SetLocations_async - * @deprecated SetLocations is deprecated and may be removed in a future version. - */ - setLocations( - request?: protos.google.container.v1beta1.ISetLocationsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|undefined, {}|undefined - ]>; - setLocations( - request: protos.google.container.v1beta1.ISetLocationsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): void; - setLocations( - request: protos.google.container.v1beta1.ISetLocationsRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): void; - setLocations( - request?: protos.google.container.v1beta1.ISetLocationsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLocationsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - this.warn('DEP$ClusterManager-$SetLocations','SetLocations is deprecated and may be removed in a future version.', 'DeprecationWarning'); - return this.innerApiCalls.setLocations(request, options, callback); - } -/** - * Updates the master for a specific cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {string} request.masterVersion - * Required. The Kubernetes version to change the master to. - * - * Users may specify either explicit versions offered by - * Kubernetes Engine or version aliases, which have the following behavior: - * - * - "latest": picks the highest valid Kubernetes version - * - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - * - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - * - "1.X.Y-gke.N": picks an explicit Kubernetes version - * - "-": picks the default Kubernetes version - * @param {string} request.name - * The name (project, location, cluster) of the cluster to update. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.update_master.js - * region_tag:container_v1beta1_generated_ClusterManager_UpdateMaster_async - */ - updateMaster( - request?: protos.google.container.v1beta1.IUpdateMasterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|undefined, {}|undefined - ]>; - updateMaster( - request: protos.google.container.v1beta1.IUpdateMasterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): void; - updateMaster( - request: protos.google.container.v1beta1.IUpdateMasterRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): void; - updateMaster( - request?: protos.google.container.v1beta1.IUpdateMasterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IUpdateMasterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateMaster(request, options, callback); - } -/** - * Sets master auth materials. Currently supports changing the admin password - * or a specific cluster, either via password generation or explicitly setting - * the password. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to upgrade. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.SetMasterAuthRequest.Action} request.action - * Required. The exact form of action to be taken on the master auth. - * @param {google.container.v1beta1.MasterAuth} request.update - * Required. A description of the update. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to set auth. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_master_auth.js - * region_tag:container_v1beta1_generated_ClusterManager_SetMasterAuth_async - */ - setMasterAuth( - request?: protos.google.container.v1beta1.ISetMasterAuthRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|undefined, {}|undefined - ]>; - setMasterAuth( - request: protos.google.container.v1beta1.ISetMasterAuthRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): void; - setMasterAuth( - request: protos.google.container.v1beta1.ISetMasterAuthRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): void; - setMasterAuth( - request?: protos.google.container.v1beta1.ISetMasterAuthRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMasterAuthRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMasterAuth(request, options, callback); - } -/** - * Deletes the cluster, including the Kubernetes endpoint and all worker - * nodes. - * - * Firewalls and routes that were configured during cluster creation - * are also deleted. - * - * Other Google Compute Engine resources that might be in use by the cluster, - * such as load balancer resources, are not deleted if they weren't present - * when the cluster was initially created. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to delete. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to delete. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.delete_cluster.js - * region_tag:container_v1beta1_generated_ClusterManager_DeleteCluster_async - */ - deleteCluster( - request?: protos.google.container.v1beta1.IDeleteClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|undefined, {}|undefined - ]>; - deleteCluster( - request: protos.google.container.v1beta1.IDeleteClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): void; - deleteCluster( - request: protos.google.container.v1beta1.IDeleteClusterRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): void; - deleteCluster( - request?: protos.google.container.v1beta1.IDeleteClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteClusterRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteCluster(request, options, callback); - } -/** - * Lists all operations in a project in the specified zone or all zones. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for, or `-` for all zones. This field has been deprecated and - * replaced by the parent field. - * @param {string} request.parent - * The parent (project and location) where the operations will be listed. - * Specified in the format `projects/* /locations/*`. - * Location "-" matches all zones and all regions. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListOperationsResponse|ListOperationsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_operations.js - * region_tag:container_v1beta1_generated_ClusterManager_ListOperations_async - */ - listOperations( - request?: protos.google.container.v1beta1.IListOperationsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|undefined, {}|undefined - ]>; - listOperations( - request: protos.google.container.v1beta1.IListOperationsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|null|undefined, - {}|null|undefined>): void; - listOperations( - request: protos.google.container.v1beta1.IListOperationsRequest, - callback: Callback< - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|null|undefined, - {}|null|undefined>): void; - listOperations( - request?: protos.google.container.v1beta1.IListOperationsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IListOperationsResponse, - protos.google.container.v1beta1.IListOperationsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.listOperations(request, options, callback); - } -/** - * Gets the specified operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.operationId - * Required. Deprecated. The server-assigned `name` of the operation. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, operation id) of the operation to get. - * Specified in the format `projects/* /locations/* /operations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_operation.js - * region_tag:container_v1beta1_generated_ClusterManager_GetOperation_async - */ - getOperation( - request?: protos.google.container.v1beta1.IGetOperationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|undefined, {}|undefined - ]>; - getOperation( - request: protos.google.container.v1beta1.IGetOperationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|null|undefined, - {}|null|undefined>): void; - getOperation( - request: protos.google.container.v1beta1.IGetOperationRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|null|undefined, - {}|null|undefined>): void; - getOperation( - request?: protos.google.container.v1beta1.IGetOperationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IGetOperationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'operation_id': request.operationId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getOperation(request, options, callback); - } -/** - * Cancels the specified operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * operation resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.operationId - * Required. Deprecated. The server-assigned `name` of the operation. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, operation id) of the operation to cancel. - * Specified in the format `projects/* /locations/* /operations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.cancel_operation.js - * region_tag:container_v1beta1_generated_ClusterManager_CancelOperation_async - */ - cancelOperation( - request?: protos.google.container.v1beta1.ICancelOperationRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|undefined, {}|undefined - ]>; - cancelOperation( - request: protos.google.container.v1beta1.ICancelOperationRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): void; - cancelOperation( - request: protos.google.container.v1beta1.ICancelOperationRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): void; - cancelOperation( - request?: protos.google.container.v1beta1.ICancelOperationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICancelOperationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'operation_id': request.operationId ?? '', - }); - this.initialize(); - return this.innerApiCalls.cancelOperation(request, options, callback); - } -/** - * Returns configuration info about the Google Kubernetes Engine service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for. This field has been deprecated and replaced by the name - * field. - * @param {string} request.name - * The name (project and location) of the server config to get, - * specified in the format `projects/* /locations/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.ServerConfig|ServerConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_server_config.js - * region_tag:container_v1beta1_generated_ClusterManager_GetServerConfig_async - */ - getServerConfig( - request?: protos.google.container.v1beta1.IGetServerConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|undefined, {}|undefined - ]>; - getServerConfig( - request: protos.google.container.v1beta1.IGetServerConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getServerConfig( - request: protos.google.container.v1beta1.IGetServerConfigRequest, - callback: Callback< - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getServerConfig( - request?: protos.google.container.v1beta1.IGetServerConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IServerConfig, - protos.google.container.v1beta1.IGetServerConfigRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - }); - this.initialize(); - return this.innerApiCalls.getServerConfig(request, options, callback); - } -/** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The cluster (project, location, cluster name) to get keys for. Specified in - * the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.GetJSONWebKeysResponse|GetJSONWebKeysResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js - * region_tag:container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async - */ - getJSONWebKeys( - request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|undefined, {}|undefined - ]>; - getJSONWebKeys( - request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): void; - getJSONWebKeys( - request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, - callback: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): void; - getJSONWebKeys( - request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest|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.getJsonWebKeys(request, options, callback); - } -/** - * Lists the node pools for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the parent field. - * @param {string} request.parent - * The parent (project, location, cluster name) where the node pools will be - * listed. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListNodePoolsResponse|ListNodePoolsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_node_pools.js - * region_tag:container_v1beta1_generated_ClusterManager_ListNodePools_async - */ - listNodePools( - request?: protos.google.container.v1beta1.IListNodePoolsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|undefined, {}|undefined - ]>; - listNodePools( - request: protos.google.container.v1beta1.IListNodePoolsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): void; - listNodePools( - request: protos.google.container.v1beta1.IListNodePoolsRequest, - callback: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): void; - listNodePools( - request?: protos.google.container.v1beta1.IListNodePoolsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.listNodePools(request, options, callback); - } -/** - * Retrieves the requested node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * get. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.NodePool|NodePool}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_node_pool.js - * region_tag:container_v1beta1_generated_ClusterManager_GetNodePool_async - */ - getNodePool( - request?: protos.google.container.v1beta1.IGetNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|undefined, {}|undefined - ]>; - getNodePool( - request: protos.google.container.v1beta1.IGetNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getNodePool( - request: protos.google.container.v1beta1.IGetNodePoolRequest, - callback: Callback< - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getNodePool( - request?: protos.google.container.v1beta1.IGetNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.INodePool, - protos.google.container.v1beta1.IGetNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.getNodePool(request, options, callback); - } -/** - * Creates a node pool for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the parent field. - * @param {google.container.v1beta1.NodePool} request.nodePool - * Required. The node pool to create. - * @param {string} request.parent - * The parent (project, location, cluster name) where the node pool will be - * created. Specified in the format - * `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.create_node_pool.js - * region_tag:container_v1beta1_generated_ClusterManager_CreateNodePool_async - */ - createNodePool( - request?: protos.google.container.v1beta1.ICreateNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|undefined, {}|undefined - ]>; - createNodePool( - request: protos.google.container.v1beta1.ICreateNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - createNodePool( - request: protos.google.container.v1beta1.ICreateNodePoolRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): void; - createNodePool( - request?: protos.google.container.v1beta1.ICreateNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICreateNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.createNodePool(request, options, callback); - } -/** - * Deletes a node pool from a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to delete. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * delete. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.delete_node_pool.js - * region_tag:container_v1beta1_generated_ClusterManager_DeleteNodePool_async - */ - deleteNodePool( - request?: protos.google.container.v1beta1.IDeleteNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|undefined, {}|undefined - ]>; - deleteNodePool( - request: protos.google.container.v1beta1.IDeleteNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): void; - deleteNodePool( - request: protos.google.container.v1beta1.IDeleteNodePoolRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): void; - deleteNodePool( - request?: protos.google.container.v1beta1.IDeleteNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IDeleteNodePoolRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteNodePool(request, options, callback); - } -/** - * CompleteNodePoolUpgrade will signal an on-going node pool upgrade to - * complete. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to - * complete upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js - * region_tag:container_v1beta1_generated_ClusterManager_CompleteNodePoolUpgrade_async - */ - completeNodePoolUpgrade( - request?: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|undefined, {}|undefined - ]>; - completeNodePoolUpgrade( - request: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - completeNodePoolUpgrade( - request: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - completeNodePoolUpgrade( - request?: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest|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.completeNodePoolUpgrade(request, options, callback); - } -/** - * Rolls back a previously Aborted or Failed NodePool upgrade. - * This makes no changes if the last upgrade successfully completed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to rollback. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to rollback. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node poll to - * rollback upgrade. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {boolean} request.respectPdb - * Option for rollback to ignore the PodDisruptionBudget. - * Default value is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js - * region_tag:container_v1beta1_generated_ClusterManager_RollbackNodePoolUpgrade_async - */ - rollbackNodePoolUpgrade( - request?: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|undefined, {}|undefined - ]>; - rollbackNodePoolUpgrade( - request: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - rollbackNodePoolUpgrade( - request: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): void; - rollbackNodePoolUpgrade( - request?: protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IRollbackNodePoolUpgradeRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.rollbackNodePoolUpgrade(request, options, callback); - } -/** - * Sets the NodeManagement options for a node pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to update. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.NodeManagement} request.management - * Required. NodeManagement configuration for the node pool. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to set - * management properties. Specified in the format - * `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_management.js - * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolManagement_async - */ - setNodePoolManagement( - request?: protos.google.container.v1beta1.ISetNodePoolManagementRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|undefined, {}|undefined - ]>; - setNodePoolManagement( - request: protos.google.container.v1beta1.ISetNodePoolManagementRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolManagement( - request: protos.google.container.v1beta1.ISetNodePoolManagementRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolManagement( - request?: protos.google.container.v1beta1.ISetNodePoolManagementRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolManagementRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolManagement(request, options, callback); - } -/** - * Sets labels on a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {number[]} request.resourceLabels - * Required. The labels to set for that cluster. - * @param {string} request.labelFingerprint - * Required. The fingerprint of the previous set of labels for this resource, - * used to detect conflicts. The fingerprint is initially generated by - * Kubernetes Engine and changes after every request to modify or update - * labels. You must always provide an up-to-date fingerprint hash when - * updating or changing labels. Make a `get()` request to the - * resource to get the latest fingerprint. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set labels. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_labels.js - * region_tag:container_v1beta1_generated_ClusterManager_SetLabels_async - */ - setLabels( - request?: protos.google.container.v1beta1.ISetLabelsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|undefined, {}|undefined - ]>; - setLabels( - request: protos.google.container.v1beta1.ISetLabelsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): void; - setLabels( - request: protos.google.container.v1beta1.ISetLabelsRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): void; - setLabels( - request?: protos.google.container.v1beta1.ISetLabelsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLabelsRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLabels(request, options, callback); - } -/** - * Enables or disables the ABAC authorization mechanism on a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {boolean} request.enabled - * Required. Whether ABAC authorization will be enabled in the cluster. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set legacy - * abac. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_legacy_abac.js - * region_tag:container_v1beta1_generated_ClusterManager_SetLegacyAbac_async - */ - setLegacyAbac( - request?: protos.google.container.v1beta1.ISetLegacyAbacRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|undefined, {}|undefined - ]>; - setLegacyAbac( - request: protos.google.container.v1beta1.ISetLegacyAbacRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): void; - setLegacyAbac( - request: protos.google.container.v1beta1.ISetLegacyAbacRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): void; - setLegacyAbac( - request?: protos.google.container.v1beta1.ISetLegacyAbacRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetLegacyAbacRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setLegacyAbac(request, options, callback); - } -/** - * Starts master IP rotation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to start IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {boolean} request.rotateCredentials - * Whether to rotate credentials during IP rotation. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js - * region_tag:container_v1beta1_generated_ClusterManager_StartIPRotation_async - */ - startIPRotation( - request?: protos.google.container.v1beta1.IStartIPRotationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|undefined, {}|undefined - ]>; - startIPRotation( - request: protos.google.container.v1beta1.IStartIPRotationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): void; - startIPRotation( - request: protos.google.container.v1beta1.IStartIPRotationRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): void; - startIPRotation( - request?: protos.google.container.v1beta1.IStartIPRotationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.IStartIPRotationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.startIpRotation(request, options, callback); - } -/** - * Completes master IP rotation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to complete IP - * rotation. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js - * region_tag:container_v1beta1_generated_ClusterManager_CompleteIPRotation_async - */ - completeIPRotation( - request?: protos.google.container.v1beta1.ICompleteIPRotationRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|undefined, {}|undefined - ]>; - completeIPRotation( - request: protos.google.container.v1beta1.ICompleteIPRotationRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): void; - completeIPRotation( - request: protos.google.container.v1beta1.ICompleteIPRotationRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): void; - completeIPRotation( - request?: protos.google.container.v1beta1.ICompleteIPRotationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ICompleteIPRotationRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.completeIpRotation(request, options, callback); - } -/** - * SetNodePoolSizeRequest sets the size of a node pool. The new size will be - * used for all replicas, including future replicas created by modifying - * {@link protos.google.container.v1beta1.NodePool.locations|NodePool.locations}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster to update. - * This field has been deprecated and replaced by the name field. - * @param {string} request.nodePoolId - * Required. Deprecated. The name of the node pool to update. - * This field has been deprecated and replaced by the name field. - * @param {number} request.nodeCount - * Required. The desired node count for the pool. - * @param {string} request.name - * The name (project, location, cluster, node pool id) of the node pool to set - * size. - * Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_node_pool_size.js - * region_tag:container_v1beta1_generated_ClusterManager_SetNodePoolSize_async - */ - setNodePoolSize( - request?: protos.google.container.v1beta1.ISetNodePoolSizeRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|undefined, {}|undefined - ]>; - setNodePoolSize( - request: protos.google.container.v1beta1.ISetNodePoolSizeRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolSize( - request: protos.google.container.v1beta1.ISetNodePoolSizeRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): void; - setNodePoolSize( - request?: protos.google.container.v1beta1.ISetNodePoolSizeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNodePoolSizeRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - 'node_pool_id': request.nodePoolId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNodePoolSize(request, options, callback); - } -/** - * Enables or disables Network Policy for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the name field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the name field. - * @param {google.container.v1beta1.NetworkPolicy} request.networkPolicy - * Required. Configuration options for the NetworkPolicy feature. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set networking - * policy. Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_network_policy.js - * region_tag:container_v1beta1_generated_ClusterManager_SetNetworkPolicy_async - */ - setNetworkPolicy( - request?: protos.google.container.v1beta1.ISetNetworkPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|undefined, {}|undefined - ]>; - setNetworkPolicy( - request: protos.google.container.v1beta1.ISetNetworkPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): void; - setNetworkPolicy( - request: protos.google.container.v1beta1.ISetNetworkPolicyRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): void; - setNetworkPolicy( - request?: protos.google.container.v1beta1.ISetNetworkPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetNetworkPolicyRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setNetworkPolicy(request, options, callback); - } -/** - * Sets the maintenance policy for a cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * @param {string} request.zone - * Required. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. - * @param {string} request.clusterId - * Required. The name of the cluster to update. - * @param {google.container.v1beta1.MaintenancePolicy} request.maintenancePolicy - * Required. The maintenance policy to be set for the cluster. An empty field - * clears the existing maintenance policy. - * @param {string} request.name - * The name (project, location, cluster name) of the cluster to set - * maintenance policy. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.Operation|Operation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js - * region_tag:container_v1beta1_generated_ClusterManager_SetMaintenancePolicy_async - */ - setMaintenancePolicy( - request?: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|undefined, {}|undefined - ]>; - setMaintenancePolicy( - request: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): void; - setMaintenancePolicy( - request: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, - callback: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): void; - setMaintenancePolicy( - request?: protos.google.container.v1beta1.ISetMaintenancePolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IOperation, - protos.google.container.v1beta1.ISetMaintenancePolicyRequest|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 ?? '', - 'project_id': request.projectId ?? '', - 'zone': request.zone ?? '', - 'cluster_id': request.clusterId ?? '', - }); - this.initialize(); - return this.innerApiCalls.setMaintenancePolicy(request, options, callback); - } -/** - * Checks the cluster compatibility with Autopilot mode, and returns a list of - * compatibility issues. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name (project, location, cluster) of the cluster to retrieve. - * Specified in the format `projects/* /locations/* /clusters/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse|CheckAutopilotCompatibilityResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.check_autopilot_compatibility.js - * region_tag:container_v1beta1_generated_ClusterManager_CheckAutopilotCompatibility_async - */ - checkAutopilotCompatibility( - request?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|undefined, {}|undefined - ]>; - checkAutopilotCompatibility( - request: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkAutopilotCompatibility( - request: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, - callback: Callback< - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkAutopilotCompatibility( - request?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, - protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest|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.checkAutopilotCompatibility(request, options, callback); - } -/** - * Fetches locations that offer Google Kubernetes Engine. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Contains the name of the resource requested. - * Specified in the format `projects/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.container.v1beta1.ListLocationsResponse|ListLocationsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_locations.js - * region_tag:container_v1beta1_generated_ClusterManager_ListLocations_async - */ - listLocations( - request?: protos.google.container.v1beta1.IListLocationsRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|undefined, {}|undefined - ]>; - listLocations( - request: protos.google.container.v1beta1.IListLocationsRequest, - options: CallOptions, - callback: Callback< - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|null|undefined, - {}|null|undefined>): void; - listLocations( - request: protos.google.container.v1beta1.IListLocationsRequest, - callback: Callback< - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|null|undefined, - {}|null|undefined>): void; - listLocations( - request?: protos.google.container.v1beta1.IListLocationsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.container.v1beta1.IListLocationsResponse, - protos.google.container.v1beta1.IListLocationsRequest|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.listLocations(request, options, callback); - } - - /** - * Lists subnetworks that can be used for creating clusters in a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork}. - * 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 `listUsableSubnetworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listUsableSubnetworks( - request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - options?: CallOptions): - Promise<[ - protos.google.container.v1beta1.IUsableSubnetwork[], - protos.google.container.v1beta1.IListUsableSubnetworksRequest|null, - protos.google.container.v1beta1.IListUsableSubnetworksResponse - ]>; - listUsableSubnetworks( - request: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.container.v1beta1.IListUsableSubnetworksRequest, - protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1beta1.IUsableSubnetwork>): void; - listUsableSubnetworks( - request: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - callback: PaginationCallback< - protos.google.container.v1beta1.IListUsableSubnetworksRequest, - protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1beta1.IUsableSubnetwork>): void; - listUsableSubnetworks( - request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.container.v1beta1.IListUsableSubnetworksRequest, - protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1beta1.IUsableSubnetwork>, - callback?: PaginationCallback< - protos.google.container.v1beta1.IListUsableSubnetworksRequest, - protos.google.container.v1beta1.IListUsableSubnetworksResponse|null|undefined, - protos.google.container.v1beta1.IUsableSubnetwork>): - Promise<[ - protos.google.container.v1beta1.IUsableSubnetwork[], - protos.google.container.v1beta1.IListUsableSubnetworksRequest|null, - protos.google.container.v1beta1.IListUsableSubnetworksResponse - ]>|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.listUsableSubnetworks(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 project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork} 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 `listUsableSubnetworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listUsableSubnetworksStream( - request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - 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['listUsableSubnetworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUsableSubnetworks.createStream( - this.innerApiCalls.listUsableSubnetworks as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUsableSubnetworks`, 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 project where subnetworks are usable. - * Specified in the format `projects/*`. - * @param {string} request.filter - * Filtering currently only supports equality on the networkProjectId and must - * be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` - * is the project which owns the listed subnetworks. This defaults to the - * parent project ID. - * @param {number} request.pageSize - * The max number of results per page that should be returned. If the number - * of available results is larger than `page_size`, a `next_page_token` is - * returned which can be used to get the next page of results in subsequent - * requests. Acceptable values are 0 to 500, inclusive. (Default: 500) - * @param {string} request.pageToken - * Specifies a page token to use. Set this to the nextPageToken returned by - * previous list requests to get the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.container.v1beta1.UsableSubnetwork|UsableSubnetwork}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js - * region_tag:container_v1beta1_generated_ClusterManager_ListUsableSubnetworks_async - */ - listUsableSubnetworksAsync( - request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, - 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['listUsableSubnetworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUsableSubnetworks.asyncIterate( - this.innerApiCalls['listUsableSubnetworks'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - - /** - * 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.clusterManagerStub && !this._terminated) { - return this.clusterManagerStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json deleted file mode 100644 index 911352f9362..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_client_config.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "interfaces": { - "google.container.v1beta1.ClusterManager": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListClusters": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetCluster": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateCluster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCluster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateNodePool": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolAutoscaling": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLoggingService": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMonitoringService": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetAddonsConfig": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLocations": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateMaster": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMasterAuth": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteCluster": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListOperations": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetOperation": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CancelOperation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetServerConfig": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetJSONWebKeys": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListNodePools": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetNodePool": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateNodePool": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteNodePool": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CompleteNodePoolUpgrade": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RollbackNodePoolUpgrade": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolManagement": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLabels": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetLegacyAbac": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StartIPRotation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CompleteIPRotation": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNodePoolSize": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetNetworkPolicy": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetMaintenancePolicy": { - "timeout_millis": 45000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUsableSubnetworks": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CheckAutopilotCompatibility": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListLocations": { - "timeout_millis": 20000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json deleted file mode 100644 index 7a594ccf698..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/v1beta1/cluster_manager_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/container/v1beta1/cluster_service.proto" -] diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 0278af900c2..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,377 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.container.v1beta1", - "libraryPackage": "@google-cloud/container", - "services": { - "ClusterManager": { - "clients": { - "grpc": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateNodePool": { - "methods": [ - "updateNodePool" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "setNodePoolAutoscaling" - ] - }, - "SetLoggingService": { - "methods": [ - "setLoggingService" - ] - }, - "SetMonitoringService": { - "methods": [ - "setMonitoringService" - ] - }, - "SetAddonsConfig": { - "methods": [ - "setAddonsConfig" - ] - }, - "SetLocations": { - "methods": [ - "setLocations" - ] - }, - "UpdateMaster": { - "methods": [ - "updateMaster" - ] - }, - "SetMasterAuth": { - "methods": [ - "setMasterAuth" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "ListOperations": { - "methods": [ - "listOperations" - ] - }, - "GetOperation": { - "methods": [ - "getOperation" - ] - }, - "CancelOperation": { - "methods": [ - "cancelOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "getServerConfig" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "getJSONWebKeys" - ] - }, - "ListNodePools": { - "methods": [ - "listNodePools" - ] - }, - "GetNodePool": { - "methods": [ - "getNodePool" - ] - }, - "CreateNodePool": { - "methods": [ - "createNodePool" - ] - }, - "DeleteNodePool": { - "methods": [ - "deleteNodePool" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "completeNodePoolUpgrade" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "rollbackNodePoolUpgrade" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "setNodePoolManagement" - ] - }, - "SetLabels": { - "methods": [ - "setLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "setLegacyAbac" - ] - }, - "StartIPRotation": { - "methods": [ - "startIPRotation" - ] - }, - "CompleteIPRotation": { - "methods": [ - "completeIPRotation" - ] - }, - "SetNodePoolSize": { - "methods": [ - "setNodePoolSize" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "setNetworkPolicy" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "setMaintenancePolicy" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "checkAutopilotCompatibility" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "listUsableSubnetworks", - "listUsableSubnetworksStream", - "listUsableSubnetworksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ClusterManagerClient", - "rpcs": { - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateNodePool": { - "methods": [ - "updateNodePool" - ] - }, - "SetNodePoolAutoscaling": { - "methods": [ - "setNodePoolAutoscaling" - ] - }, - "SetLoggingService": { - "methods": [ - "setLoggingService" - ] - }, - "SetMonitoringService": { - "methods": [ - "setMonitoringService" - ] - }, - "SetAddonsConfig": { - "methods": [ - "setAddonsConfig" - ] - }, - "SetLocations": { - "methods": [ - "setLocations" - ] - }, - "UpdateMaster": { - "methods": [ - "updateMaster" - ] - }, - "SetMasterAuth": { - "methods": [ - "setMasterAuth" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "ListOperations": { - "methods": [ - "listOperations" - ] - }, - "GetOperation": { - "methods": [ - "getOperation" - ] - }, - "CancelOperation": { - "methods": [ - "cancelOperation" - ] - }, - "GetServerConfig": { - "methods": [ - "getServerConfig" - ] - }, - "GetJSONWebKeys": { - "methods": [ - "getJSONWebKeys" - ] - }, - "ListNodePools": { - "methods": [ - "listNodePools" - ] - }, - "GetNodePool": { - "methods": [ - "getNodePool" - ] - }, - "CreateNodePool": { - "methods": [ - "createNodePool" - ] - }, - "DeleteNodePool": { - "methods": [ - "deleteNodePool" - ] - }, - "CompleteNodePoolUpgrade": { - "methods": [ - "completeNodePoolUpgrade" - ] - }, - "RollbackNodePoolUpgrade": { - "methods": [ - "rollbackNodePoolUpgrade" - ] - }, - "SetNodePoolManagement": { - "methods": [ - "setNodePoolManagement" - ] - }, - "SetLabels": { - "methods": [ - "setLabels" - ] - }, - "SetLegacyAbac": { - "methods": [ - "setLegacyAbac" - ] - }, - "StartIPRotation": { - "methods": [ - "startIPRotation" - ] - }, - "CompleteIPRotation": { - "methods": [ - "completeIPRotation" - ] - }, - "SetNodePoolSize": { - "methods": [ - "setNodePoolSize" - ] - }, - "SetNetworkPolicy": { - "methods": [ - "setNetworkPolicy" - ] - }, - "SetMaintenancePolicy": { - "methods": [ - "setMaintenancePolicy" - ] - }, - "CheckAutopilotCompatibility": { - "methods": [ - "checkAutopilotCompatibility" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "ListUsableSubnetworks": { - "methods": [ - "listUsableSubnetworks", - "listUsableSubnetworksStream", - "listUsableSubnetworksAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts deleted file mode 100644 index aa5679ebbc4..00000000000 --- a/owl-bot-staging/google-container/v1beta1/src/v1beta1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {ClusterManagerClient} from './cluster_manager_client'; diff --git a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index b200c9d2b4f..00000000000 --- a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 container = require('@google-cloud/container'); - -function main() { - const clusterManagerClient = new container.ClusterManagerClient(); -} - -main(); diff --git a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index e4bc67faf05..00000000000 --- a/owl-bot-staging/google-container/v1beta1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {ClusterManagerClient} from '@google-cloud/container'; - -// check that the client class type name can be used -function doStuffWithClusterManagerClient(client: ClusterManagerClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const clusterManagerClient = new ClusterManagerClient(); - doStuffWithClusterManagerClient(clusterManagerClient); -} - -main(); diff --git a/owl-bot-staging/google-container/v1beta1/system-test/install.ts b/owl-bot-staging/google-container/v1beta1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-container/v1beta1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts b/owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts deleted file mode 100644 index 4470c410220..00000000000 --- a/owl-bot-staging/google-container/v1beta1/test/gapic_cluster_manager_v1beta1.ts +++ /dev/null @@ -1,5302 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 clustermanagerModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1beta1.ClusterManagerClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'container.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = clustermanagerModule.v1beta1.ClusterManagerClient.servicePath; - assert.strictEqual(servicePath, 'container.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = clustermanagerModule.v1beta1.ClusterManagerClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'container.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'container.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new clustermanagerModule.v1beta1.ClusterManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = clustermanagerModule.v1beta1.ClusterManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.clusterManagerStub, undefined); - await client.initialize(); - assert(client.clusterManagerStub); - }); - - it('has close method for the initialized client', done => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.clusterManagerStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.clusterManagerStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - 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 clustermanagerModule.v1beta1.ClusterManagerClient({ - 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('listClusters', () => { - it('invokes listClusters without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersResponse() - ); - client.innerApiCalls.listClusters = stubSimpleCall(expectedResponse); - const [response] = await client.listClusters(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersResponse() - ); - client.innerApiCalls.listClusters = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listClusters( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IListClustersResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listClusters = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listClusters(request), expectedError); - const actualRequest = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listClusters with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListClustersRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listClusters(request), expectedError); - }); - }); - - describe('getCluster', () => { - it('invokes getCluster without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Cluster() - ); - client.innerApiCalls.getCluster = stubSimpleCall(expectedResponse); - const [response] = await client.getCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Cluster() - ); - client.innerApiCalls.getCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getCluster( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.ICluster|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCluster with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getCluster(request), expectedError); - }); - }); - - describe('createCluster', () => { - it('invokes createCluster without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.createCluster = stubSimpleCall(expectedResponse); - const [response] = await client.createCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.createCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createCluster( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCluster with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateClusterRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createCluster(request), expectedError); - }); - }); - - describe('updateCluster', () => { - it('invokes updateCluster without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateCluster = stubSimpleCall(expectedResponse); - const [response] = await client.updateCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateCluster( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCluster with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateCluster(request), expectedError); - }); - }); - - describe('updateNodePool', () => { - it('invokes updateNodePool without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.updateNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateNodePool with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.UpdateNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateNodePool(request), expectedError); - }); - }); - - describe('setNodePoolAutoscaling', () => { - it('invokes setNodePoolAutoscaling without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolAutoscaling(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolAutoscaling( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolAutoscaling = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolAutoscaling as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolAutoscaling with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolAutoscalingRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolAutoscaling(request), expectedError); - }); - }); - - describe('setLoggingService', () => { - it('invokes setLoggingService without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLoggingService = stubSimpleCall(expectedResponse); - const [response] = await client.setLoggingService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLoggingService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLoggingService( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLoggingService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLoggingService(request), expectedError); - const actualRequest = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLoggingService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLoggingService with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLoggingServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLoggingServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLoggingService(request), expectedError); - }); - }); - - describe('setMonitoringService', () => { - it('invokes setMonitoringService without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMonitoringService = stubSimpleCall(expectedResponse); - const [response] = await client.setMonitoringService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMonitoringService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMonitoringService( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMonitoringService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMonitoringService(request), expectedError); - const actualRequest = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMonitoringService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMonitoringService with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMonitoringServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMonitoringServiceRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMonitoringService(request), expectedError); - }); - }); - - describe('setAddonsConfig', () => { - it('invokes setAddonsConfig without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setAddonsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.setAddonsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setAddonsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setAddonsConfig( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setAddonsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setAddonsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setAddonsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setAddonsConfig with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetAddonsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetAddonsConfigRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setAddonsConfig(request), expectedError); - }); - }); - - describe('setLocations', () => { - it('invokes setLocations without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLocations = stubSimpleCall(expectedResponse); - const [response] = await client.setLocations(request); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLocations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLocations( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLocations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLocations(request), expectedError); - assert(stub.calledOnce); - const actualRequest = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLocations with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLocationsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLocations(request), expectedError); - assert(stub.calledOnce); - }); - }); - - describe('updateMaster', () => { - it('invokes updateMaster without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateMaster = stubSimpleCall(expectedResponse); - const [response] = await client.updateMaster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.updateMaster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateMaster( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateMaster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateMaster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMaster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateMaster with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.UpdateMasterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.UpdateMasterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateMaster(request), expectedError); - }); - }); - - describe('setMasterAuth', () => { - it('invokes setMasterAuth without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMasterAuth = stubSimpleCall(expectedResponse); - const [response] = await client.setMasterAuth(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMasterAuth = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMasterAuth( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMasterAuth = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMasterAuth(request), expectedError); - const actualRequest = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMasterAuth as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMasterAuth with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMasterAuthRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMasterAuthRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMasterAuth(request), expectedError); - }); - }); - - describe('deleteCluster', () => { - it('invokes deleteCluster without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.deleteCluster = stubSimpleCall(expectedResponse); - const [response] = await client.deleteCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.deleteCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteCluster( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCluster with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteClusterRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteCluster(request), expectedError); - }); - }); - - describe('listOperations', () => { - it('invokes listOperations without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsResponse() - ); - client.innerApiCalls.listOperations = stubSimpleCall(expectedResponse); - const [response] = await client.listOperations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsResponse() - ); - client.innerApiCalls.listOperations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listOperations( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IListOperationsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listOperations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listOperations(request), expectedError); - const actualRequest = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listOperations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listOperations with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListOperationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListOperationsRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listOperations(request), expectedError); - }); - }); - - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.getOperation = stubSimpleCall(expectedResponse); - const [response] = await client.getOperation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.getOperation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getOperation( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getOperation(request), expectedError); - const actualRequest = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getOperation with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getOperation(request), expectedError); - }); - }); - - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelOperation = stubSimpleCall(expectedResponse); - const [response] = await client.cancelOperation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelOperation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelOperation( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&operation_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelOperation(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelOperation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelOperation with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CancelOperationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CancelOperationRequest', ['operationId']); - request.operationId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelOperation(request), expectedError); - }); - }); - - describe('getServerConfig', () => { - it('invokes getServerConfig without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ServerConfig() - ); - client.innerApiCalls.getServerConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getServerConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ServerConfig() - ); - client.innerApiCalls.getServerConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getServerConfig( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IServerConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getServerConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getServerConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getServerConfig with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetServerConfigRequest', ['zone']); - request.zone = defaultValue3; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getServerConfig(request), expectedError); - }); - }); - - describe('getJSONWebKeys', () => { - it('invokes getJSONWebKeys without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysResponse() - ); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); - const [response] = await client.getJSONWebKeys(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysResponse() - ); - client.innerApiCalls.getJsonWebKeys = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJSONWebKeys( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IGetJSONWebKeysResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getJSONWebKeys(request), expectedError); - const actualRequest = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJsonWebKeys as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJSONWebKeys with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetJSONWebKeysRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getJSONWebKeys(request), expectedError); - }); - }); - - describe('listNodePools', () => { - it('invokes listNodePools without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsResponse() - ); - client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); - const [response] = await client.listNodePools(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsResponse() - ); - client.innerApiCalls.listNodePools = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listNodePools( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IListNodePoolsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listNodePools = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listNodePools(request), expectedError); - const actualRequest = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listNodePools with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.ListNodePoolsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listNodePools(request), expectedError); - }); - }); - - describe('getNodePool', () => { - it('invokes getNodePool without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.NodePool() - ); - client.innerApiCalls.getNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.getNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.NodePool() - ); - client.innerApiCalls.getNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.INodePool|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getNodePool with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.GetNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getNodePool(request), expectedError); - }); - }); - - describe('createNodePool', () => { - it('invokes createNodePool without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.createNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.createNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.createNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createNodePool with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CreateNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CreateNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createNodePool(request), expectedError); - }); - }); - - describe('deleteNodePool', () => { - it('invokes deleteNodePool without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.deleteNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.deleteNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.deleteNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteNodePool( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteNodePool with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.DeleteNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.DeleteNodePoolRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteNodePool(request), expectedError); - }); - }); - - describe('completeNodePoolUpgrade', () => { - it('invokes completeNodePoolUpgrade without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(expectedResponse); - const [response] = await client.completeNodePoolUpgrade(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.completeNodePoolUpgrade( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.completeNodePoolUpgrade = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeNodePoolUpgrade with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.completeNodePoolUpgrade(request), expectedError); - }); - }); - - describe('rollbackNodePoolUpgrade', () => { - it('invokes rollbackNodePoolUpgrade without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(expectedResponse); - const [response] = await client.rollbackNodePoolUpgrade(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rollbackNodePoolUpgrade( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rollbackNodePoolUpgrade = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackNodePoolUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackNodePoolUpgrade with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.RollbackNodePoolUpgradeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.rollbackNodePoolUpgrade(request), expectedError); - }); - }); - - describe('setNodePoolManagement', () => { - it('invokes setNodePoolManagement without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolManagement = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolManagement(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolManagement = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolManagement( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolManagement = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolManagement(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolManagement as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolManagement with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolManagementRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolManagementRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolManagement(request), expectedError); - }); - }); - - describe('setLabels', () => { - it('invokes setLabels without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLabels = stubSimpleCall(expectedResponse); - const [response] = await client.setLabels(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLabels = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLabels( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLabels = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLabels(request), expectedError); - const actualRequest = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLabels as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLabels with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLabelsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLabelsRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLabels(request), expectedError); - }); - }); - - describe('setLegacyAbac', () => { - it('invokes setLegacyAbac without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLegacyAbac = stubSimpleCall(expectedResponse); - const [response] = await client.setLegacyAbac(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setLegacyAbac = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setLegacyAbac( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setLegacyAbac = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setLegacyAbac(request), expectedError); - const actualRequest = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setLegacyAbac as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setLegacyAbac with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetLegacyAbacRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetLegacyAbacRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setLegacyAbac(request), expectedError); - }); - }); - - describe('startIPRotation', () => { - it('invokes startIPRotation without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.startIpRotation = stubSimpleCall(expectedResponse); - const [response] = await client.startIPRotation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.startIpRotation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startIPRotation( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.startIpRotation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.startIPRotation(request), expectedError); - const actualRequest = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.startIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startIPRotation with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.StartIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.StartIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.startIPRotation(request), expectedError); - }); - }); - - describe('completeIPRotation', () => { - it('invokes completeIPRotation without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.completeIpRotation = stubSimpleCall(expectedResponse); - const [response] = await client.completeIPRotation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.completeIpRotation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.completeIPRotation( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.completeIpRotation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.completeIPRotation(request), expectedError); - const actualRequest = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.completeIpRotation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes completeIPRotation with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CompleteIPRotationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.CompleteIPRotationRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.completeIPRotation(request), expectedError); - }); - }); - - describe('setNodePoolSize', () => { - it('invokes setNodePoolSize without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolSize = stubSimpleCall(expectedResponse); - const [response] = await client.setNodePoolSize(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNodePoolSize = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNodePoolSize( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}&node_pool_id=${defaultValue5}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNodePoolSize = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNodePoolSize(request), expectedError); - const actualRequest = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNodePoolSize as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNodePoolSize with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNodePoolSizeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['clusterId']); - request.clusterId = defaultValue4; - const defaultValue5 = - getTypeDefaultValue('.google.container.v1beta1.SetNodePoolSizeRequest', ['nodePoolId']); - request.nodePoolId = defaultValue5; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNodePoolSize(request), expectedError); - }); - }); - - describe('setNetworkPolicy', () => { - it('invokes setNetworkPolicy without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNetworkPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setNetworkPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setNetworkPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setNetworkPolicy( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setNetworkPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setNetworkPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setNetworkPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setNetworkPolicy with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetNetworkPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetNetworkPolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setNetworkPolicy(request), expectedError); - }); - }); - - describe('setMaintenancePolicy', () => { - it('invokes setMaintenancePolicy without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setMaintenancePolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.Operation() - ); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setMaintenancePolicy( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IOperation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `name=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setMaintenancePolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setMaintenancePolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setMaintenancePolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setMaintenancePolicy with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.SetMaintenancePolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['name']); - request.name = defaultValue1; - const defaultValue2 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['projectId']); - request.projectId = defaultValue2; - const defaultValue3 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['zone']); - request.zone = defaultValue3; - const defaultValue4 = - getTypeDefaultValue('.google.container.v1beta1.SetMaintenancePolicyRequest', ['clusterId']); - request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setMaintenancePolicy(request), expectedError); - }); - }); - - describe('checkAutopilotCompatibility', () => { - it('invokes checkAutopilotCompatibility without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse() - ); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(expectedResponse); - const [response] = await client.checkAutopilotCompatibility(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityResponse() - ); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.checkAutopilotCompatibility( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkAutopilotCompatibility = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); - const actualRequest = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkAutopilotCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAutopilotCompatibility with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.CheckAutopilotCompatibilityRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.checkAutopilotCompatibility(request), expectedError); - }); - }); - - describe('listLocations', () => { - it('invokes listLocations without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsResponse() - ); - client.innerApiCalls.listLocations = stubSimpleCall(expectedResponse); - const [response] = await client.listLocations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLocations without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsResponse() - ); - client.innerApiCalls.listLocations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listLocations( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IListLocationsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLocations with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listLocations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listLocations(request), expectedError); - const actualRequest = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLocations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLocations with closed client', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListLocationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListLocationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listLocations(request), expectedError); - }); - }); - - describe('listUsableSubnetworks', () => { - it('invokes listUsableSubnetworks without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - ]; - client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(expectedResponse); - const [response] = await client.listUsableSubnetworks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworks without error using callback', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - ]; - client.innerApiCalls.listUsableSubnetworks = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUsableSubnetworks( - request, - (err?: Error|null, result?: protos.google.container.v1beta1.IUsableSubnetwork[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworks with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUsableSubnetworks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUsableSubnetworks(request), expectedError); - const actualRequest = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUsableSubnetworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUsableSubnetworksStream without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - ]; - client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUsableSubnetworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.container.v1beta1.UsableSubnetwork[] = []; - stream.on('data', (response: protos.google.container.v1beta1.UsableSubnetwork) => { - 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.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); - assert( - (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUsableSubnetworksStream with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUsableSubnetworks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUsableSubnetworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.container.v1beta1.UsableSubnetwork[] = []; - stream.on('data', (response: protos.google.container.v1beta1.UsableSubnetwork) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUsableSubnetworks, request)); - assert( - (client.descriptors.page.listUsableSubnetworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUsableSubnetworks without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - generateSampleMessage(new protos.google.container.v1beta1.UsableSubnetwork()), - ]; - client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.container.v1beta1.IUsableSubnetwork[] = []; - const iterable = client.listUsableSubnetworksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUsableSubnetworks with error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.ListUsableSubnetworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.container.v1beta1.ListUsableSubnetworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUsableSubnetworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUsableSubnetworksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.container.v1beta1.IUsableSubnetwork[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUsableSubnetworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); -}); diff --git a/owl-bot-staging/google-container/v1beta1/tsconfig.json b/owl-bot-staging/google-container/v1beta1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-container/v1beta1/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-container/v1beta1/webpack.config.js b/owl-bot-staging/google-container/v1beta1/webpack.config.js deleted file mode 100644 index 9032271af9d..00000000000 --- a/owl-bot-staging/google-container/v1beta1/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: 'ClusterManager', - filename: './cluster-manager.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-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index f79bff88adf..2013c15fe8c 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -565,6 +565,9 @@ message LinuxNodeConfig { // net.ipv4.tcp_rmem // net.ipv4.tcp_wmem // net.ipv4.tcp_tw_reuse + // kernel.shmmni + // kernel.shmmax + // kernel.shmall map sysctls = 1; // cgroup_mode specifies the cgroup mode to be used on the node. @@ -647,6 +650,26 @@ message NodeKubeletConfig { // [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] // instead. message NodeConfig { + // LocalSsdEncryptionMode specifies the method used for encrypting the Local + // SSDs attached to the node. + enum LocalSsdEncryptionMode { + // The given node will be encrypted using keys managed by Google + // infrastructure and the keys will be deleted when the node is + // deleted. + LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0; + + // The given node will be encrypted using keys managed by Google + // infrastructure and the keys will be deleted when the node is + // deleted. + STANDARD_ENCRYPTION = 1; + + // The given node will opt-in for using ephemeral key for + // encryption of Local SSDs. + // The Local SSDs will not be able to recover data in case of node + // crash. + EPHEMERAL_KEY_ENCRYPTION = 2; + } + // Possible effective cgroup modes for the node. enum EffectiveCgroupMode { // EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the @@ -887,6 +910,10 @@ message NodeConfig { optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = 50; + // Specifies which method should be used for encrypting the + // Local SSDs attahced to the node. + optional LocalSsdEncryptionMode local_ssd_encryption_mode = 54; + // Output only. effective_cgroup_mode is the cgroup mode actually used by the // node pool. It is determined by the cgroup mode specified in the // LinuxNodeConfig or the default cgroup mode based on the cluster creation @@ -2358,6 +2385,10 @@ message NodePoolAutoConfig { // // Currently only `insecure_kubelet_readonly_port_enabled` can be set here. NodeKubeletConfig node_kubelet_config = 3; + + // Output only. Configuration options for Linux nodes. + LinuxNodeConfig linux_node_config = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Subset of Nodepool message that has defaults. @@ -2662,6 +2693,15 @@ message ClusterUpdate { // RBACBindingConfig allows user to restrict ClusterRoleBindings an // RoleBindings that can be created. optional RBACBindingConfig desired_rbac_binding_config = 144; + + // The desired enterprise configuration for the cluster. + DesiredEnterpriseConfig desired_enterprise_config = 147; + + // The desired Linux node config for all auto-provisioned node pools + // in autopilot clusters and node auto-provisioning enabled clusters. + // + // Currently only `cgroup_mode` can be set here. + LinuxNodeConfig desired_node_pool_auto_config_linux_node_config = 150; } // AdditionalPodRangesConfig is the configuration for additional pod secondary @@ -2684,6 +2724,12 @@ message RangeInfo { double utilization = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. +message DesiredEnterpriseConfig { + // desired_tier specifies the desired tier of the cluster. + EnterpriseConfig.ClusterTier desired_tier = 1; +} + // This operation resource represents operations that may have happened or are // happening on the cluster. All fields are output only. message Operation { @@ -4402,11 +4448,11 @@ message NodePoolAutoscaling { // Is autoscaling enabled for this node pool. bool enabled = 1; - // Minimum number of nodes for one location in the NodePool. Must be >= 1 and - // <= max_node_count. + // Minimum number of nodes for one location in the node pool. Must be greater + // than or equal to 0 and less than or equal to max_node_count. int32 min_node_count = 2; - // Maximum number of nodes for one location in the NodePool. Must be >= + // Maximum number of nodes for one location in the node pool. Must be >= // min_node_count. There has to be enough quota to scale up the cluster. int32 max_node_count = 3; @@ -4416,13 +4462,13 @@ message NodePoolAutoscaling { // Location policy used when scaling up a nodepool. LocationPolicy location_policy = 5; - // Minimum number of nodes in the node pool. Must be greater than 1 less than - // total_max_node_count. + // Minimum number of nodes in the node pool. Must be greater than or equal + // to 0 and less than or equal to total_max_node_count. // The total_*_node_count fields are mutually exclusive with the *_node_count // fields. int32 total_min_node_count = 6; - // Maximum number of nodes in the node pool. Must be greater than + // Maximum number of nodes in the node pool. Must be greater than or equal to // total_min_node_count. There has to be enough quota to scale up the cluster. // The total_*_node_count fields are mutually exclusive with the *_node_count // fields. @@ -5451,6 +5497,56 @@ message UpgradeEvent { string resource = 6; } +// UpgradeInfoEvent is a notification sent to customers about the upgrade +// information of a resource. +message UpgradeInfoEvent { + // The state of the upgrade. + enum State { + // STATE_UNSPECIFIED indicates the state is unspecified. + STATE_UNSPECIFIED = 0; + + // STARTED indicates the upgrade has started. + STARTED = 3; + + // SUCCEEDED indicates the upgrade has completed successfully. + SUCCEEDED = 4; + + // FAILED indicates the upgrade has failed. + FAILED = 5; + + // CANCELED indicates the upgrade has canceled. + CANCELED = 6; + } + + // The resource type associated with the upgrade. + UpgradeResourceType resource_type = 1; + + // The operation associated with this upgrade. + string operation = 2; + + // The time when the operation was started. + google.protobuf.Timestamp start_time = 3; + + // The time when the operation ended. + google.protobuf.Timestamp end_time = 4; + + // The current version before the upgrade. + string current_version = 5; + + // The target version for the upgrade. + string target_version = 6; + + // Optional relative path to the resource. For example in node pool upgrades, + // the relative path of the node pool. + string resource = 7; + + // Output only. The state of the upgrade. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A brief description of the event. + string description = 11; +} + // UpgradeAvailableEvent is a notification sent to customers when a new // available version is released. message UpgradeAvailableEvent { @@ -5915,6 +6011,9 @@ message EnterpriseConfig { // Output only. cluster_tier indicates the effective tier of the cluster. ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // desired_tier specifies the desired tier of the cluster. + ClusterTier desired_tier = 2; } // SecretManagerConfig is config for secret manager enablement. diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 52965e8acd3..3605fd3e161 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -1346,6 +1346,9 @@ export namespace google { /** NodeConfig secondaryBootDiskUpdateStrategy */ secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + /** NodeConfig localSsdEncryptionMode */ + localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); + /** NodeConfig effectiveCgroupMode */ effectiveCgroupMode?: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode|null); } @@ -1479,6 +1482,9 @@ export namespace google { /** NodeConfig secondaryBootDiskUpdateStrategy. */ public secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + /** NodeConfig localSsdEncryptionMode. */ + public localSsdEncryptionMode?: (google.container.v1.NodeConfig.LocalSsdEncryptionMode|keyof typeof google.container.v1.NodeConfig.LocalSsdEncryptionMode|null); + /** NodeConfig effectiveCgroupMode. */ public effectiveCgroupMode: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode); @@ -1488,6 +1494,9 @@ export namespace google { /** NodeConfig _secondaryBootDiskUpdateStrategy. */ public _secondaryBootDiskUpdateStrategy?: "secondaryBootDiskUpdateStrategy"; + /** NodeConfig _localSsdEncryptionMode. */ + public _localSsdEncryptionMode?: "localSsdEncryptionMode"; + /** * Creates a new NodeConfig instance using the specified properties. * @param [properties] Properties to set @@ -1568,6 +1577,13 @@ export namespace google { namespace NodeConfig { + /** LocalSsdEncryptionMode enum. */ + enum LocalSsdEncryptionMode { + LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0, + STANDARD_ENCRYPTION = 1, + EPHEMERAL_KEY_ENCRYPTION = 2 + } + /** EffectiveCgroupMode enum. */ enum EffectiveCgroupMode { EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0, @@ -7973,6 +7989,9 @@ export namespace google { /** NodePoolAutoConfig nodeKubeletConfig */ nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** NodePoolAutoConfig linuxNodeConfig */ + linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); } /** Represents a NodePoolAutoConfig. */ @@ -7993,6 +8012,9 @@ export namespace google { /** NodePoolAutoConfig nodeKubeletConfig. */ public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + /** NodePoolAutoConfig linuxNodeConfig. */ + public linuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + /** * Creates a new NodePoolAutoConfig instance using the specified properties. * @param [properties] Properties to set @@ -8471,6 +8493,12 @@ export namespace google { /** ClusterUpdate desiredRbacBindingConfig */ desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + + /** ClusterUpdate desiredEnterpriseConfig */ + desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig */ + desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); } /** Represents a ClusterUpdate. */ @@ -8668,6 +8696,12 @@ export namespace google { /** ClusterUpdate desiredRbacBindingConfig. */ public desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** ClusterUpdate desiredEnterpriseConfig. */ + public desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + + /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. */ + public desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + /** ClusterUpdate _desiredEnablePrivateEndpoint. */ public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; @@ -8979,6 +9013,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DesiredEnterpriseConfig. */ + interface IDesiredEnterpriseConfig { + + /** DesiredEnterpriseConfig desiredTier */ + desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); + } + + /** Represents a DesiredEnterpriseConfig. */ + class DesiredEnterpriseConfig implements IDesiredEnterpriseConfig { + + /** + * Constructs a new DesiredEnterpriseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDesiredEnterpriseConfig); + + /** DesiredEnterpriseConfig desiredTier. */ + public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + + /** + * Creates a new DesiredEnterpriseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DesiredEnterpriseConfig instance + */ + public static create(properties?: google.container.v1.IDesiredEnterpriseConfig): google.container.v1.DesiredEnterpriseConfig; + + /** + * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @param message DesiredEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @param message DesiredEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDesiredEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.DesiredEnterpriseConfig; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.DesiredEnterpriseConfig; + + /** + * Verifies a DesiredEnterpriseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DesiredEnterpriseConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DesiredEnterpriseConfig; + + /** + * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. + * @param message DesiredEnterpriseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DesiredEnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DesiredEnterpriseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DesiredEnterpriseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an Operation. */ interface IOperation { @@ -21351,6 +21482,163 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpgradeInfoEvent. */ + interface IUpgradeInfoEvent { + + /** UpgradeInfoEvent resourceType */ + resourceType?: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType|null); + + /** UpgradeInfoEvent operation */ + operation?: (string|null); + + /** UpgradeInfoEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent currentVersion */ + currentVersion?: (string|null); + + /** UpgradeInfoEvent targetVersion */ + targetVersion?: (string|null); + + /** UpgradeInfoEvent resource */ + resource?: (string|null); + + /** UpgradeInfoEvent state */ + state?: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State|null); + + /** UpgradeInfoEvent description */ + description?: (string|null); + } + + /** Represents an UpgradeInfoEvent. */ + class UpgradeInfoEvent implements IUpgradeInfoEvent { + + /** + * Constructs a new UpgradeInfoEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IUpgradeInfoEvent); + + /** UpgradeInfoEvent resourceType. */ + public resourceType: (google.container.v1.UpgradeResourceType|keyof typeof google.container.v1.UpgradeResourceType); + + /** UpgradeInfoEvent operation. */ + public operation: string; + + /** UpgradeInfoEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** UpgradeInfoEvent currentVersion. */ + public currentVersion: string; + + /** UpgradeInfoEvent targetVersion. */ + public targetVersion: string; + + /** UpgradeInfoEvent resource. */ + public resource: string; + + /** UpgradeInfoEvent state. */ + public state: (google.container.v1.UpgradeInfoEvent.State|keyof typeof google.container.v1.UpgradeInfoEvent.State); + + /** UpgradeInfoEvent description. */ + public description: string; + + /** + * Creates a new UpgradeInfoEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UpgradeInfoEvent instance + */ + public static create(properties?: google.container.v1.IUpgradeInfoEvent): google.container.v1.UpgradeInfoEvent; + + /** + * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @param message UpgradeInfoEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @param message UpgradeInfoEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IUpgradeInfoEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UpgradeInfoEvent; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UpgradeInfoEvent; + + /** + * Verifies an UpgradeInfoEvent message. + * @param message Plain 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 UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpgradeInfoEvent + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.UpgradeInfoEvent; + + /** + * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. + * @param message UpgradeInfoEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.UpgradeInfoEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpgradeInfoEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpgradeInfoEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UpgradeInfoEvent { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 3, + SUCCEEDED = 4, + FAILED = 5, + CANCELED = 6 + } + } + /** Properties of an UpgradeAvailableEvent. */ interface IUpgradeAvailableEvent { @@ -23661,6 +23949,9 @@ export namespace google { /** EnterpriseConfig clusterTier */ clusterTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); + + /** EnterpriseConfig desiredTier */ + desiredTier?: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier|null); } /** Represents an EnterpriseConfig. */ @@ -23675,6 +23966,9 @@ export namespace google { /** EnterpriseConfig clusterTier. */ public clusterTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + /** EnterpriseConfig desiredTier. */ + public desiredTier: (google.container.v1.EnterpriseConfig.ClusterTier|keyof typeof google.container.v1.EnterpriseConfig.ClusterTier); + /** * Creates a new EnterpriseConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index 6e8d336035f..76223167e4a 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -2446,6 +2446,7 @@ * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks * @property {Array.|null} [storagePools] NodeConfig storagePools * @property {google.container.v1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy + * @property {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null} [localSsdEncryptionMode] NodeConfig localSsdEncryptionMode * @property {google.container.v1.NodeConfig.EffectiveCgroupMode|null} [effectiveCgroupMode] NodeConfig effectiveCgroupMode */ @@ -2793,6 +2794,14 @@ */ NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; + /** + * NodeConfig localSsdEncryptionMode. + * @member {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null|undefined} localSsdEncryptionMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.localSsdEncryptionMode = null; + /** * NodeConfig effectiveCgroupMode. * @member {google.container.v1.NodeConfig.EffectiveCgroupMode} effectiveCgroupMode @@ -2826,6 +2835,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * NodeConfig _localSsdEncryptionMode. + * @member {"localSsdEncryptionMode"|undefined} _localSsdEncryptionMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + Object.defineProperty(NodeConfig.prototype, "_localSsdEncryptionMode", { + get: $util.oneOfGetter($oneOfFields = ["localSsdEncryptionMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new NodeConfig instance using the specified properties. * @function create @@ -2939,6 +2959,8 @@ writer.uint32(/* id 49, wireType 2 =*/394).string(message.storagePools[i]); if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) $root.google.container.v1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.localSsdEncryptionMode != null && Object.hasOwnProperty.call(message, "localSsdEncryptionMode")) + writer.uint32(/* id 54, wireType 0 =*/432).int32(message.localSsdEncryptionMode); if (message.effectiveCgroupMode != null && Object.hasOwnProperty.call(message, "effectiveCgroupMode")) writer.uint32(/* id 55, wireType 0 =*/440).int32(message.effectiveCgroupMode); return writer; @@ -3204,6 +3226,10 @@ message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); break; } + case 54: { + message.localSsdEncryptionMode = reader.int32(); + break; + } case 55: { message.effectiveCgroupMode = reader.int32(); break; @@ -3453,6 +3479,17 @@ return "secondaryBootDiskUpdateStrategy." + error; } } + if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { + properties._localSsdEncryptionMode = 1; + switch (message.localSsdEncryptionMode) { + default: + return "localSsdEncryptionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) switch (message.effectiveCgroupMode) { default: @@ -3668,6 +3705,26 @@ throw TypeError(".google.container.v1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); } + switch (object.localSsdEncryptionMode) { + default: + if (typeof object.localSsdEncryptionMode === "number") { + message.localSsdEncryptionMode = object.localSsdEncryptionMode; + break; + } + break; + case "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": + case 0: + message.localSsdEncryptionMode = 0; + break; + case "STANDARD_ENCRYPTION": + case 1: + message.localSsdEncryptionMode = 1; + break; + case "EPHEMERAL_KEY_ENCRYPTION": + case 2: + message.localSsdEncryptionMode = 2; + break; + } switch (object.effectiveCgroupMode) { default: if (typeof object.effectiveCgroupMode === "number") { @@ -3863,6 +3920,11 @@ if (options.oneofs) object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; } + if (message.localSsdEncryptionMode != null && message.hasOwnProperty("localSsdEncryptionMode")) { + object.localSsdEncryptionMode = options.enums === String ? $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] === undefined ? message.localSsdEncryptionMode : $root.google.container.v1.NodeConfig.LocalSsdEncryptionMode[message.localSsdEncryptionMode] : message.localSsdEncryptionMode; + if (options.oneofs) + object._localSsdEncryptionMode = "localSsdEncryptionMode"; + } if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) object.effectiveCgroupMode = options.enums === String ? $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] === undefined ? message.effectiveCgroupMode : $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] : message.effectiveCgroupMode; return object; @@ -3894,6 +3956,22 @@ return typeUrlPrefix + "/google.container.v1.NodeConfig"; }; + /** + * LocalSsdEncryptionMode enum. + * @name google.container.v1.NodeConfig.LocalSsdEncryptionMode + * @enum {number} + * @property {number} LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED=0 LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED value + * @property {number} STANDARD_ENCRYPTION=1 STANDARD_ENCRYPTION value + * @property {number} EPHEMERAL_KEY_ENCRYPTION=2 EPHEMERAL_KEY_ENCRYPTION value + */ + NodeConfig.LocalSsdEncryptionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_ENCRYPTION"] = 1; + values[valuesById[2] = "EPHEMERAL_KEY_ENCRYPTION"] = 2; + return values; + })(); + /** * EffectiveCgroupMode enum. * @name google.container.v1.NodeConfig.EffectiveCgroupMode @@ -20224,6 +20302,7 @@ * @property {google.container.v1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig + * @property {google.container.v1.ILinuxNodeConfig|null} [linuxNodeConfig] NodePoolAutoConfig linuxNodeConfig */ /** @@ -20265,6 +20344,14 @@ */ NodePoolAutoConfig.prototype.nodeKubeletConfig = null; + /** + * NodePoolAutoConfig linuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} linuxNodeConfig + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.linuxNodeConfig = null; + /** * Creates a new NodePoolAutoConfig instance using the specified properties. * @function create @@ -20295,6 +20382,8 @@ $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.linuxNodeConfig != null && Object.hasOwnProperty.call(message, "linuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.linuxNodeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -20341,6 +20430,10 @@ message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); break; } + case 4: { + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20391,6 +20484,11 @@ if (error) return "nodeKubeletConfig." + error; } + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.linuxNodeConfig); + if (error) + return "linuxNodeConfig." + error; + } return null; }; @@ -20421,6 +20519,11 @@ throw TypeError(".google.container.v1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); } + if (object.linuxNodeConfig != null) { + if (typeof object.linuxNodeConfig !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.linuxNodeConfig: object expected"); + message.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.linuxNodeConfig); + } return message; }; @@ -20441,6 +20544,7 @@ object.networkTags = null; object.resourceManagerTags = null; object.nodeKubeletConfig = null; + object.linuxNodeConfig = null; } if (message.networkTags != null && message.hasOwnProperty("networkTags")) object.networkTags = $root.google.container.v1.NetworkTags.toObject(message.networkTags, options); @@ -20448,6 +20552,8 @@ object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + if (message.linuxNodeConfig != null && message.hasOwnProperty("linuxNodeConfig")) + object.linuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.linuxNodeConfig, options); return object; }; @@ -21049,6 +21155,8 @@ * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] ClusterUpdate userManagedKeysConfig * @property {google.container.v1.IRBACBindingConfig|null} [desiredRbacBindingConfig] ClusterUpdate desiredRbacBindingConfig + * @property {google.container.v1.IDesiredEnterpriseConfig|null} [desiredEnterpriseConfig] ClusterUpdate desiredEnterpriseConfig + * @property {google.container.v1.ILinuxNodeConfig|null} [desiredNodePoolAutoConfigLinuxNodeConfig] ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig */ /** @@ -21563,6 +21671,22 @@ */ ClusterUpdate.prototype.desiredRbacBindingConfig = null; + /** + * ClusterUpdate desiredEnterpriseConfig. + * @member {google.container.v1.IDesiredEnterpriseConfig|null|undefined} desiredEnterpriseConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredEnterpriseConfig = null; + + /** + * ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. + * @member {google.container.v1.ILinuxNodeConfig|null|undefined} desiredNodePoolAutoConfigLinuxNodeConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredNodePoolAutoConfigLinuxNodeConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -21814,6 +21938,10 @@ $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); if (message.desiredRbacBindingConfig != null && Object.hasOwnProperty.call(message, "desiredRbacBindingConfig")) $root.google.container.v1.RBACBindingConfig.encode(message.desiredRbacBindingConfig, writer.uint32(/* id 144, wireType 2 =*/1154).fork()).ldelim(); + if (message.desiredEnterpriseConfig != null && Object.hasOwnProperty.call(message, "desiredEnterpriseConfig")) + $root.google.container.v1.DesiredEnterpriseConfig.encode(message.desiredEnterpriseConfig, writer.uint32(/* id 147, wireType 2 =*/1178).fork()).ldelim(); + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigLinuxNodeConfig")) + $root.google.container.v1.LinuxNodeConfig.encode(message.desiredNodePoolAutoConfigLinuxNodeConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); return writer; }; @@ -22098,6 +22226,14 @@ message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); break; } + case 147: { + message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.decode(reader, reader.uint32()); + break; + } + case 150: { + message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22460,6 +22596,16 @@ return "desiredRbacBindingConfig." + error; } } + if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) { + var error = $root.google.container.v1.DesiredEnterpriseConfig.verify(message.desiredEnterpriseConfig); + if (error) + return "desiredEnterpriseConfig." + error; + } + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) { + var error = $root.google.container.v1.LinuxNodeConfig.verify(message.desiredNodePoolAutoConfigLinuxNodeConfig); + if (error) + return "desiredNodePoolAutoConfigLinuxNodeConfig." + error; + } return null; }; @@ -22815,6 +22961,16 @@ throw TypeError(".google.container.v1.ClusterUpdate.desiredRbacBindingConfig: object expected"); message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.desiredRbacBindingConfig); } + if (object.desiredEnterpriseConfig != null) { + if (typeof object.desiredEnterpriseConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredEnterpriseConfig: object expected"); + message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.fromObject(object.desiredEnterpriseConfig); + } + if (object.desiredNodePoolAutoConfigLinuxNodeConfig != null) { + if (typeof object.desiredNodePoolAutoConfigLinuxNodeConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigLinuxNodeConfig: object expected"); + message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.desiredNodePoolAutoConfigLinuxNodeConfig); + } return message; }; @@ -22886,6 +23042,8 @@ object.desiredNodeKubeletConfig = null; object.desiredNodePoolAutoConfigKubeletConfig = null; object.userManagedKeysConfig = null; + object.desiredEnterpriseConfig = null; + object.desiredNodePoolAutoConfigLinuxNodeConfig = null; } if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) object.desiredNodeVersion = message.desiredNodeVersion; @@ -23041,6 +23199,10 @@ if (options.oneofs) object._desiredRbacBindingConfig = "desiredRbacBindingConfig"; } + if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) + object.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.toObject(message.desiredEnterpriseConfig, options); + if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) + object.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.desiredNodePoolAutoConfigLinuxNodeConfig, options); return object; }; @@ -23564,6 +23726,233 @@ return RangeInfo; })(); + v1.DesiredEnterpriseConfig = (function() { + + /** + * Properties of a DesiredEnterpriseConfig. + * @memberof google.container.v1 + * @interface IDesiredEnterpriseConfig + * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] DesiredEnterpriseConfig desiredTier + */ + + /** + * Constructs a new DesiredEnterpriseConfig. + * @memberof google.container.v1 + * @classdesc Represents a DesiredEnterpriseConfig. + * @implements IDesiredEnterpriseConfig + * @constructor + * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set + */ + function DesiredEnterpriseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DesiredEnterpriseConfig desiredTier. + * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier + * @memberof google.container.v1.DesiredEnterpriseConfig + * @instance + */ + DesiredEnterpriseConfig.prototype.desiredTier = 0; + + /** + * Creates a new DesiredEnterpriseConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig=} [properties] Properties to set + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig instance + */ + DesiredEnterpriseConfig.create = function create(properties) { + return new DesiredEnterpriseConfig(properties); + }; + + /** + * Encodes the specified DesiredEnterpriseConfig message. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredEnterpriseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredTier); + return writer; + }; + + /** + * Encodes the specified DesiredEnterpriseConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredEnterpriseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.IDesiredEnterpriseConfig} message DesiredEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredEnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredEnterpriseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DesiredEnterpriseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.desiredTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DesiredEnterpriseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredEnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DesiredEnterpriseConfig message. + * @function verify + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DesiredEnterpriseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + switch (message.desiredTier) { + default: + return "desiredTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DesiredEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DesiredEnterpriseConfig} DesiredEnterpriseConfig + */ + DesiredEnterpriseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DesiredEnterpriseConfig) + return object; + var message = new $root.google.container.v1.DesiredEnterpriseConfig(); + switch (object.desiredTier) { + default: + if (typeof object.desiredTier === "number") { + message.desiredTier = object.desiredTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.desiredTier = 0; + break; + case "STANDARD": + case 1: + message.desiredTier = 1; + break; + case "ENTERPRISE": + case 2: + message.desiredTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DesiredEnterpriseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {google.container.v1.DesiredEnterpriseConfig} message DesiredEnterpriseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DesiredEnterpriseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; + return object; + }; + + /** + * Converts this DesiredEnterpriseConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DesiredEnterpriseConfig + * @instance + * @returns {Object.} JSON object + */ + DesiredEnterpriseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DesiredEnterpriseConfig + * @function getTypeUrl + * @memberof google.container.v1.DesiredEnterpriseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DesiredEnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DesiredEnterpriseConfig"; + }; + + return DesiredEnterpriseConfig; + })(); + v1.Operation = (function() { /** @@ -55147,6 +55536,482 @@ return UpgradeEvent; })(); + v1.UpgradeInfoEvent = (function() { + + /** + * Properties of an UpgradeInfoEvent. + * @memberof google.container.v1 + * @interface IUpgradeInfoEvent + * @property {google.container.v1.UpgradeResourceType|null} [resourceType] UpgradeInfoEvent resourceType + * @property {string|null} [operation] UpgradeInfoEvent operation + * @property {google.protobuf.ITimestamp|null} [startTime] UpgradeInfoEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UpgradeInfoEvent endTime + * @property {string|null} [currentVersion] UpgradeInfoEvent currentVersion + * @property {string|null} [targetVersion] UpgradeInfoEvent targetVersion + * @property {string|null} [resource] UpgradeInfoEvent resource + * @property {google.container.v1.UpgradeInfoEvent.State|null} [state] UpgradeInfoEvent state + * @property {string|null} [description] UpgradeInfoEvent description + */ + + /** + * Constructs a new UpgradeInfoEvent. + * @memberof google.container.v1 + * @classdesc Represents an UpgradeInfoEvent. + * @implements IUpgradeInfoEvent + * @constructor + * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set + */ + function UpgradeInfoEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpgradeInfoEvent resourceType. + * @member {google.container.v1.UpgradeResourceType} resourceType + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.resourceType = 0; + + /** + * UpgradeInfoEvent operation. + * @member {string} operation + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.operation = ""; + + /** + * UpgradeInfoEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.startTime = null; + + /** + * UpgradeInfoEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.endTime = null; + + /** + * UpgradeInfoEvent currentVersion. + * @member {string} currentVersion + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.currentVersion = ""; + + /** + * UpgradeInfoEvent targetVersion. + * @member {string} targetVersion + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.targetVersion = ""; + + /** + * UpgradeInfoEvent resource. + * @member {string} resource + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.resource = ""; + + /** + * UpgradeInfoEvent state. + * @member {google.container.v1.UpgradeInfoEvent.State} state + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.state = 0; + + /** + * UpgradeInfoEvent description. + * @member {string} description + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + */ + UpgradeInfoEvent.prototype.description = ""; + + /** + * Creates a new UpgradeInfoEvent instance using the specified properties. + * @function create + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent=} [properties] Properties to set + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent instance + */ + UpgradeInfoEvent.create = function create(properties) { + return new UpgradeInfoEvent(properties); + }; + + /** + * Encodes the specified UpgradeInfoEvent message. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @function encode + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeInfoEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currentVersion); + if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetVersion); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resource); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.description); + return writer; + }; + + /** + * Encodes the specified UpgradeInfoEvent message, length delimited. Does not implicitly {@link google.container.v1.UpgradeInfoEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.IUpgradeInfoEvent} message UpgradeInfoEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpgradeInfoEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeInfoEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UpgradeInfoEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.int32(); + break; + } + case 2: { + message.operation = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currentVersion = reader.string(); + break; + } + case 6: { + message.targetVersion = reader.string(); + break; + } + case 7: { + message.resource = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 11: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpgradeInfoEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpgradeInfoEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpgradeInfoEvent message. + * @function verify + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpgradeInfoEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + if (!$util.isString(message.currentVersion)) + return "currentVersion: string expected"; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + if (!$util.isString(message.targetVersion)) + return "targetVersion: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an UpgradeInfoEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.UpgradeInfoEvent} UpgradeInfoEvent + */ + UpgradeInfoEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UpgradeInfoEvent) + return object; + var message = new $root.google.container.v1.UpgradeInfoEvent(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "UPGRADE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "MASTER": + case 1: + message.resourceType = 1; + break; + case "NODE_POOL": + case 2: + message.resourceType = 2; + break; + } + if (object.operation != null) + message.operation = String(object.operation); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.container.v1.UpgradeInfoEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.container.v1.UpgradeInfoEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.currentVersion != null) + message.currentVersion = String(object.currentVersion); + if (object.targetVersion != null) + message.targetVersion = String(object.targetVersion); + if (object.resource != null) + message.resource = String(object.resource); + 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 "STARTED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "CANCELED": + case 6: + message.state = 6; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an UpgradeInfoEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {google.container.v1.UpgradeInfoEvent} message UpgradeInfoEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpgradeInfoEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = options.enums === String ? "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" : 0; + object.operation = ""; + object.startTime = null; + object.endTime = null; + object.currentVersion = ""; + object.targetVersion = ""; + object.resource = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.description = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.container.v1.UpgradeResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.container.v1.UpgradeResourceType[message.resourceType] : message.resourceType; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = message.currentVersion; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + object.targetVersion = message.targetVersion; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.container.v1.UpgradeInfoEvent.State[message.state] === undefined ? message.state : $root.google.container.v1.UpgradeInfoEvent.State[message.state] : message.state; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this UpgradeInfoEvent to JSON. + * @function toJSON + * @memberof google.container.v1.UpgradeInfoEvent + * @instance + * @returns {Object.} JSON object + */ + UpgradeInfoEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpgradeInfoEvent + * @function getTypeUrl + * @memberof google.container.v1.UpgradeInfoEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpgradeInfoEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.UpgradeInfoEvent"; + }; + + /** + * State enum. + * @name google.container.v1.UpgradeInfoEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=3 STARTED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} CANCELED=6 CANCELED value + */ + UpgradeInfoEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[3] = "STARTED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + return values; + })(); + + return UpgradeInfoEvent; + })(); + v1.UpgradeAvailableEvent = (function() { /** @@ -60701,6 +61566,7 @@ * @memberof google.container.v1 * @interface IEnterpriseConfig * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [clusterTier] EnterpriseConfig clusterTier + * @property {google.container.v1.EnterpriseConfig.ClusterTier|null} [desiredTier] EnterpriseConfig desiredTier */ /** @@ -60726,6 +61592,14 @@ */ EnterpriseConfig.prototype.clusterTier = 0; + /** + * EnterpriseConfig desiredTier. + * @member {google.container.v1.EnterpriseConfig.ClusterTier} desiredTier + * @memberof google.container.v1.EnterpriseConfig + * @instance + */ + EnterpriseConfig.prototype.desiredTier = 0; + /** * Creates a new EnterpriseConfig instance using the specified properties. * @function create @@ -60752,6 +61626,8 @@ writer = $Writer.create(); if (message.clusterTier != null && Object.hasOwnProperty.call(message, "clusterTier")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clusterTier); + if (message.desiredTier != null && Object.hasOwnProperty.call(message, "desiredTier")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.desiredTier); return writer; }; @@ -60790,6 +61666,10 @@ message.clusterTier = reader.int32(); break; } + case 2: { + message.desiredTier = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -60834,6 +61714,15 @@ case 2: break; } + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + switch (message.desiredTier) { + default: + return "desiredTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -60869,6 +61758,26 @@ message.clusterTier = 2; break; } + switch (object.desiredTier) { + default: + if (typeof object.desiredTier === "number") { + message.desiredTier = object.desiredTier; + break; + } + break; + case "CLUSTER_TIER_UNSPECIFIED": + case 0: + message.desiredTier = 0; + break; + case "STANDARD": + case 1: + message.desiredTier = 1; + break; + case "ENTERPRISE": + case 2: + message.desiredTier = 2; + break; + } return message; }; @@ -60885,10 +61794,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.clusterTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + object.desiredTier = options.enums === String ? "CLUSTER_TIER_UNSPECIFIED" : 0; + } if (message.clusterTier != null && message.hasOwnProperty("clusterTier")) object.clusterTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] === undefined ? message.clusterTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.clusterTier] : message.clusterTier; + if (message.desiredTier != null && message.hasOwnProperty("desiredTier")) + object.desiredTier = options.enums === String ? $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] === undefined ? message.desiredTier : $root.google.container.v1.EnterpriseConfig.ClusterTier[message.desiredTier] : message.desiredTier; return object; }; diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index 1895850a6ee..5ef0f4cc845 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -1013,6 +1013,11 @@ "oneof": [ "secondaryBootDiskUpdateStrategy" ] + }, + "_localSsdEncryptionMode": { + "oneof": [ + "localSsdEncryptionMode" + ] } }, "fields": { @@ -1194,6 +1199,13 @@ "proto3_optional": true } }, + "localSsdEncryptionMode": { + "type": "LocalSsdEncryptionMode", + "id": 54, + "options": { + "proto3_optional": true + } + }, "effectiveCgroupMode": { "type": "EffectiveCgroupMode", "id": 55, @@ -1203,6 +1215,13 @@ } }, "nested": { + "LocalSsdEncryptionMode": { + "values": { + "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED": 0, + "STANDARD_ENCRYPTION": 1, + "EPHEMERAL_KEY_ENCRYPTION": 2 + } + }, "EffectiveCgroupMode": { "values": { "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": 0, @@ -2783,6 +2802,13 @@ "nodeKubeletConfig": { "type": "NodeKubeletConfig", "id": 3 + }, + "linuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -3145,6 +3171,14 @@ "options": { "proto3_optional": true } + }, + "desiredEnterpriseConfig": { + "type": "DesiredEnterpriseConfig", + "id": 147 + }, + "desiredNodePoolAutoConfigLinuxNodeConfig": { + "type": "LinuxNodeConfig", + "id": 150 } } }, @@ -3183,6 +3217,14 @@ } } }, + "DesiredEnterpriseConfig": { + "fields": { + "desiredTier": { + "type": "EnterpriseConfig.ClusterTier", + "id": 1 + } + } + }, "Operation": { "fields": { "name": { @@ -6203,6 +6245,60 @@ } } }, + "UpgradeInfoEvent": { + "fields": { + "resourceType": { + "type": "UpgradeResourceType", + "id": 1 + }, + "operation": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "currentVersion": { + "type": "string", + "id": 5 + }, + "targetVersion": { + "type": "string", + "id": 6 + }, + "resource": { + "type": "string", + "id": 7 + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 11 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "CANCELED": 6 + } + } + } + }, "UpgradeAvailableEvent": { "fields": { "version": { @@ -6647,6 +6743,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "desiredTier": { + "type": "ClusterTier", + "id": 2 } }, "nested": {